@camstack/addon-provider-homeassistant 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.
Files changed (3) hide show
  1. package/dist/addon.js +122 -27
  2. package/dist/addon.mjs +122 -27
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -5132,14 +5132,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5132
5132
  EventCategory["DeviceSleeping"] = "device.sleeping";
5133
5133
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5134
5134
  /**
5135
- * Progress snapshot emitted by `BulkUpdateCoordinator` on every state
5136
- * transition (item status change, phase change, completion, cancel).
5137
- * Payload is `BulkUpdateState`. Admin UI subscribes via `useLiveEvent`
5138
- * to drive the sticky `BulkUpdateBanner` and per-row `AddonRowBadge`.
5139
- *
5140
- * Spec: docs/superpowers/specs/2026-05-21-addons-bulk-update-progress-design.md
5135
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5136
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5137
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5138
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5139
+ * in F4 once live bulk progress is re-implemented over the engine events.
5141
5140
  */
5142
5141
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5142
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5143
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5143
5144
  /**
5144
5145
  * A container's child visibility toggled (hidden/shown). Emitted by the
5145
5146
  * `accessories` cap when a child device is hidden or revealed.
@@ -18937,6 +18938,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
18937
18938
  kind: "mutation",
18938
18939
  auth: "admin"
18939
18940
  });
18941
+ var jobKindSchema = _enum([
18942
+ "install",
18943
+ "update",
18944
+ "uninstall",
18945
+ "restart"
18946
+ ]);
18947
+ var taskPhaseSchema = _enum([
18948
+ "queued",
18949
+ "fetching",
18950
+ "staged",
18951
+ "validating",
18952
+ "applying",
18953
+ "restarting",
18954
+ "applied",
18955
+ "done",
18956
+ "failed",
18957
+ "skipped"
18958
+ ]);
18959
+ var taskTargetSchema = _enum(["framework", "addon"]);
18960
+ var taskLogEntrySchema = object({
18961
+ tsMs: number(),
18962
+ nodeId: string(),
18963
+ packageName: string(),
18964
+ phase: taskPhaseSchema,
18965
+ message: string()
18966
+ });
18967
+ var lifecycleTaskSchema = object({
18968
+ taskId: string(),
18969
+ nodeId: string(),
18970
+ packageName: string(),
18971
+ fromVersion: string().nullable(),
18972
+ toVersion: string(),
18973
+ target: taskTargetSchema,
18974
+ phase: taskPhaseSchema,
18975
+ stagedPath: string().nullable(),
18976
+ attempts: number(),
18977
+ steps: array(taskLogEntrySchema),
18978
+ error: string().nullable(),
18979
+ startedAtMs: number().nullable(),
18980
+ finishedAtMs: number().nullable()
18981
+ });
18982
+ var lifecycleJobStateSchema = _enum([
18983
+ "running",
18984
+ "completed",
18985
+ "failed",
18986
+ "partially-failed",
18987
+ "cancelled"
18988
+ ]);
18989
+ var lifecycleJobScopeSchema = _enum([
18990
+ "single",
18991
+ "bulk",
18992
+ "cluster"
18993
+ ]);
18994
+ var lifecycleJobSchema = object({
18995
+ jobId: string(),
18996
+ kind: jobKindSchema,
18997
+ createdAtMs: number(),
18998
+ createdBy: string(),
18999
+ scope: lifecycleJobScopeSchema,
19000
+ tasks: array(lifecycleTaskSchema),
19001
+ state: lifecycleJobStateSchema,
19002
+ schemaVersion: literal(1)
19003
+ });
18940
19004
  /**
18941
19005
  * addons — system-scoped singleton capability for addon package
18942
19006
  * management (install, update, configure, restart) and per-addon log
@@ -19119,7 +19183,7 @@ var BulkUpdatePhaseSchema = _enum([
19119
19183
  "restarting",
19120
19184
  "finalizing"
19121
19185
  ]);
19122
- var BulkUpdateStateSchema = object({
19186
+ object({
19123
19187
  id: string(),
19124
19188
  nodeId: string(),
19125
19189
  startedAtMs: number(),
@@ -19222,20 +19286,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
19222
19286
  }), UpdateFrameworkPackageResultSchema, {
19223
19287
  kind: "mutation",
19224
19288
  auth: "admin"
19225
- }), method(object({
19226
- nodeId: string(),
19227
- items: array(object({
19228
- name: string(),
19229
- version: string(),
19230
- isSystem: boolean()
19231
- })).readonly()
19232
- }), object({ id: string() }), {
19233
- kind: "mutation",
19234
- auth: "admin"
19235
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
19236
- kind: "mutation",
19237
- auth: "admin"
19238
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
19289
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
19239
19290
  kind: "mutation",
19240
19291
  auth: "admin"
19241
19292
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -19257,6 +19308,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
19257
19308
  kind: "mutation",
19258
19309
  auth: "admin"
19259
19310
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
19311
+ kind: _enum([
19312
+ "install",
19313
+ "update",
19314
+ "uninstall",
19315
+ "restart"
19316
+ ]),
19317
+ targets: array(object({
19318
+ name: string().min(1),
19319
+ version: string().min(1)
19320
+ })).min(1),
19321
+ nodeIds: array(string()).optional()
19322
+ }), object({ jobId: string() }), {
19323
+ kind: "mutation",
19324
+ auth: "admin"
19325
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
19326
+ kind: "mutation",
19327
+ auth: "admin"
19328
+ }), method(object({
19260
19329
  addonId: string(),
19261
19330
  level: LogLevelSchema$1.optional()
19262
19331
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -19297,7 +19366,7 @@ Object.freeze({
19297
19366
  addonId: null,
19298
19367
  access: "create"
19299
19368
  },
19300
- "addons.cancelBulkUpdate": {
19369
+ "addons.cancelJob": {
19301
19370
  capName: "addons",
19302
19371
  capScope: "system",
19303
19372
  addonId: null,
@@ -19327,7 +19396,7 @@ Object.freeze({
19327
19396
  addonId: null,
19328
19397
  access: "view"
19329
19398
  },
19330
- "addons.getBulkUpdateState": {
19399
+ "addons.getJob": {
19331
19400
  capName: "addons",
19332
19401
  capScope: "system",
19333
19402
  addonId: null,
@@ -19375,19 +19444,19 @@ Object.freeze({
19375
19444
  addonId: null,
19376
19445
  access: "view"
19377
19446
  },
19378
- "addons.listActiveBulkUpdates": {
19447
+ "addons.listCapabilityProviders": {
19379
19448
  capName: "addons",
19380
19449
  capScope: "system",
19381
19450
  addonId: null,
19382
19451
  access: "view"
19383
19452
  },
19384
- "addons.listCapabilityProviders": {
19453
+ "addons.listFrameworkPackages": {
19385
19454
  capName: "addons",
19386
19455
  capScope: "system",
19387
19456
  addonId: null,
19388
19457
  access: "view"
19389
19458
  },
19390
- "addons.listFrameworkPackages": {
19459
+ "addons.listJobs": {
19391
19460
  capName: "addons",
19392
19461
  capScope: "system",
19393
19462
  addonId: null,
@@ -19471,7 +19540,7 @@ Object.freeze({
19471
19540
  addonId: null,
19472
19541
  access: "create"
19473
19542
  },
19474
- "addons.startBulkUpdate": {
19543
+ "addons.startJob": {
19475
19544
  capName: "addons",
19476
19545
  capScope: "system",
19477
19546
  addonId: null,
@@ -23458,6 +23527,32 @@ Object.freeze({
23458
23527
  "network-access": "ingress",
23459
23528
  "smtp-provider": "email"
23460
23529
  });
23530
+ var frameworkSwapPackageSchema = object({
23531
+ name: string(),
23532
+ stagedPath: string(),
23533
+ backupPath: string(),
23534
+ toVersion: string(),
23535
+ fromVersion: string().nullable()
23536
+ });
23537
+ object({
23538
+ jobId: string(),
23539
+ taskId: string(),
23540
+ packages: array(frameworkSwapPackageSchema),
23541
+ requestedAtMs: number(),
23542
+ schemaVersion: literal(1)
23543
+ });
23544
+ object({
23545
+ jobId: string(),
23546
+ taskId: string(),
23547
+ backups: array(object({
23548
+ name: string(),
23549
+ backupPath: string(),
23550
+ livePath: string()
23551
+ })),
23552
+ appliedAtMs: number(),
23553
+ bootAttempts: number(),
23554
+ schemaVersion: literal(1)
23555
+ });
23461
23556
  /**
23462
23557
  * Pure fuzzy matcher for adoption location import. Normalized
23463
23558
  * case-insensitive Levenshtein similarity, used to reuse an existing
package/dist/addon.mjs CHANGED
@@ -5131,14 +5131,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5131
5131
  EventCategory["DeviceSleeping"] = "device.sleeping";
5132
5132
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5133
5133
  /**
5134
- * Progress snapshot emitted by `BulkUpdateCoordinator` on every state
5135
- * transition (item status change, phase change, completion, cancel).
5136
- * Payload is `BulkUpdateState`. Admin UI subscribes via `useLiveEvent`
5137
- * to drive the sticky `BulkUpdateBanner` and per-row `AddonRowBadge`.
5138
- *
5139
- * Spec: docs/superpowers/specs/2026-05-21-addons-bulk-update-progress-design.md
5134
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5135
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5136
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5137
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5138
+ * in F4 once live bulk progress is re-implemented over the engine events.
5140
5139
  */
5141
5140
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5141
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5142
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5142
5143
  /**
5143
5144
  * A container's child visibility toggled (hidden/shown). Emitted by the
5144
5145
  * `accessories` cap when a child device is hidden or revealed.
@@ -18936,6 +18937,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
18936
18937
  kind: "mutation",
18937
18938
  auth: "admin"
18938
18939
  });
18940
+ var jobKindSchema = _enum([
18941
+ "install",
18942
+ "update",
18943
+ "uninstall",
18944
+ "restart"
18945
+ ]);
18946
+ var taskPhaseSchema = _enum([
18947
+ "queued",
18948
+ "fetching",
18949
+ "staged",
18950
+ "validating",
18951
+ "applying",
18952
+ "restarting",
18953
+ "applied",
18954
+ "done",
18955
+ "failed",
18956
+ "skipped"
18957
+ ]);
18958
+ var taskTargetSchema = _enum(["framework", "addon"]);
18959
+ var taskLogEntrySchema = object({
18960
+ tsMs: number(),
18961
+ nodeId: string(),
18962
+ packageName: string(),
18963
+ phase: taskPhaseSchema,
18964
+ message: string()
18965
+ });
18966
+ var lifecycleTaskSchema = object({
18967
+ taskId: string(),
18968
+ nodeId: string(),
18969
+ packageName: string(),
18970
+ fromVersion: string().nullable(),
18971
+ toVersion: string(),
18972
+ target: taskTargetSchema,
18973
+ phase: taskPhaseSchema,
18974
+ stagedPath: string().nullable(),
18975
+ attempts: number(),
18976
+ steps: array(taskLogEntrySchema),
18977
+ error: string().nullable(),
18978
+ startedAtMs: number().nullable(),
18979
+ finishedAtMs: number().nullable()
18980
+ });
18981
+ var lifecycleJobStateSchema = _enum([
18982
+ "running",
18983
+ "completed",
18984
+ "failed",
18985
+ "partially-failed",
18986
+ "cancelled"
18987
+ ]);
18988
+ var lifecycleJobScopeSchema = _enum([
18989
+ "single",
18990
+ "bulk",
18991
+ "cluster"
18992
+ ]);
18993
+ var lifecycleJobSchema = object({
18994
+ jobId: string(),
18995
+ kind: jobKindSchema,
18996
+ createdAtMs: number(),
18997
+ createdBy: string(),
18998
+ scope: lifecycleJobScopeSchema,
18999
+ tasks: array(lifecycleTaskSchema),
19000
+ state: lifecycleJobStateSchema,
19001
+ schemaVersion: literal(1)
19002
+ });
18939
19003
  /**
18940
19004
  * addons — system-scoped singleton capability for addon package
18941
19005
  * management (install, update, configure, restart) and per-addon log
@@ -19118,7 +19182,7 @@ var BulkUpdatePhaseSchema = _enum([
19118
19182
  "restarting",
19119
19183
  "finalizing"
19120
19184
  ]);
19121
- var BulkUpdateStateSchema = object({
19185
+ object({
19122
19186
  id: string(),
19123
19187
  nodeId: string(),
19124
19188
  startedAtMs: number(),
@@ -19221,20 +19285,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
19221
19285
  }), UpdateFrameworkPackageResultSchema, {
19222
19286
  kind: "mutation",
19223
19287
  auth: "admin"
19224
- }), method(object({
19225
- nodeId: string(),
19226
- items: array(object({
19227
- name: string(),
19228
- version: string(),
19229
- isSystem: boolean()
19230
- })).readonly()
19231
- }), object({ id: string() }), {
19232
- kind: "mutation",
19233
- auth: "admin"
19234
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
19235
- kind: "mutation",
19236
- auth: "admin"
19237
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
19288
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
19238
19289
  kind: "mutation",
19239
19290
  auth: "admin"
19240
19291
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -19256,6 +19307,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
19256
19307
  kind: "mutation",
19257
19308
  auth: "admin"
19258
19309
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
19310
+ kind: _enum([
19311
+ "install",
19312
+ "update",
19313
+ "uninstall",
19314
+ "restart"
19315
+ ]),
19316
+ targets: array(object({
19317
+ name: string().min(1),
19318
+ version: string().min(1)
19319
+ })).min(1),
19320
+ nodeIds: array(string()).optional()
19321
+ }), object({ jobId: string() }), {
19322
+ kind: "mutation",
19323
+ auth: "admin"
19324
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
19325
+ kind: "mutation",
19326
+ auth: "admin"
19327
+ }), method(object({
19259
19328
  addonId: string(),
19260
19329
  level: LogLevelSchema$1.optional()
19261
19330
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -19296,7 +19365,7 @@ Object.freeze({
19296
19365
  addonId: null,
19297
19366
  access: "create"
19298
19367
  },
19299
- "addons.cancelBulkUpdate": {
19368
+ "addons.cancelJob": {
19300
19369
  capName: "addons",
19301
19370
  capScope: "system",
19302
19371
  addonId: null,
@@ -19326,7 +19395,7 @@ Object.freeze({
19326
19395
  addonId: null,
19327
19396
  access: "view"
19328
19397
  },
19329
- "addons.getBulkUpdateState": {
19398
+ "addons.getJob": {
19330
19399
  capName: "addons",
19331
19400
  capScope: "system",
19332
19401
  addonId: null,
@@ -19374,19 +19443,19 @@ Object.freeze({
19374
19443
  addonId: null,
19375
19444
  access: "view"
19376
19445
  },
19377
- "addons.listActiveBulkUpdates": {
19446
+ "addons.listCapabilityProviders": {
19378
19447
  capName: "addons",
19379
19448
  capScope: "system",
19380
19449
  addonId: null,
19381
19450
  access: "view"
19382
19451
  },
19383
- "addons.listCapabilityProviders": {
19452
+ "addons.listFrameworkPackages": {
19384
19453
  capName: "addons",
19385
19454
  capScope: "system",
19386
19455
  addonId: null,
19387
19456
  access: "view"
19388
19457
  },
19389
- "addons.listFrameworkPackages": {
19458
+ "addons.listJobs": {
19390
19459
  capName: "addons",
19391
19460
  capScope: "system",
19392
19461
  addonId: null,
@@ -19470,7 +19539,7 @@ Object.freeze({
19470
19539
  addonId: null,
19471
19540
  access: "create"
19472
19541
  },
19473
- "addons.startBulkUpdate": {
19542
+ "addons.startJob": {
19474
19543
  capName: "addons",
19475
19544
  capScope: "system",
19476
19545
  addonId: null,
@@ -23457,6 +23526,32 @@ Object.freeze({
23457
23526
  "network-access": "ingress",
23458
23527
  "smtp-provider": "email"
23459
23528
  });
23529
+ var frameworkSwapPackageSchema = object({
23530
+ name: string(),
23531
+ stagedPath: string(),
23532
+ backupPath: string(),
23533
+ toVersion: string(),
23534
+ fromVersion: string().nullable()
23535
+ });
23536
+ object({
23537
+ jobId: string(),
23538
+ taskId: string(),
23539
+ packages: array(frameworkSwapPackageSchema),
23540
+ requestedAtMs: number(),
23541
+ schemaVersion: literal(1)
23542
+ });
23543
+ object({
23544
+ jobId: string(),
23545
+ taskId: string(),
23546
+ backups: array(object({
23547
+ name: string(),
23548
+ backupPath: string(),
23549
+ livePath: string()
23550
+ })),
23551
+ appliedAtMs: number(),
23552
+ bootAttempts: number(),
23553
+ schemaVersion: literal(1)
23554
+ });
23460
23555
  /**
23461
23556
  * Pure fuzzy matcher for adoption location import. Normalized
23462
23557
  * case-insensitive Levenshtein similarity, used to reuse an existing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homeassistant",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",