@reventlessdev/reventless-spec 3.0.0-alpha.68 → 3.0.0-alpha.70

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,20 @@
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
+ # 3.0.0-alpha.70 (2026-07-10)
7
+
8
+ ### Features
9
+
10
+ * **reventless-ppx:** add [@group](https://github.com/group)By state-field annotation → x-reventless-group-by ([9e7a7b2](https://github.com/ReventlessDev/reventless-core/commit/9e7a7b29e54fb4eda1c6a145c0e7b6dcf26940ee))
11
+
12
+
13
+ # 3.0.0-alpha.69 (2026-07-08)
14
+
15
+ ### Features
16
+
17
+ * **reventless-core:** classify plugins by kind in the lifecycle read model ([64e3f22](https://github.com/ReventlessDev/reventless-core/commit/64e3f22b8114a771886b7c8ec023e95971413c0b))
18
+
19
+
6
20
  # 3.0.0-alpha.68 (2026-07-07)
7
21
 
8
22
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/reventless-spec",
3
- "version": "3.0.0-alpha.68",
3
+ "version": "3.0.0-alpha.70",
4
4
  "description": "Specifications for Reventless",
5
5
  "license": "Apache-2.0",
6
6
  "bin": {
@@ -6,6 +6,23 @@ type name = string
6
6
  @schema
7
7
  type version = string
8
8
 
9
+ /**
10
+ Classifies the business role of a plugin, carried on `pluginDefinition` so the
11
+ plugin-lifecycle read model can segregate infrastructure/commercial/marketplace
12
+ plugins from domain plugins in the admin Plugins view. Absent (on definitions
13
+ persisted before this field existed) is read as `Domain`.
14
+
15
+ Canonical here in `reventless-spec` because `pluginDefinition` (a `@schema` type
16
+ nested in the lifecycle Message union) needs the sury schema; `ReventlessCore.Plugin_BuiltHook`
17
+ re-exports this same type for its deploy-time metadata registry.
18
+ */
19
+ @schema
20
+ type pluginKind =
21
+ | Domain
22
+ | PlatformInfrastructure
23
+ | Commercial
24
+ | Marketplace
25
+
9
26
  /**
10
27
  Describes an extension point exported by a plugin.
11
28
  Included in the plugin's `pluginDefinition` for use by the gateway / host.
@@ -373,5 +390,10 @@ type pluginDefinition = {
373
390
  // subscriptions from this plugin's DCB topic → peer EventCollectors.
374
391
  // None for plugins without a DCB EventLog.
375
392
  dcbEventLog: @s.matches(dcbEventLogOptionSchema) option<dcbEventLogDefinition>,
393
+ // Business role of this plugin. Mandatory: `Domain` is the default kind, resolved once
394
+ // at the deploy-metadata → definition boundary (Plugin_Builder). PlatformInfrastructure
395
+ // plugins are segregated out of the admin Plugins list. Payload-less variant → serialises
396
+ // as a bare JSON string, so it is JSON-safe inside the lifecycle Message union without js_nullable.
397
+ kind: pluginKind,
376
398
  }
377
399
 
@@ -3,6 +3,13 @@
3
3
  import * as S from "sury/src/S.res.mjs";
4
4
  import * as SuryResMjs from "sury/src/Sury.res.mjs";
5
5
 
6
+ let pluginKindSchema = S.union([
7
+ S.literal("Domain"),
8
+ S.literal("PlatformInfrastructure"),
9
+ S.literal("Commercial"),
10
+ S.literal("Marketplace")
11
+ ]);
12
+
6
13
  let extensionPointDefinitionSchema = S.schema(s => ({
7
14
  name: s.m(S.string),
8
15
  commandTopic: s.m(S.string),
@@ -204,7 +211,8 @@ let pluginDefinitionSchema = S.schema(s => ({
204
211
  apiTarget: s.m(stringOptionSchema),
205
212
  uiFragments: s.m(uiFragmentManifestOptionSchema),
206
213
  structure: s.m(pluginStructureOptionSchema),
207
- dcbEventLog: s.m(dcbEventLogOptionSchema)
214
+ dcbEventLog: s.m(dcbEventLogOptionSchema),
215
+ kind: s.m(pluginKindSchema)
208
216
  }));
209
217
 
210
218
  let nameSchema = S.string;
@@ -214,6 +222,7 @@ let versionSchema = S.string;
214
222
  export {
215
223
  nameSchema,
216
224
  versionSchema,
225
+ pluginKindSchema,
217
226
  extensionPointDefinitionSchema,
218
227
  extensionDefinitionSchema,
219
228
  dcbEventLogDefinitionSchema,
@@ -248,4 +257,4 @@ export {
248
257
  platformEventGraphSchema,
249
258
  pluginDefinitionSchema,
250
259
  }
251
- /* extensionPointDefinitionSchema Not a pure module */
260
+ /* pluginKindSchema Not a pure module */
@@ -47,6 +47,14 @@ type stateAnnotationSpec = {
47
47
  */
48
48
  status: option<string>,
49
49
  /**
50
+ Field annotated `@groupBy` on the state record (PPX-emitted). `Some(name)`
51
+ when one such annotation exists; the PPX errors on duplicate `@groupBy`
52
+ annotations within the same record. `SuryToJsonSchema.deriveObjectSchema`
53
+ emits `x-reventless-group-by: true` on the named field, which the UI's
54
+ list view reads to render rows in sections keyed on that field.
55
+ */
56
+ groupBy: option<string>,
57
+ /**
50
58
  Component-level visibility hint from `@@reventless.visibility(...)`.
51
59
  `Some("Internal")` when the file-level attribute is `Internal`; `None`
52
60
  (omitted) for the default `Public`. `SuryToJsonSchema.deriveObjectSchema`