@toa.io/core 1.0.0-alpha.278 → 1.0.0-alpha.282

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
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.0.0-alpha.282](https://github.com/toa-io/toa/compare/v1.0.0-alpha.281...v1.0.0-alpha.282) (2026-09-03)
7
+
8
+ ### Features
9
+
10
+ * **core:** a Host for extensions ([6315eac](https://github.com/toa-io/toa/commit/6315eac1e9fb05be472272de06385c54ad5934ce))
11
+
12
+
6
13
  # [1.0.0-alpha.278](https://github.com/toa-io/toa/compare/v1.0.0-alpha.277...v1.0.0-alpha.278) (2026-09-03)
7
14
 
8
15
  **Note:** Version bump only for package @toa.io/core
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/core",
3
- "version": "1.0.0-alpha.278",
3
+ "version": "1.0.0-alpha.282",
4
4
  "type": "module",
5
5
  "description": "Toa Core",
6
6
  "author": "temich <tema.gurtovoy@gmail.com>",
@@ -22,10 +22,10 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@rsql/parser": "1.6.0",
25
- "@toa.io/generic": "1.0.0-alpha.278",
25
+ "@toa.io/generic": "1.0.0-alpha.282",
26
26
  "js-yaml": "5.4.1",
27
27
  "openspan": "1.0.0-alpha.277",
28
28
  "uuid": "14.0.2"
29
29
  },
30
- "gitHead": "5872815748eed8021ea99d7beca1602f4fc5c958"
30
+ "gitHead": "4007c814725dd015d3bbebb9a28e28a247645c4f"
31
31
  }
@@ -5,6 +5,27 @@ import * as _storages from './storages.js'
5
5
  import * as _bindings from './bindings.js'
6
6
  import { Manifest } from '@toa.io/norm'
7
7
 
8
+ /**
9
+ * What the process hosting an extension provides to it: the counterpart of a component's
10
+ * `Context`. What is returned is a connector the extension depends on.
11
+ */
12
+ export interface Host {
13
+ /** a component of the context, by locator */
14
+ remote (locator: _core.Locator, source?: _core.Source): Promise<_core.Remote>
15
+
16
+ /** a channel of the messaging binding */
17
+ broadcast<T = unknown> (channel: string, group?: string): Promise<_bindings.Broadcast<T>>
18
+
19
+ /** components to run inside the extension's own process */
20
+ composition (paths: string[]): Promise<_core.Connector>
21
+
22
+ /** a consumer of an event of the context, `namespace.component.event` */
23
+ receive (label: string, receiver: _core.Receiver): Promise<_core.Connector>
24
+
25
+ /** what the replicas of one group decide together */
26
+ atom (group: string): _core.atomicity.Atom
27
+ }
28
+
8
29
  export interface Factory {
9
30
  tenant? (locator: _core.Locator, manifest: object, component: Manifest):
10
31
  _core.Connector | Promise<_core.Connector>