@bpmnkit/docspack 0.0.2 → 0.0.4
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 +2 -2
- package/.llms/chunks/cli.casen.bpmn-generation-pipeline.md +2 -2
- package/.llms/chunks/cli.casen.connection-profiles.md +1 -1
- package/.llms/chunks/cli.casen.generate-bpmn-files.md +3 -3
- package/.llms/chunks/cli.casen.mcp-server-mode.md +31 -0
- package/.llms/chunks/cli.casen.md +1 -1
- package/.llms/chunks/cli.casen.plugins.md +2 -2
- package/.llms/chunks/cli.casen.worker-commands.md +20 -23
- package/.llms/chunks/cli.connector.all-flags.md +1 -1
- package/.llms/chunks/cli.connector.browse-the-bundled-ootb-catalog.md +2 -2
- package/.llms/chunks/cli.connector.built-in-catalog.md +1 -1
- package/.llms/chunks/cli.connector.common-workflows.md +1 -1
- package/.llms/chunks/cli.connector.generate-from-the-openapi-catalog.md +1 -1
- package/.llms/chunks/cli.connector.md +1 -1
- package/.llms/chunks/cli.connector.programmatic-usage.md +2 -2
- package/.llms/chunks/cli.connector.what-gets-generated.md +1 -1
- package/.llms/chunks/cli.diff.flags.md +46 -0
- package/.llms/chunks/cli.diff.md +43 -0
- package/.llms/chunks/cli.diff.the-same-diff-elsewhere.md +14 -0
- package/.llms/chunks/cli.generate.definition-mode-ai-scripting-path.md +1 -1
- package/.llms/chunks/cli.generate.md +1 -1
- package/.llms/chunks/cli.generate.modify-existing-mode-input.md +1 -1
- package/.llms/chunks/cli.generate.typical-ai-workflow.md +1 -1
- package/.llms/chunks/cli.plugin-authoring.md +1 -1
- package/.llms/chunks/cli.plugin-authoring.plugin-naming-conventions.md +1 -1
- package/.llms/chunks/cli.plugin-authoring.test-locally.md +1 -1
- package/.llms/chunks/cli.plugin-authoring.the-bpmnkit-cli-sdk-sdk.md +1 -1
- package/.llms/chunks/cli.plugin-authoring.what-gets-generated.md +1 -1
- package/.llms/chunks/cli.plugin-authoring.writing-commands.md +1 -1
- package/.llms/chunks/cli.plugins.bpmnkit-casen-report.md +1 -1
- package/.llms/chunks/cli.plugins.bpmnkit-casen-worker-http.md +2 -2
- package/.llms/chunks/cli.plugins.md +3 -4
- package/.llms/chunks/cli.skills.deploy.md +1 -1
- package/.llms/chunks/cli.skills.implement.md +2 -2
- package/.llms/chunks/cli.skills.md +2 -2
- package/.llms/chunks/cli.skills.no-mcp-server-required.md +1 -1
- package/.llms/chunks/cli.skills.review.md +1 -1
- package/.llms/chunks/cli.skills.test.md +1 -1
- package/.llms/chunks/cli.view.folder-support.md +1 -1
- package/.llms/chunks/cli.view.md +1 -1
- package/.llms/chunks/cli.view.tabbed-navigation.md +1 -1
- package/.llms/chunks/getting-started.concepts.ai-compact-format.md +13 -2
- package/.llms/chunks/getting-started.concepts.auto-layout.md +1 -1
- package/.llms/chunks/getting-started.concepts.parsing-and-serializing.md +49 -9
- package/.llms/chunks/getting-started.concepts.the-fluent-builder.md +1 -1
- package/.llms/chunks/getting-started.concepts.zeebe-extensions.md +1 -1
- package/.llms/chunks/getting-started.installation.md +1 -1
- package/.llms/chunks/getting-started.installation.runtime-requirements.md +1 -1
- package/.llms/chunks/getting-started.installation.svg-canvas-viewer.md +2 -2
- package/.llms/chunks/getting-started.installation.worker-client.md +1 -1
- package/.llms/chunks/getting-started.quick-start.md +1 -1
- package/.llms/chunks/getting-started.quick-start.step-2-simulate-locally.md +1 -1
- package/.llms/chunks/getting-started.quick-start.step-3-deploy-to-camunda-8.md +1 -1
- package/.llms/chunks/getting-started.quick-start.what-s-next.md +8 -9
- package/.llms/chunks/guides.ai-agents.deploy-grade-validation.md +1 -1
- package/.llms/chunks/guides.ai-agents.how-it-s-modeled.md +1 -1
- package/.llms/chunks/guides.ai-agents.md +1 -1
- package/.llms/chunks/guides.ai-agents.see-also.md +3 -3
- package/.llms/chunks/guides.ai-agents.testing-without-a-real-llm-call.md +1 -1
- package/.llms/chunks/guides.ai-agents.the-aiagent-plan-step.md +1 -1
- package/.llms/chunks/guides.ai-implement.deploying.md +2 -2
- package/.llms/chunks/guides.ai-implement.extending-an-existing-process.md +1 -1
- package/.llms/chunks/guides.ai-implement.lightweight-alternative-casen-skills-install.md +2 -2
- package/.llms/chunks/guides.ai-implement.md +2 -2
- package/.llms/chunks/guides.ai-implement.the-claude-code-plugin.md +2 -2
- package/.llms/chunks/guides.ai.claude-api-example.md +1 -1
- package/.llms/chunks/guides.ai.mcp-server.md +1 -1
- package/.llms/chunks/guides.ai.md +25 -2
- package/.llms/chunks/guides.ai.minimal-empty-diagram.md +1 -1
- package/.llms/chunks/guides.ai.openai-function-calling.md +1 -1
- package/.llms/chunks/guides.building-processes.boundary-events.md +1 -1
- package/.llms/chunks/guides.building-processes.call-activities.md +1 -1
- package/.llms/chunks/guides.building-processes.events.md +1 -1
- package/.llms/chunks/guides.building-processes.multi-instance.md +67 -1
- package/.llms/chunks/guides.building-processes.service-tasks.md +1 -1
- package/.llms/chunks/guides.building-processes.sub-processes.md +1 -1
- package/.llms/chunks/guides.building-processes.task-defaults.md +1 -1
- package/.llms/chunks/guides.claude-code-plugin.ambient-hooks.md +1 -1
- package/.llms/chunks/guides.claude-code-plugin.configuration.md +3 -3
- package/.llms/chunks/guides.claude-code-plugin.md +1 -1
- package/.llms/chunks/guides.claude-code-plugin.reference-docs.md +1 -1
- package/.llms/chunks/guides.deployment.ci-cd-deploy-on-push.md +1 -1
- package/.llms/chunks/guides.deployment.deploying-a-process.md +1 -1
- package/.llms/chunks/guides.deployment.handling-jobs.md +1 -1
- package/.llms/chunks/guides.deployment.managing-incidents.md +1 -1
- package/.llms/chunks/guides.deployment.md +1 -1
- package/.llms/chunks/guides.drop.md +12 -0
- package/.llms/chunks/guides.drop.reviewing-it-together.md +45 -0
- package/.llms/chunks/guides.drop.running-your-own.md +21 -0
- package/.llms/chunks/guides.drop.sharing-a-file.md +42 -0
- package/.llms/chunks/guides.drop.what-drop-is-not.md +12 -0
- package/.llms/chunks/guides.gateways.branching-inside-sub-processes.md +1 -1
- package/.llms/chunks/guides.gateways.exclusive-gateway-xor.md +1 -1
- package/.llms/chunks/guides.gateways.inclusive-gateway-or.md +1 -1
- package/.llms/chunks/guides.gateways.nested-branching.md +1 -1
- package/.llms/chunks/guides.gateways.parallel-gateway-and.md +1 -1
- package/.llms/chunks/guides.patterns.how-matching-works.md +1 -1
- package/.llms/chunks/guides.patterns.md +1 -1
- package/.llms/chunks/guides.patterns.pattern-schema.md +1 -1
- package/.llms/chunks/guides.patterns.see-also.md +2 -2
- package/.llms/chunks/guides.patterns.using-patterns-from-the-cli.md +1 -1
- package/.llms/chunks/guides.patterns.what-a-pattern-contains.md +1 -1
- package/.llms/chunks/guides.simulation.dmn-decision-evaluation.md +1 -1
- package/.llms/chunks/guides.simulation.instance-state.md +1 -1
- package/.llms/chunks/guides.simulation.md +1 -1
- package/.llms/chunks/guides.simulation.message-correlation.md +1 -1
- package/.llms/chunks/guides.simulation.multiple-deployments.md +1 -1
- package/.llms/chunks/guides.vscode.commands.md +14 -0
- package/.llms/chunks/guides.vscode.installing.md +22 -0
- package/.llms/chunks/guides.vscode.md +13 -0
- package/.llms/chunks/guides.vscode.settings.md +19 -0
- package/.llms/chunks/guides.vscode.support.md +11 -0
- package/.llms/chunks/guides.vscode.what-it-does-a-feel-playground-on-your-selection.md +8 -0
- package/.llms/chunks/guides.vscode.what-it-does-a-visual-diff-in-source-control.md +11 -0
- package/.llms/chunks/guides.vscode.what-it-does-copy-the-diagram-as-text.md +8 -0
- package/.llms/chunks/guides.vscode.what-it-does-deploy-against-your-own-clusters.md +21 -0
- package/.llms/chunks/guides.vscode.what-it-does-editing-that-leaves-a-readable-diff.md +22 -0
- package/.llms/chunks/guides.vscode.what-it-does-findings-in-the-problems-panel.md +13 -0
- package/.llms/chunks/guides.vscode.what-it-does-preview-beside-the-source.md +12 -0
- package/.llms/chunks/guides.vscode.what-it-does-run-the-diagram-in-the-editor.md +9 -0
- package/.llms/chunks/guides.workers-standalone.anatomy-of-a-worker.md +1 -1
- package/.llms/chunks/guides.workers-standalone.camunda-saas.md +1 -1
- package/.llms/chunks/guides.workers-standalone.environment-variables.md +1 -1
- package/.llms/chunks/guides.workers-standalone.md +1 -1
- package/.llms/chunks/guides.workers-standalone.running-workers.md +1 -1
- package/.llms/chunks/guides.workers-standalone.see-also.md +3 -3
- package/.llms/chunks/packages.api.incident-resolution.md +1 -1
- package/.llms/chunks/packages.api.observability-events.md +1 -1
- package/.llms/chunks/packages.api.overview.md +1 -1
- package/.llms/chunks/packages.api.process-operations.md +1 -1
- package/.llms/chunks/packages.api.resource-namespaces.md +1 -1
- package/.llms/chunks/packages.canvas.events.md +1 -1
- package/.llms/chunks/packages.canvas.options.md +1 -1
- package/.llms/chunks/packages.canvas.overview.md +1 -1
- package/.llms/chunks/packages.connector-gen.body-expansion.md +1 -1
- package/.llms/chunks/packages.connector-gen.catalog-reference.md +1 -1
- package/.llms/chunks/packages.connector-gen.catalogentry-type.md +2 -2
- package/.llms/chunks/packages.connector-gen.generating-from-the-catalog.md +1 -1
- package/.llms/chunks/packages.connector-gen.installation.md +1 -1
- package/.llms/chunks/packages.connector-gen.lower-level-api.md +1 -1
- package/.llms/chunks/packages.connector-gen.overview.md +1 -1
- package/.llms/chunks/packages.connector-gen.writeoptions.md +1 -1
- package/.llms/chunks/packages.core.dmn-support.md +1 -1
- package/.llms/chunks/packages.core.installation-ad-hoc-sub-processes-children-are-a-set-not-a-chain.md +42 -0
- package/.llms/chunks/packages.core.installation-applybpmnoperations-definitions-operations-options.md +23 -0
- package/.llms/chunks/packages.core.installation-bpmn.continueprocess-definitions-processid.md +45 -0
- package/.llms/chunks/packages.core.installation-bpmn.creatediagram-id.md +1 -1
- package/.llms/chunks/packages.core.installation-bpmn.createprocess-id-name.md +1 -1
- package/.llms/chunks/packages.core.installation-bpmn.export-definitions.md +1 -1
- package/.llms/chunks/packages.core.installation-bpmn.makeempty-processid-processname.md +1 -1
- package/.llms/chunks/packages.core.installation-bpmn.parse-xml.md +1 -1
- package/.llms/chunks/packages.core.installation-bpmn.sample_xml.md +1 -1
- package/.llms/chunks/packages.core.installation-compactify-definitions.md +11 -3
- package/.llms/chunks/packages.core.installation-createflowelement-id-type-options.md +7 -0
- package/.llms/chunks/packages.core.installation-diagrambuilder-collaborations.md +35 -0
- package/.llms/chunks/packages.core.installation-diffdiagram-before-after.md +33 -0
- package/.llms/chunks/packages.core.installation-diffsemantics-before-after.md +15 -0
- package/.llms/chunks/packages.core.installation-element-catalog.md +10 -0
- package/.llms/chunks/packages.core.installation-ensurezeebeextension-owner-extension.md +32 -0
- package/.llms/chunks/packages.core.installation-expand-compact.md +8 -2
- package/.llms/chunks/packages.core.installation-joins-inferred-by-default-or-declared.md +28 -0
- package/.llms/chunks/packages.core.installation-layoutprocess-process.md +1 -1
- package/.llms/chunks/packages.core.installation-processbuilder-methods.md +17 -2
- package/.llms/chunks/packages.core.installation-projectsemantics-definitions.md +7 -0
- package/.llms/chunks/packages.core.installation-reconcilecompact-definitions-compact-options.md +12 -0
- package/.llms/chunks/packages.core.installation-retypeelement-element-type.md +20 -0
- package/.llms/chunks/packages.core.installation-semantichash-definitions.md +23 -0
- package/.llms/chunks/packages.core.installation.md +1 -1
- package/.llms/chunks/packages.core.overview.md +2 -2
- package/.llms/chunks/packages.core.writing-files-bpmnkit-core-node-exportpreserving-original-definitions.md +51 -0
- package/.llms/chunks/packages.core.writing-files-bpmnkit-core-node-writebpmn-definitions-options.md +38 -0
- package/.llms/chunks/packages.core.writing-files-bpmnkit-core-node.md +7 -0
- package/.llms/chunks/packages.docspack.installation.md +2 -2
- package/.llms/chunks/packages.docspack.overview.md +1 -1
- package/.llms/chunks/packages.docspack.reading-it-yourself.md +1 -1
- package/.llms/chunks/packages.docspack.trust.md +1 -1
- package/.llms/chunks/packages.docspack.using-the-index-directly.md +2 -2
- package/.llms/chunks/packages.editor.basic-setup.md +1 -1
- package/.llms/chunks/packages.editor.full-editor-with-all-plugins.md +1 -1
- package/.llms/chunks/packages.editor.hud-options.md +1 -1
- package/.llms/chunks/packages.editor.overview.md +1 -1
- package/.llms/chunks/packages.engine.installation.md +1 -1
- package/.llms/chunks/packages.engine.overview.md +1 -1
- package/.llms/chunks/packages.engine.processinstance.md +1 -1
- package/.llms/chunks/packages.engine.variable-scoping.md +1 -1
- package/.llms/chunks/packages.worker-client.client.poll-jobtype-options.md +1 -1
- package/.llms/chunks/packages.worker-client.createworkerclient-options.md +1 -1
- package/.llms/chunks/packages.worker-client.job.complete-variables.md +1 -1
- package/.llms/chunks/packages.worker-client.md +1 -1
- package/.llms/chunks/packages.worker-client.oauth2-camunda-saas.md +1 -1
- package/.llms/chunks/packages.worker-client.see-also.md +3 -3
- package/.llms/manifest.json +699 -60
- package/README.md +2 -1
- package/dist/chunk.js +1 -1
- package/llms.txt +92 -53
- package/package.json +3 -3
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
# @bpmnkit/core — Installation — `compactify(definitions)`
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Projects a `BpmnDefinitions` object onto a `CompactDiagram` — a small JSON object suitable
|
|
4
|
+
for LLM prompts. **Lossy:** it keeps topology, names, `<bpmn:documentation>` and the common
|
|
5
|
+
Zeebe bindings, and drops collaborations, participants, message flows, lanes, data stores,
|
|
6
|
+
artifacts, root-level messages and errors, multi-instance loop characteristics, full
|
|
7
|
+
`zeebe:ioMapping` entries and diagram interchange.
|
|
8
|
+
|
|
9
|
+
`documentation` is carried on every element and on the process itself, because in Camunda 8 it
|
|
10
|
+
is not decoration: on an ad-hoc sub-process child it is the tool description handed to the LLM,
|
|
11
|
+
and on a start event it is where the process input contract is written. It had been dropped, so
|
|
12
|
+
a single `rename` operation cost a file the documentation of every element in it.
|
|
5
13
|
|
|
6
14
|
```typescript
|
|
7
15
|
import { compactify } from "@bpmnkit/core";
|
|
@@ -10,4 +18,4 @@ const compact = compactify(Bpmn.parse(xml));
|
|
|
10
18
|
```
|
|
11
19
|
|
|
12
20
|
---
|
|
13
|
-
Source: https://
|
|
21
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @bpmnkit/core — Installation — `createFlowElement(id, type, options?)`
|
|
2
|
+
|
|
3
|
+
Builds an empty flow element of any `BpmnElementType`, with the right shape for that type.
|
|
4
|
+
This is the single place that mapping lives; the fluent builder uses it too.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @bpmnkit/core — Installation — DiagramBuilder — collaborations
|
|
2
|
+
|
|
3
|
+
`.participant()`, `.message()` and `.messageFlow()` build a pooled diagram. Ids are used
|
|
4
|
+
verbatim, so a generated diagram can be referred to by the ids you chose.
|
|
5
|
+
|
|
6
|
+
```typescript
|
|
7
|
+
const defs = Bpmn.createDiagram("Order")
|
|
8
|
+
.process("order", (p) => p.startEvent("o_start").serviceTask("o_send", { taskType: "send" }).endEvent("o_end"))
|
|
9
|
+
.process("supply", (p) => p.startEvent("s_start").serviceTask("s_recv", { taskType: "recv" }).endEvent("s_end"))
|
|
10
|
+
.participant("P_Buyer", { name: "Buyer", processId: "order" })
|
|
11
|
+
.participant("P_Seller", { name: "Seller", processId: "supply" })
|
|
12
|
+
.participant("P_Bank", { name: "Bank" }) // black box — no process
|
|
13
|
+
.message("Msg_Order", { name: "order placed", correlationKey: "= orderId" })
|
|
14
|
+
.messageFlow("MF_1", { source: "o_send", target: "s_recv", messageRef: "Msg_Order" })
|
|
15
|
+
.build();
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
A message flow's `source` and `target` name either participants or flow nodes inside them —
|
|
19
|
+
both are valid BPMN, and `applyAutoLayout` reads either.
|
|
20
|
+
|
|
21
|
+
A diagram with no participants gets **no** collaboration element. An empty
|
|
22
|
+
`<bpmn:collaboration/>` is not a neutral addition: a modeler reads it as "this document is
|
|
23
|
+
pooled" and renders every process pool-less.
|
|
24
|
+
|
|
25
|
+
`.collaborationId(id)` renames the collaboration, which defaults to `"Collaboration_1"`.
|
|
26
|
+
|
|
27
|
+
`build()` refuses a collaboration a modeler would not open, reporting every problem at once:
|
|
28
|
+
a participant naming a process the diagram does not contain, two participants claiming the
|
|
29
|
+
same process, a duplicate id, a message flow whose endpoint does not exist or which names an
|
|
30
|
+
undeclared message, and — the one that is easy to write by accident — a message flow that
|
|
31
|
+
starts and ends in the same pool. A message flow is what crosses a pool boundary; one that
|
|
32
|
+
stays inside a pool should be a sequence flow.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @bpmnkit/core — Installation — `diffDiagram(before, after)`
|
|
2
|
+
|
|
3
|
+
What a *reviewer* would see change — `diffSemantics()` plus the layout half it deliberately
|
|
4
|
+
ignores, restricted to elements a canvas can actually draw.
|
|
5
|
+
|
|
6
|
+
```typescript
|
|
7
|
+
import { diffDiagram } from "@bpmnkit/core";
|
|
8
|
+
|
|
9
|
+
const result = diffDiagram(before, after);
|
|
10
|
+
result.added; // ids only in `after`
|
|
11
|
+
result.removed; // ids only in `before`
|
|
12
|
+
result.changed; // same element, different semantics
|
|
13
|
+
result.moved; // same semantics, different place on the canvas
|
|
14
|
+
result.total;
|
|
15
|
+
result.planes; // per-plane breakdown — a change inside a collapsed sub-process
|
|
16
|
+
// is invisible in a viewer until the reader drills into it
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`moved` is why this exists. The semantic hash drops all diagram interchange — that is what
|
|
20
|
+
makes it stable across a re-layout — so a task somebody dragged reads as no change at all in
|
|
21
|
+
`diffSemantics()`. Here the geometry is compared separately from DI (bounds, waypoints, label
|
|
22
|
+
placement, and flags such as collapsed/expanded). An element that changed *and* moved is
|
|
23
|
+
reported as changed, since a semantic change is what a reviewer needs first.
|
|
24
|
+
|
|
25
|
+
An element with nothing to draw on either side is left out, so a changed `targetNamespace`
|
|
26
|
+
cannot inflate a count against nothing on screen.
|
|
27
|
+
|
|
28
|
+
The same comparison is [`casen diff bpmn`](/docs/cli/diff) on the command line,
|
|
29
|
+
`createBpmnDiff()` in `@bpmnkit/plugins` on a pair of canvases, and *Compare Diagram with
|
|
30
|
+
HEAD* in the [VS Code extension](/docs/guides/vscode).
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @bpmnkit/core — Installation — `diffSemantics(before, after)`
|
|
2
|
+
|
|
3
|
+
What changed between two models, as `{ added, removed, changed }` keyed by element id. Changes
|
|
4
|
+
are attributed to the element that actually changed rather than to all of its ancestors, and
|
|
5
|
+
running auto-layout produces an empty diff.
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { diffSemantics } from "@bpmnkit/core";
|
|
9
|
+
|
|
10
|
+
const { added, removed, changed } = diffSemantics(before, after);
|
|
11
|
+
// changed: [{ id: "Task_1", before: {...}, after: {...} }]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# @bpmnkit/core — Installation — Element catalog
|
|
2
|
+
|
|
3
|
+
`ELEMENT_TYPE_GROUPS` maps every `BpmnElementType` to one of `event`, `task`, `gateway`,
|
|
4
|
+
`container` or `data`, with `allElementTypes()` and `elementTypesInGroup(group)` over it. Tool
|
|
5
|
+
schemas and prompts render their type lists from this rather than hard-coding one — a
|
|
6
|
+
hand-written list is how the MCP schema came to advertise 18 types while the compact path
|
|
7
|
+
accepted 23.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @bpmnkit/core — Installation — `ensureZeebeExtension(owner, extension)`
|
|
2
|
+
|
|
3
|
+
Finds a Zeebe extension element on a flow element, creating it if absent, and refuses a
|
|
4
|
+
placement the Zeebe schema does not allow. Use it instead of pushing onto `extensionElements`
|
|
5
|
+
directly: the push cannot fail, so `zeebe:calledDecision` on a service task becomes a deploy
|
|
6
|
+
error in Camunda rather than a throw where it was written.
|
|
7
|
+
|
|
8
|
+
```typescript
|
|
9
|
+
import { ensureZeebeExtension, ZeebePlacementError } from "@bpmnkit/core";
|
|
10
|
+
|
|
11
|
+
ensureZeebeExtension(serviceTask, "zeebe:taskDefinition").attributes.type = "worker";
|
|
12
|
+
ensureZeebeExtension(serviceTask, "zeebe:calledDecision"); // throws ZeebePlacementError
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`ZeebePlacementError` carries `ownerElement`, `extension` and `allowedOn`, so the message
|
|
16
|
+
names the elements that *would* have been valid.
|
|
17
|
+
|
|
18
|
+
`isZeebePlacementAllowed(ownerElement, extension)` answers the same question without throwing,
|
|
19
|
+
and `ZEEBE_PLACEMENT` is the table itself — extension name to the element names that may own it.
|
|
20
|
+
|
|
21
|
+
The table is generated from `zeebe.json`'s `meta.allowedIn` (`zeebe-bpmn-moddle`, MIT),
|
|
22
|
+
resolved against the BPMN type graph, so it states the schema's rules rather than ours. **An
|
|
23
|
+
extension the schema says nothing about is allowed**: the descriptor declares no owner for
|
|
24
|
+
`zeebe:subscription` or `zeebe:properties`, and inventing a rule there would reject valid
|
|
25
|
+
documents. Non-`zeebe:` extensions are not checked at all.
|
|
26
|
+
|
|
27
|
+
`applyBpmnOperations` runs the same check, and reports a misplaced extension as an ordinary
|
|
28
|
+
operation problem — checked before anything is written, so the element is left untouched and
|
|
29
|
+
the rest of the batch still applies.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @bpmnkit/core — Installation — `expand(compact)`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Builds a `BpmnDefinitions` object from a `CompactDiagram`. It restores only what the compact
|
|
4
|
+
form carries, so `expand(compactify(definitions))` is not `definitions` — use this to build a
|
|
5
|
+
model from a compact definition, not as a round trip for a file you need to keep.
|
|
4
6
|
|
|
5
7
|
```typescript
|
|
6
8
|
import { expand } from "@bpmnkit/core";
|
|
@@ -9,5 +11,9 @@ const definitions = expand(compactDiagram);
|
|
|
9
11
|
const xml = Bpmn.export(definitions);
|
|
10
12
|
```
|
|
11
13
|
|
|
14
|
+
Every element type the model knows expands to itself, data elements included. The switch is
|
|
15
|
+
exhaustive, so a new `BpmnElementType` fails the build here rather than silently arriving as a
|
|
16
|
+
`task` — which is how `dataObject`, `dataObjectReference` and `dataStoreReference` were lost.
|
|
17
|
+
|
|
12
18
|
---
|
|
13
|
-
Source: https://
|
|
19
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @bpmnkit/core — Installation — Joins: inferred by default, or declared
|
|
2
|
+
|
|
3
|
+
Where several branches of one gateway reach the same element, `build()` inserts a matching
|
|
4
|
+
join gateway for you. That is a help when you are reading the chain you just wrote, and a trap
|
|
5
|
+
for generated code, which cannot see the element it did not emit.
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
const defs = builder.build({ explicitJoins: true });
|
|
9
|
+
// Error: Inferred join gateways: gw_join. Declare them with .connectTo(joinId),
|
|
10
|
+
// or drop { explicitJoins: true } to keep the inference.
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The error names the gateway it would have added, which is the id you pass to `.connectTo()`.
|
|
14
|
+
|
|
15
|
+
A join you declare only counts if it **matches the split**: an exclusive split converging on a
|
|
16
|
+
parallel gateway is not the gateway inference would have added, so it is still inferred — and
|
|
17
|
+
with `explicitJoins` that refusal is the only thing that tells you.
|
|
18
|
+
|
|
19
|
+
`Bpmn.continueProcess()` never infers joins at all, whatever this option says. Inference reads
|
|
20
|
+
the whole topology, and on a document you were handed that means rewriting edges you never
|
|
21
|
+
touched.
|
|
22
|
+
|
|
23
|
+
`{ strict: true }` is the former name for this option and still works. It was renamed because
|
|
24
|
+
"strict" says nothing about what it is strict *about*, and because `applyBpmnOperations` takes
|
|
25
|
+
a `strict` that means something else entirely.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -9,11 +9,20 @@ All builder methods return `this` for chaining.
|
|
|
9
9
|
| `.serviceTask(id, options?)` | Add a service task |
|
|
10
10
|
| `.userTask(id, options?)` | Add a user task |
|
|
11
11
|
| `.scriptTask(id, options?)` | Add a script task |
|
|
12
|
+
| `.sendTask(id, options?)` | Add a send task |
|
|
13
|
+
| `.receiveTask(id, options?)` | Add a receive task |
|
|
14
|
+
| `.businessRuleTask(id, options?)` | Add a business rule task |
|
|
15
|
+
| `.manualTask(id, options?)` | Add a manual task — work done outside the engine, no job worker |
|
|
16
|
+
| `.task(id, options?)` | Add an abstract task with no Zeebe extensions |
|
|
12
17
|
| `.exclusiveGateway(id, options?)` | Add an XOR gateway |
|
|
13
18
|
| `.parallelGateway(id, options?)` | Add a parallel gateway |
|
|
14
19
|
| `.inclusiveGateway(id, options?)` | Add an inclusive gateway |
|
|
15
20
|
| `.eventBasedGateway(id, options?)` | Add an event-based gateway |
|
|
21
|
+
| `.complexGateway(id, options?)` | Add a complex gateway (aspirational — Zeebe does not execute these) |
|
|
16
22
|
| `.subProcess(id, builder, options?)` | Add an embedded sub-process |
|
|
23
|
+
| `.adHocSubProcess(id, builder, options?)` | Add an ad-hoc sub-process — its children are **not** auto-chained, see below |
|
|
24
|
+
| `.eventSubProcess(id, builder, options?)` | Add an event sub-process (emits `subProcess triggeredByEvent="true"`) |
|
|
25
|
+
| `.transaction(id, builder, options?)` | Add a transaction sub-process (atomic scope) |
|
|
17
26
|
| `.callActivity(id, options?)` | Add a call activity |
|
|
18
27
|
| `.intermediateCatchEvent(id, options?)` | Add a catch event |
|
|
19
28
|
| `.intermediateThrowEvent(id, options?)` | Add a throw event |
|
|
@@ -23,7 +32,13 @@ All builder methods return `this` for chaining.
|
|
|
23
32
|
| `.defaults(options)` | Set process-wide defaults (e.g. `{ serviceTask: { retries: "5" } }`) applied to all subsequent tasks |
|
|
24
33
|
| `.disconnectedStartEvent(id?, options?)` | Add a start event with no auto-connection to the current cursor — alias for `addStartEvent` |
|
|
25
34
|
| `.withAutoLayout()` | Apply Sugiyama layout before building |
|
|
26
|
-
| `.build(options?)` | Return the completed `BpmnDefinitions`. Pass `{
|
|
35
|
+
| `.build(options?)` | Return the completed `BpmnDefinitions`. Pass `{ explicitJoins: true }` to refuse inferred join gateways — see below |
|
|
36
|
+
|
|
37
|
+
Every BPMN element type the model knows is reachable from a builder chain, except the three
|
|
38
|
+
data types (`dataObject`, `dataObjectReference`, `dataStoreReference`) — those are wired by
|
|
39
|
+
data associations rather than sequence flows, so the chain has nowhere to put them. A
|
|
40
|
+
compile-time table, `BUILDER_COVERAGE`, holds the SDK to that: adding an element type without
|
|
41
|
+
a builder method fails the build. Run `pnpm --filter @bpmnkit/core check:builder` to print it.
|
|
27
42
|
|
|
28
43
|
---
|
|
29
|
-
Source: https://
|
|
44
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @bpmnkit/core — Installation — `projectSemantics(definitions)`
|
|
2
|
+
|
|
3
|
+
The canonical, presentation-free projection `semanticHash` covers. Returns `{ value, elements }`
|
|
4
|
+
— the whole model as canonical JSON, plus a shallow projection per element id.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
Source: https://bpmnkit.com/docs/packages/core
|
package/.llms/chunks/packages.core.installation-reconcilecompact-definitions-compact-options.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# @bpmnkit/core — Installation — `reconcileCompact(definitions, compact, options?)`
|
|
2
|
+
|
|
3
|
+
Applies a `CompactDiagram` to an existing model as a set of changes. Elements that already
|
|
4
|
+
exist are patched in place and keep their extensions, new ones are inserted, and ones the input
|
|
5
|
+
no longer mentions are removed — where `expand(compact)` would rebuild the whole document and
|
|
6
|
+
discard everything the compact form cannot describe.
|
|
7
|
+
|
|
8
|
+
Processes are only added, never removed: sending one process of a multi-process document means
|
|
9
|
+
"this is how that process should look", not "delete the others".
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# @bpmnkit/core — Installation — `retypeElement(element, type)`
|
|
2
|
+
|
|
3
|
+
Returns a copy of a flow element with a different `type`, keeping its id, name, documentation
|
|
4
|
+
and — crucially — its incoming and outgoing sequence flows. Use this to change a task's type
|
|
5
|
+
instead of removing and re-adding the element, which drops the wiring.
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { retypeElement } from "@bpmnkit/core";
|
|
9
|
+
|
|
10
|
+
const index = process.flowElements.findIndex((el) => el.id === "charge");
|
|
11
|
+
process.flowElements[index] = retypeElement(process.flowElements[index], "manualTask");
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Nested content is carried between container types, and a multi-instance marker between types
|
|
15
|
+
that both allow one. Zeebe extensions the new type cannot legally hold are dropped, using the
|
|
16
|
+
same placement table `ensureZeebeExtension` enforces — so a `serviceTask` retyped to
|
|
17
|
+
`manualTask` does not keep a job worker the engine would refuse.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# @bpmnkit/core — Installation — `semanticHash(definitions)`
|
|
2
|
+
|
|
3
|
+
SHA-256 of the model's meaning, with the diagram excluded. Two documents that say the same
|
|
4
|
+
thing hash the same however they are laid out, ordered or formatted — so a changed hash means
|
|
5
|
+
the model changed, not that the picture moved.
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { Bpmn, applyAutoLayout, semanticHash } from "@bpmnkit/core";
|
|
9
|
+
|
|
10
|
+
const definitions = Bpmn.parse(xml);
|
|
11
|
+
semanticHash(applyAutoLayout(definitions)) === semanticHash(definitions); // true
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Excluded from the hash: diagram interchange and its `bioc`/`color` extensions,
|
|
15
|
+
`zeebe:modelerTemplateIcon`, and `exporter`/`exporterVersion`. Element order, attribute order
|
|
16
|
+
and whitespace do not affect it. `modeler:executionPlatform` **is** included — it names the
|
|
17
|
+
engine the model targets, so changing it is a real change.
|
|
18
|
+
|
|
19
|
+
Synchronous and dependency-free, so it works in the browser and does not force callers to
|
|
20
|
+
become async.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
BPMN 2.0 programmatically:
|
|
5
5
|
|
|
6
6
|
- **Fluent builder** — chain method calls to construct any process shape
|
|
7
|
-
- **Parser/serializer** — round-trip
|
|
7
|
+
- **Parser/serializer** — round-trip BPMN 2.0 XML, keeping unmodelled content verbatim
|
|
8
8
|
- **Auto-layout** — Sugiyama algorithm assigns coordinates automatically
|
|
9
9
|
- **Compact format** — token-efficient AI-friendly intermediate representation
|
|
10
10
|
- **DMN support** — parse, build, and export DMN 1.3 decision tables
|
|
@@ -12,4 +12,4 @@ BPMN 2.0 programmatically:
|
|
|
12
12
|
Zero runtime dependencies. ESM-only. Runs in browsers, Node.js, Deno, Bun, and edge runtimes.
|
|
13
13
|
|
|
14
14
|
---
|
|
15
|
-
Source: https://
|
|
15
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# @bpmnkit/core — Writing files — `@bpmnkit/core/node` — `exportPreserving(original, definitions)`
|
|
2
|
+
|
|
3
|
+
Writes a model back over the file it came from, changing as little as possible.
|
|
4
|
+
|
|
5
|
+
`Bpmn.export()` writes a model the way this toolkit writes models. That is the right output
|
|
6
|
+
for a new document and the wrong one for an existing file: the first visual edit reformats
|
|
7
|
+
every line, and the commit says "the whole diagram" when it means "a box moved".
|
|
8
|
+
|
|
9
|
+
Exported from `@bpmnkit/core` itself, not the `/node` subpath — it is string work, and the
|
|
10
|
+
caller owns the file:
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
14
|
+
import { Bpmn, exportPreserving } from "@bpmnkit/core";
|
|
15
|
+
|
|
16
|
+
const onDisk = await readFile("order.bpmn", "utf8");
|
|
17
|
+
const edited = Bpmn.parse(onDisk);
|
|
18
|
+
edited.processes[0].flowElements[0].name = "Validate Order";
|
|
19
|
+
|
|
20
|
+
await writeFile("order.bpmn", exportPreserving(onDisk, edited));
|
|
21
|
+
// Renaming one task changes one line, not the whole file.
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Indentation, attribute order, comments, the order children were written in, and attributes
|
|
25
|
+
left at their schema default all survive. Opening a file and writing it back unchanged leaves
|
|
26
|
+
it byte for byte.
|
|
27
|
+
|
|
28
|
+
Nothing about that is assumed, though. The model cannot represent the order a file writes its
|
|
29
|
+
children in — a process holds `flowElements` and `sequenceFlows` as separate lists — so each
|
|
30
|
+
strategy is tried, **the result is parsed back and compared against a plain write**, and the
|
|
31
|
+
first that reads the same is the one used. The plain write is the floor, so calling this is
|
|
32
|
+
never worse than not.
|
|
33
|
+
|
|
34
|
+
| Function | Takes | Returns |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `exportPreserving(original, definitions)` | the file's current text + a model | the new text |
|
|
37
|
+
| `exportPreservingResult(original, definitions)` | same | the text plus what it managed to keep |
|
|
38
|
+
| `preserveBpmnFormatting(original, updated)` | two documents as text | for a caller that already serialised, such as an editor's `exportXml()` |
|
|
39
|
+
| `exportDmnPreserving` / `preserveDmnFormatting` | DMN | the same treatment |
|
|
40
|
+
| `exportFormPreserving` / `preserveFormFormatting` | Camunda form JSON | indentation, key order and trailing newline |
|
|
41
|
+
|
|
42
|
+
This is what the [VS Code extension](/docs/guides/vscode) saves through, and what makes a
|
|
43
|
+
visual edit reviewable in a pull request.
|
|
44
|
+
|
|
45
|
+
Builder output is stable for the same reason: sequence-flow and root-definition ids are
|
|
46
|
+
derived from the model (`Flow_<source>_<target>`, `Message_<name>`, `Error_<code>`) rather
|
|
47
|
+
than randomly generated, so rebuilding an unchanged model produces the same file and the one
|
|
48
|
+
edge that changed is not buried in a diff of edges that did not.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
Source: https://bpmnkit.com/docs/packages/core
|
package/.llms/chunks/packages.core.writing-files-bpmnkit-core-node-writebpmn-definitions-options.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @bpmnkit/core — Writing files — `@bpmnkit/core/node` — `writeBpmn(definitions, options)`
|
|
2
|
+
|
|
3
|
+
The only supported way to write a BPMN file, and the only one that checks what it wrote.
|
|
4
|
+
Before anything reaches disk it serialises the model, **parses the result back**, and compares
|
|
5
|
+
the semantic hashes. If they differ the write is refused and nothing is written.
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { writeBpmn } from "@bpmnkit/core/node";
|
|
9
|
+
import { WriteError, WriteVerificationError } from "@bpmnkit/core";
|
|
10
|
+
|
|
11
|
+
const result = await writeBpmn(definitions, {
|
|
12
|
+
output: "flow.bpmn",
|
|
13
|
+
force: false, // default — refuses rather than replace an existing file
|
|
14
|
+
layout: "preserve", // default — "auto" regenerates the diagram first
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
result.destination; // absolute path written
|
|
18
|
+
result.semanticHash; // the model's hash, verified after reading it back
|
|
19
|
+
result.outputSha256; // digest of the exact bytes on disk
|
|
20
|
+
result.changes; // what this write changed about the file it replaced
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The file appears complete or not at all: contents go to a temporary file in the destination's
|
|
24
|
+
own directory and are then linked or renamed into place, so an interrupted write cannot leave
|
|
25
|
+
a half-written model behind. Two concurrent writes to the same new path cannot both succeed.
|
|
26
|
+
|
|
27
|
+
`WriteVerificationError` carries a `changes` field naming the elements that diverged.
|
|
28
|
+
`WriteError` means the destination exists and `force` was not given, or the filesystem refused.
|
|
29
|
+
|
|
30
|
+
**What the check does not cover.** It compares the model in memory against the model read back
|
|
31
|
+
from the output, so it catches the serialiser losing something. It cannot catch the *parser*
|
|
32
|
+
having dropped something on the way in — content the parser never saw is absent from both
|
|
33
|
+
sides. That is what the round-trip corpus gate covers, and there is deliberately no option to
|
|
34
|
+
skip verification: turning it off would only ever be used to get past the bug it exists to
|
|
35
|
+
report. If you want unchecked serialisation, `Bpmn.export()` still returns a string.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @bpmnkit/core — Writing files — `@bpmnkit/core/node`
|
|
2
|
+
|
|
3
|
+
Anything that touches the filesystem lives behind the `@bpmnkit/core/node` subpath, so
|
|
4
|
+
importing `@bpmnkit/core` itself never pulls `node:` builtins into a browser bundle.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
Source: https://bpmnkit.com/docs/packages/core
|
|
@@ -32,7 +32,7 @@ When you're ready for production, deploy to a real Camunda 8 cluster:
|
|
|
32
32
|
...
|
|
33
33
|
|
|
34
34
|
---
|
|
35
|
-
Source:
|
|
35
|
+
Source: /docs/getting-started/quick-start
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
cost: 1,204 tokens, capped at 3,000
|
|
@@ -42,4 +42,4 @@ Every answer names the package, the version and the chunk it came from, and clos
|
|
|
42
42
|
what it cost. An agent can quote the chunk id back when a passage turns out to be wrong.
|
|
43
43
|
|
|
44
44
|
---
|
|
45
|
-
Source: https://
|
|
45
|
+
Source: https://bpmnkit.com/docs/packages/docspack
|
|
@@ -21,7 +21,7 @@ console.log(`${tokens} tokens`);
|
|
|
21
21
|
|
|
22
22
|
## How the pack is built
|
|
23
23
|
|
|
24
|
-
`bpmnkit-docs build` reads the Markdown under `apps/
|
|
24
|
+
`bpmnkit-docs build` reads the Markdown under `apps/landing/src/content/docs`, splits each
|
|
25
25
|
document at its `##` headings, and writes one file per chunk:
|
|
26
26
|
|
|
27
27
|
```
|
|
@@ -49,4 +49,4 @@ You can steer either from the document itself:
|
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
---
|
|
52
|
-
Source: https://
|
|
52
|
+
Source: https://bpmnkit.com/docs/packages/docspack
|