@toa.io/boot 1.0.0-alpha.34 → 1.0.0-alpha.340

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 (62) hide show
  1. package/CHANGELOG.md +467 -0
  2. package/package.json +11 -8
  3. package/src/atom.js +41 -0
  4. package/src/atomicity.js +11 -0
  5. package/src/bindings/broadcast.js +3 -6
  6. package/src/bindings/constants.js +1 -3
  7. package/src/bindings/consume.js +18 -6
  8. package/src/bindings/emit.js +3 -6
  9. package/src/bindings/factory.js +5 -9
  10. package/src/bindings/inbound.js +11 -0
  11. package/src/bindings/index.js +7 -13
  12. package/src/bindings/outbound.js +10 -0
  13. package/src/bindings/produce.js +62 -17
  14. package/src/bindings/receive.js +3 -6
  15. package/src/bridge.js +22 -16
  16. package/src/call.js +29 -9
  17. package/src/cascade.js +16 -10
  18. package/src/component.js +101 -32
  19. package/src/composition.js +115 -15
  20. package/src/context.js +7 -8
  21. package/src/contract.js +11 -12
  22. package/src/emission.js +21 -14
  23. package/src/env.js +19 -12
  24. package/src/events.js +27 -0
  25. package/src/extensions/aspects.js +4 -8
  26. package/src/extensions/component.js +4 -8
  27. package/src/extensions/context.js +4 -8
  28. package/src/extensions/destinations.js +27 -0
  29. package/src/extensions/emitter.js +7 -9
  30. package/src/extensions/index.js +10 -19
  31. package/src/extensions/instances.js +2 -4
  32. package/src/extensions/load.js +7 -7
  33. package/src/extensions/manage.js +15 -0
  34. package/src/extensions/receiver.js +5 -9
  35. package/src/extensions/resolve.js +62 -13
  36. package/src/extensions/storage.js +6 -9
  37. package/src/extensions/tenants.js +5 -9
  38. package/src/guards.js +20 -0
  39. package/src/host.js +29 -0
  40. package/src/inbox.js +12 -0
  41. package/src/index.js +29 -34
  42. package/src/manifest.js +80 -36
  43. package/src/manifest.test.js +91 -8
  44. package/src/map.js +108 -0
  45. package/src/operation.js +29 -14
  46. package/src/outbox.js +22 -0
  47. package/src/rc.js +5 -0
  48. package/src/receivers.js +53 -23
  49. package/src/regional.js +18 -0
  50. package/src/regional.test.js +28 -0
  51. package/src/remote.js +41 -22
  52. package/src/rendering.js +50 -0
  53. package/src/span.js +19 -0
  54. package/src/storage.js +50 -16
  55. package/src/storage.test.js +57 -0
  56. package/src/workload.js +283 -0
  57. package/src/workload.test.js +323 -0
  58. package/types/bindings.d.ts +6 -2
  59. package/types/index.d.ts +62 -10
  60. package/types/manifest.d.ts +5 -4
  61. package/src/discovery.js +0 -43
  62. package/src/exposition.js +0 -17
package/CHANGELOG.md ADDED
@@ -0,0 +1,467 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # [1.0.0-alpha.340](https://github.com/toa-io/toa/compare/v1.0.0-alpha.339...v1.0.0-alpha.340) (2026-10-28)
7
+
8
+ **Note:** Version bump only for package @toa.io/boot
9
+
10
+
11
+
12
+
13
+
14
+ # [1.0.0-alpha.339](https://github.com/toa-io/toa/compare/v1.0.0-alpha.338...v1.0.0-alpha.339) (2026-10-28)
15
+
16
+ **Note:** Version bump only for package @toa.io/boot
17
+
18
+
19
+
20
+
21
+
22
+ # [1.0.0-alpha.338](https://github.com/toa-io/toa/compare/v1.0.0-alpha.337...v1.0.0-alpha.338) (2026-10-28)
23
+
24
+ **Note:** Version bump only for package @toa.io/boot
25
+
26
+
27
+
28
+
29
+
30
+ # [1.0.0-alpha.337](https://github.com/toa-io/toa/compare/v1.0.0-alpha.336...v1.0.0-alpha.337) (2026-10-28)
31
+
32
+ **Note:** Version bump only for package @toa.io/boot
33
+
34
+
35
+
36
+
37
+
38
+ # [1.0.0-alpha.336](https://github.com/toa-io/toa/compare/v1.0.0-alpha.335...v1.0.0-alpha.336) (2026-10-26)
39
+
40
+ **Note:** Version bump only for package @toa.io/boot
41
+
42
+
43
+
44
+
45
+
46
+ # [1.0.0-alpha.335](https://github.com/toa-io/toa/compare/v1.0.0-alpha.334...v1.0.0-alpha.335) (2026-10-26)
47
+
48
+ **Note:** Version bump only for package @toa.io/boot
49
+
50
+
51
+
52
+
53
+
54
+ # [1.0.0-alpha.334](https://github.com/toa-io/toa/compare/v1.0.0-alpha.333...v1.0.0-alpha.334) (2026-10-26)
55
+
56
+ ### Bug Fixes
57
+
58
+ * **boot:** a service reads every component an extension ships from the digest ([f43641b](https://github.com/toa-io/toa/commit/f43641b1d5e641c89ab49b489fdb944b106300b3))
59
+
60
+
61
+ # [1.0.0-alpha.333](https://github.com/toa-io/toa/compare/v1.0.0-alpha.332...v1.0.0-alpha.333) (2026-10-26)
62
+
63
+ **Note:** Version bump only for package @toa.io/boot
64
+
65
+
66
+
67
+
68
+
69
+ # [1.0.0-alpha.332](https://github.com/toa-io/toa/compare/v1.0.0-alpha.331...v1.0.0-alpha.332) (2026-10-23)
70
+
71
+ **Note:** Version bump only for package @toa.io/boot
72
+
73
+
74
+
75
+
76
+
77
+ # [1.0.0-alpha.331](https://github.com/toa-io/toa/compare/v1.0.0-alpha.330...v1.0.0-alpha.331) (2026-10-16)
78
+
79
+ **Note:** Version bump only for package @toa.io/boot
80
+
81
+
82
+
83
+
84
+
85
+ # [1.0.0-alpha.330](https://github.com/toa-io/toa/compare/v1.0.0-alpha.329...v1.0.0-alpha.330) (2026-10-15)
86
+
87
+ **Note:** Version bump only for package @toa.io/boot
88
+
89
+
90
+
91
+
92
+
93
+ # [1.0.0-alpha.329](https://github.com/toa-io/toa/compare/v1.0.0-alpha.328...v1.0.0-alpha.329) (2026-10-11)
94
+
95
+ **Note:** Version bump only for package @toa.io/boot
96
+
97
+
98
+
99
+
100
+
101
+ # [1.0.0-alpha.328](https://github.com/toa-io/toa/compare/v1.0.0-alpha.327...v1.0.0-alpha.328) (2026-10-10)
102
+
103
+ **Note:** Version bump only for package @toa.io/boot
104
+
105
+
106
+
107
+
108
+
109
+ # [1.0.0-alpha.327](https://github.com/toa-io/toa/compare/v1.0.0-alpha.326...v1.0.0-alpha.327) (2026-10-10)
110
+
111
+ * feat(core)!: refuse a call to an operation declaring once made by a retried transition ([71db669](https://github.com/toa-io/toa/commit/71db6697d06f9854910ec6785733f4e896cbe756))
112
+
113
+ ### BREAKING CHANGES
114
+
115
+ * a transition declared `concurrency: retry` that calls an
116
+ operation declaring `once` raises an Unrepeatable exception (604) on that
117
+ call. Declare it `concurrency: none`, make the call from a receiver of the
118
+ event the change publishes, or call both from an effect.
119
+
120
+
121
+ # [1.0.0-alpha.326](https://github.com/toa-io/toa/compare/v1.0.0-alpha.325...v1.0.0-alpha.326) (2026-10-06)
122
+
123
+ ### Bug Fixes
124
+
125
+ * **boot:** close a tenant before its component stops serving ([c327a12](https://github.com/toa-io/toa/commit/c327a1291032c3d2a66488d1d5b75770f0211a40))
126
+
127
+
128
+ # [1.0.0-alpha.325](https://github.com/toa-io/toa/compare/v1.0.0-alpha.324...v1.0.0-alpha.325) (2026-10-02)
129
+
130
+ **Note:** Version bump only for package @toa.io/boot
131
+
132
+
133
+
134
+
135
+
136
+ # [1.0.0-alpha.324](https://github.com/toa-io/toa/compare/v1.0.0-alpha.323...v1.0.0-alpha.324) (2026-10-02)
137
+
138
+ **Note:** Version bump only for package @toa.io/boot
139
+
140
+
141
+
142
+
143
+
144
+ # [1.0.0-alpha.323](https://github.com/toa-io/toa/compare/v1.0.0-alpha.322...v1.0.0-alpha.323) (2026-10-01)
145
+
146
+ **Note:** Version bump only for package @toa.io/boot
147
+
148
+
149
+
150
+
151
+
152
+ # [1.0.0-alpha.322](https://github.com/toa-io/toa/compare/v1.0.0-alpha.321...v1.0.0-alpha.322) (2026-09-29)
153
+
154
+ **Note:** Version bump only for package @toa.io/boot
155
+
156
+
157
+
158
+
159
+
160
+ # [1.0.0-alpha.321](https://github.com/toa-io/toa/compare/v1.0.0-alpha.320...v1.0.0-alpha.321) (2026-09-28)
161
+
162
+ ### Features
163
+
164
+ * **core:** give a destination that carries changes to other regions what the regional ones write ([a7d2fd1](https://github.com/toa-io/toa/commit/a7d2fd1eecd50645d14f7cb5c588069c3073ba72))
165
+
166
+
167
+ # [1.0.0-alpha.320](https://github.com/toa-io/toa/compare/v1.0.0-alpha.319...v1.0.0-alpha.320) (2026-09-28)
168
+
169
+ **Note:** Version bump only for package @toa.io/boot
170
+
171
+
172
+
173
+
174
+
175
+ # [1.0.0-alpha.319](https://github.com/toa-io/toa/compare/v1.0.0-alpha.318...v1.0.0-alpha.319) (2026-09-27)
176
+
177
+ **Note:** Version bump only for package @toa.io/boot
178
+
179
+
180
+
181
+
182
+
183
+ # [1.0.0-alpha.318](https://github.com/toa-io/toa/compare/v1.0.0-alpha.317...v1.0.0-alpha.318) (2026-09-23)
184
+
185
+ **Note:** Version bump only for package @toa.io/boot
186
+
187
+
188
+
189
+
190
+
191
+ # [1.0.0-alpha.317](https://github.com/toa-io/toa/compare/v1.0.0-alpha.316...v1.0.0-alpha.317) (2026-09-23)
192
+
193
+ **Note:** Version bump only for package @toa.io/boot
194
+
195
+
196
+
197
+
198
+
199
+ # [1.0.0-alpha.316](https://github.com/toa-io/toa/compare/v1.0.0-alpha.315...v1.0.0-alpha.316) (2026-09-23)
200
+
201
+ **Note:** Version bump only for package @toa.io/boot
202
+
203
+
204
+
205
+
206
+
207
+ # [1.0.0-alpha.315](https://github.com/toa-io/toa/compare/v1.0.0-alpha.314...v1.0.0-alpha.315) (2026-09-23)
208
+
209
+ * feat(map)!: leave out of a contract what the runtime gives every component ([b81837a](https://github.com/toa-io/toa/commit/b81837a3bc4771d7ee1c10fe613c9a1d7501bf1a))
210
+
211
+ ### BREAKING CHANGES
212
+
213
+ * the deployed component map is `/etc/toa/.map.json.gz`.
214
+
215
+
216
+ # [1.0.0-alpha.314](https://github.com/toa-io/toa/compare/v1.0.0-alpha.313...v1.0.0-alpha.314) (2026-09-19)
217
+
218
+ * feat(core)!: let an operation state how long its calls are remembered ([af177c2](https://github.com/toa-io/toa/commit/af177c2ab3d00d475840b5ef9e612f04e82b72bd))
219
+
220
+ ### Features
221
+
222
+ * **core:** a destination renders the component's events ([2f93b28](https://github.com/toa-io/toa/commit/2f93b28bed61a0afe99cb8cfa646ed7815467497))
223
+ * **core:** a reference may name a declaration its package claims ([8040f60](https://github.com/toa-io/toa/commit/8040f60976549ab90497675bb54e664261f5b6bb))
224
+
225
+ ### BREAKING CHANGES
226
+
227
+ * `inbox.retention` under 600 is refused. See
228
+ migrations/313.md.
229
+
230
+
231
+ # [1.0.0-alpha.313](https://github.com/toa-io/toa/compare/v1.0.0-alpha.312...v1.0.0-alpha.313) (2026-09-18)
232
+
233
+ **Note:** Version bump only for package @toa.io/boot
234
+
235
+
236
+
237
+
238
+
239
+ # [1.0.0-alpha.312](https://github.com/toa-io/toa/compare/v1.0.0-alpha.311...v1.0.0-alpha.312) (2026-09-18)
240
+
241
+ ### Features
242
+
243
+ * **boot:** offer a streamed endpoint to the bindings that carry a stream ([0099b4e](https://github.com/toa-io/toa/commit/0099b4e12bff4ce5dba2d0098f0b8c6a18fff2c5))
244
+ * **boot:** tell a producer which of its endpoints take a stream ([6383adc](https://github.com/toa-io/toa/commit/6383adcebf38d889db80d8cbd19fe38f3ba4eb2e))
245
+ * **core:** refuse a call that carries no stream where the operation takes one ([fb78e02](https://github.com/toa-io/toa/commit/fb78e02fa620b15f6aa7bac184dd8a6ede923150))
246
+ * **core:** require the property that carries a stream, and refuse a task that carries one ([fdc7e6b](https://github.com/toa-io/toa/commit/fdc7e6b345ee22b030a52f1fda0e91e6bf63a392))
247
+
248
+
249
+ # [1.0.0-alpha.311](https://github.com/toa-io/toa/compare/v1.0.0-alpha.310...v1.0.0-alpha.311) (2026-09-17)
250
+
251
+ ### Features
252
+
253
+ * read the scope of a process once, as it boots ([0d65de5](https://github.com/toa-io/toa/commit/0d65de58ffc655ff872b8e66f95c5609ada3370a))
254
+
255
+
256
+ # [1.0.0-alpha.310](https://github.com/toa-io/toa/compare/v1.0.0-alpha.309...v1.0.0-alpha.310) (2026-09-16)
257
+
258
+ **Note:** Version bump only for package @toa.io/boot
259
+
260
+
261
+
262
+
263
+
264
+ # [1.0.0-alpha.309](https://github.com/toa-io/toa/compare/v1.0.0-alpha.308...v1.0.0-alpha.309) (2026-09-16)
265
+
266
+ **Note:** Version bump only for package @toa.io/boot
267
+
268
+
269
+
270
+
271
+
272
+ # [1.0.0-alpha.308](https://github.com/toa-io/toa/compare/v1.0.0-alpha.307...v1.0.0-alpha.308) (2026-09-15)
273
+
274
+ **Note:** Version bump only for package @toa.io/boot
275
+
276
+
277
+
278
+
279
+
280
+ # [1.0.0-alpha.307](https://github.com/toa-io/toa/compare/v1.0.0-alpha.306...v1.0.0-alpha.307) (2026-09-15)
281
+
282
+ **Note:** Version bump only for package @toa.io/boot
283
+
284
+
285
+
286
+
287
+
288
+ # [1.0.0-alpha.306](https://github.com/toa-io/toa/compare/v1.0.0-alpha.305...v1.0.0-alpha.306) (2026-09-14)
289
+
290
+ * refactor(core)!: name the quiesce hooks pause and unpause ([6e4e5f5](https://github.com/toa-io/toa/commit/6e4e5f55d43f03ea95ca8bbdaae57b949564dfa2))
291
+ * feat(boot)!: a process can be halted and come back ([7196fa5](https://github.com/toa-io/toa/commit/7196fa51a9c882e84c3767a4fdd329fd2df319f5))
292
+
293
+ ### Bug Fixes
294
+
295
+ * **boot:** declare what a workload does with a quiesce ([0e1521d](https://github.com/toa-io/toa/commit/0e1521d7abae3a3860a29978d267927d814c1d3a))
296
+ * **boot:** keep a halted process alive until it comes back ([3d3cc23](https://github.com/toa-io/toa/commit/3d3cc23835f836f9f98b1d9a448090a2b0d473c8))
297
+
298
+ ### Features
299
+
300
+ * **boot:** let a process go quiet and be let go again ([0fc3e66](https://github.com/toa-io/toa/commit/0fc3e66f217ab45e85f70271ab0768232b3fa088))
301
+ * **boot:** quiet a tree before taking it down ([7a339ca](https://github.com/toa-io/toa/commit/7a339caea4499509b55daf91061fc9836c0f6e68))
302
+ * **bridges.node:** let a component stop what it started and start it again ([d10d5d1](https://github.com/toa-io/toa/commit/d10d5d16fcd181e717d9d2cef4c7814ae8f2a93f))
303
+
304
+ ### BREAKING CHANGES
305
+
306
+ * `Host.halt` is `Host.stop`.
307
+ * `Host` gains `gate` and `halt`, and `Factory.service` may answer a gate. An
308
+ extension that gates nothing keeps its connections through a halt.
309
+
310
+
311
+ # [1.0.0-alpha.305](https://github.com/toa-io/toa/compare/v1.0.0-alpha.304...v1.0.0-alpha.305) (2026-09-13)
312
+
313
+ ### Features
314
+
315
+ * **core:** refuse a call that writes, made under a request that only reads ([92951d0](https://github.com/toa-io/toa/commit/92951d0f7b95bd5b838097dd6a42db5586968d0b))
316
+
317
+
318
+ # [1.0.0-alpha.304](https://github.com/toa-io/toa/compare/v1.0.0-alpha.303...v1.0.0-alpha.304) (2026-09-13)
319
+
320
+ **Note:** Version bump only for package @toa.io/boot
321
+
322
+
323
+
324
+
325
+
326
+ # [1.0.0-alpha.303](https://github.com/toa-io/toa/compare/v1.0.0-alpha.302...v1.0.0-alpha.303) (2026-09-12)
327
+
328
+ **Note:** Version bump only for package @toa.io/boot
329
+
330
+
331
+
332
+
333
+
334
+ # [1.0.0-alpha.302](https://github.com/toa-io/toa/compare/v1.0.0-alpha.301...v1.0.0-alpha.302) (2026-09-11)
335
+
336
+ ### Features
337
+
338
+ * **boot:** a run command may wait until the component is served ([0f66bed](https://github.com/toa-io/toa/commit/0f66bedf7b54dc9c1397f7f32bbccbffde7288ca))
339
+
340
+
341
+ # [1.0.0-alpha.301](https://github.com/toa-io/toa/compare/v1.0.0-alpha.300...v1.0.0-alpha.301) (2026-09-11)
342
+
343
+ **Note:** Version bump only for package @toa.io/boot
344
+
345
+
346
+
347
+
348
+
349
+ # [1.0.0-alpha.300](https://github.com/toa-io/toa/compare/v1.0.0-alpha.299...v1.0.0-alpha.300) (2026-09-11)
350
+
351
+ * feat(boot)!: a process is a thing, and an extension may keep something in one ([528d6cd](https://github.com/toa-io/toa/commit/528d6cdd307b45a6c30b6a184d7e06b3328cecf8))
352
+ * feat(core)!: an operation may ask to run once ([dca616c](https://github.com/toa-io/toa/commit/dca616cb380a7a389e277875d3bd5ca55a6e4d45))
353
+
354
+ ### Features
355
+
356
+ * **core:** a call carries what it is, and a chain of them carries it down ([ebd7769](https://github.com/toa-io/toa/commit/ebd776984a79adb9bf4a97b680128be1efab856f))
357
+ * **core:** a call may name the process it goes to, and wait for a set time ([7d8adb2](https://github.com/toa-io/toa/commit/7d8adb2772a95ff45ae5374efdedfb5a857fbbe9))
358
+
359
+ ### BREAKING CHANGES
360
+
361
+ * `Storage.store`, `.upsert` and `.ensure` take one more
362
+ argument, and `Storage` has two more members. A connector that ignores them
363
+ works exactly as it did; a component that asks it for `once` is refused at
364
+ boot. See migrations/299.md.
365
+ * a composition booted directly has no readiness probe. Readiness is
366
+ the process's, and a composition is not a process. `stage.workload` boots one where a
367
+ suite needs it.
368
+
369
+
370
+ # [1.0.0-alpha.299](https://github.com/toa-io/toa/compare/v1.0.0-alpha.298...v1.0.0-alpha.299) (2026-09-10)
371
+
372
+ ### Features
373
+
374
+ * **bindings.amqp:** a binding carries a channel, addressed by label ([17cf178](https://github.com/toa-io/toa/commit/17cf1782d1c47d033c02f99947b766eb9d45df75))
375
+ * **convergence:** deployments of one context converge ([8a70343](https://github.com/toa-io/toa/commit/8a70343cf6953aab58d4a25bac215508ff8d9a37))
376
+ * **core:** an outbox row is published to destinations ([cfb77b4](https://github.com/toa-io/toa/commit/cfb77b4826ff0f9560769a0996981e143d6525af))
377
+
378
+
379
+ # [1.0.0-alpha.298](https://github.com/toa-io/toa/compare/v1.0.0-alpha.297...v1.0.0-alpha.298) (2026-09-08)
380
+
381
+ **Note:** Version bump only for package @toa.io/boot
382
+
383
+
384
+
385
+
386
+
387
+ # [1.0.0-alpha.297](https://github.com/toa-io/toa/compare/v1.0.0-alpha.296...v1.0.0-alpha.297) (2026-09-08)
388
+
389
+ **Note:** Version bump only for package @toa.io/boot
390
+
391
+
392
+
393
+
394
+
395
+ # [1.0.0-alpha.296](https://github.com/toa-io/toa/compare/v1.0.0-alpha.295...v1.0.0-alpha.296) (2026-09-08)
396
+
397
+ **Note:** Version bump only for package @toa.io/boot
398
+
399
+
400
+
401
+
402
+
403
+ # [1.0.0-alpha.295](https://github.com/toa-io/toa/compare/v1.0.0-alpha.294...v1.0.0-alpha.295) (2026-09-07)
404
+
405
+ **Note:** Version bump only for package @toa.io/boot
406
+
407
+
408
+
409
+
410
+
411
+ # [1.0.0-alpha.294](https://github.com/toa-io/toa/compare/v1.0.0-alpha.293...v1.0.0-alpha.294) (2026-09-07)
412
+
413
+ **Note:** Version bump only for package @toa.io/boot
414
+
415
+
416
+
417
+
418
+
419
+ # [1.0.0-alpha.293](https://github.com/toa-io/toa/compare/v1.0.0-alpha.292...v1.0.0-alpha.293) (2026-09-07)
420
+
421
+ **Note:** Version bump only for package @toa.io/boot
422
+
423
+
424
+
425
+
426
+
427
+ # [1.0.0-alpha.292](https://github.com/toa-io/toa/compare/v1.0.0-alpha.291...v1.0.0-alpha.292) (2026-09-07)
428
+
429
+ ### Features
430
+
431
+ * **definitions:** the version of Toa is the definitions package's ([3d0272e](https://github.com/toa-io/toa/commit/3d0272ea0ab862f4b6c2e58a2f003f92d0f8a87f))
432
+ * **definitions:** what a package declares is read from one package ([7052341](https://github.com/toa-io/toa/commit/70523411b5d9e2b204c999aa02365173f3bb518d))
433
+ * **norm:** a package's definition is read by one resolver ([bffd41c](https://github.com/toa-io/toa/commit/bffd41c8d18c42786b0bf321623088b9dabc4724))
434
+
435
+
436
+ # [1.0.0-alpha.291](https://github.com/toa-io/toa/compare/v1.0.0-alpha.290...v1.0.0-alpha.291) (2026-09-07)
437
+
438
+ **Note:** Version bump only for package @toa.io/boot
439
+
440
+
441
+
442
+
443
+
444
+ # [1.0.0-alpha.289](https://github.com/toa-io/toa/compare/v1.0.0-alpha.288...v1.0.0-alpha.289) (2026-09-07)
445
+
446
+ * A deploy moves only what changed, and a component sees none of the runtime's environment (#1073) ([f38e3db](https://github.com/toa-io/toa/commit/f38e3db533f24db866c57bfa1ef294eff1eaf499)), closes [#1073](https://github.com/toa-io/toa/issues/1073) [#1064](https://github.com/toa-io/toa/issues/1064) [#1066](https://github.com/toa-io/toa/issues/1066) [#1067](https://github.com/toa-io/toa/issues/1067) [#1068](https://github.com/toa-io/toa/issues/1068) [#1069](https://github.com/toa-io/toa/issues/1069) [#1071](https://github.com/toa-io/toa/issues/1071) [#1070](https://github.com/toa-io/toa/issues/1070) [#1072](https://github.com/toa-io/toa/issues/1072)
447
+
448
+ ### BREAKING CHANGES
449
+
450
+ * a component that read `process.env.TOA_*` reads `context` instead;
451
+ `echo(input)` no longer substitutes from the environment; a bash operation sees no
452
+ `TOA_*`; images no longer set `USER node` — see migrations/289.md.
453
+
454
+
455
+ # [1.0.0-alpha.288](https://github.com/toa-io/toa/compare/v1.0.0-alpha.287...v1.0.0-alpha.288) (2026-09-06)
456
+
457
+ **Note:** Version bump only for package @toa.io/boot
458
+
459
+
460
+
461
+
462
+
463
+ # [1.0.0-alpha.287](https://github.com/toa-io/toa/compare/v1.0.0-alpha.286...v1.0.0-alpha.287) (2026-09-06)
464
+
465
+ ### Bug Fixes
466
+
467
+ * **boot:** a discovery belongs to the connection that made it ([48e1c8f](https://github.com/toa-io/toa/commit/48e1c8f668b1853134ae9fb2349c485e6da66c28))
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@toa.io/boot",
3
- "version": "1.0.0-alpha.34",
3
+ "version": "1.0.0-alpha.340",
4
+ "type": "module",
4
5
  "description": "Toa Boot",
5
6
  "author": "temich <tema.gurtovoy@gmail.com>",
6
7
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -20,13 +21,15 @@
20
21
  "test": "echo \"Error: run tests from root\" && exit 1"
21
22
  },
22
23
  "dependencies": {
23
- "@toa.io/core": "1.0.0-alpha.34",
24
- "@toa.io/filesystem": "1.0.0-alpha.34",
25
- "@toa.io/generic": "1.0.0-alpha.34",
26
- "@toa.io/norm": "1.0.0-alpha.34",
27
- "@toa.io/schema": "1.0.0-alpha.34",
24
+ "@toa.io/atomicity": "1.0.0-alpha.333",
25
+ "@toa.io/core": "1.0.0-alpha.333",
26
+ "@toa.io/definitions": "1.0.0-alpha.340",
27
+ "@toa.io/generic": "1.0.0-alpha.332",
28
+ "@toa.io/norm": "1.0.0-alpha.340",
29
+ "@toa.io/schemas": "1.0.0-alpha.332",
28
30
  "clone-deep": "4.0.1",
29
- "dotenv": "16.1.1"
31
+ "dotenv": "18.0.9",
32
+ "openspan": "1.0.0-alpha.330"
30
33
  },
31
- "gitHead": "caf71c04ebd589ff54a25f533b975484aaf9a254"
34
+ "gitHead": "1871346ef431050d23bd8e91f2b920cea1aeb749"
32
35
  }
package/src/atom.js ADDED
@@ -0,0 +1,41 @@
1
+ import { Connector } from '@toa.io/core'
2
+
3
+ import * as boot from './index.js'
4
+
5
+ /**
6
+ * The atom as a system aspect. Every component has `context.atom`, with nothing declared in its
7
+ * manifest and nothing of its own to configure.
8
+ *
9
+ * @implements {import('@toa.io/core/types').extensions.Aspect}
10
+ */
11
+ class Aspect extends Connector {
12
+ name = 'atom'
13
+
14
+ #atom
15
+
16
+ constructor(atom) {
17
+ super()
18
+
19
+ this.#atom = atom
20
+
21
+ this.depends(atom)
22
+ }
23
+
24
+ // the methods are named rather than forwarded, so that the connector's lifecycle is not
25
+ // reachable from an algorithm
26
+ invoke(method, ...args) {
27
+ switch (method) {
28
+ case 'slots':
29
+ return this.#atom.slots(...args)
30
+ case 'meter':
31
+ return this.#atom.meter(...args)
32
+ case 'lock':
33
+ return this.#atom.lock(...args)
34
+ default:
35
+ throw new Error(`Atom aspect has no '${method}' method`)
36
+ }
37
+ }
38
+ }
39
+
40
+ /** @param {string} group */
41
+ export const atom = (group) => new Aspect(boot.atomicity(group))
@@ -0,0 +1,11 @@
1
+ import { Factory } from '@toa.io/atomicity'
2
+
3
+ /**
4
+ * What the replicas of one group decide together. Every component has one, whether or not there
5
+ * is anything to coordinate through: without a Redis nothing is owned and nothing is metered —
6
+ * see the connector's readme.
7
+ *
8
+ * @param {string} group
9
+ * @returns {import('@toa.io/core/types').atomicity.Atom}
10
+ */
11
+ export const atomicity = (group) => new Factory().atom(group)
@@ -1,7 +1,4 @@
1
- 'use strict'
1
+ import { factory } from './factory.js'
2
2
 
3
- const { factory } = require('./factory')
4
-
5
- const broadcast = (channel, group, binding = '@toa.io/bindings.amqp') => factory(binding).broadcast(channel, group)
6
-
7
- exports.broadcast = broadcast
3
+ export const broadcast = async (channel, group, binding = '@toa.io/bindings.amqp') =>
4
+ (await factory(binding)).broadcast(channel, group)
@@ -1,3 +1 @@
1
- 'use strict'
2
-
3
- exports.LOOP = '@toa.io/bindings.loop'
1
+ export const LOOP = '@toa.io/bindings.loop'
@@ -1,9 +1,21 @@
1
- 'use strict'
1
+ import { LOOP } from './constants.js'
2
+ import { factory } from './factory.js'
3
+ import { carries } from './produce.js'
2
4
 
3
- const { LOOP } = require('./constants')
4
- const { factory } = require('./factory')
5
+ export const consume = async (locator, endpoint, bindings, streamed = false) => {
6
+ const declared = [LOOP].concat(bindings)
7
+ const carrying = streamed ? await filter(declared) : declared
5
8
 
6
- const consume = (locator, endpoint, bindings) =>
7
- [LOOP].concat(bindings).map((binding) => factory(binding).consumer(locator, endpoint))
9
+ return await Promise.all(
10
+ carrying.map(async (binding) => (await factory(binding)).consumer(locator, endpoint))
11
+ )
12
+ }
8
13
 
9
- exports.consume = consume
14
+ /** A call that carries a stream is handed to nothing that cannot carry one. */
15
+ const filter = async (bindings) => {
16
+ const carrying = []
17
+
18
+ for (const binding of bindings) if (await carries(binding)) carrying.push(binding)
19
+
20
+ return carrying
21
+ }
@@ -1,7 +1,4 @@
1
- 'use strict'
1
+ import { factory } from './factory.js'
2
2
 
3
- const { factory } = require('./factory')
4
-
5
- const emit = (binding, locator, label) => factory(binding).emitter(locator, label)
6
-
7
- exports.emit = emit
3
+ export const emit = async (binding, locator, label) =>
4
+ (await factory(binding)).emitter(locator, label)
@@ -1,15 +1,11 @@
1
- 'use strict'
2
-
3
1
  let instances = {}
4
2
 
5
- const factory = (binding) => {
6
- if (instances[binding] === undefined) instances[binding] = new (require(binding).Factory)()
3
+ // the promise is what is remembered, so two components cannot each make a factory
4
+ export const factory = async (binding) => {
5
+ instances[binding] ??= import(binding).then(({ Factory }) => new Factory())
7
6
 
8
- return instances[binding]
7
+ return await instances[binding]
9
8
  }
10
9
 
11
10
  // for testing purposes
12
- const reset = () => (instances = {})
13
-
14
- exports.factory = factory
15
- exports.reset = reset
11
+ export const reset = () => (instances = {})
@@ -0,0 +1,11 @@
1
+ import { factory } from './factory.js'
2
+
3
+ // eslint-disable-next-line max-params
4
+ export const inbound = async (binding, channel, uris, label, sink) => {
5
+ const instance = await factory(binding)
6
+
7
+ if (instance.inbound === undefined)
8
+ throw new Error(`Binding '${binding}' does not consume a channel`)
9
+
10
+ return instance.inbound(channel, uris, label, sink)
11
+ }
@@ -1,13 +1,7 @@
1
- 'use strict'
2
-
3
- const { broadcast } = require('./broadcast')
4
- const { consume } = require('./consume')
5
- const { emit } = require('./emit')
6
- const { produce } = require('./produce')
7
- const { receive } = require('./receive')
8
-
9
- exports.broadcast = broadcast
10
- exports.consume = consume
11
- exports.emit = emit
12
- exports.produce = produce
13
- exports.receive = receive
1
+ export { broadcast } from './broadcast.js'
2
+ export { consume } from './consume.js'
3
+ export { emit } from './emit.js'
4
+ export { inbound } from './inbound.js'
5
+ export { outbound } from './outbound.js'
6
+ export { produce } from './produce.js'
7
+ export { receive } from './receive.js'
@@ -0,0 +1,10 @@
1
+ import { factory } from './factory.js'
2
+
3
+ export const outbound = async (binding, channel, uris) => {
4
+ const instance = await factory(binding)
5
+
6
+ if (instance.outbound === undefined)
7
+ throw new Error(`Binding '${binding}' does not publish a channel`)
8
+
9
+ return instance.outbound(channel, uris)
10
+ }