@bpmnkit/docspack 0.0.3 → 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.
Files changed (37) hide show
  1. package/.llms/chunks/cli.diff.flags.md +46 -0
  2. package/.llms/chunks/cli.diff.md +43 -0
  3. package/.llms/chunks/cli.diff.the-same-diff-elsewhere.md +14 -0
  4. package/.llms/chunks/guides.building-processes.multi-instance.md +66 -0
  5. package/.llms/chunks/guides.drop.md +12 -0
  6. package/.llms/chunks/guides.drop.reviewing-it-together.md +45 -0
  7. package/.llms/chunks/guides.drop.running-your-own.md +21 -0
  8. package/.llms/chunks/guides.drop.sharing-a-file.md +42 -0
  9. package/.llms/chunks/guides.drop.what-drop-is-not.md +12 -0
  10. package/.llms/chunks/guides.vscode.commands.md +14 -0
  11. package/.llms/chunks/guides.vscode.installing.md +22 -0
  12. package/.llms/chunks/guides.vscode.md +13 -0
  13. package/.llms/chunks/guides.vscode.settings.md +19 -0
  14. package/.llms/chunks/guides.vscode.support.md +11 -0
  15. package/.llms/chunks/guides.vscode.what-it-does-a-feel-playground-on-your-selection.md +8 -0
  16. package/.llms/chunks/guides.vscode.what-it-does-a-visual-diff-in-source-control.md +11 -0
  17. package/.llms/chunks/guides.vscode.what-it-does-copy-the-diagram-as-text.md +8 -0
  18. package/.llms/chunks/guides.vscode.what-it-does-deploy-against-your-own-clusters.md +21 -0
  19. package/.llms/chunks/guides.vscode.what-it-does-editing-that-leaves-a-readable-diff.md +22 -0
  20. package/.llms/chunks/guides.vscode.what-it-does-findings-in-the-problems-panel.md +13 -0
  21. package/.llms/chunks/guides.vscode.what-it-does-preview-beside-the-source.md +12 -0
  22. package/.llms/chunks/guides.vscode.what-it-does-run-the-diagram-in-the-editor.md +9 -0
  23. package/.llms/chunks/packages.core.installation-ad-hoc-sub-processes-children-are-a-set-not-a-chain.md +42 -0
  24. package/.llms/chunks/packages.core.installation-compactify-definitions.md +9 -4
  25. package/.llms/chunks/packages.core.installation-createflowelement-id-type-options.md +7 -0
  26. package/.llms/chunks/packages.core.installation-diffdiagram-before-after.md +33 -0
  27. package/.llms/chunks/packages.core.installation-element-catalog.md +10 -0
  28. package/.llms/chunks/packages.core.installation-expand-compact.md +4 -0
  29. package/.llms/chunks/packages.core.installation-processbuilder-methods.md +15 -0
  30. package/.llms/chunks/packages.core.installation-retypeelement-element-type.md +20 -0
  31. package/.llms/chunks/packages.core.writing-files-bpmnkit-core-node-exportpreserving-original-definitions.md +51 -0
  32. package/.llms/chunks/packages.core.writing-files-bpmnkit-core-node-writebpmn-definitions-options.md +38 -0
  33. package/.llms/chunks/packages.core.writing-files-bpmnkit-core-node.md +0 -36
  34. package/.llms/manifest.json +438 -10
  35. package/README.md +1 -0
  36. package/llms.txt +34 -6
  37. package/package.json +1 -1
@@ -0,0 +1,46 @@
1
+ # casen diff — Flags
2
+
3
+ | Flag | Default | What it does |
4
+ | --- | --- | --- |
5
+ | `--format` | `text` | `text` or `json` |
6
+ | `--exit-code` | off | Exit non-zero when the two diagrams differ |
7
+ | `--ascii` | off | Also render both diagrams as ASCII art |
8
+
9
+ ### As a pipeline gate
10
+
11
+ ```sh
12
+ casen diff bpmn main/order.bpmn branch/order.bpmn --exit-code
13
+ ```
14
+
15
+ Exits non-zero when anything differs, so a job can fail — or a review can be requested —
16
+ whenever a pull request touches the shape of a process rather than only its formatting.
17
+
18
+ ### Machine-readable
19
+
20
+ ```sh
21
+ casen diff bpmn old.bpmn new.bpmn --format json
22
+ ```
23
+
24
+ ```json
25
+ {
26
+ "added": ["Activity_1x8fj2"],
27
+ "removed": [],
28
+ "changed": ["Activity_0p2ktn"],
29
+ "moved": ["Gateway_09sd1a"],
30
+ "total": 3,
31
+ "planes": [{ "id": "order-process", "total": 3, "added": 1, "removed": 0, "changed": 1, "moved": 1 }]
32
+ }
33
+ ```
34
+
35
+ ### Alongside the picture
36
+
37
+ ```sh
38
+ casen diff bpmn old.bpmn new.bpmn --ascii
39
+ ```
40
+
41
+ Prints both diagrams as ASCII art above the summary — the same rendering
42
+ [`casen view`](/docs/cli/view) produces, and the same one the VS Code extension copies into a
43
+ pull request.
44
+
45
+ ---
46
+ Source: https://bpmnkit.com/docs/cli/diff
@@ -0,0 +1,43 @@
1
+ # casen diff
2
+
3
+ `casen diff bpmn` answers the question a text diff cannot: *what changed about the process?*
4
+ Two files go in, and what comes out is the list of elements a reviewer would see differ —
5
+ named, not just identified.
6
+
7
+ ```sh
8
+ casen diff bpmn old.bpmn new.bpmn
9
+ ```
10
+
11
+ ```
12
+ + Notify Customer (Activity_1x8fj2)
13
+ ~ Validate Order (Activity_0p2ktn)
14
+ ⇄ Approved? (Gateway_09sd1a)
15
+
16
+ 3 differences: 1 added, 1 changed, 1 moved
17
+ ```
18
+
19
+
20
+ ## Why the categories matter
21
+
22
+ | Marker | Category | Means |
23
+ | --- | --- | --- |
24
+ | `+` | added | Exists only in the later file |
25
+ | `−` | removed | Exists only in the earlier file |
26
+ | `~` | changed | Same element, different semantics — a task type, a condition, an extension |
27
+ | `⇄` | moved | Same semantics, different place on the canvas |
28
+
29
+ `moved` is the category that earns the command. The semantic hash behind
30
+ [`diffSemantics()`](/docs/packages/core#diffsemanticsbefore-after) deliberately drops all
31
+ diagram interchange — that is what makes it stable across a re-layout — so a task somebody
32
+ dragged reads there as no change at all. `casen diff` computes the layout half separately
33
+ from DI (bounds, waypoints, label placement, flags such as collapsed/expanded) and reports it
34
+ as its own category. An element that changed *and* moved is reported as changed, because a
35
+ semantic change is what a reviewer needs first.
36
+
37
+ Only elements a canvas could actually draw are counted, so a changed `targetNamespace` cannot
38
+ inflate the count against nothing on screen. When a diagram has more than one plane, the
39
+ per-plane totals are printed too — a change inside a collapsed sub-process is invisible in a
40
+ viewer until the reader drills into it.
41
+
42
+ ---
43
+ Source: https://bpmnkit.com/docs/cli/diff
@@ -0,0 +1,14 @@
1
+ # casen diff — The same diff elsewhere
2
+
3
+ The comparison itself is
4
+ [`diffDiagram()`](/docs/packages/core#diffdiagrambefore-after) in `@bpmnkit/core`, so every
5
+ surface shows the same answer:
6
+
7
+ - **Visually, in VS Code** — *Compare Diagram with HEAD*, or two selected files. See the
8
+ [VS Code guide](/docs/guides/vscode).
9
+ - **On a share link** — `/drop/<before>/diff/<after>`. See the [Drop guide](/docs/guides/drop).
10
+ - **In your own canvas** — `createBpmnDiff()` from `@bpmnkit/plugins` returns a pair of
11
+ plugins, one per canvas, with synchronised pan and zoom.
12
+
13
+ ---
14
+ Source: https://bpmnkit.com/docs/cli/diff
@@ -16,5 +16,71 @@ Run a task or sub-process once per item in a collection:
16
16
  })
17
17
  ```
18
18
 
19
+
20
+ ## Generated IDs
21
+
22
+ You name every flow node. The builder names everything else, and it derives those names from
23
+ the model so that rebuilding an unchanged process produces unchanged BPMN — a diff that shows
24
+ only what you actually changed.
25
+
26
+ A sequence flow is named after the two elements it connects:
27
+
28
+ ```typescript
29
+ Bpmn.createProcess("orders")
30
+ .startEvent("start")
31
+ .serviceTask("validate", { taskType: "validate" })
32
+ .endEvent("done")
33
+ .build()
34
+ // Flow_start_validate, Flow_validate_done
35
+ ```
36
+
37
+ When several flows connect the same pair — the branches of a gateway converging on one join —
38
+ each gets a discriminator taken from the branch name, or from its condition when the branch is
39
+ unnamed:
40
+
41
+ ```typescript
42
+ .exclusiveGateway("gw")
43
+ .branch("approved", (b) => b.connectTo("done"))
44
+ .branch("rejected", (b) => b.connectTo("done"))
45
+ // Flow_gw_gw_join_approved, Flow_gw_gw_join_rejected
46
+ ```
47
+
48
+ Because the id comes from the connection rather than from a counter, adding or reordering an
49
+ unrelated element leaves the other flows' ids alone. The same is true of root definitions
50
+ created from event options — `Message_Order_Received` for `messageName: "Order Received"`, and
51
+ likewise `Error_`, `Signal_` and `Escalation_` from the code or name they carry.
52
+
53
+ Two consequences worth knowing:
54
+
55
+ - **Ids are only as stable as the elements they name.** Omitting an element id (`.startEvent()`
56
+ with no argument) gets you a generated one that changes on every build, and the flow ids
57
+ around it inherit that. Name the nodes you care about.
58
+ - **`defaultFlow` becomes predictable.** Setting a gateway's default by id no longer requires
59
+ knowing a random value: `{ defaultFlow: "Flow_gw_gw_join_rejected" }`. `.branch().defaultFlow()`
60
+ is still the shorter way to say it.
61
+
62
+ `continueProcess()` never renumbers what the document arrived with: flows the builder did not
63
+ create keep their ids, and new ones avoid them.
64
+
65
+ ### Naming a root definition yourself
66
+
67
+ When the id of a message, error, signal or escalation matters — because a message flow in another
68
+ pool, a worker, or a deployed process already refers to it — declare it before the events that
69
+ use it:
70
+
71
+ ```typescript
72
+ Bpmn.createProcess("orders")
73
+ .message("Msg_OrderReceived", { name: "Order Received" })
74
+ .error("Err_OutOfStock", { code: "OUT_OF_STOCK", name: "Out of stock" })
75
+ .signal("Sig_Cancelled", { name: "Order Cancelled" })
76
+ .escalation("Esc_Review", { code: "NEEDS_REVIEW" })
77
+ .startEvent("start", { messageName: "Order Received" }) // messageRef: Msg_OrderReceived
78
+ ```
79
+
80
+ Events still name these by name or code, exactly as before — the declaration only decides the id
81
+ they resolve to. Order matters: an event built first declares the definition itself, and
82
+ declaring it afterwards under a different id throws rather than leaving two definitions of one
83
+ message behind.
84
+
19
85
  ---
20
86
  Source: https://bpmnkit.com/docs/guides/building-processes
@@ -0,0 +1,12 @@
1
+ # Drop — Share & Co-edit
2
+
3
+ [BPMN Kit Drop](/drop) is the shortest path between a diagram on your machine and the
4
+ person who needs to look at it. Drag a file onto the page, get a short link back, send it.
5
+ Whoever opens the link sees the diagram rendered in their browser — no account, no modeler
6
+ install, and no Camunda cluster anywhere in the story.
7
+
8
+ It is also where a review happens. A drop is not frozen: anyone with the link can take the
9
+ edit baton, change the diagram, and everyone else watching sees the change arrive.
10
+
11
+ ---
12
+ Source: https://bpmnkit.com/docs/guides/drop
@@ -0,0 +1,45 @@
1
+ # Drop — Share & Co-edit — Reviewing it together
2
+
3
+ Everything below happens on the share page itself — there is nothing to install on either
4
+ end.
5
+
6
+ **Live presence.** The topbar counts the people who have the drop open, and says when one
7
+ of them is editing. A diagram moving under a reader's eyes is only unsettling when nothing
8
+ on the page explains it.
9
+
10
+ **One writer at a time.** Editing is a baton, not a merge. Press **Edit** to claim it and
11
+ the diagram becomes editable for you and stays live for everyone else; press **Done** to
12
+ hand it back. A second person pressing Edit while you hold it is told who has it. There is
13
+ no conflict resolution because there is never a second writer to conflict with.
14
+
15
+ **No save button.** Changes persist as you make them, so there is no moment at which a
16
+ reviewer can lose work by closing the tab — and none at which they can be asked whether
17
+ they meant it. That is what makes the version log below load-bearing rather than a nicety.
18
+
19
+ **Version history.** Every file keeps the original it was uploaded as, pinned and never
20
+ overwritten, plus its ten most recent milestones. Repeated saves inside an hour collapse
21
+ into one milestone, and a new editing session always starts its own, so a stranger editing
22
+ at 10:45 cannot overwrite the previous editor's 10:30 state. Restoring **appends**: the
23
+ state being replaced becomes a milestone first, so restoring can never be the thing that
24
+ loses work. Undoing a restore is another restore.
25
+
26
+ **Visual diff.** Two drops can be put side by side at `/drop/<before>/diff/<after>`: added,
27
+ removed, changed and *moved* elements marked on synchronised canvases, with pan and zoom
28
+ locked together. The same diff is available offline as
29
+ [`casen diff bpmn`](/docs/cli/diff) and as a plugin in `@bpmnkit/plugins`.
30
+
31
+ Editing is limited to BPMN files with a single process — the editor handles one process at
32
+ a time — and the built-in demo drop is read-only, though **Edit a copy** will upload it as a
33
+ drop of your own.
34
+
35
+ ### Rate limiting the edit baton
36
+
37
+ Because a drop is editable by anyone holding the link, claiming the baton can be put behind
38
+ a [Turnstile](https://developers.cloudflare.com/turnstile/) challenge — one challenge per
39
+ editing session, not per keystroke. It is invisible to somebody who takes the baton once and
40
+ edits for half an hour, and a real cost to a script that wants to rewrite every drop it can
41
+ find. On a self-hosted deployment it is configuration (`TURNSTILE_SITE_KEY` and
42
+ `TURNSTILE_SECRET`); with neither set, claims are not challenged.
43
+
44
+ ---
45
+ Source: https://bpmnkit.com/docs/guides/drop
@@ -0,0 +1,21 @@
1
+ # Drop — Share & Co-edit — Running your own
2
+
3
+ Drop is a single Cloudflare Worker in the monorepo (`apps/drop`), MIT-licensed like
4
+ everything else. Files live in D1 as the typed `@bpmnkit/core` model alongside the
5
+ byte-faithful original; presence and live editing are a Durable Object per share.
6
+
7
+ ```sh
8
+ pnpm --filter @bpmnkit/drop build
9
+ wrangler d1 migrations apply bpmnkit-drop --local
10
+ wrangler dev --local --port 8787 \
11
+ --var DROP_ADMIN_TOKEN:devtoken --var REPORT_IP_SALT:devsalt
12
+ ```
13
+
14
+ That runs the Worker, D1 and the Durable Object in a local simulator, so the whole app works
15
+ offline with no Cloudflare account. For a real deployment,
16
+ `pnpm --filter @bpmnkit/drop provision` is an idempotent script that creates the database,
17
+ applies the migrations, builds the client bundles and deploys the Worker; re-running it
18
+ skips whatever is already in place. See `apps/drop/DEPLOY.md` for the full runbook.
19
+
20
+ ---
21
+ Source: https://bpmnkit.com/docs/guides/drop
@@ -0,0 +1,42 @@
1
+ # Drop — Share & Co-edit — Sharing a file
2
+
3
+ Open <https://bpmnkit.com/drop> and drop a file onto the page — the whole page is the
4
+ target — or paste one from the clipboard. `.bpmn`, `.dmn` and `.form` are all rendered;
5
+ `.xml` and `.json` are accepted and sniffed for the kinds above.
6
+
7
+ | Limit | Value |
8
+ | --- | --- |
9
+ | Files per drop | 20 |
10
+ | Size of a single file | 900 KB |
11
+ | Total per drop | 5 MB |
12
+ | Retention | 90 days after the last view or edit |
13
+
14
+ The share id is 11 base58 characters — about 64 bits, so a drop is unguessable and
15
+ unlistable, but it is **not** access-controlled: anyone holding the link can view the
16
+ diagram and take a turn editing it. Treat a drop the way you would treat an unlisted link,
17
+ not the way you would treat a private repository.
18
+
19
+ You can also start a drop from a diagram you just drew rather than a file you already had:
20
+ the [browser editor](/editor) has **Share as a drop** in its main menu, which uploads the
21
+ open diagram through the same endpoint and the same checks.
22
+
23
+ ### From the command line
24
+
25
+ A drop is a plain HTTP upload, so `curl` works:
26
+
27
+ ```sh
28
+ curl -s -X POST https://bpmnkit.com/drop/api/drops \
29
+ -F files=@order-process.bpmn
30
+ # → { "shareId": "7Fq2mKd9xTs", "url": "https://bpmnkit.com/drop/7Fq2mKd9xTs", "files": [...] }
31
+ ```
32
+
33
+ And the stored file comes back either as uploaded or as the parsed model:
34
+
35
+ ```sh
36
+ curl -s https://bpmnkit.com/drop/<shareId>/manifest.json
37
+ curl -s "https://bpmnkit.com/drop/<shareId>/f/order-process.bpmn" # original bytes
38
+ curl -s "https://bpmnkit.com/drop/<shareId>/f/order-process.bpmn?format=json" # @bpmnkit/core model
39
+ ```
40
+
41
+ ---
42
+ Source: https://bpmnkit.com/docs/guides/drop
@@ -0,0 +1,12 @@
1
+ # Drop — Share & Co-edit — What Drop is not
2
+
3
+ - **Not a permission system.** Link-holders are editors. If a diagram should not be
4
+ editable by whoever it reaches, do not put it in a drop.
5
+ - **Not storage.** A drop expires 90 days after it was last touched, and the version log
6
+ holds eleven states, not every state.
7
+ - **Not a modeler.** It renders and edits one process at a time. For authoring, use the
8
+ [browser editor](/editor), the [VS Code extension](/docs/guides/vscode) or the
9
+ [builder API](/docs/packages/core).
10
+
11
+ ---
12
+ Source: https://bpmnkit.com/docs/guides/drop
@@ -0,0 +1,14 @@
1
+ # VS Code Extension — Commands
2
+
3
+ | Command | Where |
4
+ | --- | --- |
5
+ | **BPMN Kit: Open Diagram to the Side** | Editor title bar, command palette |
6
+ | **BPMN Kit: Compare Diagram with HEAD** | Source Control context menu, editor title bar |
7
+ | **BPMN Kit: Compare Diagrams Visually** | Explorer, with exactly two `.bpmn` files selected |
8
+ | **BPMN Kit: Open FEEL Playground** | Command palette — pre-filled from the selection |
9
+ | **BPMN Kit: Copy Diagram as ASCII** | Editor title bar, Explorer, command palette |
10
+ | **BPMN Kit: Deploy to Camunda 8** | Command palette |
11
+ | **BPMN Kit: Deploy and Start Instance** | Explorer, command palette |
12
+
13
+ ---
14
+ Source: https://bpmnkit.com/docs/guides/vscode
@@ -0,0 +1,22 @@
1
+ # VS Code Extension — Installing
2
+
3
+ The extension is **pre-1.0 and not on the Marketplace yet** — it is built from the monorepo
4
+ and ships when the packages it is built from do:
5
+
6
+ ```sh
7
+ git clone https://github.com/bpmnkit/monorepo
8
+ cd monorepo && pnpm install
9
+ pnpm --filter bpmnkit build
10
+ pnpm --filter bpmnkit package # → apps/vscode/bpmnkit.vsix
11
+ ```
12
+
13
+ Then install the `.vsix`: **Extensions → … → Install from VSIX…**, or
14
+
15
+ ```sh
16
+ code --install-extension apps/vscode/bpmnkit.vsix
17
+ ```
18
+
19
+ It activates on a workspace containing a `.bpmn` file, and requires VS Code 1.90 or newer.
20
+
21
+ ---
22
+ Source: https://bpmnkit.com/docs/guides/vscode
@@ -0,0 +1,13 @@
1
+ # VS Code Extension
2
+
3
+ **BPMN Kit for VS Code** puts the toolkit where the code already is. It renders `.bpmn`,
4
+ `.dmn` and `.form` files, reports the same findings `casen lint` reports, compares a diagram
5
+ against `HEAD`, runs the process without a cluster, and edits the file without reformatting
6
+ it.
7
+
8
+ The renderer is [`@bpmnkit/canvas`](/docs/packages/canvas), the same from-scratch BPMN 2.0
9
+ implementation the website and the browser editor use. There is no bpmn.io anywhere in the
10
+ extension, which is the point: the files it shows you are the files git has, byte for byte.
11
+
12
+ ---
13
+ Source: https://bpmnkit.com/docs/guides/vscode
@@ -0,0 +1,19 @@
1
+ # VS Code Extension — Settings
2
+
3
+ | Setting | Default | What it does |
4
+ | --- | --- | --- |
5
+ | `bpmnkit.lint.enabled` | `true` | Report findings in the Problems panel |
6
+ | `bpmnkit.lint.run` | `onType` | `onType` or `onSave` |
7
+ | `bpmnkit.lint.forceEngineRules` | `false` | Apply Camunda 8 rules to an engine-neutral diagram |
8
+ | `bpmnkit.viewer.grid` | `true` | Dot grid behind the diagram |
9
+ | `bpmnkit.viewer.minimap` | `true` | Minimap in the BPMN viewer |
10
+ | `bpmnkit.simulation.enabled` | `true` | Offer step-through simulation in the preview |
11
+ | `bpmnkit.editing.enabled` | `true` | Let the diagram editor change the file |
12
+
13
+ Findings are reported for `.bpmn` files that are open; a file the editor has not loaded is
14
+ not analysed, same as every other linter in VS Code. Set `bpmnkit.editing.enabled` to `false`
15
+ for the same editors with editing switched off, when a diagram should be openable with no
16
+ chance of changing it.
17
+
18
+ ---
19
+ Source: https://bpmnkit.com/docs/guides/vscode
@@ -0,0 +1,11 @@
1
+ # VS Code Extension — Support
2
+
3
+ The extension is pre-1.0 and community-supported, developed in the open in the
4
+ [monorepo](https://github.com/bpmnkit/monorepo) alongside the packages it is built from.
5
+ Minor versions may change behaviour before 1.0: the features above will not disappear, but
6
+ setting names and command titles may still move. Bugs and requests go to
7
+ [GitHub issues](https://github.com/bpmnkit/monorepo/issues). MIT-licensed, like everything
8
+ else in the repository.
9
+
10
+ ---
11
+ Source: https://bpmnkit.com/docs/guides/vscode
@@ -0,0 +1,8 @@
1
+ # VS Code Extension — What it does — A FEEL playground on your selection
2
+
3
+ Select an expression anywhere in the XML and open the playground: it comes up pre-filled,
4
+ with a context you can edit and the result evaluated as you type. Unary tests too, for
5
+ decision-table input entries.
6
+
7
+ ---
8
+ Source: https://bpmnkit.com/docs/guides/vscode
@@ -0,0 +1,11 @@
1
+ # VS Code Extension — What it does — A visual diff in Source Control
2
+
3
+ Right-click a `.bpmn` file in Source Control to see it against `HEAD`, or select exactly two
4
+ in the Explorer to compare them with each other. Added, removed, changed and moved elements
5
+ are marked on synchronised canvases — a moved element reads as *moved*, not as two unrelated
6
+ pictures. The text diff stays where it was; this is a second view of the same change, not a
7
+ replacement for the first. The same comparison is available as
8
+ [`casen diff bpmn`](/docs/cli/diff) and on a [drop](/docs/guides/drop).
9
+
10
+ ---
11
+ Source: https://bpmnkit.com/docs/guides/vscode
@@ -0,0 +1,8 @@
1
+ # VS Code Extension — What it does — Copy the diagram as text
2
+
3
+ For a code review, where a picture cannot go. **BPMN Kit: Copy Diagram as ASCII** renders the
4
+ layout into a fenced block that pastes into a pull request, an issue or a commit message,
5
+ dedented so the diagram is not mostly margin.
6
+
7
+ ---
8
+ Source: https://bpmnkit.com/docs/guides/vscode
@@ -0,0 +1,21 @@
1
+ # VS Code Extension — What it does — Deploy against your own clusters
2
+
3
+ Deployment targets come from `casen`'s profile store — the same file
4
+ [`casen profile create`](/docs/cli/casen#connection-profiles) writes — so there is no second
5
+ place to configure a cluster and no credentials in your workspace settings:
6
+
7
+ ```sh
8
+ casen profile create staging --base-url https://<cluster>.camunda.io/<id> \
9
+ --auth-type oauth --client-id … --client-secret …
10
+ ```
11
+
12
+ Every `c8` profile then appears in the extension. Deploy the open file, or deploy and start
13
+ an instance with variables; the instance key comes back in a notification. Deploy-and-start
14
+ also offers the payloads it finds in `.camunda/payloads/*.json`, walking up from the diagram,
15
+ so the inputs a process is always tried with are a pick rather than a paste.
16
+
17
+ Credentials are read only to sign the request — nothing in the extension stores, displays or
18
+ logs them.
19
+
20
+ ---
21
+ Source: https://bpmnkit.com/docs/guides/vscode
@@ -0,0 +1,22 @@
1
+ # VS Code Extension — What it does — Editing that leaves a readable diff
2
+
3
+ The diagram editor is a **text** custom editor: it edits the same `TextDocument` a text
4
+ editor would open. The file is dirty when the document is, <kbd>Ctrl</kbd>+<kbd>S</kbd>
5
+ saves it, hot exit restores it, undo is the editor's own undo, and a text editor open on the
6
+ same file is a second view of one document rather than a competing copy. Type in the XML and
7
+ the diagram follows; move a box and the XML follows.
8
+
9
+ Saving writes a diff a reviewer can read. A visual editor normally serialises the whole
10
+ model, which reformats the file on the first change and buries one edit in a rewrite of
11
+ everything. This one writes the file that was already there: renaming a task changes the
12
+ line with the task on it, moving a box changes two numbers, and your indentation, attribute
13
+ order and comments come back untouched. Opening a diagram and saving it without editing
14
+ anything leaves the file byte for byte. Form files get the same treatment — indentation, key
15
+ order and trailing newline all survive.
16
+
17
+ That behaviour is not extension-specific; it is
18
+ [`exportPreserving()`](/docs/packages/core#exportpreservingoriginal-definitions) from
19
+ `@bpmnkit/core`, available to anything that writes a model back over a file it parsed.
20
+
21
+ ---
22
+ Source: https://bpmnkit.com/docs/guides/vscode
@@ -0,0 +1,13 @@
1
+ # VS Code Extension — What it does — Findings in the Problems panel
2
+
3
+ The same static analysis `casen lint` runs — flow reachability, naming, FEEL syntax, data
4
+ flow, Camunda 8 deployability — reported against the element that caused it, so clicking a
5
+ problem takes you to the tag rather than to line 1.
6
+
7
+ The analysis matches the file. A diagram that declares no `modeler:executionPlatform` is not
8
+ judged against Camunda 8 deployability, because "this service task has no
9
+ `zeebe:taskDefinition`" is not a defect in a diagram that was never going to be deployed to
10
+ Zeebe. Turn on `bpmnkit.lint.forceEngineRules` to apply those rules anyway.
11
+
12
+ ---
13
+ Source: https://bpmnkit.com/docs/guides/vscode
@@ -0,0 +1,12 @@
1
+ # VS Code Extension — What it does — Preview beside the source
2
+
3
+ `.bpmn`, `.dmn` and `.form` all render, with a minimap and zoom for BPMN. The preview
4
+ follows the buffer as you type rather than on save, and when the XML is momentarily
5
+ unparseable it keeps the last drawing that worked rather than blanking.
6
+
7
+ The text editor stays the default for all three file types. Open the diagram with
8
+ **BPMN Kit: Open Diagram to the Side**, with *Reopen Editor With…*, or make it your default
9
+ through `workbench.editorAssociations`.
10
+
11
+ ---
12
+ Source: https://bpmnkit.com/docs/guides/vscode
@@ -0,0 +1,9 @@
1
+ # VS Code Extension — What it does — Run the diagram in the editor
2
+
3
+ [`@bpmnkit/engine`](/docs/packages/engine) is a BPMN engine written in TypeScript, so the
4
+ preview does not need a cluster to execute what is on screen. Press **Run** and watch tokens
5
+ move; press **One Step** to advance the instance one element at a time, reading the variables
6
+ as they change. Nothing is deployed and nothing leaves your machine.
7
+
8
+ ---
9
+ Source: https://bpmnkit.com/docs/guides/vscode
@@ -0,0 +1,42 @@
1
+ # @bpmnkit/core — Installation — Ad-hoc sub-processes: children are a set, not a chain
2
+
3
+ Sequential calls in a builder chain auto-connect with sequence flows. Inside
4
+ `.adHocSubProcess()` they do not: BPMN defines an ad-hoc sub-process's children as an unordered
5
+ set of independently-invocable activities, and Camunda 8's agentic AI runtime reads that
6
+ structurally — a child *without* an incoming flow is an LLM-invocable tool, a child *with* one
7
+ is part of an internal sub-flow and not a tool at all.
8
+
9
+ ```typescript
10
+ .adHocSubProcess("agent", (s) => {
11
+ s.serviceTask("listUsers", { taskType: "io.camunda:http-json:1" });
12
+ s.serviceTask("loadUser", { taskType: "io.camunda:http-json:1" });
13
+ s.serviceTask("createUser", { taskType: "io.camunda:http-json:1" });
14
+ }, { name: "Handle request" })
15
+ // → three tools, no sequence flows, no <bpmndi:BPMNEdge> between them
16
+ ```
17
+
18
+ Auto-chaining them produced a file that lints clean and deploys, while the agent saw one tool
19
+ and a two-step sub-flow — so the default is off rather than opt-out.
20
+
21
+ An internal sub-flow inside the container stays expressible: say so with `.connectTo()`, which
22
+ still creates a flow from the cursor.
23
+
24
+ ```typescript
25
+ .adHocSubProcess("agent", (s) => {
26
+ s.serviceTask("listUsers", { taskType: "io.camunda:http-json:1" }); // a tool
27
+ s.serviceTask("step1", { taskType: "work" }).connectTo("step2"); // an internal sub-flow
28
+ s.serviceTask("step2", { taskType: "work" });
29
+ })
30
+ ```
31
+
32
+ Each child's LLM-facing description is its `documentation`, which every builder method accepts:
33
+
34
+ ```typescript
35
+ s.serviceTask("listUsers", {
36
+ taskType: "io.camunda:http-json:1",
37
+ documentation: "Call this to retrieve all users. Returns id, name, email.",
38
+ });
39
+ ```
40
+
41
+ ---
42
+ Source: https://bpmnkit.com/docs/packages/core
@@ -1,10 +1,15 @@
1
1
  # @bpmnkit/core — Installation — `compactify(definitions)`
2
2
 
3
3
  Projects a `BpmnDefinitions` object onto a `CompactDiagram` — a small JSON object suitable
4
- for LLM prompts. **Lossy:** it keeps topology, names and the common Zeebe bindings, and drops
5
- collaborations, participants, message flows, lanes, data stores, artifacts, root-level
6
- messages and errors, multi-instance loop characteristics, full `zeebe:ioMapping` entries and
7
- diagram interchange.
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.
8
13
 
9
14
  ```typescript
10
15
  import { compactify } from "@bpmnkit/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,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,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