@camstack/addon-advanced-notifier 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
@@ -5135,14 +5135,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5135
5135
  EventCategory["DeviceSleeping"] = "device.sleeping";
5136
5136
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5137
5137
  /**
5138
- * Progress snapshot emitted by `BulkUpdateCoordinator` on every state
5139
- * transition (item status change, phase change, completion, cancel).
5140
- * Payload is `BulkUpdateState`. Admin UI subscribes via `useLiveEvent`
5141
- * to drive the sticky `BulkUpdateBanner` and per-row `AddonRowBadge`.
5142
- *
5143
- * Spec: docs/superpowers/specs/2026-05-21-addons-bulk-update-progress-design.md
5138
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5139
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5140
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5141
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5142
+ * in F4 once live bulk progress is re-implemented over the engine events.
5144
5143
  */
5145
5144
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5145
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5146
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5146
5147
  /**
5147
5148
  * A container's child visibility toggled (hidden/shown). Emitted by the
5148
5149
  * `accessories` cap when a child device is hidden or revealed.
@@ -15982,6 +15983,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
15982
15983
  kind: "mutation",
15983
15984
  auth: "admin"
15984
15985
  });
15986
+ var jobKindSchema = _enum([
15987
+ "install",
15988
+ "update",
15989
+ "uninstall",
15990
+ "restart"
15991
+ ]);
15992
+ var taskPhaseSchema = _enum([
15993
+ "queued",
15994
+ "fetching",
15995
+ "staged",
15996
+ "validating",
15997
+ "applying",
15998
+ "restarting",
15999
+ "applied",
16000
+ "done",
16001
+ "failed",
16002
+ "skipped"
16003
+ ]);
16004
+ var taskTargetSchema = _enum(["framework", "addon"]);
16005
+ var taskLogEntrySchema = object({
16006
+ tsMs: number(),
16007
+ nodeId: string(),
16008
+ packageName: string(),
16009
+ phase: taskPhaseSchema,
16010
+ message: string()
16011
+ });
16012
+ var lifecycleTaskSchema = object({
16013
+ taskId: string(),
16014
+ nodeId: string(),
16015
+ packageName: string(),
16016
+ fromVersion: string().nullable(),
16017
+ toVersion: string(),
16018
+ target: taskTargetSchema,
16019
+ phase: taskPhaseSchema,
16020
+ stagedPath: string().nullable(),
16021
+ attempts: number(),
16022
+ steps: array(taskLogEntrySchema),
16023
+ error: string().nullable(),
16024
+ startedAtMs: number().nullable(),
16025
+ finishedAtMs: number().nullable()
16026
+ });
16027
+ var lifecycleJobStateSchema = _enum([
16028
+ "running",
16029
+ "completed",
16030
+ "failed",
16031
+ "partially-failed",
16032
+ "cancelled"
16033
+ ]);
16034
+ var lifecycleJobScopeSchema = _enum([
16035
+ "single",
16036
+ "bulk",
16037
+ "cluster"
16038
+ ]);
16039
+ var lifecycleJobSchema = object({
16040
+ jobId: string(),
16041
+ kind: jobKindSchema,
16042
+ createdAtMs: number(),
16043
+ createdBy: string(),
16044
+ scope: lifecycleJobScopeSchema,
16045
+ tasks: array(lifecycleTaskSchema),
16046
+ state: lifecycleJobStateSchema,
16047
+ schemaVersion: literal(1)
16048
+ });
15985
16049
  /**
15986
16050
  * addons — system-scoped singleton capability for addon package
15987
16051
  * management (install, update, configure, restart) and per-addon log
@@ -16164,7 +16228,7 @@ var BulkUpdatePhaseSchema = _enum([
16164
16228
  "restarting",
16165
16229
  "finalizing"
16166
16230
  ]);
16167
- var BulkUpdateStateSchema = object({
16231
+ object({
16168
16232
  id: string(),
16169
16233
  nodeId: string(),
16170
16234
  startedAtMs: number(),
@@ -16267,20 +16331,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16267
16331
  }), UpdateFrameworkPackageResultSchema, {
16268
16332
  kind: "mutation",
16269
16333
  auth: "admin"
16270
- }), method(object({
16271
- nodeId: string(),
16272
- items: array(object({
16273
- name: string(),
16274
- version: string(),
16275
- isSystem: boolean()
16276
- })).readonly()
16277
- }), object({ id: string() }), {
16278
- kind: "mutation",
16279
- auth: "admin"
16280
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
16281
- kind: "mutation",
16282
- auth: "admin"
16283
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16334
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16284
16335
  kind: "mutation",
16285
16336
  auth: "admin"
16286
16337
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16302,6 +16353,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16302
16353
  kind: "mutation",
16303
16354
  auth: "admin"
16304
16355
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16356
+ kind: _enum([
16357
+ "install",
16358
+ "update",
16359
+ "uninstall",
16360
+ "restart"
16361
+ ]),
16362
+ targets: array(object({
16363
+ name: string().min(1),
16364
+ version: string().min(1)
16365
+ })).min(1),
16366
+ nodeIds: array(string()).optional()
16367
+ }), object({ jobId: string() }), {
16368
+ kind: "mutation",
16369
+ auth: "admin"
16370
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16371
+ kind: "mutation",
16372
+ auth: "admin"
16373
+ }), method(object({
16305
16374
  addonId: string(),
16306
16375
  level: LogLevelSchema$1.optional()
16307
16376
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16342,7 +16411,7 @@ Object.freeze({
16342
16411
  addonId: null,
16343
16412
  access: "create"
16344
16413
  },
16345
- "addons.cancelBulkUpdate": {
16414
+ "addons.cancelJob": {
16346
16415
  capName: "addons",
16347
16416
  capScope: "system",
16348
16417
  addonId: null,
@@ -16372,7 +16441,7 @@ Object.freeze({
16372
16441
  addonId: null,
16373
16442
  access: "view"
16374
16443
  },
16375
- "addons.getBulkUpdateState": {
16444
+ "addons.getJob": {
16376
16445
  capName: "addons",
16377
16446
  capScope: "system",
16378
16447
  addonId: null,
@@ -16420,19 +16489,19 @@ Object.freeze({
16420
16489
  addonId: null,
16421
16490
  access: "view"
16422
16491
  },
16423
- "addons.listActiveBulkUpdates": {
16492
+ "addons.listCapabilityProviders": {
16424
16493
  capName: "addons",
16425
16494
  capScope: "system",
16426
16495
  addonId: null,
16427
16496
  access: "view"
16428
16497
  },
16429
- "addons.listCapabilityProviders": {
16498
+ "addons.listFrameworkPackages": {
16430
16499
  capName: "addons",
16431
16500
  capScope: "system",
16432
16501
  addonId: null,
16433
16502
  access: "view"
16434
16503
  },
16435
- "addons.listFrameworkPackages": {
16504
+ "addons.listJobs": {
16436
16505
  capName: "addons",
16437
16506
  capScope: "system",
16438
16507
  addonId: null,
@@ -16516,7 +16585,7 @@ Object.freeze({
16516
16585
  addonId: null,
16517
16586
  access: "create"
16518
16587
  },
16519
- "addons.startBulkUpdate": {
16588
+ "addons.startJob": {
16520
16589
  capName: "addons",
16521
16590
  capScope: "system",
16522
16591
  addonId: null,
@@ -20503,6 +20572,32 @@ Object.freeze({
20503
20572
  "network-access": "ingress",
20504
20573
  "smtp-provider": "email"
20505
20574
  });
20575
+ var frameworkSwapPackageSchema = object({
20576
+ name: string(),
20577
+ stagedPath: string(),
20578
+ backupPath: string(),
20579
+ toVersion: string(),
20580
+ fromVersion: string().nullable()
20581
+ });
20582
+ object({
20583
+ jobId: string(),
20584
+ taskId: string(),
20585
+ packages: array(frameworkSwapPackageSchema),
20586
+ requestedAtMs: number(),
20587
+ schemaVersion: literal(1)
20588
+ });
20589
+ object({
20590
+ jobId: string(),
20591
+ taskId: string(),
20592
+ backups: array(object({
20593
+ name: string(),
20594
+ backupPath: string(),
20595
+ livePath: string()
20596
+ })),
20597
+ appliedAtMs: number(),
20598
+ bootAttempts: number(),
20599
+ schemaVersion: literal(1)
20600
+ });
20506
20601
  //#endregion
20507
20602
  //#region src/rules/rule-store.ts
20508
20603
  var COLLECTION$1 = "addon-settings";
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.
@@ -15978,6 +15979,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
15978
15979
  kind: "mutation",
15979
15980
  auth: "admin"
15980
15981
  });
15982
+ var jobKindSchema = _enum([
15983
+ "install",
15984
+ "update",
15985
+ "uninstall",
15986
+ "restart"
15987
+ ]);
15988
+ var taskPhaseSchema = _enum([
15989
+ "queued",
15990
+ "fetching",
15991
+ "staged",
15992
+ "validating",
15993
+ "applying",
15994
+ "restarting",
15995
+ "applied",
15996
+ "done",
15997
+ "failed",
15998
+ "skipped"
15999
+ ]);
16000
+ var taskTargetSchema = _enum(["framework", "addon"]);
16001
+ var taskLogEntrySchema = object({
16002
+ tsMs: number(),
16003
+ nodeId: string(),
16004
+ packageName: string(),
16005
+ phase: taskPhaseSchema,
16006
+ message: string()
16007
+ });
16008
+ var lifecycleTaskSchema = object({
16009
+ taskId: string(),
16010
+ nodeId: string(),
16011
+ packageName: string(),
16012
+ fromVersion: string().nullable(),
16013
+ toVersion: string(),
16014
+ target: taskTargetSchema,
16015
+ phase: taskPhaseSchema,
16016
+ stagedPath: string().nullable(),
16017
+ attempts: number(),
16018
+ steps: array(taskLogEntrySchema),
16019
+ error: string().nullable(),
16020
+ startedAtMs: number().nullable(),
16021
+ finishedAtMs: number().nullable()
16022
+ });
16023
+ var lifecycleJobStateSchema = _enum([
16024
+ "running",
16025
+ "completed",
16026
+ "failed",
16027
+ "partially-failed",
16028
+ "cancelled"
16029
+ ]);
16030
+ var lifecycleJobScopeSchema = _enum([
16031
+ "single",
16032
+ "bulk",
16033
+ "cluster"
16034
+ ]);
16035
+ var lifecycleJobSchema = object({
16036
+ jobId: string(),
16037
+ kind: jobKindSchema,
16038
+ createdAtMs: number(),
16039
+ createdBy: string(),
16040
+ scope: lifecycleJobScopeSchema,
16041
+ tasks: array(lifecycleTaskSchema),
16042
+ state: lifecycleJobStateSchema,
16043
+ schemaVersion: literal(1)
16044
+ });
15981
16045
  /**
15982
16046
  * addons — system-scoped singleton capability for addon package
15983
16047
  * management (install, update, configure, restart) and per-addon log
@@ -16160,7 +16224,7 @@ var BulkUpdatePhaseSchema = _enum([
16160
16224
  "restarting",
16161
16225
  "finalizing"
16162
16226
  ]);
16163
- var BulkUpdateStateSchema = object({
16227
+ object({
16164
16228
  id: string(),
16165
16229
  nodeId: string(),
16166
16230
  startedAtMs: number(),
@@ -16263,20 +16327,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16263
16327
  }), UpdateFrameworkPackageResultSchema, {
16264
16328
  kind: "mutation",
16265
16329
  auth: "admin"
16266
- }), method(object({
16267
- nodeId: string(),
16268
- items: array(object({
16269
- name: string(),
16270
- version: string(),
16271
- isSystem: boolean()
16272
- })).readonly()
16273
- }), object({ id: string() }), {
16274
- kind: "mutation",
16275
- auth: "admin"
16276
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
16277
- kind: "mutation",
16278
- auth: "admin"
16279
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16330
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16280
16331
  kind: "mutation",
16281
16332
  auth: "admin"
16282
16333
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16298,6 +16349,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16298
16349
  kind: "mutation",
16299
16350
  auth: "admin"
16300
16351
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16352
+ kind: _enum([
16353
+ "install",
16354
+ "update",
16355
+ "uninstall",
16356
+ "restart"
16357
+ ]),
16358
+ targets: array(object({
16359
+ name: string().min(1),
16360
+ version: string().min(1)
16361
+ })).min(1),
16362
+ nodeIds: array(string()).optional()
16363
+ }), object({ jobId: string() }), {
16364
+ kind: "mutation",
16365
+ auth: "admin"
16366
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16367
+ kind: "mutation",
16368
+ auth: "admin"
16369
+ }), method(object({
16301
16370
  addonId: string(),
16302
16371
  level: LogLevelSchema$1.optional()
16303
16372
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16338,7 +16407,7 @@ Object.freeze({
16338
16407
  addonId: null,
16339
16408
  access: "create"
16340
16409
  },
16341
- "addons.cancelBulkUpdate": {
16410
+ "addons.cancelJob": {
16342
16411
  capName: "addons",
16343
16412
  capScope: "system",
16344
16413
  addonId: null,
@@ -16368,7 +16437,7 @@ Object.freeze({
16368
16437
  addonId: null,
16369
16438
  access: "view"
16370
16439
  },
16371
- "addons.getBulkUpdateState": {
16440
+ "addons.getJob": {
16372
16441
  capName: "addons",
16373
16442
  capScope: "system",
16374
16443
  addonId: null,
@@ -16416,19 +16485,19 @@ Object.freeze({
16416
16485
  addonId: null,
16417
16486
  access: "view"
16418
16487
  },
16419
- "addons.listActiveBulkUpdates": {
16488
+ "addons.listCapabilityProviders": {
16420
16489
  capName: "addons",
16421
16490
  capScope: "system",
16422
16491
  addonId: null,
16423
16492
  access: "view"
16424
16493
  },
16425
- "addons.listCapabilityProviders": {
16494
+ "addons.listFrameworkPackages": {
16426
16495
  capName: "addons",
16427
16496
  capScope: "system",
16428
16497
  addonId: null,
16429
16498
  access: "view"
16430
16499
  },
16431
- "addons.listFrameworkPackages": {
16500
+ "addons.listJobs": {
16432
16501
  capName: "addons",
16433
16502
  capScope: "system",
16434
16503
  addonId: null,
@@ -16512,7 +16581,7 @@ Object.freeze({
16512
16581
  addonId: null,
16513
16582
  access: "create"
16514
16583
  },
16515
- "addons.startBulkUpdate": {
16584
+ "addons.startJob": {
16516
16585
  capName: "addons",
16517
16586
  capScope: "system",
16518
16587
  addonId: null,
@@ -20499,6 +20568,32 @@ Object.freeze({
20499
20568
  "network-access": "ingress",
20500
20569
  "smtp-provider": "email"
20501
20570
  });
20571
+ var frameworkSwapPackageSchema = object({
20572
+ name: string(),
20573
+ stagedPath: string(),
20574
+ backupPath: string(),
20575
+ toVersion: string(),
20576
+ fromVersion: string().nullable()
20577
+ });
20578
+ object({
20579
+ jobId: string(),
20580
+ taskId: string(),
20581
+ packages: array(frameworkSwapPackageSchema),
20582
+ requestedAtMs: number(),
20583
+ schemaVersion: literal(1)
20584
+ });
20585
+ object({
20586
+ jobId: string(),
20587
+ taskId: string(),
20588
+ backups: array(object({
20589
+ name: string(),
20590
+ backupPath: string(),
20591
+ livePath: string()
20592
+ })),
20593
+ appliedAtMs: number(),
20594
+ bootAttempts: number(),
20595
+ schemaVersion: literal(1)
20596
+ });
20502
20597
  //#endregion
20503
20598
  //#region src/rules/rule-store.ts
20504
20599
  var COLLECTION$1 = "addon-settings";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-advanced-notifier",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Rules-based notification engine for CamStack",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",