@camstack/addon-mqtt-broker 1.0.3 → 1.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.
@@ -5176,14 +5176,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5176
5176
  EventCategory["DeviceSleeping"] = "device.sleeping";
5177
5177
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5178
5178
  /**
5179
- * Progress snapshot emitted by `BulkUpdateCoordinator` on every state
5180
- * transition (item status change, phase change, completion, cancel).
5181
- * Payload is `BulkUpdateState`. Admin UI subscribes via `useLiveEvent`
5182
- * to drive the sticky `BulkUpdateBanner` and per-row `AddonRowBadge`.
5183
- *
5184
- * Spec: docs/superpowers/specs/2026-05-21-addons-bulk-update-progress-design.md
5179
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5180
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5181
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5182
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5183
+ * in F4 once live bulk progress is re-implemented over the engine events.
5185
5184
  */
5186
5185
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5186
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5187
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5187
5188
  /**
5188
5189
  * A container's child visibility toggled (hidden/shown). Emitted by the
5189
5190
  * `accessories` cap when a child device is hidden or revealed.
@@ -16071,6 +16072,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
16071
16072
  kind: "mutation",
16072
16073
  auth: "admin"
16073
16074
  });
16075
+ var jobKindSchema = _enum([
16076
+ "install",
16077
+ "update",
16078
+ "uninstall",
16079
+ "restart"
16080
+ ]);
16081
+ var taskPhaseSchema = _enum([
16082
+ "queued",
16083
+ "fetching",
16084
+ "staged",
16085
+ "validating",
16086
+ "applying",
16087
+ "restarting",
16088
+ "applied",
16089
+ "done",
16090
+ "failed",
16091
+ "skipped"
16092
+ ]);
16093
+ var taskTargetSchema = _enum(["framework", "addon"]);
16094
+ var taskLogEntrySchema = object({
16095
+ tsMs: number(),
16096
+ nodeId: string(),
16097
+ packageName: string(),
16098
+ phase: taskPhaseSchema,
16099
+ message: string()
16100
+ });
16101
+ var lifecycleTaskSchema = object({
16102
+ taskId: string(),
16103
+ nodeId: string(),
16104
+ packageName: string(),
16105
+ fromVersion: string().nullable(),
16106
+ toVersion: string(),
16107
+ target: taskTargetSchema,
16108
+ phase: taskPhaseSchema,
16109
+ stagedPath: string().nullable(),
16110
+ attempts: number(),
16111
+ steps: array(taskLogEntrySchema),
16112
+ error: string().nullable(),
16113
+ startedAtMs: number().nullable(),
16114
+ finishedAtMs: number().nullable()
16115
+ });
16116
+ var lifecycleJobStateSchema = _enum([
16117
+ "running",
16118
+ "completed",
16119
+ "failed",
16120
+ "partially-failed",
16121
+ "cancelled"
16122
+ ]);
16123
+ var lifecycleJobScopeSchema = _enum([
16124
+ "single",
16125
+ "bulk",
16126
+ "cluster"
16127
+ ]);
16128
+ var lifecycleJobSchema = object({
16129
+ jobId: string(),
16130
+ kind: jobKindSchema,
16131
+ createdAtMs: number(),
16132
+ createdBy: string(),
16133
+ scope: lifecycleJobScopeSchema,
16134
+ tasks: array(lifecycleTaskSchema),
16135
+ state: lifecycleJobStateSchema,
16136
+ schemaVersion: literal(1)
16137
+ });
16074
16138
  /**
16075
16139
  * addons — system-scoped singleton capability for addon package
16076
16140
  * management (install, update, configure, restart) and per-addon log
@@ -16253,7 +16317,7 @@ var BulkUpdatePhaseSchema = _enum([
16253
16317
  "restarting",
16254
16318
  "finalizing"
16255
16319
  ]);
16256
- var BulkUpdateStateSchema = object({
16320
+ object({
16257
16321
  id: string(),
16258
16322
  nodeId: string(),
16259
16323
  startedAtMs: number(),
@@ -16356,20 +16420,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16356
16420
  }), UpdateFrameworkPackageResultSchema, {
16357
16421
  kind: "mutation",
16358
16422
  auth: "admin"
16359
- }), method(object({
16360
- nodeId: string(),
16361
- items: array(object({
16362
- name: string(),
16363
- version: string(),
16364
- isSystem: boolean()
16365
- })).readonly()
16366
- }), object({ id: string() }), {
16367
- kind: "mutation",
16368
- auth: "admin"
16369
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
16370
- kind: "mutation",
16371
- auth: "admin"
16372
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16423
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16373
16424
  kind: "mutation",
16374
16425
  auth: "admin"
16375
16426
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16391,6 +16442,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16391
16442
  kind: "mutation",
16392
16443
  auth: "admin"
16393
16444
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16445
+ kind: _enum([
16446
+ "install",
16447
+ "update",
16448
+ "uninstall",
16449
+ "restart"
16450
+ ]),
16451
+ targets: array(object({
16452
+ name: string().min(1),
16453
+ version: string().min(1)
16454
+ })).min(1),
16455
+ nodeIds: array(string()).optional()
16456
+ }), object({ jobId: string() }), {
16457
+ kind: "mutation",
16458
+ auth: "admin"
16459
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16460
+ kind: "mutation",
16461
+ auth: "admin"
16462
+ }), method(object({
16394
16463
  addonId: string(),
16395
16464
  level: LogLevelSchema$1.optional()
16396
16465
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16431,7 +16500,7 @@ Object.freeze({
16431
16500
  addonId: null,
16432
16501
  access: "create"
16433
16502
  },
16434
- "addons.cancelBulkUpdate": {
16503
+ "addons.cancelJob": {
16435
16504
  capName: "addons",
16436
16505
  capScope: "system",
16437
16506
  addonId: null,
@@ -16461,7 +16530,7 @@ Object.freeze({
16461
16530
  addonId: null,
16462
16531
  access: "view"
16463
16532
  },
16464
- "addons.getBulkUpdateState": {
16533
+ "addons.getJob": {
16465
16534
  capName: "addons",
16466
16535
  capScope: "system",
16467
16536
  addonId: null,
@@ -16509,19 +16578,19 @@ Object.freeze({
16509
16578
  addonId: null,
16510
16579
  access: "view"
16511
16580
  },
16512
- "addons.listActiveBulkUpdates": {
16581
+ "addons.listCapabilityProviders": {
16513
16582
  capName: "addons",
16514
16583
  capScope: "system",
16515
16584
  addonId: null,
16516
16585
  access: "view"
16517
16586
  },
16518
- "addons.listCapabilityProviders": {
16587
+ "addons.listFrameworkPackages": {
16519
16588
  capName: "addons",
16520
16589
  capScope: "system",
16521
16590
  addonId: null,
16522
16591
  access: "view"
16523
16592
  },
16524
- "addons.listFrameworkPackages": {
16593
+ "addons.listJobs": {
16525
16594
  capName: "addons",
16526
16595
  capScope: "system",
16527
16596
  addonId: null,
@@ -16605,7 +16674,7 @@ Object.freeze({
16605
16674
  addonId: null,
16606
16675
  access: "create"
16607
16676
  },
16608
- "addons.startBulkUpdate": {
16677
+ "addons.startJob": {
16609
16678
  capName: "addons",
16610
16679
  capScope: "system",
16611
16680
  addonId: null,
@@ -20592,6 +20661,32 @@ Object.freeze({
20592
20661
  "network-access": "ingress",
20593
20662
  "smtp-provider": "email"
20594
20663
  });
20664
+ var frameworkSwapPackageSchema = object({
20665
+ name: string(),
20666
+ stagedPath: string(),
20667
+ backupPath: string(),
20668
+ toVersion: string(),
20669
+ fromVersion: string().nullable()
20670
+ });
20671
+ object({
20672
+ jobId: string(),
20673
+ taskId: string(),
20674
+ packages: array(frameworkSwapPackageSchema),
20675
+ requestedAtMs: number(),
20676
+ schemaVersion: literal(1)
20677
+ });
20678
+ object({
20679
+ jobId: string(),
20680
+ taskId: string(),
20681
+ backups: array(object({
20682
+ name: string(),
20683
+ backupPath: string(),
20684
+ livePath: string()
20685
+ })),
20686
+ appliedAtMs: number(),
20687
+ bootAttempts: number(),
20688
+ schemaVersion: literal(1)
20689
+ });
20595
20690
  //#endregion
20596
20691
  //#region ../../node_modules/xtend/immutable.js
20597
20692
  var require_immutable = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -5171,14 +5171,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5171
5171
  EventCategory["DeviceSleeping"] = "device.sleeping";
5172
5172
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5173
5173
  /**
5174
- * Progress snapshot emitted by `BulkUpdateCoordinator` on every state
5175
- * transition (item status change, phase change, completion, cancel).
5176
- * Payload is `BulkUpdateState`. Admin UI subscribes via `useLiveEvent`
5177
- * to drive the sticky `BulkUpdateBanner` and per-row `AddonRowBadge`.
5178
- *
5179
- * Spec: docs/superpowers/specs/2026-05-21-addons-bulk-update-progress-design.md
5174
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5175
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5176
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5177
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5178
+ * in F4 once live bulk progress is re-implemented over the engine events.
5180
5179
  */
5181
5180
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5181
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5182
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5182
5183
  /**
5183
5184
  * A container's child visibility toggled (hidden/shown). Emitted by the
5184
5185
  * `accessories` cap when a child device is hidden or revealed.
@@ -16066,6 +16067,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
16066
16067
  kind: "mutation",
16067
16068
  auth: "admin"
16068
16069
  });
16070
+ var jobKindSchema = _enum([
16071
+ "install",
16072
+ "update",
16073
+ "uninstall",
16074
+ "restart"
16075
+ ]);
16076
+ var taskPhaseSchema = _enum([
16077
+ "queued",
16078
+ "fetching",
16079
+ "staged",
16080
+ "validating",
16081
+ "applying",
16082
+ "restarting",
16083
+ "applied",
16084
+ "done",
16085
+ "failed",
16086
+ "skipped"
16087
+ ]);
16088
+ var taskTargetSchema = _enum(["framework", "addon"]);
16089
+ var taskLogEntrySchema = object({
16090
+ tsMs: number(),
16091
+ nodeId: string(),
16092
+ packageName: string(),
16093
+ phase: taskPhaseSchema,
16094
+ message: string()
16095
+ });
16096
+ var lifecycleTaskSchema = object({
16097
+ taskId: string(),
16098
+ nodeId: string(),
16099
+ packageName: string(),
16100
+ fromVersion: string().nullable(),
16101
+ toVersion: string(),
16102
+ target: taskTargetSchema,
16103
+ phase: taskPhaseSchema,
16104
+ stagedPath: string().nullable(),
16105
+ attempts: number(),
16106
+ steps: array(taskLogEntrySchema),
16107
+ error: string().nullable(),
16108
+ startedAtMs: number().nullable(),
16109
+ finishedAtMs: number().nullable()
16110
+ });
16111
+ var lifecycleJobStateSchema = _enum([
16112
+ "running",
16113
+ "completed",
16114
+ "failed",
16115
+ "partially-failed",
16116
+ "cancelled"
16117
+ ]);
16118
+ var lifecycleJobScopeSchema = _enum([
16119
+ "single",
16120
+ "bulk",
16121
+ "cluster"
16122
+ ]);
16123
+ var lifecycleJobSchema = object({
16124
+ jobId: string(),
16125
+ kind: jobKindSchema,
16126
+ createdAtMs: number(),
16127
+ createdBy: string(),
16128
+ scope: lifecycleJobScopeSchema,
16129
+ tasks: array(lifecycleTaskSchema),
16130
+ state: lifecycleJobStateSchema,
16131
+ schemaVersion: literal(1)
16132
+ });
16069
16133
  /**
16070
16134
  * addons — system-scoped singleton capability for addon package
16071
16135
  * management (install, update, configure, restart) and per-addon log
@@ -16248,7 +16312,7 @@ var BulkUpdatePhaseSchema = _enum([
16248
16312
  "restarting",
16249
16313
  "finalizing"
16250
16314
  ]);
16251
- var BulkUpdateStateSchema = object({
16315
+ object({
16252
16316
  id: string(),
16253
16317
  nodeId: string(),
16254
16318
  startedAtMs: number(),
@@ -16351,20 +16415,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16351
16415
  }), UpdateFrameworkPackageResultSchema, {
16352
16416
  kind: "mutation",
16353
16417
  auth: "admin"
16354
- }), method(object({
16355
- nodeId: string(),
16356
- items: array(object({
16357
- name: string(),
16358
- version: string(),
16359
- isSystem: boolean()
16360
- })).readonly()
16361
- }), object({ id: string() }), {
16362
- kind: "mutation",
16363
- auth: "admin"
16364
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
16365
- kind: "mutation",
16366
- auth: "admin"
16367
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16418
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16368
16419
  kind: "mutation",
16369
16420
  auth: "admin"
16370
16421
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16386,6 +16437,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16386
16437
  kind: "mutation",
16387
16438
  auth: "admin"
16388
16439
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16440
+ kind: _enum([
16441
+ "install",
16442
+ "update",
16443
+ "uninstall",
16444
+ "restart"
16445
+ ]),
16446
+ targets: array(object({
16447
+ name: string().min(1),
16448
+ version: string().min(1)
16449
+ })).min(1),
16450
+ nodeIds: array(string()).optional()
16451
+ }), object({ jobId: string() }), {
16452
+ kind: "mutation",
16453
+ auth: "admin"
16454
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16455
+ kind: "mutation",
16456
+ auth: "admin"
16457
+ }), method(object({
16389
16458
  addonId: string(),
16390
16459
  level: LogLevelSchema$1.optional()
16391
16460
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16426,7 +16495,7 @@ Object.freeze({
16426
16495
  addonId: null,
16427
16496
  access: "create"
16428
16497
  },
16429
- "addons.cancelBulkUpdate": {
16498
+ "addons.cancelJob": {
16430
16499
  capName: "addons",
16431
16500
  capScope: "system",
16432
16501
  addonId: null,
@@ -16456,7 +16525,7 @@ Object.freeze({
16456
16525
  addonId: null,
16457
16526
  access: "view"
16458
16527
  },
16459
- "addons.getBulkUpdateState": {
16528
+ "addons.getJob": {
16460
16529
  capName: "addons",
16461
16530
  capScope: "system",
16462
16531
  addonId: null,
@@ -16504,19 +16573,19 @@ Object.freeze({
16504
16573
  addonId: null,
16505
16574
  access: "view"
16506
16575
  },
16507
- "addons.listActiveBulkUpdates": {
16576
+ "addons.listCapabilityProviders": {
16508
16577
  capName: "addons",
16509
16578
  capScope: "system",
16510
16579
  addonId: null,
16511
16580
  access: "view"
16512
16581
  },
16513
- "addons.listCapabilityProviders": {
16582
+ "addons.listFrameworkPackages": {
16514
16583
  capName: "addons",
16515
16584
  capScope: "system",
16516
16585
  addonId: null,
16517
16586
  access: "view"
16518
16587
  },
16519
- "addons.listFrameworkPackages": {
16588
+ "addons.listJobs": {
16520
16589
  capName: "addons",
16521
16590
  capScope: "system",
16522
16591
  addonId: null,
@@ -16600,7 +16669,7 @@ Object.freeze({
16600
16669
  addonId: null,
16601
16670
  access: "create"
16602
16671
  },
16603
- "addons.startBulkUpdate": {
16672
+ "addons.startJob": {
16604
16673
  capName: "addons",
16605
16674
  capScope: "system",
16606
16675
  addonId: null,
@@ -20587,6 +20656,32 @@ Object.freeze({
20587
20656
  "network-access": "ingress",
20588
20657
  "smtp-provider": "email"
20589
20658
  });
20659
+ var frameworkSwapPackageSchema = object({
20660
+ name: string(),
20661
+ stagedPath: string(),
20662
+ backupPath: string(),
20663
+ toVersion: string(),
20664
+ fromVersion: string().nullable()
20665
+ });
20666
+ object({
20667
+ jobId: string(),
20668
+ taskId: string(),
20669
+ packages: array(frameworkSwapPackageSchema),
20670
+ requestedAtMs: number(),
20671
+ schemaVersion: literal(1)
20672
+ });
20673
+ object({
20674
+ jobId: string(),
20675
+ taskId: string(),
20676
+ backups: array(object({
20677
+ name: string(),
20678
+ backupPath: string(),
20679
+ livePath: string()
20680
+ })),
20681
+ appliedAtMs: number(),
20682
+ bootAttempts: number(),
20683
+ schemaVersion: literal(1)
20684
+ });
20590
20685
  //#endregion
20591
20686
  //#region ../../node_modules/xtend/immutable.js
20592
20687
  var require_immutable = /* @__PURE__ */ __commonJSMin(((exports, module) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-mqtt-broker",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
5
5
  "keywords": [
6
6
  "camstack",