@camunda8/orchestration-cluster-api 10.0.0-alpha.3 → 10.0.0-alpha.31

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/CHANGELOG.md CHANGED
@@ -1,3 +1,245 @@
1
+ # [10.0.0-alpha.31](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.30...v10.0.0-alpha.31) (2026-08-20)
2
+
3
+
4
+ ### Features
5
+
6
+ * **effect:** first-class Effect v4 surface, clean cut from experimental /fp ([#440](https://github.com/camunda/orchestration-cluster-api-js/issues/440)) ([04d2bd1](https://github.com/camunda/orchestration-cluster-api-js/commit/04d2bd1452e9196fb337deb2ecf50b3c5d179bf4)), closes [#437](https://github.com/camunda/orchestration-cluster-api-js/issues/437) [#437](https://github.com/camunda/orchestration-cluster-api-js/issues/437)
7
+
8
+
9
+ ### BREAKING CHANGES
10
+
11
+ * **effect:** the experimental `/fp` subpath and its `fp-ts` optional peer are
12
+ removed. Migrate to `./effect` and install the optional `effect` (v4) peer; the
13
+ main `.` entry and its Promise-based API are unchanged.
14
+
15
+ # [10.0.0-alpha.30](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.29...v10.0.0-alpha.30) (2026-08-20)
16
+
17
+
18
+ ### Features
19
+
20
+ * **examples:** add coverage for 7 cluster-admin backup/exporting ops ([#442](https://github.com/camunda/orchestration-cluster-api-js/issues/442)) ([fdc805d](https://github.com/camunda/orchestration-cluster-api-js/commit/fdc805d2877e02b3cb7c89038e05ac9325d76c6a)), closes [#429](https://github.com/camunda/orchestration-cluster-api-js/issues/429) [#441](https://github.com/camunda/orchestration-cluster-api-js/issues/441)
21
+
22
+ # [10.0.0-alpha.29](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.28...v10.0.0-alpha.29) (2026-08-18)
23
+
24
+
25
+ ### Features
26
+
27
+ * add example coverage for restoreAsClusterAdmin, getClusterTopology ([#433](https://github.com/camunda/orchestration-cluster-api-js/issues/433)) ([fab79dc](https://github.com/camunda/orchestration-cluster-api-js/commit/fab79dc97b29c9dcc0c95f30833c832c690a0d6a)), closes [#432](https://github.com/camunda/orchestration-cluster-api-js/issues/432)
28
+
29
+ # [10.0.0-alpha.28](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.27...v10.0.0-alpha.28) (2026-08-14)
30
+
31
+
32
+ ### Bug Fixes
33
+
34
+ * **examples:** group plannedChanges by physical tenant ([d494ce7](https://github.com/camunda/orchestration-cluster-api-js/commit/d494ce716fa83a6ef4d406dd77d9e0ffc0797f35))
35
+ * **examples:** group plannedChanges by physical tenant ([525c176](https://github.com/camunda/orchestration-cluster-api-js/commit/525c1760c6f9fe6f7ef0efb06fd6eefa95f2cc8d))
36
+
37
+
38
+ ### Features
39
+
40
+ * **examples:** add cluster admin and history backup example coverage ([185071c](https://github.com/camunda/orchestration-cluster-api-js/commit/185071c9a62eb7d8cf24f903ca36d66342c4e2bf))
41
+
42
+ # [10.0.0-alpha.27](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.26...v10.0.0-alpha.27) (2026-08-12)
43
+
44
+
45
+ ### Bug Fixes
46
+
47
+ * mark agent-definition test scaffolds as todo with void unused local ([5ec2940](https://github.com/camunda/orchestration-cluster-api-js/commit/5ec2940b008314794b3f2a2263fa5f57d07a1ca8))
48
+ * use it.skip instead of it.todo with a callback in test scaffolds ([f96e189](https://github.com/camunda/orchestration-cluster-api-js/commit/f96e189710b86fe4ecc414803d1bed507a89626f))
49
+
50
+
51
+ ### Features
52
+
53
+ * add example coverage for getAgentDefinition, searchAgentDefinitions ([e596713](https://github.com/camunda/orchestration-cluster-api-js/commit/e5967130f963939762d6ccf7508fac94e0c2fe76))
54
+ * **examples:** add agent definition examples for getAgentDefinition and searchAgentDefinitions ([d613ac1](https://github.com/camunda/orchestration-cluster-api-js/commit/d613ac1069dbb253c6a91f900cb39ee94cef1eb7))
55
+
56
+ # [10.0.0-alpha.26](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.25...v10.0.0-alpha.26) (2026-08-10)
57
+
58
+
59
+ ### Features
60
+
61
+ * **examples:** add searchOwnAuthorizations example coverage ([a3749c3](https://github.com/camunda/orchestration-cluster-api-js/commit/a3749c392e725957ad22d7627b2161a6a4866165))
62
+
63
+ # [10.0.0-alpha.25](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.24...v10.0.0-alpha.25) (2026-08-04)
64
+
65
+
66
+ ### Bug Fixes
67
+
68
+ * **runtime:** back off job-worker activation retries on transport errors ([#411](https://github.com/camunda/orchestration-cluster-api-js/issues/411)) ([bccaabe](https://github.com/camunda/orchestration-cluster-api-js/commit/bccaabeffc995b30fcb83488538928e57c8de953))
69
+
70
+ # [10.0.0-alpha.24](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.23...v10.0.0-alpha.24) (2026-08-04)
71
+
72
+
73
+ ### Bug Fixes
74
+
75
+ * **client:** reject transport errors regardless of throwOnError ([c1df143](https://github.com/camunda/orchestration-cluster-api-js/commit/c1df143fb001e7b2fb3e928c9c218e52b400a5e1)), closes [#405](https://github.com/camunda/orchestration-cluster-api-js/issues/405)
76
+ * remaining regressions from the @hey-api/openapi-ts 0.86.12 to 0.99.0 upgrade ([37d00cd](https://github.com/camunda/orchestration-cluster-api-js/commit/37d00cd8211af5938fb1ed5ae3320fe25b837a68))
77
+ * **types:** restore discriminators on JobResult and runtime instructions ([dcdf450](https://github.com/camunda/orchestration-cluster-api-js/commit/dcdf450a9ad6182ee6afdd5d5d12ab68b4a19253)), closes [#405](https://github.com/camunda/orchestration-cluster-api-js/issues/405)
78
+ * **validation:** validate path and query params, not just the request body ([5bc2c56](https://github.com/camunda/orchestration-cluster-api-js/commit/5bc2c56d92508cebef7bb43e04494d2f3972679e)), closes [#405](https://github.com/camunda/orchestration-cluster-api-js/issues/405)
79
+
80
+ # [10.0.0-alpha.23](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.22...v10.0.0-alpha.23) (2026-08-03)
81
+
82
+
83
+ ### Bug Fixes
84
+
85
+ * **ci:** align the agent verify gate with the CI gates ([957083c](https://github.com/camunda/orchestration-cluster-api-js/commit/957083c96e14ad9012a5514f59ef0e147a1a4eba))
86
+ * **ci:** fail closed when the verify gate is empty ([35c6f05](https://github.com/camunda/orchestration-cluster-api-js/commit/35c6f059b021a4f688795e21994c9d9bac18da7c))
87
+ * **ci:** stop interpolating the issue body into an unquoted heredoc ([631ee22](https://github.com/camunda/orchestration-cluster-api-js/commit/631ee22057402027b543fe91904c561f2826b303))
88
+ * **ci:** tell the agent which commands actually gate its work ([de6e466](https://github.com/camunda/orchestration-cluster-api-js/commit/de6e4661794c6e3e2d80a7cf72efba76098c13f2))
89
+
90
+ # [10.0.0-alpha.22](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.21...v10.0.0-alpha.22) (2026-08-02)
91
+
92
+
93
+ ### Bug Fixes
94
+
95
+ * **runtime:** reject transport errors instead of silently swallowing them ([#406](https://github.com/camunda/orchestration-cluster-api-js/issues/406)) ([3f84418](https://github.com/camunda/orchestration-cluster-api-js/commit/3f844183442649cfe2a8b8673e3c819b81337553)), closes [#405](https://github.com/camunda/orchestration-cluster-api-js/issues/405)
96
+
97
+ # [10.0.0-alpha.21](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.20...v10.0.0-alpha.21) (2026-08-02)
98
+
99
+
100
+ ### Bug Fixes
101
+
102
+ * **worker:** buffer start() until the transport is ready ([ad4d37f](https://github.com/camunda/orchestration-cluster-api-js/commit/ad4d37f6eeadffb89532af351bd80d404ffc2fde))
103
+ * **worker:** buffer start() until the transport is ready ([708b544](https://github.com/camunda/orchestration-cluster-api-js/commit/708b544f79ffec9ef9060de0dea21ac8ecb2b207)), closes [#401](https://github.com/camunda/orchestration-cluster-api-js/issues/401)
104
+
105
+ # [10.0.0-alpha.20](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.19...v10.0.0-alpha.20) (2026-08-02)
106
+
107
+
108
+ ### Bug Fixes
109
+
110
+ * **runtime:** keep node:worker_threads out of the public type surface ([685ee15](https://github.com/camunda/orchestration-cluster-api-js/commit/685ee15d86982251eb2c02ec3c01d809fc2eb9a9))
111
+
112
+ # [10.0.0-alpha.19](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.18...v10.0.0-alpha.19) (2026-07-31)
113
+
114
+
115
+ ### Features
116
+
117
+ * add example coverage for getClusterStatus, getRestoreStatus ([ef02297](https://github.com/camunda/orchestration-cluster-api-js/commit/ef02297ee69b1da3346457ff12bbc82c12785332))
118
+ * **examples:** add getClusterStatus and getRestoreStatus examples ([b633b00](https://github.com/camunda/orchestration-cluster-api-js/commit/b633b00f71c4960b5620c56bc109cb41c527213e))
119
+
120
+ # [10.0.0-alpha.18](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.17...v10.0.0-alpha.18) (2026-07-27)
121
+
122
+
123
+ ### Bug Fixes
124
+
125
+ * **gen:** derive semantic-key namespace helper types from alias primitive ([8889015](https://github.com/camunda/orchestration-cluster-api-js/commit/8889015ffc6ef4ec826c1379223ae5eb1465a8fd))
126
+ * **gen:** derive semantic-key namespace helper types from alias primitive ([db969a5](https://github.com/camunda/orchestration-cluster-api-js/commit/db969a51a1a334e0ed0cc2e63868aae161c08054))
127
+
128
+ # [10.0.0-alpha.17](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.16...v10.0.0-alpha.17) (2026-07-27)
129
+
130
+
131
+ ### Bug Fixes
132
+
133
+ * **gen:** forward-compatible generation for @hey-api/openapi-ts 0.97 ([ef36a46](https://github.com/camunda/orchestration-cluster-api-js/commit/ef36a4654eedb7bae905bd56a0b4854d6bbe7ebc))
134
+ * **gen:** forward-compatible generation for @hey-api/openapi-ts 0.97 ([47c7713](https://github.com/camunda/orchestration-cluster-api-js/commit/47c77131da1b51dffebd4745913252697169e5ff))
135
+
136
+ # [10.0.0-alpha.16](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.15...v10.0.0-alpha.16) (2026-07-27)
137
+
138
+
139
+ ### Bug Fixes
140
+
141
+ * **gen:** forward-compatible generation hooks for @hey-api/openapi-ts 0.96 ([2025d83](https://github.com/camunda/orchestration-cluster-api-js/commit/2025d8382d1a922c3bacd0ee946a57c551473270))
142
+ * **gen:** forward-compatible generation hooks for @hey-api/openapi-ts 0.96 ([cb1bddd](https://github.com/camunda/orchestration-cluster-api-js/commit/cb1bdddf72eb44abf35dcbc243fac19adbc52013))
143
+
144
+ # [10.0.0-alpha.15](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.14...v10.0.0-alpha.15) (2026-07-02)
145
+
146
+
147
+ ### Bug Fixes
148
+
149
+ * change default CAMUNDA_SDK_LOG_LEVEL from 'error' to 'info' ([839b7ab](https://github.com/camunda/orchestration-cluster-api-js/commit/839b7abb95fee0e7802980802aa1117b2473486c)), closes [#274](https://github.com/camunda/orchestration-cluster-api-js/issues/274)
150
+
151
+ # [10.0.0-alpha.14](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.13...v10.0.0-alpha.14) (2026-07-01)
152
+
153
+
154
+ ### Features
155
+
156
+ * add example coverage for getProcessInstanceWaitStateStatistics ([9fa53ca](https://github.com/camunda/orchestration-cluster-api-js/commit/9fa53ca512a266ed29b23ceec6ccc9199240e4c8)), closes [camunda/orchestration-cluster-api-js#300](https://github.com/camunda/orchestration-cluster-api-js/issues/300)
157
+
158
+ # [10.0.0-alpha.13](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.12...v10.0.0-alpha.13) (2026-06-28)
159
+
160
+
161
+ ### Bug Fixes
162
+
163
+ * **client:** make generated fetch client work on Deno and Bun ([9260000](https://github.com/camunda/orchestration-cluster-api-js/commit/92600004f344a41d7ea5a5158484a98a440c2be3))
164
+ * **client:** sanitize SSE onRequest init and harden the compat hook ([12eff25](https://github.com/camunda/orchestration-cluster-api-js/commit/12eff25fadac6ce45ca28f2c469ccdeb878bf98d))
165
+
166
+ # [10.0.0-alpha.12](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.11...v10.0.0-alpha.12) (2026-06-18)
167
+
168
+
169
+ ### Features
170
+
171
+ * regenerate src/gen for wait-state details union and job priority-updated state ([e0e8c8c](https://github.com/camunda/orchestration-cluster-api-js/commit/e0e8c8c7e30b88799ec17f1c061a21241648ee7d))
172
+ * regenerate src/gen for wait-state details union and job priority-updated state ([76c5f82](https://github.com/camunda/orchestration-cluster-api-js/commit/76c5f829efcf826ff180e3116c4bbf303254c2b6))
173
+
174
+ # [10.0.0-alpha.11](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.10...v10.0.0-alpha.11) (2026-06-11)
175
+
176
+
177
+ ### Bug Fixes
178
+
179
+ * adopt upstream wait-state details union in example ([8f8603c](https://github.com/camunda/orchestration-cluster-api-js/commit/8f8603cd1ed445ab8062c15d525598a5c36084d4))
180
+ * adopt upstream wait-state details union in example ([07ed89c](https://github.com/camunda/orchestration-cluster-api-js/commit/07ed89c0eb2db17f7979ebd57c88983f8561a137))
181
+
182
+ # [10.0.0-alpha.10](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.9...v10.0.0-alpha.10) (2026-06-09)
183
+
184
+
185
+ ### Bug Fixes
186
+
187
+ * apply eventual consistency only to first searchVariablesAsDto search ([29387b0](https://github.com/camunda/orchestration-cluster-api-js/commit/29387b0b478e0c9a4d1dd0eaaf82c0481be5ddd8))
188
+ * **deps:** bump camunda-schema-bundler to 2.4.3 for IterationId generation ([16a7c5d](https://github.com/camunda/orchestration-cluster-api-js/commit/16a7c5ddccc52b60b0dab3efc6048daaba687013))
189
+ * **deps:** bump camunda-schema-bundler to 2.4.3 for IterationId generation ([8a8cdae](https://github.com/camunda/orchestration-cluster-api-js/commit/8a8cdae5fe9327a991e9670e4aeb50c6d8591356))
190
+ * wait for all declared variables at the collection level for searchVariablesAsDto ([ba2f911](https://github.com/camunda/orchestration-cluster-api-js/commit/ba2f911e1d6254d25ac68c3ebfaa690ef0d9067a))
191
+
192
+
193
+ ### Features
194
+
195
+ * add searchVariablesAsDto for DTO-driven typed variable maps ([52a544f](https://github.com/camunda/orchestration-cluster-api-js/commit/52a544fcc37f7ecc86fcfa153859baf6cf653b9b))
196
+ * add searchVariablesAsDto for DTO-driven typed variable maps ([67418f2](https://github.com/camunda/orchestration-cluster-api-js/commit/67418f2f9ccbdc8b535b82cb8a66ec77b66143e0))
197
+
198
+ # [10.0.0-alpha.9](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.8...v10.0.0-alpha.9) (2026-06-04)
199
+
200
+
201
+ ### Bug Fixes
202
+
203
+ * pass author-association to community notification workflow ([82e7f6e](https://github.com/camunda/orchestration-cluster-api-js/commit/82e7f6e5b34c60d122b93a302c84dda1fc28f6f9))
204
+
205
+ # [10.0.0-alpha.8](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.7...v10.0.0-alpha.8) (2026-06-04)
206
+
207
+
208
+ ### Features
209
+
210
+ * add Slack notifications for release failures and community events ([051e782](https://github.com/camunda/orchestration-cluster-api-js/commit/051e78230ce2a2eeda53bdc604a99a783e4b5caa))
211
+ * add Slack notifications for release failures and community events ([2981264](https://github.com/camunda/orchestration-cluster-api-js/commit/29812649034d2e961d65a7a80bd8bb2590e77dc1))
212
+
213
+ # [10.0.0-alpha.7](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.6...v10.0.0-alpha.7) (2026-05-18)
214
+
215
+
216
+ ### Bug Fixes
217
+
218
+ * update docker-compose env vars for 8.10 config schema ([d343d56](https://github.com/camunda/orchestration-cluster-api-js/commit/d343d56a54d6b83246e3a2b26b6ce2469c2de77c))
219
+
220
+ # [10.0.0-alpha.6](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.5...v10.0.0-alpha.6) (2026-05-13)
221
+
222
+
223
+ ### Features
224
+
225
+ * add example coverage for 4 new operations ([3a2c875](https://github.com/camunda/orchestration-cluster-api-js/commit/3a2c87577bcca87996cc77546216c68fb5124ec5))
226
+ * add example coverage for 4 new operations ([6d757a4](https://github.com/camunda/orchestration-cluster-api-js/commit/6d757a4be85ba733f07bcd08c1b6ae33aacd6c15))
227
+
228
+ # [10.0.0-alpha.5](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.4...v10.0.0-alpha.5) (2026-05-08)
229
+
230
+
231
+ ### Features
232
+
233
+ * add agent instance example coverage ([8a0072d](https://github.com/camunda/orchestration-cluster-api-js/commit/8a0072d03cf426ea895863d7cbdd87178c2e7e2f))
234
+ * v10 migration — bundler 2.4.1, branded type examples, README ([dd4a714](https://github.com/camunda/orchestration-cluster-api-js/commit/dd4a7149682b89d1f8f9c0f627dfef5645b10ea7)), closes [#203](https://github.com/camunda/orchestration-cluster-api-js/issues/203) [#204](https://github.com/camunda/orchestration-cluster-api-js/issues/204)
235
+
236
+ # [10.0.0-alpha.4](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.3...v10.0.0-alpha.4) (2026-04-29)
237
+
238
+
239
+ ### Bug Fixes
240
+
241
+ * **gen:** apply CAMUNDA_DEFAULT_TENANT_ID to activateJobs tenantIds ([fb7c661](https://github.com/camunda/orchestration-cluster-api-js/commit/fb7c661ba1f24dcfcfd738c6e344df09a2e2c52d))
242
+
1
243
  # [10.0.0-alpha.3](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.2...v10.0.0-alpha.3) (2026-04-29)
2
244
 
3
245
 
package/README.md CHANGED
@@ -149,10 +149,51 @@ await camunda.createDeployment({
149
149
  });
150
150
  ```
151
151
 
152
- `TenantId.assumeExists()` validates the string against the tenant ID pattern and brands it at zero runtime cost. See [Branded Keys](#branded-keys) for more on this pattern.
152
+ `TenantId.assumeExists()` validates the string against the tenant ID pattern and returns a branded value. The branded value is just a string at runtime, but `assumeExists()` performs validation and can throw if the input is malformed. See [Branded Keys](#branded-keys) for more on this pattern.
153
153
 
154
154
  > **Tip**: If your tenant ID comes from a validated source (environment variable, config file), call `TenantId.assumeExists()` once at startup and pass the branded value throughout your application.
155
155
 
156
+ ## Migrating from 8.9
157
+
158
+ SDK 10.x (for Camunda 8.10) promotes several identifier and name fields from plain `string` to **branded types** via `CamundaKey<T>`. The wire format and runtime API are unchanged — branded values are still plain strings at runtime and are assignable anywhere a `string` is expected (template literals, logging, JSON serialization). Callers need to brand values using `.assumeExists()` (which performs validation) to satisfy the new types.
159
+
160
+ ### New branded types
161
+
162
+ | Brand | Used for |
163
+ |-------|----------|
164
+ | `RoleId` | Role identifiers |
165
+ | `GroupId` | Group identifiers |
166
+ | `ClientId` | OAuth client identifiers |
167
+ | `MappingRuleId` | Mapping-rule identifiers |
168
+ | `ClusterVariableName` | Cluster variable names |
169
+ | `AgentInstanceKey` | Agent-instance system keys |
170
+
171
+ ### Migration
172
+
173
+ <!-- snippet-source: examples/readme.ts | regions: V9ToV10Migration -->
174
+
175
+ ```ts
176
+ // v9 — plain strings were accepted
177
+ // await camunda.assignRoleToGroup({
178
+ // roleId: 'developer',
179
+ // groupId: 'engineering',
180
+ // });
181
+
182
+ // v10 — use the branded type helpers at the boundary
183
+ await camunda.assignRoleToGroup({
184
+ roleId: RoleId.assumeExists('developer'),
185
+ groupId: GroupId.assumeExists('engineering'),
186
+ });
187
+ ```
188
+
189
+ Each branded type has an `.assumeExists()` method that validates the string and returns the branded value. Validation runs at call time and can throw if the input is malformed, so call it once at the boundary (startup, config parsing, API response) and pass the branded value through your application. See [Branded Keys](#branded-keys) for more on this pattern.
190
+
191
+ ### What does NOT change
192
+
193
+ - The wire format is unchanged — all values are still strings on the wire.
194
+ - No method signatures changed name or arity.
195
+ - Branded values are assignable anywhere a `string` is expected (template literals, logging, JSON serialization), so existing string-handling code continues to work.
196
+
156
197
  ## Quick Start (Zero‑Config – Recommended)
157
198
 
158
199
  Keep configuration out of application code. Let the factory read `CAMUNDA_*` variables from the environment (12‑factor style). This makes rotation, secret management, and environment promotion safer & simpler.
@@ -576,6 +617,41 @@ Benchmark results against a single-node local cluster with multiple independent
576
617
 
577
618
  BALANCED wins 3 of 4 on pure throughput. The only scenario where LEGACY is faster is extreme overload (800 concurrent requests against a single broker) — and in that case LEGACY accumulates 44,505 errors vs BALANCED's 15,527. The default just works.
578
619
 
620
+ ## Typed Variable Map (DTO-driven search)
621
+
622
+ `searchVariablesAsDto` fetches process variables and binds them to a [Zod](https://zod.dev) schema that acts as the DTO. The schema's keys are the exact variable names to fetch, and its shape drives validation. Only the declared variables are queried (via a `name $in [...]` filter), so memory stays bound by the DTO shape rather than the total number of variables on the instance. Results are paged internally until every declared variable is found or the result set is exhausted.
623
+
624
+ The returned `VariableMap` offers two access modes:
625
+
626
+ - **Lenient** — `has(name)` / `get(name)` for defensive reads that never throw on missing variables.
627
+ - **Strict** — `validate()` returns a fully-typed object, or throws a `ZodError` when a required variable is missing or malformed.
628
+
629
+ If a declared variable is found at more than one scope (for example a local variable shadowing a process-level one), the search throws a `VariableScopeCollisionError` rather than silently picking one. Pass an explicit `scopeKey` to disambiguate.
630
+
631
+ <!-- snippet-source: examples/readme.ts | regions: ReadmeTypedVariables -->
632
+
633
+ ```ts
634
+ // The Zod schema is the DTO: its keys are the variable names to fetch, and its
635
+ // shape drives validation. Only these declared variables are queried, so memory
636
+ // stays bound by the DTO — not by the total number of variables on the instance.
637
+ const OrderVariables = z.object({
638
+ orderId: z.string(), // required
639
+ amount: z.number().optional(), // optional
640
+ });
641
+
642
+ const map = await camunda.searchVariablesAsDto(OrderVariables, { processInstanceKey });
643
+
644
+ // Lenient access: defensive reads that never throw on missing variables.
645
+ if (map.has('amount')) {
646
+ console.log('Amount:', map.get('amount'));
647
+ }
648
+
649
+ // Strict access: returns a fully-typed object, or throws a ZodError when a
650
+ // required variable is missing or malformed.
651
+ const order = map.validate(); // { orderId: string; amount?: number }
652
+ console.log('Order:', order.orderId);
653
+ ```
654
+
579
655
  ## Job Workers (Polling API)
580
656
 
581
657
  The SDK provides a lightweight polling job worker for service task job types using `createJobWorker`. It activates jobs in batches (respecting a concurrency limit), validates variables (optional), and offers action helpers on each job.
@@ -681,6 +757,7 @@ Example patterns:
681
757
  return job.complete({ variables: { processed: true } });
682
758
 
683
759
  // GOOD: No-arg completion example, sentinel stored for ultimate return
760
+ // biome-ignore lint/correctness/noUnreachable: intentional — showing multiple completion patterns
684
761
  const ack = await job.complete();
685
762
  // ...
686
763
  return ack;
@@ -1173,67 +1250,92 @@ Notes:
1173
1250
  - Cancellation classification runs first so aborted fetches are never downgraded to generic network errors.
1174
1251
  - Abort is immediate and idempotent; underlying fetch is signalled.
1175
1252
 
1176
- ## Functional (fp-ts style) Surface (Opt-In Subpath)
1253
+ ## Effect Surface (Opt-In Subpath)
1177
1254
 
1178
- @experimental - this feature is not guaranteed to be tested or stable.
1255
+ The main entry stays Promise-based and pulls in **zero** Effect at runtime. Opt in to a
1256
+ first-class [Effect](https://effect.website) surface — a client whose every method returns an
1257
+ `Effect`, tagged domain errors, and Effect-native combinators — by importing the dedicated
1258
+ `./effect` subpath.
1179
1259
 
1180
- > **Peer dependency:** `fp-ts` is an optional peer dependency. If you use real `fp-ts` functions
1181
- > (e.g. `pipe`, `TE.match`) alongside this subpath, install it separately:
1260
+ > **Peer dependency:** `effect` is an **optional peer dependency** (Effect **v4**). The `./effect`
1261
+ > subpath requires it; install it alongside the SDK:
1182
1262
  > ```sh
1183
- > npm install fp-ts
1263
+ > npm install effect
1184
1264
  > ```
1185
- > The `/fp` subpath works without `fp-ts` installed it exposes structurally-compatible
1186
- > `Either`/`TaskEither` shapes that interoperate with `fp-ts` but do not require it at runtime.
1187
-
1188
- The main entry stays minimal. To opt in to a TaskEither-style facade & helper combinators import from the dedicated subpath:
1265
+ > The main `.` entry never imports `effect`, so Promise-first users are never forced to adopt it.
1266
+ >
1267
+ > **Module resolution:** Effect v4 ships as an `exports`-map-only package (no legacy
1268
+ > `main`/`types`), so consuming the `./effect` types requires a modern TypeScript module
1269
+ > resolution — set `"moduleResolution": "bundler"` (or `"node16"`/`"nodenext"`) in your
1270
+ > `tsconfig.json`. The Promise-first `.` entry is unaffected.
1189
1271
 
1190
- <!-- snippet-exempt: uses SDK /fp subpath not available in examples project -->
1272
+ <!-- snippet-exempt: uses SDK /effect subpath + optional effect peer not available in examples project -->
1191
1273
  ```ts
1274
+ import { Effect } from 'effect';
1192
1275
  import {
1193
- createCamundaFpClient,
1194
- retryTE,
1195
- withTimeoutTE,
1196
- eventuallyTE,
1197
- isLeft,
1198
- } from '@camunda8/orchestration-cluster-api/fp';
1199
-
1200
- const fp = createCamundaFpClient();
1201
- const deployTE = fp.deployResourcesFromFiles(['./bpmn/process.bpmn']);
1202
- const deployed = await deployTE();
1203
- if (isLeft(deployed)) throw deployed.left; // DomainError union
1276
+ createCamundaEffectClient,
1277
+ eventually,
1278
+ EventualConsistencyTimeout,
1279
+ } from '@camunda8/orchestration-cluster-api/effect';
1280
+
1281
+ const camunda = createCamundaEffectClient();
1282
+
1283
+ const program = Effect.gen(function* () {
1284
+ const deployment = yield* camunda.deployResourcesFromFiles(['./bpmn/process.bpmn']);
1285
+ const { processInstanceKey } = yield* camunda.createProcessInstance({
1286
+ processDefinitionKey: deployment.processes[0].processDefinitionKey,
1287
+ });
1288
+ // Poll on the Effect Clock until the instance is searchable, timing out deterministically.
1289
+ // waitUpToMs: 0 asks the SDK for the latest available state without its own wall-clock
1290
+ // wait, so the Effect `eventually` combinator owns the predicate + timeout horizon —
1291
+ // making the eventual-consistency wait deterministic under TestClock.
1292
+ const search = yield* eventually(
1293
+ camunda.searchProcessInstances(
1294
+ { filter: { processInstanceKey } },
1295
+ { consistency: { waitUpToMs: 0 } }
1296
+ ),
1297
+ (s) => s.items.some((i) => i.processInstanceKey === processInstanceKey),
1298
+ { waitUpTo: '30 seconds', interval: '750 millis' }
1299
+ );
1300
+ return { processInstanceKey, search };
1301
+ }).pipe(
1302
+ // Tagged errors → discriminate with catchTag / catchTags instead of a manual switch.
1303
+ Effect.catchTag('EventualConsistencyTimeout', (e: EventualConsistencyTimeout) =>
1304
+ Effect.logError(`Timed out: ${e.message}`).pipe(Effect.andThen(Effect.fail(e)))
1305
+ )
1306
+ );
1204
1307
 
1205
- // Chain with fp-ts (optional) – the returned thunks are structurally compatible with TaskEither
1206
- // import { pipe } from 'fp-ts/function'; import * as TE from 'fp-ts/TaskEither';
1308
+ const result = await Effect.runPromise(program);
1207
1309
  ```
1208
1310
 
1209
1311
  Why a subpath?
1210
1312
 
1211
- - Keeps base bundle lean for the 80% use case.
1212
- - No hard dependency on `fp-ts` at runtime; only structural types.
1213
- - Advanced users can compose with real `fp-ts` without pulling the effect model into the default import path.
1313
+ - Keeps the base bundle lean for the Promise-first 80% use case.
1314
+ - No dependency on `effect` at runtime unless you opt in; it is an **optional** peer.
1315
+ - Unlocks the Effect ecosystem (typed errors, `Schedule`, `Layer`/`Context`, `TestClock`).
1214
1316
 
1215
- Exports available from `.../fp`:
1317
+ Exports available from `.../effect`:
1216
1318
 
1217
- - `createCamundaFpClient` – typed facade (methods return `() => Promise<Either<DomainError,T>>`).
1218
- - Type guards: `isLeft`, `isRight`.
1219
- - Error / type aliases: `DomainError`, `TaskEither`, `Either`, `Left`, `Right`, `Fpify`.
1220
- - Combinators: `retryTE`, `withTimeoutTE`, `eventuallyTE`.
1319
+ - `createCamundaEffectClient(options?)` – a `Proxy` client where every method returns
1320
+ `Effect.Effect<Awaited<R>, DomainError, never>`; the throwing client is reachable via `.inner`.
1321
+ - Tagged errors (`Data.TaggedError`): `CamundaValidationError`, `EventualConsistencyTimeout`,
1322
+ `HttpError`, `CamundaGenericError` — together the `DomainError` union. Discriminate with
1323
+ `Effect.catchTag` / `Effect.catchTags`.
1324
+ - Combinators: `retryWithBackoff` (`Effect.retry` + `Schedule.exponential` + jitter), `withTimeout`
1325
+ (`Effect.timeoutOrElse` with real interruption), `eventually` (a recursive `Effect.sleep` poll on
1326
+ the Effect `Clock`, timing out to `EventualConsistencyTimeout`).
1327
+ - Dependency injection: `CamundaEffect` (`Context.Service`) + `layer(options?)` (`Layer`) so worker /
1328
+ orchestration code composes via `Layer` and swaps a test double trivially.
1221
1329
 
1222
- DomainError union currently includes:
1223
-
1224
- - `CamundaValidationError`
1225
- - `EventualConsistencyTimeoutError`
1226
- - HTTP-like error objects (status/body/message) produced by transport
1227
- - Generic `Error`
1228
-
1229
- You can refine left-channel typing later by mapping HTTP status codes or discriminator fields.
1330
+ **Clock-class win:** `eventually` / `withTimeout` run on the Effect `Clock`, so `TestClock.adjust`
1331
+ advances eventual/timeout deterministically in tests — no real-clock burn.
1230
1332
 
1231
1333
  ## Eventual Consistency Polling
1232
1334
 
1233
1335
  Some endpoints accept consistency management options. Pass a `consistency` block (where supported) with `waitUpToMs` and optional `pollIntervalMs` (default 500). If the condition is not met within timeout an `EventualConsistencyTimeoutError` is thrown.
1234
1336
 
1235
1337
  To consume eventual polling in a non‑throwing fashion set the client error mode before invoking an eventually consistent method:
1236
- At present the canonical client operates in throwing mode. Non‑throwing adaptation (Result / fp-ts) is achieved via the functional wrappers rather than mutating the base client.
1338
+ At present the canonical client operates in throwing mode. Non‑throwing adaptation (Result / Effect) is achieved via the functional wrappers rather than mutating the base client.
1237
1339
 
1238
1340
  ### Options
1239
1341
 
@@ -1512,43 +1614,32 @@ When to use:
1512
1614
  - Avoiding try/catch nesting in larger orchestration flows.
1513
1615
  - Converting to libraries expecting an Either/Result pattern.
1514
1616
 
1515
- ### fp-ts Adapter (TaskEither / Either) - EXPERIMENTAL
1516
-
1517
- _Note that this feature is experimental and subject to change._
1617
+ ### Effect Adapter
1518
1618
 
1519
- For projects using `fp-ts`, wrap the throwing client in a lazy `TaskEither` facade:
1619
+ For Effect-based projects, wrap the throwing client in an Effect-flavoured facade whose every method
1620
+ returns an `Effect` with a typed `DomainError` channel:
1520
1621
 
1521
- <!-- snippet-exempt: requires external fp-ts dependency -->
1622
+ <!-- snippet-exempt: requires optional effect peer dependency -->
1522
1623
  ```ts
1523
- import { createCamundaFpClient } from '@camunda8/orchestration-cluster-api/fp';
1524
- import { pipe } from 'fp-ts/function';
1525
- import * as TE from 'fp-ts/TaskEither';
1624
+ import { Effect } from 'effect';
1625
+ import { createCamundaEffectClient } from '@camunda8/orchestration-cluster-api/effect';
1526
1626
 
1527
- const fp = createCamundaFpClient();
1627
+ const camunda = createCamundaEffectClient();
1528
1628
 
1529
- const deployTE = fp.createDeployment({ resources: [file] }); // TaskEither<unknown, ExtendedDeploymentResult>
1530
-
1531
- pipe(
1532
- deployTE(), // invoke the task (returns Promise<Either>)
1533
- (then) => then // typical usage would use TE.match / TE.fold; shown expanded for clarity
1629
+ const deployment = await Effect.runPromise(
1630
+ camunda.createDeployment({ resources: [file] })
1534
1631
  );
1535
-
1536
- // With helpers
1537
- const task = fp.createDeployment({ resources: [file] });
1538
- const either = await task();
1539
- if (either._tag === 'Right') {
1540
- console.log(either.right.deployments.length);
1541
- } else {
1542
- console.error('Error', either.left);
1543
- }
1632
+ console.log(deployment.deployments.length);
1544
1633
  ```
1545
1634
 
1635
+ See [Effect Surface (Opt-In Subpath)](#effect-surface-opt-in-subpath) above for the full surface —
1636
+ tagged errors, `retryWithBackoff` / `withTimeout` / `eventually`, and `Layer`/`Context` DI.
1637
+
1546
1638
  Notes:
1547
1639
 
1548
- - No runtime dependency on `fp-ts`; adapter implements a minimal `Either` shape. Structural typing lets you lift into real `fp-ts` functions (`fromEither`, etc.).
1549
- - Each method becomes a function returning `() => Promise<Either<E,A>>` (a `TaskEither` shape). Invoke it later to execute.
1550
- - Cancellation: calling `.cancel()` on the original promise isn’t surfaced; if you need cancellation use the base client directly.
1551
- - For richer interop, you can map the returned factory to `TE.tryCatch` in userland.
1640
+ - `effect` is an **optional peer dependency**; only the `./effect` subpath imports it.
1641
+ - Each method returns `Effect.Effect<Awaited<R>, DomainError, never>`; the throwing client is reachable via `.inner`.
1642
+ - Failures are narrowed into tagged errors so you discriminate with `Effect.catchTag` / `catchTags`.
1552
1643
 
1553
1644
  ## Pagination
1554
1645
 
@@ -1671,7 +1762,7 @@ Generate an HTML API reference site with TypeDoc (public entry points only):
1671
1762
  npm run docs:api
1672
1763
  ```
1673
1764
 
1674
- Output: static site in `docs/api` (open `docs/api/index.html` in a browser or serve the folder, e.g. `npx http-server docs/api`). Entry points: `src/index.ts`, `src/logger.ts`, `src/fp/index.ts`. Internal generated code, scripts, tests are excluded and private / protected members are filtered. Regenerate after changing public exports.
1765
+ Output: static site in `docs/api` (open `docs/api/index.html` in a browser or serve the folder, e.g. `npx http-server docs/api`). Entry points: `src/index.ts`, `src/logger.ts`, `src/effect/index.ts`. Internal generated code, scripts, tests are excluded and private / protected members are filtered. Regenerate after changing public exports.
1675
1766
 
1676
1767
  ## Contributing
1677
1768