@camstack/addon-agent-ui 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 (2) hide show
  1. package/dist/addon.js +194 -4
  2. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -4983,6 +4983,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
4983
4983
  */
4984
4984
  EventCategory["PipelineEngineMetricsSnapshot"] = "pipeline.engine-metrics-snapshot";
4985
4985
  /**
4986
+ * Per-node detection-engine runtime-provisioning transition. Emitted by
4987
+ * the detection-pipeline provider on every state change of its lazy
4988
+ * engine-provisioning machine (idle → installing → verifying → ready,
4989
+ * or → failed with a `nextRetryAt`). Payload is the
4990
+ * `EngineProvisioningState` snapshot; `event.source.nodeId` carries the
4991
+ * node. The Pipeline page subscribes to drive a live "installing
4992
+ * OpenVINO… / ready" indicator per node without polling
4993
+ * `pipelineExecutor.getEngineProvisioning`. Telemetry-grade (D8): the UI
4994
+ * also reads the cap snapshot on mount / reconnect. Phase 2.
4995
+ */
4996
+ EventCategory["PipelineEngineProvisioning"] = "pipeline.engine-provisioning";
4997
+ /**
4986
4998
  * Cluster topology snapshot. Carries the same payload returned by
4987
4999
  * `nodes.topology` (every reachable node + addons + processes).
4988
5000
  * Emitted by the hub on any agent / addon lifecycle change
@@ -9147,6 +9159,24 @@ var DetectorOutputSchema = object({
9147
9159
  inferenceMs: number(),
9148
9160
  modelId: string()
9149
9161
  });
9162
+ var EngineProvisioningSchema = object({
9163
+ runtimeId: _enum([
9164
+ "onnx",
9165
+ "openvino",
9166
+ "coreml"
9167
+ ]).nullable(),
9168
+ device: string().nullable(),
9169
+ state: _enum([
9170
+ "idle",
9171
+ "installing",
9172
+ "verifying",
9173
+ "ready",
9174
+ "failed"
9175
+ ]),
9176
+ progress: number().optional(),
9177
+ error: string().optional(),
9178
+ nextRetryAt: number().optional()
9179
+ });
9150
9180
  var PipelineStepInputSchema = lazy(() => object({
9151
9181
  addonId: string(),
9152
9182
  modelId: string(),
@@ -9215,7 +9245,7 @@ var PipelineRunResultBridge = custom();
9215
9245
  method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(PipelineEngineChoiceSchema, array(PipelineDefaultStepSchema)), method(_void(), PipelineEngineChoiceSchema, {
9216
9246
  kind: "mutation",
9217
9247
  auth: "admin"
9218
- }), method(_void(), record(string(), object({
9248
+ }), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
9219
9249
  modelId: string(),
9220
9250
  settings: record(string(), unknown()).readonly()
9221
9251
  }))), method(object({ steps: record(string(), object({
@@ -12811,7 +12841,10 @@ var AgentAddonConfigSchema = object({
12811
12841
  modelId: string(),
12812
12842
  settings: record(string(), unknown()).readonly()
12813
12843
  });
12814
- var AgentPipelineSettingsSchema = object({ addonDefaults: record(string(), AgentAddonConfigSchema).readonly() });
12844
+ var AgentPipelineSettingsSchema = object({
12845
+ addonDefaults: record(string(), AgentAddonConfigSchema).readonly(),
12846
+ maxCameras: number().int().nonnegative().nullable().default(null)
12847
+ });
12815
12848
  var CameraPipelineForAgentSchema = object({
12816
12849
  steps: array(PipelineStepInputSchema).readonly(),
12817
12850
  audio: object({
@@ -12913,6 +12946,133 @@ var GlobalMetricsSchema = object({
12913
12946
  * capability providers.
12914
12947
  */
12915
12948
  var CapabilityBindingsSchema = record(string(), string());
12949
+ /** Source block — always present; derives from the stream catalog. */
12950
+ var CameraSourceStatusSchema = object({ streams: array(object({
12951
+ camStreamId: string(),
12952
+ codec: string(),
12953
+ width: number(),
12954
+ height: number(),
12955
+ fps: number(),
12956
+ kind: string()
12957
+ })).readonly() });
12958
+ /** Assignment block — always present (orchestrator-local, no remote call). */
12959
+ var CameraAssignmentStatusSchema = object({
12960
+ detectionNodeId: string().nullable(),
12961
+ decoderNodeId: string().nullable(),
12962
+ audioNodeId: string().nullable(),
12963
+ pinned: object({
12964
+ detection: boolean(),
12965
+ decoder: boolean(),
12966
+ audio: boolean()
12967
+ }),
12968
+ reasons: object({
12969
+ detection: string().optional(),
12970
+ decoder: string().optional(),
12971
+ audio: string().optional()
12972
+ })
12973
+ });
12974
+ /** Broker block — null when the broker stage is unreachable or inactive. */
12975
+ var CameraBrokerStatusSchema = object({
12976
+ profiles: array(object({
12977
+ profile: string(),
12978
+ status: string(),
12979
+ codec: string(),
12980
+ width: number(),
12981
+ height: number(),
12982
+ subscribers: number(),
12983
+ inFps: number(),
12984
+ outFps: number()
12985
+ })).readonly(),
12986
+ webrtcSessions: number(),
12987
+ rtspRestream: boolean()
12988
+ });
12989
+ /** Shared-memory ring statistics within the decoder block. */
12990
+ var CameraDecoderShmSchema = object({
12991
+ framesWritten: number(),
12992
+ getFrameHits: number(),
12993
+ getFrameMisses: number(),
12994
+ budgetMb: number()
12995
+ });
12996
+ /** Decoder block — null when the decoder stage is unreachable or inactive. */
12997
+ var CameraDecoderStatusSchema = object({
12998
+ nodeId: string(),
12999
+ formats: array(string()).readonly(),
13000
+ sessionCount: number(),
13001
+ shm: CameraDecoderShmSchema
13002
+ });
13003
+ /** Motion block — null when motion detection is not active for this device. */
13004
+ var CameraMotionStatusSchema = object({
13005
+ enabled: boolean(),
13006
+ fps: number()
13007
+ });
13008
+ /** Detection provisioning sub-block. */
13009
+ var CameraDetectionProvisioningSchema = object({
13010
+ state: _enum([
13011
+ "idle",
13012
+ "installing",
13013
+ "verifying",
13014
+ "ready",
13015
+ "failed"
13016
+ ]),
13017
+ error: string().optional()
13018
+ });
13019
+ /** Detection phase — derived from the runner's engine phase. */
13020
+ var CameraDetectionPhaseSchema = _enum([
13021
+ "idle",
13022
+ "watching",
13023
+ "active"
13024
+ ]);
13025
+ /** Detection block — null when no detection node is assigned or reachable. */
13026
+ var CameraDetectionStatusSchema = object({
13027
+ nodeId: string(),
13028
+ engine: object({
13029
+ backend: string(),
13030
+ device: string()
13031
+ }),
13032
+ phase: CameraDetectionPhaseSchema,
13033
+ configuredFps: number(),
13034
+ actualFps: number(),
13035
+ queueDepth: number(),
13036
+ avgInferenceMs: number(),
13037
+ provisioning: CameraDetectionProvisioningSchema
13038
+ });
13039
+ /** Audio block — null when no audio node is assigned or reachable. */
13040
+ var CameraAudioStatusSchema = object({
13041
+ nodeId: string(),
13042
+ enabled: boolean()
13043
+ });
13044
+ /** Recording block — null when no recording cap is active for this device. */
13045
+ var CameraRecordingStatusSchema = object({
13046
+ mode: _enum([
13047
+ "off",
13048
+ "continuous",
13049
+ "events"
13050
+ ]),
13051
+ active: boolean(),
13052
+ storageBytes: number()
13053
+ });
13054
+ /**
13055
+ * Aggregated per-camera pipeline status — server-composed, single call.
13056
+ *
13057
+ * The `assignment` and `source` blocks are always present.
13058
+ * Every other block is `null` when the stage is inactive or unreachable
13059
+ * during the bounded parallel fan-out in the orchestrator implementation.
13060
+ *
13061
+ * See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
13062
+ */
13063
+ var CameraStatusSchema = object({
13064
+ deviceId: number(),
13065
+ assignment: CameraAssignmentStatusSchema,
13066
+ source: CameraSourceStatusSchema,
13067
+ broker: CameraBrokerStatusSchema.nullable(),
13068
+ decoder: CameraDecoderStatusSchema.nullable(),
13069
+ motion: CameraMotionStatusSchema.nullable(),
13070
+ detection: CameraDetectionStatusSchema.nullable(),
13071
+ audio: CameraAudioStatusSchema.nullable(),
13072
+ recording: CameraRecordingStatusSchema.nullable(),
13073
+ /** Unix timestamp (ms) when this snapshot was composed server-side. */
13074
+ fetchedAt: number()
13075
+ });
12916
13076
  method(object({
12917
13077
  deviceId: number(),
12918
13078
  agentNodeId: string()
@@ -12980,6 +13140,12 @@ method(object({
12980
13140
  }), {
12981
13141
  kind: "mutation",
12982
13142
  auth: "admin"
13143
+ }), method(object({
13144
+ agentNodeId: string(),
13145
+ maxCameras: number().int().nonnegative().nullable()
13146
+ }), object({ success: literal(true) }), {
13147
+ kind: "mutation",
13148
+ auth: "admin"
12983
13149
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
12984
13150
  deviceId: number(),
12985
13151
  addonId: string(),
@@ -13005,7 +13171,7 @@ method(object({
13005
13171
  }), method(object({
13006
13172
  deviceId: number(),
13007
13173
  agentNodeId: string().optional()
13008
- }), CameraPipelineConfigSchema), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
13174
+ }), CameraPipelineConfigSchema), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
13009
13175
  name: string(),
13010
13176
  description: string().optional(),
13011
13177
  config: CameraPipelineConfigSchema
@@ -18797,6 +18963,12 @@ Object.freeze({
18797
18963
  addonId: null,
18798
18964
  access: "view"
18799
18965
  },
18966
+ "pipelineExecutor.getEngineProvisioning": {
18967
+ capName: "pipeline-executor",
18968
+ capScope: "system",
18969
+ addonId: null,
18970
+ access: "view"
18971
+ },
18800
18972
  "pipelineExecutor.getGlobalPipelineConfig": {
18801
18973
  capName: "pipeline-executor",
18802
18974
  capScope: "system",
@@ -19001,6 +19173,18 @@ Object.freeze({
19001
19173
  addonId: null,
19002
19174
  access: "view"
19003
19175
  },
19176
+ "pipelineOrchestrator.getCameraStatus": {
19177
+ capName: "pipeline-orchestrator",
19178
+ capScope: "system",
19179
+ addonId: null,
19180
+ access: "view"
19181
+ },
19182
+ "pipelineOrchestrator.getCameraStatuses": {
19183
+ capName: "pipeline-orchestrator",
19184
+ capScope: "system",
19185
+ addonId: null,
19186
+ access: "view"
19187
+ },
19004
19188
  "pipelineOrchestrator.getCameraStepOverrides": {
19005
19189
  capName: "pipeline-orchestrator",
19006
19190
  capScope: "system",
@@ -19085,6 +19269,12 @@ Object.freeze({
19085
19269
  addonId: null,
19086
19270
  access: "create"
19087
19271
  },
19272
+ "pipelineOrchestrator.setAgentMaxCameras": {
19273
+ capName: "pipeline-orchestrator",
19274
+ capScope: "system",
19275
+ addonId: null,
19276
+ access: "create"
19277
+ },
19088
19278
  "pipelineOrchestrator.setCameraPipelineForAgent": {
19089
19279
  capName: "pipeline-orchestrator",
19090
19280
  capScope: "system",
@@ -20605,7 +20795,7 @@ var AgentUIAddon = class extends BaseAddon {
20605
20795
  capability: adminUiCapability,
20606
20796
  provider: {
20607
20797
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
20608
- getVersion: async () => ({ version: "0.1.0" })
20798
+ getVersion: async () => ({ version: "1.0.4" })
20609
20799
  }
20610
20800
  }];
20611
20801
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-agent-ui",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "CamStack Agent UI — lightweight status dashboard served by every agent node",
5
5
  "keywords": [
6
6
  "camstack",