@camstack/addon-provider-onvif 1.0.3 → 1.0.5

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 +315 -30
  2. package/dist/addon.mjs +315 -30
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -4985,6 +4985,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
4985
4985
  */
4986
4986
  EventCategory["PipelineEngineMetricsSnapshot"] = "pipeline.engine-metrics-snapshot";
4987
4987
  /**
4988
+ * Per-node detection-engine runtime-provisioning transition. Emitted by
4989
+ * the detection-pipeline provider on every state change of its lazy
4990
+ * engine-provisioning machine (idle → installing → verifying → ready,
4991
+ * or → failed with a `nextRetryAt`). Payload is the
4992
+ * `EngineProvisioningState` snapshot; `event.source.nodeId` carries the
4993
+ * node. The Pipeline page subscribes to drive a live "installing
4994
+ * OpenVINO… / ready" indicator per node without polling
4995
+ * `pipelineExecutor.getEngineProvisioning`. Telemetry-grade (D8): the UI
4996
+ * also reads the cap snapshot on mount / reconnect. Phase 2.
4997
+ */
4998
+ EventCategory["PipelineEngineProvisioning"] = "pipeline.engine-provisioning";
4999
+ /**
4988
5000
  * Cluster topology snapshot. Carries the same payload returned by
4989
5001
  * `nodes.topology` (every reachable node + addons + processes).
4990
5002
  * Emitted by the hub on any agent / addon lifecycle change
@@ -5134,14 +5146,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5134
5146
  EventCategory["DeviceSleeping"] = "device.sleeping";
5135
5147
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5136
5148
  /**
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
5149
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5150
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5151
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5152
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5153
+ * in F4 once live bulk progress is re-implemented over the engine events.
5143
5154
  */
5144
5155
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5156
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5157
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5145
5158
  /**
5146
5159
  * A container's child visibility toggled (hidden/shown). Emitted by the
5147
5160
  * `accessories` cap when a child device is hidden or revealed.
@@ -9262,6 +9275,24 @@ var DetectorOutputSchema = object({
9262
9275
  inferenceMs: number(),
9263
9276
  modelId: string()
9264
9277
  });
9278
+ var EngineProvisioningSchema = object({
9279
+ runtimeId: _enum([
9280
+ "onnx",
9281
+ "openvino",
9282
+ "coreml"
9283
+ ]).nullable(),
9284
+ device: string().nullable(),
9285
+ state: _enum([
9286
+ "idle",
9287
+ "installing",
9288
+ "verifying",
9289
+ "ready",
9290
+ "failed"
9291
+ ]),
9292
+ progress: number().optional(),
9293
+ error: string().optional(),
9294
+ nextRetryAt: number().optional()
9295
+ });
9265
9296
  var PipelineStepInputSchema = lazy(() => object({
9266
9297
  addonId: string(),
9267
9298
  modelId: string(),
@@ -9330,7 +9361,7 @@ var PipelineRunResultBridge = custom();
9330
9361
  method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(PipelineEngineChoiceSchema, array(PipelineDefaultStepSchema)), method(_void(), PipelineEngineChoiceSchema, {
9331
9362
  kind: "mutation",
9332
9363
  auth: "admin"
9333
- }), method(_void(), record(string(), object({
9364
+ }), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
9334
9365
  modelId: string(),
9335
9366
  settings: record(string(), unknown()).readonly()
9336
9367
  }))), method(object({ steps: record(string(), object({
@@ -13177,7 +13208,10 @@ var AgentAddonConfigSchema = object({
13177
13208
  modelId: string(),
13178
13209
  settings: record(string(), unknown()).readonly()
13179
13210
  });
13180
- var AgentPipelineSettingsSchema = object({ addonDefaults: record(string(), AgentAddonConfigSchema).readonly() });
13211
+ var AgentPipelineSettingsSchema = object({
13212
+ addonDefaults: record(string(), AgentAddonConfigSchema).readonly(),
13213
+ maxCameras: number().int().nonnegative().nullable().default(null)
13214
+ });
13181
13215
  var CameraPipelineForAgentSchema = object({
13182
13216
  steps: array(PipelineStepInputSchema).readonly(),
13183
13217
  audio: object({
@@ -13279,6 +13313,133 @@ var GlobalMetricsSchema = object({
13279
13313
  * capability providers.
13280
13314
  */
13281
13315
  var CapabilityBindingsSchema = record(string(), string());
13316
+ /** Source block — always present; derives from the stream catalog. */
13317
+ var CameraSourceStatusSchema = object({ streams: array(object({
13318
+ camStreamId: string(),
13319
+ codec: string(),
13320
+ width: number(),
13321
+ height: number(),
13322
+ fps: number(),
13323
+ kind: string()
13324
+ })).readonly() });
13325
+ /** Assignment block — always present (orchestrator-local, no remote call). */
13326
+ var CameraAssignmentStatusSchema = object({
13327
+ detectionNodeId: string().nullable(),
13328
+ decoderNodeId: string().nullable(),
13329
+ audioNodeId: string().nullable(),
13330
+ pinned: object({
13331
+ detection: boolean(),
13332
+ decoder: boolean(),
13333
+ audio: boolean()
13334
+ }),
13335
+ reasons: object({
13336
+ detection: string().optional(),
13337
+ decoder: string().optional(),
13338
+ audio: string().optional()
13339
+ })
13340
+ });
13341
+ /** Broker block — null when the broker stage is unreachable or inactive. */
13342
+ var CameraBrokerStatusSchema = object({
13343
+ profiles: array(object({
13344
+ profile: string(),
13345
+ status: string(),
13346
+ codec: string(),
13347
+ width: number(),
13348
+ height: number(),
13349
+ subscribers: number(),
13350
+ inFps: number(),
13351
+ outFps: number()
13352
+ })).readonly(),
13353
+ webrtcSessions: number(),
13354
+ rtspRestream: boolean()
13355
+ });
13356
+ /** Shared-memory ring statistics within the decoder block. */
13357
+ var CameraDecoderShmSchema = object({
13358
+ framesWritten: number(),
13359
+ getFrameHits: number(),
13360
+ getFrameMisses: number(),
13361
+ budgetMb: number()
13362
+ });
13363
+ /** Decoder block — null when the decoder stage is unreachable or inactive. */
13364
+ var CameraDecoderStatusSchema = object({
13365
+ nodeId: string(),
13366
+ formats: array(string()).readonly(),
13367
+ sessionCount: number(),
13368
+ shm: CameraDecoderShmSchema
13369
+ });
13370
+ /** Motion block — null when motion detection is not active for this device. */
13371
+ var CameraMotionStatusSchema = object({
13372
+ enabled: boolean(),
13373
+ fps: number()
13374
+ });
13375
+ /** Detection provisioning sub-block. */
13376
+ var CameraDetectionProvisioningSchema = object({
13377
+ state: _enum([
13378
+ "idle",
13379
+ "installing",
13380
+ "verifying",
13381
+ "ready",
13382
+ "failed"
13383
+ ]),
13384
+ error: string().optional()
13385
+ });
13386
+ /** Detection phase — derived from the runner's engine phase. */
13387
+ var CameraDetectionPhaseSchema = _enum([
13388
+ "idle",
13389
+ "watching",
13390
+ "active"
13391
+ ]);
13392
+ /** Detection block — null when no detection node is assigned or reachable. */
13393
+ var CameraDetectionStatusSchema = object({
13394
+ nodeId: string(),
13395
+ engine: object({
13396
+ backend: string(),
13397
+ device: string()
13398
+ }),
13399
+ phase: CameraDetectionPhaseSchema,
13400
+ configuredFps: number(),
13401
+ actualFps: number(),
13402
+ queueDepth: number(),
13403
+ avgInferenceMs: number(),
13404
+ provisioning: CameraDetectionProvisioningSchema
13405
+ });
13406
+ /** Audio block — null when no audio node is assigned or reachable. */
13407
+ var CameraAudioStatusSchema = object({
13408
+ nodeId: string(),
13409
+ enabled: boolean()
13410
+ });
13411
+ /** Recording block — null when no recording cap is active for this device. */
13412
+ var CameraRecordingStatusSchema = object({
13413
+ mode: _enum([
13414
+ "off",
13415
+ "continuous",
13416
+ "events"
13417
+ ]),
13418
+ active: boolean(),
13419
+ storageBytes: number()
13420
+ });
13421
+ /**
13422
+ * Aggregated per-camera pipeline status — server-composed, single call.
13423
+ *
13424
+ * The `assignment` and `source` blocks are always present.
13425
+ * Every other block is `null` when the stage is inactive or unreachable
13426
+ * during the bounded parallel fan-out in the orchestrator implementation.
13427
+ *
13428
+ * See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
13429
+ */
13430
+ var CameraStatusSchema = object({
13431
+ deviceId: number(),
13432
+ assignment: CameraAssignmentStatusSchema,
13433
+ source: CameraSourceStatusSchema,
13434
+ broker: CameraBrokerStatusSchema.nullable(),
13435
+ decoder: CameraDecoderStatusSchema.nullable(),
13436
+ motion: CameraMotionStatusSchema.nullable(),
13437
+ detection: CameraDetectionStatusSchema.nullable(),
13438
+ audio: CameraAudioStatusSchema.nullable(),
13439
+ recording: CameraRecordingStatusSchema.nullable(),
13440
+ /** Unix timestamp (ms) when this snapshot was composed server-side. */
13441
+ fetchedAt: number()
13442
+ });
13282
13443
  method(object({
13283
13444
  deviceId: number(),
13284
13445
  agentNodeId: string()
@@ -13346,6 +13507,12 @@ method(object({
13346
13507
  }), {
13347
13508
  kind: "mutation",
13348
13509
  auth: "admin"
13510
+ }), method(object({
13511
+ agentNodeId: string(),
13512
+ maxCameras: number().int().nonnegative().nullable()
13513
+ }), object({ success: literal(true) }), {
13514
+ kind: "mutation",
13515
+ auth: "admin"
13349
13516
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
13350
13517
  deviceId: number(),
13351
13518
  addonId: string(),
@@ -13371,7 +13538,7 @@ method(object({
13371
13538
  }), method(object({
13372
13539
  deviceId: number(),
13373
13540
  agentNodeId: string().optional()
13374
- }), CameraPipelineConfigSchema), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
13541
+ }), CameraPipelineConfigSchema), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
13375
13542
  name: string(),
13376
13543
  description: string().optional(),
13377
13544
  config: CameraPipelineConfigSchema
@@ -16420,6 +16587,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
16420
16587
  kind: "mutation",
16421
16588
  auth: "admin"
16422
16589
  });
16590
+ var jobKindSchema = _enum([
16591
+ "install",
16592
+ "update",
16593
+ "uninstall",
16594
+ "restart"
16595
+ ]);
16596
+ var taskPhaseSchema = _enum([
16597
+ "queued",
16598
+ "fetching",
16599
+ "staged",
16600
+ "validating",
16601
+ "applying",
16602
+ "restarting",
16603
+ "applied",
16604
+ "done",
16605
+ "failed",
16606
+ "skipped"
16607
+ ]);
16608
+ var taskTargetSchema = _enum(["framework", "addon"]);
16609
+ var taskLogEntrySchema = object({
16610
+ tsMs: number(),
16611
+ nodeId: string(),
16612
+ packageName: string(),
16613
+ phase: taskPhaseSchema,
16614
+ message: string()
16615
+ });
16616
+ var lifecycleTaskSchema = object({
16617
+ taskId: string(),
16618
+ nodeId: string(),
16619
+ packageName: string(),
16620
+ fromVersion: string().nullable(),
16621
+ toVersion: string(),
16622
+ target: taskTargetSchema,
16623
+ phase: taskPhaseSchema,
16624
+ stagedPath: string().nullable(),
16625
+ attempts: number(),
16626
+ steps: array(taskLogEntrySchema),
16627
+ error: string().nullable(),
16628
+ startedAtMs: number().nullable(),
16629
+ finishedAtMs: number().nullable()
16630
+ });
16631
+ var lifecycleJobStateSchema = _enum([
16632
+ "running",
16633
+ "completed",
16634
+ "failed",
16635
+ "partially-failed",
16636
+ "cancelled"
16637
+ ]);
16638
+ var lifecycleJobScopeSchema = _enum([
16639
+ "single",
16640
+ "bulk",
16641
+ "cluster"
16642
+ ]);
16643
+ var lifecycleJobSchema = object({
16644
+ jobId: string(),
16645
+ kind: jobKindSchema,
16646
+ createdAtMs: number(),
16647
+ createdBy: string(),
16648
+ scope: lifecycleJobScopeSchema,
16649
+ tasks: array(lifecycleTaskSchema),
16650
+ state: lifecycleJobStateSchema,
16651
+ schemaVersion: literal(1)
16652
+ });
16423
16653
  /**
16424
16654
  * addons — system-scoped singleton capability for addon package
16425
16655
  * management (install, update, configure, restart) and per-addon log
@@ -16602,7 +16832,7 @@ var BulkUpdatePhaseSchema = _enum([
16602
16832
  "restarting",
16603
16833
  "finalizing"
16604
16834
  ]);
16605
- var BulkUpdateStateSchema = object({
16835
+ object({
16606
16836
  id: string(),
16607
16837
  nodeId: string(),
16608
16838
  startedAtMs: number(),
@@ -16705,20 +16935,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16705
16935
  }), UpdateFrameworkPackageResultSchema, {
16706
16936
  kind: "mutation",
16707
16937
  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, {
16938
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16722
16939
  kind: "mutation",
16723
16940
  auth: "admin"
16724
16941
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16740,6 +16957,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16740
16957
  kind: "mutation",
16741
16958
  auth: "admin"
16742
16959
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16960
+ kind: _enum([
16961
+ "install",
16962
+ "update",
16963
+ "uninstall",
16964
+ "restart"
16965
+ ]),
16966
+ targets: array(object({
16967
+ name: string().min(1),
16968
+ version: string().min(1)
16969
+ })).min(1),
16970
+ nodeIds: array(string()).optional()
16971
+ }), object({ jobId: string() }), {
16972
+ kind: "mutation",
16973
+ auth: "admin"
16974
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16975
+ kind: "mutation",
16976
+ auth: "admin"
16977
+ }), method(object({
16743
16978
  addonId: string(),
16744
16979
  level: LogLevelSchema$1.optional()
16745
16980
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16780,7 +17015,7 @@ Object.freeze({
16780
17015
  addonId: null,
16781
17016
  access: "create"
16782
17017
  },
16783
- "addons.cancelBulkUpdate": {
17018
+ "addons.cancelJob": {
16784
17019
  capName: "addons",
16785
17020
  capScope: "system",
16786
17021
  addonId: null,
@@ -16810,7 +17045,7 @@ Object.freeze({
16810
17045
  addonId: null,
16811
17046
  access: "view"
16812
17047
  },
16813
- "addons.getBulkUpdateState": {
17048
+ "addons.getJob": {
16814
17049
  capName: "addons",
16815
17050
  capScope: "system",
16816
17051
  addonId: null,
@@ -16858,19 +17093,19 @@ Object.freeze({
16858
17093
  addonId: null,
16859
17094
  access: "view"
16860
17095
  },
16861
- "addons.listActiveBulkUpdates": {
17096
+ "addons.listCapabilityProviders": {
16862
17097
  capName: "addons",
16863
17098
  capScope: "system",
16864
17099
  addonId: null,
16865
17100
  access: "view"
16866
17101
  },
16867
- "addons.listCapabilityProviders": {
17102
+ "addons.listFrameworkPackages": {
16868
17103
  capName: "addons",
16869
17104
  capScope: "system",
16870
17105
  addonId: null,
16871
17106
  access: "view"
16872
17107
  },
16873
- "addons.listFrameworkPackages": {
17108
+ "addons.listJobs": {
16874
17109
  capName: "addons",
16875
17110
  capScope: "system",
16876
17111
  addonId: null,
@@ -16954,7 +17189,7 @@ Object.freeze({
16954
17189
  addonId: null,
16955
17190
  access: "create"
16956
17191
  },
16957
- "addons.startBulkUpdate": {
17192
+ "addons.startJob": {
16958
17193
  capName: "addons",
16959
17194
  capScope: "system",
16960
17195
  addonId: null,
@@ -19180,6 +19415,12 @@ Object.freeze({
19180
19415
  addonId: null,
19181
19416
  access: "view"
19182
19417
  },
19418
+ "pipelineExecutor.getEngineProvisioning": {
19419
+ capName: "pipeline-executor",
19420
+ capScope: "system",
19421
+ addonId: null,
19422
+ access: "view"
19423
+ },
19183
19424
  "pipelineExecutor.getGlobalPipelineConfig": {
19184
19425
  capName: "pipeline-executor",
19185
19426
  capScope: "system",
@@ -19384,6 +19625,18 @@ Object.freeze({
19384
19625
  addonId: null,
19385
19626
  access: "view"
19386
19627
  },
19628
+ "pipelineOrchestrator.getCameraStatus": {
19629
+ capName: "pipeline-orchestrator",
19630
+ capScope: "system",
19631
+ addonId: null,
19632
+ access: "view"
19633
+ },
19634
+ "pipelineOrchestrator.getCameraStatuses": {
19635
+ capName: "pipeline-orchestrator",
19636
+ capScope: "system",
19637
+ addonId: null,
19638
+ access: "view"
19639
+ },
19387
19640
  "pipelineOrchestrator.getCameraStepOverrides": {
19388
19641
  capName: "pipeline-orchestrator",
19389
19642
  capScope: "system",
@@ -19468,6 +19721,12 @@ Object.freeze({
19468
19721
  addonId: null,
19469
19722
  access: "create"
19470
19723
  },
19724
+ "pipelineOrchestrator.setAgentMaxCameras": {
19725
+ capName: "pipeline-orchestrator",
19726
+ capScope: "system",
19727
+ addonId: null,
19728
+ access: "create"
19729
+ },
19471
19730
  "pipelineOrchestrator.setCameraPipelineForAgent": {
19472
19731
  capName: "pipeline-orchestrator",
19473
19732
  capScope: "system",
@@ -20941,6 +21200,32 @@ Object.freeze({
20941
21200
  "network-access": "ingress",
20942
21201
  "smtp-provider": "email"
20943
21202
  });
21203
+ var frameworkSwapPackageSchema = object({
21204
+ name: string(),
21205
+ stagedPath: string(),
21206
+ backupPath: string(),
21207
+ toVersion: string(),
21208
+ fromVersion: string().nullable()
21209
+ });
21210
+ object({
21211
+ jobId: string(),
21212
+ taskId: string(),
21213
+ packages: array(frameworkSwapPackageSchema),
21214
+ requestedAtMs: number(),
21215
+ schemaVersion: literal(1)
21216
+ });
21217
+ object({
21218
+ jobId: string(),
21219
+ taskId: string(),
21220
+ backups: array(object({
21221
+ name: string(),
21222
+ backupPath: string(),
21223
+ livePath: string()
21224
+ })),
21225
+ appliedAtMs: number(),
21226
+ bootAttempts: number(),
21227
+ schemaVersion: literal(1)
21228
+ });
20944
21229
  //#endregion
20945
21230
  //#region src/onvif-camera.ts
20946
21231
  var onvifCameraSchema = object({
package/dist/addon.mjs CHANGED
@@ -4986,6 +4986,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
4986
4986
  */
4987
4987
  EventCategory["PipelineEngineMetricsSnapshot"] = "pipeline.engine-metrics-snapshot";
4988
4988
  /**
4989
+ * Per-node detection-engine runtime-provisioning transition. Emitted by
4990
+ * the detection-pipeline provider on every state change of its lazy
4991
+ * engine-provisioning machine (idle → installing → verifying → ready,
4992
+ * or → failed with a `nextRetryAt`). Payload is the
4993
+ * `EngineProvisioningState` snapshot; `event.source.nodeId` carries the
4994
+ * node. The Pipeline page subscribes to drive a live "installing
4995
+ * OpenVINO… / ready" indicator per node without polling
4996
+ * `pipelineExecutor.getEngineProvisioning`. Telemetry-grade (D8): the UI
4997
+ * also reads the cap snapshot on mount / reconnect. Phase 2.
4998
+ */
4999
+ EventCategory["PipelineEngineProvisioning"] = "pipeline.engine-provisioning";
5000
+ /**
4989
5001
  * Cluster topology snapshot. Carries the same payload returned by
4990
5002
  * `nodes.topology` (every reachable node + addons + processes).
4991
5003
  * Emitted by the hub on any agent / addon lifecycle change
@@ -5135,14 +5147,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5135
5147
  EventCategory["DeviceSleeping"] = "device.sleeping";
5136
5148
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5137
5149
  /**
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
5150
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5151
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5152
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5153
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5154
+ * in F4 once live bulk progress is re-implemented over the engine events.
5144
5155
  */
5145
5156
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5157
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5158
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5146
5159
  /**
5147
5160
  * A container's child visibility toggled (hidden/shown). Emitted by the
5148
5161
  * `accessories` cap when a child device is hidden or revealed.
@@ -9263,6 +9276,24 @@ var DetectorOutputSchema = object({
9263
9276
  inferenceMs: number(),
9264
9277
  modelId: string()
9265
9278
  });
9279
+ var EngineProvisioningSchema = object({
9280
+ runtimeId: _enum([
9281
+ "onnx",
9282
+ "openvino",
9283
+ "coreml"
9284
+ ]).nullable(),
9285
+ device: string().nullable(),
9286
+ state: _enum([
9287
+ "idle",
9288
+ "installing",
9289
+ "verifying",
9290
+ "ready",
9291
+ "failed"
9292
+ ]),
9293
+ progress: number().optional(),
9294
+ error: string().optional(),
9295
+ nextRetryAt: number().optional()
9296
+ });
9266
9297
  var PipelineStepInputSchema = lazy(() => object({
9267
9298
  addonId: string(),
9268
9299
  modelId: string(),
@@ -9331,7 +9362,7 @@ var PipelineRunResultBridge = custom();
9331
9362
  method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(PipelineEngineChoiceSchema, array(PipelineDefaultStepSchema)), method(_void(), PipelineEngineChoiceSchema, {
9332
9363
  kind: "mutation",
9333
9364
  auth: "admin"
9334
- }), method(_void(), record(string(), object({
9365
+ }), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
9335
9366
  modelId: string(),
9336
9367
  settings: record(string(), unknown()).readonly()
9337
9368
  }))), method(object({ steps: record(string(), object({
@@ -13178,7 +13209,10 @@ var AgentAddonConfigSchema = object({
13178
13209
  modelId: string(),
13179
13210
  settings: record(string(), unknown()).readonly()
13180
13211
  });
13181
- var AgentPipelineSettingsSchema = object({ addonDefaults: record(string(), AgentAddonConfigSchema).readonly() });
13212
+ var AgentPipelineSettingsSchema = object({
13213
+ addonDefaults: record(string(), AgentAddonConfigSchema).readonly(),
13214
+ maxCameras: number().int().nonnegative().nullable().default(null)
13215
+ });
13182
13216
  var CameraPipelineForAgentSchema = object({
13183
13217
  steps: array(PipelineStepInputSchema).readonly(),
13184
13218
  audio: object({
@@ -13280,6 +13314,133 @@ var GlobalMetricsSchema = object({
13280
13314
  * capability providers.
13281
13315
  */
13282
13316
  var CapabilityBindingsSchema = record(string(), string());
13317
+ /** Source block — always present; derives from the stream catalog. */
13318
+ var CameraSourceStatusSchema = object({ streams: array(object({
13319
+ camStreamId: string(),
13320
+ codec: string(),
13321
+ width: number(),
13322
+ height: number(),
13323
+ fps: number(),
13324
+ kind: string()
13325
+ })).readonly() });
13326
+ /** Assignment block — always present (orchestrator-local, no remote call). */
13327
+ var CameraAssignmentStatusSchema = object({
13328
+ detectionNodeId: string().nullable(),
13329
+ decoderNodeId: string().nullable(),
13330
+ audioNodeId: string().nullable(),
13331
+ pinned: object({
13332
+ detection: boolean(),
13333
+ decoder: boolean(),
13334
+ audio: boolean()
13335
+ }),
13336
+ reasons: object({
13337
+ detection: string().optional(),
13338
+ decoder: string().optional(),
13339
+ audio: string().optional()
13340
+ })
13341
+ });
13342
+ /** Broker block — null when the broker stage is unreachable or inactive. */
13343
+ var CameraBrokerStatusSchema = object({
13344
+ profiles: array(object({
13345
+ profile: string(),
13346
+ status: string(),
13347
+ codec: string(),
13348
+ width: number(),
13349
+ height: number(),
13350
+ subscribers: number(),
13351
+ inFps: number(),
13352
+ outFps: number()
13353
+ })).readonly(),
13354
+ webrtcSessions: number(),
13355
+ rtspRestream: boolean()
13356
+ });
13357
+ /** Shared-memory ring statistics within the decoder block. */
13358
+ var CameraDecoderShmSchema = object({
13359
+ framesWritten: number(),
13360
+ getFrameHits: number(),
13361
+ getFrameMisses: number(),
13362
+ budgetMb: number()
13363
+ });
13364
+ /** Decoder block — null when the decoder stage is unreachable or inactive. */
13365
+ var CameraDecoderStatusSchema = object({
13366
+ nodeId: string(),
13367
+ formats: array(string()).readonly(),
13368
+ sessionCount: number(),
13369
+ shm: CameraDecoderShmSchema
13370
+ });
13371
+ /** Motion block — null when motion detection is not active for this device. */
13372
+ var CameraMotionStatusSchema = object({
13373
+ enabled: boolean(),
13374
+ fps: number()
13375
+ });
13376
+ /** Detection provisioning sub-block. */
13377
+ var CameraDetectionProvisioningSchema = object({
13378
+ state: _enum([
13379
+ "idle",
13380
+ "installing",
13381
+ "verifying",
13382
+ "ready",
13383
+ "failed"
13384
+ ]),
13385
+ error: string().optional()
13386
+ });
13387
+ /** Detection phase — derived from the runner's engine phase. */
13388
+ var CameraDetectionPhaseSchema = _enum([
13389
+ "idle",
13390
+ "watching",
13391
+ "active"
13392
+ ]);
13393
+ /** Detection block — null when no detection node is assigned or reachable. */
13394
+ var CameraDetectionStatusSchema = object({
13395
+ nodeId: string(),
13396
+ engine: object({
13397
+ backend: string(),
13398
+ device: string()
13399
+ }),
13400
+ phase: CameraDetectionPhaseSchema,
13401
+ configuredFps: number(),
13402
+ actualFps: number(),
13403
+ queueDepth: number(),
13404
+ avgInferenceMs: number(),
13405
+ provisioning: CameraDetectionProvisioningSchema
13406
+ });
13407
+ /** Audio block — null when no audio node is assigned or reachable. */
13408
+ var CameraAudioStatusSchema = object({
13409
+ nodeId: string(),
13410
+ enabled: boolean()
13411
+ });
13412
+ /** Recording block — null when no recording cap is active for this device. */
13413
+ var CameraRecordingStatusSchema = object({
13414
+ mode: _enum([
13415
+ "off",
13416
+ "continuous",
13417
+ "events"
13418
+ ]),
13419
+ active: boolean(),
13420
+ storageBytes: number()
13421
+ });
13422
+ /**
13423
+ * Aggregated per-camera pipeline status — server-composed, single call.
13424
+ *
13425
+ * The `assignment` and `source` blocks are always present.
13426
+ * Every other block is `null` when the stage is inactive or unreachable
13427
+ * during the bounded parallel fan-out in the orchestrator implementation.
13428
+ *
13429
+ * See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
13430
+ */
13431
+ var CameraStatusSchema = object({
13432
+ deviceId: number(),
13433
+ assignment: CameraAssignmentStatusSchema,
13434
+ source: CameraSourceStatusSchema,
13435
+ broker: CameraBrokerStatusSchema.nullable(),
13436
+ decoder: CameraDecoderStatusSchema.nullable(),
13437
+ motion: CameraMotionStatusSchema.nullable(),
13438
+ detection: CameraDetectionStatusSchema.nullable(),
13439
+ audio: CameraAudioStatusSchema.nullable(),
13440
+ recording: CameraRecordingStatusSchema.nullable(),
13441
+ /** Unix timestamp (ms) when this snapshot was composed server-side. */
13442
+ fetchedAt: number()
13443
+ });
13283
13444
  method(object({
13284
13445
  deviceId: number(),
13285
13446
  agentNodeId: string()
@@ -13347,6 +13508,12 @@ method(object({
13347
13508
  }), {
13348
13509
  kind: "mutation",
13349
13510
  auth: "admin"
13511
+ }), method(object({
13512
+ agentNodeId: string(),
13513
+ maxCameras: number().int().nonnegative().nullable()
13514
+ }), object({ success: literal(true) }), {
13515
+ kind: "mutation",
13516
+ auth: "admin"
13350
13517
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
13351
13518
  deviceId: number(),
13352
13519
  addonId: string(),
@@ -13372,7 +13539,7 @@ method(object({
13372
13539
  }), method(object({
13373
13540
  deviceId: number(),
13374
13541
  agentNodeId: string().optional()
13375
- }), CameraPipelineConfigSchema), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
13542
+ }), CameraPipelineConfigSchema), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
13376
13543
  name: string(),
13377
13544
  description: string().optional(),
13378
13545
  config: CameraPipelineConfigSchema
@@ -16421,6 +16588,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
16421
16588
  kind: "mutation",
16422
16589
  auth: "admin"
16423
16590
  });
16591
+ var jobKindSchema = _enum([
16592
+ "install",
16593
+ "update",
16594
+ "uninstall",
16595
+ "restart"
16596
+ ]);
16597
+ var taskPhaseSchema = _enum([
16598
+ "queued",
16599
+ "fetching",
16600
+ "staged",
16601
+ "validating",
16602
+ "applying",
16603
+ "restarting",
16604
+ "applied",
16605
+ "done",
16606
+ "failed",
16607
+ "skipped"
16608
+ ]);
16609
+ var taskTargetSchema = _enum(["framework", "addon"]);
16610
+ var taskLogEntrySchema = object({
16611
+ tsMs: number(),
16612
+ nodeId: string(),
16613
+ packageName: string(),
16614
+ phase: taskPhaseSchema,
16615
+ message: string()
16616
+ });
16617
+ var lifecycleTaskSchema = object({
16618
+ taskId: string(),
16619
+ nodeId: string(),
16620
+ packageName: string(),
16621
+ fromVersion: string().nullable(),
16622
+ toVersion: string(),
16623
+ target: taskTargetSchema,
16624
+ phase: taskPhaseSchema,
16625
+ stagedPath: string().nullable(),
16626
+ attempts: number(),
16627
+ steps: array(taskLogEntrySchema),
16628
+ error: string().nullable(),
16629
+ startedAtMs: number().nullable(),
16630
+ finishedAtMs: number().nullable()
16631
+ });
16632
+ var lifecycleJobStateSchema = _enum([
16633
+ "running",
16634
+ "completed",
16635
+ "failed",
16636
+ "partially-failed",
16637
+ "cancelled"
16638
+ ]);
16639
+ var lifecycleJobScopeSchema = _enum([
16640
+ "single",
16641
+ "bulk",
16642
+ "cluster"
16643
+ ]);
16644
+ var lifecycleJobSchema = object({
16645
+ jobId: string(),
16646
+ kind: jobKindSchema,
16647
+ createdAtMs: number(),
16648
+ createdBy: string(),
16649
+ scope: lifecycleJobScopeSchema,
16650
+ tasks: array(lifecycleTaskSchema),
16651
+ state: lifecycleJobStateSchema,
16652
+ schemaVersion: literal(1)
16653
+ });
16424
16654
  /**
16425
16655
  * addons — system-scoped singleton capability for addon package
16426
16656
  * management (install, update, configure, restart) and per-addon log
@@ -16603,7 +16833,7 @@ var BulkUpdatePhaseSchema = _enum([
16603
16833
  "restarting",
16604
16834
  "finalizing"
16605
16835
  ]);
16606
- var BulkUpdateStateSchema = object({
16836
+ object({
16607
16837
  id: string(),
16608
16838
  nodeId: string(),
16609
16839
  startedAtMs: number(),
@@ -16706,20 +16936,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16706
16936
  }), UpdateFrameworkPackageResultSchema, {
16707
16937
  kind: "mutation",
16708
16938
  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, {
16939
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16723
16940
  kind: "mutation",
16724
16941
  auth: "admin"
16725
16942
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16741,6 +16958,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16741
16958
  kind: "mutation",
16742
16959
  auth: "admin"
16743
16960
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16961
+ kind: _enum([
16962
+ "install",
16963
+ "update",
16964
+ "uninstall",
16965
+ "restart"
16966
+ ]),
16967
+ targets: array(object({
16968
+ name: string().min(1),
16969
+ version: string().min(1)
16970
+ })).min(1),
16971
+ nodeIds: array(string()).optional()
16972
+ }), object({ jobId: string() }), {
16973
+ kind: "mutation",
16974
+ auth: "admin"
16975
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16976
+ kind: "mutation",
16977
+ auth: "admin"
16978
+ }), method(object({
16744
16979
  addonId: string(),
16745
16980
  level: LogLevelSchema$1.optional()
16746
16981
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16781,7 +17016,7 @@ Object.freeze({
16781
17016
  addonId: null,
16782
17017
  access: "create"
16783
17018
  },
16784
- "addons.cancelBulkUpdate": {
17019
+ "addons.cancelJob": {
16785
17020
  capName: "addons",
16786
17021
  capScope: "system",
16787
17022
  addonId: null,
@@ -16811,7 +17046,7 @@ Object.freeze({
16811
17046
  addonId: null,
16812
17047
  access: "view"
16813
17048
  },
16814
- "addons.getBulkUpdateState": {
17049
+ "addons.getJob": {
16815
17050
  capName: "addons",
16816
17051
  capScope: "system",
16817
17052
  addonId: null,
@@ -16859,19 +17094,19 @@ Object.freeze({
16859
17094
  addonId: null,
16860
17095
  access: "view"
16861
17096
  },
16862
- "addons.listActiveBulkUpdates": {
17097
+ "addons.listCapabilityProviders": {
16863
17098
  capName: "addons",
16864
17099
  capScope: "system",
16865
17100
  addonId: null,
16866
17101
  access: "view"
16867
17102
  },
16868
- "addons.listCapabilityProviders": {
17103
+ "addons.listFrameworkPackages": {
16869
17104
  capName: "addons",
16870
17105
  capScope: "system",
16871
17106
  addonId: null,
16872
17107
  access: "view"
16873
17108
  },
16874
- "addons.listFrameworkPackages": {
17109
+ "addons.listJobs": {
16875
17110
  capName: "addons",
16876
17111
  capScope: "system",
16877
17112
  addonId: null,
@@ -16955,7 +17190,7 @@ Object.freeze({
16955
17190
  addonId: null,
16956
17191
  access: "create"
16957
17192
  },
16958
- "addons.startBulkUpdate": {
17193
+ "addons.startJob": {
16959
17194
  capName: "addons",
16960
17195
  capScope: "system",
16961
17196
  addonId: null,
@@ -19181,6 +19416,12 @@ Object.freeze({
19181
19416
  addonId: null,
19182
19417
  access: "view"
19183
19418
  },
19419
+ "pipelineExecutor.getEngineProvisioning": {
19420
+ capName: "pipeline-executor",
19421
+ capScope: "system",
19422
+ addonId: null,
19423
+ access: "view"
19424
+ },
19184
19425
  "pipelineExecutor.getGlobalPipelineConfig": {
19185
19426
  capName: "pipeline-executor",
19186
19427
  capScope: "system",
@@ -19385,6 +19626,18 @@ Object.freeze({
19385
19626
  addonId: null,
19386
19627
  access: "view"
19387
19628
  },
19629
+ "pipelineOrchestrator.getCameraStatus": {
19630
+ capName: "pipeline-orchestrator",
19631
+ capScope: "system",
19632
+ addonId: null,
19633
+ access: "view"
19634
+ },
19635
+ "pipelineOrchestrator.getCameraStatuses": {
19636
+ capName: "pipeline-orchestrator",
19637
+ capScope: "system",
19638
+ addonId: null,
19639
+ access: "view"
19640
+ },
19388
19641
  "pipelineOrchestrator.getCameraStepOverrides": {
19389
19642
  capName: "pipeline-orchestrator",
19390
19643
  capScope: "system",
@@ -19469,6 +19722,12 @@ Object.freeze({
19469
19722
  addonId: null,
19470
19723
  access: "create"
19471
19724
  },
19725
+ "pipelineOrchestrator.setAgentMaxCameras": {
19726
+ capName: "pipeline-orchestrator",
19727
+ capScope: "system",
19728
+ addonId: null,
19729
+ access: "create"
19730
+ },
19472
19731
  "pipelineOrchestrator.setCameraPipelineForAgent": {
19473
19732
  capName: "pipeline-orchestrator",
19474
19733
  capScope: "system",
@@ -20942,6 +21201,32 @@ Object.freeze({
20942
21201
  "network-access": "ingress",
20943
21202
  "smtp-provider": "email"
20944
21203
  });
21204
+ var frameworkSwapPackageSchema = object({
21205
+ name: string(),
21206
+ stagedPath: string(),
21207
+ backupPath: string(),
21208
+ toVersion: string(),
21209
+ fromVersion: string().nullable()
21210
+ });
21211
+ object({
21212
+ jobId: string(),
21213
+ taskId: string(),
21214
+ packages: array(frameworkSwapPackageSchema),
21215
+ requestedAtMs: number(),
21216
+ schemaVersion: literal(1)
21217
+ });
21218
+ object({
21219
+ jobId: string(),
21220
+ taskId: string(),
21221
+ backups: array(object({
21222
+ name: string(),
21223
+ backupPath: string(),
21224
+ livePath: string()
21225
+ })),
21226
+ appliedAtMs: number(),
21227
+ bootAttempts: number(),
21228
+ schemaVersion: literal(1)
21229
+ });
20945
21230
  //#endregion
20946
21231
  //#region src/onvif-camera.ts
20947
21232
  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.5",
4
4
  "description": "ONVIF camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",