@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,34 @@
|
|
|
1
|
+
# @bpmnkit/docspack — Reading it yourself
|
|
2
|
+
|
|
3
|
+
`search` runs the same query and prints the ranking instead of the content:
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npx bpmnkit-docs search "exclusive gateway condition"
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
5 result(s) for "exclusive gateway condition"
|
|
11
|
+
|
|
12
|
+
14.73 @bpmnkit/docspack@0.0.1/guides.gateways.exclusive-gateway-xor
|
|
13
|
+
Gateways & Branching — Exclusive Gateway (XOR) · 218 tokens
|
|
14
|
+
8.04 @bpmnkit/docspack@0.0.1/guides.gateways.inclusive-gateway-or
|
|
15
|
+
Gateways & Branching — Inclusive Gateway (OR) · 208 tokens
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
`list` shows which documentation packages were found and whether their manifests agree
|
|
19
|
+
with the versions installed.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Commands
|
|
23
|
+
|
|
24
|
+
| Command | Purpose |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| `bpmnkit-docs ask <question>` | Answer from the installed docs packages — the command to give an agent |
|
|
27
|
+
| `bpmnkit-docs search <query>` | Rank matching chunks, for reading in a terminal |
|
|
28
|
+
| `bpmnkit-docs list` | Show the docs packages found and their index state |
|
|
29
|
+
| `bpmnkit-docs build` | Regenerate the `.llms/` payload from the docs source |
|
|
30
|
+
|
|
31
|
+
Options: `--limit <n>`, `--max-tokens <n>`, `--pack <name>`, `--cwd <dir>`.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
Source: https://docs.bpmnkit.com/packages/docspack/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @bpmnkit/docspack — Trust
|
|
2
|
+
|
|
3
|
+
A manifest is third-party input that ends up in a model's context, so it is read as a
|
|
4
|
+
security boundary rather than as configuration:
|
|
5
|
+
|
|
6
|
+
- a chunk path that resolves outside `.llms/` is refused
|
|
7
|
+
- the installed `package.json` version supersedes the manifest's, and a disagreement is
|
|
8
|
+
reported by `list`
|
|
9
|
+
- chunk ids must be unique and must match `^[A-Za-z0-9][A-Za-z0-9._-]*$`
|
|
10
|
+
- packages under the `@docspack-community` scope are labelled unreviewed in every answer
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
Source: https://docs.bpmnkit.com/packages/docspack/
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# @bpmnkit/docspack — Using the index directly
|
|
2
|
+
|
|
3
|
+
The package is also a library, so a bot, an editor extension or an MCP server can search
|
|
4
|
+
without shelling out:
|
|
5
|
+
|
|
6
|
+
```typescript
|
|
7
|
+
import { answer, discoverPacks, indexPacks } from "@bpmnkit/docspack";
|
|
8
|
+
|
|
9
|
+
const index = indexPacks(discoverPacks());
|
|
10
|
+
const { hits, tokens } = answer(index, "verify a worker's job type", {
|
|
11
|
+
limit: 3,
|
|
12
|
+
maxTokens: 3000,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
for (const hit of hits) {
|
|
16
|
+
console.log(hit.chunkId, hit.content);
|
|
17
|
+
}
|
|
18
|
+
console.log(`${tokens} tokens`);
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## How the pack is built
|
|
23
|
+
|
|
24
|
+
`bpmnkit-docs build` reads the Markdown under `apps/docs/src/content/docs`, splits each
|
|
25
|
+
document at its `##` headings, and writes one file per chunk:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
packages/docspack/
|
|
29
|
+
├── package.json
|
|
30
|
+
├── llms.txt table of contents
|
|
31
|
+
└── .llms/
|
|
32
|
+
├── manifest.json chunk ids, token counts, tags, entities
|
|
33
|
+
└── chunks/
|
|
34
|
+
├── guides.gateways.exclusive-gateway-xor.md
|
|
35
|
+
└── ...
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
A section too large for the budget is subdivided at `###` and then at paragraph
|
|
39
|
+
boundaries, never inside a fenced code block. A section too short to answer anything is
|
|
40
|
+
merged into the one before it, so a reference table does not become one chunk per row.
|
|
41
|
+
Tags come from front matter, the page's slug and the heading's own words; entities are
|
|
42
|
+
the qualified identifiers named in inline code.
|
|
43
|
+
|
|
44
|
+
You can steer either from the document itself:
|
|
45
|
+
|
|
46
|
+
```md
|
|
47
|
+
## Two-column layout
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
Source: https://docs.bpmnkit.com/packages/docspack/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# @bpmnkit/editor — Basic Setup
|
|
2
|
+
|
|
3
|
+
```typescript
|
|
4
|
+
import { BpmnEditor, initEditorHud } from "@bpmnkit/editor";
|
|
5
|
+
|
|
6
|
+
// Create the editor
|
|
7
|
+
const editor = new BpmnEditor({
|
|
8
|
+
container: document.getElementById("editor"),
|
|
9
|
+
theme: "dark",
|
|
10
|
+
persistTheme: true, // read/write "bpmn-theme" in localStorage
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
// Initialize the HUD (toolbar overlay)
|
|
14
|
+
const hud = initEditorHud(editor);
|
|
15
|
+
|
|
16
|
+
// Load a diagram
|
|
17
|
+
await editor.loadXML(bpmnXml);
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## With Side Dock
|
|
22
|
+
|
|
23
|
+
The side dock provides a collapsible properties + AI panel:
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { BpmnEditor, initEditorHud, createSideDock } from "@bpmnkit/editor";
|
|
27
|
+
|
|
28
|
+
const editor = new BpmnEditor({
|
|
29
|
+
container: document.getElementById("editor"),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const dock = createSideDock();
|
|
33
|
+
document.body.appendChild(dock.el);
|
|
34
|
+
|
|
35
|
+
const hud = initEditorHud(editor, {
|
|
36
|
+
aiButton: dock.aiPane.button,
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
Source: https://docs.bpmnkit.com/packages/editor/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# @bpmnkit/editor — Full Editor with All Plugins
|
|
2
|
+
|
|
3
|
+
The landing page editor uses the `createStorageTabsBridge` plugin which wires together
|
|
4
|
+
tabs, storage, AI, and command palette in one call:
|
|
5
|
+
|
|
6
|
+
```typescript
|
|
7
|
+
import { createStorageTabsBridge } from "@bpmnkit/canvas-plugin-storage-tabs-bridge";
|
|
8
|
+
import { BpmnEditor, initEditorHud, createSideDock } from "@bpmnkit/editor";
|
|
9
|
+
|
|
10
|
+
const editor = new BpmnEditor({ container });
|
|
11
|
+
const dock = createSideDock();
|
|
12
|
+
|
|
13
|
+
const bridge = createStorageTabsBridge({
|
|
14
|
+
mainMenu: menuPlugin,
|
|
15
|
+
resolver: fileResolver,
|
|
16
|
+
enableFileImport: true,
|
|
17
|
+
getExamples: (tabsApi) => [
|
|
18
|
+
{
|
|
19
|
+
label: "Approval Flow",
|
|
20
|
+
load: () => tabsApi.openTab({ xml: approvalFlowXml }),
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
document.body.appendChild(dock.el);
|
|
26
|
+
const hud = initEditorHud(editor, { aiButton: dock.aiPane.button });
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
Source: https://docs.bpmnkit.com/packages/editor/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# @bpmnkit/editor — HUD Options
|
|
2
|
+
|
|
3
|
+
```typescript
|
|
4
|
+
type HudOptions = {
|
|
5
|
+
optimizeButton?: HTMLElement; // inject an external "Optimize" button
|
|
6
|
+
aiButton?: HTMLElement; // inject an external "AI" button
|
|
7
|
+
};
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## EditorOptions
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
type EditorOptions = {
|
|
15
|
+
container: HTMLElement;
|
|
16
|
+
theme?: "dark" | "light";
|
|
17
|
+
persistTheme?: boolean; // auto-save theme to localStorage
|
|
18
|
+
plugins?: CanvasPlugin[];
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## SideDock API
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
type SideDock = {
|
|
27
|
+
el: HTMLElement;
|
|
28
|
+
propertiesPane: HTMLElement;
|
|
29
|
+
aiPane: { button: HTMLElement; el: HTMLElement };
|
|
30
|
+
switchTab(tab: "properties" | "ai"): void;
|
|
31
|
+
expand(): void;
|
|
32
|
+
collapse(): void;
|
|
33
|
+
collapsed: boolean;
|
|
34
|
+
showPanel(): void;
|
|
35
|
+
hidePanel(): void;
|
|
36
|
+
setDiagramInfo(processName: string, fileName: string): void;
|
|
37
|
+
};
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
Source: https://docs.bpmnkit.com/packages/editor/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# @bpmnkit/editor — Overview
|
|
2
|
+
|
|
3
|
+
`@bpmnkit/editor` bundles everything needed to embed a full-featured BPMN editor
|
|
4
|
+
into any web application:
|
|
5
|
+
|
|
6
|
+
- **Canvas** — SVG viewer with pan/zoom
|
|
7
|
+
- **Properties panel** — edit element properties inline
|
|
8
|
+
- **AI bridge** — chat panel connected to a local AI server
|
|
9
|
+
- **Storage** — auto-save to IndexedDB with project/file management
|
|
10
|
+
- **HUD** — toolbar with undo/redo, zoom, optimize, and AI buttons
|
|
11
|
+
- **Side dock** — collapsible right panel (properties + AI tabs)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
pnpm add @bpmnkit/editor
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
Source: https://docs.bpmnkit.com/packages/editor/
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# @bpmnkit/engine — Installation
|
|
2
|
+
|
|
3
|
+
```sh
|
|
4
|
+
pnpm add @bpmnkit/engine
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## API Reference
|
|
9
|
+
|
|
10
|
+
### `new Engine()`
|
|
11
|
+
|
|
12
|
+
Creates a new engine instance. Each instance has its own process registry and running instances.
|
|
13
|
+
|
|
14
|
+
### `engine.deploy(options)`
|
|
15
|
+
|
|
16
|
+
Deploys one or more process and decision definitions:
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
await engine.deploy({
|
|
20
|
+
bpmn: bpmnXmlString, // required
|
|
21
|
+
forms: [formSchemaJson], // optional: Camunda form schemas
|
|
22
|
+
decisions: [dmnXmlString], // optional: DMN decision tables
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### `engine.start(processId, variables?, options?)`
|
|
27
|
+
|
|
28
|
+
Starts a new process instance:
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
const instance = engine.start("my-process", {
|
|
32
|
+
orderId: "ord-123",
|
|
33
|
+
amount: 99.99,
|
|
34
|
+
});
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**`StartOptions`:**
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
type StartOptions = {
|
|
41
|
+
beforeComplete?: (elementId: string) => Promise<void>;
|
|
42
|
+
};
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The `beforeComplete` hook fires after a task has been executed but before the process
|
|
46
|
+
advances. Use it to pause for step-by-step execution or to inspect state mid-run.
|
|
47
|
+
|
|
48
|
+
### `engine.registerJobWorker(type, handler)`
|
|
49
|
+
|
|
50
|
+
Register a synchronous or asynchronous handler for service tasks of a given type:
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
engine.registerJobWorker("send-email", async (job) => {
|
|
54
|
+
await mailer.send({
|
|
55
|
+
to: job.variables.recipient,
|
|
56
|
+
subject: job.variables.subject,
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// Complete the job (advances the process)
|
|
60
|
+
await job.complete({ sent: true });
|
|
61
|
+
|
|
62
|
+
// Or fail it (retries depending on retry config)
|
|
63
|
+
// await job.fail("SMTP connection refused");
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### `engine.getDeployedProcesses()`
|
|
68
|
+
|
|
69
|
+
Returns metadata about all deployed process definitions:
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
const processes = engine.getDeployedProcesses();
|
|
73
|
+
// [{ id: "my-process", name: "My Process", version: 1 }]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
Source: https://docs.bpmnkit.com/packages/engine/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# @bpmnkit/engine — Overview
|
|
2
|
+
|
|
3
|
+
`@bpmnkit/engine` is a lightweight BPMN 2.0 process engine that runs entirely in the
|
|
4
|
+
JavaScript runtime — no external services required.
|
|
5
|
+
|
|
6
|
+
**Supported BPMN elements:**
|
|
7
|
+
- Service tasks, user tasks, script tasks, manual tasks
|
|
8
|
+
- Exclusive, parallel, inclusive, and event-based gateways
|
|
9
|
+
- Timer events (ISO 8601 duration, date, and cycle)
|
|
10
|
+
- Message correlation (intermediate catch events, message start)
|
|
11
|
+
- DMN decision evaluation (requires `@bpmnkit/core`)
|
|
12
|
+
- Boundary events (timer, error, message)
|
|
13
|
+
- Call activities (inline subprocess invocation)
|
|
14
|
+
- IO variable mappings (Zeebe `zeebe:ioMapping` extension)
|
|
15
|
+
|
|
16
|
+
Zero runtime dependencies. ESM-only.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
Source: https://docs.bpmnkit.com/packages/engine/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# @bpmnkit/engine — ProcessInstance
|
|
2
|
+
|
|
3
|
+
| Property | Type | Description |
|
|
4
|
+
|---|---|---|
|
|
5
|
+
| `state` | `"running" \| "completed" \| "cancelled"` | Current lifecycle state |
|
|
6
|
+
| `activeElements` | `Set<string>` | IDs of currently active elements |
|
|
7
|
+
| `variables_snapshot` | `Record<string, unknown>` | Current variable state |
|
|
8
|
+
| `beforeComplete` | `(id: string) => Promise<void>` | Override step hook |
|
|
9
|
+
|
|
10
|
+
| Method | Description |
|
|
11
|
+
|---|---|
|
|
12
|
+
| `instance.onChange(cb)` | Subscribe to state changes |
|
|
13
|
+
| `instance.cancel()` | Cancel the running instance |
|
|
14
|
+
| `instance.deliverMessage(name, vars?)` | Correlate a message to a waiting event |
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
Source: https://docs.bpmnkit.com/packages/engine/
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# @bpmnkit/engine — Variable Scoping
|
|
2
|
+
|
|
3
|
+
Variables follow hierarchical scope rules:
|
|
4
|
+
|
|
5
|
+
- Global variables are set at the process level
|
|
6
|
+
- Sub-processes and call activities create child scopes
|
|
7
|
+
- IO mappings move data between scopes on task entry/exit
|
|
8
|
+
- `setLocal` writes to the innermost scope only
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Timer Scheduling
|
|
12
|
+
|
|
13
|
+
Timers use `setTimeout` internally and support ISO 8601 formats:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
PT30S → 30 seconds
|
|
17
|
+
PT1H30M → 1.5 hours
|
|
18
|
+
P2D → 2 days
|
|
19
|
+
R3/PT1H → repeat 3 times, every hour
|
|
20
|
+
2026-12-01T09:00:00Z → fire at absolute date
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Call `parseDurationMs(str)` from `@bpmnkit/engine` to convert duration strings
|
|
24
|
+
to milliseconds in your own code.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
Source: https://docs.bpmnkit.com/packages/engine/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# @bpmnkit/worker-client — `client.poll(jobType, options?)`
|
|
2
|
+
|
|
3
|
+
Async generator. Continuously polls Zeebe for jobs of the given type. Pauses 5 seconds
|
|
4
|
+
between polls when no jobs are available.
|
|
5
|
+
|
|
6
|
+
```typescript
|
|
7
|
+
for await (const job of client.poll("my-job-type", { maxJobs: 10, timeout: 60_000 })) {
|
|
8
|
+
// handle job
|
|
9
|
+
}
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### Options
|
|
13
|
+
|
|
14
|
+
| Option | Type | Default | Description |
|
|
15
|
+
|---|---|---|---|
|
|
16
|
+
| `maxJobs` | `number` | `5` | Maximum jobs to activate per poll request |
|
|
17
|
+
| `timeout` | `number` | `300_000` | Activation lock timeout in milliseconds |
|
|
18
|
+
|
|
19
|
+
### Yields `ActivatedJob`
|
|
20
|
+
|
|
21
|
+
Each iteration yields a job with these fields and methods:
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
interface ActivatedJob {
|
|
25
|
+
key: string // unique job key
|
|
26
|
+
jobType: string // job type from BPMN task definition
|
|
27
|
+
processInstanceKey: string
|
|
28
|
+
bpmnProcessId: string
|
|
29
|
+
elementId: string
|
|
30
|
+
retries: number // remaining retries — use to pass to fail()
|
|
31
|
+
variables: Record<string, unknown> // process variables from the instance
|
|
32
|
+
|
|
33
|
+
complete(variables?: Record<string, unknown>): Promise<void>
|
|
34
|
+
fail(message: string, retries?: number): Promise<void>
|
|
35
|
+
throwError(errorCode: string, message: string, variables?: Record<string, unknown>): Promise<void>
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
Source: https://docs.bpmnkit.com/packages/worker-client/
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @bpmnkit/worker-client — `createWorkerClient(options?)`
|
|
2
|
+
|
|
3
|
+
Factory function. Reads connection details from environment variables by default.
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
const client = createWorkerClient({
|
|
7
|
+
address: "http://localhost:26500", // or ZEEBE_ADDRESS
|
|
8
|
+
clientId: "...", // or ZEEBE_CLIENT_ID
|
|
9
|
+
clientSecret: "...", // or ZEEBE_CLIENT_SECRET
|
|
10
|
+
tokenUrl: "...", // or ZEEBE_TOKEN_URL
|
|
11
|
+
audience: "zeebe.camunda.io", // or ZEEBE_TOKEN_AUDIENCE
|
|
12
|
+
workerName: "my-worker", // sent during job activation
|
|
13
|
+
})
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Options
|
|
17
|
+
|
|
18
|
+
| Option | Type | Default | Description |
|
|
19
|
+
|---|---|---|---|
|
|
20
|
+
| `address` | `string` | `ZEEBE_ADDRESS` or `http://localhost:26500` | Zeebe REST base URL |
|
|
21
|
+
| `clientId` | `string` | `ZEEBE_CLIENT_ID` | OAuth2 client ID (Camunda SaaS) |
|
|
22
|
+
| `clientSecret` | `string` | `ZEEBE_CLIENT_SECRET` | OAuth2 client secret (Camunda SaaS) |
|
|
23
|
+
| `tokenUrl` | `string` | `ZEEBE_TOKEN_URL` or Camunda SaaS endpoint | OAuth2 token URL |
|
|
24
|
+
| `audience` | `string` | `ZEEBE_TOKEN_AUDIENCE` or `zeebe.camunda.io` | OAuth2 audience |
|
|
25
|
+
| `workerName` | `string` | `"bpmnkit-worker"` | Worker name sent during activation |
|
|
26
|
+
|
|
27
|
+
### Returns
|
|
28
|
+
|
|
29
|
+
A `WorkerClient` object with a single `poll()` method.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
Source: https://docs.bpmnkit.com/packages/worker-client/
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# @bpmnkit/worker-client — `job.complete(variables?)`
|
|
2
|
+
|
|
3
|
+
Completes the job, optionally returning output variables to the process instance.
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
await job.complete({ approved: true, reviewedAt: new Date().toISOString() })
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## `job.fail(message, retries?)`
|
|
11
|
+
|
|
12
|
+
Marks the job as failed. Zeebe will retry (or raise an incident if retries reach zero).
|
|
13
|
+
`retries` defaults to `0` if not provided — pass `job.retries - 1` to decrement.
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
await job.fail("External API returned 503", job.retries - 1)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## `job.throwError(errorCode, message, variables?)`
|
|
21
|
+
|
|
22
|
+
Throws a BPMN error that can be caught by an error boundary event on the task in the diagram.
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
await job.throwError("PAYMENT_DECLINED", "Card declined by issuer", { code: "05" })
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
Source: https://docs.bpmnkit.com/packages/worker-client/
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @bpmnkit/worker-client
|
|
2
|
+
|
|
3
|
+
`@bpmnkit/worker-client` is a thin TypeScript wrapper around the Zeebe REST API. It is the
|
|
4
|
+
only runtime dependency for scaffolded BPMNKit workers. It works with both local reebe and
|
|
5
|
+
Camunda 8 cloud.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npm install @bpmnkit/worker-client
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## Quick start
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { createWorkerClient } from "@bpmnkit/worker-client"
|
|
19
|
+
|
|
20
|
+
const client = createWorkerClient()
|
|
21
|
+
|
|
22
|
+
for await (const job of client.poll("com.example:send-email:1")) {
|
|
23
|
+
try {
|
|
24
|
+
await sendEmail(job.variables)
|
|
25
|
+
await job.complete({ sent: true })
|
|
26
|
+
} catch (err) {
|
|
27
|
+
await job.fail(err instanceof Error ? err.message : String(err))
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
Source: https://docs.bpmnkit.com/packages/worker-client/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# @bpmnkit/worker-client — OAuth2 (Camunda SaaS)
|
|
2
|
+
|
|
3
|
+
When `clientId` and `clientSecret` are present (either via options or env vars), the client
|
|
4
|
+
fetches an OAuth2 token before the first request and refreshes it automatically 60 seconds
|
|
5
|
+
before expiry. No manual token management required.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
ZEEBE_ADDRESS=https://your-cluster.bru-2.zeebe.camunda.io:443
|
|
9
|
+
ZEEBE_CLIENT_ID=abc123
|
|
10
|
+
ZEEBE_CLIENT_SECRET=def456
|
|
11
|
+
node dist/index.js
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## Environment variables
|
|
16
|
+
|
|
17
|
+
| Variable | Description |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `ZEEBE_ADDRESS` | Zeebe REST base URL |
|
|
20
|
+
| `ZEEBE_CLIENT_ID` | OAuth2 client ID |
|
|
21
|
+
| `ZEEBE_CLIENT_SECRET` | OAuth2 client secret |
|
|
22
|
+
| `ZEEBE_TOKEN_URL` | OAuth2 token URL |
|
|
23
|
+
| `ZEEBE_TOKEN_AUDIENCE` | OAuth2 audience |
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
Source: https://docs.bpmnkit.com/packages/worker-client/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @bpmnkit/worker-client — See also
|
|
2
|
+
|
|
3
|
+
- [Standalone Workers](/guides/workers-standalone/) — scaffolding, running, and deploying workers
|
|
4
|
+
- [AI-Driven Implementation](/guides/ai-implement/) — generate workers automatically with `/implement`
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
Source: https://docs.bpmnkit.com/packages/worker-client/
|