@camstack/addon-provider-hikvision 1.2.132 → 1.2.133

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 +231 -60
  2. package/dist/addon.mjs +231 -60
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -5404,7 +5404,7 @@ var ZodIssueCode = {
5404
5404
  var ZodFirstPartyTypeKind;
5405
5405
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5406
5406
  //#endregion
5407
- //#region ../types/dist/sleep-C-v96WpE.mjs
5407
+ //#region ../types/dist/sleep-gU6hqv4_.mjs
5408
5408
  /**
5409
5409
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5410
5410
  * window to float samples (D455).
@@ -8995,6 +8995,82 @@ var ArchivedDebugNoteQueryInputSchema = object({
8995
8995
  /** Max rows returned, newest-first. */
8996
8996
  limit: number().int().min(1).max(1e3).optional()
8997
8997
  });
8998
+ var TrackRelationKindSchema = _enum(["same-subject", "different-subjects"]);
8999
+ var TrackSideSchema = _enum(["before", "after"]);
9000
+ var TrackPurityValueSchema = _enum(["mixed", "not-a-subject"]);
9001
+ var TrackRelationSchema = object({
9002
+ id: string(),
9003
+ deviceId: number().int(),
9004
+ leftTrackId: string(),
9005
+ rightTrackId: string(),
9006
+ leftSide: TrackSideSchema.nullable(),
9007
+ rightSide: TrackSideSchema.nullable(),
9008
+ relation: TrackRelationKindSchema,
9009
+ presence: literal("continuous").nullable(),
9010
+ leftStartedAt: number().int().nullable(),
9011
+ rightStartedAt: number().int().nullable(),
9012
+ createdAt: number().int(),
9013
+ updatedAt: number().int(),
9014
+ author: string().nullable()
9015
+ });
9016
+ var TrackPuritySchema = object({
9017
+ id: string(),
9018
+ deviceId: number().int(),
9019
+ sourceTrackId: string(),
9020
+ purity: TrackPurityValueSchema,
9021
+ switchAtMs: number().int().nullable(),
9022
+ startedAt: number().int().nullable(),
9023
+ createdAt: number().int(),
9024
+ updatedAt: number().int(),
9025
+ author: string().nullable()
9026
+ });
9027
+ var SetTrackRelationInputSchema = object({
9028
+ deviceId: number().int(),
9029
+ trackId: string().min(1),
9030
+ otherTrackId: string().min(1),
9031
+ relation: TrackRelationKindSchema,
9032
+ presence: literal("continuous").optional(),
9033
+ trackSide: TrackSideSchema.optional(),
9034
+ otherSide: TrackSideSchema.optional()
9035
+ });
9036
+ var ClearTrackRelationInputSchema = object({
9037
+ deviceId: number().int(),
9038
+ trackId: string().min(1),
9039
+ otherTrackId: string().min(1)
9040
+ });
9041
+ var ClearTrackRelationResultSchema = object({ cleared: boolean() });
9042
+ var SetTrackPurityInputSchema = object({
9043
+ deviceId: number().int(),
9044
+ trackId: string().min(1),
9045
+ purity: _enum([
9046
+ "pure",
9047
+ "mixed",
9048
+ "not-a-subject"
9049
+ ]),
9050
+ switchAtMs: number().int().optional()
9051
+ });
9052
+ /** `null` when `pure` cleared the row. */
9053
+ var SetTrackPurityResultSchema = object({ purity: TrackPuritySchema.nullable() });
9054
+ var ListTrackRelationsInputSchema = object({
9055
+ deviceId: number().int(),
9056
+ trackId: string().optional(),
9057
+ since: number().int().optional(),
9058
+ until: number().int().optional(),
9059
+ limit: number().int().min(1).max(5e3).optional()
9060
+ });
9061
+ var ListTrackRelationsResultSchema = object({
9062
+ relations: array(TrackRelationSchema).readonly(),
9063
+ purities: array(TrackPuritySchema).readonly(),
9064
+ truncated: boolean()
9065
+ });
9066
+ _enum([
9067
+ "unknown-track",
9068
+ "cross-device",
9069
+ "self-relation",
9070
+ "contradiction",
9071
+ "switch-outside-track",
9072
+ "switch-needs-mixed"
9073
+ ]);
8998
9074
  /**
8999
9075
  * Ops-log — the durable, append-only operations audit shared by the
9000
9076
  * recordings and events management surfaces.
@@ -13465,6 +13541,70 @@ var CompositionBlockStateSchema = object({
13465
13541
  reason: string().optional(),
13466
13542
  fields: array(CompositionFieldStateSchema)
13467
13543
  });
13544
+ var NUMBER = {
13545
+ kind: "fixed",
13546
+ result: ["number"]
13547
+ };
13548
+ var BOOLEAN = {
13549
+ kind: "fixed",
13550
+ result: ["boolean"]
13551
+ };
13552
+ Object.freeze({
13553
+ min: NUMBER,
13554
+ max: NUMBER,
13555
+ abs: NUMBER,
13556
+ floor: NUMBER,
13557
+ ceil: NUMBER,
13558
+ sqrt: NUMBER,
13559
+ round: NUMBER,
13560
+ pow: NUMBER,
13561
+ clamp: NUMBER,
13562
+ avg: NUMBER,
13563
+ sum: NUMBER,
13564
+ age: NUMBER,
13565
+ convert: NUMBER,
13566
+ coalesce: { kind: "coalesce" },
13567
+ any: BOOLEAN,
13568
+ all: BOOLEAN,
13569
+ within: BOOLEAN,
13570
+ latest: {
13571
+ kind: "fixed",
13572
+ result: ["number", "null"]
13573
+ },
13574
+ number: {
13575
+ kind: "fixed",
13576
+ result: ["number", "null"]
13577
+ },
13578
+ rose: {
13579
+ kind: "fixed",
13580
+ result: ["number", "null"]
13581
+ },
13582
+ count: NUMBER
13583
+ });
13584
+ `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
13585
+ /**
13586
+ * What a composition may BUILD on a device type (G2, D676): the caps a new
13587
+ * device of that type, or an existing one that lacks them, can be given. The
13588
+ * blockers are the validator's own refusal codes, and a spec compares this
13589
+ * listing with `planComposition` for every capability — the editor can never
13590
+ * offer a feature the save would refuse for the same reason.
13591
+ */
13592
+ var ComposableFieldSchema = object({
13593
+ path: string(),
13594
+ kind: CompositionFieldKindSchema,
13595
+ nullable: boolean(),
13596
+ required: boolean(),
13597
+ enumValues: array(string()).optional()
13598
+ });
13599
+ var ComposableCapabilitiesSchema = object({ caps: array(object({
13600
+ cap: string(),
13601
+ fields: array(ComposableFieldSchema),
13602
+ /** Present for an item-array cap (`consumables.items`). */
13603
+ itemArray: object({
13604
+ path: string(),
13605
+ keyField: string()
13606
+ }).optional()
13607
+ })) });
13468
13608
  /** Where a block runs. The operator chooses — a block driving a device on an
13469
13609
  * agent is the reason placement is not fixed to the hub. */
13470
13610
  var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
@@ -13629,7 +13769,7 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
13629
13769
  }), method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }), method(object({}), CompositionListReadSchema, { auth: "admin" }), method(object({
13630
13770
  addonId: string().min(1),
13631
13771
  stableId: string().min(1)
13632
- }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({
13772
+ }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({ deviceType: _enum(DeviceType) }), ComposableCapabilitiesSchema, { auth: "admin" }), method(object({
13633
13773
  composition: CompositionSchema,
13634
13774
  blockId: string().optional()
13635
13775
  }), CompositionValidationSchema, {
@@ -20887,7 +21027,7 @@ function cameraSensorRefKey(ref) {
20887
21027
  }
20888
21028
  /** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
20889
21029
  var CameraSensorsModeSchema = _enum(["in-addition"]);
20890
- object({
21030
+ var CameraSensorsConfigSchema = object({
20891
21031
  mode: CameraSensorsModeSchema,
20892
21032
  sensors: array(CameraSensorRefSchema).min(1).max(8)
20893
21033
  }).superRefine((value, ctx) => {
@@ -22801,7 +22941,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
22801
22941
  deviceId: number(),
22802
22942
  trackId: string(),
22803
22943
  flags: TrackFlagsPatchSchema
22804
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
22944
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(SetTrackRelationInputSchema, TrackRelationSchema, { kind: "mutation" }), method(ClearTrackRelationInputSchema, ClearTrackRelationResultSchema, { kind: "mutation" }), method(SetTrackPurityInputSchema, SetTrackPurityResultSchema, { kind: "mutation" }), method(ListTrackRelationsInputSchema, ListTrackRelationsResultSchema, { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
22805
22945
  kind: "query",
22806
22946
  auth: "admin"
22807
22947
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -24999,6 +25139,28 @@ var NodeInferenceDevicesSchema = object({
24999
25139
  reachable: boolean(),
25000
25140
  devices: array(NodeInferenceDeviceSchema).readonly()
25001
25141
  });
25142
+ /**
25143
+ * Pipeline Orchestrator capability — global load balancer + camera dispatcher.
25144
+ *
25145
+ * Lives on the hub. Tracks the camera-to-agent assignment map, listens to
25146
+ * device lifecycle events, queries each runner's capacity + hardware
25147
+ * profile, and dispatches `attachCamera` / `detachCamera` cap calls to the
25148
+ * appropriate runner instances. Persists assignments via the multi-level
25149
+ * settings store so they survive hub restarts.
25150
+ *
25151
+ * Strictly the control plane: never sees a frame, never calls inference,
25152
+ * never drains queues. The runner does that work locally on each agent.
25153
+ */
25154
+ /**
25155
+ * The input of `setCameraSensors` (G5, D676): the ONE typed write path of a
25156
+ * camera's attached sensors (D672). `config: null` removes the attachment —
25157
+ * the camera reads `not-configured` again, never `unreadable`.
25158
+ */
25159
+ var SetCameraSensorsInputSchema = object({
25160
+ deviceId: number().int().nonnegative(),
25161
+ /** `null` removes the attachment: the camera goes back to `not-configured`. */
25162
+ config: CameraSensorsConfigSchema.nullable()
25163
+ });
25002
25164
  method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
25003
25165
  kind: "mutation",
25004
25166
  auth: "admin"
@@ -25153,7 +25315,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
25153
25315
  }), CameraSwitchGroupSchema, {
25154
25316
  kind: "mutation",
25155
25317
  auth: "admin"
25156
- }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
25318
+ }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(SetCameraSensorsInputSchema, object({ success: literal(true) }), {
25319
+ kind: "mutation",
25320
+ auth: "admin"
25321
+ }), method(_void(), DiskReconcileJobSchema, {
25157
25322
  kind: "mutation",
25158
25323
  auth: "admin"
25159
25324
  }), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
@@ -39845,47 +40010,6 @@ var zoneRulesCapability = {
39845
40010
  */
39846
40011
  durability: "restored"
39847
40012
  };
39848
- var NUMBER = {
39849
- kind: "fixed",
39850
- result: ["number"]
39851
- };
39852
- var BOOLEAN = {
39853
- kind: "fixed",
39854
- result: ["boolean"]
39855
- };
39856
- Object.freeze({
39857
- min: NUMBER,
39858
- max: NUMBER,
39859
- abs: NUMBER,
39860
- floor: NUMBER,
39861
- ceil: NUMBER,
39862
- sqrt: NUMBER,
39863
- round: NUMBER,
39864
- pow: NUMBER,
39865
- clamp: NUMBER,
39866
- avg: NUMBER,
39867
- sum: NUMBER,
39868
- age: NUMBER,
39869
- convert: NUMBER,
39870
- coalesce: { kind: "coalesce" },
39871
- any: BOOLEAN,
39872
- all: BOOLEAN,
39873
- within: BOOLEAN,
39874
- latest: {
39875
- kind: "fixed",
39876
- result: ["number", "null"]
39877
- },
39878
- number: {
39879
- kind: "fixed",
39880
- result: ["number", "null"]
39881
- },
39882
- rose: {
39883
- kind: "fixed",
39884
- result: ["number", "null"]
39885
- },
39886
- count: NUMBER
39887
- });
39888
- `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
39889
40013
  /**
39890
40014
  * Accessory device helpers — shared across drivers.
39891
40015
  *
@@ -44064,6 +44188,12 @@ Object.freeze({
44064
44188
  addonId: null,
44065
44189
  access: "view"
44066
44190
  },
44191
+ "coreBlocks.listComposableCaps": {
44192
+ capName: "core-blocks",
44193
+ capScope: "system",
44194
+ addonId: null,
44195
+ access: "view"
44196
+ },
44067
44197
  "coreBlocks.listCompositions": {
44068
44198
  capName: "core-blocks",
44069
44199
  capScope: "system",
@@ -46878,6 +47008,12 @@ Object.freeze({
46878
47008
  addonId: null,
46879
47009
  access: "create"
46880
47010
  },
47011
+ "pipelineAnalytics.clearTrackRelation": {
47012
+ capName: "pipeline-analytics",
47013
+ capScope: "device",
47014
+ addonId: null,
47015
+ access: "delete"
47016
+ },
46881
47017
  "pipelineAnalytics.clearTracks": {
46882
47018
  capName: "pipeline-analytics",
46883
47019
  capScope: "device",
@@ -47130,6 +47266,12 @@ Object.freeze({
47130
47266
  addonId: null,
47131
47267
  access: "view"
47132
47268
  },
47269
+ "pipelineAnalytics.listTrackRelations": {
47270
+ capName: "pipeline-analytics",
47271
+ capScope: "device",
47272
+ addonId: null,
47273
+ access: "view"
47274
+ },
47133
47275
  "pipelineAnalytics.listTracks": {
47134
47276
  capName: "pipeline-analytics",
47135
47277
  capScope: "device",
@@ -47244,6 +47386,18 @@ Object.freeze({
47244
47386
  addonId: null,
47245
47387
  access: "create"
47246
47388
  },
47389
+ "pipelineAnalytics.setTrackPurity": {
47390
+ capName: "pipeline-analytics",
47391
+ capScope: "device",
47392
+ addonId: null,
47393
+ access: "create"
47394
+ },
47395
+ "pipelineAnalytics.setTrackRelation": {
47396
+ capName: "pipeline-analytics",
47397
+ capScope: "device",
47398
+ addonId: null,
47399
+ access: "create"
47400
+ },
47247
47401
  "pipelineAnalytics.startStorageMigrationMove": {
47248
47402
  capName: "pipeline-analytics",
47249
47403
  capScope: "device",
@@ -47748,6 +47902,12 @@ Object.freeze({
47748
47902
  addonId: null,
47749
47903
  access: "create"
47750
47904
  },
47905
+ "pipelineOrchestrator.setCameraSensors": {
47906
+ capName: "pipeline-orchestrator",
47907
+ capScope: "system",
47908
+ addonId: null,
47909
+ access: "create"
47910
+ },
47751
47911
  "pipelineOrchestrator.setCameraStepOverride": {
47752
47912
  capName: "pipeline-orchestrator",
47753
47913
  capScope: "system",
@@ -51158,6 +51318,11 @@ Object.freeze({
51158
51318
  form: "single",
51159
51319
  optional: false
51160
51320
  }],
51321
+ "pipelineAnalytics.clearTrackRelation": [{
51322
+ name: "deviceId",
51323
+ form: "single",
51324
+ optional: false
51325
+ }],
51161
51326
  "pipelineAnalytics.clearTracks": [{
51162
51327
  name: "deviceId",
51163
51328
  form: "single",
@@ -51308,6 +51473,11 @@ Object.freeze({
51308
51473
  form: "single",
51309
51474
  optional: false
51310
51475
  }],
51476
+ "pipelineAnalytics.listTrackRelations": [{
51477
+ name: "deviceId",
51478
+ form: "single",
51479
+ optional: false
51480
+ }],
51311
51481
  "pipelineAnalytics.listTracks": [{
51312
51482
  name: "deviceId",
51313
51483
  form: "single",
@@ -51378,6 +51548,16 @@ Object.freeze({
51378
51548
  form: "single",
51379
51549
  optional: false
51380
51550
  }],
51551
+ "pipelineAnalytics.setTrackPurity": [{
51552
+ name: "deviceId",
51553
+ form: "single",
51554
+ optional: false
51555
+ }],
51556
+ "pipelineAnalytics.setTrackRelation": [{
51557
+ name: "deviceId",
51558
+ form: "single",
51559
+ optional: false
51560
+ }],
51381
51561
  "pipelineAnalytics.wipeAllAnalytics": [{
51382
51562
  name: "deviceId",
51383
51563
  form: "single",
@@ -51458,6 +51638,11 @@ Object.freeze({
51458
51638
  form: "single",
51459
51639
  optional: false
51460
51640
  }],
51641
+ "pipelineOrchestrator.setCameraSensors": [{
51642
+ name: "deviceId",
51643
+ form: "single",
51644
+ optional: false
51645
+ }],
51461
51646
  "pipelineOrchestrator.setCameraStepOverride": [{
51462
51647
  name: "deviceId",
51463
51648
  form: "single",
@@ -66176,20 +66361,6 @@ var HikvisionCamera = class HikvisionCamera extends BaseDevice {
66176
66361
  this.reachabilityPoll?.stop();
66177
66362
  this.reachabilityPoll = null;
66178
66363
  await this.disconnectAll();
66179
- for (const camStreamId of this.published.keys()) try {
66180
- await this.ctx.api.streamBroker.retractCameraStream.mutate({
66181
- deviceId: this.id,
66182
- camStreamId
66183
- });
66184
- } catch (err) {
66185
- this.ctx.logger.debug("retractCameraStream failed", {
66186
- tags: {
66187
- deviceId: this.id,
66188
- camStreamId
66189
- },
66190
- meta: { error: err instanceof Error ? err.message : String(err) }
66191
- });
66192
- }
66193
66364
  this.published.clear();
66194
66365
  }
66195
66366
  async disconnectAll() {
package/dist/addon.mjs CHANGED
@@ -5383,7 +5383,7 @@ var ZodIssueCode = {
5383
5383
  var ZodFirstPartyTypeKind;
5384
5384
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5385
5385
  //#endregion
5386
- //#region ../types/dist/sleep-C-v96WpE.mjs
5386
+ //#region ../types/dist/sleep-gU6hqv4_.mjs
5387
5387
  /**
5388
5388
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5389
5389
  * window to float samples (D455).
@@ -8974,6 +8974,82 @@ var ArchivedDebugNoteQueryInputSchema = object({
8974
8974
  /** Max rows returned, newest-first. */
8975
8975
  limit: number().int().min(1).max(1e3).optional()
8976
8976
  });
8977
+ var TrackRelationKindSchema = _enum(["same-subject", "different-subjects"]);
8978
+ var TrackSideSchema = _enum(["before", "after"]);
8979
+ var TrackPurityValueSchema = _enum(["mixed", "not-a-subject"]);
8980
+ var TrackRelationSchema = object({
8981
+ id: string(),
8982
+ deviceId: number().int(),
8983
+ leftTrackId: string(),
8984
+ rightTrackId: string(),
8985
+ leftSide: TrackSideSchema.nullable(),
8986
+ rightSide: TrackSideSchema.nullable(),
8987
+ relation: TrackRelationKindSchema,
8988
+ presence: literal("continuous").nullable(),
8989
+ leftStartedAt: number().int().nullable(),
8990
+ rightStartedAt: number().int().nullable(),
8991
+ createdAt: number().int(),
8992
+ updatedAt: number().int(),
8993
+ author: string().nullable()
8994
+ });
8995
+ var TrackPuritySchema = object({
8996
+ id: string(),
8997
+ deviceId: number().int(),
8998
+ sourceTrackId: string(),
8999
+ purity: TrackPurityValueSchema,
9000
+ switchAtMs: number().int().nullable(),
9001
+ startedAt: number().int().nullable(),
9002
+ createdAt: number().int(),
9003
+ updatedAt: number().int(),
9004
+ author: string().nullable()
9005
+ });
9006
+ var SetTrackRelationInputSchema = object({
9007
+ deviceId: number().int(),
9008
+ trackId: string().min(1),
9009
+ otherTrackId: string().min(1),
9010
+ relation: TrackRelationKindSchema,
9011
+ presence: literal("continuous").optional(),
9012
+ trackSide: TrackSideSchema.optional(),
9013
+ otherSide: TrackSideSchema.optional()
9014
+ });
9015
+ var ClearTrackRelationInputSchema = object({
9016
+ deviceId: number().int(),
9017
+ trackId: string().min(1),
9018
+ otherTrackId: string().min(1)
9019
+ });
9020
+ var ClearTrackRelationResultSchema = object({ cleared: boolean() });
9021
+ var SetTrackPurityInputSchema = object({
9022
+ deviceId: number().int(),
9023
+ trackId: string().min(1),
9024
+ purity: _enum([
9025
+ "pure",
9026
+ "mixed",
9027
+ "not-a-subject"
9028
+ ]),
9029
+ switchAtMs: number().int().optional()
9030
+ });
9031
+ /** `null` when `pure` cleared the row. */
9032
+ var SetTrackPurityResultSchema = object({ purity: TrackPuritySchema.nullable() });
9033
+ var ListTrackRelationsInputSchema = object({
9034
+ deviceId: number().int(),
9035
+ trackId: string().optional(),
9036
+ since: number().int().optional(),
9037
+ until: number().int().optional(),
9038
+ limit: number().int().min(1).max(5e3).optional()
9039
+ });
9040
+ var ListTrackRelationsResultSchema = object({
9041
+ relations: array(TrackRelationSchema).readonly(),
9042
+ purities: array(TrackPuritySchema).readonly(),
9043
+ truncated: boolean()
9044
+ });
9045
+ _enum([
9046
+ "unknown-track",
9047
+ "cross-device",
9048
+ "self-relation",
9049
+ "contradiction",
9050
+ "switch-outside-track",
9051
+ "switch-needs-mixed"
9052
+ ]);
8977
9053
  /**
8978
9054
  * Ops-log — the durable, append-only operations audit shared by the
8979
9055
  * recordings and events management surfaces.
@@ -13444,6 +13520,70 @@ var CompositionBlockStateSchema = object({
13444
13520
  reason: string().optional(),
13445
13521
  fields: array(CompositionFieldStateSchema)
13446
13522
  });
13523
+ var NUMBER = {
13524
+ kind: "fixed",
13525
+ result: ["number"]
13526
+ };
13527
+ var BOOLEAN = {
13528
+ kind: "fixed",
13529
+ result: ["boolean"]
13530
+ };
13531
+ Object.freeze({
13532
+ min: NUMBER,
13533
+ max: NUMBER,
13534
+ abs: NUMBER,
13535
+ floor: NUMBER,
13536
+ ceil: NUMBER,
13537
+ sqrt: NUMBER,
13538
+ round: NUMBER,
13539
+ pow: NUMBER,
13540
+ clamp: NUMBER,
13541
+ avg: NUMBER,
13542
+ sum: NUMBER,
13543
+ age: NUMBER,
13544
+ convert: NUMBER,
13545
+ coalesce: { kind: "coalesce" },
13546
+ any: BOOLEAN,
13547
+ all: BOOLEAN,
13548
+ within: BOOLEAN,
13549
+ latest: {
13550
+ kind: "fixed",
13551
+ result: ["number", "null"]
13552
+ },
13553
+ number: {
13554
+ kind: "fixed",
13555
+ result: ["number", "null"]
13556
+ },
13557
+ rose: {
13558
+ kind: "fixed",
13559
+ result: ["number", "null"]
13560
+ },
13561
+ count: NUMBER
13562
+ });
13563
+ `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
13564
+ /**
13565
+ * What a composition may BUILD on a device type (G2, D676): the caps a new
13566
+ * device of that type, or an existing one that lacks them, can be given. The
13567
+ * blockers are the validator's own refusal codes, and a spec compares this
13568
+ * listing with `planComposition` for every capability — the editor can never
13569
+ * offer a feature the save would refuse for the same reason.
13570
+ */
13571
+ var ComposableFieldSchema = object({
13572
+ path: string(),
13573
+ kind: CompositionFieldKindSchema,
13574
+ nullable: boolean(),
13575
+ required: boolean(),
13576
+ enumValues: array(string()).optional()
13577
+ });
13578
+ var ComposableCapabilitiesSchema = object({ caps: array(object({
13579
+ cap: string(),
13580
+ fields: array(ComposableFieldSchema),
13581
+ /** Present for an item-array cap (`consumables.items`). */
13582
+ itemArray: object({
13583
+ path: string(),
13584
+ keyField: string()
13585
+ }).optional()
13586
+ })) });
13447
13587
  /** Where a block runs. The operator chooses — a block driving a device on an
13448
13588
  * agent is the reason placement is not fixed to the hub. */
13449
13589
  var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
@@ -13608,7 +13748,7 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
13608
13748
  }), method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }), method(object({}), CompositionListReadSchema, { auth: "admin" }), method(object({
13609
13749
  addonId: string().min(1),
13610
13750
  stableId: string().min(1)
13611
- }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({
13751
+ }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({ deviceType: _enum(DeviceType) }), ComposableCapabilitiesSchema, { auth: "admin" }), method(object({
13612
13752
  composition: CompositionSchema,
13613
13753
  blockId: string().optional()
13614
13754
  }), CompositionValidationSchema, {
@@ -20866,7 +21006,7 @@ function cameraSensorRefKey(ref) {
20866
21006
  }
20867
21007
  /** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
20868
21008
  var CameraSensorsModeSchema = _enum(["in-addition"]);
20869
- object({
21009
+ var CameraSensorsConfigSchema = object({
20870
21010
  mode: CameraSensorsModeSchema,
20871
21011
  sensors: array(CameraSensorRefSchema).min(1).max(8)
20872
21012
  }).superRefine((value, ctx) => {
@@ -22780,7 +22920,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
22780
22920
  deviceId: number(),
22781
22921
  trackId: string(),
22782
22922
  flags: TrackFlagsPatchSchema
22783
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
22923
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(SetTrackRelationInputSchema, TrackRelationSchema, { kind: "mutation" }), method(ClearTrackRelationInputSchema, ClearTrackRelationResultSchema, { kind: "mutation" }), method(SetTrackPurityInputSchema, SetTrackPurityResultSchema, { kind: "mutation" }), method(ListTrackRelationsInputSchema, ListTrackRelationsResultSchema, { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
22784
22924
  kind: "query",
22785
22925
  auth: "admin"
22786
22926
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -24978,6 +25118,28 @@ var NodeInferenceDevicesSchema = object({
24978
25118
  reachable: boolean(),
24979
25119
  devices: array(NodeInferenceDeviceSchema).readonly()
24980
25120
  });
25121
+ /**
25122
+ * Pipeline Orchestrator capability — global load balancer + camera dispatcher.
25123
+ *
25124
+ * Lives on the hub. Tracks the camera-to-agent assignment map, listens to
25125
+ * device lifecycle events, queries each runner's capacity + hardware
25126
+ * profile, and dispatches `attachCamera` / `detachCamera` cap calls to the
25127
+ * appropriate runner instances. Persists assignments via the multi-level
25128
+ * settings store so they survive hub restarts.
25129
+ *
25130
+ * Strictly the control plane: never sees a frame, never calls inference,
25131
+ * never drains queues. The runner does that work locally on each agent.
25132
+ */
25133
+ /**
25134
+ * The input of `setCameraSensors` (G5, D676): the ONE typed write path of a
25135
+ * camera's attached sensors (D672). `config: null` removes the attachment —
25136
+ * the camera reads `not-configured` again, never `unreadable`.
25137
+ */
25138
+ var SetCameraSensorsInputSchema = object({
25139
+ deviceId: number().int().nonnegative(),
25140
+ /** `null` removes the attachment: the camera goes back to `not-configured`. */
25141
+ config: CameraSensorsConfigSchema.nullable()
25142
+ });
24981
25143
  method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
24982
25144
  kind: "mutation",
24983
25145
  auth: "admin"
@@ -25132,7 +25294,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
25132
25294
  }), CameraSwitchGroupSchema, {
25133
25295
  kind: "mutation",
25134
25296
  auth: "admin"
25135
- }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
25297
+ }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(SetCameraSensorsInputSchema, object({ success: literal(true) }), {
25298
+ kind: "mutation",
25299
+ auth: "admin"
25300
+ }), method(_void(), DiskReconcileJobSchema, {
25136
25301
  kind: "mutation",
25137
25302
  auth: "admin"
25138
25303
  }), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
@@ -39824,47 +39989,6 @@ var zoneRulesCapability = {
39824
39989
  */
39825
39990
  durability: "restored"
39826
39991
  };
39827
- var NUMBER = {
39828
- kind: "fixed",
39829
- result: ["number"]
39830
- };
39831
- var BOOLEAN = {
39832
- kind: "fixed",
39833
- result: ["boolean"]
39834
- };
39835
- Object.freeze({
39836
- min: NUMBER,
39837
- max: NUMBER,
39838
- abs: NUMBER,
39839
- floor: NUMBER,
39840
- ceil: NUMBER,
39841
- sqrt: NUMBER,
39842
- round: NUMBER,
39843
- pow: NUMBER,
39844
- clamp: NUMBER,
39845
- avg: NUMBER,
39846
- sum: NUMBER,
39847
- age: NUMBER,
39848
- convert: NUMBER,
39849
- coalesce: { kind: "coalesce" },
39850
- any: BOOLEAN,
39851
- all: BOOLEAN,
39852
- within: BOOLEAN,
39853
- latest: {
39854
- kind: "fixed",
39855
- result: ["number", "null"]
39856
- },
39857
- number: {
39858
- kind: "fixed",
39859
- result: ["number", "null"]
39860
- },
39861
- rose: {
39862
- kind: "fixed",
39863
- result: ["number", "null"]
39864
- },
39865
- count: NUMBER
39866
- });
39867
- `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
39868
39992
  /**
39869
39993
  * Accessory device helpers — shared across drivers.
39870
39994
  *
@@ -44043,6 +44167,12 @@ Object.freeze({
44043
44167
  addonId: null,
44044
44168
  access: "view"
44045
44169
  },
44170
+ "coreBlocks.listComposableCaps": {
44171
+ capName: "core-blocks",
44172
+ capScope: "system",
44173
+ addonId: null,
44174
+ access: "view"
44175
+ },
44046
44176
  "coreBlocks.listCompositions": {
44047
44177
  capName: "core-blocks",
44048
44178
  capScope: "system",
@@ -46857,6 +46987,12 @@ Object.freeze({
46857
46987
  addonId: null,
46858
46988
  access: "create"
46859
46989
  },
46990
+ "pipelineAnalytics.clearTrackRelation": {
46991
+ capName: "pipeline-analytics",
46992
+ capScope: "device",
46993
+ addonId: null,
46994
+ access: "delete"
46995
+ },
46860
46996
  "pipelineAnalytics.clearTracks": {
46861
46997
  capName: "pipeline-analytics",
46862
46998
  capScope: "device",
@@ -47109,6 +47245,12 @@ Object.freeze({
47109
47245
  addonId: null,
47110
47246
  access: "view"
47111
47247
  },
47248
+ "pipelineAnalytics.listTrackRelations": {
47249
+ capName: "pipeline-analytics",
47250
+ capScope: "device",
47251
+ addonId: null,
47252
+ access: "view"
47253
+ },
47112
47254
  "pipelineAnalytics.listTracks": {
47113
47255
  capName: "pipeline-analytics",
47114
47256
  capScope: "device",
@@ -47223,6 +47365,18 @@ Object.freeze({
47223
47365
  addonId: null,
47224
47366
  access: "create"
47225
47367
  },
47368
+ "pipelineAnalytics.setTrackPurity": {
47369
+ capName: "pipeline-analytics",
47370
+ capScope: "device",
47371
+ addonId: null,
47372
+ access: "create"
47373
+ },
47374
+ "pipelineAnalytics.setTrackRelation": {
47375
+ capName: "pipeline-analytics",
47376
+ capScope: "device",
47377
+ addonId: null,
47378
+ access: "create"
47379
+ },
47226
47380
  "pipelineAnalytics.startStorageMigrationMove": {
47227
47381
  capName: "pipeline-analytics",
47228
47382
  capScope: "device",
@@ -47727,6 +47881,12 @@ Object.freeze({
47727
47881
  addonId: null,
47728
47882
  access: "create"
47729
47883
  },
47884
+ "pipelineOrchestrator.setCameraSensors": {
47885
+ capName: "pipeline-orchestrator",
47886
+ capScope: "system",
47887
+ addonId: null,
47888
+ access: "create"
47889
+ },
47730
47890
  "pipelineOrchestrator.setCameraStepOverride": {
47731
47891
  capName: "pipeline-orchestrator",
47732
47892
  capScope: "system",
@@ -51137,6 +51297,11 @@ Object.freeze({
51137
51297
  form: "single",
51138
51298
  optional: false
51139
51299
  }],
51300
+ "pipelineAnalytics.clearTrackRelation": [{
51301
+ name: "deviceId",
51302
+ form: "single",
51303
+ optional: false
51304
+ }],
51140
51305
  "pipelineAnalytics.clearTracks": [{
51141
51306
  name: "deviceId",
51142
51307
  form: "single",
@@ -51287,6 +51452,11 @@ Object.freeze({
51287
51452
  form: "single",
51288
51453
  optional: false
51289
51454
  }],
51455
+ "pipelineAnalytics.listTrackRelations": [{
51456
+ name: "deviceId",
51457
+ form: "single",
51458
+ optional: false
51459
+ }],
51290
51460
  "pipelineAnalytics.listTracks": [{
51291
51461
  name: "deviceId",
51292
51462
  form: "single",
@@ -51357,6 +51527,16 @@ Object.freeze({
51357
51527
  form: "single",
51358
51528
  optional: false
51359
51529
  }],
51530
+ "pipelineAnalytics.setTrackPurity": [{
51531
+ name: "deviceId",
51532
+ form: "single",
51533
+ optional: false
51534
+ }],
51535
+ "pipelineAnalytics.setTrackRelation": [{
51536
+ name: "deviceId",
51537
+ form: "single",
51538
+ optional: false
51539
+ }],
51360
51540
  "pipelineAnalytics.wipeAllAnalytics": [{
51361
51541
  name: "deviceId",
51362
51542
  form: "single",
@@ -51437,6 +51617,11 @@ Object.freeze({
51437
51617
  form: "single",
51438
51618
  optional: false
51439
51619
  }],
51620
+ "pipelineOrchestrator.setCameraSensors": [{
51621
+ name: "deviceId",
51622
+ form: "single",
51623
+ optional: false
51624
+ }],
51440
51625
  "pipelineOrchestrator.setCameraStepOverride": [{
51441
51626
  name: "deviceId",
51442
51627
  form: "single",
@@ -66155,20 +66340,6 @@ var HikvisionCamera = class HikvisionCamera extends BaseDevice {
66155
66340
  this.reachabilityPoll?.stop();
66156
66341
  this.reachabilityPoll = null;
66157
66342
  await this.disconnectAll();
66158
- for (const camStreamId of this.published.keys()) try {
66159
- await this.ctx.api.streamBroker.retractCameraStream.mutate({
66160
- deviceId: this.id,
66161
- camStreamId
66162
- });
66163
- } catch (err) {
66164
- this.ctx.logger.debug("retractCameraStream failed", {
66165
- tags: {
66166
- deviceId: this.id,
66167
- camStreamId
66168
- },
66169
- meta: { error: err instanceof Error ? err.message : String(err) }
66170
- });
66171
- }
66172
66343
  this.published.clear();
66173
66344
  }
66174
66345
  async disconnectAll() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.2.132",
3
+ "version": "1.2.133",
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",