@camstack/types 1.2.39 → 1.2.41

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.
@@ -1657,26 +1657,25 @@ export declare const pipelineAnalyticsCapability: {
1657
1657
  timestamp: z.ZodNumber;
1658
1658
  score: z.ZodNumber;
1659
1659
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
1660
- readonly wipeObjectEmbeddings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
1660
+ readonly wipeObjectEmbeddings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
1661
1661
  deleted: z.ZodNumber;
1662
1662
  }, z.core.$strip>, "mutation">;
1663
1663
  readonly rebuildObjectEmbeddings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1664
1664
  deviceId: z.ZodOptional<z.ZodNumber>;
1665
1665
  since: z.ZodOptional<z.ZodNumber>;
1666
1666
  until: z.ZodOptional<z.ZodNumber>;
1667
- cropMargin: z.ZodOptional<z.ZodNumber>;
1668
- square: z.ZodOptional<z.ZodBoolean>;
1669
1667
  maxTracks: z.ZodOptional<z.ZodNumber>;
1670
1668
  }, z.core.$strip>, z.ZodObject<{
1671
1669
  started: z.ZodBoolean;
1672
1670
  alreadyRunning: z.ZodBoolean;
1673
1671
  }, z.core.$strip>, "mutation">;
1674
- readonly getObjectEmbeddingRebuildStatus: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
1672
+ readonly getObjectEmbeddingRebuildStatus: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
1675
1673
  running: z.ZodBoolean;
1676
1674
  scanned: z.ZodNumber;
1677
1675
  rebuilt: z.ZodNumber;
1678
1676
  missingKeyFrame: z.ZodNumber;
1679
1677
  missingBbox: z.ZodNumber;
1678
+ notRunnable: z.ZodNumber;
1680
1679
  failed: z.ZodNumber;
1681
1680
  complete: z.ZodNullable<z.ZodBoolean>;
1682
1681
  startedAtMs: z.ZodNullable<z.ZodNumber>;
@@ -533,12 +533,29 @@ export declare const pipelineRunnerCapability: {
533
533
  * for a single tracked detection. The per-frame plane (`runPipeline`
534
534
  * with `plane: 'frame'`) skips crop children entirely; a track-level
535
535
  * caller invokes this per-track, on its own cadence, instead of on
536
- * every frame. Takes either a `frameHandle` (shm lease/session
537
- * preferred, zero-copy) or a `cropJpeg` fallback when the lease/
538
- * session backing the frame is already gone. `steps` narrows which
539
- * configured children to run (default: all configured children for
540
- * `parent.className`). Returns `null` when neither frame source is
541
- * resolvable (handle evicted and no cropJpeg fallback supplied).
536
+ * every frame. `steps` narrows which configured children to run
537
+ * (default: all configured children for `parent.className`).
538
+ *
539
+ * ## Three pixel sources, and WHO decides the rectangle
540
+ *
541
+ * Tried in this order; the difference between them is not the pixels but
542
+ * which side derives the crop, and confusing the two is how the CLIP index
543
+ * ended up holding two incomparable feature spaces:
544
+ *
545
+ * 1. `frameHandle` — shm lease/session, preferred and zero-copy. **The
546
+ * runner cuts**, applying the cluster crop convention.
547
+ * 2. `frameJpeg` — a FULL FRAME supplied by the caller (the embedding
548
+ * rebuild's stored key frame). **The runner cuts**, applying the same
549
+ * convention to the same function, so a rebuilt vector lands in the same
550
+ * feature space as a live one.
551
+ * 3. `cropJpeg` — an ALREADY-CUT tile. **The caller decided the
552
+ * rectangle**; the runner applies NO padding and no squaring and feeds
553
+ * it to the model verbatim. Only for the lease-miss retry, where the
554
+ * caller holds pixels the runner can no longer reach.
555
+ *
556
+ * Returns `null` when no source resolves (handle evicted and no fallback
557
+ * supplied), when the camera is not attached, or when no enabled step
558
+ * matches — every one of those is logged on the runner with the deviceId.
542
559
  */
543
560
  readonly runDetailSubtree: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
544
561
  deviceId: z.ZodNumber;
@@ -560,6 +577,7 @@ export declare const pipelineRunnerCapability: {
560
577
  nodeId: z.ZodString;
561
578
  slotCount: z.ZodNumber;
562
579
  }, z.core.$strip>>;
580
+ frameJpeg: z.ZodOptional<z.ZodString>;
563
581
  cropJpeg: z.ZodOptional<z.ZodString>;
564
582
  parent: z.ZodObject<{
565
583
  bbox: z.ZodObject<{
@@ -4814,8 +4814,8 @@ export type AppRouter = TrpcCoreRouter<{
4814
4814
  }>;
4815
4815
  wipeObjectEmbeddings: TRPCMutationProcedure<{
4816
4816
  input: {
4817
- nodeId?: string | undefined;
4818
- } | undefined;
4817
+ [x: string]: unknown;
4818
+ } & z.input<typeof pipelineAnalyticsCapability.methods.wipeObjectEmbeddings.input>;
4819
4819
  output: z.infer<typeof pipelineAnalyticsCapability.methods.wipeObjectEmbeddings.output>;
4820
4820
  meta: object;
4821
4821
  }>;
@@ -4828,8 +4828,8 @@ export type AppRouter = TrpcCoreRouter<{
4828
4828
  }>;
4829
4829
  getObjectEmbeddingRebuildStatus: TRPCQueryProcedure<{
4830
4830
  input: {
4831
- nodeId?: string | undefined;
4832
- } | undefined;
4831
+ [x: string]: unknown;
4832
+ } & z.input<typeof pipelineAnalyticsCapability.methods.getObjectEmbeddingRebuildStatus.input>;
4833
4833
  output: z.infer<typeof pipelineAnalyticsCapability.methods.getObjectEmbeddingRebuildStatus.output>;
4834
4834
  meta: object;
4835
4835
  }>;
@@ -8274,14 +8274,14 @@ export type AppRouter = TrpcCoreRouter<{
8274
8274
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
8275
8275
  listCapabilities: import("@trpc/server").TRPCQueryProcedure<{
8276
8276
  input: void;
8277
- output: import("packages/types/dist").CapabilityInfo[];
8277
+ output: import("@camstack/types").CapabilityInfo[];
8278
8278
  meta: object;
8279
8279
  }>;
8280
8280
  getCapability: import("@trpc/server").TRPCQueryProcedure<{
8281
8281
  input: {
8282
8282
  name: string;
8283
8283
  };
8284
- output: import("packages/types/dist").CapabilityInfo | null;
8284
+ output: import("@camstack/types").CapabilityInfo | null;
8285
8285
  meta: object;
8286
8286
  }>;
8287
8287
  setActiveSingleton: import("@trpc/server").TRPCMutationProcedure<{
@@ -8353,14 +8353,14 @@ export type AppRouter = TrpcCoreRouter<{
8353
8353
  }>> & import("@trpc/server").TRPCDecorateCreateRouterOptions<{
8354
8354
  listCapabilities: import("@trpc/server").TRPCQueryProcedure<{
8355
8355
  input: void;
8356
- output: import("packages/types/dist").CapabilityInfo[];
8356
+ output: import("@camstack/types").CapabilityInfo[];
8357
8357
  meta: object;
8358
8358
  }>;
8359
8359
  getCapability: import("@trpc/server").TRPCQueryProcedure<{
8360
8360
  input: {
8361
8361
  name: string;
8362
8362
  };
8363
- output: import("packages/types/dist").CapabilityInfo | null;
8363
+ output: import("@camstack/types").CapabilityInfo | null;
8364
8364
  meta: object;
8365
8365
  }>;
8366
8366
  setActiveSingleton: import("@trpc/server").TRPCMutationProcedure<{
package/dist/index.d.ts CHANGED
@@ -198,6 +198,7 @@ export { BACKEND_TO_FORMAT, DEVICE_BACKEND_TO_FORMAT, deviceBackendToFormat, for
198
198
  export { sleep, sleepCancellable } from './utils/sleep.js';
199
199
  export { decodeVectorBase64, encodeVectorBase64, vectorDimFromBase64, } from './utils/vector-codec.js';
200
200
  export { evaluateZoneRules, type ZoneRuleEvalResult } from './utils/zone-rule-eval.js';
201
+ export { DEFAULT_DETAIL_CROP_CONVENTION, DETAIL_CROP_PADDING_FIELD, DETAIL_CROP_PADDING_KEY, DETAIL_CROP_SECTION_ID, DETAIL_CROP_SQUARE_KEY, type DetailCropConvention, DetailCropConventionSchema, type DetailCropRect, deriveDetailCropRect, type HydratedSettingsSection, type HydratedSettingsView, pickDetailCropConvention, readDetailCropConvention, } from './pipeline/detail-crop.js';
201
202
  export { bindAddonActions } from './helpers/bind-addon-actions.js';
202
203
  export type { DeviceOption, InferenceDeviceDescriptor, RuntimeId, } from './inference/runtime-capabilities.js';
203
204
  export { defaultDeviceFor, enumerateInferenceDevices, modelFormatForRuntime, runtimeDevices, scoreRuntimes, supportedRuntimes, } from './inference/runtime-capabilities.js';
package/dist/index.js CHANGED
@@ -11721,14 +11721,6 @@ var RebuildObjectEmbeddingsInput = zod.z.object({
11721
11721
  deviceId: zod.z.number().optional(),
11722
11722
  since: zod.z.number().optional(),
11723
11723
  until: zod.z.number().optional(),
11724
- /**
11725
- * Fraction added on EACH side of the detection box before cropping.
11726
- * ~0.2 (a 1.4x window) gives CLIP the surroundings it is trained on; 0 is
11727
- * the pixel-tight crop the first implementation used.
11728
- */
11729
- cropMargin: zod.z.number().min(0).max(4).optional(),
11730
- /** Square the window before extracting, so a tall subject is not squashed. */
11731
- square: zod.z.boolean().optional(),
11732
11724
  /** Stop after this many tracks; the result reports whether more remain. */
11733
11725
  maxTracks: zod.z.number().int().positive().optional()
11734
11726
  });
@@ -11763,6 +11755,14 @@ var RebuildStatusSchema = zod.z.object({
11763
11755
  missingKeyFrame: zod.z.number(),
11764
11756
  /** Tracks with no usable detection box. */
11765
11757
  missingBbox: zod.z.number(),
11758
+ /**
11759
+ * Tracks the pipeline REFUSED rather than broke on: the camera is not
11760
+ * attached, or `clip-embedding` is not enabled in its step tree. Separate
11761
+ * from `failed` because the remedy is a configuration change, not an engine
11762
+ * investigation — and because a pass over decommissioned cameras would
11763
+ * otherwise read as a total engine outage.
11764
+ */
11765
+ notRunnable: zod.z.number(),
11766
11766
  failed: zod.z.number(),
11767
11767
  /** Set once a pass ends: true only when EVERYTHING was covered. */
11768
11768
  complete: zod.z.boolean().nullable(),
@@ -12044,7 +12044,7 @@ var pipelineAnalyticsCapability = {
12044
12044
  * `minScore`, sorted descending by score.
12045
12045
  */
12046
12046
  searchObjectEvents: require_sleep.method(SearchObjectEventsInput, zod.z.array(ScoredObjectEventSchema).readonly()),
12047
- wipeObjectEmbeddings: require_sleep.method(zod.z.void(), WipeObjectEmbeddingsResultSchema, {
12047
+ wipeObjectEmbeddings: require_sleep.method(zod.z.object({}), WipeObjectEmbeddingsResultSchema, {
12048
12048
  kind: "mutation",
12049
12049
  auth: "admin"
12050
12050
  }),
@@ -12052,7 +12052,7 @@ var pipelineAnalyticsCapability = {
12052
12052
  kind: "mutation",
12053
12053
  auth: "admin"
12054
12054
  }),
12055
- getObjectEmbeddingRebuildStatus: require_sleep.method(zod.z.void(), RebuildStatusSchema)
12055
+ getObjectEmbeddingRebuildStatus: require_sleep.method(zod.z.object({}), RebuildStatusSchema)
12056
12056
  },
12057
12057
  events: {
12058
12058
  /**
@@ -13382,16 +13382,44 @@ var pipelineRunnerCapability = {
13382
13382
  * for a single tracked detection. The per-frame plane (`runPipeline`
13383
13383
  * with `plane: 'frame'`) skips crop children entirely; a track-level
13384
13384
  * caller invokes this per-track, on its own cadence, instead of on
13385
- * every frame. Takes either a `frameHandle` (shm lease/session
13386
- * preferred, zero-copy) or a `cropJpeg` fallback when the lease/
13387
- * session backing the frame is already gone. `steps` narrows which
13388
- * configured children to run (default: all configured children for
13389
- * `parent.className`). Returns `null` when neither frame source is
13390
- * resolvable (handle evicted and no cropJpeg fallback supplied).
13385
+ * every frame. `steps` narrows which configured children to run
13386
+ * (default: all configured children for `parent.className`).
13387
+ *
13388
+ * ## Three pixel sources, and WHO decides the rectangle
13389
+ *
13390
+ * Tried in this order; the difference between them is not the pixels but
13391
+ * which side derives the crop, and confusing the two is how the CLIP index
13392
+ * ended up holding two incomparable feature spaces:
13393
+ *
13394
+ * 1. `frameHandle` — shm lease/session, preferred and zero-copy. **The
13395
+ * runner cuts**, applying the cluster crop convention.
13396
+ * 2. `frameJpeg` — a FULL FRAME supplied by the caller (the embedding
13397
+ * rebuild's stored key frame). **The runner cuts**, applying the same
13398
+ * convention to the same function, so a rebuilt vector lands in the same
13399
+ * feature space as a live one.
13400
+ * 3. `cropJpeg` — an ALREADY-CUT tile. **The caller decided the
13401
+ * rectangle**; the runner applies NO padding and no squaring and feeds
13402
+ * it to the model verbatim. Only for the lease-miss retry, where the
13403
+ * caller holds pixels the runner can no longer reach.
13404
+ *
13405
+ * Returns `null` when no source resolves (handle evicted and no fallback
13406
+ * supplied), when the camera is not attached, or when no enabled step
13407
+ * matches — every one of those is logged on the runner with the deviceId.
13391
13408
  */
13392
13409
  runDetailSubtree: require_sleep.method(zod.z.object({
13393
13410
  deviceId: zod.z.number(),
13394
13411
  frameHandle: require_sleep.FrameHandleSchema.optional(),
13412
+ /**
13413
+ * FULL FRAME (base64 JPEG). The runner derives the crop rectangle from
13414
+ * `parent.bbox` with the cluster crop convention and cuts it itself —
13415
+ * do NOT pre-crop for this field, that is what `cropJpeg` is.
13416
+ */
13417
+ frameJpeg: zod.z.string().optional(),
13418
+ /**
13419
+ * PRE-CUT tile (base64 JPEG), used verbatim — NO padding is applied.
13420
+ * The fallback when the lease/session backing the frame is gone and the
13421
+ * caller already holds a crop.
13422
+ */
13395
13423
  cropJpeg: zod.z.string().optional(),
13396
13424
  parent: DetailParentSchema,
13397
13425
  steps: zod.z.array(zod.z.string()).optional()
@@ -34881,6 +34909,202 @@ function pointInPolygon(point, polygon) {
34881
34909
  return inside;
34882
34910
  }
34883
34911
  //#endregion
34912
+ //#region src/pipeline/detail-crop.ts
34913
+ /**
34914
+ * THE detail-crop convention — the single derivation of the rectangle a
34915
+ * detail/enrichment step (clip-embedding, face-detection, plate-detection…)
34916
+ * is fed.
34917
+ *
34918
+ * ## Why this is one module and not two constants
34919
+ *
34920
+ * `object-clip` is ONE vector index, and cosine similarity is only meaningful
34921
+ * between vectors produced from the same crop convention. Two encode paths
34922
+ * write into it — the live detail plane and the embedding rebuild — and they
34923
+ * used to derive their crops independently: `DETAIL_CROP_PADDING_RATIO = 0.15`
34924
+ * with no squaring on one side, `DEFAULT_CROP_MARGIN = 0.2` with squaring on
34925
+ * by default on the other. Every rebuild therefore poured a second, silently
34926
+ * incomparable feature space into the index it exists to keep consistent.
34927
+ *
34928
+ * So the rectangle is derived HERE, once, from ONE convention value. Both
34929
+ * paths now reach this function through `pipelineRunner.runDetailSubtree` —
34930
+ * the runner is the only process that cuts (see `detail-subtree.ts`), and the
34931
+ * convention is a cluster-global `pipeline-orchestrator` setting. There is
34932
+ * deliberately no per-node or per-device scope: a per-accelerator crop margin
34933
+ * would reintroduce the same split, merely relocated.
34934
+ *
34935
+ * ## The default IS the live convention
34936
+ *
34937
+ * {@link DEFAULT_DETAIL_CROP_CONVENTION} reproduces what the live path has
34938
+ * been storing (0.15, no squaring). Anything else would invalidate every
34939
+ * vector already in the index on the day it shipped. Changing the convention
34940
+ * is legitimate — that is what the operator knob is for — but it must be
34941
+ * followed by a rebuild, which is now guaranteed to produce crops from this
34942
+ * same function.
34943
+ */
34944
+ /**
34945
+ * Store identity of the convention in `pipeline-orchestrator`'s GLOBAL
34946
+ * (cluster-wide) settings.
34947
+ *
34948
+ * These live here rather than in the orchestrator because the reader is a
34949
+ * different addon — the pipeline runner, over the hub-routed `addon-settings`
34950
+ * cap. Addons never import each other, so a key owned by the writer would have
34951
+ * to be hand-copied by the reader, and a hand-copied key is how a setting
34952
+ * silently stops arriving while both sides still look correct.
34953
+ */
34954
+ var DETAIL_CROP_SECTION_ID = "detail-crop";
34955
+ var DETAIL_CROP_PADDING_KEY = "detailCropPaddingRatio";
34956
+ var DETAIL_CROP_SQUARE_KEY = "detailCropSquare";
34957
+ /**
34958
+ * Operator-tunable crop convention. Single-valued and cluster-wide — see the
34959
+ * module docblock for why it cannot be scoped per node or per device.
34960
+ */
34961
+ var DetailCropConventionSchema = zod.z.object({
34962
+ /**
34963
+ * Fraction of the box's own size added on EACH side before cutting.
34964
+ *
34965
+ * CLIP is trained on natural images WITH surroundings; a pixel-tight crop
34966
+ * removes exactly the context it is strongest on (a dog cut to its outline
34967
+ * is a dark blob). The right value is an empirical question, which is why it
34968
+ * is a setting: 0 / 0.15 / 0.2 / 0.5 are the interesting points.
34969
+ */
34970
+ paddingRatio: zod.z.number().min(0).max(4),
34971
+ /**
34972
+ * Square the window (in PIXELS) before cutting.
34973
+ *
34974
+ * CLIP's input is square, so a tall bbox resized straight to NxN is squashed
34975
+ * — a standing person becomes a shape the model never saw. Squaring costs
34976
+ * extra background, which is context the model wants anyway. Off by default
34977
+ * because the live path has never squared and the stored index reflects that.
34978
+ */
34979
+ square: zod.z.boolean()
34980
+ });
34981
+ /**
34982
+ * The convention in force when nobody has configured one — byte-for-byte the
34983
+ * behaviour of the pre-unification LIVE path (`DETAIL_CROP_PADDING_RATIO`).
34984
+ */
34985
+ var DEFAULT_DETAIL_CROP_CONVENTION = {
34986
+ paddingRatio: .15,
34987
+ square: false
34988
+ };
34989
+ /**
34990
+ * Narrow a FLAT settings record to the convention.
34991
+ *
34992
+ * Per-FIELD fallback, deliberately: a junk padding must not also discard a
34993
+ * valid squaring choice. An absent or invalid value resolves to
34994
+ * {@link DEFAULT_DETAIL_CROP_CONVENTION} — the historical live behaviour —
34995
+ * rather than to a clamped number nobody chose, so a bad read can never
34996
+ * quietly change what the stored vectors mean.
34997
+ */
34998
+ function readDetailCropConvention(config) {
34999
+ const paddingRatio = DetailCropConventionSchema.shape.paddingRatio.safeParse(config[DETAIL_CROP_PADDING_KEY]);
35000
+ const square = DetailCropConventionSchema.shape.square.safeParse(config[DETAIL_CROP_SQUARE_KEY]);
35001
+ return {
35002
+ paddingRatio: paddingRatio.success ? paddingRatio.data : DEFAULT_DETAIL_CROP_CONVENTION.paddingRatio,
35003
+ square: square.success ? square.data : DEFAULT_DETAIL_CROP_CONVENTION.square
35004
+ };
35005
+ }
35006
+ function isHydratedField(entry) {
35007
+ return typeof entry === "object" && entry !== null && "key" in entry;
35008
+ }
35009
+ /**
35010
+ * Extract the convention from an `addon-settings.getGlobalSettings` payload.
35011
+ *
35012
+ * Walks EVERY section rather than looking inside {@link DETAIL_CROP_SECTION_ID}
35013
+ * alone: the keys are unique across the addon's schema, and a section rename
35014
+ * must not silently revert the whole cluster to the default. A `null` payload
35015
+ * (addon mid-boot) is the default convention.
35016
+ */
35017
+ function pickDetailCropConvention(view) {
35018
+ if (view === null) return DEFAULT_DETAIL_CROP_CONVENTION;
35019
+ const flat = {};
35020
+ for (const section of view.sections) for (const entry of section.fields) {
35021
+ if (!isHydratedField(entry) || typeof entry.key !== "string") continue;
35022
+ if (entry.key === "detailCropPaddingRatio" || entry.key === "detailCropSquare") flat[entry.key] = entry.value;
35023
+ }
35024
+ return readDetailCropConvention(flat);
35025
+ }
35026
+ /** Slider bounds for the operator-facing padding knob (orchestrator settings UI). */
35027
+ var DETAIL_CROP_PADDING_FIELD = {
35028
+ min: 0,
35029
+ max: 1,
35030
+ step: .05,
35031
+ default: DEFAULT_DETAIL_CROP_CONVENTION.paddingRatio
35032
+ };
35033
+ /**
35034
+ * Derive the crop rectangle for one parent detection.
35035
+ *
35036
+ * Order: pad by `paddingRatio` of the box's own size → optionally square in
35037
+ * pixel space around the padded centre → keep it inside the frame. Pure:
35038
+ * always returns a new rect and never mutates `bbox`.
35039
+ *
35040
+ * Edge handling differs by mode, on purpose:
35041
+ *
35042
+ * - **unsquared** — TRUNCATED at the frame border, byte-for-byte what the live
35043
+ * path has always done (`padAndClampFrameBbox`). A subject against the edge
35044
+ * gets a slightly smaller window. Changing this would silently reinterpret
35045
+ * every edge-touching vector already in the index.
35046
+ * - **squared** — SLID inward instead, because a truncated square is not
35047
+ * square and squaring exists precisely to preserve the aspect the model
35048
+ * sees. It only shrinks when the square is larger than the frame itself.
35049
+ */
35050
+ function deriveDetailCropRect(bbox, frameWidth, frameHeight, convention) {
35051
+ const padX = convention.paddingRatio * bbox.w;
35052
+ const padY = convention.paddingRatio * bbox.h;
35053
+ const padded = {
35054
+ x: bbox.x - padX,
35055
+ y: bbox.y - padY,
35056
+ w: bbox.w + 2 * padX,
35057
+ h: bbox.h + 2 * padY
35058
+ };
35059
+ return convention.square ? slideInsideFrame(squareInPixels(padded, frameWidth, frameHeight), frameWidth, frameHeight) : truncateToFrame(padded, frameWidth, frameHeight);
35060
+ }
35061
+ /**
35062
+ * Grow the shorter side to the longer one around the window's centre, bounded
35063
+ * by the frame's shorter side — a square larger than the frame cannot exist,
35064
+ * and collapsing to the frame's short side is the most that does.
35065
+ */
35066
+ function squareInPixels(rect, frameWidth, frameHeight) {
35067
+ const side = Math.min(Math.max(rect.w, rect.h), Math.min(frameWidth, frameHeight));
35068
+ const cx = rect.x + rect.w / 2;
35069
+ const cy = rect.y + rect.h / 2;
35070
+ return {
35071
+ x: cx - side / 2,
35072
+ y: cy - side / 2,
35073
+ w: side,
35074
+ h: side
35075
+ };
35076
+ }
35077
+ /**
35078
+ * Cut the window at the frame border — the pre-unification live behaviour,
35079
+ * preserved exactly so unsquared crops keep matching the stored index.
35080
+ */
35081
+ function truncateToFrame(rect, frameWidth, frameHeight) {
35082
+ const x1 = Math.max(0, rect.x);
35083
+ const y1 = Math.max(0, rect.y);
35084
+ const x2 = Math.min(frameWidth, rect.x + rect.w);
35085
+ const y2 = Math.min(frameHeight, rect.y + rect.h);
35086
+ return {
35087
+ x: x1,
35088
+ y: y1,
35089
+ w: Math.max(0, x2 - x1),
35090
+ h: Math.max(0, y2 - y1)
35091
+ };
35092
+ }
35093
+ /**
35094
+ * Move the window inside the frame keeping its extent — used only for squared
35095
+ * windows, where truncating would destroy the squareness that is the point.
35096
+ */
35097
+ function slideInsideFrame(rect, frameWidth, frameHeight) {
35098
+ const w = Math.max(0, Math.min(rect.w, frameWidth));
35099
+ const h = Math.max(0, Math.min(rect.h, frameHeight));
35100
+ return {
35101
+ x: Math.min(Math.max(0, rect.x), Math.max(0, frameWidth - w)),
35102
+ y: Math.min(Math.max(0, rect.y), Math.max(0, frameHeight - h)),
35103
+ w,
35104
+ h
35105
+ };
35106
+ }
35107
+ //#endregion
34884
35108
  //#region src/helpers/bind-addon-actions.ts
34885
35109
  /**
34886
35110
  * Bind an addon's custom-action catalog to its tRPC surface, returning a
@@ -35300,10 +35524,15 @@ exports.DATAPLANE_SECRET_HEADER = require_sleep.DATAPLANE_SECRET_HEADER;
35300
35524
  exports.DEFAULT_ADDON_PLACEMENT = DEFAULT_ADDON_PLACEMENT;
35301
35525
  exports.DEFAULT_AUDIO_ANALYZER_CONFIG = DEFAULT_AUDIO_ANALYZER_CONFIG;
35302
35526
  exports.DEFAULT_DECODER_HWACCEL_CONFIG = DEFAULT_DECODER_HWACCEL_CONFIG;
35527
+ exports.DEFAULT_DETAIL_CROP_CONVENTION = DEFAULT_DETAIL_CROP_CONVENTION;
35303
35528
  exports.DEFAULT_EVENT_COLOR = DEFAULT_EVENT_COLOR;
35304
35529
  exports.DEFAULT_FEATURES = DEFAULT_FEATURES;
35305
35530
  exports.DEFAULT_RETENTION = DEFAULT_RETENTION;
35306
35531
  exports.DEFAULT_SCRUB_THUMBNAIL_PRESET = DEFAULT_SCRUB_THUMBNAIL_PRESET;
35532
+ exports.DETAIL_CROP_PADDING_FIELD = DETAIL_CROP_PADDING_FIELD;
35533
+ exports.DETAIL_CROP_PADDING_KEY = DETAIL_CROP_PADDING_KEY;
35534
+ exports.DETAIL_CROP_SECTION_ID = DETAIL_CROP_SECTION_ID;
35535
+ exports.DETAIL_CROP_SQUARE_KEY = DETAIL_CROP_SQUARE_KEY;
35307
35536
  exports.DEVICE_BACKEND_TO_FORMAT = DEVICE_BACKEND_TO_FORMAT;
35308
35537
  exports.DEVICE_CAP_NAMES = DEVICE_CAP_NAMES;
35309
35538
  exports.DEVICE_PROFILES = DEVICE_PROFILES;
@@ -35323,6 +35552,7 @@ exports.DecodedFrameSchema = require_sleep.DecodedFrameSchema;
35323
35552
  exports.DecoderSessionConfigSchema = DecoderSessionConfigSchema;
35324
35553
  exports.DecoderStatsSchema = DecoderStatsSchema;
35325
35554
  exports.DeleteIntegrationResultSchema = DeleteIntegrationResultSchema;
35555
+ exports.DetailCropConventionSchema = DetailCropConventionSchema;
35326
35556
  exports.DetectionSourceSchema = DetectionSourceSchema;
35327
35557
  exports.DeviceCodeSeveritySchema = DeviceCodeSeveritySchema;
35328
35558
  exports.DeviceConfig = DeviceConfig;
@@ -35915,6 +36145,7 @@ exports.decodeVectorBase64 = decodeVectorBase64;
35915
36145
  exports.decoderCapability = decoderCapability;
35916
36146
  exports.defaultDeviceFor = defaultDeviceFor;
35917
36147
  exports.defineCustomActions = defineCustomActions;
36148
+ exports.deriveDetailCropRect = deriveDetailCropRect;
35918
36149
  exports.deriveRecordingMode = deriveRecordingMode;
35919
36150
  exports.describeModelVariant = describeModelVariant;
35920
36151
  exports.detectionPipelineCapability = detectionPipelineCapability;
@@ -36042,6 +36273,7 @@ exports.parseProfileBrokerId = require_sleep.parseProfileBrokerId;
36042
36273
  exports.parseStreamParamsFormPatch = parseStreamParamsFormPatch;
36043
36274
  exports.petFeederCapability = petFeederCapability;
36044
36275
  exports.pickAccessoryControl = pickAccessoryControl;
36276
+ exports.pickDetailCropConvention = pickDetailCropConvention;
36045
36277
  exports.pickPreferredRtspEntry = pickPreferredRtspEntry;
36046
36278
  exports.pickerForCondition = pickerForCondition;
36047
36279
  exports.pipelineAnalyticsCapability = pipelineAnalyticsCapability;
@@ -36059,6 +36291,7 @@ exports.procedureAuthKey = procedureAuthKey;
36059
36291
  exports.ptzAutotrackCapability = ptzAutotrackCapability;
36060
36292
  exports.ptzCapability = ptzCapability;
36061
36293
  exports.pythonScriptForBackend = pythonScriptForBackend;
36294
+ exports.readDetailCropConvention = readDetailCropConvention;
36062
36295
  exports.readDeviceStateFrom = readDeviceStateFrom;
36063
36296
  exports.readNodePin = require_sleep.readNodePin;
36064
36297
  exports.readinessKey = require_sleep.readinessKey;
package/dist/index.mjs CHANGED
@@ -11720,14 +11720,6 @@ var RebuildObjectEmbeddingsInput = z.object({
11720
11720
  deviceId: z.number().optional(),
11721
11721
  since: z.number().optional(),
11722
11722
  until: z.number().optional(),
11723
- /**
11724
- * Fraction added on EACH side of the detection box before cropping.
11725
- * ~0.2 (a 1.4x window) gives CLIP the surroundings it is trained on; 0 is
11726
- * the pixel-tight crop the first implementation used.
11727
- */
11728
- cropMargin: z.number().min(0).max(4).optional(),
11729
- /** Square the window before extracting, so a tall subject is not squashed. */
11730
- square: z.boolean().optional(),
11731
11723
  /** Stop after this many tracks; the result reports whether more remain. */
11732
11724
  maxTracks: z.number().int().positive().optional()
11733
11725
  });
@@ -11762,6 +11754,14 @@ var RebuildStatusSchema = z.object({
11762
11754
  missingKeyFrame: z.number(),
11763
11755
  /** Tracks with no usable detection box. */
11764
11756
  missingBbox: z.number(),
11757
+ /**
11758
+ * Tracks the pipeline REFUSED rather than broke on: the camera is not
11759
+ * attached, or `clip-embedding` is not enabled in its step tree. Separate
11760
+ * from `failed` because the remedy is a configuration change, not an engine
11761
+ * investigation — and because a pass over decommissioned cameras would
11762
+ * otherwise read as a total engine outage.
11763
+ */
11764
+ notRunnable: z.number(),
11765
11765
  failed: z.number(),
11766
11766
  /** Set once a pass ends: true only when EVERYTHING was covered. */
11767
11767
  complete: z.boolean().nullable(),
@@ -12043,7 +12043,7 @@ var pipelineAnalyticsCapability = {
12043
12043
  * `minScore`, sorted descending by score.
12044
12044
  */
12045
12045
  searchObjectEvents: method(SearchObjectEventsInput, z.array(ScoredObjectEventSchema).readonly()),
12046
- wipeObjectEmbeddings: method(z.void(), WipeObjectEmbeddingsResultSchema, {
12046
+ wipeObjectEmbeddings: method(z.object({}), WipeObjectEmbeddingsResultSchema, {
12047
12047
  kind: "mutation",
12048
12048
  auth: "admin"
12049
12049
  }),
@@ -12051,7 +12051,7 @@ var pipelineAnalyticsCapability = {
12051
12051
  kind: "mutation",
12052
12052
  auth: "admin"
12053
12053
  }),
12054
- getObjectEmbeddingRebuildStatus: method(z.void(), RebuildStatusSchema)
12054
+ getObjectEmbeddingRebuildStatus: method(z.object({}), RebuildStatusSchema)
12055
12055
  },
12056
12056
  events: {
12057
12057
  /**
@@ -13381,16 +13381,44 @@ var pipelineRunnerCapability = {
13381
13381
  * for a single tracked detection. The per-frame plane (`runPipeline`
13382
13382
  * with `plane: 'frame'`) skips crop children entirely; a track-level
13383
13383
  * caller invokes this per-track, on its own cadence, instead of on
13384
- * every frame. Takes either a `frameHandle` (shm lease/session
13385
- * preferred, zero-copy) or a `cropJpeg` fallback when the lease/
13386
- * session backing the frame is already gone. `steps` narrows which
13387
- * configured children to run (default: all configured children for
13388
- * `parent.className`). Returns `null` when neither frame source is
13389
- * resolvable (handle evicted and no cropJpeg fallback supplied).
13384
+ * every frame. `steps` narrows which configured children to run
13385
+ * (default: all configured children for `parent.className`).
13386
+ *
13387
+ * ## Three pixel sources, and WHO decides the rectangle
13388
+ *
13389
+ * Tried in this order; the difference between them is not the pixels but
13390
+ * which side derives the crop, and confusing the two is how the CLIP index
13391
+ * ended up holding two incomparable feature spaces:
13392
+ *
13393
+ * 1. `frameHandle` — shm lease/session, preferred and zero-copy. **The
13394
+ * runner cuts**, applying the cluster crop convention.
13395
+ * 2. `frameJpeg` — a FULL FRAME supplied by the caller (the embedding
13396
+ * rebuild's stored key frame). **The runner cuts**, applying the same
13397
+ * convention to the same function, so a rebuilt vector lands in the same
13398
+ * feature space as a live one.
13399
+ * 3. `cropJpeg` — an ALREADY-CUT tile. **The caller decided the
13400
+ * rectangle**; the runner applies NO padding and no squaring and feeds
13401
+ * it to the model verbatim. Only for the lease-miss retry, where the
13402
+ * caller holds pixels the runner can no longer reach.
13403
+ *
13404
+ * Returns `null` when no source resolves (handle evicted and no fallback
13405
+ * supplied), when the camera is not attached, or when no enabled step
13406
+ * matches — every one of those is logged on the runner with the deviceId.
13390
13407
  */
13391
13408
  runDetailSubtree: method(z.object({
13392
13409
  deviceId: z.number(),
13393
13410
  frameHandle: FrameHandleSchema.optional(),
13411
+ /**
13412
+ * FULL FRAME (base64 JPEG). The runner derives the crop rectangle from
13413
+ * `parent.bbox` with the cluster crop convention and cuts it itself —
13414
+ * do NOT pre-crop for this field, that is what `cropJpeg` is.
13415
+ */
13416
+ frameJpeg: z.string().optional(),
13417
+ /**
13418
+ * PRE-CUT tile (base64 JPEG), used verbatim — NO padding is applied.
13419
+ * The fallback when the lease/session backing the frame is gone and the
13420
+ * caller already holds a crop.
13421
+ */
13394
13422
  cropJpeg: z.string().optional(),
13395
13423
  parent: DetailParentSchema,
13396
13424
  steps: z.array(z.string()).optional()
@@ -34880,6 +34908,202 @@ function pointInPolygon(point, polygon) {
34880
34908
  return inside;
34881
34909
  }
34882
34910
  //#endregion
34911
+ //#region src/pipeline/detail-crop.ts
34912
+ /**
34913
+ * THE detail-crop convention — the single derivation of the rectangle a
34914
+ * detail/enrichment step (clip-embedding, face-detection, plate-detection…)
34915
+ * is fed.
34916
+ *
34917
+ * ## Why this is one module and not two constants
34918
+ *
34919
+ * `object-clip` is ONE vector index, and cosine similarity is only meaningful
34920
+ * between vectors produced from the same crop convention. Two encode paths
34921
+ * write into it — the live detail plane and the embedding rebuild — and they
34922
+ * used to derive their crops independently: `DETAIL_CROP_PADDING_RATIO = 0.15`
34923
+ * with no squaring on one side, `DEFAULT_CROP_MARGIN = 0.2` with squaring on
34924
+ * by default on the other. Every rebuild therefore poured a second, silently
34925
+ * incomparable feature space into the index it exists to keep consistent.
34926
+ *
34927
+ * So the rectangle is derived HERE, once, from ONE convention value. Both
34928
+ * paths now reach this function through `pipelineRunner.runDetailSubtree` —
34929
+ * the runner is the only process that cuts (see `detail-subtree.ts`), and the
34930
+ * convention is a cluster-global `pipeline-orchestrator` setting. There is
34931
+ * deliberately no per-node or per-device scope: a per-accelerator crop margin
34932
+ * would reintroduce the same split, merely relocated.
34933
+ *
34934
+ * ## The default IS the live convention
34935
+ *
34936
+ * {@link DEFAULT_DETAIL_CROP_CONVENTION} reproduces what the live path has
34937
+ * been storing (0.15, no squaring). Anything else would invalidate every
34938
+ * vector already in the index on the day it shipped. Changing the convention
34939
+ * is legitimate — that is what the operator knob is for — but it must be
34940
+ * followed by a rebuild, which is now guaranteed to produce crops from this
34941
+ * same function.
34942
+ */
34943
+ /**
34944
+ * Store identity of the convention in `pipeline-orchestrator`'s GLOBAL
34945
+ * (cluster-wide) settings.
34946
+ *
34947
+ * These live here rather than in the orchestrator because the reader is a
34948
+ * different addon — the pipeline runner, over the hub-routed `addon-settings`
34949
+ * cap. Addons never import each other, so a key owned by the writer would have
34950
+ * to be hand-copied by the reader, and a hand-copied key is how a setting
34951
+ * silently stops arriving while both sides still look correct.
34952
+ */
34953
+ var DETAIL_CROP_SECTION_ID = "detail-crop";
34954
+ var DETAIL_CROP_PADDING_KEY = "detailCropPaddingRatio";
34955
+ var DETAIL_CROP_SQUARE_KEY = "detailCropSquare";
34956
+ /**
34957
+ * Operator-tunable crop convention. Single-valued and cluster-wide — see the
34958
+ * module docblock for why it cannot be scoped per node or per device.
34959
+ */
34960
+ var DetailCropConventionSchema = z.object({
34961
+ /**
34962
+ * Fraction of the box's own size added on EACH side before cutting.
34963
+ *
34964
+ * CLIP is trained on natural images WITH surroundings; a pixel-tight crop
34965
+ * removes exactly the context it is strongest on (a dog cut to its outline
34966
+ * is a dark blob). The right value is an empirical question, which is why it
34967
+ * is a setting: 0 / 0.15 / 0.2 / 0.5 are the interesting points.
34968
+ */
34969
+ paddingRatio: z.number().min(0).max(4),
34970
+ /**
34971
+ * Square the window (in PIXELS) before cutting.
34972
+ *
34973
+ * CLIP's input is square, so a tall bbox resized straight to NxN is squashed
34974
+ * — a standing person becomes a shape the model never saw. Squaring costs
34975
+ * extra background, which is context the model wants anyway. Off by default
34976
+ * because the live path has never squared and the stored index reflects that.
34977
+ */
34978
+ square: z.boolean()
34979
+ });
34980
+ /**
34981
+ * The convention in force when nobody has configured one — byte-for-byte the
34982
+ * behaviour of the pre-unification LIVE path (`DETAIL_CROP_PADDING_RATIO`).
34983
+ */
34984
+ var DEFAULT_DETAIL_CROP_CONVENTION = {
34985
+ paddingRatio: .15,
34986
+ square: false
34987
+ };
34988
+ /**
34989
+ * Narrow a FLAT settings record to the convention.
34990
+ *
34991
+ * Per-FIELD fallback, deliberately: a junk padding must not also discard a
34992
+ * valid squaring choice. An absent or invalid value resolves to
34993
+ * {@link DEFAULT_DETAIL_CROP_CONVENTION} — the historical live behaviour —
34994
+ * rather than to a clamped number nobody chose, so a bad read can never
34995
+ * quietly change what the stored vectors mean.
34996
+ */
34997
+ function readDetailCropConvention(config) {
34998
+ const paddingRatio = DetailCropConventionSchema.shape.paddingRatio.safeParse(config[DETAIL_CROP_PADDING_KEY]);
34999
+ const square = DetailCropConventionSchema.shape.square.safeParse(config[DETAIL_CROP_SQUARE_KEY]);
35000
+ return {
35001
+ paddingRatio: paddingRatio.success ? paddingRatio.data : DEFAULT_DETAIL_CROP_CONVENTION.paddingRatio,
35002
+ square: square.success ? square.data : DEFAULT_DETAIL_CROP_CONVENTION.square
35003
+ };
35004
+ }
35005
+ function isHydratedField(entry) {
35006
+ return typeof entry === "object" && entry !== null && "key" in entry;
35007
+ }
35008
+ /**
35009
+ * Extract the convention from an `addon-settings.getGlobalSettings` payload.
35010
+ *
35011
+ * Walks EVERY section rather than looking inside {@link DETAIL_CROP_SECTION_ID}
35012
+ * alone: the keys are unique across the addon's schema, and a section rename
35013
+ * must not silently revert the whole cluster to the default. A `null` payload
35014
+ * (addon mid-boot) is the default convention.
35015
+ */
35016
+ function pickDetailCropConvention(view) {
35017
+ if (view === null) return DEFAULT_DETAIL_CROP_CONVENTION;
35018
+ const flat = {};
35019
+ for (const section of view.sections) for (const entry of section.fields) {
35020
+ if (!isHydratedField(entry) || typeof entry.key !== "string") continue;
35021
+ if (entry.key === "detailCropPaddingRatio" || entry.key === "detailCropSquare") flat[entry.key] = entry.value;
35022
+ }
35023
+ return readDetailCropConvention(flat);
35024
+ }
35025
+ /** Slider bounds for the operator-facing padding knob (orchestrator settings UI). */
35026
+ var DETAIL_CROP_PADDING_FIELD = {
35027
+ min: 0,
35028
+ max: 1,
35029
+ step: .05,
35030
+ default: DEFAULT_DETAIL_CROP_CONVENTION.paddingRatio
35031
+ };
35032
+ /**
35033
+ * Derive the crop rectangle for one parent detection.
35034
+ *
35035
+ * Order: pad by `paddingRatio` of the box's own size → optionally square in
35036
+ * pixel space around the padded centre → keep it inside the frame. Pure:
35037
+ * always returns a new rect and never mutates `bbox`.
35038
+ *
35039
+ * Edge handling differs by mode, on purpose:
35040
+ *
35041
+ * - **unsquared** — TRUNCATED at the frame border, byte-for-byte what the live
35042
+ * path has always done (`padAndClampFrameBbox`). A subject against the edge
35043
+ * gets a slightly smaller window. Changing this would silently reinterpret
35044
+ * every edge-touching vector already in the index.
35045
+ * - **squared** — SLID inward instead, because a truncated square is not
35046
+ * square and squaring exists precisely to preserve the aspect the model
35047
+ * sees. It only shrinks when the square is larger than the frame itself.
35048
+ */
35049
+ function deriveDetailCropRect(bbox, frameWidth, frameHeight, convention) {
35050
+ const padX = convention.paddingRatio * bbox.w;
35051
+ const padY = convention.paddingRatio * bbox.h;
35052
+ const padded = {
35053
+ x: bbox.x - padX,
35054
+ y: bbox.y - padY,
35055
+ w: bbox.w + 2 * padX,
35056
+ h: bbox.h + 2 * padY
35057
+ };
35058
+ return convention.square ? slideInsideFrame(squareInPixels(padded, frameWidth, frameHeight), frameWidth, frameHeight) : truncateToFrame(padded, frameWidth, frameHeight);
35059
+ }
35060
+ /**
35061
+ * Grow the shorter side to the longer one around the window's centre, bounded
35062
+ * by the frame's shorter side — a square larger than the frame cannot exist,
35063
+ * and collapsing to the frame's short side is the most that does.
35064
+ */
35065
+ function squareInPixels(rect, frameWidth, frameHeight) {
35066
+ const side = Math.min(Math.max(rect.w, rect.h), Math.min(frameWidth, frameHeight));
35067
+ const cx = rect.x + rect.w / 2;
35068
+ const cy = rect.y + rect.h / 2;
35069
+ return {
35070
+ x: cx - side / 2,
35071
+ y: cy - side / 2,
35072
+ w: side,
35073
+ h: side
35074
+ };
35075
+ }
35076
+ /**
35077
+ * Cut the window at the frame border — the pre-unification live behaviour,
35078
+ * preserved exactly so unsquared crops keep matching the stored index.
35079
+ */
35080
+ function truncateToFrame(rect, frameWidth, frameHeight) {
35081
+ const x1 = Math.max(0, rect.x);
35082
+ const y1 = Math.max(0, rect.y);
35083
+ const x2 = Math.min(frameWidth, rect.x + rect.w);
35084
+ const y2 = Math.min(frameHeight, rect.y + rect.h);
35085
+ return {
35086
+ x: x1,
35087
+ y: y1,
35088
+ w: Math.max(0, x2 - x1),
35089
+ h: Math.max(0, y2 - y1)
35090
+ };
35091
+ }
35092
+ /**
35093
+ * Move the window inside the frame keeping its extent — used only for squared
35094
+ * windows, where truncating would destroy the squareness that is the point.
35095
+ */
35096
+ function slideInsideFrame(rect, frameWidth, frameHeight) {
35097
+ const w = Math.max(0, Math.min(rect.w, frameWidth));
35098
+ const h = Math.max(0, Math.min(rect.h, frameHeight));
35099
+ return {
35100
+ x: Math.min(Math.max(0, rect.x), Math.max(0, frameWidth - w)),
35101
+ y: Math.min(Math.max(0, rect.y), Math.max(0, frameHeight - h)),
35102
+ w,
35103
+ h
35104
+ };
35105
+ }
35106
+ //#endregion
34883
35107
  //#region src/helpers/bind-addon-actions.ts
34884
35108
  /**
34885
35109
  * Bind an addon's custom-action catalog to its tRPC surface, returning a
@@ -35131,4 +35355,4 @@ function enumerateInferenceDevices(hw) {
35131
35355
  return out;
35132
35356
  }
35133
35357
  //#endregion
35134
- export { ACCESSORY_LABEL, ALL_CAPABILITY_DEFINITIONS, APPLE_SA_TO_MACRO, AUDIO_BACKEND_CHOICES, AUDIO_MACRO_LABELS, AccessoriesStatusSchema, AccessoryKind, AddBrokerInputSchema, AddonAutoUpdateSchema, AddonListItemSchema, AddonPageDeclarationSchema, AddonPageInfoSchema, AdoptInputSchema as AdoptionAdoptInputSchema, AdoptResultSchema as AdoptionAdoptResultSchema, AdoptionFilterSchema, GetCandidateInputSchema as AdoptionGetCandidateInputSchema, ListCandidatesInputSchema as AdoptionListCandidatesInputSchema, ListCandidatesOutputSchema as AdoptionListCandidatesOutputSchema, ReleaseInputSchema as AdoptionReleaseInputSchema, AdoptionStatusSchema, AgentLoadSummarySchema, AirQualitySensorStatusSchema, AlarmArmModeSchema, AlarmPanelStatusSchema, AlarmStateSchema, AlertSchema, AlertSeveritySchema, AlertSourceSchema, AlertStatusSchema, AmbientLightSensorStatusSchema, ApiKeyRecordSchema, ApiKeySummarySchema, ArchiveEntrySchema, ArchiveManifestSchema, AttachmentMediaTypeSchema, AttachmentSchema, AudioAnalysisResultSchema, AudioAnalysisSettingsSchema, AudioChunkInputSchema, AudioClassSummarySchema, AudioClassificationLabelSchema, AudioClassificationResultSchema, AudioCodecInfoSchema, AudioDecodeSessionConfigSchema, AudioEncodeSchema, AudioEncodeSessionConfigSchema, AudioEncodedChunkSchema, AudioEventSchema, AudioLevelSchema, AudioMetricsHistoryPointSchema, AudioMetricsHistorySchema, AudioMetricsSnapshotSchema, AudioPcmChunkSchema, AuthResultSchema, AutoUpdateSettingsSchema, AutomationControlStatusSchema, AvailableIntegrationTypeSchema, BACKEND_TO_FORMAT, BATTERY_DEVICE_PROFILE, BacklightModeSchema, BackupDestinationInfoSchema, BackupEntrySchema, BaseAddon, BaseDevice, BaseDeviceProvider, BatteryStatusSchema, BinaryStatusSchema, BoundingBoxSchema, BrightnessStatusSchema, AddInputSchema as BrokerAddInputSchema, BrokerAudioClientSchema, BrokerClientsSchema, BrokerConnectionDetailsSchema, BrokerConsumerAttributionSchema, BrokerConsumerKindSchema, BrokerDecodedClientSchema, BrokerEncodedClientSchema, GetStateInputSchema as BrokerGetStateInputSchema, BrokerInfoSchema, BrokerProviderInfoSchema, PublishInputSchema as BrokerPublishInputSchema, RegistryStatusSchema as BrokerRegistryStatusSchema, BrokerRtspClientSchema, BrokerStatsSchema, BrokerStatusEnum, BrokerStatusSchema, SubscribeInputSchema as BrokerSubscribeInputSchema, SubscribeResultSchema as BrokerSubscribeResultSchema, TestConnectionResultSchema as BrokerTestConnectionResultSchema, UnsubscribeInputSchema as BrokerUnsubscribeInputSchema, CAM_PROFILE_ORDER, CAPABILITY_NAMES, CAPABILITY_ROUTER_KEYS, CAP_NAMES_WITH_STATUS, CAP_NODE_PIN_CONTEXT_KEY, CAP_PROVIDER_KIND_MAP, COCO_80_LABELS, COCO_TO_MACRO, CamProfileSchema, CamStreamDescriptorSchema, CamStreamKindSchema, CamStreamResolutionSchema, CameraAssignmentStatusSchema, CameraAudioStatusSchema, CameraBrokerProfileSchema, CameraBrokerStatusSchema, CameraCredentialsSchema, CameraCredentialsStatusSchema, CameraDecoderShmSchema, CameraDecoderStatusSchema, CameraDetectionPhaseSchema, CameraDetectionProvisioningSchema, CameraDetectionProvisioningStateSchema, CameraDetectionStatusSchema, CameraMetricsSchema, CameraMetricsWithDeviceIdSchema, CameraMotionStatusSchema, CameraRecordingModeSchema, CameraRecordingStatusSchema, CameraSourceStatusSchema, CameraSourceStreamSchema, CameraStatusSchema, CameraStreamSchema, CandidateQueryFilterSchema, CapScopeSchema, CapabilityBindingsSchema, CarbonMonoxideStatusSchema, ChargingStatus, ClientNetworkStatsSchema, ClimateControlStatusSchema, ClipPlaybackSchema, ClipSchema, ClusterAddonNodeDeploymentSchema, ClusterAddonStatusEntrySchema, CollectionColumnSchema, CollectionIndexSchema, ColorStatusSchema, ConfigEntrySchema, ConfigSectionWithValuesSchema, ConfigTabDeclarationSchema, ConnectivityStatusSchema, ConsumableItemSchema, ConsumablesStatusSchema, ContactStatusSchema, ControlKindSchema, ControlStatusSchema, ConvertArtifactSchema, ConvertResultSchema, ConvertTargetSchema, CoreBlockCompileResultSchema, CoreBlockInputSchema, CoreBlockPlacementSchema, CoreBlockSchema, CoreBlockStatusSchema, CoverStateSchema, CoverStatusSchema, CreateApiKeyInputSchema, CreateApiKeyResultSchema, CreateIntegrationInputSchema, CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, CreateUserInputSchema, CustomActionInputSchema, CustomModelDescriptorSchema, DATAPLANE_SECRET_HEADER, DEFAULT_ADDON_PLACEMENT, DEFAULT_AUDIO_ANALYZER_CONFIG, DEFAULT_DECODER_HWACCEL_CONFIG, DEFAULT_EVENT_COLOR, DEFAULT_FEATURES, DEFAULT_RETENTION, DEFAULT_SCRUB_THUMBNAIL_PRESET, DEVICE_BACKEND_TO_FORMAT, DEVICE_CAP_NAMES, DEVICE_PROFILES, DEVICE_SCOPED_CAPS, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATE_READERS, DEVICE_STATUS_METHOD, DEVICE_TYPE_CONTROL_KIND, DEVICE_TYPE_INFO, EngineInfoSchema as DataStoreEngineInfoSchema, DayNightModeSchema, DayNightOptionsSchema, DayNightSettingsPatchSchema, DayNightStatusSchema, DecodedAudioChunkSchema, DecodedFrameSchema, DecoderSessionConfigSchema, DecoderStatsSchema, DeleteIntegrationResultSchema, DetectionSourceSchema, DeviceCodeSeveritySchema, DeviceConfig, DeviceDiscoveryStatusSchema, ExposeInputSchema as DeviceExportExposeInputSchema, DeviceExportStatusSchema, UnexposeInputSchema as DeviceExportUnexposeInputSchema, DeviceFeature, DeviceInfoSchema, DeviceLinkModeSchema, DeviceNetworkStatsSchema, DeviceRole, DeviceRuntimeState, DeviceStatusSchema, DeviceType, DiscoveredChildDeviceSchema, DiscoveredChildStatusSchema, DiscoveredDeviceSchema, DiscoveredTargetSchema, DisposerChain, DoorbellPressEventSchema, DoorbellStatusSchema, EVENTFUL_CAP_NAMES, EVENT_KIND_BY_CAP, EVENT_PAD_MS, EVENT_TAXONOMY, EXPRESSION_BUILTINS, EXPRESSION_BUILTIN_NAMES, EXPRESSION_COMPILE_CACHE_CAPACITY, EXPRESSION_IDENTIFIER_RE, EXPRESSION_INJECTED_NOW, ElementConfigStore, EmbeddingInfoSchema, EmbeddingResultSchema, EncodeProfileSchema, EncodedPacketSchema, EnrichedWidgetMetadataSchema, EnumSensorDateTimeFormatSchema, EnumSensorStatusSchema, EventCategory, EventEmitterStatusSchema, EventFireSchema, EventItemSchema, EventKindCategorySchema, EventKindDescriptorSchema, EventKindIconSchema, EventKindSchema, EventKindsForDeviceSchema, EventSourceType, ExportDownloadSchema, ExportOptionsSchema, ExportRecordSchema, ExportSetupFieldSchema, ExportSetupSchema, ExportSpeedSchema, ExportStateSchema, ExportTimelapseSchema, ExposedDeviceSchema, ExposureModeSchema, ExpressionEvalError, ExpressionParseError, FanControlStatusSchema, FanDirectionSchema, FeatureManifestSchema, FeatureProbeStatusSchema, FloodStatusSchema, FrameHandleFormatSchema, FrameHandleSchema, FrameInputSchema, GasStatusSchema, GetStreamWithCodecInputSchema, GlobalMetricsSchema, HF_BASE_URL, HF_REPO, HWACCEL_OPTIONS, HealthStatusSchema, HistoryPointSchema, HistoryResolutionEnum, HumidifierStatusSchema, HumiditySensorStatusSchema, HvacModeSchema, ImageContractSchema, ImageContractStateSchema, ImageRotateSchema, ImageSettingsOptionsSchema, ImageSettingsPatchSchema, ImageSettingsStatusSchema, ImageStatusSchema, IngestOwnerSchema, InstalledPackageSchema, IntegrationLiteSchema, IntegrationWithStateSchema, IntercomAbilitySchema, IntercomStatusSchema, KNOWN_CAP_NAMES, KeyEventSchema, LOG_LEVEL_RANK, LabelDefinitionSchema, LawnMowerActivitySchema, LawnMowerControlStatusSchema, LinkedDeviceSchema, LlmDefaultSchema, LlmDefaultSelectorSchema, LlmErrorCodeSchema, LlmGenerateBaseInputSchema, LlmGenerateErrSchema, LlmGenerateOkSchema, LlmGenerateResultSchema, LlmImageSchema, LlmNodeModelSchema, LlmProfileKindDescriptorSchema, LlmProfileKindSchema, LlmProfileSchema, LlmRuntimeCompleteInputSchema, LlmRuntimeDiskUsageSchema, LlmRuntimeNodeSchema, LlmRuntimeStatusSchema, LlmUsageRollupSchema, LlmUsageSchema, LocateSegmentResultSchema, LocationStatSchema, LockControlStatusSchema, LockStateSchema, LogEntrySchema, LogLevelSchema, LogStreamEntrySchema, LoginMethodContributionSchema, LoginStageEnum, MACRO_LABELS, MAX_EXPRESSION_AST_NODES, MAX_EXPRESSION_BINDINGS, MAX_EXPRESSION_CALL_ARGS, MAX_EXPRESSION_EVAL_STEPS, MAX_EXPRESSION_SOURCE_LENGTH, METHOD_ACCESS_MAP, MODEL_FORMATS, MOTION_TRIGGER_FEATURE, ManagedModelCatalogEntrySchema, ManagedModelRefSchema, ManagedRuntimeConfigSchema, MaskGridDimsSchema, MaskGridShapeSchema, MaskLineShapeSchema, MaskPointSchema, MaskPolygonShapeSchema, MaskPolygonVerticesSchema, MaskRectShapeSchema, MaskShapeKindSchema, MaskShapeSchema, MediaFileInfoSchema, MediaFileSchema, MediaPlayerRepeatSchema, MediaPlayerStateSchema, MediaPlayerStatusSchema, MeshPeerSchema, MeshStatusSchema, MethodAccessSchema, ModelCatalogEntrySchema, ModelConvertInputSchema, ModelConvertMetadataSchema, ModelDistributeInputSchema, ModelDistributeResultSchema, ModelExtraFileSchema, ModelFormatEntrySchema, ModelFormatsSchema, ModelSubstitutionSchema, ModelVariantGroupSchema, MotionAnalysisResultSchema, MotionEventSchema, MotionOnMotionChangedDataSchema, MotionRegionSchema, MotionSourceEnum, MotionSourcesSchema, MotionStatusSchema, MotionTriggerRuntimeStateSchema, MotionTriggerStatusSchema, MotionZoneOptionsSchema, MotionZonePatchSchema, MotionZoneRegionSchema, MotionZoneStatusSchema, StatusSchema as MqttBrokerStatusSchema, MutationFilterSchema, NC_BASE_CONDITION_KEYS, NC_CONDITION_CATALOG, NC_HISTORY_LIMIT_DEFAULT, NC_HISTORY_LIMIT_MAX, NC_MAX_PER_TRACK_IMMEDIATE, NC_SNOOZE_MAX_MINUTES, NC_TAXONOMY, NativeCropBboxSchema, NativeCropRefSchema, NativeCropResultSchema, NativeDetectionSchema, NativeObjectClassEnum, NativeObjectDetectionRuntimeStateSchema, NativeObjectDetectionStatusSchema, NcAlarmConfigSchema, NcAlarmModeCoverageSchema, NcAlarmSettingsPatchSchema, NcAlarmSettingsSchema, NcConditionDescriptorSchema, NcConditionsSchema, NcCrossingSchema, NcDeliverySchema, NcDeviceStateConditionSchema, NcHistoryEntrySchema, NcHistoryFilterSchema, NcHistoryRecordKindSchema, NcHistoryStatusSchema, NcHistorySubjectSchema, NcMediaFrameSchema, NcMediaPolicySchema, NcOccupancyConditionSchema, NcPlateMatcherSchema, NcRuleActionSchema, NcRuleActionSequenceSchema, NcRuleActionsSchema, NcRuleInputSchema, NcRuleNotificationButtonSchema, NcRulePatchSchema, NcRuleSchema, NcRuleTargetSchema, NcScheduleSchema, NcScheduleWindowSchema, NcSnoozeInputSchema, NcSnoozeSchema, NcSnoozeScopeSchema, NcSnoozeSuppressedSchema, NcTaxonomyEntrySchema, NcTaxonomySchema, NcTestResultSchema, NcThrottleGranularitySchema, NcThrottleSchema, NcZoneConditionSchema, NetworkAccessStatusSchema, NetworkAddressSchema, NetworkEndpointSchema, NotificationActionIconSchema, NotificationActionSchema, NotificationFormatSchema, NotificationSchema, NotifierStatusSchema, NumericSensorStatusSchema, OPS_LOG_DEFAULT_LIMIT, OPS_LOG_RING_DEFAULT_MAX, OauthIntegrationDescriptorSchema, ObjectEventSchema, OpsLogDomainSchema, OpsLogEntrySchema, OpsLogOpSchema, OpsLogQueryInputSchema, OpsLogReasonSchema, OrchestratorMetricsSchema, OsdOverlayKindEnum, OsdOverlayPatchSchema, OsdOverlaySchema, OsdPositionEnum, OsdStatusSchema, PET_FEEDER_MANUAL_FEED_MAX, PET_FEEDER_MANUAL_FEED_MIN, PIPELINE_FLOW_CAPABILITY_NAMES, PIPELINE_OWNER_CAPABILITY_NAMES, PROVIDER_KIND_CAP_NAMES, PYTHON_SCRIPT, PackageUpdateSchema, PackageVersionInfoSchema, PasskeyLoginMethodSchema, PasskeySummarySchema, PcmSampleFormatSchema, PerScopeBreakdownSchema, PetFeederStatusSchema, PickStreamPreferencesSchema, PickStreamRequirementsSchema, PickedCamStreamSchema, PipelineAssignmentSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineRunResultBridge, PipelineStepInputSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, PlaceholderReasonSchema, PolygonPointSchema, PowerMeterStatusSchema, PresenceStatusSchema, PressureSensorStatusSchema, PrivacyMaskOptionsSchema, PrivacyMaskPatchSchema, PrivacyMaskRegionSchema, PrivacyMaskShapeSchema, PrivacyMaskStatusSchema, ProfileRtspEntrySchema, ProfileSlotSchema, ProfileSlotStatusSchema, ProviderStatusSchema, PtzAutotrackRuntimeStateSchema, PtzAutotrackSettingsSchema, PtzAutotrackStatusSchema, PtzAutotrackTargetOptionSchema, PtzMoveCommandSchema, PtzOptionsSchema, PtzPositionSchema, PtzPresetSchema, PtzStatusSchema, QueryFilterSchema, REACHABILITY_FAILURES_TO_OFFLINE, REACHABILITY_POLL_INTERVAL_MS, REACHABILITY_PROBE_TIMEOUT_MS, RECOGNITION_TYPES, RESERVED_BINDING_NAMES, RUNTIME_DEFAULTS, RUNTIME_TO_FORMAT, RawStateResultSchema, ReadSegmentBytesResultSchema, ReadinessRegistry, ReadinessTimeoutError, RecentTracksPageSchema, RecentTracksQueryInput, RecordingAvailabilitySchema, RecordingBandModeSchema, RecordingBandSchema, RecordingBandTriggersSchema, RecordingConfigSchema, RecordingDaysSchema, RecordingDeviceUsageSchema, RecordingLocationUsageSchema, RecordingManifestSchema, RecordingRangeSchema, RecordingRetentionSchema, RecordingStatusSchema, RecordingStorageModeSchema, RecordingStorageUsageSchema, RecordingTriggersSchema, RecordingWeekdaySchema, RedirectLoginMethodSchema, RelocateFootageInputSchema, RelocateJobSchema, RelocateJobStateSchema, RelocateMediaInputSchema, RenderedAsSchema, ReportMotionInputSchema, RingBuffer, RtpSourceSchema, RtspRestreamEntrySchema, RunnerCameraConfigSchema, RunnerCameraDeviceUIFields, RunnerFrameSourceSchema, RunnerInferenceDeviceSchema, RunnerLocalLoadSchema, RunnerLocalMetricsSchema, SCOPE_PRESETS, SCRUB_THUMBNAIL_PRESETS, SCRUB_THUMBNAIL_PRESET_LABELS, SCRUB_THUMBNAIL_PRESET_ORDER, SENSOR_FEATURES, SENSOR_MAP, SOURCE_INFO_METADATA_KEY, STREAM_PROFILE_META, STREAM_QUALITY_LABELS, SUB_DETECTION_TYPES, SYSTEM_CAP_NAMES, SceneCheckSchema, SceneConditionSchema, SceneMonitorSchema, SceneMonitorStateSchema, SceneMonitorStatusSchema, SceneReferenceSchema, ScopedTokenSchema, ScopedTokenSummarySchema, ScoredObjectEventSchema, ScriptRunnerStatusSchema, ScrubThumbnailPresetSchema, SearchResultSchema, SendEmailInputSchema, SendEmailResultSchema, SendResultSchema, SensorEventSchema, ServerBootModeSchema, ServerPackageStatusSchema, ServerRollbackInfoSchema, ServerUpdateActionResultSchema, ServerUpdateCheckResultSchema, ServerUpdateStateSchema, SettingsPatchSchema, SettingsRecordSchema, SettingsSchemaWithValuesSchema, SettingsUpdateResultSchema, ShmRingStatsSchema, SmokeStatusSchema, SmtpStatusSchema, SnapshotImageSchema, SourceInfoSchema, SpatialDetectionSchema, SsoBridgeClaimsSchema, StartEmbeddedInputSchema, StationaryObjectSchema, AbortUploadInputSchema as StorageAbortUploadInputSchema, BeginDownloadInputSchema as StorageBeginDownloadInputSchema, BeginDownloadResultSchema as StorageBeginDownloadResultSchema, BeginUploadInputSchema as StorageBeginUploadInputSchema, BeginUploadResultSchema as StorageBeginUploadResultSchema, EndDownloadInputSchema as StorageEndDownloadInputSchema, FinalizeUploadInputSchema as StorageFinalizeUploadInputSchema, StorageLocationDeclarationSchema, StorageLocationRefSchema, StorageLocationSchema, StorageLocationTypeSchema, ProviderInfoSchema as StorageProviderInfoSchema, ReadChunkInputSchema as StorageReadChunkInputSchema, TestLocationResultSchema as StorageTestLocationResultSchema, WriteChunkInputSchema as StorageWriteChunkInputSchema, StreamCodecSchema, StreamFormatSchema, StreamNetworkStatsSchema, StreamParamsOptionsSchema, StreamParamsStatusSchema, StreamProfileConfigSchema, StreamProfileOptionsSchema, StreamProfilePatchSchema, StreamProfileSchema, StreamSourceEntrySchema, StreamSourceSchema, SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, SubscribeFramesInputSchema, SubscribeFramesResultSchema, SwitchStatusSchema, SystemMetricsSchema, SystemMirror, TAXONOMY_COLORS, TIMEZONES, TamperStatusSchema, TankStatusSchema, TargetKindCapsSchema, TargetKindLevelSchema, TargetKindSchema, TargetSchema, TemperatureSensorStatusSchema, TerminalProfileInfoSchema, TerminalSessionInfoSchema, TestConnectionResultSchema$1 as TestConnectionResultSchema, TestResultSchema, TimelapseRuleInputSchema, TimelapseRulePatchSchema, TimelapseRuleSchema, TimelapseTemplateSchema, ToastSchema, TokenScopeSchema, TopologyNodeSchema, TopologyProcessSchema, TopologyServiceSchema, TrackCascadeCountsSchema, TrackEnvelopeSchema, TrackProjectionSchema, TrackSchema, TrackStateSchema, TrackZoneFilterSchema, TrackedDetectionSchema, TurnServerSchema, UNIT_TABLE, BrokerInfoSchema$1 as UnifiedBrokerInfoSchema, UnitConversionError, UpdateIntegrationInputSchema, UpdateStatusSchema, UpdateUserInputSchema, UserRecordSchema, UserSummarySchema, VacuumControlStatusSchema, VacuumStateSchema, ValveStateSchema, ValveStatusSchema, VectorDeclareIndexInputSchema, VectorDeleteByFilterInputSchema, VectorDeleteInputSchema, VectorDeleteResultSchema, VectorFilterSchema, VectorGetInputSchema, VectorGetResultSchema, VectorItemSchema, VectorMatchSchema, VectorMetadataSchema, VectorMetricSchema, VectorQueryInputSchema, VectorQueryResultSchema, VectorStatsInputSchema, VectorStatsResultSchema, VectorUpsertInputSchema, VectorUpsertResultSchema, VibrationStatusSchema, VideoEncodeSchema, WELL_KNOWN_TABS, WELL_KNOWN_TAB_MAP, WaterHeaterStatusSchema, WeatherStatusSchema, WebrtcStreamChoiceSchema, WebrtcStreamTargetSchema, WhiteBalanceModeSchema, WidgetHostEnum, WidgetLoginMethodSchema, WidgetMetadataSchema, WidgetRemoteSchema, WidgetSizeEnum, YAMNET_TO_MACRO, ZoneCrossingDirectionSchema, ZoneCrossingSchema, ZoneKindEnum, ZoneRuleModeEnum, ZoneRuleSchema, ZoneRuleStageEnum, ZoneRulesArraySchema, ZoneSchema, ZoneScopeBreakdownSchema, accessoriesCapability, accessoryStableId, addonPagesCapability, addonPagesSourceCapability, addonRoutesCapability, addonSettingsCapability, addonWidgetsCapability, addonWidgetsSourceCapability, addonsCapability, adminUiCapability, airQualitySensorCapability, alarmPanelCapability, alertsCapability, ambientLightSensorCapability, applyTransform, asBoolean, asJsonArray, asJsonObject, asNumber, asString, audioAnalysisCapability, audioAnalyzerCapability, audioCodecCapability, audioMetricsCapability, authProviderCapability, autoAssignProfiles, automationControlCapability, backupCapability, batteryCapability, bestLocationMatch, binaryCapability, bindAddonActions, brightnessCapability, brokerCapability, buildAddonRouteProvider, buildEventKindDescriptor, buildModelVariantGroups, buildNcTaxonomy, buildStreamParamsConfigSchema, buttonCapability, cameraCredentialsCapability, cameraPipelineConfigCapability, cameraStreamsCapability, canConvertUnit, carbonMonoxideCapability, cellsToRects, classifyStream, classifyStreams, climateControlCapability, collectHydratedFieldEntries, collectHydratedFieldValues, colorCapability, colorForKind, compileExpression, compileExpressionSafe, connectivityCapability, consumablesCapability, contactCapability, controlCapability, convertUnit, coreBlocksCapability, cosineSimilarity, coverCapability, createDeviceProxy, createDurableState, createEvent, createExpressionScope, createLazyTrpcSource, createMirrorSource, createRuntimeStateBridge, createSliceHandle, createSystemProxy, customAction, customModelRegistryCapability, dataStoreProviderCapability, dayNightCapability, decodeVectorBase64, decoderCapability, defaultDeviceFor, defineCustomActions, deriveRecordingMode, describeModelVariant, detectionPipelineCapability, deviceAdoptionCapability, deviceBackendToFormat, deviceCustomAction, deviceDiscoveryCapability, deviceExportCapability, deviceManagerCapability, deviceMatchesProfile, deviceOpsCapability, deviceProviderCapability, deviceStateCapability, deviceStatusCapability, doorbellCapability, embeddingEncoderCapability, emitDownForOwnedCaps, emitReadiness, encodeProfileFromStreamShape, encodeVectorBase64, enumSensorCapability, enumerateInferenceDevices, enumerateItemArrayFields, enumerateSchemaFields, errMsg, evaluateAst, evaluateLinkExpression, evaluateZoneRules, event, eventEmitterCapability, eventsCapability, expandCapMethods, extractNestedAddonId, extractSourceInfoFromMetadata, faceGalleryCapability, fanControlCapability, featureProbeCapability, filesystemBrowseCapability, findTimezone, floodCapability, formatForBackend, formatForRuntime, gasCapability, getAudioMacroClassIds, getByPath, getCapsByProviderKind, getTaxonomyEntry, hasMotionTrigger, hfModelUrl, htmlToText, humidifierCapability, humiditySensorCapability, hydrateSchema, imageCapability, imageSettingsCapability, integrationsCapability, intercomCapability, isAgentOnlyPlacement, isArrayOutputSchema, isBaseConditionKey, isCollectionArrayMethod, isDeployableToAgent, isDeviceConfigCap, isDeviceScopedCap, isEvent, isNode, isObjectInput, isVoidInput, jobKindSchema, kebabToCamel, knownValues, lawnMowerControlCapability, lifecycleJobSchema, lifecycleJobScopeSchema, lifecycleJobStateSchema, lifecycleTaskSchema, llmCapability, llmRuntimeCapability, localNetworkCapability, locationSimilarity, lockControlCapability, logDestinationCapability, logLevelAtMost, loginMethodCapability, looseSchema, makeProfileBrokerId, makeSourceBrokerId, mapAudioLabelToMacro, markdownToHtmlLite, markdownToText, maskUrlCredentials, mediaPlayerCapability, mergeSourceInfo, meshNetworkCapability, method, metricsProviderCapability, modelConvertCapability, modelDistributorCapability, modelFormatForRuntime, motionCapability, motionDetectionCapability, motionTriggerCapability, motionZonesCapability, mqttBrokerCapability, nativeObjectDetectionCapability, networkAccessCapability, networkQualityCapability, nodePin, nodesCapability, normalizeAddonInitResult, normalizeUnit, notificationOutputCapability, notificationRulesCapability, notifierCapability, numericSensorCapability, oauthIntegrationCapability, objectInputDeclaresAddonId, osdCapability, parseCameraStreamConfig, parseExpression, parseJsonArray, parseJsonObject, parseJsonUnknown, parseProfileBrokerId, parseStreamParamsFormPatch, petFeederCapability, pickAccessoryControl, pickPreferredRtspEntry, pickerForCondition, pipelineAnalyticsCapability, pipelineExecutorCapability, pipelineOrchestratorCapability, pipelineRunnerCapability, plateGalleryCapability, platformProbeCapability, powerMeterCapability, prepareNotification, presenceCapability, pressureSensorCapability, privacyMaskCapability, procedureAuthKey, ptzAutotrackCapability, ptzCapability, pythonScriptForBackend, readDeviceStateFrom, readNodePin, readinessKey, rebootCapability, recordingCapability, recordingExportCapability, rectsToCells, requiresPython, resolveAddonExecution, resolveAddonGroup, resolveAddonPlacement, resolveAddonRuntime, resolveCapMount, resolveDetectionRuntime, resolveDeviceControlKind, resolveDeviceProfile, resolveFormat, resolveHydratedFieldValue, resolveModelFormat, resolveMutate, resolveRunnerId, resolveScrubThumbnailGeometry, resolveVariantModelId, runInferenceStep, runtimeDevices, sceneMonitorCapability, scopeKey, scoreRuntimes, scriptRunnerCapability, selectAssignedProfileSlots, serverManagementCapability, setByPath, settingsStoreCapability, sleep, sleepCancellable, smokeCapability, smtpProviderCapability, snapshotCapability, ssoBridgeCapability, startReachabilityPoll, stateVocabularyFor, storageCapability, storageEvictableCapability, storageProviderCapability, streamBrokerCapability, streamCatalogCapability, streamParamsCapability, streamPixels, streamQualityLabel, subKindsOf, supportedRuntimes, switchCapability, synthesizeSourceInfo, systemCapability, tamperCapability, taskLogEntrySchema, taskPhaseSchema, taskTargetSchema, temperatureSensorCapability, terminalSessionCapability, textToHtml, toDeviceSummary, toExpressionValue, toStreamSourceEntry, toastCapability, tokenize, transcodeBody, tryConvertUnit, turnProviderCapability, unitDimension, unitsForDimension, updateCapability, userManagementCapability, userPasskeysCapability, vacuumControlCapability, validateExpressionSource, valveCapability, vectorDimFromBase64, vectorStoreCapability, vibrationCapability, videoclipsCapability, viewerUiCapability, waterHeaterCapability, weatherCapability, webrtcClientHintsSchema, webrtcSessionCapability, wiringAddonHealthSchema, wiringHealthSnapshotSchema, wiringNodeHealthSchema, wiringProbeKindSchema, wiringProbeResultSchema, zodEntriesToConfigUI, zoneAnalyticsCapability, zoneRulesCapability, zonesCapability };
35358
+ export { ACCESSORY_LABEL, ALL_CAPABILITY_DEFINITIONS, APPLE_SA_TO_MACRO, AUDIO_BACKEND_CHOICES, AUDIO_MACRO_LABELS, AccessoriesStatusSchema, AccessoryKind, AddBrokerInputSchema, AddonAutoUpdateSchema, AddonListItemSchema, AddonPageDeclarationSchema, AddonPageInfoSchema, AdoptInputSchema as AdoptionAdoptInputSchema, AdoptResultSchema as AdoptionAdoptResultSchema, AdoptionFilterSchema, GetCandidateInputSchema as AdoptionGetCandidateInputSchema, ListCandidatesInputSchema as AdoptionListCandidatesInputSchema, ListCandidatesOutputSchema as AdoptionListCandidatesOutputSchema, ReleaseInputSchema as AdoptionReleaseInputSchema, AdoptionStatusSchema, AgentLoadSummarySchema, AirQualitySensorStatusSchema, AlarmArmModeSchema, AlarmPanelStatusSchema, AlarmStateSchema, AlertSchema, AlertSeveritySchema, AlertSourceSchema, AlertStatusSchema, AmbientLightSensorStatusSchema, ApiKeyRecordSchema, ApiKeySummarySchema, ArchiveEntrySchema, ArchiveManifestSchema, AttachmentMediaTypeSchema, AttachmentSchema, AudioAnalysisResultSchema, AudioAnalysisSettingsSchema, AudioChunkInputSchema, AudioClassSummarySchema, AudioClassificationLabelSchema, AudioClassificationResultSchema, AudioCodecInfoSchema, AudioDecodeSessionConfigSchema, AudioEncodeSchema, AudioEncodeSessionConfigSchema, AudioEncodedChunkSchema, AudioEventSchema, AudioLevelSchema, AudioMetricsHistoryPointSchema, AudioMetricsHistorySchema, AudioMetricsSnapshotSchema, AudioPcmChunkSchema, AuthResultSchema, AutoUpdateSettingsSchema, AutomationControlStatusSchema, AvailableIntegrationTypeSchema, BACKEND_TO_FORMAT, BATTERY_DEVICE_PROFILE, BacklightModeSchema, BackupDestinationInfoSchema, BackupEntrySchema, BaseAddon, BaseDevice, BaseDeviceProvider, BatteryStatusSchema, BinaryStatusSchema, BoundingBoxSchema, BrightnessStatusSchema, AddInputSchema as BrokerAddInputSchema, BrokerAudioClientSchema, BrokerClientsSchema, BrokerConnectionDetailsSchema, BrokerConsumerAttributionSchema, BrokerConsumerKindSchema, BrokerDecodedClientSchema, BrokerEncodedClientSchema, GetStateInputSchema as BrokerGetStateInputSchema, BrokerInfoSchema, BrokerProviderInfoSchema, PublishInputSchema as BrokerPublishInputSchema, RegistryStatusSchema as BrokerRegistryStatusSchema, BrokerRtspClientSchema, BrokerStatsSchema, BrokerStatusEnum, BrokerStatusSchema, SubscribeInputSchema as BrokerSubscribeInputSchema, SubscribeResultSchema as BrokerSubscribeResultSchema, TestConnectionResultSchema as BrokerTestConnectionResultSchema, UnsubscribeInputSchema as BrokerUnsubscribeInputSchema, CAM_PROFILE_ORDER, CAPABILITY_NAMES, CAPABILITY_ROUTER_KEYS, CAP_NAMES_WITH_STATUS, CAP_NODE_PIN_CONTEXT_KEY, CAP_PROVIDER_KIND_MAP, COCO_80_LABELS, COCO_TO_MACRO, CamProfileSchema, CamStreamDescriptorSchema, CamStreamKindSchema, CamStreamResolutionSchema, CameraAssignmentStatusSchema, CameraAudioStatusSchema, CameraBrokerProfileSchema, CameraBrokerStatusSchema, CameraCredentialsSchema, CameraCredentialsStatusSchema, CameraDecoderShmSchema, CameraDecoderStatusSchema, CameraDetectionPhaseSchema, CameraDetectionProvisioningSchema, CameraDetectionProvisioningStateSchema, CameraDetectionStatusSchema, CameraMetricsSchema, CameraMetricsWithDeviceIdSchema, CameraMotionStatusSchema, CameraRecordingModeSchema, CameraRecordingStatusSchema, CameraSourceStatusSchema, CameraSourceStreamSchema, CameraStatusSchema, CameraStreamSchema, CandidateQueryFilterSchema, CapScopeSchema, CapabilityBindingsSchema, CarbonMonoxideStatusSchema, ChargingStatus, ClientNetworkStatsSchema, ClimateControlStatusSchema, ClipPlaybackSchema, ClipSchema, ClusterAddonNodeDeploymentSchema, ClusterAddonStatusEntrySchema, CollectionColumnSchema, CollectionIndexSchema, ColorStatusSchema, ConfigEntrySchema, ConfigSectionWithValuesSchema, ConfigTabDeclarationSchema, ConnectivityStatusSchema, ConsumableItemSchema, ConsumablesStatusSchema, ContactStatusSchema, ControlKindSchema, ControlStatusSchema, ConvertArtifactSchema, ConvertResultSchema, ConvertTargetSchema, CoreBlockCompileResultSchema, CoreBlockInputSchema, CoreBlockPlacementSchema, CoreBlockSchema, CoreBlockStatusSchema, CoverStateSchema, CoverStatusSchema, CreateApiKeyInputSchema, CreateApiKeyResultSchema, CreateIntegrationInputSchema, CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, CreateUserInputSchema, CustomActionInputSchema, CustomModelDescriptorSchema, DATAPLANE_SECRET_HEADER, DEFAULT_ADDON_PLACEMENT, DEFAULT_AUDIO_ANALYZER_CONFIG, DEFAULT_DECODER_HWACCEL_CONFIG, DEFAULT_DETAIL_CROP_CONVENTION, DEFAULT_EVENT_COLOR, DEFAULT_FEATURES, DEFAULT_RETENTION, DEFAULT_SCRUB_THUMBNAIL_PRESET, DETAIL_CROP_PADDING_FIELD, DETAIL_CROP_PADDING_KEY, DETAIL_CROP_SECTION_ID, DETAIL_CROP_SQUARE_KEY, DEVICE_BACKEND_TO_FORMAT, DEVICE_CAP_NAMES, DEVICE_PROFILES, DEVICE_SCOPED_CAPS, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATE_READERS, DEVICE_STATUS_METHOD, DEVICE_TYPE_CONTROL_KIND, DEVICE_TYPE_INFO, EngineInfoSchema as DataStoreEngineInfoSchema, DayNightModeSchema, DayNightOptionsSchema, DayNightSettingsPatchSchema, DayNightStatusSchema, DecodedAudioChunkSchema, DecodedFrameSchema, DecoderSessionConfigSchema, DecoderStatsSchema, DeleteIntegrationResultSchema, DetailCropConventionSchema, DetectionSourceSchema, DeviceCodeSeveritySchema, DeviceConfig, DeviceDiscoveryStatusSchema, ExposeInputSchema as DeviceExportExposeInputSchema, DeviceExportStatusSchema, UnexposeInputSchema as DeviceExportUnexposeInputSchema, DeviceFeature, DeviceInfoSchema, DeviceLinkModeSchema, DeviceNetworkStatsSchema, DeviceRole, DeviceRuntimeState, DeviceStatusSchema, DeviceType, DiscoveredChildDeviceSchema, DiscoveredChildStatusSchema, DiscoveredDeviceSchema, DiscoveredTargetSchema, DisposerChain, DoorbellPressEventSchema, DoorbellStatusSchema, EVENTFUL_CAP_NAMES, EVENT_KIND_BY_CAP, EVENT_PAD_MS, EVENT_TAXONOMY, EXPRESSION_BUILTINS, EXPRESSION_BUILTIN_NAMES, EXPRESSION_COMPILE_CACHE_CAPACITY, EXPRESSION_IDENTIFIER_RE, EXPRESSION_INJECTED_NOW, ElementConfigStore, EmbeddingInfoSchema, EmbeddingResultSchema, EncodeProfileSchema, EncodedPacketSchema, EnrichedWidgetMetadataSchema, EnumSensorDateTimeFormatSchema, EnumSensorStatusSchema, EventCategory, EventEmitterStatusSchema, EventFireSchema, EventItemSchema, EventKindCategorySchema, EventKindDescriptorSchema, EventKindIconSchema, EventKindSchema, EventKindsForDeviceSchema, EventSourceType, ExportDownloadSchema, ExportOptionsSchema, ExportRecordSchema, ExportSetupFieldSchema, ExportSetupSchema, ExportSpeedSchema, ExportStateSchema, ExportTimelapseSchema, ExposedDeviceSchema, ExposureModeSchema, ExpressionEvalError, ExpressionParseError, FanControlStatusSchema, FanDirectionSchema, FeatureManifestSchema, FeatureProbeStatusSchema, FloodStatusSchema, FrameHandleFormatSchema, FrameHandleSchema, FrameInputSchema, GasStatusSchema, GetStreamWithCodecInputSchema, GlobalMetricsSchema, HF_BASE_URL, HF_REPO, HWACCEL_OPTIONS, HealthStatusSchema, HistoryPointSchema, HistoryResolutionEnum, HumidifierStatusSchema, HumiditySensorStatusSchema, HvacModeSchema, ImageContractSchema, ImageContractStateSchema, ImageRotateSchema, ImageSettingsOptionsSchema, ImageSettingsPatchSchema, ImageSettingsStatusSchema, ImageStatusSchema, IngestOwnerSchema, InstalledPackageSchema, IntegrationLiteSchema, IntegrationWithStateSchema, IntercomAbilitySchema, IntercomStatusSchema, KNOWN_CAP_NAMES, KeyEventSchema, LOG_LEVEL_RANK, LabelDefinitionSchema, LawnMowerActivitySchema, LawnMowerControlStatusSchema, LinkedDeviceSchema, LlmDefaultSchema, LlmDefaultSelectorSchema, LlmErrorCodeSchema, LlmGenerateBaseInputSchema, LlmGenerateErrSchema, LlmGenerateOkSchema, LlmGenerateResultSchema, LlmImageSchema, LlmNodeModelSchema, LlmProfileKindDescriptorSchema, LlmProfileKindSchema, LlmProfileSchema, LlmRuntimeCompleteInputSchema, LlmRuntimeDiskUsageSchema, LlmRuntimeNodeSchema, LlmRuntimeStatusSchema, LlmUsageRollupSchema, LlmUsageSchema, LocateSegmentResultSchema, LocationStatSchema, LockControlStatusSchema, LockStateSchema, LogEntrySchema, LogLevelSchema, LogStreamEntrySchema, LoginMethodContributionSchema, LoginStageEnum, MACRO_LABELS, MAX_EXPRESSION_AST_NODES, MAX_EXPRESSION_BINDINGS, MAX_EXPRESSION_CALL_ARGS, MAX_EXPRESSION_EVAL_STEPS, MAX_EXPRESSION_SOURCE_LENGTH, METHOD_ACCESS_MAP, MODEL_FORMATS, MOTION_TRIGGER_FEATURE, ManagedModelCatalogEntrySchema, ManagedModelRefSchema, ManagedRuntimeConfigSchema, MaskGridDimsSchema, MaskGridShapeSchema, MaskLineShapeSchema, MaskPointSchema, MaskPolygonShapeSchema, MaskPolygonVerticesSchema, MaskRectShapeSchema, MaskShapeKindSchema, MaskShapeSchema, MediaFileInfoSchema, MediaFileSchema, MediaPlayerRepeatSchema, MediaPlayerStateSchema, MediaPlayerStatusSchema, MeshPeerSchema, MeshStatusSchema, MethodAccessSchema, ModelCatalogEntrySchema, ModelConvertInputSchema, ModelConvertMetadataSchema, ModelDistributeInputSchema, ModelDistributeResultSchema, ModelExtraFileSchema, ModelFormatEntrySchema, ModelFormatsSchema, ModelSubstitutionSchema, ModelVariantGroupSchema, MotionAnalysisResultSchema, MotionEventSchema, MotionOnMotionChangedDataSchema, MotionRegionSchema, MotionSourceEnum, MotionSourcesSchema, MotionStatusSchema, MotionTriggerRuntimeStateSchema, MotionTriggerStatusSchema, MotionZoneOptionsSchema, MotionZonePatchSchema, MotionZoneRegionSchema, MotionZoneStatusSchema, StatusSchema as MqttBrokerStatusSchema, MutationFilterSchema, NC_BASE_CONDITION_KEYS, NC_CONDITION_CATALOG, NC_HISTORY_LIMIT_DEFAULT, NC_HISTORY_LIMIT_MAX, NC_MAX_PER_TRACK_IMMEDIATE, NC_SNOOZE_MAX_MINUTES, NC_TAXONOMY, NativeCropBboxSchema, NativeCropRefSchema, NativeCropResultSchema, NativeDetectionSchema, NativeObjectClassEnum, NativeObjectDetectionRuntimeStateSchema, NativeObjectDetectionStatusSchema, NcAlarmConfigSchema, NcAlarmModeCoverageSchema, NcAlarmSettingsPatchSchema, NcAlarmSettingsSchema, NcConditionDescriptorSchema, NcConditionsSchema, NcCrossingSchema, NcDeliverySchema, NcDeviceStateConditionSchema, NcHistoryEntrySchema, NcHistoryFilterSchema, NcHistoryRecordKindSchema, NcHistoryStatusSchema, NcHistorySubjectSchema, NcMediaFrameSchema, NcMediaPolicySchema, NcOccupancyConditionSchema, NcPlateMatcherSchema, NcRuleActionSchema, NcRuleActionSequenceSchema, NcRuleActionsSchema, NcRuleInputSchema, NcRuleNotificationButtonSchema, NcRulePatchSchema, NcRuleSchema, NcRuleTargetSchema, NcScheduleSchema, NcScheduleWindowSchema, NcSnoozeInputSchema, NcSnoozeSchema, NcSnoozeScopeSchema, NcSnoozeSuppressedSchema, NcTaxonomyEntrySchema, NcTaxonomySchema, NcTestResultSchema, NcThrottleGranularitySchema, NcThrottleSchema, NcZoneConditionSchema, NetworkAccessStatusSchema, NetworkAddressSchema, NetworkEndpointSchema, NotificationActionIconSchema, NotificationActionSchema, NotificationFormatSchema, NotificationSchema, NotifierStatusSchema, NumericSensorStatusSchema, OPS_LOG_DEFAULT_LIMIT, OPS_LOG_RING_DEFAULT_MAX, OauthIntegrationDescriptorSchema, ObjectEventSchema, OpsLogDomainSchema, OpsLogEntrySchema, OpsLogOpSchema, OpsLogQueryInputSchema, OpsLogReasonSchema, OrchestratorMetricsSchema, OsdOverlayKindEnum, OsdOverlayPatchSchema, OsdOverlaySchema, OsdPositionEnum, OsdStatusSchema, PET_FEEDER_MANUAL_FEED_MAX, PET_FEEDER_MANUAL_FEED_MIN, PIPELINE_FLOW_CAPABILITY_NAMES, PIPELINE_OWNER_CAPABILITY_NAMES, PROVIDER_KIND_CAP_NAMES, PYTHON_SCRIPT, PackageUpdateSchema, PackageVersionInfoSchema, PasskeyLoginMethodSchema, PasskeySummarySchema, PcmSampleFormatSchema, PerScopeBreakdownSchema, PetFeederStatusSchema, PickStreamPreferencesSchema, PickStreamRequirementsSchema, PickedCamStreamSchema, PipelineAssignmentSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineRunResultBridge, PipelineStepInputSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, PlaceholderReasonSchema, PolygonPointSchema, PowerMeterStatusSchema, PresenceStatusSchema, PressureSensorStatusSchema, PrivacyMaskOptionsSchema, PrivacyMaskPatchSchema, PrivacyMaskRegionSchema, PrivacyMaskShapeSchema, PrivacyMaskStatusSchema, ProfileRtspEntrySchema, ProfileSlotSchema, ProfileSlotStatusSchema, ProviderStatusSchema, PtzAutotrackRuntimeStateSchema, PtzAutotrackSettingsSchema, PtzAutotrackStatusSchema, PtzAutotrackTargetOptionSchema, PtzMoveCommandSchema, PtzOptionsSchema, PtzPositionSchema, PtzPresetSchema, PtzStatusSchema, QueryFilterSchema, REACHABILITY_FAILURES_TO_OFFLINE, REACHABILITY_POLL_INTERVAL_MS, REACHABILITY_PROBE_TIMEOUT_MS, RECOGNITION_TYPES, RESERVED_BINDING_NAMES, RUNTIME_DEFAULTS, RUNTIME_TO_FORMAT, RawStateResultSchema, ReadSegmentBytesResultSchema, ReadinessRegistry, ReadinessTimeoutError, RecentTracksPageSchema, RecentTracksQueryInput, RecordingAvailabilitySchema, RecordingBandModeSchema, RecordingBandSchema, RecordingBandTriggersSchema, RecordingConfigSchema, RecordingDaysSchema, RecordingDeviceUsageSchema, RecordingLocationUsageSchema, RecordingManifestSchema, RecordingRangeSchema, RecordingRetentionSchema, RecordingStatusSchema, RecordingStorageModeSchema, RecordingStorageUsageSchema, RecordingTriggersSchema, RecordingWeekdaySchema, RedirectLoginMethodSchema, RelocateFootageInputSchema, RelocateJobSchema, RelocateJobStateSchema, RelocateMediaInputSchema, RenderedAsSchema, ReportMotionInputSchema, RingBuffer, RtpSourceSchema, RtspRestreamEntrySchema, RunnerCameraConfigSchema, RunnerCameraDeviceUIFields, RunnerFrameSourceSchema, RunnerInferenceDeviceSchema, RunnerLocalLoadSchema, RunnerLocalMetricsSchema, SCOPE_PRESETS, SCRUB_THUMBNAIL_PRESETS, SCRUB_THUMBNAIL_PRESET_LABELS, SCRUB_THUMBNAIL_PRESET_ORDER, SENSOR_FEATURES, SENSOR_MAP, SOURCE_INFO_METADATA_KEY, STREAM_PROFILE_META, STREAM_QUALITY_LABELS, SUB_DETECTION_TYPES, SYSTEM_CAP_NAMES, SceneCheckSchema, SceneConditionSchema, SceneMonitorSchema, SceneMonitorStateSchema, SceneMonitorStatusSchema, SceneReferenceSchema, ScopedTokenSchema, ScopedTokenSummarySchema, ScoredObjectEventSchema, ScriptRunnerStatusSchema, ScrubThumbnailPresetSchema, SearchResultSchema, SendEmailInputSchema, SendEmailResultSchema, SendResultSchema, SensorEventSchema, ServerBootModeSchema, ServerPackageStatusSchema, ServerRollbackInfoSchema, ServerUpdateActionResultSchema, ServerUpdateCheckResultSchema, ServerUpdateStateSchema, SettingsPatchSchema, SettingsRecordSchema, SettingsSchemaWithValuesSchema, SettingsUpdateResultSchema, ShmRingStatsSchema, SmokeStatusSchema, SmtpStatusSchema, SnapshotImageSchema, SourceInfoSchema, SpatialDetectionSchema, SsoBridgeClaimsSchema, StartEmbeddedInputSchema, StationaryObjectSchema, AbortUploadInputSchema as StorageAbortUploadInputSchema, BeginDownloadInputSchema as StorageBeginDownloadInputSchema, BeginDownloadResultSchema as StorageBeginDownloadResultSchema, BeginUploadInputSchema as StorageBeginUploadInputSchema, BeginUploadResultSchema as StorageBeginUploadResultSchema, EndDownloadInputSchema as StorageEndDownloadInputSchema, FinalizeUploadInputSchema as StorageFinalizeUploadInputSchema, StorageLocationDeclarationSchema, StorageLocationRefSchema, StorageLocationSchema, StorageLocationTypeSchema, ProviderInfoSchema as StorageProviderInfoSchema, ReadChunkInputSchema as StorageReadChunkInputSchema, TestLocationResultSchema as StorageTestLocationResultSchema, WriteChunkInputSchema as StorageWriteChunkInputSchema, StreamCodecSchema, StreamFormatSchema, StreamNetworkStatsSchema, StreamParamsOptionsSchema, StreamParamsStatusSchema, StreamProfileConfigSchema, StreamProfileOptionsSchema, StreamProfilePatchSchema, StreamProfileSchema, StreamSourceEntrySchema, StreamSourceSchema, SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, SubscribeFramesInputSchema, SubscribeFramesResultSchema, SwitchStatusSchema, SystemMetricsSchema, SystemMirror, TAXONOMY_COLORS, TIMEZONES, TamperStatusSchema, TankStatusSchema, TargetKindCapsSchema, TargetKindLevelSchema, TargetKindSchema, TargetSchema, TemperatureSensorStatusSchema, TerminalProfileInfoSchema, TerminalSessionInfoSchema, TestConnectionResultSchema$1 as TestConnectionResultSchema, TestResultSchema, TimelapseRuleInputSchema, TimelapseRulePatchSchema, TimelapseRuleSchema, TimelapseTemplateSchema, ToastSchema, TokenScopeSchema, TopologyNodeSchema, TopologyProcessSchema, TopologyServiceSchema, TrackCascadeCountsSchema, TrackEnvelopeSchema, TrackProjectionSchema, TrackSchema, TrackStateSchema, TrackZoneFilterSchema, TrackedDetectionSchema, TurnServerSchema, UNIT_TABLE, BrokerInfoSchema$1 as UnifiedBrokerInfoSchema, UnitConversionError, UpdateIntegrationInputSchema, UpdateStatusSchema, UpdateUserInputSchema, UserRecordSchema, UserSummarySchema, VacuumControlStatusSchema, VacuumStateSchema, ValveStateSchema, ValveStatusSchema, VectorDeclareIndexInputSchema, VectorDeleteByFilterInputSchema, VectorDeleteInputSchema, VectorDeleteResultSchema, VectorFilterSchema, VectorGetInputSchema, VectorGetResultSchema, VectorItemSchema, VectorMatchSchema, VectorMetadataSchema, VectorMetricSchema, VectorQueryInputSchema, VectorQueryResultSchema, VectorStatsInputSchema, VectorStatsResultSchema, VectorUpsertInputSchema, VectorUpsertResultSchema, VibrationStatusSchema, VideoEncodeSchema, WELL_KNOWN_TABS, WELL_KNOWN_TAB_MAP, WaterHeaterStatusSchema, WeatherStatusSchema, WebrtcStreamChoiceSchema, WebrtcStreamTargetSchema, WhiteBalanceModeSchema, WidgetHostEnum, WidgetLoginMethodSchema, WidgetMetadataSchema, WidgetRemoteSchema, WidgetSizeEnum, YAMNET_TO_MACRO, ZoneCrossingDirectionSchema, ZoneCrossingSchema, ZoneKindEnum, ZoneRuleModeEnum, ZoneRuleSchema, ZoneRuleStageEnum, ZoneRulesArraySchema, ZoneSchema, ZoneScopeBreakdownSchema, accessoriesCapability, accessoryStableId, addonPagesCapability, addonPagesSourceCapability, addonRoutesCapability, addonSettingsCapability, addonWidgetsCapability, addonWidgetsSourceCapability, addonsCapability, adminUiCapability, airQualitySensorCapability, alarmPanelCapability, alertsCapability, ambientLightSensorCapability, applyTransform, asBoolean, asJsonArray, asJsonObject, asNumber, asString, audioAnalysisCapability, audioAnalyzerCapability, audioCodecCapability, audioMetricsCapability, authProviderCapability, autoAssignProfiles, automationControlCapability, backupCapability, batteryCapability, bestLocationMatch, binaryCapability, bindAddonActions, brightnessCapability, brokerCapability, buildAddonRouteProvider, buildEventKindDescriptor, buildModelVariantGroups, buildNcTaxonomy, buildStreamParamsConfigSchema, buttonCapability, cameraCredentialsCapability, cameraPipelineConfigCapability, cameraStreamsCapability, canConvertUnit, carbonMonoxideCapability, cellsToRects, classifyStream, classifyStreams, climateControlCapability, collectHydratedFieldEntries, collectHydratedFieldValues, colorCapability, colorForKind, compileExpression, compileExpressionSafe, connectivityCapability, consumablesCapability, contactCapability, controlCapability, convertUnit, coreBlocksCapability, cosineSimilarity, coverCapability, createDeviceProxy, createDurableState, createEvent, createExpressionScope, createLazyTrpcSource, createMirrorSource, createRuntimeStateBridge, createSliceHandle, createSystemProxy, customAction, customModelRegistryCapability, dataStoreProviderCapability, dayNightCapability, decodeVectorBase64, decoderCapability, defaultDeviceFor, defineCustomActions, deriveDetailCropRect, deriveRecordingMode, describeModelVariant, detectionPipelineCapability, deviceAdoptionCapability, deviceBackendToFormat, deviceCustomAction, deviceDiscoveryCapability, deviceExportCapability, deviceManagerCapability, deviceMatchesProfile, deviceOpsCapability, deviceProviderCapability, deviceStateCapability, deviceStatusCapability, doorbellCapability, embeddingEncoderCapability, emitDownForOwnedCaps, emitReadiness, encodeProfileFromStreamShape, encodeVectorBase64, enumSensorCapability, enumerateInferenceDevices, enumerateItemArrayFields, enumerateSchemaFields, errMsg, evaluateAst, evaluateLinkExpression, evaluateZoneRules, event, eventEmitterCapability, eventsCapability, expandCapMethods, extractNestedAddonId, extractSourceInfoFromMetadata, faceGalleryCapability, fanControlCapability, featureProbeCapability, filesystemBrowseCapability, findTimezone, floodCapability, formatForBackend, formatForRuntime, gasCapability, getAudioMacroClassIds, getByPath, getCapsByProviderKind, getTaxonomyEntry, hasMotionTrigger, hfModelUrl, htmlToText, humidifierCapability, humiditySensorCapability, hydrateSchema, imageCapability, imageSettingsCapability, integrationsCapability, intercomCapability, isAgentOnlyPlacement, isArrayOutputSchema, isBaseConditionKey, isCollectionArrayMethod, isDeployableToAgent, isDeviceConfigCap, isDeviceScopedCap, isEvent, isNode, isObjectInput, isVoidInput, jobKindSchema, kebabToCamel, knownValues, lawnMowerControlCapability, lifecycleJobSchema, lifecycleJobScopeSchema, lifecycleJobStateSchema, lifecycleTaskSchema, llmCapability, llmRuntimeCapability, localNetworkCapability, locationSimilarity, lockControlCapability, logDestinationCapability, logLevelAtMost, loginMethodCapability, looseSchema, makeProfileBrokerId, makeSourceBrokerId, mapAudioLabelToMacro, markdownToHtmlLite, markdownToText, maskUrlCredentials, mediaPlayerCapability, mergeSourceInfo, meshNetworkCapability, method, metricsProviderCapability, modelConvertCapability, modelDistributorCapability, modelFormatForRuntime, motionCapability, motionDetectionCapability, motionTriggerCapability, motionZonesCapability, mqttBrokerCapability, nativeObjectDetectionCapability, networkAccessCapability, networkQualityCapability, nodePin, nodesCapability, normalizeAddonInitResult, normalizeUnit, notificationOutputCapability, notificationRulesCapability, notifierCapability, numericSensorCapability, oauthIntegrationCapability, objectInputDeclaresAddonId, osdCapability, parseCameraStreamConfig, parseExpression, parseJsonArray, parseJsonObject, parseJsonUnknown, parseProfileBrokerId, parseStreamParamsFormPatch, petFeederCapability, pickAccessoryControl, pickDetailCropConvention, pickPreferredRtspEntry, pickerForCondition, pipelineAnalyticsCapability, pipelineExecutorCapability, pipelineOrchestratorCapability, pipelineRunnerCapability, plateGalleryCapability, platformProbeCapability, powerMeterCapability, prepareNotification, presenceCapability, pressureSensorCapability, privacyMaskCapability, procedureAuthKey, ptzAutotrackCapability, ptzCapability, pythonScriptForBackend, readDetailCropConvention, readDeviceStateFrom, readNodePin, readinessKey, rebootCapability, recordingCapability, recordingExportCapability, rectsToCells, requiresPython, resolveAddonExecution, resolveAddonGroup, resolveAddonPlacement, resolveAddonRuntime, resolveCapMount, resolveDetectionRuntime, resolveDeviceControlKind, resolveDeviceProfile, resolveFormat, resolveHydratedFieldValue, resolveModelFormat, resolveMutate, resolveRunnerId, resolveScrubThumbnailGeometry, resolveVariantModelId, runInferenceStep, runtimeDevices, sceneMonitorCapability, scopeKey, scoreRuntimes, scriptRunnerCapability, selectAssignedProfileSlots, serverManagementCapability, setByPath, settingsStoreCapability, sleep, sleepCancellable, smokeCapability, smtpProviderCapability, snapshotCapability, ssoBridgeCapability, startReachabilityPoll, stateVocabularyFor, storageCapability, storageEvictableCapability, storageProviderCapability, streamBrokerCapability, streamCatalogCapability, streamParamsCapability, streamPixels, streamQualityLabel, subKindsOf, supportedRuntimes, switchCapability, synthesizeSourceInfo, systemCapability, tamperCapability, taskLogEntrySchema, taskPhaseSchema, taskTargetSchema, temperatureSensorCapability, terminalSessionCapability, textToHtml, toDeviceSummary, toExpressionValue, toStreamSourceEntry, toastCapability, tokenize, transcodeBody, tryConvertUnit, turnProviderCapability, unitDimension, unitsForDimension, updateCapability, userManagementCapability, userPasskeysCapability, vacuumControlCapability, validateExpressionSource, valveCapability, vectorDimFromBase64, vectorStoreCapability, vibrationCapability, videoclipsCapability, viewerUiCapability, waterHeaterCapability, weatherCapability, webrtcClientHintsSchema, webrtcSessionCapability, wiringAddonHealthSchema, wiringHealthSnapshotSchema, wiringNodeHealthSchema, wiringProbeKindSchema, wiringProbeResultSchema, zodEntriesToConfigUI, zoneAnalyticsCapability, zoneRulesCapability, zonesCapability };
@@ -0,0 +1,122 @@
1
+ /**
2
+ * THE detail-crop convention — the single derivation of the rectangle a
3
+ * detail/enrichment step (clip-embedding, face-detection, plate-detection…)
4
+ * is fed.
5
+ *
6
+ * ## Why this is one module and not two constants
7
+ *
8
+ * `object-clip` is ONE vector index, and cosine similarity is only meaningful
9
+ * between vectors produced from the same crop convention. Two encode paths
10
+ * write into it — the live detail plane and the embedding rebuild — and they
11
+ * used to derive their crops independently: `DETAIL_CROP_PADDING_RATIO = 0.15`
12
+ * with no squaring on one side, `DEFAULT_CROP_MARGIN = 0.2` with squaring on
13
+ * by default on the other. Every rebuild therefore poured a second, silently
14
+ * incomparable feature space into the index it exists to keep consistent.
15
+ *
16
+ * So the rectangle is derived HERE, once, from ONE convention value. Both
17
+ * paths now reach this function through `pipelineRunner.runDetailSubtree` —
18
+ * the runner is the only process that cuts (see `detail-subtree.ts`), and the
19
+ * convention is a cluster-global `pipeline-orchestrator` setting. There is
20
+ * deliberately no per-node or per-device scope: a per-accelerator crop margin
21
+ * would reintroduce the same split, merely relocated.
22
+ *
23
+ * ## The default IS the live convention
24
+ *
25
+ * {@link DEFAULT_DETAIL_CROP_CONVENTION} reproduces what the live path has
26
+ * been storing (0.15, no squaring). Anything else would invalidate every
27
+ * vector already in the index on the day it shipped. Changing the convention
28
+ * is legitimate — that is what the operator knob is for — but it must be
29
+ * followed by a rebuild, which is now guaranteed to produce crops from this
30
+ * same function.
31
+ */
32
+ import { z } from 'zod';
33
+ /**
34
+ * Store identity of the convention in `pipeline-orchestrator`'s GLOBAL
35
+ * (cluster-wide) settings.
36
+ *
37
+ * These live here rather than in the orchestrator because the reader is a
38
+ * different addon — the pipeline runner, over the hub-routed `addon-settings`
39
+ * cap. Addons never import each other, so a key owned by the writer would have
40
+ * to be hand-copied by the reader, and a hand-copied key is how a setting
41
+ * silently stops arriving while both sides still look correct.
42
+ */
43
+ export declare const DETAIL_CROP_SECTION_ID = "detail-crop";
44
+ export declare const DETAIL_CROP_PADDING_KEY = "detailCropPaddingRatio";
45
+ export declare const DETAIL_CROP_SQUARE_KEY = "detailCropSquare";
46
+ /** A `{x,y,w,h}` rectangle in FRAME-space pixels. */
47
+ export interface DetailCropRect {
48
+ readonly x: number;
49
+ readonly y: number;
50
+ readonly w: number;
51
+ readonly h: number;
52
+ }
53
+ /**
54
+ * Operator-tunable crop convention. Single-valued and cluster-wide — see the
55
+ * module docblock for why it cannot be scoped per node or per device.
56
+ */
57
+ export declare const DetailCropConventionSchema: z.ZodObject<{
58
+ paddingRatio: z.ZodNumber;
59
+ square: z.ZodBoolean;
60
+ }, z.core.$strip>;
61
+ export type DetailCropConvention = z.infer<typeof DetailCropConventionSchema>;
62
+ /**
63
+ * The convention in force when nobody has configured one — byte-for-byte the
64
+ * behaviour of the pre-unification LIVE path (`DETAIL_CROP_PADDING_RATIO`).
65
+ */
66
+ export declare const DEFAULT_DETAIL_CROP_CONVENTION: DetailCropConvention;
67
+ /**
68
+ * Narrow a FLAT settings record to the convention.
69
+ *
70
+ * Per-FIELD fallback, deliberately: a junk padding must not also discard a
71
+ * valid squaring choice. An absent or invalid value resolves to
72
+ * {@link DEFAULT_DETAIL_CROP_CONVENTION} — the historical live behaviour —
73
+ * rather than to a clamped number nobody chose, so a bad read can never
74
+ * quietly change what the stored vectors mean.
75
+ */
76
+ export declare function readDetailCropConvention(config: Readonly<Record<string, unknown>>): DetailCropConvention;
77
+ /** One section of an `addon-settings.getGlobalSettings` payload. */
78
+ export interface HydratedSettingsSection {
79
+ readonly fields: readonly unknown[];
80
+ }
81
+ /**
82
+ * Minimal structural view of `ConfigUISchemaWithValues` — only what the
83
+ * convention extraction walks. Structural on purpose: the reader is an addon
84
+ * that must not depend on the writer's schema type.
85
+ */
86
+ export interface HydratedSettingsView {
87
+ readonly sections: readonly HydratedSettingsSection[];
88
+ }
89
+ /**
90
+ * Extract the convention from an `addon-settings.getGlobalSettings` payload.
91
+ *
92
+ * Walks EVERY section rather than looking inside {@link DETAIL_CROP_SECTION_ID}
93
+ * alone: the keys are unique across the addon's schema, and a section rename
94
+ * must not silently revert the whole cluster to the default. A `null` payload
95
+ * (addon mid-boot) is the default convention.
96
+ */
97
+ export declare function pickDetailCropConvention(view: HydratedSettingsView | null): DetailCropConvention;
98
+ /** Slider bounds for the operator-facing padding knob (orchestrator settings UI). */
99
+ export declare const DETAIL_CROP_PADDING_FIELD: {
100
+ readonly min: 0;
101
+ readonly max: 1;
102
+ readonly step: 0.05;
103
+ readonly default: number;
104
+ };
105
+ /**
106
+ * Derive the crop rectangle for one parent detection.
107
+ *
108
+ * Order: pad by `paddingRatio` of the box's own size → optionally square in
109
+ * pixel space around the padded centre → keep it inside the frame. Pure:
110
+ * always returns a new rect and never mutates `bbox`.
111
+ *
112
+ * Edge handling differs by mode, on purpose:
113
+ *
114
+ * - **unsquared** — TRUNCATED at the frame border, byte-for-byte what the live
115
+ * path has always done (`padAndClampFrameBbox`). A subject against the edge
116
+ * gets a slightly smaller window. Changing this would silently reinterpret
117
+ * every edge-touching vector already in the index.
118
+ * - **squared** — SLID inward instead, because a truncated square is not
119
+ * square and squaring exists precisely to preserve the aspect the model
120
+ * sees. It only shrinks when the square is larger than the frame itself.
121
+ */
122
+ export declare function deriveDetailCropRect(bbox: DetailCropRect, frameWidth: number, frameHeight: number, convention: DetailCropConvention): DetailCropRect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.39",
3
+ "version": "1.2.41",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",