@camstack/addon-remote-storage 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.
package/dist/s3.addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-B4p10WFZ.js");
5
+ const require_shared = require("./shared-B6lKu5ns.js");
6
6
  let node_stream = require("node:stream");
7
7
  let _aws_sdk_client_s3 = require("@aws-sdk/client-s3");
8
8
  let _aws_sdk_lib_storage = require("@aws-sdk/lib-storage");
package/dist/s3.addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as storageProviderCapability, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as BaseAddon, t as createSessionId } from "./shared-DL9Prz1T.mjs";
1
+ import { c as storageProviderCapability, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as BaseAddon, t as createSessionId } from "./shared-hviBSoIY.mjs";
2
2
  import { PassThrough } from "node:stream";
3
3
  import { DeleteObjectCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectsV2Command, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
4
4
  import { Upload } from "@aws-sdk/lib-storage";
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-B4p10WFZ.js");
5
+ const require_shared = require("./shared-B6lKu5ns.js");
6
6
  let ssh2 = require("ssh2");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_shared.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { a as safeJoinRemotePath, c as storageProviderCapability, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as BaseAddon, t as createSessionId } from "./shared-DL9Prz1T.mjs";
1
+ import { a as safeJoinRemotePath, c as storageProviderCapability, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as BaseAddon, t as createSessionId } from "./shared-hviBSoIY.mjs";
2
2
  import { Client } from "ssh2";
3
3
  import * as path from "node:path";
4
4
  //#region src/providers/sftp/sftp-config-schema.ts
@@ -5006,6 +5006,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5006
5006
  */
5007
5007
  EventCategory["PipelineEngineMetricsSnapshot"] = "pipeline.engine-metrics-snapshot";
5008
5008
  /**
5009
+ * Per-node detection-engine runtime-provisioning transition. Emitted by
5010
+ * the detection-pipeline provider on every state change of its lazy
5011
+ * engine-provisioning machine (idle → installing → verifying → ready,
5012
+ * or → failed with a `nextRetryAt`). Payload is the
5013
+ * `EngineProvisioningState` snapshot; `event.source.nodeId` carries the
5014
+ * node. The Pipeline page subscribes to drive a live "installing
5015
+ * OpenVINO… / ready" indicator per node without polling
5016
+ * `pipelineExecutor.getEngineProvisioning`. Telemetry-grade (D8): the UI
5017
+ * also reads the cap snapshot on mount / reconnect. Phase 2.
5018
+ */
5019
+ EventCategory["PipelineEngineProvisioning"] = "pipeline.engine-provisioning";
5020
+ /**
5009
5021
  * Cluster topology snapshot. Carries the same payload returned by
5010
5022
  * `nodes.topology` (every reachable node + addons + processes).
5011
5023
  * Emitted by the hub on any agent / addon lifecycle change
@@ -5155,14 +5167,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5155
5167
  EventCategory["DeviceSleeping"] = "device.sleeping";
5156
5168
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5157
5169
  /**
5158
- * Progress snapshot emitted by `BulkUpdateCoordinator` on every state
5159
- * transition (item status change, phase change, completion, cancel).
5160
- * Payload is `BulkUpdateState`. Admin UI subscribes via `useLiveEvent`
5161
- * to drive the sticky `BulkUpdateBanner` and per-row `AddonRowBadge`.
5162
- *
5163
- * Spec: docs/superpowers/specs/2026-05-21-addons-bulk-update-progress-design.md
5170
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5171
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5172
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5173
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5174
+ * in F4 once live bulk progress is re-implemented over the engine events.
5164
5175
  */
5165
5176
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5177
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5178
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5166
5179
  /**
5167
5180
  * A container's child visibility toggled (hidden/shown). Emitted by the
5168
5181
  * `accessories` cap when a child device is hidden or revealed.
@@ -9169,6 +9182,24 @@ var DetectorOutputSchema = object({
9169
9182
  inferenceMs: number(),
9170
9183
  modelId: string()
9171
9184
  });
9185
+ var EngineProvisioningSchema = object({
9186
+ runtimeId: _enum([
9187
+ "onnx",
9188
+ "openvino",
9189
+ "coreml"
9190
+ ]).nullable(),
9191
+ device: string().nullable(),
9192
+ state: _enum([
9193
+ "idle",
9194
+ "installing",
9195
+ "verifying",
9196
+ "ready",
9197
+ "failed"
9198
+ ]),
9199
+ progress: number().optional(),
9200
+ error: string().optional(),
9201
+ nextRetryAt: number().optional()
9202
+ });
9172
9203
  var PipelineStepInputSchema = lazy(() => object({
9173
9204
  addonId: string(),
9174
9205
  modelId: string(),
@@ -9237,7 +9268,7 @@ var PipelineRunResultBridge = custom();
9237
9268
  method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(PipelineEngineChoiceSchema, array(PipelineDefaultStepSchema)), method(_void(), PipelineEngineChoiceSchema, {
9238
9269
  kind: "mutation",
9239
9270
  auth: "admin"
9240
- }), method(_void(), record(string(), object({
9271
+ }), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
9241
9272
  modelId: string(),
9242
9273
  settings: record(string(), unknown()).readonly()
9243
9274
  }))), method(object({ steps: record(string(), object({
@@ -12869,7 +12900,10 @@ var AgentAddonConfigSchema = object({
12869
12900
  modelId: string(),
12870
12901
  settings: record(string(), unknown()).readonly()
12871
12902
  });
12872
- var AgentPipelineSettingsSchema = object({ addonDefaults: record(string(), AgentAddonConfigSchema).readonly() });
12903
+ var AgentPipelineSettingsSchema = object({
12904
+ addonDefaults: record(string(), AgentAddonConfigSchema).readonly(),
12905
+ maxCameras: number().int().nonnegative().nullable().default(null)
12906
+ });
12873
12907
  var CameraPipelineForAgentSchema = object({
12874
12908
  steps: array(PipelineStepInputSchema).readonly(),
12875
12909
  audio: object({
@@ -12971,6 +13005,133 @@ var GlobalMetricsSchema = object({
12971
13005
  * capability providers.
12972
13006
  */
12973
13007
  var CapabilityBindingsSchema = record(string(), string());
13008
+ /** Source block — always present; derives from the stream catalog. */
13009
+ var CameraSourceStatusSchema = object({ streams: array(object({
13010
+ camStreamId: string(),
13011
+ codec: string(),
13012
+ width: number(),
13013
+ height: number(),
13014
+ fps: number(),
13015
+ kind: string()
13016
+ })).readonly() });
13017
+ /** Assignment block — always present (orchestrator-local, no remote call). */
13018
+ var CameraAssignmentStatusSchema = object({
13019
+ detectionNodeId: string().nullable(),
13020
+ decoderNodeId: string().nullable(),
13021
+ audioNodeId: string().nullable(),
13022
+ pinned: object({
13023
+ detection: boolean(),
13024
+ decoder: boolean(),
13025
+ audio: boolean()
13026
+ }),
13027
+ reasons: object({
13028
+ detection: string().optional(),
13029
+ decoder: string().optional(),
13030
+ audio: string().optional()
13031
+ })
13032
+ });
13033
+ /** Broker block — null when the broker stage is unreachable or inactive. */
13034
+ var CameraBrokerStatusSchema = object({
13035
+ profiles: array(object({
13036
+ profile: string(),
13037
+ status: string(),
13038
+ codec: string(),
13039
+ width: number(),
13040
+ height: number(),
13041
+ subscribers: number(),
13042
+ inFps: number(),
13043
+ outFps: number()
13044
+ })).readonly(),
13045
+ webrtcSessions: number(),
13046
+ rtspRestream: boolean()
13047
+ });
13048
+ /** Shared-memory ring statistics within the decoder block. */
13049
+ var CameraDecoderShmSchema = object({
13050
+ framesWritten: number(),
13051
+ getFrameHits: number(),
13052
+ getFrameMisses: number(),
13053
+ budgetMb: number()
13054
+ });
13055
+ /** Decoder block — null when the decoder stage is unreachable or inactive. */
13056
+ var CameraDecoderStatusSchema = object({
13057
+ nodeId: string(),
13058
+ formats: array(string()).readonly(),
13059
+ sessionCount: number(),
13060
+ shm: CameraDecoderShmSchema
13061
+ });
13062
+ /** Motion block — null when motion detection is not active for this device. */
13063
+ var CameraMotionStatusSchema = object({
13064
+ enabled: boolean(),
13065
+ fps: number()
13066
+ });
13067
+ /** Detection provisioning sub-block. */
13068
+ var CameraDetectionProvisioningSchema = object({
13069
+ state: _enum([
13070
+ "idle",
13071
+ "installing",
13072
+ "verifying",
13073
+ "ready",
13074
+ "failed"
13075
+ ]),
13076
+ error: string().optional()
13077
+ });
13078
+ /** Detection phase — derived from the runner's engine phase. */
13079
+ var CameraDetectionPhaseSchema = _enum([
13080
+ "idle",
13081
+ "watching",
13082
+ "active"
13083
+ ]);
13084
+ /** Detection block — null when no detection node is assigned or reachable. */
13085
+ var CameraDetectionStatusSchema = object({
13086
+ nodeId: string(),
13087
+ engine: object({
13088
+ backend: string(),
13089
+ device: string()
13090
+ }),
13091
+ phase: CameraDetectionPhaseSchema,
13092
+ configuredFps: number(),
13093
+ actualFps: number(),
13094
+ queueDepth: number(),
13095
+ avgInferenceMs: number(),
13096
+ provisioning: CameraDetectionProvisioningSchema
13097
+ });
13098
+ /** Audio block — null when no audio node is assigned or reachable. */
13099
+ var CameraAudioStatusSchema = object({
13100
+ nodeId: string(),
13101
+ enabled: boolean()
13102
+ });
13103
+ /** Recording block — null when no recording cap is active for this device. */
13104
+ var CameraRecordingStatusSchema = object({
13105
+ mode: _enum([
13106
+ "off",
13107
+ "continuous",
13108
+ "events"
13109
+ ]),
13110
+ active: boolean(),
13111
+ storageBytes: number()
13112
+ });
13113
+ /**
13114
+ * Aggregated per-camera pipeline status — server-composed, single call.
13115
+ *
13116
+ * The `assignment` and `source` blocks are always present.
13117
+ * Every other block is `null` when the stage is inactive or unreachable
13118
+ * during the bounded parallel fan-out in the orchestrator implementation.
13119
+ *
13120
+ * See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
13121
+ */
13122
+ var CameraStatusSchema = object({
13123
+ deviceId: number(),
13124
+ assignment: CameraAssignmentStatusSchema,
13125
+ source: CameraSourceStatusSchema,
13126
+ broker: CameraBrokerStatusSchema.nullable(),
13127
+ decoder: CameraDecoderStatusSchema.nullable(),
13128
+ motion: CameraMotionStatusSchema.nullable(),
13129
+ detection: CameraDetectionStatusSchema.nullable(),
13130
+ audio: CameraAudioStatusSchema.nullable(),
13131
+ recording: CameraRecordingStatusSchema.nullable(),
13132
+ /** Unix timestamp (ms) when this snapshot was composed server-side. */
13133
+ fetchedAt: number()
13134
+ });
12974
13135
  method(object({
12975
13136
  deviceId: number(),
12976
13137
  agentNodeId: string()
@@ -13038,6 +13199,12 @@ method(object({
13038
13199
  }), {
13039
13200
  kind: "mutation",
13040
13201
  auth: "admin"
13202
+ }), method(object({
13203
+ agentNodeId: string(),
13204
+ maxCameras: number().int().nonnegative().nullable()
13205
+ }), object({ success: literal(true) }), {
13206
+ kind: "mutation",
13207
+ auth: "admin"
13041
13208
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
13042
13209
  deviceId: number(),
13043
13210
  addonId: string(),
@@ -13063,7 +13230,7 @@ method(object({
13063
13230
  }), method(object({
13064
13231
  deviceId: number(),
13065
13232
  agentNodeId: string().optional()
13066
- }), CameraPipelineConfigSchema), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
13233
+ }), CameraPipelineConfigSchema), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
13067
13234
  name: string(),
13068
13235
  description: string().optional(),
13069
13236
  config: CameraPipelineConfigSchema
@@ -16027,6 +16194,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
16027
16194
  kind: "mutation",
16028
16195
  auth: "admin"
16029
16196
  });
16197
+ var jobKindSchema = _enum([
16198
+ "install",
16199
+ "update",
16200
+ "uninstall",
16201
+ "restart"
16202
+ ]);
16203
+ var taskPhaseSchema = _enum([
16204
+ "queued",
16205
+ "fetching",
16206
+ "staged",
16207
+ "validating",
16208
+ "applying",
16209
+ "restarting",
16210
+ "applied",
16211
+ "done",
16212
+ "failed",
16213
+ "skipped"
16214
+ ]);
16215
+ var taskTargetSchema = _enum(["framework", "addon"]);
16216
+ var taskLogEntrySchema = object({
16217
+ tsMs: number(),
16218
+ nodeId: string(),
16219
+ packageName: string(),
16220
+ phase: taskPhaseSchema,
16221
+ message: string()
16222
+ });
16223
+ var lifecycleTaskSchema = object({
16224
+ taskId: string(),
16225
+ nodeId: string(),
16226
+ packageName: string(),
16227
+ fromVersion: string().nullable(),
16228
+ toVersion: string(),
16229
+ target: taskTargetSchema,
16230
+ phase: taskPhaseSchema,
16231
+ stagedPath: string().nullable(),
16232
+ attempts: number(),
16233
+ steps: array(taskLogEntrySchema),
16234
+ error: string().nullable(),
16235
+ startedAtMs: number().nullable(),
16236
+ finishedAtMs: number().nullable()
16237
+ });
16238
+ var lifecycleJobStateSchema = _enum([
16239
+ "running",
16240
+ "completed",
16241
+ "failed",
16242
+ "partially-failed",
16243
+ "cancelled"
16244
+ ]);
16245
+ var lifecycleJobScopeSchema = _enum([
16246
+ "single",
16247
+ "bulk",
16248
+ "cluster"
16249
+ ]);
16250
+ var lifecycleJobSchema = object({
16251
+ jobId: string(),
16252
+ kind: jobKindSchema,
16253
+ createdAtMs: number(),
16254
+ createdBy: string(),
16255
+ scope: lifecycleJobScopeSchema,
16256
+ tasks: array(lifecycleTaskSchema),
16257
+ state: lifecycleJobStateSchema,
16258
+ schemaVersion: literal(1)
16259
+ });
16030
16260
  /**
16031
16261
  * addons — system-scoped singleton capability for addon package
16032
16262
  * management (install, update, configure, restart) and per-addon log
@@ -16209,7 +16439,7 @@ var BulkUpdatePhaseSchema = _enum([
16209
16439
  "restarting",
16210
16440
  "finalizing"
16211
16441
  ]);
16212
- var BulkUpdateStateSchema = object({
16442
+ object({
16213
16443
  id: string(),
16214
16444
  nodeId: string(),
16215
16445
  startedAtMs: number(),
@@ -16312,20 +16542,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16312
16542
  }), UpdateFrameworkPackageResultSchema, {
16313
16543
  kind: "mutation",
16314
16544
  auth: "admin"
16315
- }), method(object({
16316
- nodeId: string(),
16317
- items: array(object({
16318
- name: string(),
16319
- version: string(),
16320
- isSystem: boolean()
16321
- })).readonly()
16322
- }), object({ id: string() }), {
16323
- kind: "mutation",
16324
- auth: "admin"
16325
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
16326
- kind: "mutation",
16327
- auth: "admin"
16328
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16545
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16329
16546
  kind: "mutation",
16330
16547
  auth: "admin"
16331
16548
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16347,6 +16564,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16347
16564
  kind: "mutation",
16348
16565
  auth: "admin"
16349
16566
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16567
+ kind: _enum([
16568
+ "install",
16569
+ "update",
16570
+ "uninstall",
16571
+ "restart"
16572
+ ]),
16573
+ targets: array(object({
16574
+ name: string().min(1),
16575
+ version: string().min(1)
16576
+ })).min(1),
16577
+ nodeIds: array(string()).optional()
16578
+ }), object({ jobId: string() }), {
16579
+ kind: "mutation",
16580
+ auth: "admin"
16581
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16582
+ kind: "mutation",
16583
+ auth: "admin"
16584
+ }), method(object({
16350
16585
  addonId: string(),
16351
16586
  level: LogLevelSchema$1.optional()
16352
16587
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16387,7 +16622,7 @@ Object.freeze({
16387
16622
  addonId: null,
16388
16623
  access: "create"
16389
16624
  },
16390
- "addons.cancelBulkUpdate": {
16625
+ "addons.cancelJob": {
16391
16626
  capName: "addons",
16392
16627
  capScope: "system",
16393
16628
  addonId: null,
@@ -16417,7 +16652,7 @@ Object.freeze({
16417
16652
  addonId: null,
16418
16653
  access: "view"
16419
16654
  },
16420
- "addons.getBulkUpdateState": {
16655
+ "addons.getJob": {
16421
16656
  capName: "addons",
16422
16657
  capScope: "system",
16423
16658
  addonId: null,
@@ -16465,19 +16700,19 @@ Object.freeze({
16465
16700
  addonId: null,
16466
16701
  access: "view"
16467
16702
  },
16468
- "addons.listActiveBulkUpdates": {
16703
+ "addons.listCapabilityProviders": {
16469
16704
  capName: "addons",
16470
16705
  capScope: "system",
16471
16706
  addonId: null,
16472
16707
  access: "view"
16473
16708
  },
16474
- "addons.listCapabilityProviders": {
16709
+ "addons.listFrameworkPackages": {
16475
16710
  capName: "addons",
16476
16711
  capScope: "system",
16477
16712
  addonId: null,
16478
16713
  access: "view"
16479
16714
  },
16480
- "addons.listFrameworkPackages": {
16715
+ "addons.listJobs": {
16481
16716
  capName: "addons",
16482
16717
  capScope: "system",
16483
16718
  addonId: null,
@@ -16561,7 +16796,7 @@ Object.freeze({
16561
16796
  addonId: null,
16562
16797
  access: "create"
16563
16798
  },
16564
- "addons.startBulkUpdate": {
16799
+ "addons.startJob": {
16565
16800
  capName: "addons",
16566
16801
  capScope: "system",
16567
16802
  addonId: null,
@@ -18787,6 +19022,12 @@ Object.freeze({
18787
19022
  addonId: null,
18788
19023
  access: "view"
18789
19024
  },
19025
+ "pipelineExecutor.getEngineProvisioning": {
19026
+ capName: "pipeline-executor",
19027
+ capScope: "system",
19028
+ addonId: null,
19029
+ access: "view"
19030
+ },
18790
19031
  "pipelineExecutor.getGlobalPipelineConfig": {
18791
19032
  capName: "pipeline-executor",
18792
19033
  capScope: "system",
@@ -18991,6 +19232,18 @@ Object.freeze({
18991
19232
  addonId: null,
18992
19233
  access: "view"
18993
19234
  },
19235
+ "pipelineOrchestrator.getCameraStatus": {
19236
+ capName: "pipeline-orchestrator",
19237
+ capScope: "system",
19238
+ addonId: null,
19239
+ access: "view"
19240
+ },
19241
+ "pipelineOrchestrator.getCameraStatuses": {
19242
+ capName: "pipeline-orchestrator",
19243
+ capScope: "system",
19244
+ addonId: null,
19245
+ access: "view"
19246
+ },
18994
19247
  "pipelineOrchestrator.getCameraStepOverrides": {
18995
19248
  capName: "pipeline-orchestrator",
18996
19249
  capScope: "system",
@@ -19075,6 +19328,12 @@ Object.freeze({
19075
19328
  addonId: null,
19076
19329
  access: "create"
19077
19330
  },
19331
+ "pipelineOrchestrator.setAgentMaxCameras": {
19332
+ capName: "pipeline-orchestrator",
19333
+ capScope: "system",
19334
+ addonId: null,
19335
+ access: "create"
19336
+ },
19078
19337
  "pipelineOrchestrator.setCameraPipelineForAgent": {
19079
19338
  capName: "pipeline-orchestrator",
19080
19339
  capScope: "system",
@@ -20548,6 +20807,32 @@ Object.freeze({
20548
20807
  "network-access": "ingress",
20549
20808
  "smtp-provider": "email"
20550
20809
  });
20810
+ var frameworkSwapPackageSchema = object({
20811
+ name: string(),
20812
+ stagedPath: string(),
20813
+ backupPath: string(),
20814
+ toVersion: string(),
20815
+ fromVersion: string().nullable()
20816
+ });
20817
+ object({
20818
+ jobId: string(),
20819
+ taskId: string(),
20820
+ packages: array(frameworkSwapPackageSchema),
20821
+ requestedAtMs: number(),
20822
+ schemaVersion: literal(1)
20823
+ });
20824
+ object({
20825
+ jobId: string(),
20826
+ taskId: string(),
20827
+ backups: array(object({
20828
+ name: string(),
20829
+ backupPath: string(),
20830
+ livePath: string()
20831
+ })),
20832
+ appliedAtMs: number(),
20833
+ bootAttempts: number(),
20834
+ schemaVersion: literal(1)
20835
+ });
20551
20836
  //#endregion
20552
20837
  //#region src/shared.ts
20553
20838
  /**
@@ -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
@@ -5132,14 +5144,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5132
5144
  EventCategory["DeviceSleeping"] = "device.sleeping";
5133
5145
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5134
5146
  /**
5135
- * Progress snapshot emitted by `BulkUpdateCoordinator` on every state
5136
- * transition (item status change, phase change, completion, cancel).
5137
- * Payload is `BulkUpdateState`. Admin UI subscribes via `useLiveEvent`
5138
- * to drive the sticky `BulkUpdateBanner` and per-row `AddonRowBadge`.
5139
- *
5140
- * Spec: docs/superpowers/specs/2026-05-21-addons-bulk-update-progress-design.md
5147
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5148
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5149
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5150
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5151
+ * in F4 once live bulk progress is re-implemented over the engine events.
5141
5152
  */
5142
5153
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5154
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5155
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5143
5156
  /**
5144
5157
  * A container's child visibility toggled (hidden/shown). Emitted by the
5145
5158
  * `accessories` cap when a child device is hidden or revealed.
@@ -9146,6 +9159,24 @@ var DetectorOutputSchema = object({
9146
9159
  inferenceMs: number(),
9147
9160
  modelId: string()
9148
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
+ });
9149
9180
  var PipelineStepInputSchema = lazy(() => object({
9150
9181
  addonId: string(),
9151
9182
  modelId: string(),
@@ -9214,7 +9245,7 @@ var PipelineRunResultBridge = custom();
9214
9245
  method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(PipelineEngineChoiceSchema, array(PipelineDefaultStepSchema)), method(_void(), PipelineEngineChoiceSchema, {
9215
9246
  kind: "mutation",
9216
9247
  auth: "admin"
9217
- }), method(_void(), record(string(), object({
9248
+ }), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
9218
9249
  modelId: string(),
9219
9250
  settings: record(string(), unknown()).readonly()
9220
9251
  }))), method(object({ steps: record(string(), object({
@@ -12846,7 +12877,10 @@ var AgentAddonConfigSchema = object({
12846
12877
  modelId: string(),
12847
12878
  settings: record(string(), unknown()).readonly()
12848
12879
  });
12849
- var AgentPipelineSettingsSchema = object({ addonDefaults: record(string(), AgentAddonConfigSchema).readonly() });
12880
+ var AgentPipelineSettingsSchema = object({
12881
+ addonDefaults: record(string(), AgentAddonConfigSchema).readonly(),
12882
+ maxCameras: number().int().nonnegative().nullable().default(null)
12883
+ });
12850
12884
  var CameraPipelineForAgentSchema = object({
12851
12885
  steps: array(PipelineStepInputSchema).readonly(),
12852
12886
  audio: object({
@@ -12948,6 +12982,133 @@ var GlobalMetricsSchema = object({
12948
12982
  * capability providers.
12949
12983
  */
12950
12984
  var CapabilityBindingsSchema = record(string(), string());
12985
+ /** Source block — always present; derives from the stream catalog. */
12986
+ var CameraSourceStatusSchema = object({ streams: array(object({
12987
+ camStreamId: string(),
12988
+ codec: string(),
12989
+ width: number(),
12990
+ height: number(),
12991
+ fps: number(),
12992
+ kind: string()
12993
+ })).readonly() });
12994
+ /** Assignment block — always present (orchestrator-local, no remote call). */
12995
+ var CameraAssignmentStatusSchema = object({
12996
+ detectionNodeId: string().nullable(),
12997
+ decoderNodeId: string().nullable(),
12998
+ audioNodeId: string().nullable(),
12999
+ pinned: object({
13000
+ detection: boolean(),
13001
+ decoder: boolean(),
13002
+ audio: boolean()
13003
+ }),
13004
+ reasons: object({
13005
+ detection: string().optional(),
13006
+ decoder: string().optional(),
13007
+ audio: string().optional()
13008
+ })
13009
+ });
13010
+ /** Broker block — null when the broker stage is unreachable or inactive. */
13011
+ var CameraBrokerStatusSchema = object({
13012
+ profiles: array(object({
13013
+ profile: string(),
13014
+ status: string(),
13015
+ codec: string(),
13016
+ width: number(),
13017
+ height: number(),
13018
+ subscribers: number(),
13019
+ inFps: number(),
13020
+ outFps: number()
13021
+ })).readonly(),
13022
+ webrtcSessions: number(),
13023
+ rtspRestream: boolean()
13024
+ });
13025
+ /** Shared-memory ring statistics within the decoder block. */
13026
+ var CameraDecoderShmSchema = object({
13027
+ framesWritten: number(),
13028
+ getFrameHits: number(),
13029
+ getFrameMisses: number(),
13030
+ budgetMb: number()
13031
+ });
13032
+ /** Decoder block — null when the decoder stage is unreachable or inactive. */
13033
+ var CameraDecoderStatusSchema = object({
13034
+ nodeId: string(),
13035
+ formats: array(string()).readonly(),
13036
+ sessionCount: number(),
13037
+ shm: CameraDecoderShmSchema
13038
+ });
13039
+ /** Motion block — null when motion detection is not active for this device. */
13040
+ var CameraMotionStatusSchema = object({
13041
+ enabled: boolean(),
13042
+ fps: number()
13043
+ });
13044
+ /** Detection provisioning sub-block. */
13045
+ var CameraDetectionProvisioningSchema = object({
13046
+ state: _enum([
13047
+ "idle",
13048
+ "installing",
13049
+ "verifying",
13050
+ "ready",
13051
+ "failed"
13052
+ ]),
13053
+ error: string().optional()
13054
+ });
13055
+ /** Detection phase — derived from the runner's engine phase. */
13056
+ var CameraDetectionPhaseSchema = _enum([
13057
+ "idle",
13058
+ "watching",
13059
+ "active"
13060
+ ]);
13061
+ /** Detection block — null when no detection node is assigned or reachable. */
13062
+ var CameraDetectionStatusSchema = object({
13063
+ nodeId: string(),
13064
+ engine: object({
13065
+ backend: string(),
13066
+ device: string()
13067
+ }),
13068
+ phase: CameraDetectionPhaseSchema,
13069
+ configuredFps: number(),
13070
+ actualFps: number(),
13071
+ queueDepth: number(),
13072
+ avgInferenceMs: number(),
13073
+ provisioning: CameraDetectionProvisioningSchema
13074
+ });
13075
+ /** Audio block — null when no audio node is assigned or reachable. */
13076
+ var CameraAudioStatusSchema = object({
13077
+ nodeId: string(),
13078
+ enabled: boolean()
13079
+ });
13080
+ /** Recording block — null when no recording cap is active for this device. */
13081
+ var CameraRecordingStatusSchema = object({
13082
+ mode: _enum([
13083
+ "off",
13084
+ "continuous",
13085
+ "events"
13086
+ ]),
13087
+ active: boolean(),
13088
+ storageBytes: number()
13089
+ });
13090
+ /**
13091
+ * Aggregated per-camera pipeline status — server-composed, single call.
13092
+ *
13093
+ * The `assignment` and `source` blocks are always present.
13094
+ * Every other block is `null` when the stage is inactive or unreachable
13095
+ * during the bounded parallel fan-out in the orchestrator implementation.
13096
+ *
13097
+ * See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
13098
+ */
13099
+ var CameraStatusSchema = object({
13100
+ deviceId: number(),
13101
+ assignment: CameraAssignmentStatusSchema,
13102
+ source: CameraSourceStatusSchema,
13103
+ broker: CameraBrokerStatusSchema.nullable(),
13104
+ decoder: CameraDecoderStatusSchema.nullable(),
13105
+ motion: CameraMotionStatusSchema.nullable(),
13106
+ detection: CameraDetectionStatusSchema.nullable(),
13107
+ audio: CameraAudioStatusSchema.nullable(),
13108
+ recording: CameraRecordingStatusSchema.nullable(),
13109
+ /** Unix timestamp (ms) when this snapshot was composed server-side. */
13110
+ fetchedAt: number()
13111
+ });
12951
13112
  method(object({
12952
13113
  deviceId: number(),
12953
13114
  agentNodeId: string()
@@ -13015,6 +13176,12 @@ method(object({
13015
13176
  }), {
13016
13177
  kind: "mutation",
13017
13178
  auth: "admin"
13179
+ }), method(object({
13180
+ agentNodeId: string(),
13181
+ maxCameras: number().int().nonnegative().nullable()
13182
+ }), object({ success: literal(true) }), {
13183
+ kind: "mutation",
13184
+ auth: "admin"
13018
13185
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
13019
13186
  deviceId: number(),
13020
13187
  addonId: string(),
@@ -13040,7 +13207,7 @@ method(object({
13040
13207
  }), method(object({
13041
13208
  deviceId: number(),
13042
13209
  agentNodeId: string().optional()
13043
- }), CameraPipelineConfigSchema), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
13210
+ }), CameraPipelineConfigSchema), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
13044
13211
  name: string(),
13045
13212
  description: string().optional(),
13046
13213
  config: CameraPipelineConfigSchema
@@ -16004,6 +16171,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
16004
16171
  kind: "mutation",
16005
16172
  auth: "admin"
16006
16173
  });
16174
+ var jobKindSchema = _enum([
16175
+ "install",
16176
+ "update",
16177
+ "uninstall",
16178
+ "restart"
16179
+ ]);
16180
+ var taskPhaseSchema = _enum([
16181
+ "queued",
16182
+ "fetching",
16183
+ "staged",
16184
+ "validating",
16185
+ "applying",
16186
+ "restarting",
16187
+ "applied",
16188
+ "done",
16189
+ "failed",
16190
+ "skipped"
16191
+ ]);
16192
+ var taskTargetSchema = _enum(["framework", "addon"]);
16193
+ var taskLogEntrySchema = object({
16194
+ tsMs: number(),
16195
+ nodeId: string(),
16196
+ packageName: string(),
16197
+ phase: taskPhaseSchema,
16198
+ message: string()
16199
+ });
16200
+ var lifecycleTaskSchema = object({
16201
+ taskId: string(),
16202
+ nodeId: string(),
16203
+ packageName: string(),
16204
+ fromVersion: string().nullable(),
16205
+ toVersion: string(),
16206
+ target: taskTargetSchema,
16207
+ phase: taskPhaseSchema,
16208
+ stagedPath: string().nullable(),
16209
+ attempts: number(),
16210
+ steps: array(taskLogEntrySchema),
16211
+ error: string().nullable(),
16212
+ startedAtMs: number().nullable(),
16213
+ finishedAtMs: number().nullable()
16214
+ });
16215
+ var lifecycleJobStateSchema = _enum([
16216
+ "running",
16217
+ "completed",
16218
+ "failed",
16219
+ "partially-failed",
16220
+ "cancelled"
16221
+ ]);
16222
+ var lifecycleJobScopeSchema = _enum([
16223
+ "single",
16224
+ "bulk",
16225
+ "cluster"
16226
+ ]);
16227
+ var lifecycleJobSchema = object({
16228
+ jobId: string(),
16229
+ kind: jobKindSchema,
16230
+ createdAtMs: number(),
16231
+ createdBy: string(),
16232
+ scope: lifecycleJobScopeSchema,
16233
+ tasks: array(lifecycleTaskSchema),
16234
+ state: lifecycleJobStateSchema,
16235
+ schemaVersion: literal(1)
16236
+ });
16007
16237
  /**
16008
16238
  * addons — system-scoped singleton capability for addon package
16009
16239
  * management (install, update, configure, restart) and per-addon log
@@ -16186,7 +16416,7 @@ var BulkUpdatePhaseSchema = _enum([
16186
16416
  "restarting",
16187
16417
  "finalizing"
16188
16418
  ]);
16189
- var BulkUpdateStateSchema = object({
16419
+ object({
16190
16420
  id: string(),
16191
16421
  nodeId: string(),
16192
16422
  startedAtMs: number(),
@@ -16289,20 +16519,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16289
16519
  }), UpdateFrameworkPackageResultSchema, {
16290
16520
  kind: "mutation",
16291
16521
  auth: "admin"
16292
- }), method(object({
16293
- nodeId: string(),
16294
- items: array(object({
16295
- name: string(),
16296
- version: string(),
16297
- isSystem: boolean()
16298
- })).readonly()
16299
- }), object({ id: string() }), {
16300
- kind: "mutation",
16301
- auth: "admin"
16302
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
16303
- kind: "mutation",
16304
- auth: "admin"
16305
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16522
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16306
16523
  kind: "mutation",
16307
16524
  auth: "admin"
16308
16525
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16324,6 +16541,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16324
16541
  kind: "mutation",
16325
16542
  auth: "admin"
16326
16543
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16544
+ kind: _enum([
16545
+ "install",
16546
+ "update",
16547
+ "uninstall",
16548
+ "restart"
16549
+ ]),
16550
+ targets: array(object({
16551
+ name: string().min(1),
16552
+ version: string().min(1)
16553
+ })).min(1),
16554
+ nodeIds: array(string()).optional()
16555
+ }), object({ jobId: string() }), {
16556
+ kind: "mutation",
16557
+ auth: "admin"
16558
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16559
+ kind: "mutation",
16560
+ auth: "admin"
16561
+ }), method(object({
16327
16562
  addonId: string(),
16328
16563
  level: LogLevelSchema$1.optional()
16329
16564
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16364,7 +16599,7 @@ Object.freeze({
16364
16599
  addonId: null,
16365
16600
  access: "create"
16366
16601
  },
16367
- "addons.cancelBulkUpdate": {
16602
+ "addons.cancelJob": {
16368
16603
  capName: "addons",
16369
16604
  capScope: "system",
16370
16605
  addonId: null,
@@ -16394,7 +16629,7 @@ Object.freeze({
16394
16629
  addonId: null,
16395
16630
  access: "view"
16396
16631
  },
16397
- "addons.getBulkUpdateState": {
16632
+ "addons.getJob": {
16398
16633
  capName: "addons",
16399
16634
  capScope: "system",
16400
16635
  addonId: null,
@@ -16442,19 +16677,19 @@ Object.freeze({
16442
16677
  addonId: null,
16443
16678
  access: "view"
16444
16679
  },
16445
- "addons.listActiveBulkUpdates": {
16680
+ "addons.listCapabilityProviders": {
16446
16681
  capName: "addons",
16447
16682
  capScope: "system",
16448
16683
  addonId: null,
16449
16684
  access: "view"
16450
16685
  },
16451
- "addons.listCapabilityProviders": {
16686
+ "addons.listFrameworkPackages": {
16452
16687
  capName: "addons",
16453
16688
  capScope: "system",
16454
16689
  addonId: null,
16455
16690
  access: "view"
16456
16691
  },
16457
- "addons.listFrameworkPackages": {
16692
+ "addons.listJobs": {
16458
16693
  capName: "addons",
16459
16694
  capScope: "system",
16460
16695
  addonId: null,
@@ -16538,7 +16773,7 @@ Object.freeze({
16538
16773
  addonId: null,
16539
16774
  access: "create"
16540
16775
  },
16541
- "addons.startBulkUpdate": {
16776
+ "addons.startJob": {
16542
16777
  capName: "addons",
16543
16778
  capScope: "system",
16544
16779
  addonId: null,
@@ -18764,6 +18999,12 @@ Object.freeze({
18764
18999
  addonId: null,
18765
19000
  access: "view"
18766
19001
  },
19002
+ "pipelineExecutor.getEngineProvisioning": {
19003
+ capName: "pipeline-executor",
19004
+ capScope: "system",
19005
+ addonId: null,
19006
+ access: "view"
19007
+ },
18767
19008
  "pipelineExecutor.getGlobalPipelineConfig": {
18768
19009
  capName: "pipeline-executor",
18769
19010
  capScope: "system",
@@ -18968,6 +19209,18 @@ Object.freeze({
18968
19209
  addonId: null,
18969
19210
  access: "view"
18970
19211
  },
19212
+ "pipelineOrchestrator.getCameraStatus": {
19213
+ capName: "pipeline-orchestrator",
19214
+ capScope: "system",
19215
+ addonId: null,
19216
+ access: "view"
19217
+ },
19218
+ "pipelineOrchestrator.getCameraStatuses": {
19219
+ capName: "pipeline-orchestrator",
19220
+ capScope: "system",
19221
+ addonId: null,
19222
+ access: "view"
19223
+ },
18971
19224
  "pipelineOrchestrator.getCameraStepOverrides": {
18972
19225
  capName: "pipeline-orchestrator",
18973
19226
  capScope: "system",
@@ -19052,6 +19305,12 @@ Object.freeze({
19052
19305
  addonId: null,
19053
19306
  access: "create"
19054
19307
  },
19308
+ "pipelineOrchestrator.setAgentMaxCameras": {
19309
+ capName: "pipeline-orchestrator",
19310
+ capScope: "system",
19311
+ addonId: null,
19312
+ access: "create"
19313
+ },
19055
19314
  "pipelineOrchestrator.setCameraPipelineForAgent": {
19056
19315
  capName: "pipeline-orchestrator",
19057
19316
  capScope: "system",
@@ -20525,6 +20784,32 @@ Object.freeze({
20525
20784
  "network-access": "ingress",
20526
20785
  "smtp-provider": "email"
20527
20786
  });
20787
+ var frameworkSwapPackageSchema = object({
20788
+ name: string(),
20789
+ stagedPath: string(),
20790
+ backupPath: string(),
20791
+ toVersion: string(),
20792
+ fromVersion: string().nullable()
20793
+ });
20794
+ object({
20795
+ jobId: string(),
20796
+ taskId: string(),
20797
+ packages: array(frameworkSwapPackageSchema),
20798
+ requestedAtMs: number(),
20799
+ schemaVersion: literal(1)
20800
+ });
20801
+ object({
20802
+ jobId: string(),
20803
+ taskId: string(),
20804
+ backups: array(object({
20805
+ name: string(),
20806
+ backupPath: string(),
20807
+ livePath: string()
20808
+ })),
20809
+ appliedAtMs: number(),
20810
+ bootAttempts: number(),
20811
+ schemaVersion: literal(1)
20812
+ });
20528
20813
  //#endregion
20529
20814
  //#region src/shared.ts
20530
20815
  /**
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-B4p10WFZ.js");
5
+ const require_shared = require("./shared-B6lKu5ns.js");
6
6
  let node_stream = require("node:stream");
7
7
  let webdav = require("webdav");
8
8
  //#region src/providers/webdav/webdav-config-schema.ts
@@ -1,4 +1,4 @@
1
- import { a as safeJoinRemotePath, c as storageProviderCapability, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as BaseAddon, t as createSessionId } from "./shared-DL9Prz1T.mjs";
1
+ import { a as safeJoinRemotePath, c as storageProviderCapability, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as BaseAddon, t as createSessionId } from "./shared-hviBSoIY.mjs";
2
2
  import { PassThrough } from "node:stream";
3
3
  import { AuthType, createClient } from "webdav";
4
4
  //#region src/providers/webdav/webdav-config-schema.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-remote-storage",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Remote storage providers (SFTP, S3, WebDAV) — unifies remote backends behind the storage-provider cap",
5
5
  "keywords": [
6
6
  "camstack",