@camstack/types 1.1.44 → 1.1.46

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.
@@ -3422,9 +3422,11 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
3422
3422
  description?: string | undefined;
3423
3423
  icon?: string | undefined;
3424
3424
  }[];
3425
+ inputChannels?: number | undefined;
3425
3426
  inputLayout?: "nchw" | "nhwc" | undefined;
3426
3427
  inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
3427
3428
  preprocessMode?: "letterbox" | "resize" | undefined;
3429
+ postprocessor?: import("@camstack/types").PostprocessorType | undefined;
3428
3430
  faceAlignment?: boolean | undefined;
3429
3431
  extraFiles?: readonly {
3430
3432
  url: string;
@@ -8046,7 +8048,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
8046
8048
  width: number;
8047
8049
  height: number;
8048
8050
  };
8049
- outputFormat: "classification" | "embedding" | "yolo" | "ssd" | "ocr" | "segmentation";
8051
+ outputFormat: "classification" | "yolo" | "ssd" | "embedding" | "ocr" | "segmentation";
8050
8052
  inputLayout?: "nchw" | "nhwc" | undefined;
8051
8053
  inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
8052
8054
  preprocessMode?: "letterbox" | "resize" | undefined;
@@ -8121,9 +8123,11 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
8121
8123
  description?: string | undefined;
8122
8124
  icon?: string | undefined;
8123
8125
  }[];
8126
+ inputChannels?: number | undefined;
8124
8127
  inputLayout?: "nchw" | "nhwc" | undefined;
8125
8128
  inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
8126
8129
  preprocessMode?: "letterbox" | "resize" | undefined;
8130
+ postprocessor?: import("@camstack/types").PostprocessorType | undefined;
8127
8131
  faceAlignment?: boolean | undefined;
8128
8132
  extraFiles?: readonly {
8129
8133
  url: string;
@@ -8226,9 +8230,11 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
8226
8230
  description?: string | undefined;
8227
8231
  icon?: string | undefined;
8228
8232
  }[];
8233
+ inputChannels?: number | undefined;
8229
8234
  inputLayout?: "nchw" | "nhwc" | undefined;
8230
8235
  inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
8231
8236
  preprocessMode?: "letterbox" | "resize" | undefined;
8237
+ postprocessor?: import("@camstack/types").PostprocessorType | undefined;
8232
8238
  faceAlignment?: boolean | undefined;
8233
8239
  extraFiles?: readonly {
8234
8240
  url: string;
@@ -9523,6 +9529,13 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
9523
9529
  importance?: number | undefined;
9524
9530
  bestEventId?: string | undefined;
9525
9531
  importanceReason?: string | undefined;
9532
+ audioLabels?: readonly {
9533
+ label: string;
9534
+ peakScore: number;
9535
+ count: number;
9536
+ firstAt: number;
9537
+ lastAt: number;
9538
+ }[] | undefined;
9526
9539
  }[];
9527
9540
  meta: object;
9528
9541
  }>;
@@ -9573,6 +9586,13 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
9573
9586
  importance?: number | undefined;
9574
9587
  bestEventId?: string | undefined;
9575
9588
  importanceReason?: string | undefined;
9589
+ audioLabels?: readonly {
9590
+ label: string;
9591
+ peakScore: number;
9592
+ count: number;
9593
+ firstAt: number;
9594
+ lastAt: number;
9595
+ }[] | undefined;
9576
9596
  } | null;
9577
9597
  meta: object;
9578
9598
  }>;
@@ -9625,6 +9645,13 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
9625
9645
  importance?: number | undefined;
9626
9646
  bestEventId?: string | undefined;
9627
9647
  importanceReason?: string | undefined;
9648
+ audioLabels?: readonly {
9649
+ label: string;
9650
+ peakScore: number;
9651
+ count: number;
9652
+ firstAt: number;
9653
+ lastAt: number;
9654
+ }[] | undefined;
9628
9655
  }[];
9629
9656
  meta: object;
9630
9657
  }>;
@@ -9953,7 +9980,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
9953
9980
  nodeId: string;
9954
9981
  };
9955
9982
  output: {
9956
- runtimeId: "onnx" | "coreml" | "openvino" | null;
9983
+ runtimeId: "onnx" | "coreml" | "openvino" | "edgetpu" | null;
9957
9984
  device: string | null;
9958
9985
  state: "idle" | "failed" | "ready" | "installing" | "verifying";
9959
9986
  progress?: number | undefined;
@@ -11813,6 +11840,10 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
11813
11840
  npu: {
11814
11841
  type: "apple-ane" | "intel-npu";
11815
11842
  } | null;
11843
+ coral?: {
11844
+ type: "coral-edgetpu";
11845
+ bus?: string | undefined;
11846
+ } | null | undefined;
11816
11847
  };
11817
11848
  scores: readonly {
11818
11849
  runtime: "node" | "python";
@@ -11853,6 +11884,10 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
11853
11884
  npu: {
11854
11885
  type: "apple-ane" | "intel-npu";
11855
11886
  } | null;
11887
+ coral?: {
11888
+ type: "coral-edgetpu";
11889
+ bus?: string | undefined;
11890
+ } | null | undefined;
11856
11891
  };
11857
11892
  meta: object;
11858
11893
  }>;
@@ -15932,6 +15967,23 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
15932
15967
  totalObjects: number;
15933
15968
  byClass: Record<string, number>;
15934
15969
  };
15970
+ stationaryObjects?: readonly {
15971
+ id: string;
15972
+ className: string;
15973
+ bbox: {
15974
+ x: number;
15975
+ y: number;
15976
+ w: number;
15977
+ h: number;
15978
+ };
15979
+ frameWidth: number;
15980
+ frameHeight: number;
15981
+ firstSeenAt: number;
15982
+ becameStationaryAt: number;
15983
+ lastConfirmedAt: number;
15984
+ label?: string | undefined;
15985
+ keyFrameMediaKey?: string | undefined;
15986
+ }[] | undefined;
15935
15987
  } | null;
15936
15988
  meta: object;
15937
15989
  }>;
@@ -19514,9 +19566,11 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
19514
19566
  description?: string | undefined;
19515
19567
  icon?: string | undefined;
19516
19568
  }[];
19569
+ inputChannels?: number | undefined;
19517
19570
  inputLayout?: "nchw" | "nhwc" | undefined;
19518
19571
  inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
19519
19572
  preprocessMode?: "letterbox" | "resize" | undefined;
19573
+ postprocessor?: import("@camstack/types").PostprocessorType | undefined;
19520
19574
  faceAlignment?: boolean | undefined;
19521
19575
  extraFiles?: readonly {
19522
19576
  url: string;
@@ -24138,7 +24192,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
24138
24192
  width: number;
24139
24193
  height: number;
24140
24194
  };
24141
- outputFormat: "classification" | "embedding" | "yolo" | "ssd" | "ocr" | "segmentation";
24195
+ outputFormat: "classification" | "yolo" | "ssd" | "embedding" | "ocr" | "segmentation";
24142
24196
  inputLayout?: "nchw" | "nhwc" | undefined;
24143
24197
  inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
24144
24198
  preprocessMode?: "letterbox" | "resize" | undefined;
@@ -24213,9 +24267,11 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
24213
24267
  description?: string | undefined;
24214
24268
  icon?: string | undefined;
24215
24269
  }[];
24270
+ inputChannels?: number | undefined;
24216
24271
  inputLayout?: "nchw" | "nhwc" | undefined;
24217
24272
  inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
24218
24273
  preprocessMode?: "letterbox" | "resize" | undefined;
24274
+ postprocessor?: import("@camstack/types").PostprocessorType | undefined;
24219
24275
  faceAlignment?: boolean | undefined;
24220
24276
  extraFiles?: readonly {
24221
24277
  url: string;
@@ -24318,9 +24374,11 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
24318
24374
  description?: string | undefined;
24319
24375
  icon?: string | undefined;
24320
24376
  }[];
24377
+ inputChannels?: number | undefined;
24321
24378
  inputLayout?: "nchw" | "nhwc" | undefined;
24322
24379
  inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
24323
24380
  preprocessMode?: "letterbox" | "resize" | undefined;
24381
+ postprocessor?: import("@camstack/types").PostprocessorType | undefined;
24324
24382
  faceAlignment?: boolean | undefined;
24325
24383
  extraFiles?: readonly {
24326
24384
  url: string;
@@ -25615,6 +25673,13 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
25615
25673
  importance?: number | undefined;
25616
25674
  bestEventId?: string | undefined;
25617
25675
  importanceReason?: string | undefined;
25676
+ audioLabels?: readonly {
25677
+ label: string;
25678
+ peakScore: number;
25679
+ count: number;
25680
+ firstAt: number;
25681
+ lastAt: number;
25682
+ }[] | undefined;
25618
25683
  }[];
25619
25684
  meta: object;
25620
25685
  }>;
@@ -25665,6 +25730,13 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
25665
25730
  importance?: number | undefined;
25666
25731
  bestEventId?: string | undefined;
25667
25732
  importanceReason?: string | undefined;
25733
+ audioLabels?: readonly {
25734
+ label: string;
25735
+ peakScore: number;
25736
+ count: number;
25737
+ firstAt: number;
25738
+ lastAt: number;
25739
+ }[] | undefined;
25668
25740
  } | null;
25669
25741
  meta: object;
25670
25742
  }>;
@@ -25717,6 +25789,13 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
25717
25789
  importance?: number | undefined;
25718
25790
  bestEventId?: string | undefined;
25719
25791
  importanceReason?: string | undefined;
25792
+ audioLabels?: readonly {
25793
+ label: string;
25794
+ peakScore: number;
25795
+ count: number;
25796
+ firstAt: number;
25797
+ lastAt: number;
25798
+ }[] | undefined;
25720
25799
  }[];
25721
25800
  meta: object;
25722
25801
  }>;
@@ -26045,7 +26124,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
26045
26124
  nodeId: string;
26046
26125
  };
26047
26126
  output: {
26048
- runtimeId: "onnx" | "coreml" | "openvino" | null;
26127
+ runtimeId: "onnx" | "coreml" | "openvino" | "edgetpu" | null;
26049
26128
  device: string | null;
26050
26129
  state: "idle" | "failed" | "ready" | "installing" | "verifying";
26051
26130
  progress?: number | undefined;
@@ -27905,6 +27984,10 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
27905
27984
  npu: {
27906
27985
  type: "apple-ane" | "intel-npu";
27907
27986
  } | null;
27987
+ coral?: {
27988
+ type: "coral-edgetpu";
27989
+ bus?: string | undefined;
27990
+ } | null | undefined;
27908
27991
  };
27909
27992
  scores: readonly {
27910
27993
  runtime: "node" | "python";
@@ -27945,6 +28028,10 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
27945
28028
  npu: {
27946
28029
  type: "apple-ane" | "intel-npu";
27947
28030
  } | null;
28031
+ coral?: {
28032
+ type: "coral-edgetpu";
28033
+ bus?: string | undefined;
28034
+ } | null | undefined;
27948
28035
  };
27949
28036
  meta: object;
27950
28037
  }>;
@@ -32024,6 +32111,23 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
32024
32111
  totalObjects: number;
32025
32112
  byClass: Record<string, number>;
32026
32113
  };
32114
+ stationaryObjects?: readonly {
32115
+ id: string;
32116
+ className: string;
32117
+ bbox: {
32118
+ x: number;
32119
+ y: number;
32120
+ w: number;
32121
+ h: number;
32122
+ };
32123
+ frameWidth: number;
32124
+ frameHeight: number;
32125
+ firstSeenAt: number;
32126
+ becameStationaryAt: number;
32127
+ lastConfirmedAt: number;
32128
+ label?: string | undefined;
32129
+ keyFrameMediaKey?: string | undefined;
32130
+ }[] | undefined;
32027
32131
  } | null;
32028
32132
  meta: object;
32029
32133
  }>;
package/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-k6I1e98_.js");
2
+ const require_sleep = require("./sleep-Vh_bux78.js");
3
+ const require_event_category = require("./event-category-BXd6yeJi.js");
4
+ const require_enums = require("./enums.js");
3
5
  const require_err_msg = require("./err-msg-COpsHMw2.js");
4
6
  let zod = require("zod");
5
7
  //#region src/health/wiring-health.ts
@@ -156,6 +158,15 @@ var ModelCatalogEntrySchema = zod.z.object({
156
158
  width: zod.z.number(),
157
159
  height: zod.z.number()
158
160
  }),
161
+ /**
162
+ * Channel count of the model input tensor. Omit ⇒ 3 (RGB), the default for
163
+ * every detector / classifier / embedder. Set to 1 for a grayscale CTC text
164
+ * recognizer (EasyOCR VGG plate-OCR: input `[N,1,H,W]`) so the preprocess
165
+ * feeds a single-channel, EasyOCR-normalized tensor instead of the default
166
+ * 3-channel RGB one. Threaded through `PoolModelConfig.inputChannels` to the
167
+ * Python inference pool.
168
+ */
169
+ inputChannels: zod.z.number().int().positive().optional(),
159
170
  labels: zod.z.array(LabelDefinitionSchema).readonly(),
160
171
  inputLayout: zod.z.enum(["nchw", "nhwc"]).optional(),
161
172
  inputNormalization: zod.z.enum([
@@ -165,6 +176,16 @@ var ModelCatalogEntrySchema = zod.z.object({
165
176
  ]).optional(),
166
177
  preprocessMode: zod.z.enum(["letterbox", "resize"]).optional(),
167
178
  /**
179
+ * Per-MODEL postprocessor override. Absent ⇒ the step's own
180
+ * `StepDefinition.postprocessor` applies (the normal case — every model in a
181
+ * step shares its decode). Set it when a step hosts models with DIFFERENT raw
182
+ * output layouts under one slot: e.g. object-detection is `'yolo'` by default,
183
+ * but a Coral SSD MobileNet build emits the `TFLite_Detection_PostProcess`
184
+ * 4-tensor layout and needs `'ssd'`. Threaded into `PoolModelConfig.postprocessor`
185
+ * by the engine factory (`modelEntry.postprocessor ?? def.postprocessor`).
186
+ */
187
+ postprocessor: zod.z.custom().optional(),
188
+ /**
168
189
  * When true, the executor produces a landmark-aligned crop (similarity warp
169
190
  * onto the canonical template) before this step runs, instead of a plain
170
191
  * axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
@@ -1460,16 +1481,6 @@ var DEFAULT_RETENTION = {
1460
1481
  snapshotsDays: 14
1461
1482
  };
1462
1483
  //#endregion
1463
- //#region src/enums/event-source-type.ts
1464
- var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
1465
- EventSourceType["Addon"] = "addon";
1466
- EventSourceType["Core"] = "core";
1467
- EventSourceType["Device"] = "device";
1468
- EventSourceType["Provider"] = "provider";
1469
- EventSourceType["System"] = "system";
1470
- return EventSourceType;
1471
- }({});
1472
- //#endregion
1473
1484
  //#region src/constants.ts
1474
1485
  var HF_REPO = "camstack/camstack-models";
1475
1486
  var HF_BASE_URL = `https://huggingface.co/${HF_REPO}/resolve/main`;
@@ -7613,7 +7624,8 @@ var EngineProvisioningSchema = zod.z.object({
7613
7624
  runtimeId: zod.z.enum([
7614
7625
  "onnx",
7615
7626
  "openvino",
7616
- "coreml"
7627
+ "coreml",
7628
+ "edgetpu"
7617
7629
  ]).nullable(),
7618
7630
  device: zod.z.string().nullable(),
7619
7631
  state: zod.z.enum([
@@ -10654,6 +10666,36 @@ var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
10654
10666
  * with the per-track detail panel and live overlay. */
10655
10667
  trackIds: zod.z.array(zod.z.string()).readonly()
10656
10668
  });
10669
+ /**
10670
+ * A parked ("stationary") object surfaced alongside occupancy — an object that
10671
+ * settled and stopped moving. It is NO LONGER a tracked object (the tracker was
10672
+ * told to forget it so it stops re-spawning tracks/events), but it IS still
10673
+ * physically present, so it keeps counting toward `frame` occupancy and is
10674
+ * listed here so the UI can show it in a dedicated "Stationary" section instead
10675
+ * of flooding the live event feed.
10676
+ */
10677
+ var StationaryObjectSchema = zod.z.object({
10678
+ id: zod.z.string(),
10679
+ className: zod.z.string(),
10680
+ bbox: zod.z.object({
10681
+ x: zod.z.number(),
10682
+ y: zod.z.number(),
10683
+ w: zod.z.number(),
10684
+ h: zod.z.number()
10685
+ }),
10686
+ frameWidth: zod.z.number().int().nonnegative(),
10687
+ frameHeight: zod.z.number().int().nonnegative(),
10688
+ /** When the source track was first seen. */
10689
+ firstSeenAt: zod.z.number().int(),
10690
+ /** When the object was recognised as parked (promotion time). */
10691
+ becameStationaryAt: zod.z.number().int(),
10692
+ /** Last frame a detection confirmed the object is still there. */
10693
+ lastConfirmedAt: zod.z.number().int(),
10694
+ /** Enrichment label carried from the source track (identity / plate). */
10695
+ label: zod.z.string().optional(),
10696
+ /** Native-resolution key-frame media key for the parked object's best image. */
10697
+ keyFrameMediaKey: zod.z.string().optional()
10698
+ });
10657
10699
  var CameraOccupancySnapshotSchema = zod.z.object({
10658
10700
  /** Frame timestamp of the inference result that produced this snapshot. */
10659
10701
  ts: zod.z.number().int(),
@@ -10662,10 +10704,15 @@ var CameraOccupancySnapshotSchema = zod.z.object({
10662
10704
  frameHeight: zod.z.number().int().nonnegative(),
10663
10705
  /** Per-zone breakdown — one entry per defined zone (user + onboard). */
10664
10706
  zones: zod.z.array(ZoneScopeBreakdownSchema).readonly(),
10665
- /** Frame-wide aggregate (everywhere, regardless of zone membership). */
10707
+ /** Frame-wide aggregate (everywhere, regardless of zone membership).
10708
+ * INCLUDES currently-confirmed stationary objects (they are still present). */
10666
10709
  frame: PerScopeBreakdownSchema,
10667
10710
  /** Detections that landed outside every zone. Empty when no zones defined. */
10668
- unzoned: PerScopeBreakdownSchema
10711
+ unzoned: PerScopeBreakdownSchema,
10712
+ /** Parked objects on this camera (additive — absent on legacy snapshots).
10713
+ * Surfaced separately so the UI shows them in a dedicated section rather
10714
+ * than as repeated tracks/events. */
10715
+ stationaryObjects: zod.z.array(StationaryObjectSchema).readonly().optional()
10669
10716
  });
10670
10717
  /**
10671
10718
  * Time-series resolution. The history methods return one bucket per
@@ -15203,6 +15250,64 @@ function looseSchema(schema) {
15203
15250
  const loose = schema.loose;
15204
15251
  return typeof loose === "function" ? loose.call(schema) : schema;
15205
15252
  }
15253
+ /**
15254
+ * Derive a COLLECTION-cap routing `addonId` from a NON-array mutation input
15255
+ * when the caller did NOT supply the top-level `{ addonId }` selector.
15256
+ *
15257
+ * Background: a `scope:'system', mode:'collection'` cap fans its ARRAY methods
15258
+ * (`listTargets`, `listTargetKinds`, …) across every provider, but routes each
15259
+ * single-object method (`send` / CRUD) to ONE provider. The runtime router
15260
+ * strips a TOP-LEVEL `addonId` selector and routes it via
15261
+ * `getProviderByAddonId`; absent that selector it falls through to the FIRST
15262
+ * registered provider — which misroutes (or hard-crashes on a partial provider)
15263
+ * when the target is owned by a DIFFERENT provider. See
15264
+ * `notification-output.cap.ts` (`Target.addonId` / `TargetKind.addonId` are
15265
+ * "stamped by each provider so the concat-fanned catalog stays routable").
15266
+ *
15267
+ * That routing `addonId` is ALREADY carried inside the mutation payload the
15268
+ * caller sends — e.g. `upsertTarget({ target: { …, addonId } })`. This helper
15269
+ * recovers it: it scans the input's DIRECT child object properties (bounded to
15270
+ * one level, first match wins) for a string `addonId`. Mirrors the child-side
15271
+ * `extractArgsAddonId` fallback in `child-cap-dispatch.ts`, which reads a
15272
+ * top-level `addonId` off the raw args; this covers the one-level-nested case
15273
+ * the top-level scan misses.
15274
+ *
15275
+ * Only used for non-array collection methods (array fan-out is never rerouted),
15276
+ * so it can never collapse a catalog aggregation onto a single provider. `null`
15277
+ * / non-object inputs yield `undefined` (fall back to the first provider,
15278
+ * preserving single-provider and id-only-payload back-compat).
15279
+ */
15280
+ function extractNestedAddonId(input) {
15281
+ if (input === null || typeof input !== "object") return void 0;
15282
+ for (const value of Object.values(input)) if (value !== null && typeof value === "object") {
15283
+ const nested = value.addonId;
15284
+ if (typeof nested === "string") return nested;
15285
+ }
15286
+ }
15287
+ /**
15288
+ * True when an OBJECT input schema declares a top-level `addonId` field.
15289
+ *
15290
+ * Such a cap method routes explicitly via the top-level `{ addonId }` selector
15291
+ * (the `llm.generate` / `deleteProfile` posture). The runtime router therefore
15292
+ * MUST NOT also fall back to {@link extractNestedAddonId} for it — that would
15293
+ * let an incidental nested `addonId` (e.g. a key inside a free-form `jsonSchema`
15294
+ * record) hijack routing. Nested recovery is reserved for methods whose input
15295
+ * carries NO top-level selector but embeds the owning `addonId` inside a domain
15296
+ * entity (`upsertTarget({ target: { addonId } })`, `upsertProfile({ profile })`).
15297
+ *
15298
+ * Accepts both Zod 4 (`.shape` / `_def.shape`) and legacy shapes; returns false
15299
+ * for non-object schemas.
15300
+ */
15301
+ function objectInputDeclaresAddonId(schema) {
15302
+ if (schema === null || typeof schema !== "object" && typeof schema !== "function") return false;
15303
+ const direct = schema.shape;
15304
+ const shape = direct !== void 0 && direct !== null ? direct : resolveDefShape(schema._def?.shape);
15305
+ return shape !== void 0 && shape !== null && typeof shape === "object" && Object.prototype.hasOwnProperty.call(shape, "addonId");
15306
+ }
15307
+ /** `_def.shape` may be a thunk (Zod defers object-shape evaluation) or a plain record. */
15308
+ function resolveDefShape(defShape) {
15309
+ return typeof defShape === "function" ? defShape() : defShape;
15310
+ }
15206
15311
  /** Auth level → base-procedure key. `superAdmin` collapses to `admin`. */
15207
15312
  function procedureAuthKey(auth) {
15208
15313
  if (auth === "public") return "public";
@@ -18086,6 +18191,22 @@ var TrackSnapshotSchema = zod.z.object({
18086
18191
  /** MediaStore key; resolve via `getTrackMedia({ trackId })`. */
18087
18192
  mediaKey: zod.z.string()
18088
18193
  });
18194
+ /**
18195
+ * One audio-classification label heard on the track's camera while the
18196
+ * track was alive, aggregated per label. An "episode" is one persisted
18197
+ * audio event (the confident-classification path: score ≥ the device's
18198
+ * `classificationMinScore`, class-change-or-heartbeat coalesced) — NOT
18199
+ * one 32 ms inference chunk, so counts stay human-scaled.
18200
+ */
18201
+ var TrackAudioLabelSchema = zod.z.object({
18202
+ label: zod.z.string(),
18203
+ /** Highest classification score observed across the label's episodes. */
18204
+ peakScore: zod.z.number(),
18205
+ /** Number of coalesced audio-event episodes carrying this label. */
18206
+ count: zod.z.number(),
18207
+ firstAt: zod.z.number(),
18208
+ lastAt: zod.z.number()
18209
+ });
18089
18210
  var TrackSchema = zod.z.object({
18090
18211
  trackId: zod.z.string(),
18091
18212
  deviceId: zod.z.number(),
@@ -18117,7 +18238,11 @@ var TrackSchema = zod.z.object({
18117
18238
  bestEventId: zod.z.string().optional(),
18118
18239
  /** Tag of the importance sub-signal that dominated the score
18119
18240
  * (identity|dwell|proximity|class|confidence|travel|zone). */
18120
- importanceReason: zod.z.string().optional()
18241
+ importanceReason: zod.z.string().optional(),
18242
+ /** Audio-classification labels heard on the camera during the track's
18243
+ * life (score ≥ device `classificationMinScore`), aggregated per label.
18244
+ * Absent on legacy rows / tracks with no confident audio. */
18245
+ audioLabels: zod.z.array(TrackAudioLabelSchema).readonly().optional()
18121
18246
  });
18122
18247
  var BaseEventFields = {
18123
18248
  id: zod.z.string(),
@@ -20392,7 +20517,15 @@ var webrtcSessionCapability = {
20392
20517
  */
20393
20518
  disableIpv6: zod.z.boolean().optional(),
20394
20519
  /** Subscriber attribution. See `createSession` for the contract. */
20395
- consumerAttribution: BrokerConsumerAttributionSchema.optional()
20520
+ consumerAttribution: BrokerConsumerAttributionSchema.optional(),
20521
+ /**
20522
+ * Client-side stream hints (viewport, downlink) — same contract as
20523
+ * `createSession.hints`. Client-offer viewers (the RN viewer's
20524
+ * `WebrtcLiveSession`) negotiate via `handleOffer`, so without this
20525
+ * field their hints were silently stripped by the schema and the
20526
+ * adaptive ladder started blind on the client's display size.
20527
+ */
20528
+ hints: webrtcClientHintsSchema.optional()
20396
20529
  }), zod.z.object({
20397
20530
  sessionId: zod.z.string(),
20398
20531
  sdpAnswer: zod.z.string()
@@ -22752,6 +22885,10 @@ var GpuInfoSchema = zod.z.object({
22752
22885
  memoryMB: zod.z.number().optional()
22753
22886
  });
22754
22887
  var NpuInfoSchema = zod.z.object({ type: zod.z.enum(["apple-ane", "intel-npu"]) });
22888
+ var CoralInfoSchema = zod.z.object({
22889
+ type: zod.z.literal("coral-edgetpu"),
22890
+ bus: zod.z.string().optional()
22891
+ });
22755
22892
  var HardwareInfoSchema = zod.z.object({
22756
22893
  platform: HardwarePlatformSchema,
22757
22894
  arch: HardwareArchSchema,
@@ -22760,7 +22897,8 @@ var HardwareInfoSchema = zod.z.object({
22760
22897
  totalRAM_MB: zod.z.number(),
22761
22898
  availableRAM_MB: zod.z.number(),
22762
22899
  gpu: GpuInfoSchema.nullable(),
22763
- npu: NpuInfoSchema.nullable()
22900
+ npu: NpuInfoSchema.nullable(),
22901
+ coral: CoralInfoSchema.nullable().optional()
22764
22902
  });
22765
22903
  var PlatformScoreSchema = zod.z.object({
22766
22904
  runtime: zod.z.enum(["node", "python"]),
@@ -30099,6 +30237,10 @@ var CPU = {
30099
30237
  value: "cpu",
30100
30238
  label: "CPU"
30101
30239
  };
30240
+ var USB = {
30241
+ value: "usb",
30242
+ label: "Coral USB"
30243
+ };
30102
30244
  var RUNTIMES = [
30103
30245
  {
30104
30246
  id: "onnx",
@@ -30157,6 +30299,12 @@ var RUNTIMES = [
30157
30299
  return out;
30158
30300
  },
30159
30301
  defaultDevice: "all"
30302
+ },
30303
+ {
30304
+ id: "edgetpu",
30305
+ supports: (hw) => hw?.coral != null,
30306
+ devices: () => [USB],
30307
+ defaultDevice: "usb"
30160
30308
  }
30161
30309
  ];
30162
30310
  function def(id) {
@@ -30189,6 +30337,7 @@ function defaultDeviceFor(id) {
30189
30337
  * Delegates to `formatForRuntime` from runtime-mapping.ts.
30190
30338
  */
30191
30339
  function modelFormatForRuntime(id) {
30340
+ if (id === "edgetpu") return "tflite";
30192
30341
  return formatForRuntime(id);
30193
30342
  }
30194
30343
  /**
@@ -30462,12 +30611,12 @@ exports.EncodedPacketSchema = require_sleep.EncodedPacketSchema;
30462
30611
  exports.EnrichedWidgetMetadataSchema = EnrichedWidgetMetadataSchema;
30463
30612
  exports.EnumSensorDateTimeFormatSchema = EnumSensorDateTimeFormatSchema;
30464
30613
  exports.EnumSensorStatusSchema = EnumSensorStatusSchema;
30465
- exports.EventCategory = require_sleep.EventCategory;
30614
+ exports.EventCategory = require_event_category.EventCategory;
30466
30615
  exports.EventEmitterStatusSchema = EventEmitterStatusSchema;
30467
30616
  exports.EventFireSchema = EventFireSchema;
30468
30617
  exports.EventItemSchema = EventItemSchema;
30469
30618
  exports.EventKindSchema = EventKindSchema;
30470
- exports.EventSourceType = EventSourceType;
30619
+ exports.EventSourceType = require_enums.EventSourceType$1;
30471
30620
  exports.ExportSetupFieldSchema = ExportSetupFieldSchema;
30472
30621
  exports.ExportSetupSchema = ExportSetupSchema;
30473
30622
  exports.ExposedDeviceSchema = ExposedDeviceSchema;
@@ -30735,6 +30884,7 @@ exports.SourceInfoSchema = SourceInfoSchema;
30735
30884
  exports.SpatialDetectionSchema = SpatialDetectionSchema;
30736
30885
  exports.SsoBridgeClaimsSchema = SsoBridgeClaimsSchema;
30737
30886
  exports.StartEmbeddedInputSchema = StartEmbeddedInputSchema;
30887
+ exports.StationaryObjectSchema = StationaryObjectSchema;
30738
30888
  exports.StorageAbortUploadInputSchema = AbortUploadInputSchema;
30739
30889
  exports.StorageBeginDownloadInputSchema = BeginDownloadInputSchema;
30740
30890
  exports.StorageBeginDownloadResultSchema = BeginDownloadResultSchema;
@@ -30925,6 +31075,7 @@ exports.event = require_sleep.event;
30925
31075
  exports.eventEmitterCapability = eventEmitterCapability;
30926
31076
  exports.eventsCapability = eventsCapability;
30927
31077
  exports.expandCapMethods = require_sleep.expandCapMethods;
31078
+ exports.extractNestedAddonId = extractNestedAddonId;
30928
31079
  exports.extractSourceInfoFromMetadata = extractSourceInfoFromMetadata;
30929
31080
  exports.faceGalleryCapability = faceGalleryCapability;
30930
31081
  exports.fanControlCapability = fanControlCapability;
@@ -31003,6 +31154,7 @@ exports.notificationOutputCapability = notificationOutputCapability;
31003
31154
  exports.notifierCapability = notifierCapability;
31004
31155
  exports.numericSensorCapability = numericSensorCapability;
31005
31156
  exports.oauthIntegrationCapability = oauthIntegrationCapability;
31157
+ exports.objectInputDeclaresAddonId = objectInputDeclaresAddonId;
31006
31158
  exports.osdCapability = osdCapability;
31007
31159
  exports.parseCameraStreamConfig = parseCameraStreamConfig;
31008
31160
  exports.parseExpression = parseExpression;