@camstack/addon-cloudflare 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.
@@ -4981,6 +4981,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
4981
4981
  */
4982
4982
  EventCategory["PipelineEngineMetricsSnapshot"] = "pipeline.engine-metrics-snapshot";
4983
4983
  /**
4984
+ * Per-node detection-engine runtime-provisioning transition. Emitted by
4985
+ * the detection-pipeline provider on every state change of its lazy
4986
+ * engine-provisioning machine (idle → installing → verifying → ready,
4987
+ * or → failed with a `nextRetryAt`). Payload is the
4988
+ * `EngineProvisioningState` snapshot; `event.source.nodeId` carries the
4989
+ * node. The Pipeline page subscribes to drive a live "installing
4990
+ * OpenVINO… / ready" indicator per node without polling
4991
+ * `pipelineExecutor.getEngineProvisioning`. Telemetry-grade (D8): the UI
4992
+ * also reads the cap snapshot on mount / reconnect. Phase 2.
4993
+ */
4994
+ EventCategory["PipelineEngineProvisioning"] = "pipeline.engine-provisioning";
4995
+ /**
4984
4996
  * Cluster topology snapshot. Carries the same payload returned by
4985
4997
  * `nodes.topology` (every reachable node + addons + processes).
4986
4998
  * Emitted by the hub on any agent / addon lifecycle change
@@ -5130,14 +5142,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5130
5142
  EventCategory["DeviceSleeping"] = "device.sleeping";
5131
5143
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5132
5144
  /**
5133
- * Progress snapshot emitted by `BulkUpdateCoordinator` on every state
5134
- * transition (item status change, phase change, completion, cancel).
5135
- * Payload is `BulkUpdateState`. Admin UI subscribes via `useLiveEvent`
5136
- * to drive the sticky `BulkUpdateBanner` and per-row `AddonRowBadge`.
5137
- *
5138
- * Spec: docs/superpowers/specs/2026-05-21-addons-bulk-update-progress-design.md
5145
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5146
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5147
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5148
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5149
+ * in F4 once live bulk progress is re-implemented over the engine events.
5139
5150
  */
5140
5151
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5152
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5153
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5141
5154
  /**
5142
5155
  * A container's child visibility toggled (hidden/shown). Emitted by the
5143
5156
  * `accessories` cap when a child device is hidden or revealed.
@@ -9144,6 +9157,24 @@ var DetectorOutputSchema = object({
9144
9157
  inferenceMs: number(),
9145
9158
  modelId: string()
9146
9159
  });
9160
+ var EngineProvisioningSchema = object({
9161
+ runtimeId: _enum([
9162
+ "onnx",
9163
+ "openvino",
9164
+ "coreml"
9165
+ ]).nullable(),
9166
+ device: string().nullable(),
9167
+ state: _enum([
9168
+ "idle",
9169
+ "installing",
9170
+ "verifying",
9171
+ "ready",
9172
+ "failed"
9173
+ ]),
9174
+ progress: number().optional(),
9175
+ error: string().optional(),
9176
+ nextRetryAt: number().optional()
9177
+ });
9147
9178
  var PipelineStepInputSchema = lazy(() => object({
9148
9179
  addonId: string(),
9149
9180
  modelId: string(),
@@ -9212,7 +9243,7 @@ var PipelineRunResultBridge = custom();
9212
9243
  method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(PipelineEngineChoiceSchema, array(PipelineDefaultStepSchema)), method(_void(), PipelineEngineChoiceSchema, {
9213
9244
  kind: "mutation",
9214
9245
  auth: "admin"
9215
- }), method(_void(), record(string(), object({
9246
+ }), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
9216
9247
  modelId: string(),
9217
9248
  settings: record(string(), unknown()).readonly()
9218
9249
  }))), method(object({ steps: record(string(), object({
@@ -12820,7 +12851,10 @@ var AgentAddonConfigSchema = object({
12820
12851
  modelId: string(),
12821
12852
  settings: record(string(), unknown()).readonly()
12822
12853
  });
12823
- var AgentPipelineSettingsSchema = object({ addonDefaults: record(string(), AgentAddonConfigSchema).readonly() });
12854
+ var AgentPipelineSettingsSchema = object({
12855
+ addonDefaults: record(string(), AgentAddonConfigSchema).readonly(),
12856
+ maxCameras: number().int().nonnegative().nullable().default(null)
12857
+ });
12824
12858
  var CameraPipelineForAgentSchema = object({
12825
12859
  steps: array(PipelineStepInputSchema).readonly(),
12826
12860
  audio: object({
@@ -12922,6 +12956,133 @@ var GlobalMetricsSchema = object({
12922
12956
  * capability providers.
12923
12957
  */
12924
12958
  var CapabilityBindingsSchema = record(string(), string());
12959
+ /** Source block — always present; derives from the stream catalog. */
12960
+ var CameraSourceStatusSchema = object({ streams: array(object({
12961
+ camStreamId: string(),
12962
+ codec: string(),
12963
+ width: number(),
12964
+ height: number(),
12965
+ fps: number(),
12966
+ kind: string()
12967
+ })).readonly() });
12968
+ /** Assignment block — always present (orchestrator-local, no remote call). */
12969
+ var CameraAssignmentStatusSchema = object({
12970
+ detectionNodeId: string().nullable(),
12971
+ decoderNodeId: string().nullable(),
12972
+ audioNodeId: string().nullable(),
12973
+ pinned: object({
12974
+ detection: boolean(),
12975
+ decoder: boolean(),
12976
+ audio: boolean()
12977
+ }),
12978
+ reasons: object({
12979
+ detection: string().optional(),
12980
+ decoder: string().optional(),
12981
+ audio: string().optional()
12982
+ })
12983
+ });
12984
+ /** Broker block — null when the broker stage is unreachable or inactive. */
12985
+ var CameraBrokerStatusSchema = object({
12986
+ profiles: array(object({
12987
+ profile: string(),
12988
+ status: string(),
12989
+ codec: string(),
12990
+ width: number(),
12991
+ height: number(),
12992
+ subscribers: number(),
12993
+ inFps: number(),
12994
+ outFps: number()
12995
+ })).readonly(),
12996
+ webrtcSessions: number(),
12997
+ rtspRestream: boolean()
12998
+ });
12999
+ /** Shared-memory ring statistics within the decoder block. */
13000
+ var CameraDecoderShmSchema = object({
13001
+ framesWritten: number(),
13002
+ getFrameHits: number(),
13003
+ getFrameMisses: number(),
13004
+ budgetMb: number()
13005
+ });
13006
+ /** Decoder block — null when the decoder stage is unreachable or inactive. */
13007
+ var CameraDecoderStatusSchema = object({
13008
+ nodeId: string(),
13009
+ formats: array(string()).readonly(),
13010
+ sessionCount: number(),
13011
+ shm: CameraDecoderShmSchema
13012
+ });
13013
+ /** Motion block — null when motion detection is not active for this device. */
13014
+ var CameraMotionStatusSchema = object({
13015
+ enabled: boolean(),
13016
+ fps: number()
13017
+ });
13018
+ /** Detection provisioning sub-block. */
13019
+ var CameraDetectionProvisioningSchema = object({
13020
+ state: _enum([
13021
+ "idle",
13022
+ "installing",
13023
+ "verifying",
13024
+ "ready",
13025
+ "failed"
13026
+ ]),
13027
+ error: string().optional()
13028
+ });
13029
+ /** Detection phase — derived from the runner's engine phase. */
13030
+ var CameraDetectionPhaseSchema = _enum([
13031
+ "idle",
13032
+ "watching",
13033
+ "active"
13034
+ ]);
13035
+ /** Detection block — null when no detection node is assigned or reachable. */
13036
+ var CameraDetectionStatusSchema = object({
13037
+ nodeId: string(),
13038
+ engine: object({
13039
+ backend: string(),
13040
+ device: string()
13041
+ }),
13042
+ phase: CameraDetectionPhaseSchema,
13043
+ configuredFps: number(),
13044
+ actualFps: number(),
13045
+ queueDepth: number(),
13046
+ avgInferenceMs: number(),
13047
+ provisioning: CameraDetectionProvisioningSchema
13048
+ });
13049
+ /** Audio block — null when no audio node is assigned or reachable. */
13050
+ var CameraAudioStatusSchema = object({
13051
+ nodeId: string(),
13052
+ enabled: boolean()
13053
+ });
13054
+ /** Recording block — null when no recording cap is active for this device. */
13055
+ var CameraRecordingStatusSchema = object({
13056
+ mode: _enum([
13057
+ "off",
13058
+ "continuous",
13059
+ "events"
13060
+ ]),
13061
+ active: boolean(),
13062
+ storageBytes: number()
13063
+ });
13064
+ /**
13065
+ * Aggregated per-camera pipeline status — server-composed, single call.
13066
+ *
13067
+ * The `assignment` and `source` blocks are always present.
13068
+ * Every other block is `null` when the stage is inactive or unreachable
13069
+ * during the bounded parallel fan-out in the orchestrator implementation.
13070
+ *
13071
+ * See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
13072
+ */
13073
+ var CameraStatusSchema = object({
13074
+ deviceId: number(),
13075
+ assignment: CameraAssignmentStatusSchema,
13076
+ source: CameraSourceStatusSchema,
13077
+ broker: CameraBrokerStatusSchema.nullable(),
13078
+ decoder: CameraDecoderStatusSchema.nullable(),
13079
+ motion: CameraMotionStatusSchema.nullable(),
13080
+ detection: CameraDetectionStatusSchema.nullable(),
13081
+ audio: CameraAudioStatusSchema.nullable(),
13082
+ recording: CameraRecordingStatusSchema.nullable(),
13083
+ /** Unix timestamp (ms) when this snapshot was composed server-side. */
13084
+ fetchedAt: number()
13085
+ });
12925
13086
  method(object({
12926
13087
  deviceId: number(),
12927
13088
  agentNodeId: string()
@@ -12989,6 +13150,12 @@ method(object({
12989
13150
  }), {
12990
13151
  kind: "mutation",
12991
13152
  auth: "admin"
13153
+ }), method(object({
13154
+ agentNodeId: string(),
13155
+ maxCameras: number().int().nonnegative().nullable()
13156
+ }), object({ success: literal(true) }), {
13157
+ kind: "mutation",
13158
+ auth: "admin"
12992
13159
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
12993
13160
  deviceId: number(),
12994
13161
  addonId: string(),
@@ -13014,7 +13181,7 @@ method(object({
13014
13181
  }), method(object({
13015
13182
  deviceId: number(),
13016
13183
  agentNodeId: string().optional()
13017
- }), CameraPipelineConfigSchema), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
13184
+ }), CameraPipelineConfigSchema), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
13018
13185
  name: string(),
13019
13186
  description: string().optional(),
13020
13187
  config: CameraPipelineConfigSchema
@@ -16018,6 +16185,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
16018
16185
  kind: "mutation",
16019
16186
  auth: "admin"
16020
16187
  });
16188
+ var jobKindSchema = _enum([
16189
+ "install",
16190
+ "update",
16191
+ "uninstall",
16192
+ "restart"
16193
+ ]);
16194
+ var taskPhaseSchema = _enum([
16195
+ "queued",
16196
+ "fetching",
16197
+ "staged",
16198
+ "validating",
16199
+ "applying",
16200
+ "restarting",
16201
+ "applied",
16202
+ "done",
16203
+ "failed",
16204
+ "skipped"
16205
+ ]);
16206
+ var taskTargetSchema = _enum(["framework", "addon"]);
16207
+ var taskLogEntrySchema = object({
16208
+ tsMs: number(),
16209
+ nodeId: string(),
16210
+ packageName: string(),
16211
+ phase: taskPhaseSchema,
16212
+ message: string()
16213
+ });
16214
+ var lifecycleTaskSchema = object({
16215
+ taskId: string(),
16216
+ nodeId: string(),
16217
+ packageName: string(),
16218
+ fromVersion: string().nullable(),
16219
+ toVersion: string(),
16220
+ target: taskTargetSchema,
16221
+ phase: taskPhaseSchema,
16222
+ stagedPath: string().nullable(),
16223
+ attempts: number(),
16224
+ steps: array(taskLogEntrySchema),
16225
+ error: string().nullable(),
16226
+ startedAtMs: number().nullable(),
16227
+ finishedAtMs: number().nullable()
16228
+ });
16229
+ var lifecycleJobStateSchema = _enum([
16230
+ "running",
16231
+ "completed",
16232
+ "failed",
16233
+ "partially-failed",
16234
+ "cancelled"
16235
+ ]);
16236
+ var lifecycleJobScopeSchema = _enum([
16237
+ "single",
16238
+ "bulk",
16239
+ "cluster"
16240
+ ]);
16241
+ var lifecycleJobSchema = object({
16242
+ jobId: string(),
16243
+ kind: jobKindSchema,
16244
+ createdAtMs: number(),
16245
+ createdBy: string(),
16246
+ scope: lifecycleJobScopeSchema,
16247
+ tasks: array(lifecycleTaskSchema),
16248
+ state: lifecycleJobStateSchema,
16249
+ schemaVersion: literal(1)
16250
+ });
16021
16251
  /**
16022
16252
  * addons — system-scoped singleton capability for addon package
16023
16253
  * management (install, update, configure, restart) and per-addon log
@@ -16200,7 +16430,7 @@ var BulkUpdatePhaseSchema = _enum([
16200
16430
  "restarting",
16201
16431
  "finalizing"
16202
16432
  ]);
16203
- var BulkUpdateStateSchema = object({
16433
+ object({
16204
16434
  id: string(),
16205
16435
  nodeId: string(),
16206
16436
  startedAtMs: number(),
@@ -16303,20 +16533,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16303
16533
  }), UpdateFrameworkPackageResultSchema, {
16304
16534
  kind: "mutation",
16305
16535
  auth: "admin"
16306
- }), method(object({
16307
- nodeId: string(),
16308
- items: array(object({
16309
- name: string(),
16310
- version: string(),
16311
- isSystem: boolean()
16312
- })).readonly()
16313
- }), object({ id: string() }), {
16314
- kind: "mutation",
16315
- auth: "admin"
16316
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
16317
- kind: "mutation",
16318
- auth: "admin"
16319
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16536
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16320
16537
  kind: "mutation",
16321
16538
  auth: "admin"
16322
16539
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16338,6 +16555,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16338
16555
  kind: "mutation",
16339
16556
  auth: "admin"
16340
16557
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16558
+ kind: _enum([
16559
+ "install",
16560
+ "update",
16561
+ "uninstall",
16562
+ "restart"
16563
+ ]),
16564
+ targets: array(object({
16565
+ name: string().min(1),
16566
+ version: string().min(1)
16567
+ })).min(1),
16568
+ nodeIds: array(string()).optional()
16569
+ }), object({ jobId: string() }), {
16570
+ kind: "mutation",
16571
+ auth: "admin"
16572
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16573
+ kind: "mutation",
16574
+ auth: "admin"
16575
+ }), method(object({
16341
16576
  addonId: string(),
16342
16577
  level: LogLevelSchema$1.optional()
16343
16578
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16378,7 +16613,7 @@ Object.freeze({
16378
16613
  addonId: null,
16379
16614
  access: "create"
16380
16615
  },
16381
- "addons.cancelBulkUpdate": {
16616
+ "addons.cancelJob": {
16382
16617
  capName: "addons",
16383
16618
  capScope: "system",
16384
16619
  addonId: null,
@@ -16408,7 +16643,7 @@ Object.freeze({
16408
16643
  addonId: null,
16409
16644
  access: "view"
16410
16645
  },
16411
- "addons.getBulkUpdateState": {
16646
+ "addons.getJob": {
16412
16647
  capName: "addons",
16413
16648
  capScope: "system",
16414
16649
  addonId: null,
@@ -16456,19 +16691,19 @@ Object.freeze({
16456
16691
  addonId: null,
16457
16692
  access: "view"
16458
16693
  },
16459
- "addons.listActiveBulkUpdates": {
16694
+ "addons.listCapabilityProviders": {
16460
16695
  capName: "addons",
16461
16696
  capScope: "system",
16462
16697
  addonId: null,
16463
16698
  access: "view"
16464
16699
  },
16465
- "addons.listCapabilityProviders": {
16700
+ "addons.listFrameworkPackages": {
16466
16701
  capName: "addons",
16467
16702
  capScope: "system",
16468
16703
  addonId: null,
16469
16704
  access: "view"
16470
16705
  },
16471
- "addons.listFrameworkPackages": {
16706
+ "addons.listJobs": {
16472
16707
  capName: "addons",
16473
16708
  capScope: "system",
16474
16709
  addonId: null,
@@ -16552,7 +16787,7 @@ Object.freeze({
16552
16787
  addonId: null,
16553
16788
  access: "create"
16554
16789
  },
16555
- "addons.startBulkUpdate": {
16790
+ "addons.startJob": {
16556
16791
  capName: "addons",
16557
16792
  capScope: "system",
16558
16793
  addonId: null,
@@ -18778,6 +19013,12 @@ Object.freeze({
18778
19013
  addonId: null,
18779
19014
  access: "view"
18780
19015
  },
19016
+ "pipelineExecutor.getEngineProvisioning": {
19017
+ capName: "pipeline-executor",
19018
+ capScope: "system",
19019
+ addonId: null,
19020
+ access: "view"
19021
+ },
18781
19022
  "pipelineExecutor.getGlobalPipelineConfig": {
18782
19023
  capName: "pipeline-executor",
18783
19024
  capScope: "system",
@@ -18982,6 +19223,18 @@ Object.freeze({
18982
19223
  addonId: null,
18983
19224
  access: "view"
18984
19225
  },
19226
+ "pipelineOrchestrator.getCameraStatus": {
19227
+ capName: "pipeline-orchestrator",
19228
+ capScope: "system",
19229
+ addonId: null,
19230
+ access: "view"
19231
+ },
19232
+ "pipelineOrchestrator.getCameraStatuses": {
19233
+ capName: "pipeline-orchestrator",
19234
+ capScope: "system",
19235
+ addonId: null,
19236
+ access: "view"
19237
+ },
18985
19238
  "pipelineOrchestrator.getCameraStepOverrides": {
18986
19239
  capName: "pipeline-orchestrator",
18987
19240
  capScope: "system",
@@ -19066,6 +19319,12 @@ Object.freeze({
19066
19319
  addonId: null,
19067
19320
  access: "create"
19068
19321
  },
19322
+ "pipelineOrchestrator.setAgentMaxCameras": {
19323
+ capName: "pipeline-orchestrator",
19324
+ capScope: "system",
19325
+ addonId: null,
19326
+ access: "create"
19327
+ },
19069
19328
  "pipelineOrchestrator.setCameraPipelineForAgent": {
19070
19329
  capName: "pipeline-orchestrator",
19071
19330
  capScope: "system",
@@ -20539,6 +20798,32 @@ Object.freeze({
20539
20798
  "network-access": "ingress",
20540
20799
  "smtp-provider": "email"
20541
20800
  });
20801
+ var frameworkSwapPackageSchema = object({
20802
+ name: string(),
20803
+ stagedPath: string(),
20804
+ backupPath: string(),
20805
+ toVersion: string(),
20806
+ fromVersion: string().nullable()
20807
+ });
20808
+ object({
20809
+ jobId: string(),
20810
+ taskId: string(),
20811
+ packages: array(frameworkSwapPackageSchema),
20812
+ requestedAtMs: number(),
20813
+ schemaVersion: literal(1)
20814
+ });
20815
+ object({
20816
+ jobId: string(),
20817
+ taskId: string(),
20818
+ backups: array(object({
20819
+ name: string(),
20820
+ backupPath: string(),
20821
+ livePath: string()
20822
+ })),
20823
+ appliedAtMs: number(),
20824
+ bootAttempts: number(),
20825
+ schemaVersion: literal(1)
20826
+ });
20542
20827
  //#endregion
20543
20828
  Object.defineProperty(exports, "BaseAddon", {
20544
20829
  enumerable: true,