@camstack/addon-provider-onvif 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.
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
@@ -5134,14 +5134,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5134
5134
  EventCategory["DeviceSleeping"] = "device.sleeping";
5135
5135
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5136
5136
  /**
5137
- * Progress snapshot emitted by `BulkUpdateCoordinator` on every state
5138
- * transition (item status change, phase change, completion, cancel).
5139
- * Payload is `BulkUpdateState`. Admin UI subscribes via `useLiveEvent`
5140
- * to drive the sticky `BulkUpdateBanner` and per-row `AddonRowBadge`.
5141
- *
5142
- * Spec: docs/superpowers/specs/2026-05-21-addons-bulk-update-progress-design.md
5137
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5138
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5139
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5140
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5141
+ * in F4 once live bulk progress is re-implemented over the engine events.
5143
5142
  */
5144
5143
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5144
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5145
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5145
5146
  /**
5146
5147
  * A container's child visibility toggled (hidden/shown). Emitted by the
5147
5148
  * `accessories` cap when a child device is hidden or revealed.
@@ -16420,6 +16421,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
16420
16421
  kind: "mutation",
16421
16422
  auth: "admin"
16422
16423
  });
16424
+ var jobKindSchema = _enum([
16425
+ "install",
16426
+ "update",
16427
+ "uninstall",
16428
+ "restart"
16429
+ ]);
16430
+ var taskPhaseSchema = _enum([
16431
+ "queued",
16432
+ "fetching",
16433
+ "staged",
16434
+ "validating",
16435
+ "applying",
16436
+ "restarting",
16437
+ "applied",
16438
+ "done",
16439
+ "failed",
16440
+ "skipped"
16441
+ ]);
16442
+ var taskTargetSchema = _enum(["framework", "addon"]);
16443
+ var taskLogEntrySchema = object({
16444
+ tsMs: number(),
16445
+ nodeId: string(),
16446
+ packageName: string(),
16447
+ phase: taskPhaseSchema,
16448
+ message: string()
16449
+ });
16450
+ var lifecycleTaskSchema = object({
16451
+ taskId: string(),
16452
+ nodeId: string(),
16453
+ packageName: string(),
16454
+ fromVersion: string().nullable(),
16455
+ toVersion: string(),
16456
+ target: taskTargetSchema,
16457
+ phase: taskPhaseSchema,
16458
+ stagedPath: string().nullable(),
16459
+ attempts: number(),
16460
+ steps: array(taskLogEntrySchema),
16461
+ error: string().nullable(),
16462
+ startedAtMs: number().nullable(),
16463
+ finishedAtMs: number().nullable()
16464
+ });
16465
+ var lifecycleJobStateSchema = _enum([
16466
+ "running",
16467
+ "completed",
16468
+ "failed",
16469
+ "partially-failed",
16470
+ "cancelled"
16471
+ ]);
16472
+ var lifecycleJobScopeSchema = _enum([
16473
+ "single",
16474
+ "bulk",
16475
+ "cluster"
16476
+ ]);
16477
+ var lifecycleJobSchema = object({
16478
+ jobId: string(),
16479
+ kind: jobKindSchema,
16480
+ createdAtMs: number(),
16481
+ createdBy: string(),
16482
+ scope: lifecycleJobScopeSchema,
16483
+ tasks: array(lifecycleTaskSchema),
16484
+ state: lifecycleJobStateSchema,
16485
+ schemaVersion: literal(1)
16486
+ });
16423
16487
  /**
16424
16488
  * addons — system-scoped singleton capability for addon package
16425
16489
  * management (install, update, configure, restart) and per-addon log
@@ -16602,7 +16666,7 @@ var BulkUpdatePhaseSchema = _enum([
16602
16666
  "restarting",
16603
16667
  "finalizing"
16604
16668
  ]);
16605
- var BulkUpdateStateSchema = object({
16669
+ object({
16606
16670
  id: string(),
16607
16671
  nodeId: string(),
16608
16672
  startedAtMs: number(),
@@ -16705,20 +16769,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16705
16769
  }), UpdateFrameworkPackageResultSchema, {
16706
16770
  kind: "mutation",
16707
16771
  auth: "admin"
16708
- }), method(object({
16709
- nodeId: string(),
16710
- items: array(object({
16711
- name: string(),
16712
- version: string(),
16713
- isSystem: boolean()
16714
- })).readonly()
16715
- }), object({ id: string() }), {
16716
- kind: "mutation",
16717
- auth: "admin"
16718
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
16719
- kind: "mutation",
16720
- auth: "admin"
16721
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16772
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16722
16773
  kind: "mutation",
16723
16774
  auth: "admin"
16724
16775
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16740,6 +16791,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16740
16791
  kind: "mutation",
16741
16792
  auth: "admin"
16742
16793
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16794
+ kind: _enum([
16795
+ "install",
16796
+ "update",
16797
+ "uninstall",
16798
+ "restart"
16799
+ ]),
16800
+ targets: array(object({
16801
+ name: string().min(1),
16802
+ version: string().min(1)
16803
+ })).min(1),
16804
+ nodeIds: array(string()).optional()
16805
+ }), object({ jobId: string() }), {
16806
+ kind: "mutation",
16807
+ auth: "admin"
16808
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16809
+ kind: "mutation",
16810
+ auth: "admin"
16811
+ }), method(object({
16743
16812
  addonId: string(),
16744
16813
  level: LogLevelSchema$1.optional()
16745
16814
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16780,7 +16849,7 @@ Object.freeze({
16780
16849
  addonId: null,
16781
16850
  access: "create"
16782
16851
  },
16783
- "addons.cancelBulkUpdate": {
16852
+ "addons.cancelJob": {
16784
16853
  capName: "addons",
16785
16854
  capScope: "system",
16786
16855
  addonId: null,
@@ -16810,7 +16879,7 @@ Object.freeze({
16810
16879
  addonId: null,
16811
16880
  access: "view"
16812
16881
  },
16813
- "addons.getBulkUpdateState": {
16882
+ "addons.getJob": {
16814
16883
  capName: "addons",
16815
16884
  capScope: "system",
16816
16885
  addonId: null,
@@ -16858,19 +16927,19 @@ Object.freeze({
16858
16927
  addonId: null,
16859
16928
  access: "view"
16860
16929
  },
16861
- "addons.listActiveBulkUpdates": {
16930
+ "addons.listCapabilityProviders": {
16862
16931
  capName: "addons",
16863
16932
  capScope: "system",
16864
16933
  addonId: null,
16865
16934
  access: "view"
16866
16935
  },
16867
- "addons.listCapabilityProviders": {
16936
+ "addons.listFrameworkPackages": {
16868
16937
  capName: "addons",
16869
16938
  capScope: "system",
16870
16939
  addonId: null,
16871
16940
  access: "view"
16872
16941
  },
16873
- "addons.listFrameworkPackages": {
16942
+ "addons.listJobs": {
16874
16943
  capName: "addons",
16875
16944
  capScope: "system",
16876
16945
  addonId: null,
@@ -16954,7 +17023,7 @@ Object.freeze({
16954
17023
  addonId: null,
16955
17024
  access: "create"
16956
17025
  },
16957
- "addons.startBulkUpdate": {
17026
+ "addons.startJob": {
16958
17027
  capName: "addons",
16959
17028
  capScope: "system",
16960
17029
  addonId: null,
@@ -20941,6 +21010,32 @@ Object.freeze({
20941
21010
  "network-access": "ingress",
20942
21011
  "smtp-provider": "email"
20943
21012
  });
21013
+ var frameworkSwapPackageSchema = object({
21014
+ name: string(),
21015
+ stagedPath: string(),
21016
+ backupPath: string(),
21017
+ toVersion: string(),
21018
+ fromVersion: string().nullable()
21019
+ });
21020
+ object({
21021
+ jobId: string(),
21022
+ taskId: string(),
21023
+ packages: array(frameworkSwapPackageSchema),
21024
+ requestedAtMs: number(),
21025
+ schemaVersion: literal(1)
21026
+ });
21027
+ object({
21028
+ jobId: string(),
21029
+ taskId: string(),
21030
+ backups: array(object({
21031
+ name: string(),
21032
+ backupPath: string(),
21033
+ livePath: string()
21034
+ })),
21035
+ appliedAtMs: number(),
21036
+ bootAttempts: number(),
21037
+ schemaVersion: literal(1)
21038
+ });
20944
21039
  //#endregion
20945
21040
  //#region src/onvif-camera.ts
20946
21041
  var onvifCameraSchema = object({
package/dist/addon.mjs 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.
@@ -16421,6 +16422,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
16421
16422
  kind: "mutation",
16422
16423
  auth: "admin"
16423
16424
  });
16425
+ var jobKindSchema = _enum([
16426
+ "install",
16427
+ "update",
16428
+ "uninstall",
16429
+ "restart"
16430
+ ]);
16431
+ var taskPhaseSchema = _enum([
16432
+ "queued",
16433
+ "fetching",
16434
+ "staged",
16435
+ "validating",
16436
+ "applying",
16437
+ "restarting",
16438
+ "applied",
16439
+ "done",
16440
+ "failed",
16441
+ "skipped"
16442
+ ]);
16443
+ var taskTargetSchema = _enum(["framework", "addon"]);
16444
+ var taskLogEntrySchema = object({
16445
+ tsMs: number(),
16446
+ nodeId: string(),
16447
+ packageName: string(),
16448
+ phase: taskPhaseSchema,
16449
+ message: string()
16450
+ });
16451
+ var lifecycleTaskSchema = object({
16452
+ taskId: string(),
16453
+ nodeId: string(),
16454
+ packageName: string(),
16455
+ fromVersion: string().nullable(),
16456
+ toVersion: string(),
16457
+ target: taskTargetSchema,
16458
+ phase: taskPhaseSchema,
16459
+ stagedPath: string().nullable(),
16460
+ attempts: number(),
16461
+ steps: array(taskLogEntrySchema),
16462
+ error: string().nullable(),
16463
+ startedAtMs: number().nullable(),
16464
+ finishedAtMs: number().nullable()
16465
+ });
16466
+ var lifecycleJobStateSchema = _enum([
16467
+ "running",
16468
+ "completed",
16469
+ "failed",
16470
+ "partially-failed",
16471
+ "cancelled"
16472
+ ]);
16473
+ var lifecycleJobScopeSchema = _enum([
16474
+ "single",
16475
+ "bulk",
16476
+ "cluster"
16477
+ ]);
16478
+ var lifecycleJobSchema = object({
16479
+ jobId: string(),
16480
+ kind: jobKindSchema,
16481
+ createdAtMs: number(),
16482
+ createdBy: string(),
16483
+ scope: lifecycleJobScopeSchema,
16484
+ tasks: array(lifecycleTaskSchema),
16485
+ state: lifecycleJobStateSchema,
16486
+ schemaVersion: literal(1)
16487
+ });
16424
16488
  /**
16425
16489
  * addons — system-scoped singleton capability for addon package
16426
16490
  * management (install, update, configure, restart) and per-addon log
@@ -16603,7 +16667,7 @@ var BulkUpdatePhaseSchema = _enum([
16603
16667
  "restarting",
16604
16668
  "finalizing"
16605
16669
  ]);
16606
- var BulkUpdateStateSchema = object({
16670
+ object({
16607
16671
  id: string(),
16608
16672
  nodeId: string(),
16609
16673
  startedAtMs: number(),
@@ -16706,20 +16770,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16706
16770
  }), UpdateFrameworkPackageResultSchema, {
16707
16771
  kind: "mutation",
16708
16772
  auth: "admin"
16709
- }), method(object({
16710
- nodeId: string(),
16711
- items: array(object({
16712
- name: string(),
16713
- version: string(),
16714
- isSystem: boolean()
16715
- })).readonly()
16716
- }), object({ id: string() }), {
16717
- kind: "mutation",
16718
- auth: "admin"
16719
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
16720
- kind: "mutation",
16721
- auth: "admin"
16722
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16773
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16723
16774
  kind: "mutation",
16724
16775
  auth: "admin"
16725
16776
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16741,6 +16792,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16741
16792
  kind: "mutation",
16742
16793
  auth: "admin"
16743
16794
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16795
+ kind: _enum([
16796
+ "install",
16797
+ "update",
16798
+ "uninstall",
16799
+ "restart"
16800
+ ]),
16801
+ targets: array(object({
16802
+ name: string().min(1),
16803
+ version: string().min(1)
16804
+ })).min(1),
16805
+ nodeIds: array(string()).optional()
16806
+ }), object({ jobId: string() }), {
16807
+ kind: "mutation",
16808
+ auth: "admin"
16809
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16810
+ kind: "mutation",
16811
+ auth: "admin"
16812
+ }), method(object({
16744
16813
  addonId: string(),
16745
16814
  level: LogLevelSchema$1.optional()
16746
16815
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16781,7 +16850,7 @@ Object.freeze({
16781
16850
  addonId: null,
16782
16851
  access: "create"
16783
16852
  },
16784
- "addons.cancelBulkUpdate": {
16853
+ "addons.cancelJob": {
16785
16854
  capName: "addons",
16786
16855
  capScope: "system",
16787
16856
  addonId: null,
@@ -16811,7 +16880,7 @@ Object.freeze({
16811
16880
  addonId: null,
16812
16881
  access: "view"
16813
16882
  },
16814
- "addons.getBulkUpdateState": {
16883
+ "addons.getJob": {
16815
16884
  capName: "addons",
16816
16885
  capScope: "system",
16817
16886
  addonId: null,
@@ -16859,19 +16928,19 @@ Object.freeze({
16859
16928
  addonId: null,
16860
16929
  access: "view"
16861
16930
  },
16862
- "addons.listActiveBulkUpdates": {
16931
+ "addons.listCapabilityProviders": {
16863
16932
  capName: "addons",
16864
16933
  capScope: "system",
16865
16934
  addonId: null,
16866
16935
  access: "view"
16867
16936
  },
16868
- "addons.listCapabilityProviders": {
16937
+ "addons.listFrameworkPackages": {
16869
16938
  capName: "addons",
16870
16939
  capScope: "system",
16871
16940
  addonId: null,
16872
16941
  access: "view"
16873
16942
  },
16874
- "addons.listFrameworkPackages": {
16943
+ "addons.listJobs": {
16875
16944
  capName: "addons",
16876
16945
  capScope: "system",
16877
16946
  addonId: null,
@@ -16955,7 +17024,7 @@ Object.freeze({
16955
17024
  addonId: null,
16956
17025
  access: "create"
16957
17026
  },
16958
- "addons.startBulkUpdate": {
17027
+ "addons.startJob": {
16959
17028
  capName: "addons",
16960
17029
  capScope: "system",
16961
17030
  addonId: null,
@@ -20942,6 +21011,32 @@ Object.freeze({
20942
21011
  "network-access": "ingress",
20943
21012
  "smtp-provider": "email"
20944
21013
  });
21014
+ var frameworkSwapPackageSchema = object({
21015
+ name: string(),
21016
+ stagedPath: string(),
21017
+ backupPath: string(),
21018
+ toVersion: string(),
21019
+ fromVersion: string().nullable()
21020
+ });
21021
+ object({
21022
+ jobId: string(),
21023
+ taskId: string(),
21024
+ packages: array(frameworkSwapPackageSchema),
21025
+ requestedAtMs: number(),
21026
+ schemaVersion: literal(1)
21027
+ });
21028
+ object({
21029
+ jobId: string(),
21030
+ taskId: string(),
21031
+ backups: array(object({
21032
+ name: string(),
21033
+ backupPath: string(),
21034
+ livePath: string()
21035
+ })),
21036
+ appliedAtMs: number(),
21037
+ bootAttempts: number(),
21038
+ schemaVersion: literal(1)
21039
+ });
20945
21040
  //#endregion
20946
21041
  //#region src/onvif-camera.ts
20947
21042
  var onvifCameraSchema = object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-onvif",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "ONVIF camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",