camstack 1.2.130 → 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.
@@ -14522,7 +14522,7 @@ function date4(params) {
14522
14522
  // ../../node_modules/zod/v4/classic/external.js
14523
14523
  config(en_default());
14524
14524
 
14525
- // ../types/dist/sleep-DMghvp8F.mjs
14525
+ // ../types/dist/sleep-ox21Ig4I.mjs
14526
14526
  var WELL_KNOWN_TABS = [
14527
14527
  {
14528
14528
  id: "overview",
@@ -20299,7 +20299,7 @@ var detectionPipelineCapability = {
20299
20299
  var SourceInfoSchema = external_exports.object({
20300
20300
  /** Live dispatch key — mutable when the source system allows rename. */
20301
20301
  id: external_exports.string(),
20302
- /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'frigate'. */
20302
+ /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
20303
20303
  system: external_exports.string(),
20304
20304
  /** Immutable upstream identifier when available (HA `unique_id`, … ).
20305
20305
  * Used to detect rename when `id` changes. */
@@ -24872,7 +24872,7 @@ var NcRuleInputSchema = external_exports.object({
24872
24872
  * The measured seven-person arrival on device 590 spans 110 s with every
24873
24873
  * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
24874
24874
  * idle cutoff holds it as one and ends it when the arrival actually ends.
24875
- * 30 is Frigate's shipped value for the same decision.
24875
+ * 30 s is a widely shipped value for the same decision.
24876
24876
  *
24877
24877
  * ### What it replaces
24878
24878
  *
@@ -26729,6 +26729,12 @@ var ZoneCrossingSchema = external_exports.object({
26729
26729
  /** Zone display name at crossing time (falls back to the id). */
26730
26730
  zoneName: external_exports.string().optional()
26731
26731
  });
26732
+ var ZoneOverlapSchema = external_exports.object({
26733
+ zoneId: external_exports.string(),
26734
+ zoneName: external_exports.string().optional(),
26735
+ /** Percentage of the BOX area inside the zone, 0–100. */
26736
+ overlapPct: external_exports.number()
26737
+ });
26732
26738
  var ObjectEventSchema = external_exports.object({
26733
26739
  ...BaseEventFields,
26734
26740
  kind: external_exports.literal("object"),
@@ -26753,6 +26759,35 @@ var ObjectEventSchema = external_exports.object({
26753
26759
  bbox: BoundingBoxSchema.optional(),
26754
26760
  /** Heavy JSON — omitted in slim projection. */
26755
26761
  zones: external_exports.array(external_exports.string()).readonly().optional(),
26762
+ /**
26763
+ * How far inside each stamped zone the box actually was, as a percentage of
26764
+ * the BOX area.
26765
+ *
26766
+ * Membership alone cannot express "at least a third of it inside", which is
26767
+ * the bar an operator argues with — and the number already existed: the
26768
+ * engine computed it, the pipeline logged it, and then discarded it. It
26769
+ * matters most on the events that carry no track, where a rule has nothing
26770
+ * else to judge by.
26771
+ */
26772
+ zoneOverlaps: external_exports.array(ZoneOverlapSchema).readonly().optional(),
26773
+ /**
26774
+ * Present when this event describes a detection the TRACKER refused, so it
26775
+ * has no track and never will.
26776
+ *
26777
+ * A zone-scoped immediate rule asks "is there an animal in the flowerbed
26778
+ * NOW?"; tracking answers a different question ("is this the same subject as
26779
+ * before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
26780
+ * dog at 0.7729, 100% inside a watched zone, was refused three times in six
26781
+ * seconds with three different candidate ids — seven analysed frames in the
26782
+ * window, the subject in a handful of them, metres apart — and produced no
26783
+ * event at all.
26784
+ *
26785
+ * It is NAMED rather than merely implied by a missing `trackId`: an event
26786
+ * with no track and no reason is indistinguishable from a track whose media
26787
+ * went missing, and a consumer that asks this one for a best shot or a
26788
+ * history is asking for something that never existed.
26789
+ */
26790
+ spawnRefused: external_exports.string().optional(),
26756
26791
  /** Omitted in slim projection. */
26757
26792
  state: TrackStateSchema.optional(),
26758
26793
  /**
@@ -28232,6 +28267,35 @@ var NativeCropResultSchema = external_exports.object({
28232
28267
  */
28233
28268
  tier: external_exports.enum(["native", "ram-fullframe"]).optional()
28234
28269
  });
28270
+ var ParkedFrameKindSchema = external_exports.enum(["keyFrame", "thumbnail"]);
28271
+ var ParkRefusalSchema = external_exports.enum(["handle-gone", "encode-failed"]);
28272
+ var ParkTrackFrameResultSchema = external_exports.discriminatedUnion("parked", [external_exports.object({
28273
+ parked: external_exports.literal(true),
28274
+ /** The node holding the parcel — what a later retrieval must be pinned to. */
28275
+ nodeId: external_exports.string(),
28276
+ width: external_exports.number().int().positive(),
28277
+ height: external_exports.number().int().positive(),
28278
+ /** JPEG bytes the parcel costs on the node. */
28279
+ bytes: external_exports.number().int().nonnegative(),
28280
+ /** Whether this park replaced a parcel already held for the key. */
28281
+ replaced: external_exports.boolean()
28282
+ }), external_exports.object({
28283
+ parked: external_exports.literal(false),
28284
+ nodeId: external_exports.string(),
28285
+ reason: ParkRefusalSchema,
28286
+ /** Age of the handle at the park, on the runner's clock; null if unknown. */
28287
+ handleAgeMs: external_exports.number().nullable(),
28288
+ detail: external_exports.string().optional()
28289
+ })]);
28290
+ var ParkedTrackFrameSchema = external_exports.object({
28291
+ jpeg: external_exports.string(),
28292
+ width: external_exports.number().int().positive(),
28293
+ height: external_exports.number().int().positive(),
28294
+ /** The frame instant the parcel shows (the caller's clock, echoed back). */
28295
+ timestamp: external_exports.number(),
28296
+ /** When the node stored it (the node's clock). */
28297
+ parkedAt: external_exports.number()
28298
+ });
28235
28299
  var DetailParentSchema = external_exports.object({
28236
28300
  bbox: NativeCropBboxSchema,
28237
28301
  className: external_exports.string()
@@ -28477,7 +28541,7 @@ var RunnerCameraConfigSchema = external_exports.object({
28477
28541
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
28478
28542
  * analyzer providers) running on decoded frames in this runner.
28479
28543
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
28480
- * analytics, Frigate motion). The provider emits ProviderMotion
28544
+ * analytics). The provider emits ProviderMotion
28481
28545
  * events; the orchestrator forwards to `reportMotion`.
28482
28546
  */
28483
28547
  motionSources: MotionSourcesSchema.default(["analyzer"]),
@@ -29008,7 +29072,60 @@ var pipelineRunnerCapability = {
29008
29072
  className: external_exports.string(),
29009
29073
  /** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
29010
29074
  sourceDeviceId: external_exports.number()
29011
- }), RunStatelessStepResultSchema, { kind: "mutation" })
29075
+ }), RunStatelessStepResultSchema, { kind: "mutation" }),
29076
+ /**
29077
+ * PARK a frame for a track at the instant it is judged to matter
29078
+ * ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
29079
+ *
29080
+ * The hub's `BestDetectionTracker` — the single "best per track" policy —
29081
+ * concludes a frame is a track's best and calls this on the node that
29082
+ * owns `handle` (`nodePin(handle.nodeId)`), while the handle is young. The
29083
+ * runner cuts `bbox` from the native surface it already holds (a full
29084
+ * frame for `keyFrame`, the caller's subject window for `thumbnail`),
29085
+ * encodes ONE JPEG, and keeps it under `(deviceId, trackId, kind)`. Every
29086
+ * later consumer retrieves by that key (`getParkedTrackFrame`) — a lookup
29087
+ * that cannot miss on age. D52 holds: the rectangle is cut by the runner,
29088
+ * never a pre-cut tile the caller decided. D9/D18 hold: one compressed
29089
+ * encode at a decision point, never a stream.
29090
+ *
29091
+ * Idempotent per `(trackId, kind)`: a later park replaces (the ranking is
29092
+ * the hub's; this adds no second opinion), an out-of-order older instant
29093
+ * is ignored. Bounded per device and per node on the runner
29094
+ * (`parked-frame-store.ts`), oldest-first eviction, never a refusal for
29095
+ * space. A refusal names its reason and is logged on the runner with the
29096
+ * handle's measured age — it is never retried into a loop.
29097
+ */
29098
+ parkTrackFrame: method(external_exports.object({
29099
+ deviceId: external_exports.number(),
29100
+ /** Opaque to the runner — the hub's track id. */
29101
+ trackId: external_exports.string(),
29102
+ kind: ParkedFrameKindSchema,
29103
+ handle: FrameHandleSchema,
29104
+ /** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
29105
+ bbox: NativeCropBboxSchema,
29106
+ /** Width cap for a full-frame park (the `keyFrame` native cap). */
29107
+ maxWidth: external_exports.number().int().positive().optional(),
29108
+ /** The frame instant (caller's clock) — orders parks for one key. */
29109
+ timestamp: external_exports.number()
29110
+ }), ParkTrackFrameResultSchema, { kind: "mutation" }),
29111
+ /**
29112
+ * Retrieve a parked parcel by `(deviceId, trackId, kind)`. Pinned to the
29113
+ * node that answered the park (`ParkTrackFrameResult.nodeId`). `null` means
29114
+ * nothing was parked under that key on this node — never "too old".
29115
+ */
29116
+ getParkedTrackFrame: method(external_exports.object({
29117
+ deviceId: external_exports.number(),
29118
+ trackId: external_exports.string(),
29119
+ kind: ParkedFrameKindSchema
29120
+ }), ParkedTrackFrameSchema.nullable()),
29121
+ /**
29122
+ * Drop every parcel of a track — the hub closed it. Idempotent. A track
29123
+ * whose release is lost ages out on the runner under a hard ceiling.
29124
+ */
29125
+ releaseParkedTrackFrames: method(external_exports.object({
29126
+ deviceId: external_exports.number(),
29127
+ trackId: external_exports.string()
29128
+ }), external_exports.object({ released: external_exports.number().int().nonnegative() }), { kind: "mutation" })
29012
29129
  }
29013
29130
  };
29014
29131
  var CameraPipelineConfigSchema = external_exports.object({
@@ -32606,8 +32723,8 @@ var batteryCapability = {
32606
32723
  /**
32607
32724
  * Runtime-state slice — every provider that registers this cap
32608
32725
  * stores the same shape under `device.runtimeState[battery]`.
32609
- * Cross-provider uniformity: a Reolink Argus, a Frigate sensor
32610
- * proxy, an ONVIF battery cam all read/write the same keys.
32726
+ * Cross-provider uniformity: a Reolink Argus, a sensor proxy,
32727
+ * an ONVIF battery cam all read/write the same keys.
32611
32728
  * Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
32612
32729
  * via `device.runtimeState.getCapState('battery')` regardless of
32613
32730
  * the underlying driver.
@@ -34460,7 +34577,7 @@ var AvailableIntegrationTypeSchema = external_exports.object({
34460
34577
  * Which integration-marker cap the addon declared, so the wizard can
34461
34578
  * branch on CAP — never on addon name. `device-adoption` integrations
34462
34579
  * (Home Assistant, …) route through the broker step (Approach A);
34463
- * `device-provider` integrations (Reolink/Frigate/ONVIF) keep the
34580
+ * `device-provider` integrations (Reolink/ONVIF) keep the
34464
34581
  * legacy config → discovery flow.
34465
34582
  */
34466
34583
  kind: external_exports.enum(["device-adoption", "device-provider"]),
@@ -37714,9 +37831,11 @@ var RecordingManifestSchema = external_exports.object({
37714
37831
  });
37715
37832
  var RecordingDeviceUsageSchema = external_exports.object({
37716
37833
  deviceId: external_exports.number(),
37834
+ /** Bytes the ARCHIVE holds for this camera on this node's resolvable
37835
+ * recordings locations. */
37717
37836
  usedBytes: external_exports.number(),
37718
37837
  /**
37719
- * Start of this camera's OLDEST indexed segment, across every profile and
37838
+ * Start of this camera's OLDEST ARCHIVED segment, across every profile and
37720
37839
  * location — the "Oldest footage" column in Recordings → Storage, and the
37721
37840
  * only honest answer to "is retention actually holding?" per camera.
37722
37841
  *
@@ -37726,7 +37845,24 @@ var RecordingDeviceUsageSchema = external_exports.object({
37726
37845
  * (types) and the addon ship on different trains, and the addon is usually
37727
37846
  * the later of the two.
37728
37847
  */
37729
- oldestMs: external_exports.number().nullable().optional()
37848
+ oldestMs: external_exports.number().nullable().optional(),
37849
+ /** Segments the archive holds for this camera — the "M" beside `usedBytes`.
37850
+ * OPTIONAL for the same train-skew reason as `oldestMs`. */
37851
+ segments: external_exports.number().optional(),
37852
+ /**
37853
+ * RESIDENCY, not the archive: bytes the recorder process currently holds in
37854
+ * its RAM index — the live tail plus the hours a reader hydrated.
37855
+ *
37856
+ * It answers "what can be served without touching the disk", never "how much
37857
+ * footage this camera has". A UI that renders it must label it as such, and
37858
+ * must never total it as storage. OPTIONAL: a recorder predating D418 omits
37859
+ * it, and so does a node whose ledger could not answer.
37860
+ */
37861
+ residentBytes: external_exports.number().optional(),
37862
+ /** The residency counterpart of `oldestMs` — the oldest segment currently in
37863
+ * RAM, which on a healthy recorder is minutes ago and means nothing about
37864
+ * retention. `null` = nothing resident. */
37865
+ residentOldestMs: external_exports.number().nullable().optional()
37730
37866
  });
37731
37867
  var RecordingLocationUsageSchema = external_exports.object({
37732
37868
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
@@ -37760,6 +37896,17 @@ var RecordingStorageUsageSchema = external_exports.object({
37760
37896
  totalUsedBytes: external_exports.number(),
37761
37897
  devices: external_exports.array(RecordingDeviceUsageSchema),
37762
37898
  /**
37899
+ * WHERE `devices[]` came from, so an empty table is never mistaken for empty
37900
+ * disks (D418).
37901
+ *
37902
+ * `archive` = the durable hour ledger answered. `unavailable` = this node
37903
+ * declared no ledger and the recorder REFUSED rather than answering the
37904
+ * question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
37905
+ * zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
37906
+ * and its rows are residency.
37907
+ */
37908
+ devicesRead: external_exports.enum(["archive", "unavailable"]).optional(),
37909
+ /**
37763
37910
  * Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
37764
37911
  * of the payload without it: the hub serves this method through a BAKED
37765
37912
  * router, so a hub whose framework train predates a change to this array
@@ -44528,6 +44675,24 @@ var METHOD_ACCESS_MAP = Object.freeze({
44528
44675
  addonId: null,
44529
44676
  access: "view"
44530
44677
  },
44678
+ "pipelineRunner.getParkedTrackFrame": {
44679
+ capName: "pipeline-runner",
44680
+ capScope: "system",
44681
+ addonId: null,
44682
+ access: "view"
44683
+ },
44684
+ "pipelineRunner.parkTrackFrame": {
44685
+ capName: "pipeline-runner",
44686
+ capScope: "system",
44687
+ addonId: null,
44688
+ access: "create"
44689
+ },
44690
+ "pipelineRunner.releaseParkedTrackFrames": {
44691
+ capName: "pipeline-runner",
44692
+ capScope: "system",
44693
+ addonId: null,
44694
+ access: "create"
44695
+ },
44531
44696
  "pipelineRunner.reportMotion": {
44532
44697
  capName: "pipeline-runner",
44533
44698
  capScope: "system",
@@ -47805,6 +47970,21 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
47805
47970
  form: "single",
47806
47971
  optional: false
47807
47972
  }],
47973
+ "pipelineRunner.getParkedTrackFrame": [{
47974
+ name: "deviceId",
47975
+ form: "single",
47976
+ optional: false
47977
+ }],
47978
+ "pipelineRunner.parkTrackFrame": [{
47979
+ name: "deviceId",
47980
+ form: "single",
47981
+ optional: false
47982
+ }],
47983
+ "pipelineRunner.releaseParkedTrackFrames": [{
47984
+ name: "deviceId",
47985
+ form: "single",
47986
+ optional: false
47987
+ }],
47808
47988
  "pipelineRunner.reportMotion": [{
47809
47989
  name: "deviceId",
47810
47990
  form: "single",
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runDiscover
4
- } from "./chunk-FK6R4ZJQ.js";
4
+ } from "./chunk-LMISNMUF.js";
5
5
  import "./chunk-LMMQX4CK.js";
6
6
 
7
7
  // src/cli.ts
@@ -38,7 +38,7 @@ async function runServe(args) {
38
38
  ...typeof values.data === "string" ? { data: values.data } : {}
39
39
  };
40
40
  Object.assign(process.env, buildServeEnv(opts));
41
- await import("./launcher-O4PI5LJI.js");
41
+ await import("./launcher-G2NZEBWS.js");
42
42
  }
43
43
 
44
44
  // src/commands/agent.ts
@@ -83,7 +83,7 @@ async function runAgent(args) {
83
83
  ...typeof values.port === "string" ? { port: values.port } : {}
84
84
  };
85
85
  Object.assign(process.env, buildAgentEnv(opts));
86
- await import("./launcher-O4PI5LJI.js");
86
+ await import("./launcher-G2NZEBWS.js");
87
87
  }
88
88
 
89
89
  // src/commands/setup.ts
@@ -1130,7 +1130,7 @@ function isUnknown(_value) {
1130
1130
  return true;
1131
1131
  }
1132
1132
  async function resolveServerInteractive(presetNamespace) {
1133
- const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-Q75B3UUE.js");
1133
+ const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-R4IJGYTA.js");
1134
1134
  if (presetNamespace) {
1135
1135
  const spinner4 = clack.spinner();
1136
1136
  spinner4.start(`Discovering hub on LAN (namespace "${presetNamespace}")`);
@@ -5,7 +5,7 @@ import {
5
5
  filterHubNodes,
6
6
  resolveHubFromDiscovered,
7
7
  runDiscover
8
- } from "./chunk-FK6R4ZJQ.js";
8
+ } from "./chunk-LMISNMUF.js";
9
9
  import "./chunk-LMMQX4CK.js";
10
10
  export {
11
11
  DEFAULT_HUB_HTTPS_PORT,