@camstack/addon-pipeline 1.2.308 → 1.2.309

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 (33) hide show
  1. package/dist/audio-analyzer/index.js +2 -2
  2. package/dist/audio-analyzer/index.mjs +2 -2
  3. package/dist/{default-detection-model-2rHeRf0Y.js → default-detection-model-BZMS04Wn.js} +1 -1
  4. package/dist/{default-detection-model-DATyir0t.mjs → default-detection-model-ClQ1gcZ9.mjs} +1 -1
  5. package/dist/detection-pipeline/index.js +4 -4
  6. package/dist/detection-pipeline/index.mjs +4 -4
  7. package/dist/{dist-jy-7xoW5.mjs → dist-B3_sbBDM.mjs} +231 -46
  8. package/dist/{dist-CdRsXAov.js → dist-BLf0YjAa.js} +231 -46
  9. package/dist/motion-wasm/index.js +1 -1
  10. package/dist/motion-wasm/index.mjs +1 -1
  11. package/dist/{node-NCge1qZM.mjs → node-DJFKTJ0B.mjs} +1 -1
  12. package/dist/{node-pWHpwpBa.js → node-Vwf2PuIT.js} +1 -1
  13. package/dist/pipeline-runner/index.js +3 -3
  14. package/dist/pipeline-runner/index.mjs +3 -3
  15. package/dist/{process-memory-4K7QaQab.mjs → process-memory-BvwauBlX.mjs} +1 -1
  16. package/dist/{process-memory-C4ayPnww.js → process-memory-DGTVVYlX.js} +1 -1
  17. package/dist/recorder/index.js +67 -9
  18. package/dist/recorder/index.mjs +67 -9
  19. package/dist/{segment-demux-js-0bM2Anej.js → segment-demux-js-BUAAuSVF.js} +1 -1
  20. package/dist/{segment-demux-js-BaI2VdPX.mjs → segment-demux-js-C0oz7IVm.mjs} +1 -1
  21. package/dist/stream-broker/_stub.js +2 -2
  22. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CkxD__Uy.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-7H0Oxf23.mjs} +2 -2
  23. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C6EaWavG.mjs +26 -0
  24. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BhO-szf8.mjs +26 -0
  25. package/dist/stream-broker/demux-worker-child.js +1 -1
  26. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  27. package/dist/stream-broker/{hostInit-D56Gr-hD.mjs → hostInit-DEY-Dqqo.mjs} +2 -2
  28. package/dist/stream-broker/index.js +132 -19
  29. package/dist/stream-broker/index.mjs +132 -19
  30. package/dist/stream-broker/remoteEntry.js +1 -1
  31. package/package.json +1 -1
  32. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DEPTgXS_.mjs +0 -26
  33. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CdKbuxqG.mjs +0 -26
@@ -5370,7 +5370,7 @@ var ZodIssueCode = {
5370
5370
  var ZodFirstPartyTypeKind;
5371
5371
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5372
5372
  //#endregion
5373
- //#region ../types/dist/sleep-C-v96WpE.mjs
5373
+ //#region ../types/dist/sleep-gU6hqv4_.mjs
5374
5374
  /**
5375
5375
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5376
5376
  * window to float samples (D455).
@@ -10378,6 +10378,82 @@ var ArchivedDebugNoteQueryInputSchema = object({
10378
10378
  /** Max rows returned, newest-first. */
10379
10379
  limit: number().int().min(1).max(1e3).optional()
10380
10380
  });
10381
+ var TrackRelationKindSchema = _enum(["same-subject", "different-subjects"]);
10382
+ var TrackSideSchema = _enum(["before", "after"]);
10383
+ var TrackPurityValueSchema = _enum(["mixed", "not-a-subject"]);
10384
+ var TrackRelationSchema = object({
10385
+ id: string(),
10386
+ deviceId: number().int(),
10387
+ leftTrackId: string(),
10388
+ rightTrackId: string(),
10389
+ leftSide: TrackSideSchema.nullable(),
10390
+ rightSide: TrackSideSchema.nullable(),
10391
+ relation: TrackRelationKindSchema,
10392
+ presence: literal("continuous").nullable(),
10393
+ leftStartedAt: number().int().nullable(),
10394
+ rightStartedAt: number().int().nullable(),
10395
+ createdAt: number().int(),
10396
+ updatedAt: number().int(),
10397
+ author: string().nullable()
10398
+ });
10399
+ var TrackPuritySchema = object({
10400
+ id: string(),
10401
+ deviceId: number().int(),
10402
+ sourceTrackId: string(),
10403
+ purity: TrackPurityValueSchema,
10404
+ switchAtMs: number().int().nullable(),
10405
+ startedAt: number().int().nullable(),
10406
+ createdAt: number().int(),
10407
+ updatedAt: number().int(),
10408
+ author: string().nullable()
10409
+ });
10410
+ var SetTrackRelationInputSchema = object({
10411
+ deviceId: number().int(),
10412
+ trackId: string().min(1),
10413
+ otherTrackId: string().min(1),
10414
+ relation: TrackRelationKindSchema,
10415
+ presence: literal("continuous").optional(),
10416
+ trackSide: TrackSideSchema.optional(),
10417
+ otherSide: TrackSideSchema.optional()
10418
+ });
10419
+ var ClearTrackRelationInputSchema = object({
10420
+ deviceId: number().int(),
10421
+ trackId: string().min(1),
10422
+ otherTrackId: string().min(1)
10423
+ });
10424
+ var ClearTrackRelationResultSchema = object({ cleared: boolean() });
10425
+ var SetTrackPurityInputSchema = object({
10426
+ deviceId: number().int(),
10427
+ trackId: string().min(1),
10428
+ purity: _enum([
10429
+ "pure",
10430
+ "mixed",
10431
+ "not-a-subject"
10432
+ ]),
10433
+ switchAtMs: number().int().optional()
10434
+ });
10435
+ /** `null` when `pure` cleared the row. */
10436
+ var SetTrackPurityResultSchema = object({ purity: TrackPuritySchema.nullable() });
10437
+ var ListTrackRelationsInputSchema = object({
10438
+ deviceId: number().int(),
10439
+ trackId: string().optional(),
10440
+ since: number().int().optional(),
10441
+ until: number().int().optional(),
10442
+ limit: number().int().min(1).max(5e3).optional()
10443
+ });
10444
+ var ListTrackRelationsResultSchema = object({
10445
+ relations: array(TrackRelationSchema).readonly(),
10446
+ purities: array(TrackPuritySchema).readonly(),
10447
+ truncated: boolean()
10448
+ });
10449
+ _enum([
10450
+ "unknown-track",
10451
+ "cross-device",
10452
+ "self-relation",
10453
+ "contradiction",
10454
+ "switch-outside-track",
10455
+ "switch-needs-mixed"
10456
+ ]);
10381
10457
  /**
10382
10458
  * Ops-log — the durable, append-only operations audit shared by the
10383
10459
  * recordings and events management surfaces.
@@ -15636,6 +15712,70 @@ var CompositionBlockStateSchema = object({
15636
15712
  reason: string().optional(),
15637
15713
  fields: array(CompositionFieldStateSchema)
15638
15714
  });
15715
+ var NUMBER = {
15716
+ kind: "fixed",
15717
+ result: ["number"]
15718
+ };
15719
+ var BOOLEAN = {
15720
+ kind: "fixed",
15721
+ result: ["boolean"]
15722
+ };
15723
+ Object.freeze({
15724
+ min: NUMBER,
15725
+ max: NUMBER,
15726
+ abs: NUMBER,
15727
+ floor: NUMBER,
15728
+ ceil: NUMBER,
15729
+ sqrt: NUMBER,
15730
+ round: NUMBER,
15731
+ pow: NUMBER,
15732
+ clamp: NUMBER,
15733
+ avg: NUMBER,
15734
+ sum: NUMBER,
15735
+ age: NUMBER,
15736
+ convert: NUMBER,
15737
+ coalesce: { kind: "coalesce" },
15738
+ any: BOOLEAN,
15739
+ all: BOOLEAN,
15740
+ within: BOOLEAN,
15741
+ latest: {
15742
+ kind: "fixed",
15743
+ result: ["number", "null"]
15744
+ },
15745
+ number: {
15746
+ kind: "fixed",
15747
+ result: ["number", "null"]
15748
+ },
15749
+ rose: {
15750
+ kind: "fixed",
15751
+ result: ["number", "null"]
15752
+ },
15753
+ count: NUMBER
15754
+ });
15755
+ `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
15756
+ /**
15757
+ * What a composition may BUILD on a device type (G2, D676): the caps a new
15758
+ * device of that type, or an existing one that lacks them, can be given. The
15759
+ * blockers are the validator's own refusal codes, and a spec compares this
15760
+ * listing with `planComposition` for every capability — the editor can never
15761
+ * offer a feature the save would refuse for the same reason.
15762
+ */
15763
+ var ComposableFieldSchema = object({
15764
+ path: string(),
15765
+ kind: CompositionFieldKindSchema,
15766
+ nullable: boolean(),
15767
+ required: boolean(),
15768
+ enumValues: array(string()).optional()
15769
+ });
15770
+ var ComposableCapabilitiesSchema = object({ caps: array(object({
15771
+ cap: string(),
15772
+ fields: array(ComposableFieldSchema),
15773
+ /** Present for an item-array cap (`consumables.items`). */
15774
+ itemArray: object({
15775
+ path: string(),
15776
+ keyField: string()
15777
+ }).optional()
15778
+ })) });
15639
15779
  /** Where a block runs. The operator chooses — a block driving a device on an
15640
15780
  * agent is the reason placement is not fixed to the hub. */
15641
15781
  var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
@@ -15800,7 +15940,7 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
15800
15940
  }), method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }), method(object({}), CompositionListReadSchema, { auth: "admin" }), method(object({
15801
15941
  addonId: string().min(1),
15802
15942
  stableId: string().min(1)
15803
- }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({
15943
+ }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({ deviceType: _enum(DeviceType) }), ComposableCapabilitiesSchema, { auth: "admin" }), method(object({
15804
15944
  composition: CompositionSchema,
15805
15945
  blockId: string().optional()
15806
15946
  }), CompositionValidationSchema, {
@@ -23128,7 +23268,7 @@ function cameraSensorRefKey(ref) {
23128
23268
  }
23129
23269
  /** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
23130
23270
  var CameraSensorsModeSchema = _enum(["in-addition"]);
23131
- object({
23271
+ var CameraSensorsConfigSchema = object({
23132
23272
  mode: CameraSensorsModeSchema,
23133
23273
  sensors: array(CameraSensorRefSchema).min(1).max(8)
23134
23274
  }).superRefine((value, ctx) => {
@@ -25089,7 +25229,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25089
25229
  deviceId: number(),
25090
25230
  trackId: string(),
25091
25231
  flags: TrackFlagsPatchSchema
25092
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
25232
+ }), 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, {
25093
25233
  kind: "query",
25094
25234
  auth: "admin"
25095
25235
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -27635,6 +27775,28 @@ var NodeInferenceDevicesSchema = object({
27635
27775
  reachable: boolean(),
27636
27776
  devices: array(NodeInferenceDeviceSchema).readonly()
27637
27777
  });
27778
+ /**
27779
+ * Pipeline Orchestrator capability — global load balancer + camera dispatcher.
27780
+ *
27781
+ * Lives on the hub. Tracks the camera-to-agent assignment map, listens to
27782
+ * device lifecycle events, queries each runner's capacity + hardware
27783
+ * profile, and dispatches `attachCamera` / `detachCamera` cap calls to the
27784
+ * appropriate runner instances. Persists assignments via the multi-level
27785
+ * settings store so they survive hub restarts.
27786
+ *
27787
+ * Strictly the control plane: never sees a frame, never calls inference,
27788
+ * never drains queues. The runner does that work locally on each agent.
27789
+ */
27790
+ /**
27791
+ * The input of `setCameraSensors` (G5, D676): the ONE typed write path of a
27792
+ * camera's attached sensors (D672). `config: null` removes the attachment —
27793
+ * the camera reads `not-configured` again, never `unreadable`.
27794
+ */
27795
+ var SetCameraSensorsInputSchema = object({
27796
+ deviceId: number().int().nonnegative(),
27797
+ /** `null` removes the attachment: the camera goes back to `not-configured`. */
27798
+ config: CameraSensorsConfigSchema.nullable()
27799
+ });
27638
27800
  method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
27639
27801
  kind: "mutation",
27640
27802
  auth: "admin"
@@ -27789,7 +27951,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
27789
27951
  }), CameraSwitchGroupSchema, {
27790
27952
  kind: "mutation",
27791
27953
  auth: "admin"
27792
- }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
27954
+ }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(SetCameraSensorsInputSchema, object({ success: literal(true) }), {
27955
+ kind: "mutation",
27956
+ auth: "admin"
27957
+ }), method(_void(), DiskReconcileJobSchema, {
27793
27958
  kind: "mutation",
27794
27959
  auth: "admin"
27795
27960
  }), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
@@ -39710,47 +39875,6 @@ DeviceType.Camera, method(object({
39710
39875
  detection: array(ZoneRuleSchema).readonly(),
39711
39876
  package: array(ZoneRuleSchema).readonly()
39712
39877
  });
39713
- var NUMBER = {
39714
- kind: "fixed",
39715
- result: ["number"]
39716
- };
39717
- var BOOLEAN = {
39718
- kind: "fixed",
39719
- result: ["boolean"]
39720
- };
39721
- Object.freeze({
39722
- min: NUMBER,
39723
- max: NUMBER,
39724
- abs: NUMBER,
39725
- floor: NUMBER,
39726
- ceil: NUMBER,
39727
- sqrt: NUMBER,
39728
- round: NUMBER,
39729
- pow: NUMBER,
39730
- clamp: NUMBER,
39731
- avg: NUMBER,
39732
- sum: NUMBER,
39733
- age: NUMBER,
39734
- convert: NUMBER,
39735
- coalesce: { kind: "coalesce" },
39736
- any: BOOLEAN,
39737
- all: BOOLEAN,
39738
- within: BOOLEAN,
39739
- latest: {
39740
- kind: "fixed",
39741
- result: ["number", "null"]
39742
- },
39743
- number: {
39744
- kind: "fixed",
39745
- result: ["number", "null"]
39746
- },
39747
- rose: {
39748
- kind: "fixed",
39749
- result: ["number", "null"]
39750
- },
39751
- count: NUMBER
39752
- });
39753
- `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
39754
39878
  var HF_BASE_URL = `https://huggingface.co/camstack/camstack-models/resolve/main`;
39755
39879
  /**
39756
39880
  * Accessory device helpers — shared across drivers.
@@ -42192,6 +42316,12 @@ Object.freeze({
42192
42316
  addonId: null,
42193
42317
  access: "view"
42194
42318
  },
42319
+ "coreBlocks.listComposableCaps": {
42320
+ capName: "core-blocks",
42321
+ capScope: "system",
42322
+ addonId: null,
42323
+ access: "view"
42324
+ },
42195
42325
  "coreBlocks.listCompositions": {
42196
42326
  capName: "core-blocks",
42197
42327
  capScope: "system",
@@ -45006,6 +45136,12 @@ Object.freeze({
45006
45136
  addonId: null,
45007
45137
  access: "create"
45008
45138
  },
45139
+ "pipelineAnalytics.clearTrackRelation": {
45140
+ capName: "pipeline-analytics",
45141
+ capScope: "device",
45142
+ addonId: null,
45143
+ access: "delete"
45144
+ },
45009
45145
  "pipelineAnalytics.clearTracks": {
45010
45146
  capName: "pipeline-analytics",
45011
45147
  capScope: "device",
@@ -45258,6 +45394,12 @@ Object.freeze({
45258
45394
  addonId: null,
45259
45395
  access: "view"
45260
45396
  },
45397
+ "pipelineAnalytics.listTrackRelations": {
45398
+ capName: "pipeline-analytics",
45399
+ capScope: "device",
45400
+ addonId: null,
45401
+ access: "view"
45402
+ },
45261
45403
  "pipelineAnalytics.listTracks": {
45262
45404
  capName: "pipeline-analytics",
45263
45405
  capScope: "device",
@@ -45372,6 +45514,18 @@ Object.freeze({
45372
45514
  addonId: null,
45373
45515
  access: "create"
45374
45516
  },
45517
+ "pipelineAnalytics.setTrackPurity": {
45518
+ capName: "pipeline-analytics",
45519
+ capScope: "device",
45520
+ addonId: null,
45521
+ access: "create"
45522
+ },
45523
+ "pipelineAnalytics.setTrackRelation": {
45524
+ capName: "pipeline-analytics",
45525
+ capScope: "device",
45526
+ addonId: null,
45527
+ access: "create"
45528
+ },
45375
45529
  "pipelineAnalytics.startStorageMigrationMove": {
45376
45530
  capName: "pipeline-analytics",
45377
45531
  capScope: "device",
@@ -45876,6 +46030,12 @@ Object.freeze({
45876
46030
  addonId: null,
45877
46031
  access: "create"
45878
46032
  },
46033
+ "pipelineOrchestrator.setCameraSensors": {
46034
+ capName: "pipeline-orchestrator",
46035
+ capScope: "system",
46036
+ addonId: null,
46037
+ access: "create"
46038
+ },
45879
46039
  "pipelineOrchestrator.setCameraStepOverride": {
45880
46040
  capName: "pipeline-orchestrator",
45881
46041
  capScope: "system",
@@ -49286,6 +49446,11 @@ Object.freeze({
49286
49446
  form: "single",
49287
49447
  optional: false
49288
49448
  }],
49449
+ "pipelineAnalytics.clearTrackRelation": [{
49450
+ name: "deviceId",
49451
+ form: "single",
49452
+ optional: false
49453
+ }],
49289
49454
  "pipelineAnalytics.clearTracks": [{
49290
49455
  name: "deviceId",
49291
49456
  form: "single",
@@ -49436,6 +49601,11 @@ Object.freeze({
49436
49601
  form: "single",
49437
49602
  optional: false
49438
49603
  }],
49604
+ "pipelineAnalytics.listTrackRelations": [{
49605
+ name: "deviceId",
49606
+ form: "single",
49607
+ optional: false
49608
+ }],
49439
49609
  "pipelineAnalytics.listTracks": [{
49440
49610
  name: "deviceId",
49441
49611
  form: "single",
@@ -49506,6 +49676,16 @@ Object.freeze({
49506
49676
  form: "single",
49507
49677
  optional: false
49508
49678
  }],
49679
+ "pipelineAnalytics.setTrackPurity": [{
49680
+ name: "deviceId",
49681
+ form: "single",
49682
+ optional: false
49683
+ }],
49684
+ "pipelineAnalytics.setTrackRelation": [{
49685
+ name: "deviceId",
49686
+ form: "single",
49687
+ optional: false
49688
+ }],
49509
49689
  "pipelineAnalytics.wipeAllAnalytics": [{
49510
49690
  name: "deviceId",
49511
49691
  form: "single",
@@ -49586,6 +49766,11 @@ Object.freeze({
49586
49766
  form: "single",
49587
49767
  optional: false
49588
49768
  }],
49769
+ "pipelineOrchestrator.setCameraSensors": [{
49770
+ name: "deviceId",
49771
+ form: "single",
49772
+ optional: false
49773
+ }],
49589
49774
  "pipelineOrchestrator.setCameraStepOverride": [{
49590
49775
  name: "deviceId",
49591
49776
  form: "single",
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-CdRsXAov.js");
5
+ const require_dist = require("../dist-BLf0YjAa.js");
6
6
  const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
7
7
  let node_fs = require("node:fs");
8
8
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Ot as motionDetectionCapability, pn as BaseAddon, st as evaluateZoneRules, un as DeviceType, xn as hydrateSchema } from "../dist-jy-7xoW5.mjs";
1
+ import { Ot as motionDetectionCapability, pn as BaseAddon, st as evaluateZoneRules, un as DeviceType, xn as hydrateSchema } from "../dist-B3_sbBDM.mjs";
2
2
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { join } from "node:path";
@@ -1,4 +1,4 @@
1
- import { an as buildFfmpegArgs, cn as isSoftwareDecode, dn as errMsg, in as Fmp4BoxSplitter } from "./dist-jy-7xoW5.mjs";
1
+ import { an as buildFfmpegArgs, cn as isSoftwareDecode, dn as errMsg, in as Fmp4BoxSplitter } from "./dist-B3_sbBDM.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { realpathSync } from "node:fs";
4
4
  import path from "node:path";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-emK7D4bc.js");
2
- const require_dist = require("./dist-CdRsXAov.js");
2
+ const require_dist = require("./dist-BLf0YjAa.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  let node_fs = require("node:fs");
5
5
  node_fs = require_chunk.__toESM(node_fs, 1);
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../chunk-emK7D4bc.js");
6
- const require_dist = require("../dist-CdRsXAov.js");
7
- const require_node = require("../node-pWHpwpBa.js");
8
- const require_default_detection_model = require("../default-detection-model-2rHeRf0Y.js");
6
+ const require_dist = require("../dist-BLf0YjAa.js");
7
+ const require_node = require("../node-Vwf2PuIT.js");
8
+ const require_default_detection_model = require("../default-detection-model-BZMS04Wn.js");
9
9
  const require_worker_protocol = require("../worker-protocol-C-G8qmye.js");
10
10
  const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
11
11
  const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
@@ -1,6 +1,6 @@
1
- import { An as _enum, Bn as string, C as FailureCounters, D as NativeLeaseAdmissionSchema, E as MOTION_CLOSE_AFTER_MS, Fn as literal, Ft as pipelineRunnerCapability, Hn as EventCategory, In as number, Ln as object, Mn as boolean, Mt as pickDetailCropConvention, Nt as pickNativeLeaseOverride, O as NativeLeaseSettingsSchema, Pn as lazy, Tn as nodePin, _ as DEFAULT_NATIVE_LEASE_SETTINGS, _n as createEvent, dn as errMsg, dt as failureContributionCapability, h as DEFAULT_DETAIL_CROP_CONVENTION, i as BackgroundRunRegistry, jn as array, pn as BaseAddon, tt as deriveDetailCropRect, vn as customAction, yn as defineCustomActions, yt as loadContributionCapability } from "../dist-jy-7xoW5.mjs";
2
- import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-NCge1qZM.mjs";
3
- import { c as macroGateVerdict, d as resolveFrameViewGeometry, g as getStepDefinition, l as rootObjectGate, o as placeDetailStep, r as CustomModelCatalog, s as stepsForElectedPool, u as localFrameRegistry, v as RETIRED_MODEL_IDS } from "../default-detection-model-DATyir0t.mjs";
1
+ import { An as _enum, Bn as string, C as FailureCounters, D as NativeLeaseAdmissionSchema, E as MOTION_CLOSE_AFTER_MS, Fn as literal, Ft as pipelineRunnerCapability, Hn as EventCategory, In as number, Ln as object, Mn as boolean, Mt as pickDetailCropConvention, Nt as pickNativeLeaseOverride, O as NativeLeaseSettingsSchema, Pn as lazy, Tn as nodePin, _ as DEFAULT_NATIVE_LEASE_SETTINGS, _n as createEvent, dn as errMsg, dt as failureContributionCapability, h as DEFAULT_DETAIL_CROP_CONVENTION, i as BackgroundRunRegistry, jn as array, pn as BaseAddon, tt as deriveDetailCropRect, vn as customAction, yn as defineCustomActions, yt as loadContributionCapability } from "../dist-B3_sbBDM.mjs";
2
+ import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-DJFKTJ0B.mjs";
3
+ import { c as macroGateVerdict, d as resolveFrameViewGeometry, g as getStepDefinition, l as rootObjectGate, o as placeDetailStep, r as CustomModelCatalog, s as stepsForElectedPool, u as localFrameRegistry, v as RETIRED_MODEL_IDS } from "../default-detection-model-ClQ1gcZ9.mjs";
4
4
  import { t as isWorkerReply } from "../worker-protocol-D_NzPcnh.mjs";
5
5
  import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
6
6
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
@@ -1,4 +1,4 @@
1
- import { At as parseProcStatus } from "./dist-jy-7xoW5.mjs";
1
+ import { At as parseProcStatus } from "./dist-B3_sbBDM.mjs";
2
2
  import * as fs from "node:fs";
3
3
  import { execFile } from "node:child_process";
4
4
  //#region src/shared/node-topology-platform.ts
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-emK7D4bc.js");
2
- const require_dist = require("./dist-CdRsXAov.js");
2
+ const require_dist = require("./dist-BLf0YjAa.js");
3
3
  let node_fs = require("node:fs");
4
4
  node_fs = require_chunk.__toESM(node_fs);
5
5
  let node_child_process = require("node:child_process");
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../chunk-emK7D4bc.js");
6
- const require_dist = require("../dist-CdRsXAov.js");
7
- const require_node = require("../node-pWHpwpBa.js");
6
+ const require_dist = require("../dist-BLf0YjAa.js");
7
+ const require_node = require("../node-Vwf2PuIT.js");
8
8
  const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
9
9
  const require_restream_intent = require("../restream-intent-7uDNqMKs.js");
10
10
  const require_retire_root_keys = require("../retire-root-keys-Csb8z2f3.js");
@@ -15698,6 +15698,26 @@ function buildPassthroughArgs(a) {
15698
15698
  ];
15699
15699
  }
15700
15700
  //#endregion
15701
+ //#region src/recorder/addon/dial-refusal.ts
15702
+ var METHOD_FAILED = /\bmethod ([A-Z_]+) failed: (\d{3})\b/;
15703
+ function isHandshakeMethod(method) {
15704
+ return method === "OPTIONS" || method === "DESCRIBE" || method === "SETUP" || method === "PLAY";
15705
+ }
15706
+ /** The refusal named in this generation's stderr tail, or `null` when there is none. */
15707
+ function readDialRefusal(stderrTail) {
15708
+ for (let i = stderrTail.length - 1; i >= 0; i--) {
15709
+ const match = METHOD_FAILED.exec(stderrTail[i] ?? "");
15710
+ if (match === null) continue;
15711
+ const method = match[1] ?? "";
15712
+ if (!isHandshakeMethod(method)) return null;
15713
+ return {
15714
+ method,
15715
+ status: Number(match[2])
15716
+ };
15717
+ }
15718
+ return null;
15719
+ }
15720
+ //#endregion
15701
15721
  //#region src/recorder/addon/segment-writer.ts
15702
15722
  /** Max CONSECUTIVE rapid restarts before giving up (reset by a stable run). */
15703
15723
  var MAX_RESTARTS = 10;
@@ -15756,6 +15776,12 @@ var SegmentWriter = class {
15756
15776
  * half-pruned window.
15757
15777
  */
15758
15778
  restartWindow = [];
15779
+ /**
15780
+ * Consecutive generations the source refused at the handshake (D685). Reset
15781
+ * by any generation that was not refused. Only read for the log line — the
15782
+ * rapid breaker is what bounds a source that never comes back.
15783
+ */
15784
+ refusedInARow = 0;
15759
15785
  restartTimer = null;
15760
15786
  startedAt = 0;
15761
15787
  exitWait = null;
@@ -15845,10 +15871,13 @@ var SegmentWriter = class {
15845
15871
  if (this.stopped) return;
15846
15872
  const now = Date.now();
15847
15873
  const ranMs = now - this.startedAt;
15848
- if (ranMs >= STABLE_RUN_MS) this.restarts = 0;
15849
- this.restartWindow = [...this.restartWindow.filter((at) => at > now - RESTART_WINDOW_MS), now];
15874
+ const refusal = termination.reason === "exit" ? readDialRefusal(stderrTail) : null;
15875
+ this.refusedInARow = refusal === null ? 0 : this.refusedInARow + 1;
15876
+ if (ranMs >= STABLE_RUN_MS && refusal === null) this.restarts = 0;
15877
+ const liveWindow = this.restartWindow.filter((at) => at > now - RESTART_WINDOW_MS);
15878
+ this.restartWindow = refusal === null ? [...liveWindow, now] : liveWindow;
15850
15879
  const restartsInWindow = this.restartWindow.length;
15851
- if (termination.reason === "exit") this.deps.logger.warn("SegmentWriter ffmpeg exited", {
15880
+ if (termination.reason === "exit" && refusal === null) this.deps.logger.warn("SegmentWriter ffmpeg exited", {
15852
15881
  tags: { deviceId: this.deps.deviceId },
15853
15882
  meta: {
15854
15883
  outDir: this.cfg.outDir,
@@ -15920,6 +15949,39 @@ var SegmentWriter = class {
15920
15949
  }
15921
15950
  this.restarts++;
15922
15951
  const delayMs = Math.min(RESTART_BASE_MS * 2 ** (this.restarts - 1), RESTART_MAX_MS);
15952
+ if (refusal !== null) this.logDeferredRedial(refusal, delayMs, ranMs, restartsInWindow);
15953
+ else this.logRestarting(termination, delayMs, ranMs, restartsInWindow);
15954
+ this.restartTimer = setTimeout(() => {
15955
+ this.restartTimer = null;
15956
+ this.start();
15957
+ }, delayMs);
15958
+ }
15959
+ /**
15960
+ * A refused dial, named — every one of them, per camera. The FIRST of a run
15961
+ * is a WARN (the source just went away under a live writer); the rest are
15962
+ * the same outage continuing and go out at INFO with the running count.
15963
+ */
15964
+ logDeferredRedial(refusal, delayMs, ranMs, restartsInWindow) {
15965
+ const payload = {
15966
+ tags: { deviceId: this.deps.deviceId },
15967
+ meta: {
15968
+ outDir: this.cfg.outDir,
15969
+ method: refusal.method,
15970
+ status: refusal.status,
15971
+ refusedInARow: this.refusedInARow,
15972
+ attempt: this.restarts,
15973
+ delayMs,
15974
+ ranMs,
15975
+ restartsInWindow
15976
+ }
15977
+ };
15978
+ if (this.refusedInARow === 1) {
15979
+ this.deps.logger.warn("SegmentWriter dial refused — source not published, re-dialling", payload);
15980
+ return;
15981
+ }
15982
+ this.deps.logger.info("SegmentWriter dial still refused — re-dial deferred", payload);
15983
+ }
15984
+ logRestarting(termination, delayMs, ranMs, restartsInWindow) {
15923
15985
  this.deps.logger.info("SegmentWriter restarting", {
15924
15986
  tags: { deviceId: this.deps.deviceId },
15925
15987
  meta: {
@@ -15931,10 +15993,6 @@ var SegmentWriter = class {
15931
15993
  reason: termination.reason
15932
15994
  }
15933
15995
  });
15934
- this.restartTimer = setTimeout(() => {
15935
- this.restartTimer = null;
15936
- this.start();
15937
- }, delayMs);
15938
15996
  }
15939
15997
  stop() {
15940
15998
  this.stopAndWait();