@camstack/addon-export-alexa 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.
@@ -5158,14 +5158,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5158
5158
  EventCategory["DeviceSleeping"] = "device.sleeping";
5159
5159
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5160
5160
  /**
5161
- * Progress snapshot emitted by `BulkUpdateCoordinator` on every state
5162
- * transition (item status change, phase change, completion, cancel).
5163
- * Payload is `BulkUpdateState`. Admin UI subscribes via `useLiveEvent`
5164
- * to drive the sticky `BulkUpdateBanner` and per-row `AddonRowBadge`.
5165
- *
5166
- * Spec: docs/superpowers/specs/2026-05-21-addons-bulk-update-progress-design.md
5161
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5162
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5163
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5164
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5165
+ * in F4 once live bulk progress is re-implemented over the engine events.
5167
5166
  */
5168
5167
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5168
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5169
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5169
5170
  /**
5170
5171
  * A container's child visibility toggled (hidden/shown). Emitted by the
5171
5172
  * `accessories` cap when a child device is hidden or revealed.
@@ -16246,6 +16247,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
16246
16247
  kind: "mutation",
16247
16248
  auth: "admin"
16248
16249
  });
16250
+ var jobKindSchema = _enum([
16251
+ "install",
16252
+ "update",
16253
+ "uninstall",
16254
+ "restart"
16255
+ ]);
16256
+ var taskPhaseSchema = _enum([
16257
+ "queued",
16258
+ "fetching",
16259
+ "staged",
16260
+ "validating",
16261
+ "applying",
16262
+ "restarting",
16263
+ "applied",
16264
+ "done",
16265
+ "failed",
16266
+ "skipped"
16267
+ ]);
16268
+ var taskTargetSchema = _enum(["framework", "addon"]);
16269
+ var taskLogEntrySchema = object({
16270
+ tsMs: number(),
16271
+ nodeId: string(),
16272
+ packageName: string(),
16273
+ phase: taskPhaseSchema,
16274
+ message: string()
16275
+ });
16276
+ var lifecycleTaskSchema = object({
16277
+ taskId: string(),
16278
+ nodeId: string(),
16279
+ packageName: string(),
16280
+ fromVersion: string().nullable(),
16281
+ toVersion: string(),
16282
+ target: taskTargetSchema,
16283
+ phase: taskPhaseSchema,
16284
+ stagedPath: string().nullable(),
16285
+ attempts: number(),
16286
+ steps: array(taskLogEntrySchema),
16287
+ error: string().nullable(),
16288
+ startedAtMs: number().nullable(),
16289
+ finishedAtMs: number().nullable()
16290
+ });
16291
+ var lifecycleJobStateSchema = _enum([
16292
+ "running",
16293
+ "completed",
16294
+ "failed",
16295
+ "partially-failed",
16296
+ "cancelled"
16297
+ ]);
16298
+ var lifecycleJobScopeSchema = _enum([
16299
+ "single",
16300
+ "bulk",
16301
+ "cluster"
16302
+ ]);
16303
+ var lifecycleJobSchema = object({
16304
+ jobId: string(),
16305
+ kind: jobKindSchema,
16306
+ createdAtMs: number(),
16307
+ createdBy: string(),
16308
+ scope: lifecycleJobScopeSchema,
16309
+ tasks: array(lifecycleTaskSchema),
16310
+ state: lifecycleJobStateSchema,
16311
+ schemaVersion: literal(1)
16312
+ });
16249
16313
  /**
16250
16314
  * addons — system-scoped singleton capability for addon package
16251
16315
  * management (install, update, configure, restart) and per-addon log
@@ -16428,7 +16492,7 @@ var BulkUpdatePhaseSchema = _enum([
16428
16492
  "restarting",
16429
16493
  "finalizing"
16430
16494
  ]);
16431
- var BulkUpdateStateSchema = object({
16495
+ object({
16432
16496
  id: string(),
16433
16497
  nodeId: string(),
16434
16498
  startedAtMs: number(),
@@ -16531,20 +16595,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16531
16595
  }), UpdateFrameworkPackageResultSchema, {
16532
16596
  kind: "mutation",
16533
16597
  auth: "admin"
16534
- }), method(object({
16535
- nodeId: string(),
16536
- items: array(object({
16537
- name: string(),
16538
- version: string(),
16539
- isSystem: boolean()
16540
- })).readonly()
16541
- }), object({ id: string() }), {
16542
- kind: "mutation",
16543
- auth: "admin"
16544
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
16545
- kind: "mutation",
16546
- auth: "admin"
16547
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16598
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16548
16599
  kind: "mutation",
16549
16600
  auth: "admin"
16550
16601
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16566,6 +16617,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16566
16617
  kind: "mutation",
16567
16618
  auth: "admin"
16568
16619
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16620
+ kind: _enum([
16621
+ "install",
16622
+ "update",
16623
+ "uninstall",
16624
+ "restart"
16625
+ ]),
16626
+ targets: array(object({
16627
+ name: string().min(1),
16628
+ version: string().min(1)
16629
+ })).min(1),
16630
+ nodeIds: array(string()).optional()
16631
+ }), object({ jobId: string() }), {
16632
+ kind: "mutation",
16633
+ auth: "admin"
16634
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16635
+ kind: "mutation",
16636
+ auth: "admin"
16637
+ }), method(object({
16569
16638
  addonId: string(),
16570
16639
  level: LogLevelSchema$1.optional()
16571
16640
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16606,7 +16675,7 @@ Object.freeze({
16606
16675
  addonId: null,
16607
16676
  access: "create"
16608
16677
  },
16609
- "addons.cancelBulkUpdate": {
16678
+ "addons.cancelJob": {
16610
16679
  capName: "addons",
16611
16680
  capScope: "system",
16612
16681
  addonId: null,
@@ -16636,7 +16705,7 @@ Object.freeze({
16636
16705
  addonId: null,
16637
16706
  access: "view"
16638
16707
  },
16639
- "addons.getBulkUpdateState": {
16708
+ "addons.getJob": {
16640
16709
  capName: "addons",
16641
16710
  capScope: "system",
16642
16711
  addonId: null,
@@ -16684,19 +16753,19 @@ Object.freeze({
16684
16753
  addonId: null,
16685
16754
  access: "view"
16686
16755
  },
16687
- "addons.listActiveBulkUpdates": {
16756
+ "addons.listCapabilityProviders": {
16688
16757
  capName: "addons",
16689
16758
  capScope: "system",
16690
16759
  addonId: null,
16691
16760
  access: "view"
16692
16761
  },
16693
- "addons.listCapabilityProviders": {
16762
+ "addons.listFrameworkPackages": {
16694
16763
  capName: "addons",
16695
16764
  capScope: "system",
16696
16765
  addonId: null,
16697
16766
  access: "view"
16698
16767
  },
16699
- "addons.listFrameworkPackages": {
16768
+ "addons.listJobs": {
16700
16769
  capName: "addons",
16701
16770
  capScope: "system",
16702
16771
  addonId: null,
@@ -16780,7 +16849,7 @@ Object.freeze({
16780
16849
  addonId: null,
16781
16850
  access: "create"
16782
16851
  },
16783
- "addons.startBulkUpdate": {
16852
+ "addons.startJob": {
16784
16853
  capName: "addons",
16785
16854
  capScope: "system",
16786
16855
  addonId: null,
@@ -20767,6 +20836,32 @@ Object.freeze({
20767
20836
  "network-access": "ingress",
20768
20837
  "smtp-provider": "email"
20769
20838
  });
20839
+ var frameworkSwapPackageSchema = object({
20840
+ name: string(),
20841
+ stagedPath: string(),
20842
+ backupPath: string(),
20843
+ toVersion: string(),
20844
+ fromVersion: string().nullable()
20845
+ });
20846
+ object({
20847
+ jobId: string(),
20848
+ taskId: string(),
20849
+ packages: array(frameworkSwapPackageSchema),
20850
+ requestedAtMs: number(),
20851
+ schemaVersion: literal(1)
20852
+ });
20853
+ object({
20854
+ jobId: string(),
20855
+ taskId: string(),
20856
+ backups: array(object({
20857
+ name: string(),
20858
+ backupPath: string(),
20859
+ livePath: string()
20860
+ })),
20861
+ appliedAtMs: number(),
20862
+ bootAttempts: number(),
20863
+ schemaVersion: literal(1)
20864
+ });
20770
20865
  //#endregion
20771
20866
  //#region src/custom-actions.ts
20772
20867
  /**
@@ -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.
@@ -16220,6 +16221,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
16220
16221
  kind: "mutation",
16221
16222
  auth: "admin"
16222
16223
  });
16224
+ var jobKindSchema = _enum([
16225
+ "install",
16226
+ "update",
16227
+ "uninstall",
16228
+ "restart"
16229
+ ]);
16230
+ var taskPhaseSchema = _enum([
16231
+ "queued",
16232
+ "fetching",
16233
+ "staged",
16234
+ "validating",
16235
+ "applying",
16236
+ "restarting",
16237
+ "applied",
16238
+ "done",
16239
+ "failed",
16240
+ "skipped"
16241
+ ]);
16242
+ var taskTargetSchema = _enum(["framework", "addon"]);
16243
+ var taskLogEntrySchema = object({
16244
+ tsMs: number(),
16245
+ nodeId: string(),
16246
+ packageName: string(),
16247
+ phase: taskPhaseSchema,
16248
+ message: string()
16249
+ });
16250
+ var lifecycleTaskSchema = object({
16251
+ taskId: string(),
16252
+ nodeId: string(),
16253
+ packageName: string(),
16254
+ fromVersion: string().nullable(),
16255
+ toVersion: string(),
16256
+ target: taskTargetSchema,
16257
+ phase: taskPhaseSchema,
16258
+ stagedPath: string().nullable(),
16259
+ attempts: number(),
16260
+ steps: array(taskLogEntrySchema),
16261
+ error: string().nullable(),
16262
+ startedAtMs: number().nullable(),
16263
+ finishedAtMs: number().nullable()
16264
+ });
16265
+ var lifecycleJobStateSchema = _enum([
16266
+ "running",
16267
+ "completed",
16268
+ "failed",
16269
+ "partially-failed",
16270
+ "cancelled"
16271
+ ]);
16272
+ var lifecycleJobScopeSchema = _enum([
16273
+ "single",
16274
+ "bulk",
16275
+ "cluster"
16276
+ ]);
16277
+ var lifecycleJobSchema = object({
16278
+ jobId: string(),
16279
+ kind: jobKindSchema,
16280
+ createdAtMs: number(),
16281
+ createdBy: string(),
16282
+ scope: lifecycleJobScopeSchema,
16283
+ tasks: array(lifecycleTaskSchema),
16284
+ state: lifecycleJobStateSchema,
16285
+ schemaVersion: literal(1)
16286
+ });
16223
16287
  /**
16224
16288
  * addons — system-scoped singleton capability for addon package
16225
16289
  * management (install, update, configure, restart) and per-addon log
@@ -16402,7 +16466,7 @@ var BulkUpdatePhaseSchema = _enum([
16402
16466
  "restarting",
16403
16467
  "finalizing"
16404
16468
  ]);
16405
- var BulkUpdateStateSchema = object({
16469
+ object({
16406
16470
  id: string(),
16407
16471
  nodeId: string(),
16408
16472
  startedAtMs: number(),
@@ -16505,20 +16569,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16505
16569
  }), UpdateFrameworkPackageResultSchema, {
16506
16570
  kind: "mutation",
16507
16571
  auth: "admin"
16508
- }), method(object({
16509
- nodeId: string(),
16510
- items: array(object({
16511
- name: string(),
16512
- version: string(),
16513
- isSystem: boolean()
16514
- })).readonly()
16515
- }), object({ id: string() }), {
16516
- kind: "mutation",
16517
- auth: "admin"
16518
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
16519
- kind: "mutation",
16520
- auth: "admin"
16521
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16572
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16522
16573
  kind: "mutation",
16523
16574
  auth: "admin"
16524
16575
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16540,6 +16591,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16540
16591
  kind: "mutation",
16541
16592
  auth: "admin"
16542
16593
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16594
+ kind: _enum([
16595
+ "install",
16596
+ "update",
16597
+ "uninstall",
16598
+ "restart"
16599
+ ]),
16600
+ targets: array(object({
16601
+ name: string().min(1),
16602
+ version: string().min(1)
16603
+ })).min(1),
16604
+ nodeIds: array(string()).optional()
16605
+ }), object({ jobId: string() }), {
16606
+ kind: "mutation",
16607
+ auth: "admin"
16608
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16609
+ kind: "mutation",
16610
+ auth: "admin"
16611
+ }), method(object({
16543
16612
  addonId: string(),
16544
16613
  level: LogLevelSchema$1.optional()
16545
16614
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16580,7 +16649,7 @@ Object.freeze({
16580
16649
  addonId: null,
16581
16650
  access: "create"
16582
16651
  },
16583
- "addons.cancelBulkUpdate": {
16652
+ "addons.cancelJob": {
16584
16653
  capName: "addons",
16585
16654
  capScope: "system",
16586
16655
  addonId: null,
@@ -16610,7 +16679,7 @@ Object.freeze({
16610
16679
  addonId: null,
16611
16680
  access: "view"
16612
16681
  },
16613
- "addons.getBulkUpdateState": {
16682
+ "addons.getJob": {
16614
16683
  capName: "addons",
16615
16684
  capScope: "system",
16616
16685
  addonId: null,
@@ -16658,19 +16727,19 @@ Object.freeze({
16658
16727
  addonId: null,
16659
16728
  access: "view"
16660
16729
  },
16661
- "addons.listActiveBulkUpdates": {
16730
+ "addons.listCapabilityProviders": {
16662
16731
  capName: "addons",
16663
16732
  capScope: "system",
16664
16733
  addonId: null,
16665
16734
  access: "view"
16666
16735
  },
16667
- "addons.listCapabilityProviders": {
16736
+ "addons.listFrameworkPackages": {
16668
16737
  capName: "addons",
16669
16738
  capScope: "system",
16670
16739
  addonId: null,
16671
16740
  access: "view"
16672
16741
  },
16673
- "addons.listFrameworkPackages": {
16742
+ "addons.listJobs": {
16674
16743
  capName: "addons",
16675
16744
  capScope: "system",
16676
16745
  addonId: null,
@@ -16754,7 +16823,7 @@ Object.freeze({
16754
16823
  addonId: null,
16755
16824
  access: "create"
16756
16825
  },
16757
- "addons.startBulkUpdate": {
16826
+ "addons.startJob": {
16758
16827
  capName: "addons",
16759
16828
  capScope: "system",
16760
16829
  addonId: null,
@@ -20741,6 +20810,32 @@ Object.freeze({
20741
20810
  "network-access": "ingress",
20742
20811
  "smtp-provider": "email"
20743
20812
  });
20813
+ var frameworkSwapPackageSchema = object({
20814
+ name: string(),
20815
+ stagedPath: string(),
20816
+ backupPath: string(),
20817
+ toVersion: string(),
20818
+ fromVersion: string().nullable()
20819
+ });
20820
+ object({
20821
+ jobId: string(),
20822
+ taskId: string(),
20823
+ packages: array(frameworkSwapPackageSchema),
20824
+ requestedAtMs: number(),
20825
+ schemaVersion: literal(1)
20826
+ });
20827
+ object({
20828
+ jobId: string(),
20829
+ taskId: string(),
20830
+ backups: array(object({
20831
+ name: string(),
20832
+ backupPath: string(),
20833
+ livePath: string()
20834
+ })),
20835
+ appliedAtMs: number(),
20836
+ bootAttempts: number(),
20837
+ schemaVersion: literal(1)
20838
+ });
20744
20839
  //#endregion
20745
20840
  //#region src/custom-actions.ts
20746
20841
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-alexa",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
5
5
  "keywords": [
6
6
  "camstack",