@camstack/addon-export-ha-mqtt 1.0.2 → 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.
@@ -5182,14 +5182,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5182
5182
  EventCategory["DeviceSleeping"] = "device.sleeping";
5183
5183
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5184
5184
  /**
5185
- * Progress snapshot emitted by `BulkUpdateCoordinator` on every state
5186
- * transition (item status change, phase change, completion, cancel).
5187
- * Payload is `BulkUpdateState`. Admin UI subscribes via `useLiveEvent`
5188
- * to drive the sticky `BulkUpdateBanner` and per-row `AddonRowBadge`.
5189
- *
5190
- * Spec: docs/superpowers/specs/2026-05-21-addons-bulk-update-progress-design.md
5185
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5186
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5187
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5188
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5189
+ * in F4 once live bulk progress is re-implemented over the engine events.
5191
5190
  */
5192
5191
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5192
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5193
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5193
5194
  /**
5194
5195
  * A container's child visibility toggled (hidden/shown). Emitted by the
5195
5196
  * `accessories` cap when a child device is hidden or revealed.
@@ -16034,6 +16035,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
16034
16035
  kind: "mutation",
16035
16036
  auth: "admin"
16036
16037
  });
16038
+ var jobKindSchema = _enum([
16039
+ "install",
16040
+ "update",
16041
+ "uninstall",
16042
+ "restart"
16043
+ ]);
16044
+ var taskPhaseSchema = _enum([
16045
+ "queued",
16046
+ "fetching",
16047
+ "staged",
16048
+ "validating",
16049
+ "applying",
16050
+ "restarting",
16051
+ "applied",
16052
+ "done",
16053
+ "failed",
16054
+ "skipped"
16055
+ ]);
16056
+ var taskTargetSchema = _enum(["framework", "addon"]);
16057
+ var taskLogEntrySchema = object({
16058
+ tsMs: number$1(),
16059
+ nodeId: string(),
16060
+ packageName: string(),
16061
+ phase: taskPhaseSchema,
16062
+ message: string()
16063
+ });
16064
+ var lifecycleTaskSchema = object({
16065
+ taskId: string(),
16066
+ nodeId: string(),
16067
+ packageName: string(),
16068
+ fromVersion: string().nullable(),
16069
+ toVersion: string(),
16070
+ target: taskTargetSchema,
16071
+ phase: taskPhaseSchema,
16072
+ stagedPath: string().nullable(),
16073
+ attempts: number$1(),
16074
+ steps: array(taskLogEntrySchema),
16075
+ error: string().nullable(),
16076
+ startedAtMs: number$1().nullable(),
16077
+ finishedAtMs: number$1().nullable()
16078
+ });
16079
+ var lifecycleJobStateSchema = _enum([
16080
+ "running",
16081
+ "completed",
16082
+ "failed",
16083
+ "partially-failed",
16084
+ "cancelled"
16085
+ ]);
16086
+ var lifecycleJobScopeSchema = _enum([
16087
+ "single",
16088
+ "bulk",
16089
+ "cluster"
16090
+ ]);
16091
+ var lifecycleJobSchema = object({
16092
+ jobId: string(),
16093
+ kind: jobKindSchema,
16094
+ createdAtMs: number$1(),
16095
+ createdBy: string(),
16096
+ scope: lifecycleJobScopeSchema,
16097
+ tasks: array(lifecycleTaskSchema),
16098
+ state: lifecycleJobStateSchema,
16099
+ schemaVersion: literal(1)
16100
+ });
16037
16101
  /**
16038
16102
  * addons — system-scoped singleton capability for addon package
16039
16103
  * management (install, update, configure, restart) and per-addon log
@@ -16216,7 +16280,7 @@ var BulkUpdatePhaseSchema = _enum([
16216
16280
  "restarting",
16217
16281
  "finalizing"
16218
16282
  ]);
16219
- var BulkUpdateStateSchema = object({
16283
+ object({
16220
16284
  id: string(),
16221
16285
  nodeId: string(),
16222
16286
  startedAtMs: number$1(),
@@ -16319,20 +16383,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16319
16383
  }), UpdateFrameworkPackageResultSchema, {
16320
16384
  kind: "mutation",
16321
16385
  auth: "admin"
16322
- }), method(object({
16323
- nodeId: string(),
16324
- items: array(object({
16325
- name: string(),
16326
- version: string(),
16327
- isSystem: boolean()
16328
- })).readonly()
16329
- }), object({ id: string() }), {
16330
- kind: "mutation",
16331
- auth: "admin"
16332
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
16333
- kind: "mutation",
16334
- auth: "admin"
16335
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16386
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16336
16387
  kind: "mutation",
16337
16388
  auth: "admin"
16338
16389
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16354,6 +16405,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16354
16405
  kind: "mutation",
16355
16406
  auth: "admin"
16356
16407
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16408
+ kind: _enum([
16409
+ "install",
16410
+ "update",
16411
+ "uninstall",
16412
+ "restart"
16413
+ ]),
16414
+ targets: array(object({
16415
+ name: string().min(1),
16416
+ version: string().min(1)
16417
+ })).min(1),
16418
+ nodeIds: array(string()).optional()
16419
+ }), object({ jobId: string() }), {
16420
+ kind: "mutation",
16421
+ auth: "admin"
16422
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16423
+ kind: "mutation",
16424
+ auth: "admin"
16425
+ }), method(object({
16357
16426
  addonId: string(),
16358
16427
  level: LogLevelSchema$1.optional()
16359
16428
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16394,7 +16463,7 @@ Object.freeze({
16394
16463
  addonId: null,
16395
16464
  access: "create"
16396
16465
  },
16397
- "addons.cancelBulkUpdate": {
16466
+ "addons.cancelJob": {
16398
16467
  capName: "addons",
16399
16468
  capScope: "system",
16400
16469
  addonId: null,
@@ -16424,7 +16493,7 @@ Object.freeze({
16424
16493
  addonId: null,
16425
16494
  access: "view"
16426
16495
  },
16427
- "addons.getBulkUpdateState": {
16496
+ "addons.getJob": {
16428
16497
  capName: "addons",
16429
16498
  capScope: "system",
16430
16499
  addonId: null,
@@ -16472,19 +16541,19 @@ Object.freeze({
16472
16541
  addonId: null,
16473
16542
  access: "view"
16474
16543
  },
16475
- "addons.listActiveBulkUpdates": {
16544
+ "addons.listCapabilityProviders": {
16476
16545
  capName: "addons",
16477
16546
  capScope: "system",
16478
16547
  addonId: null,
16479
16548
  access: "view"
16480
16549
  },
16481
- "addons.listCapabilityProviders": {
16550
+ "addons.listFrameworkPackages": {
16482
16551
  capName: "addons",
16483
16552
  capScope: "system",
16484
16553
  addonId: null,
16485
16554
  access: "view"
16486
16555
  },
16487
- "addons.listFrameworkPackages": {
16556
+ "addons.listJobs": {
16488
16557
  capName: "addons",
16489
16558
  capScope: "system",
16490
16559
  addonId: null,
@@ -16568,7 +16637,7 @@ Object.freeze({
16568
16637
  addonId: null,
16569
16638
  access: "create"
16570
16639
  },
16571
- "addons.startBulkUpdate": {
16640
+ "addons.startJob": {
16572
16641
  capName: "addons",
16573
16642
  capScope: "system",
16574
16643
  addonId: null,
@@ -20555,6 +20624,32 @@ Object.freeze({
20555
20624
  "network-access": "ingress",
20556
20625
  "smtp-provider": "email"
20557
20626
  });
20627
+ var frameworkSwapPackageSchema = object({
20628
+ name: string(),
20629
+ stagedPath: string(),
20630
+ backupPath: string(),
20631
+ toVersion: string(),
20632
+ fromVersion: string().nullable()
20633
+ });
20634
+ object({
20635
+ jobId: string(),
20636
+ taskId: string(),
20637
+ packages: array(frameworkSwapPackageSchema),
20638
+ requestedAtMs: number$1(),
20639
+ schemaVersion: literal(1)
20640
+ });
20641
+ object({
20642
+ jobId: string(),
20643
+ taskId: string(),
20644
+ backups: array(object({
20645
+ name: string(),
20646
+ backupPath: string(),
20647
+ livePath: string()
20648
+ })),
20649
+ appliedAtMs: number$1(),
20650
+ bootAttempts: number$1(),
20651
+ schemaVersion: literal(1)
20652
+ });
20558
20653
  //#endregion
20559
20654
  //#region ../../node_modules/readable-stream/lib/ours/primordials.js
20560
20655
  var require_primordials = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -5180,14 +5180,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5180
5180
  EventCategory["DeviceSleeping"] = "device.sleeping";
5181
5181
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5182
5182
  /**
5183
- * Progress snapshot emitted by `BulkUpdateCoordinator` on every state
5184
- * transition (item status change, phase change, completion, cancel).
5185
- * Payload is `BulkUpdateState`. Admin UI subscribes via `useLiveEvent`
5186
- * to drive the sticky `BulkUpdateBanner` and per-row `AddonRowBadge`.
5187
- *
5188
- * Spec: docs/superpowers/specs/2026-05-21-addons-bulk-update-progress-design.md
5183
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5184
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5185
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5186
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5187
+ * in F4 once live bulk progress is re-implemented over the engine events.
5189
5188
  */
5190
5189
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5190
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5191
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5191
5192
  /**
5192
5193
  * A container's child visibility toggled (hidden/shown). Emitted by the
5193
5194
  * `accessories` cap when a child device is hidden or revealed.
@@ -16032,6 +16033,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
16032
16033
  kind: "mutation",
16033
16034
  auth: "admin"
16034
16035
  });
16036
+ var jobKindSchema = _enum([
16037
+ "install",
16038
+ "update",
16039
+ "uninstall",
16040
+ "restart"
16041
+ ]);
16042
+ var taskPhaseSchema = _enum([
16043
+ "queued",
16044
+ "fetching",
16045
+ "staged",
16046
+ "validating",
16047
+ "applying",
16048
+ "restarting",
16049
+ "applied",
16050
+ "done",
16051
+ "failed",
16052
+ "skipped"
16053
+ ]);
16054
+ var taskTargetSchema = _enum(["framework", "addon"]);
16055
+ var taskLogEntrySchema = object({
16056
+ tsMs: number$1(),
16057
+ nodeId: string(),
16058
+ packageName: string(),
16059
+ phase: taskPhaseSchema,
16060
+ message: string()
16061
+ });
16062
+ var lifecycleTaskSchema = object({
16063
+ taskId: string(),
16064
+ nodeId: string(),
16065
+ packageName: string(),
16066
+ fromVersion: string().nullable(),
16067
+ toVersion: string(),
16068
+ target: taskTargetSchema,
16069
+ phase: taskPhaseSchema,
16070
+ stagedPath: string().nullable(),
16071
+ attempts: number$1(),
16072
+ steps: array(taskLogEntrySchema),
16073
+ error: string().nullable(),
16074
+ startedAtMs: number$1().nullable(),
16075
+ finishedAtMs: number$1().nullable()
16076
+ });
16077
+ var lifecycleJobStateSchema = _enum([
16078
+ "running",
16079
+ "completed",
16080
+ "failed",
16081
+ "partially-failed",
16082
+ "cancelled"
16083
+ ]);
16084
+ var lifecycleJobScopeSchema = _enum([
16085
+ "single",
16086
+ "bulk",
16087
+ "cluster"
16088
+ ]);
16089
+ var lifecycleJobSchema = object({
16090
+ jobId: string(),
16091
+ kind: jobKindSchema,
16092
+ createdAtMs: number$1(),
16093
+ createdBy: string(),
16094
+ scope: lifecycleJobScopeSchema,
16095
+ tasks: array(lifecycleTaskSchema),
16096
+ state: lifecycleJobStateSchema,
16097
+ schemaVersion: literal(1)
16098
+ });
16035
16099
  /**
16036
16100
  * addons — system-scoped singleton capability for addon package
16037
16101
  * management (install, update, configure, restart) and per-addon log
@@ -16214,7 +16278,7 @@ var BulkUpdatePhaseSchema = _enum([
16214
16278
  "restarting",
16215
16279
  "finalizing"
16216
16280
  ]);
16217
- var BulkUpdateStateSchema = object({
16281
+ object({
16218
16282
  id: string(),
16219
16283
  nodeId: string(),
16220
16284
  startedAtMs: number$1(),
@@ -16317,20 +16381,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16317
16381
  }), UpdateFrameworkPackageResultSchema, {
16318
16382
  kind: "mutation",
16319
16383
  auth: "admin"
16320
- }), method(object({
16321
- nodeId: string(),
16322
- items: array(object({
16323
- name: string(),
16324
- version: string(),
16325
- isSystem: boolean()
16326
- })).readonly()
16327
- }), object({ id: string() }), {
16328
- kind: "mutation",
16329
- auth: "admin"
16330
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
16331
- kind: "mutation",
16332
- auth: "admin"
16333
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16384
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16334
16385
  kind: "mutation",
16335
16386
  auth: "admin"
16336
16387
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16352,6 +16403,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16352
16403
  kind: "mutation",
16353
16404
  auth: "admin"
16354
16405
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16406
+ kind: _enum([
16407
+ "install",
16408
+ "update",
16409
+ "uninstall",
16410
+ "restart"
16411
+ ]),
16412
+ targets: array(object({
16413
+ name: string().min(1),
16414
+ version: string().min(1)
16415
+ })).min(1),
16416
+ nodeIds: array(string()).optional()
16417
+ }), object({ jobId: string() }), {
16418
+ kind: "mutation",
16419
+ auth: "admin"
16420
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16421
+ kind: "mutation",
16422
+ auth: "admin"
16423
+ }), method(object({
16355
16424
  addonId: string(),
16356
16425
  level: LogLevelSchema$1.optional()
16357
16426
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16392,7 +16461,7 @@ Object.freeze({
16392
16461
  addonId: null,
16393
16462
  access: "create"
16394
16463
  },
16395
- "addons.cancelBulkUpdate": {
16464
+ "addons.cancelJob": {
16396
16465
  capName: "addons",
16397
16466
  capScope: "system",
16398
16467
  addonId: null,
@@ -16422,7 +16491,7 @@ Object.freeze({
16422
16491
  addonId: null,
16423
16492
  access: "view"
16424
16493
  },
16425
- "addons.getBulkUpdateState": {
16494
+ "addons.getJob": {
16426
16495
  capName: "addons",
16427
16496
  capScope: "system",
16428
16497
  addonId: null,
@@ -16470,19 +16539,19 @@ Object.freeze({
16470
16539
  addonId: null,
16471
16540
  access: "view"
16472
16541
  },
16473
- "addons.listActiveBulkUpdates": {
16542
+ "addons.listCapabilityProviders": {
16474
16543
  capName: "addons",
16475
16544
  capScope: "system",
16476
16545
  addonId: null,
16477
16546
  access: "view"
16478
16547
  },
16479
- "addons.listCapabilityProviders": {
16548
+ "addons.listFrameworkPackages": {
16480
16549
  capName: "addons",
16481
16550
  capScope: "system",
16482
16551
  addonId: null,
16483
16552
  access: "view"
16484
16553
  },
16485
- "addons.listFrameworkPackages": {
16554
+ "addons.listJobs": {
16486
16555
  capName: "addons",
16487
16556
  capScope: "system",
16488
16557
  addonId: null,
@@ -16566,7 +16635,7 @@ Object.freeze({
16566
16635
  addonId: null,
16567
16636
  access: "create"
16568
16637
  },
16569
- "addons.startBulkUpdate": {
16638
+ "addons.startJob": {
16570
16639
  capName: "addons",
16571
16640
  capScope: "system",
16572
16641
  addonId: null,
@@ -20553,6 +20622,32 @@ Object.freeze({
20553
20622
  "network-access": "ingress",
20554
20623
  "smtp-provider": "email"
20555
20624
  });
20625
+ var frameworkSwapPackageSchema = object({
20626
+ name: string(),
20627
+ stagedPath: string(),
20628
+ backupPath: string(),
20629
+ toVersion: string(),
20630
+ fromVersion: string().nullable()
20631
+ });
20632
+ object({
20633
+ jobId: string(),
20634
+ taskId: string(),
20635
+ packages: array(frameworkSwapPackageSchema),
20636
+ requestedAtMs: number$1(),
20637
+ schemaVersion: literal(1)
20638
+ });
20639
+ object({
20640
+ jobId: string(),
20641
+ taskId: string(),
20642
+ backups: array(object({
20643
+ name: string(),
20644
+ backupPath: string(),
20645
+ livePath: string()
20646
+ })),
20647
+ appliedAtMs: number$1(),
20648
+ bootAttempts: number$1(),
20649
+ schemaVersion: literal(1)
20650
+ });
20556
20651
  //#endregion
20557
20652
  //#region ../../node_modules/readable-stream/lib/ours/primordials.js
20558
20653
  var require_primordials = /* @__PURE__ */ __commonJSMin(((exports, module) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-ha-mqtt",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "HomeAssistant MQTT discovery exporter for CamStack devices. Publishes discovery topics so HA auto-creates entities for exposed cameras/switches/intercoms/sensors.",
5
5
  "keywords": [
6
6
  "camstack",