@bpmnkit/docspack 0.0.1
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/.llms/chunks/cli.casen.aikit-skills.md +19 -0
- package/.llms/chunks/cli.casen.bpmn-generation-pipeline.md +32 -0
- package/.llms/chunks/cli.casen.connection-profiles.md +62 -0
- package/.llms/chunks/cli.casen.generate-bpmn-files.md +28 -0
- package/.llms/chunks/cli.casen.md +80 -0
- package/.llms/chunks/cli.casen.plugins.md +56 -0
- package/.llms/chunks/cli.casen.worker-commands.md +45 -0
- package/.llms/chunks/cli.connector.all-flags.md +29 -0
- package/.llms/chunks/cli.connector.browse-the-bundled-ootb-catalog.md +32 -0
- package/.llms/chunks/cli.connector.built-in-catalog.md +41 -0
- package/.llms/chunks/cli.connector.common-workflows.md +50 -0
- package/.llms/chunks/cli.connector.generate-from-the-openapi-catalog.md +30 -0
- package/.llms/chunks/cli.connector.md +20 -0
- package/.llms/chunks/cli.connector.programmatic-usage.md +7 -0
- package/.llms/chunks/cli.connector.what-gets-generated.md +20 -0
- package/.llms/chunks/cli.generate.definition-mode-ai-scripting-path.md +89 -0
- package/.llms/chunks/cli.generate.md +52 -0
- package/.llms/chunks/cli.generate.modify-existing-mode-input.md +59 -0
- package/.llms/chunks/cli.generate.typical-ai-workflow.md +18 -0
- package/.llms/chunks/cli.plugin-authoring.md +59 -0
- package/.llms/chunks/cli.plugin-authoring.plugin-naming-conventions.md +11 -0
- package/.llms/chunks/cli.plugin-authoring.test-locally.md +41 -0
- package/.llms/chunks/cli.plugin-authoring.the-bpmnkit-cli-sdk-sdk.md +82 -0
- package/.llms/chunks/cli.plugin-authoring.what-gets-generated.md +69 -0
- package/.llms/chunks/cli.plugin-authoring.writing-commands.md +84 -0
- package/.llms/chunks/cli.plugins.bpmnkit-casen-report.md +39 -0
- package/.llms/chunks/cli.plugins.bpmnkit-casen-worker-http.md +23 -0
- package/.llms/chunks/cli.plugins.md +25 -0
- package/.llms/chunks/cli.skills.deploy.md +24 -0
- package/.llms/chunks/cli.skills.implement.md +36 -0
- package/.llms/chunks/cli.skills.md +29 -0
- package/.llms/chunks/cli.skills.no-mcp-server-required.md +6 -0
- package/.llms/chunks/cli.skills.review.md +33 -0
- package/.llms/chunks/cli.skills.test.md +33 -0
- package/.llms/chunks/cli.view.folder-support.md +31 -0
- package/.llms/chunks/cli.view.md +70 -0
- package/.llms/chunks/cli.view.tabbed-navigation.md +28 -0
- package/.llms/chunks/getting-started.concepts.ai-compact-format.md +23 -0
- package/.llms/chunks/getting-started.concepts.auto-layout.md +24 -0
- package/.llms/chunks/getting-started.concepts.parsing-and-serializing.md +26 -0
- package/.llms/chunks/getting-started.concepts.the-fluent-builder.md +41 -0
- package/.llms/chunks/getting-started.concepts.zeebe-extensions.md +25 -0
- package/.llms/chunks/getting-started.installation.md +38 -0
- package/.llms/chunks/getting-started.installation.runtime-requirements.md +13 -0
- package/.llms/chunks/getting-started.installation.svg-canvas-viewer.md +41 -0
- package/.llms/chunks/getting-started.installation.worker-client.md +40 -0
- package/.llms/chunks/getting-started.quick-start.md +31 -0
- package/.llms/chunks/getting-started.quick-start.step-2-simulate-locally.md +28 -0
- package/.llms/chunks/getting-started.quick-start.step-3-deploy-to-camunda-8.md +33 -0
- package/.llms/chunks/getting-started.quick-start.what-s-next.md +14 -0
- package/.llms/chunks/guides.ai-agents.deploy-grade-validation.md +19 -0
- package/.llms/chunks/guides.ai-agents.how-it-s-modeled.md +11 -0
- package/.llms/chunks/guides.ai-agents.md +18 -0
- package/.llms/chunks/guides.ai-agents.see-also.md +7 -0
- package/.llms/chunks/guides.ai-agents.testing-without-a-real-llm-call.md +26 -0
- package/.llms/chunks/guides.ai-agents.the-aiagent-plan-step.md +62 -0
- package/.llms/chunks/guides.ai-implement.deploying.md +49 -0
- package/.llms/chunks/guides.ai-implement.extending-an-existing-process.md +10 -0
- package/.llms/chunks/guides.ai-implement.lightweight-alternative-casen-skills-install.md +28 -0
- package/.llms/chunks/guides.ai-implement.md +32 -0
- package/.llms/chunks/guides.ai-implement.the-claude-code-plugin.md +21 -0
- package/.llms/chunks/guides.ai.claude-api-example.md +41 -0
- package/.llms/chunks/guides.ai.mcp-server.md +20 -0
- package/.llms/chunks/guides.ai.md +32 -0
- package/.llms/chunks/guides.ai.minimal-empty-diagram.md +32 -0
- package/.llms/chunks/guides.ai.openai-function-calling.md +40 -0
- package/.llms/chunks/guides.building-processes.boundary-events.md +47 -0
- package/.llms/chunks/guides.building-processes.call-activities.md +47 -0
- package/.llms/chunks/guides.building-processes.events.md +57 -0
- package/.llms/chunks/guides.building-processes.multi-instance.md +20 -0
- package/.llms/chunks/guides.building-processes.service-tasks.md +39 -0
- package/.llms/chunks/guides.building-processes.sub-processes.md +40 -0
- package/.llms/chunks/guides.building-processes.task-defaults.md +18 -0
- package/.llms/chunks/guides.claude-code-plugin.ambient-hooks.md +24 -0
- package/.llms/chunks/guides.claude-code-plugin.configuration.md +126 -0
- package/.llms/chunks/guides.claude-code-plugin.md +47 -0
- package/.llms/chunks/guides.claude-code-plugin.reference-docs.md +61 -0
- package/.llms/chunks/guides.deployment.ci-cd-deploy-on-push.md +47 -0
- package/.llms/chunks/guides.deployment.deploying-a-process.md +52 -0
- package/.llms/chunks/guides.deployment.handling-jobs.md +50 -0
- package/.llms/chunks/guides.deployment.managing-incidents.md +33 -0
- package/.llms/chunks/guides.deployment.md +49 -0
- package/.llms/chunks/guides.gateways.branching-inside-sub-processes.md +27 -0
- package/.llms/chunks/guides.gateways.exclusive-gateway-xor.md +41 -0
- package/.llms/chunks/guides.gateways.inclusive-gateway-or.md +43 -0
- package/.llms/chunks/guides.gateways.nested-branching.md +27 -0
- package/.llms/chunks/guides.gateways.parallel-gateway-and.md +26 -0
- package/.llms/chunks/guides.patterns.how-matching-works.md +17 -0
- package/.llms/chunks/guides.patterns.md +26 -0
- package/.llms/chunks/guides.patterns.pattern-schema.md +38 -0
- package/.llms/chunks/guides.patterns.see-also.md +7 -0
- package/.llms/chunks/guides.patterns.using-patterns-from-the-cli.md +30 -0
- package/.llms/chunks/guides.patterns.what-a-pattern-contains.md +18 -0
- package/.llms/chunks/guides.simulation.dmn-decision-evaluation.md +51 -0
- package/.llms/chunks/guides.simulation.instance-state.md +29 -0
- package/.llms/chunks/guides.simulation.md +51 -0
- package/.llms/chunks/guides.simulation.message-correlation.md +30 -0
- package/.llms/chunks/guides.simulation.multiple-deployments.md +14 -0
- package/.llms/chunks/guides.workers-standalone.anatomy-of-a-worker.md +42 -0
- package/.llms/chunks/guides.workers-standalone.camunda-saas.md +43 -0
- package/.llms/chunks/guides.workers-standalone.environment-variables.md +14 -0
- package/.llms/chunks/guides.workers-standalone.md +35 -0
- package/.llms/chunks/guides.workers-standalone.running-workers.md +61 -0
- package/.llms/chunks/guides.workers-standalone.see-also.md +7 -0
- package/.llms/chunks/packages.api.incident-resolution.md +31 -0
- package/.llms/chunks/packages.api.observability-events.md +13 -0
- package/.llms/chunks/packages.api.overview.md +49 -0
- package/.llms/chunks/packages.api.process-operations.md +60 -0
- package/.llms/chunks/packages.api.resource-namespaces.md +20 -0
- package/.llms/chunks/packages.canvas.events.md +56 -0
- package/.llms/chunks/packages.canvas.options.md +24 -0
- package/.llms/chunks/packages.canvas.overview.md +35 -0
- package/.llms/chunks/packages.connector-gen.body-expansion.md +18 -0
- package/.llms/chunks/packages.connector-gen.catalog-reference.md +54 -0
- package/.llms/chunks/packages.connector-gen.catalogentry-type.md +21 -0
- package/.llms/chunks/packages.connector-gen.generating-from-the-catalog.md +44 -0
- package/.llms/chunks/packages.connector-gen.installation.md +42 -0
- package/.llms/chunks/packages.connector-gen.lower-level-api.md +31 -0
- package/.llms/chunks/packages.connector-gen.overview.md +16 -0
- package/.llms/chunks/packages.connector-gen.writeoptions.md +26 -0
- package/.llms/chunks/packages.core.dmn-support.md +36 -0
- package/.llms/chunks/packages.core.installation-bpmn.creatediagram-id.md +18 -0
- package/.llms/chunks/packages.core.installation-bpmn.createprocess-id-name.md +10 -0
- package/.llms/chunks/packages.core.installation-bpmn.export-definitions.md +10 -0
- package/.llms/chunks/packages.core.installation-bpmn.makeempty-processid-processname.md +11 -0
- package/.llms/chunks/packages.core.installation-bpmn.parse-xml.md +10 -0
- package/.llms/chunks/packages.core.installation-bpmn.sample_xml.md +7 -0
- package/.llms/chunks/packages.core.installation-compactify-definitions.md +13 -0
- package/.llms/chunks/packages.core.installation-expand-compact.md +13 -0
- package/.llms/chunks/packages.core.installation-layoutprocess-process.md +15 -0
- package/.llms/chunks/packages.core.installation-processbuilder-methods.md +29 -0
- package/.llms/chunks/packages.core.installation.md +11 -0
- package/.llms/chunks/packages.core.overview.md +15 -0
- package/.llms/chunks/packages.docspack.installation.md +45 -0
- package/.llms/chunks/packages.docspack.overview.md +23 -0
- package/.llms/chunks/packages.docspack.reading-it-yourself.md +34 -0
- package/.llms/chunks/packages.docspack.trust.md +13 -0
- package/.llms/chunks/packages.docspack.using-the-index-directly.md +52 -0
- package/.llms/chunks/packages.editor.basic-setup.md +41 -0
- package/.llms/chunks/packages.editor.full-editor-with-all-plugins.md +30 -0
- package/.llms/chunks/packages.editor.hud-options.md +41 -0
- package/.llms/chunks/packages.editor.overview.md +21 -0
- package/.llms/chunks/packages.engine.installation.md +77 -0
- package/.llms/chunks/packages.engine.overview.md +19 -0
- package/.llms/chunks/packages.engine.processinstance.md +17 -0
- package/.llms/chunks/packages.engine.variable-scoping.md +27 -0
- package/.llms/chunks/packages.worker-client.client.poll-jobtype-options.md +40 -0
- package/.llms/chunks/packages.worker-client.createworkerclient-options.md +32 -0
- package/.llms/chunks/packages.worker-client.job.complete-variables.md +29 -0
- package/.llms/chunks/packages.worker-client.md +33 -0
- package/.llms/chunks/packages.worker-client.oauth2-camunda-saas.md +26 -0
- package/.llms/chunks/packages.worker-client.see-also.md +7 -0
- package/.llms/manifest.json +2083 -0
- package/LICENSE +21 -0
- package/README.md +150 -0
- package/dist/build.d.ts +29 -0
- package/dist/build.js +89 -0
- package/dist/chunk.d.ts +41 -0
- package/dist/chunk.js +242 -0
- package/dist/cli.d.ts +9 -0
- package/dist/cli.js +160 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +12 -0
- package/dist/load.d.ts +27 -0
- package/dist/load.js +144 -0
- package/dist/search.d.ts +53 -0
- package/dist/search.js +104 -0
- package/dist/text.d.ts +22 -0
- package/dist/text.js +204 -0
- package/dist/types.d.ts +48 -0
- package/dist/types.js +3 -0
- package/llms.txt +174 -0
- package/package.json +76 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# AIKit Skills — `/review`
|
|
2
|
+
|
|
3
|
+
Run the full static analyzer on a BPMN file and get a structured findings report.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
/review invoice-approval.bpmn
|
|
7
|
+
/review path/to/process.bpmn
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
**What it does:**
|
|
11
|
+
|
|
12
|
+
1. Runs `casen lint lint <file> --profile deploy` (the deploy-readiness gate) and the default profile (all categories)
|
|
13
|
+
2. Groups findings by severity: errors, warnings, info
|
|
14
|
+
3. Offers `casen lint lint <file> --fix` to apply auto-fixable findings
|
|
15
|
+
4. Ends with an explicit **"Deploy-ready: yes/no"** verdict
|
|
16
|
+
|
|
17
|
+
**Example output:**
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
Errors (1):
|
|
21
|
+
- [Task_1] [deploy] Service task has no zeebe:taskDefinition type.
|
|
22
|
+
|
|
23
|
+
Warnings (2):
|
|
24
|
+
- [Gateway_1] [pattern] Gateway has no default flow
|
|
25
|
+
- [Process_1] [pattern] No timer event on long-running tasks
|
|
26
|
+
|
|
27
|
+
Deploy-ready: no — 1 error
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
Source: https://docs.bpmnkit.com/cli/skills/
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# AIKit Skills — `/test`
|
|
2
|
+
|
|
3
|
+
Run scenario tests on a BPMN process and report path/branch coverage.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
/test invoice-approval.bpmn
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
**What it does:**
|
|
10
|
+
|
|
11
|
+
1. Looks for the `<file>.bpmn.tests.json` sidecar (written automatically by `casen synth` from a plan's `tests` array); writes one if missing
|
|
12
|
+
2. Runs `casen test <file>.bpmn`
|
|
13
|
+
3. Cross-references gateway branches and error/timer boundaries against which scenarios exercise them
|
|
14
|
+
4. Reports pass/fail counts and any uncovered paths
|
|
15
|
+
|
|
16
|
+
**Example output:**
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
| Scenario | Result | Details |
|
|
20
|
+
|----------|--------|---------|
|
|
21
|
+
| happy-path | ✓ PASS | (12ms) |
|
|
22
|
+
| rejection-path | ✓ PASS | (9ms) |
|
|
23
|
+
|
|
24
|
+
Uncovered paths:
|
|
25
|
+
- Boundary "sla-timeout" (timer, 48h) has no test scenario
|
|
26
|
+
|
|
27
|
+
2/2 scenarios passed. 1 boundary uncovered.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
Source: https://docs.bpmnkit.com/cli/skills/
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# casen view — Folder support
|
|
2
|
+
|
|
3
|
+
Pass a directory instead of individual files. The viewer scans the top level of the directory
|
|
4
|
+
for files with the matching extension and gives each one its own tab.
|
|
5
|
+
|
|
6
|
+
```sh
|
|
7
|
+
# All .bpmn files in ./processes/
|
|
8
|
+
casen view bpmn ./processes/
|
|
9
|
+
|
|
10
|
+
# All supported types in ./project/
|
|
11
|
+
casen view open ./project/
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## Flags
|
|
16
|
+
|
|
17
|
+
All subcommands accept the same flags:
|
|
18
|
+
|
|
19
|
+
| Flag | Description | Default |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `--port` | Port for the local server | `3044` |
|
|
22
|
+
| `--theme` | Color theme: `light` or `dark` | `light` |
|
|
23
|
+
| `--no-open` | Do not open the browser automatically | `false` |
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
# Dark theme on a custom port without auto-opening
|
|
27
|
+
casen view bpmn process.bpmn --theme dark --port 8080 --no-open
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
Source: https://docs.bpmnkit.com/cli/view/
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# casen view
|
|
2
|
+
|
|
3
|
+
`casen view` spawns a local HTTP server and opens the system browser to display BPMN diagrams,
|
|
4
|
+
DMN decision tables, and Camunda forms. All rendering happens server-side — no browser plugins required.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## Commands
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
casen view
|
|
11
|
+
├── open — view any mix of .bpmn, .dmn, and .form files (auto-detects type)
|
|
12
|
+
├── bpmn — view BPMN files rendered as SVG
|
|
13
|
+
├── dmn — view DMN decision tables
|
|
14
|
+
└── form — view Camunda form layouts
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Subcommands
|
|
19
|
+
|
|
20
|
+
### `casen view open`
|
|
21
|
+
|
|
22
|
+
Accepts any combination of `.bpmn`, `.dmn`, and `.form` files or directories. File type is
|
|
23
|
+
detected automatically from the extension.
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
# Mixed file types
|
|
27
|
+
casen view open order.bpmn routing.dmn review.form
|
|
28
|
+
|
|
29
|
+
# Entire project folder — all supported files get tabs
|
|
30
|
+
casen view open ./project/
|
|
31
|
+
|
|
32
|
+
# Mix files and folders
|
|
33
|
+
casen view open ./processes/ extra.dmn review.form
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### `casen view bpmn`
|
|
37
|
+
|
|
38
|
+
Renders BPMN diagrams server-side as SVG using `exportSvg` from `@bpmnkit/core`.
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
# Single file
|
|
42
|
+
casen view bpmn process.bpmn
|
|
43
|
+
|
|
44
|
+
# All .bpmn files in a folder
|
|
45
|
+
casen view bpmn ./processes/
|
|
46
|
+
|
|
47
|
+
# Multiple specific files
|
|
48
|
+
casen view bpmn order.bpmn payment.bpmn shipping.bpmn
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### `casen view dmn`
|
|
52
|
+
|
|
53
|
+
Renders DMN decision tables as ASCII art in a monospace panel.
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
casen view dmn eligibility.dmn
|
|
57
|
+
casen view dmn ./decisions/
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### `casen view form`
|
|
61
|
+
|
|
62
|
+
Renders Camunda form layouts (`.form` files) as ASCII art in a monospace panel.
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
casen view form approval.form
|
|
66
|
+
casen view form ./forms/
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
Source: https://docs.bpmnkit.com/cli/view/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# casen view — Tabbed navigation
|
|
2
|
+
|
|
3
|
+
When multiple files are loaded, the viewer renders a tab bar at the top. Click a tab to switch
|
|
4
|
+
diagrams. Tabs show the filename and are colour-coded by type (BPMN / DMN / Form).
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## Stopping the server
|
|
8
|
+
|
|
9
|
+
Press `Ctrl+C` in the terminal where `casen view` is running. The server shuts down cleanly.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Usage in an AI workflow
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
# Generate a process, then immediately view it
|
|
16
|
+
casen generate bpmn --template approval --process-id approve
|
|
17
|
+
casen view bpmn approve.bpmn
|
|
18
|
+
|
|
19
|
+
# Inspect a folder of processes together
|
|
20
|
+
casen view open ./processes/
|
|
21
|
+
|
|
22
|
+
# After patching an existing file, verify the result
|
|
23
|
+
casen generate bpmn --input order.bpmn --patch '...'
|
|
24
|
+
casen view bpmn order.bpmn --no-open --port 3044
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
Source: https://docs.bpmnkit.com/cli/view/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Core Concepts — AI-Compact Format
|
|
2
|
+
|
|
3
|
+
Raw BPMN XML is verbose — a simple three-node process takes ~60 lines of XML. The compact
|
|
4
|
+
format reduces this to a small JSON object that fits in a single LLM prompt:
|
|
5
|
+
|
|
6
|
+
```typescript
|
|
7
|
+
import { compactify, expand } from "@bpmnkit/core";
|
|
8
|
+
|
|
9
|
+
// Definitions → CompactDiagram (small JSON)
|
|
10
|
+
const compact = compactify(definitions);
|
|
11
|
+
|
|
12
|
+
// CompactDiagram → Definitions (full object)
|
|
13
|
+
const restored = expand(compact);
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The compact format is designed for AI agents:
|
|
17
|
+
- Every element has an `id` and a human-readable `name`
|
|
18
|
+
- Sequence flows are represented as `{ from, to, condition? }` pairs
|
|
19
|
+
- Zeebe extensions (task type, IO mappings, headers) are inlined
|
|
20
|
+
- The full diagram of a typical approval workflow fits in ~500 tokens
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
Source: https://docs.bpmnkit.com/getting-started/concepts/
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Core Concepts — Auto-Layout
|
|
2
|
+
|
|
3
|
+
Call `.withAutoLayout()` before `.build()` to apply the Sugiyama layered graph algorithm.
|
|
4
|
+
It produces clean, left-to-right layouts without any coordinate math:
|
|
5
|
+
|
|
6
|
+
```typescript
|
|
7
|
+
const process = Bpmn.createProcess("flow")
|
|
8
|
+
.startEvent("start")
|
|
9
|
+
.serviceTask("work")
|
|
10
|
+
.endEvent("end")
|
|
11
|
+
.withAutoLayout() // assigns x/y/width/height to all elements
|
|
12
|
+
.build();
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Under the hood, the layout algorithm:
|
|
16
|
+
1. Topologically sorts elements into layers
|
|
17
|
+
2. Assigns X coordinates based on layer depth
|
|
18
|
+
3. Assigns Y coordinates by crossing-minimisation within each layer
|
|
19
|
+
4. Adds waypoints to sequence flow edges
|
|
20
|
+
|
|
21
|
+
You can access element sizes via the `ELEMENT_SIZES` export if you need to build custom layouts.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
Source: https://docs.bpmnkit.com/getting-started/concepts/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Core Concepts — Parsing and Serializing
|
|
2
|
+
|
|
3
|
+
The SDK can round-trip any BPMN 2.0 XML — parse it, modify it in TypeScript, and export it back:
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { Bpmn } from "@bpmnkit/core";
|
|
7
|
+
|
|
8
|
+
// Parse XML into a typed object
|
|
9
|
+
const definitions = Bpmn.parse(xmlString);
|
|
10
|
+
|
|
11
|
+
// Access the first process
|
|
12
|
+
const process = definitions.rootElements.find(
|
|
13
|
+
(el) => el.$type === "bpmn:Process"
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
// Export back to XML
|
|
17
|
+
const newXml = Bpmn.export(definitions);
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Round-trip fidelity
|
|
21
|
+
|
|
22
|
+
The parser preserves all attributes, extensions, and vendor-specific elements. Exporting the
|
|
23
|
+
parsed object produces XML that is semantically equivalent to the input.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
Source: https://docs.bpmnkit.com/getting-started/concepts/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Core Concepts — The Fluent Builder
|
|
2
|
+
|
|
3
|
+
`Bpmn.createProcess(id)` returns a `ProcessBuilder` — a chainable object that tracks the
|
|
4
|
+
current "cursor" position in the process graph. Each method call appends an element and
|
|
5
|
+
advances the cursor:
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { Bpmn } from "@bpmnkit/core";
|
|
9
|
+
|
|
10
|
+
Bpmn.createProcess("my-process")
|
|
11
|
+
.startEvent("start") // cursor at startEvent
|
|
12
|
+
.serviceTask("task-1") // cursor at task-1; sequence flow start → task-1 added
|
|
13
|
+
.endEvent("end") // cursor at end; sequence flow task-1 → end added
|
|
14
|
+
.build();
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Sequential flow
|
|
18
|
+
|
|
19
|
+
Methods like `.serviceTask()`, `.userTask()`, `.scriptTask()`, and `.endEvent()` all create an
|
|
20
|
+
element _and_ a sequence flow from the previous cursor position.
|
|
21
|
+
|
|
22
|
+
### Branches
|
|
23
|
+
|
|
24
|
+
`.exclusiveGateway()` and `.parallelGateway()` create a gateway and advance the cursor to it.
|
|
25
|
+
Use `.branch(id, builder)` to define outgoing paths:
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
.exclusiveGateway("gw")
|
|
29
|
+
.branch("approved", (b) =>
|
|
30
|
+
b.condition("= approved").serviceTask("notify").endEvent("done")
|
|
31
|
+
)
|
|
32
|
+
.branch("rejected", (b) =>
|
|
33
|
+
b.defaultFlow().endEvent("rejected")
|
|
34
|
+
)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Each branch builder starts at the gateway. Branches merge automatically when two paths lead to
|
|
38
|
+
the same element.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
Source: https://docs.bpmnkit.com/getting-started/concepts/
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Core Concepts — Zeebe Extensions
|
|
2
|
+
|
|
3
|
+
Camunda 8 (Zeebe) uses XML extension elements for its engine-specific config.
|
|
4
|
+
The builder exposes these as first-class TypeScript options:
|
|
5
|
+
|
|
6
|
+
```typescript
|
|
7
|
+
.serviceTask("send-email", {
|
|
8
|
+
name: "Send Confirmation Email",
|
|
9
|
+
taskType: "io.camunda.connectors.SMTP.v1", // connector type
|
|
10
|
+
taskHeaders: {
|
|
11
|
+
from: "noreply@example.com",
|
|
12
|
+
subject: "Your order is confirmed",
|
|
13
|
+
},
|
|
14
|
+
inputMappings: [
|
|
15
|
+
{ source: "= orderId", target: "orderId" },
|
|
16
|
+
{ source: "= customer.email", target: "to" },
|
|
17
|
+
],
|
|
18
|
+
outputMappings: [
|
|
19
|
+
{ source: "= messageId", target: "emailMessageId" },
|
|
20
|
+
],
|
|
21
|
+
})
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
Source: https://docs.bpmnkit.com/getting-started/concepts/
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
|
|
3
|
+
BPMN Kit is a collection of focused packages. Install only what you need.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Core SDK
|
|
7
|
+
|
|
8
|
+
The `@bpmnkit/core` package is the foundation — it provides the fluent process builder,
|
|
9
|
+
BPMN 2.0 parser/serializer, auto-layout, and the AI-compact format.
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm add @bpmnkit/core
|
|
13
|
+
# or
|
|
14
|
+
npm install @bpmnkit/core
|
|
15
|
+
# or
|
|
16
|
+
yarn add @bpmnkit/core
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Simulation Engine
|
|
21
|
+
|
|
22
|
+
To run BPMN processes locally (browser or Node.js):
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
pnpm add @bpmnkit/engine
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## Camunda 8 REST API Client
|
|
30
|
+
|
|
31
|
+
To interact with a live Camunda 8 cluster:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
pnpm add @bpmnkit/api
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
Source: https://docs.bpmnkit.com/getting-started/installation/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Installation — Runtime Requirements
|
|
2
|
+
|
|
3
|
+
| Runtime | Minimum Version |
|
|
4
|
+
|---|---|
|
|
5
|
+
| Node.js | 20 LTS |
|
|
6
|
+
| Deno | 1.40+ |
|
|
7
|
+
| Bun | 1.0+ |
|
|
8
|
+
| Browsers | ES2022 (Chrome 94, Firefox 93, Safari 15.4) |
|
|
9
|
+
|
|
10
|
+
All packages are **ESM-only** (`"type": "module"`). CommonJS is not supported.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
Source: https://docs.bpmnkit.com/getting-started/installation/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Installation — SVG Canvas Viewer
|
|
2
|
+
|
|
3
|
+
To embed an interactive BPMN diagram viewer in a web page:
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
pnpm add @bpmnkit/canvas
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Full Editor
|
|
11
|
+
|
|
12
|
+
The editor bundles the canvas, a properties panel, and an AI bridge:
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
pnpm add @bpmnkit/editor
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## CLI
|
|
20
|
+
|
|
21
|
+
The `casen` CLI is a standalone tool — install it globally:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
pnpm add -g @bpmnkit/cli
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
With the CLI installed, you can use the AI-first workflow to implement processes from natural
|
|
28
|
+
language using Claude Code:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
casen skills install # install /implement, /review, /test, /deploy slash commands
|
|
32
|
+
casen proxy # start the AI bridge
|
|
33
|
+
casen reebe # start local workflow engine
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Then in Claude Code: `/implement an invoice approval process`
|
|
37
|
+
|
|
38
|
+
See [AI-Driven Implementation](/guides/ai-implement/) for a full walkthrough.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
Source: https://docs.bpmnkit.com/getting-started/installation/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Installation — Worker client
|
|
2
|
+
|
|
3
|
+
For standalone workers that connect to Zeebe without the full SDK:
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install @bpmnkit/worker-client
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Workers scaffolded by `/implement` depend only on this package at runtime.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## TypeScript Requirements
|
|
13
|
+
|
|
14
|
+
All packages require **TypeScript 5.0+** with `strict: true`. The recommended `tsconfig.json` settings:
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"compilerOptions": {
|
|
19
|
+
"strict": true,
|
|
20
|
+
"module": "NodeNext",
|
|
21
|
+
"moduleResolution": "NodeNext",
|
|
22
|
+
"target": "ES2022"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
For browser/bundler projects (Vite, Webpack, etc.), use:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"compilerOptions": {
|
|
32
|
+
"strict": true,
|
|
33
|
+
"module": "ESNext",
|
|
34
|
+
"moduleResolution": "bundler"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
Source: https://docs.bpmnkit.com/getting-started/installation/
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Quick Start
|
|
2
|
+
|
|
3
|
+
This guide walks you from zero to a deployed, running BPMN process in three steps.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Step 1: Create a process
|
|
7
|
+
|
|
8
|
+
Use the fluent builder to describe your process in TypeScript:
|
|
9
|
+
|
|
10
|
+
```typescript
|
|
11
|
+
import { Bpmn } from "@bpmnkit/core";
|
|
12
|
+
|
|
13
|
+
const xml = Bpmn.export(
|
|
14
|
+
Bpmn.createProcess("hello")
|
|
15
|
+
.startEvent("start")
|
|
16
|
+
.serviceTask("task", {
|
|
17
|
+
name: "Hello World",
|
|
18
|
+
taskType: "greet", // Zeebe worker type
|
|
19
|
+
})
|
|
20
|
+
.endEvent("end")
|
|
21
|
+
.withAutoLayout() // apply Sugiyama layout
|
|
22
|
+
.build()
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
console.log(xml); // valid BPMN 2.0 XML
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The `xml` string is a complete, valid BPMN 2.0 document that any standards-compliant engine can load.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
Source: https://docs.bpmnkit.com/getting-started/quick-start/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Quick Start — Step 2: Simulate locally
|
|
2
|
+
|
|
3
|
+
The simulation engine runs the process right in Node.js — no Camunda cluster required:
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { Engine } from "@bpmnkit/engine";
|
|
7
|
+
|
|
8
|
+
const engine = new Engine();
|
|
9
|
+
await engine.deploy({ bpmn: xml });
|
|
10
|
+
|
|
11
|
+
// Register a job worker for the "greet" service task
|
|
12
|
+
engine.registerJobWorker("greet", async (job) => {
|
|
13
|
+
console.log("Hello from the worker!");
|
|
14
|
+
await job.complete({ greeting: "Hello!" });
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const instance = engine.start("hello");
|
|
18
|
+
|
|
19
|
+
// Wait for the process to finish
|
|
20
|
+
await new Promise<void>((resolve) => {
|
|
21
|
+
instance.onChange((state) => {
|
|
22
|
+
if (state === "completed") resolve();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
Source: https://docs.bpmnkit.com/getting-started/quick-start/
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Quick Start — Step 3: Deploy to Camunda 8
|
|
2
|
+
|
|
3
|
+
When you're ready for production, deploy to a real Camunda 8 cluster:
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { CamundaClient } from "@bpmnkit/api";
|
|
7
|
+
|
|
8
|
+
const client = new CamundaClient({
|
|
9
|
+
baseUrl: "https://api.cloud.camunda.io",
|
|
10
|
+
auth: {
|
|
11
|
+
type: "oauth2",
|
|
12
|
+
clientId: process.env.CAMUNDA_CLIENT_ID,
|
|
13
|
+
clientSecret: process.env.CAMUNDA_CLIENT_SECRET,
|
|
14
|
+
audience: process.env.CAMUNDA_AUDIENCE,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// Deploy the process definition
|
|
19
|
+
await client.process.deploy({
|
|
20
|
+
resources: [{ content: xml, name: "hello.bpmn" }],
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// Start a new process instance
|
|
24
|
+
const instance = await client.process.startInstance({
|
|
25
|
+
bpmnProcessId: "hello",
|
|
26
|
+
variables: { greeting: "world" },
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
console.log("Started instance:", instance.processInstanceKey);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
Source: https://docs.bpmnkit.com/getting-started/quick-start/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Quick Start — What's next?
|
|
2
|
+
|
|
3
|
+
- [AI-Driven Implementation](/guides/ai-implement/) — let Claude implement processes end-to-end from a description
|
|
4
|
+
- [Core Concepts](/getting-started/concepts/) — understand how the builder, layout, and roundtrip work
|
|
5
|
+
- [Building Processes](/guides/building-processes/) — tasks, events, sub-processes, and markers
|
|
6
|
+
- [Gateways & Branching](/guides/gateways/) — exclusive, parallel, and event-based gateways
|
|
7
|
+
|
|
8
|
+
:::tip[AI-first workflow]
|
|
9
|
+
If you have Claude Code, the fastest path is: `casen skills install` then `/implement <description>`.
|
|
10
|
+
Claude generates the BPMN, scaffolds workers, and deploys — all from a single prompt.
|
|
11
|
+
:::
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
Source: https://docs.bpmnkit.com/getting-started/quick-start/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# AI Agents — Deploy-grade validation
|
|
2
|
+
|
|
3
|
+
`casen lint --profile deploy` includes `agentic/*` rules specific to this pattern:
|
|
4
|
+
|
|
5
|
+
| Rule | Catches |
|
|
6
|
+
|---|---|
|
|
7
|
+
| `agentic/tool-not-root` | A tool with an incoming sequence flow (tools must be root nodes) |
|
|
8
|
+
| `agentic/tool-no-description` | A tool with no documentation for the LLM to read |
|
|
9
|
+
| `agentic/fromai-bad-ref` | A `fromAi()` call whose first argument doesn't reference `toolCall.*` |
|
|
10
|
+
| `agentic/no-output-collection` | Missing tool-result aggregation |
|
|
11
|
+
| `agentic/limits-missing` | No `maxModelCalls` safety limit |
|
|
12
|
+
|
|
13
|
+
The `data-flow` category can report spurious "variable never set" findings against the
|
|
14
|
+
agent's own provider/model/prompt bindings (a hyphenated model id like `claude-sonnet-5`
|
|
15
|
+
can be misread as an arithmetic expression) — this is a known limitation of that heuristic,
|
|
16
|
+
not a real issue, and doesn't affect the `deploy` profile.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
Source: https://docs.bpmnkit.com/guides/ai-agents/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# AI Agents — How it's modeled
|
|
2
|
+
|
|
3
|
+
- A `bpmn:AdHocSubProcess` carrying a `zeebe:taskDefinition` of type `io.camunda.agenticai:aiagent-job-worker:1` — the presence of `zeebe:taskDefinition` is itself what marks it as a job-worker implementation.
|
|
4
|
+
- Each **tool** is a root-node activity inside the sub-process (no incoming sequence flow). The tool's element id is its name as the LLM sees it; its documentation is the description the LLM reads.
|
|
5
|
+
- Parameters the LLM must supply are `fromAi(toolCall.<param>, "<description>", "<type>"?, <jsonSchema>?, {required: false}?)` FEEL expressions.
|
|
6
|
+
- Each tool's result is aggregated into an `outputCollection` (default `toolCallResults`); the agent's own final answer lands in a process variable (default `agent`).
|
|
7
|
+
|
|
8
|
+
None of this is hand-authored — it's generated by the `aiAgent` plan step.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
Source: https://docs.bpmnkit.com/guides/ai-agents/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# AI Agents
|
|
2
|
+
|
|
3
|
+
Camunda 8's **AI Agent Sub-process** lets a single process step delegate to an LLM that can
|
|
4
|
+
call tools (other BPMN activities) in a loop until it produces a final answer. BPMNKit
|
|
5
|
+
generates this pattern the same way it generates everything else: deterministically, from a
|
|
6
|
+
`ProcessPlan` — never by hand-writing the underlying ad-hoc-sub-process XML.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## Quick start
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/bpmnkit:agent add a support-triage agent with tools: search KB (http), escalate to human (user task), post summary to slack
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or, from the CLI directly: write an `aiAgent` plan step (see below), then `casen synth`.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
Source: https://docs.bpmnkit.com/guides/ai-agents/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# AI Agents — Testing without a real LLM call
|
|
2
|
+
|
|
3
|
+
Scenarios mock the whole agent sub-process as a single job — the dispatcher routes any
|
|
4
|
+
job-worker-backed ad-hoc sub-process (this pattern included) through the same job-mock
|
|
5
|
+
mechanism as any other task:
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"name": "Agent resolves the ticket",
|
|
10
|
+
"mocks": {
|
|
11
|
+
"io.camunda.agenticai:aiagent-job-worker:1": { "outputs": { "agent": { "status": "resolved" } } }
|
|
12
|
+
},
|
|
13
|
+
"expect": { "path": ["triage_agent"], "variables": { "agent": { "status": "resolved" } } }
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
casen test support-triage.bpmn
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
This verifies the process routes correctly through and around the agent step. It does not
|
|
22
|
+
exercise the agent's actual tool-calling behavior, prompt quality, or model choice — those
|
|
23
|
+
require a real (or sandboxed) LLM run, which is out of scope for `casen test`.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
Source: https://docs.bpmnkit.com/guides/ai-agents/
|