@camstack/addon-provider-hikvision 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.
@@ -10561,6 +10574,24 @@ var DetectorOutputSchema = object({
10561
10574
  inferenceMs: number(),
10562
10575
  modelId: string()
10563
10576
  });
10577
+ var EngineProvisioningSchema = object({
10578
+ runtimeId: _enum([
10579
+ "onnx",
10580
+ "openvino",
10581
+ "coreml"
10582
+ ]).nullable(),
10583
+ device: string().nullable(),
10584
+ state: _enum([
10585
+ "idle",
10586
+ "installing",
10587
+ "verifying",
10588
+ "ready",
10589
+ "failed"
10590
+ ]),
10591
+ progress: number().optional(),
10592
+ error: string().optional(),
10593
+ nextRetryAt: number().optional()
10594
+ });
10564
10595
  var PipelineStepInputSchema = lazy(() => object({
10565
10596
  addonId: string(),
10566
10597
  modelId: string(),
@@ -10629,7 +10660,7 @@ var PipelineRunResultBridge = custom();
10629
10660
  method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(PipelineEngineChoiceSchema, array(PipelineDefaultStepSchema)), method(_void(), PipelineEngineChoiceSchema, {
10630
10661
  kind: "mutation",
10631
10662
  auth: "admin"
10632
- }), method(_void(), record(string(), object({
10663
+ }), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
10633
10664
  modelId: string(),
10634
10665
  settings: record(string(), unknown()).readonly()
10635
10666
  }))), method(object({ steps: record(string(), object({
@@ -15797,7 +15828,10 @@ var AgentAddonConfigSchema = object({
15797
15828
  modelId: string(),
15798
15829
  settings: record(string(), unknown()).readonly()
15799
15830
  });
15800
- var AgentPipelineSettingsSchema = object({ addonDefaults: record(string(), AgentAddonConfigSchema).readonly() });
15831
+ var AgentPipelineSettingsSchema = object({
15832
+ addonDefaults: record(string(), AgentAddonConfigSchema).readonly(),
15833
+ maxCameras: number().int().nonnegative().nullable().default(null)
15834
+ });
15801
15835
  var CameraPipelineForAgentSchema = object({
15802
15836
  steps: array(PipelineStepInputSchema).readonly(),
15803
15837
  audio: object({
@@ -15899,6 +15933,133 @@ var GlobalMetricsSchema = object({
15899
15933
  * capability providers.
15900
15934
  */
15901
15935
  var CapabilityBindingsSchema = record(string(), string());
15936
+ /** Source block — always present; derives from the stream catalog. */
15937
+ var CameraSourceStatusSchema = object({ streams: array(object({
15938
+ camStreamId: string(),
15939
+ codec: string(),
15940
+ width: number(),
15941
+ height: number(),
15942
+ fps: number(),
15943
+ kind: string()
15944
+ })).readonly() });
15945
+ /** Assignment block — always present (orchestrator-local, no remote call). */
15946
+ var CameraAssignmentStatusSchema = object({
15947
+ detectionNodeId: string().nullable(),
15948
+ decoderNodeId: string().nullable(),
15949
+ audioNodeId: string().nullable(),
15950
+ pinned: object({
15951
+ detection: boolean(),
15952
+ decoder: boolean(),
15953
+ audio: boolean()
15954
+ }),
15955
+ reasons: object({
15956
+ detection: string().optional(),
15957
+ decoder: string().optional(),
15958
+ audio: string().optional()
15959
+ })
15960
+ });
15961
+ /** Broker block — null when the broker stage is unreachable or inactive. */
15962
+ var CameraBrokerStatusSchema = object({
15963
+ profiles: array(object({
15964
+ profile: string(),
15965
+ status: string(),
15966
+ codec: string(),
15967
+ width: number(),
15968
+ height: number(),
15969
+ subscribers: number(),
15970
+ inFps: number(),
15971
+ outFps: number()
15972
+ })).readonly(),
15973
+ webrtcSessions: number(),
15974
+ rtspRestream: boolean()
15975
+ });
15976
+ /** Shared-memory ring statistics within the decoder block. */
15977
+ var CameraDecoderShmSchema = object({
15978
+ framesWritten: number(),
15979
+ getFrameHits: number(),
15980
+ getFrameMisses: number(),
15981
+ budgetMb: number()
15982
+ });
15983
+ /** Decoder block — null when the decoder stage is unreachable or inactive. */
15984
+ var CameraDecoderStatusSchema = object({
15985
+ nodeId: string(),
15986
+ formats: array(string()).readonly(),
15987
+ sessionCount: number(),
15988
+ shm: CameraDecoderShmSchema
15989
+ });
15990
+ /** Motion block — null when motion detection is not active for this device. */
15991
+ var CameraMotionStatusSchema = object({
15992
+ enabled: boolean(),
15993
+ fps: number()
15994
+ });
15995
+ /** Detection provisioning sub-block. */
15996
+ var CameraDetectionProvisioningSchema = object({
15997
+ state: _enum([
15998
+ "idle",
15999
+ "installing",
16000
+ "verifying",
16001
+ "ready",
16002
+ "failed"
16003
+ ]),
16004
+ error: string().optional()
16005
+ });
16006
+ /** Detection phase — derived from the runner's engine phase. */
16007
+ var CameraDetectionPhaseSchema = _enum([
16008
+ "idle",
16009
+ "watching",
16010
+ "active"
16011
+ ]);
16012
+ /** Detection block — null when no detection node is assigned or reachable. */
16013
+ var CameraDetectionStatusSchema = object({
16014
+ nodeId: string(),
16015
+ engine: object({
16016
+ backend: string(),
16017
+ device: string()
16018
+ }),
16019
+ phase: CameraDetectionPhaseSchema,
16020
+ configuredFps: number(),
16021
+ actualFps: number(),
16022
+ queueDepth: number(),
16023
+ avgInferenceMs: number(),
16024
+ provisioning: CameraDetectionProvisioningSchema
16025
+ });
16026
+ /** Audio block — null when no audio node is assigned or reachable. */
16027
+ var CameraAudioStatusSchema = object({
16028
+ nodeId: string(),
16029
+ enabled: boolean()
16030
+ });
16031
+ /** Recording block — null when no recording cap is active for this device. */
16032
+ var CameraRecordingStatusSchema = object({
16033
+ mode: _enum([
16034
+ "off",
16035
+ "continuous",
16036
+ "events"
16037
+ ]),
16038
+ active: boolean(),
16039
+ storageBytes: number()
16040
+ });
16041
+ /**
16042
+ * Aggregated per-camera pipeline status — server-composed, single call.
16043
+ *
16044
+ * The `assignment` and `source` blocks are always present.
16045
+ * Every other block is `null` when the stage is inactive or unreachable
16046
+ * during the bounded parallel fan-out in the orchestrator implementation.
16047
+ *
16048
+ * See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
16049
+ */
16050
+ var CameraStatusSchema = object({
16051
+ deviceId: number(),
16052
+ assignment: CameraAssignmentStatusSchema,
16053
+ source: CameraSourceStatusSchema,
16054
+ broker: CameraBrokerStatusSchema.nullable(),
16055
+ decoder: CameraDecoderStatusSchema.nullable(),
16056
+ motion: CameraMotionStatusSchema.nullable(),
16057
+ detection: CameraDetectionStatusSchema.nullable(),
16058
+ audio: CameraAudioStatusSchema.nullable(),
16059
+ recording: CameraRecordingStatusSchema.nullable(),
16060
+ /** Unix timestamp (ms) when this snapshot was composed server-side. */
16061
+ fetchedAt: number()
16062
+ });
15902
16063
  method(object({
15903
16064
  deviceId: number(),
15904
16065
  agentNodeId: string()
@@ -15966,6 +16127,12 @@ method(object({
15966
16127
  }), {
15967
16128
  kind: "mutation",
15968
16129
  auth: "admin"
16130
+ }), method(object({
16131
+ agentNodeId: string(),
16132
+ maxCameras: number().int().nonnegative().nullable()
16133
+ }), object({ success: literal(true) }), {
16134
+ kind: "mutation",
16135
+ auth: "admin"
15969
16136
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
15970
16137
  deviceId: number(),
15971
16138
  addonId: string(),
@@ -15991,7 +16158,7 @@ method(object({
15991
16158
  }), method(object({
15992
16159
  deviceId: number(),
15993
16160
  agentNodeId: string().optional()
15994
- }), CameraPipelineConfigSchema), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
16161
+ }), CameraPipelineConfigSchema), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
15995
16162
  name: string(),
15996
16163
  description: string().optional(),
15997
16164
  config: CameraPipelineConfigSchema
@@ -19373,6 +19540,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
19373
19540
  kind: "mutation",
19374
19541
  auth: "admin"
19375
19542
  });
19543
+ var jobKindSchema = _enum([
19544
+ "install",
19545
+ "update",
19546
+ "uninstall",
19547
+ "restart"
19548
+ ]);
19549
+ var taskPhaseSchema = _enum([
19550
+ "queued",
19551
+ "fetching",
19552
+ "staged",
19553
+ "validating",
19554
+ "applying",
19555
+ "restarting",
19556
+ "applied",
19557
+ "done",
19558
+ "failed",
19559
+ "skipped"
19560
+ ]);
19561
+ var taskTargetSchema = _enum(["framework", "addon"]);
19562
+ var taskLogEntrySchema = object({
19563
+ tsMs: number(),
19564
+ nodeId: string(),
19565
+ packageName: string(),
19566
+ phase: taskPhaseSchema,
19567
+ message: string()
19568
+ });
19569
+ var lifecycleTaskSchema = object({
19570
+ taskId: string(),
19571
+ nodeId: string(),
19572
+ packageName: string(),
19573
+ fromVersion: string().nullable(),
19574
+ toVersion: string(),
19575
+ target: taskTargetSchema,
19576
+ phase: taskPhaseSchema,
19577
+ stagedPath: string().nullable(),
19578
+ attempts: number(),
19579
+ steps: array(taskLogEntrySchema),
19580
+ error: string().nullable(),
19581
+ startedAtMs: number().nullable(),
19582
+ finishedAtMs: number().nullable()
19583
+ });
19584
+ var lifecycleJobStateSchema = _enum([
19585
+ "running",
19586
+ "completed",
19587
+ "failed",
19588
+ "partially-failed",
19589
+ "cancelled"
19590
+ ]);
19591
+ var lifecycleJobScopeSchema = _enum([
19592
+ "single",
19593
+ "bulk",
19594
+ "cluster"
19595
+ ]);
19596
+ var lifecycleJobSchema = object({
19597
+ jobId: string(),
19598
+ kind: jobKindSchema,
19599
+ createdAtMs: number(),
19600
+ createdBy: string(),
19601
+ scope: lifecycleJobScopeSchema,
19602
+ tasks: array(lifecycleTaskSchema),
19603
+ state: lifecycleJobStateSchema,
19604
+ schemaVersion: literal(1)
19605
+ });
19376
19606
  /**
19377
19607
  * addons — system-scoped singleton capability for addon package
19378
19608
  * management (install, update, configure, restart) and per-addon log
@@ -19555,7 +19785,7 @@ var BulkUpdatePhaseSchema = _enum([
19555
19785
  "restarting",
19556
19786
  "finalizing"
19557
19787
  ]);
19558
- var BulkUpdateStateSchema = object({
19788
+ object({
19559
19789
  id: string(),
19560
19790
  nodeId: string(),
19561
19791
  startedAtMs: number(),
@@ -19658,20 +19888,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
19658
19888
  }), UpdateFrameworkPackageResultSchema, {
19659
19889
  kind: "mutation",
19660
19890
  auth: "admin"
19661
- }), method(object({
19662
- nodeId: string(),
19663
- items: array(object({
19664
- name: string(),
19665
- version: string(),
19666
- isSystem: boolean()
19667
- })).readonly()
19668
- }), object({ id: string() }), {
19669
- kind: "mutation",
19670
- auth: "admin"
19671
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
19672
- kind: "mutation",
19673
- auth: "admin"
19674
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
19891
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
19675
19892
  kind: "mutation",
19676
19893
  auth: "admin"
19677
19894
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -19693,6 +19910,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
19693
19910
  kind: "mutation",
19694
19911
  auth: "admin"
19695
19912
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
19913
+ kind: _enum([
19914
+ "install",
19915
+ "update",
19916
+ "uninstall",
19917
+ "restart"
19918
+ ]),
19919
+ targets: array(object({
19920
+ name: string().min(1),
19921
+ version: string().min(1)
19922
+ })).min(1),
19923
+ nodeIds: array(string()).optional()
19924
+ }), object({ jobId: string() }), {
19925
+ kind: "mutation",
19926
+ auth: "admin"
19927
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
19928
+ kind: "mutation",
19929
+ auth: "admin"
19930
+ }), method(object({
19696
19931
  addonId: string(),
19697
19932
  level: LogLevelSchema$1.optional()
19698
19933
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -19733,7 +19968,7 @@ Object.freeze({
19733
19968
  addonId: null,
19734
19969
  access: "create"
19735
19970
  },
19736
- "addons.cancelBulkUpdate": {
19971
+ "addons.cancelJob": {
19737
19972
  capName: "addons",
19738
19973
  capScope: "system",
19739
19974
  addonId: null,
@@ -19763,7 +19998,7 @@ Object.freeze({
19763
19998
  addonId: null,
19764
19999
  access: "view"
19765
20000
  },
19766
- "addons.getBulkUpdateState": {
20001
+ "addons.getJob": {
19767
20002
  capName: "addons",
19768
20003
  capScope: "system",
19769
20004
  addonId: null,
@@ -19811,19 +20046,19 @@ Object.freeze({
19811
20046
  addonId: null,
19812
20047
  access: "view"
19813
20048
  },
19814
- "addons.listActiveBulkUpdates": {
20049
+ "addons.listCapabilityProviders": {
19815
20050
  capName: "addons",
19816
20051
  capScope: "system",
19817
20052
  addonId: null,
19818
20053
  access: "view"
19819
20054
  },
19820
- "addons.listCapabilityProviders": {
20055
+ "addons.listFrameworkPackages": {
19821
20056
  capName: "addons",
19822
20057
  capScope: "system",
19823
20058
  addonId: null,
19824
20059
  access: "view"
19825
20060
  },
19826
- "addons.listFrameworkPackages": {
20061
+ "addons.listJobs": {
19827
20062
  capName: "addons",
19828
20063
  capScope: "system",
19829
20064
  addonId: null,
@@ -19907,7 +20142,7 @@ Object.freeze({
19907
20142
  addonId: null,
19908
20143
  access: "create"
19909
20144
  },
19910
- "addons.startBulkUpdate": {
20145
+ "addons.startJob": {
19911
20146
  capName: "addons",
19912
20147
  capScope: "system",
19913
20148
  addonId: null,
@@ -22133,6 +22368,12 @@ Object.freeze({
22133
22368
  addonId: null,
22134
22369
  access: "view"
22135
22370
  },
22371
+ "pipelineExecutor.getEngineProvisioning": {
22372
+ capName: "pipeline-executor",
22373
+ capScope: "system",
22374
+ addonId: null,
22375
+ access: "view"
22376
+ },
22136
22377
  "pipelineExecutor.getGlobalPipelineConfig": {
22137
22378
  capName: "pipeline-executor",
22138
22379
  capScope: "system",
@@ -22337,6 +22578,18 @@ Object.freeze({
22337
22578
  addonId: null,
22338
22579
  access: "view"
22339
22580
  },
22581
+ "pipelineOrchestrator.getCameraStatus": {
22582
+ capName: "pipeline-orchestrator",
22583
+ capScope: "system",
22584
+ addonId: null,
22585
+ access: "view"
22586
+ },
22587
+ "pipelineOrchestrator.getCameraStatuses": {
22588
+ capName: "pipeline-orchestrator",
22589
+ capScope: "system",
22590
+ addonId: null,
22591
+ access: "view"
22592
+ },
22340
22593
  "pipelineOrchestrator.getCameraStepOverrides": {
22341
22594
  capName: "pipeline-orchestrator",
22342
22595
  capScope: "system",
@@ -22421,6 +22674,12 @@ Object.freeze({
22421
22674
  addonId: null,
22422
22675
  access: "create"
22423
22676
  },
22677
+ "pipelineOrchestrator.setAgentMaxCameras": {
22678
+ capName: "pipeline-orchestrator",
22679
+ capScope: "system",
22680
+ addonId: null,
22681
+ access: "create"
22682
+ },
22424
22683
  "pipelineOrchestrator.setCameraPipelineForAgent": {
22425
22684
  capName: "pipeline-orchestrator",
22426
22685
  capScope: "system",
@@ -23894,6 +24153,32 @@ Object.freeze({
23894
24153
  "network-access": "ingress",
23895
24154
  "smtp-provider": "email"
23896
24155
  });
24156
+ var frameworkSwapPackageSchema = object({
24157
+ name: string(),
24158
+ stagedPath: string(),
24159
+ backupPath: string(),
24160
+ toVersion: string(),
24161
+ fromVersion: string().nullable()
24162
+ });
24163
+ object({
24164
+ jobId: string(),
24165
+ taskId: string(),
24166
+ packages: array(frameworkSwapPackageSchema),
24167
+ requestedAtMs: number(),
24168
+ schemaVersion: literal(1)
24169
+ });
24170
+ object({
24171
+ jobId: string(),
24172
+ taskId: string(),
24173
+ backups: array(object({
24174
+ name: string(),
24175
+ backupPath: string(),
24176
+ livePath: string()
24177
+ })),
24178
+ appliedAtMs: number(),
24179
+ bootAttempts: number(),
24180
+ schemaVersion: literal(1)
24181
+ });
23897
24182
  //#endregion
23898
24183
  //#region src/schema.ts
23899
24184
  /**
package/dist/addon.mjs CHANGED
@@ -4984,6 +4984,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
4984
4984
  */
4985
4985
  EventCategory["PipelineEngineMetricsSnapshot"] = "pipeline.engine-metrics-snapshot";
4986
4986
  /**
4987
+ * Per-node detection-engine runtime-provisioning transition. Emitted by
4988
+ * the detection-pipeline provider on every state change of its lazy
4989
+ * engine-provisioning machine (idle → installing → verifying → ready,
4990
+ * or → failed with a `nextRetryAt`). Payload is the
4991
+ * `EngineProvisioningState` snapshot; `event.source.nodeId` carries the
4992
+ * node. The Pipeline page subscribes to drive a live "installing
4993
+ * OpenVINO… / ready" indicator per node without polling
4994
+ * `pipelineExecutor.getEngineProvisioning`. Telemetry-grade (D8): the UI
4995
+ * also reads the cap snapshot on mount / reconnect. Phase 2.
4996
+ */
4997
+ EventCategory["PipelineEngineProvisioning"] = "pipeline.engine-provisioning";
4998
+ /**
4987
4999
  * Cluster topology snapshot. Carries the same payload returned by
4988
5000
  * `nodes.topology` (every reachable node + addons + processes).
4989
5001
  * Emitted by the hub on any agent / addon lifecycle change
@@ -5133,14 +5145,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5133
5145
  EventCategory["DeviceSleeping"] = "device.sleeping";
5134
5146
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5135
5147
  /**
5136
- * Progress snapshot emitted by `BulkUpdateCoordinator` on every state
5137
- * transition (item status change, phase change, completion, cancel).
5138
- * Payload is `BulkUpdateState`. Admin UI subscribes via `useLiveEvent`
5139
- * to drive the sticky `BulkUpdateBanner` and per-row `AddonRowBadge`.
5140
- *
5141
- * Spec: docs/superpowers/specs/2026-05-21-addons-bulk-update-progress-design.md
5148
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5149
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5150
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5151
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5152
+ * in F4 once live bulk progress is re-implemented over the engine events.
5142
5153
  */
5143
5154
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5155
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5156
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5144
5157
  /**
5145
5158
  * A container's child visibility toggled (hidden/shown). Emitted by the
5146
5159
  * `accessories` cap when a child device is hidden or revealed.
@@ -10560,6 +10573,24 @@ var DetectorOutputSchema = object({
10560
10573
  inferenceMs: number(),
10561
10574
  modelId: string()
10562
10575
  });
10576
+ var EngineProvisioningSchema = object({
10577
+ runtimeId: _enum([
10578
+ "onnx",
10579
+ "openvino",
10580
+ "coreml"
10581
+ ]).nullable(),
10582
+ device: string().nullable(),
10583
+ state: _enum([
10584
+ "idle",
10585
+ "installing",
10586
+ "verifying",
10587
+ "ready",
10588
+ "failed"
10589
+ ]),
10590
+ progress: number().optional(),
10591
+ error: string().optional(),
10592
+ nextRetryAt: number().optional()
10593
+ });
10563
10594
  var PipelineStepInputSchema = lazy(() => object({
10564
10595
  addonId: string(),
10565
10596
  modelId: string(),
@@ -10628,7 +10659,7 @@ var PipelineRunResultBridge = custom();
10628
10659
  method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(PipelineEngineChoiceSchema, array(PipelineDefaultStepSchema)), method(_void(), PipelineEngineChoiceSchema, {
10629
10660
  kind: "mutation",
10630
10661
  auth: "admin"
10631
- }), method(_void(), record(string(), object({
10662
+ }), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
10632
10663
  modelId: string(),
10633
10664
  settings: record(string(), unknown()).readonly()
10634
10665
  }))), method(object({ steps: record(string(), object({
@@ -15796,7 +15827,10 @@ var AgentAddonConfigSchema = object({
15796
15827
  modelId: string(),
15797
15828
  settings: record(string(), unknown()).readonly()
15798
15829
  });
15799
- var AgentPipelineSettingsSchema = object({ addonDefaults: record(string(), AgentAddonConfigSchema).readonly() });
15830
+ var AgentPipelineSettingsSchema = object({
15831
+ addonDefaults: record(string(), AgentAddonConfigSchema).readonly(),
15832
+ maxCameras: number().int().nonnegative().nullable().default(null)
15833
+ });
15800
15834
  var CameraPipelineForAgentSchema = object({
15801
15835
  steps: array(PipelineStepInputSchema).readonly(),
15802
15836
  audio: object({
@@ -15898,6 +15932,133 @@ var GlobalMetricsSchema = object({
15898
15932
  * capability providers.
15899
15933
  */
15900
15934
  var CapabilityBindingsSchema = record(string(), string());
15935
+ /** Source block — always present; derives from the stream catalog. */
15936
+ var CameraSourceStatusSchema = object({ streams: array(object({
15937
+ camStreamId: string(),
15938
+ codec: string(),
15939
+ width: number(),
15940
+ height: number(),
15941
+ fps: number(),
15942
+ kind: string()
15943
+ })).readonly() });
15944
+ /** Assignment block — always present (orchestrator-local, no remote call). */
15945
+ var CameraAssignmentStatusSchema = object({
15946
+ detectionNodeId: string().nullable(),
15947
+ decoderNodeId: string().nullable(),
15948
+ audioNodeId: string().nullable(),
15949
+ pinned: object({
15950
+ detection: boolean(),
15951
+ decoder: boolean(),
15952
+ audio: boolean()
15953
+ }),
15954
+ reasons: object({
15955
+ detection: string().optional(),
15956
+ decoder: string().optional(),
15957
+ audio: string().optional()
15958
+ })
15959
+ });
15960
+ /** Broker block — null when the broker stage is unreachable or inactive. */
15961
+ var CameraBrokerStatusSchema = object({
15962
+ profiles: array(object({
15963
+ profile: string(),
15964
+ status: string(),
15965
+ codec: string(),
15966
+ width: number(),
15967
+ height: number(),
15968
+ subscribers: number(),
15969
+ inFps: number(),
15970
+ outFps: number()
15971
+ })).readonly(),
15972
+ webrtcSessions: number(),
15973
+ rtspRestream: boolean()
15974
+ });
15975
+ /** Shared-memory ring statistics within the decoder block. */
15976
+ var CameraDecoderShmSchema = object({
15977
+ framesWritten: number(),
15978
+ getFrameHits: number(),
15979
+ getFrameMisses: number(),
15980
+ budgetMb: number()
15981
+ });
15982
+ /** Decoder block — null when the decoder stage is unreachable or inactive. */
15983
+ var CameraDecoderStatusSchema = object({
15984
+ nodeId: string(),
15985
+ formats: array(string()).readonly(),
15986
+ sessionCount: number(),
15987
+ shm: CameraDecoderShmSchema
15988
+ });
15989
+ /** Motion block — null when motion detection is not active for this device. */
15990
+ var CameraMotionStatusSchema = object({
15991
+ enabled: boolean(),
15992
+ fps: number()
15993
+ });
15994
+ /** Detection provisioning sub-block. */
15995
+ var CameraDetectionProvisioningSchema = object({
15996
+ state: _enum([
15997
+ "idle",
15998
+ "installing",
15999
+ "verifying",
16000
+ "ready",
16001
+ "failed"
16002
+ ]),
16003
+ error: string().optional()
16004
+ });
16005
+ /** Detection phase — derived from the runner's engine phase. */
16006
+ var CameraDetectionPhaseSchema = _enum([
16007
+ "idle",
16008
+ "watching",
16009
+ "active"
16010
+ ]);
16011
+ /** Detection block — null when no detection node is assigned or reachable. */
16012
+ var CameraDetectionStatusSchema = object({
16013
+ nodeId: string(),
16014
+ engine: object({
16015
+ backend: string(),
16016
+ device: string()
16017
+ }),
16018
+ phase: CameraDetectionPhaseSchema,
16019
+ configuredFps: number(),
16020
+ actualFps: number(),
16021
+ queueDepth: number(),
16022
+ avgInferenceMs: number(),
16023
+ provisioning: CameraDetectionProvisioningSchema
16024
+ });
16025
+ /** Audio block — null when no audio node is assigned or reachable. */
16026
+ var CameraAudioStatusSchema = object({
16027
+ nodeId: string(),
16028
+ enabled: boolean()
16029
+ });
16030
+ /** Recording block — null when no recording cap is active for this device. */
16031
+ var CameraRecordingStatusSchema = object({
16032
+ mode: _enum([
16033
+ "off",
16034
+ "continuous",
16035
+ "events"
16036
+ ]),
16037
+ active: boolean(),
16038
+ storageBytes: number()
16039
+ });
16040
+ /**
16041
+ * Aggregated per-camera pipeline status — server-composed, single call.
16042
+ *
16043
+ * The `assignment` and `source` blocks are always present.
16044
+ * Every other block is `null` when the stage is inactive or unreachable
16045
+ * during the bounded parallel fan-out in the orchestrator implementation.
16046
+ *
16047
+ * See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
16048
+ */
16049
+ var CameraStatusSchema = object({
16050
+ deviceId: number(),
16051
+ assignment: CameraAssignmentStatusSchema,
16052
+ source: CameraSourceStatusSchema,
16053
+ broker: CameraBrokerStatusSchema.nullable(),
16054
+ decoder: CameraDecoderStatusSchema.nullable(),
16055
+ motion: CameraMotionStatusSchema.nullable(),
16056
+ detection: CameraDetectionStatusSchema.nullable(),
16057
+ audio: CameraAudioStatusSchema.nullable(),
16058
+ recording: CameraRecordingStatusSchema.nullable(),
16059
+ /** Unix timestamp (ms) when this snapshot was composed server-side. */
16060
+ fetchedAt: number()
16061
+ });
15901
16062
  method(object({
15902
16063
  deviceId: number(),
15903
16064
  agentNodeId: string()
@@ -15965,6 +16126,12 @@ method(object({
15965
16126
  }), {
15966
16127
  kind: "mutation",
15967
16128
  auth: "admin"
16129
+ }), method(object({
16130
+ agentNodeId: string(),
16131
+ maxCameras: number().int().nonnegative().nullable()
16132
+ }), object({ success: literal(true) }), {
16133
+ kind: "mutation",
16134
+ auth: "admin"
15968
16135
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
15969
16136
  deviceId: number(),
15970
16137
  addonId: string(),
@@ -15990,7 +16157,7 @@ method(object({
15990
16157
  }), method(object({
15991
16158
  deviceId: number(),
15992
16159
  agentNodeId: string().optional()
15993
- }), CameraPipelineConfigSchema), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
16160
+ }), CameraPipelineConfigSchema), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
15994
16161
  name: string(),
15995
16162
  description: string().optional(),
15996
16163
  config: CameraPipelineConfigSchema
@@ -19372,6 +19539,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
19372
19539
  kind: "mutation",
19373
19540
  auth: "admin"
19374
19541
  });
19542
+ var jobKindSchema = _enum([
19543
+ "install",
19544
+ "update",
19545
+ "uninstall",
19546
+ "restart"
19547
+ ]);
19548
+ var taskPhaseSchema = _enum([
19549
+ "queued",
19550
+ "fetching",
19551
+ "staged",
19552
+ "validating",
19553
+ "applying",
19554
+ "restarting",
19555
+ "applied",
19556
+ "done",
19557
+ "failed",
19558
+ "skipped"
19559
+ ]);
19560
+ var taskTargetSchema = _enum(["framework", "addon"]);
19561
+ var taskLogEntrySchema = object({
19562
+ tsMs: number(),
19563
+ nodeId: string(),
19564
+ packageName: string(),
19565
+ phase: taskPhaseSchema,
19566
+ message: string()
19567
+ });
19568
+ var lifecycleTaskSchema = object({
19569
+ taskId: string(),
19570
+ nodeId: string(),
19571
+ packageName: string(),
19572
+ fromVersion: string().nullable(),
19573
+ toVersion: string(),
19574
+ target: taskTargetSchema,
19575
+ phase: taskPhaseSchema,
19576
+ stagedPath: string().nullable(),
19577
+ attempts: number(),
19578
+ steps: array(taskLogEntrySchema),
19579
+ error: string().nullable(),
19580
+ startedAtMs: number().nullable(),
19581
+ finishedAtMs: number().nullable()
19582
+ });
19583
+ var lifecycleJobStateSchema = _enum([
19584
+ "running",
19585
+ "completed",
19586
+ "failed",
19587
+ "partially-failed",
19588
+ "cancelled"
19589
+ ]);
19590
+ var lifecycleJobScopeSchema = _enum([
19591
+ "single",
19592
+ "bulk",
19593
+ "cluster"
19594
+ ]);
19595
+ var lifecycleJobSchema = object({
19596
+ jobId: string(),
19597
+ kind: jobKindSchema,
19598
+ createdAtMs: number(),
19599
+ createdBy: string(),
19600
+ scope: lifecycleJobScopeSchema,
19601
+ tasks: array(lifecycleTaskSchema),
19602
+ state: lifecycleJobStateSchema,
19603
+ schemaVersion: literal(1)
19604
+ });
19375
19605
  /**
19376
19606
  * addons — system-scoped singleton capability for addon package
19377
19607
  * management (install, update, configure, restart) and per-addon log
@@ -19554,7 +19784,7 @@ var BulkUpdatePhaseSchema = _enum([
19554
19784
  "restarting",
19555
19785
  "finalizing"
19556
19786
  ]);
19557
- var BulkUpdateStateSchema = object({
19787
+ object({
19558
19788
  id: string(),
19559
19789
  nodeId: string(),
19560
19790
  startedAtMs: number(),
@@ -19657,20 +19887,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
19657
19887
  }), UpdateFrameworkPackageResultSchema, {
19658
19888
  kind: "mutation",
19659
19889
  auth: "admin"
19660
- }), method(object({
19661
- nodeId: string(),
19662
- items: array(object({
19663
- name: string(),
19664
- version: string(),
19665
- isSystem: boolean()
19666
- })).readonly()
19667
- }), object({ id: string() }), {
19668
- kind: "mutation",
19669
- auth: "admin"
19670
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
19671
- kind: "mutation",
19672
- auth: "admin"
19673
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
19890
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
19674
19891
  kind: "mutation",
19675
19892
  auth: "admin"
19676
19893
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -19692,6 +19909,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
19692
19909
  kind: "mutation",
19693
19910
  auth: "admin"
19694
19911
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
19912
+ kind: _enum([
19913
+ "install",
19914
+ "update",
19915
+ "uninstall",
19916
+ "restart"
19917
+ ]),
19918
+ targets: array(object({
19919
+ name: string().min(1),
19920
+ version: string().min(1)
19921
+ })).min(1),
19922
+ nodeIds: array(string()).optional()
19923
+ }), object({ jobId: string() }), {
19924
+ kind: "mutation",
19925
+ auth: "admin"
19926
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
19927
+ kind: "mutation",
19928
+ auth: "admin"
19929
+ }), method(object({
19695
19930
  addonId: string(),
19696
19931
  level: LogLevelSchema$1.optional()
19697
19932
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -19732,7 +19967,7 @@ Object.freeze({
19732
19967
  addonId: null,
19733
19968
  access: "create"
19734
19969
  },
19735
- "addons.cancelBulkUpdate": {
19970
+ "addons.cancelJob": {
19736
19971
  capName: "addons",
19737
19972
  capScope: "system",
19738
19973
  addonId: null,
@@ -19762,7 +19997,7 @@ Object.freeze({
19762
19997
  addonId: null,
19763
19998
  access: "view"
19764
19999
  },
19765
- "addons.getBulkUpdateState": {
20000
+ "addons.getJob": {
19766
20001
  capName: "addons",
19767
20002
  capScope: "system",
19768
20003
  addonId: null,
@@ -19810,19 +20045,19 @@ Object.freeze({
19810
20045
  addonId: null,
19811
20046
  access: "view"
19812
20047
  },
19813
- "addons.listActiveBulkUpdates": {
20048
+ "addons.listCapabilityProviders": {
19814
20049
  capName: "addons",
19815
20050
  capScope: "system",
19816
20051
  addonId: null,
19817
20052
  access: "view"
19818
20053
  },
19819
- "addons.listCapabilityProviders": {
20054
+ "addons.listFrameworkPackages": {
19820
20055
  capName: "addons",
19821
20056
  capScope: "system",
19822
20057
  addonId: null,
19823
20058
  access: "view"
19824
20059
  },
19825
- "addons.listFrameworkPackages": {
20060
+ "addons.listJobs": {
19826
20061
  capName: "addons",
19827
20062
  capScope: "system",
19828
20063
  addonId: null,
@@ -19906,7 +20141,7 @@ Object.freeze({
19906
20141
  addonId: null,
19907
20142
  access: "create"
19908
20143
  },
19909
- "addons.startBulkUpdate": {
20144
+ "addons.startJob": {
19910
20145
  capName: "addons",
19911
20146
  capScope: "system",
19912
20147
  addonId: null,
@@ -22132,6 +22367,12 @@ Object.freeze({
22132
22367
  addonId: null,
22133
22368
  access: "view"
22134
22369
  },
22370
+ "pipelineExecutor.getEngineProvisioning": {
22371
+ capName: "pipeline-executor",
22372
+ capScope: "system",
22373
+ addonId: null,
22374
+ access: "view"
22375
+ },
22135
22376
  "pipelineExecutor.getGlobalPipelineConfig": {
22136
22377
  capName: "pipeline-executor",
22137
22378
  capScope: "system",
@@ -22336,6 +22577,18 @@ Object.freeze({
22336
22577
  addonId: null,
22337
22578
  access: "view"
22338
22579
  },
22580
+ "pipelineOrchestrator.getCameraStatus": {
22581
+ capName: "pipeline-orchestrator",
22582
+ capScope: "system",
22583
+ addonId: null,
22584
+ access: "view"
22585
+ },
22586
+ "pipelineOrchestrator.getCameraStatuses": {
22587
+ capName: "pipeline-orchestrator",
22588
+ capScope: "system",
22589
+ addonId: null,
22590
+ access: "view"
22591
+ },
22339
22592
  "pipelineOrchestrator.getCameraStepOverrides": {
22340
22593
  capName: "pipeline-orchestrator",
22341
22594
  capScope: "system",
@@ -22420,6 +22673,12 @@ Object.freeze({
22420
22673
  addonId: null,
22421
22674
  access: "create"
22422
22675
  },
22676
+ "pipelineOrchestrator.setAgentMaxCameras": {
22677
+ capName: "pipeline-orchestrator",
22678
+ capScope: "system",
22679
+ addonId: null,
22680
+ access: "create"
22681
+ },
22423
22682
  "pipelineOrchestrator.setCameraPipelineForAgent": {
22424
22683
  capName: "pipeline-orchestrator",
22425
22684
  capScope: "system",
@@ -23893,6 +24152,32 @@ Object.freeze({
23893
24152
  "network-access": "ingress",
23894
24153
  "smtp-provider": "email"
23895
24154
  });
24155
+ var frameworkSwapPackageSchema = object({
24156
+ name: string(),
24157
+ stagedPath: string(),
24158
+ backupPath: string(),
24159
+ toVersion: string(),
24160
+ fromVersion: string().nullable()
24161
+ });
24162
+ object({
24163
+ jobId: string(),
24164
+ taskId: string(),
24165
+ packages: array(frameworkSwapPackageSchema),
24166
+ requestedAtMs: number(),
24167
+ schemaVersion: literal(1)
24168
+ });
24169
+ object({
24170
+ jobId: string(),
24171
+ taskId: string(),
24172
+ backups: array(object({
24173
+ name: string(),
24174
+ backupPath: string(),
24175
+ livePath: string()
24176
+ })),
24177
+ appliedAtMs: number(),
24178
+ bootAttempts: number(),
24179
+ schemaVersion: literal(1)
24180
+ });
23896
24181
  //#endregion
23897
24182
  //#region src/schema.ts
23898
24183
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",