@camstack/addon-static-turn 1.2.26 → 1.2.27

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.
@@ -5801,6 +5801,13 @@ var BaseAddon = class {
5801
5801
  _readinessGeneration = typeof crypto !== "undefined" && crypto.randomUUID ? crypto.randomUUID() : Math.random().toString(36).slice(2, 14);
5802
5802
  /** Capability names this addon registered at init — used to emit matching `down` events on shutdown. */
5803
5803
  _registeredCapNames = [];
5804
+ /**
5805
+ * True only after `readAddonStore` actually answered. Constructor
5806
+ * defaults look like stored config when the store is down — a forked
5807
+ * addon that auto-starts from those defaults (cloudflare-tunnel quick
5808
+ * mode, 2026-08-25) is not "the operator chose this".
5809
+ */
5810
+ settingsStoreReady = false;
5804
5811
  /** Default config values. Provided via constructor. */
5805
5812
  defaults;
5806
5813
  constructor(defaults) {
@@ -6201,7 +6208,9 @@ var BaseAddon = class {
6201
6208
  ];
6202
6209
  let lastErr;
6203
6210
  for (let attempt = 0; attempt <= delaysMs.length; attempt++) try {
6204
- return await settings.readAddonStore() ?? {};
6211
+ const stored = await settings.readAddonStore() ?? {};
6212
+ this.settingsStoreReady = true;
6213
+ return stored;
6205
6214
  } catch (err) {
6206
6215
  lastErr = err;
6207
6216
  const msg = err instanceof Error ? err.message : String(err);
@@ -6209,6 +6218,7 @@ var BaseAddon = class {
6209
6218
  if (attempt === delaysMs.length) break;
6210
6219
  await new Promise((r) => setTimeout(r, delaysMs[attempt]));
6211
6220
  }
6221
+ this.settingsStoreReady = false;
6212
6222
  this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
6213
6223
  return {};
6214
6224
  }
@@ -8096,6 +8106,12 @@ var ModelVariantGroupSchema = object({
8096
8106
  */
8097
8107
  resolution: number().int().positive().optional()
8098
8108
  });
8109
+ var ModelProviderIdSchema = _enum([
8110
+ "camstack",
8111
+ "frigate",
8112
+ "scrypted",
8113
+ "custom"
8114
+ ]);
8099
8115
  var ModelCatalogEntrySchema = object({
8100
8116
  id: string(),
8101
8117
  name: string(),
@@ -8193,6 +8209,12 @@ var ModelCatalogEntrySchema = object({
8193
8209
  */
8194
8210
  group: ModelVariantGroupSchema.optional(),
8195
8211
  /**
8212
+ * Catalog source for the pipeline stepper's provider-first picker. Absent on
8213
+ * built-in CamStack entries (treated as `camstack`) and on registry rows
8214
+ * persisted before this field existed (`inferModelProvider` fills those).
8215
+ */
8216
+ provider: ModelProviderIdSchema.optional(),
8217
+ /**
8196
8218
  * Per-MODEL class map override. Absent ⇒ the step's `StepDefinition.classMap`
8197
8219
  * applies (Frigate / COCO public catalog). Set on a custom model whose raw
8198
8220
  * labels already ARE the CamStack macros (Scrypted identity map).
@@ -11720,6 +11742,27 @@ var LinkedDeviceSchema = object({
11720
11742
  features: array(string()),
11721
11743
  producesTrackedEvents: boolean().optional()
11722
11744
  });
11745
+ /** One camera's resolved linked set, tagged with the camera it belongs to.
11746
+ * The batch answer needs the tag; the single-device answer already has it
11747
+ * from the input, which is why `getLinkedDevices` keeps the untagged shape. */
11748
+ var LinkedDevicesForDeviceSchema = object({
11749
+ deviceId: number(),
11750
+ mode: LinkedDevicesModeSchema,
11751
+ devices: array(LinkedDeviceSchema)
11752
+ });
11753
+ /** One device's binding map — the shape `getBindings`, `getBindingsBatch` and
11754
+ * `getAllBindings` all answer in. Declared once: three copies of the same
11755
+ * object literal is exactly how the three drift apart. */
11756
+ var DeviceBindingsForDeviceSchema = object({
11757
+ deviceId: number(),
11758
+ entries: array(object({
11759
+ capName: string(),
11760
+ kind: _enum(["native", "wrapped"]),
11761
+ providerAddonId: string(),
11762
+ providerNodeId: string(),
11763
+ nativeAddonId: string()
11764
+ }))
11765
+ });
11723
11766
  var SavedDeviceRowSchema = object({
11724
11767
  /** Numeric id reserved at allocateDeviceId time. */
11725
11768
  id: number(),
@@ -11945,11 +11988,25 @@ method(object({
11945
11988
  projection: _enum(["full", "slim"]).optional(),
11946
11989
  /** Return only camera devices. Filtering server-side instead of
11947
11990
  * shipping 293 rows to find 12. */
11948
- isCamera: boolean().optional()
11991
+ isCamera: boolean().optional(),
11992
+ /**
11993
+ * Return only these device ids. For the caller that already KNOWS the
11994
+ * handful it wants and needs a field the id-bearing answer does not
11995
+ * carry — the viewer's linked-devices panel joins `type` and `online`
11996
+ * onto ~8 linked ids and, unfiltered, dragged the fleet across to do
11997
+ * it: 433 KB slim / 958 KB full for 967 devices, on a query that
11998
+ * refetches on the reconcile interval, on a phone.
11999
+ *
12000
+ * Safe to send at a hub that predates it: Zod STRIPS unknown input
12001
+ * keys rather than rejecting them (verified against the live hub
12002
+ * 2026-08-25 — 967 rows came back), so an old hub answers exactly what
12003
+ * it answers today and the caller filters as it already does.
12004
+ */
12005
+ deviceIds: array(number()).optional()
11949
12006
  }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
11950
12007
  mode: LinkedDevicesModeSchema,
11951
12008
  devices: array(LinkedDeviceSchema)
11952
- })), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
12009
+ })), method(object({ deviceIds: array(number()) }), array(LinkedDevicesForDeviceSchema)), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
11953
12010
  deviceId: number(),
11954
12011
  values: record(string(), unknown())
11955
12012
  }), object({ success: literal(true) }), {
@@ -11976,25 +12033,7 @@ method(object({
11976
12033
  }), method(object({ deviceId: number() }), array(StreamProbeResultSchema), {
11977
12034
  kind: "mutation",
11978
12035
  auth: "admin"
11979
- }), method(object({ deviceId: number() }), object({
11980
- deviceId: number(),
11981
- entries: array(object({
11982
- capName: string(),
11983
- kind: _enum(["native", "wrapped"]),
11984
- providerAddonId: string(),
11985
- providerNodeId: string(),
11986
- nativeAddonId: string()
11987
- }))
11988
- })), method(object({}), array(object({
11989
- deviceId: number(),
11990
- entries: array(object({
11991
- capName: string(),
11992
- kind: _enum(["native", "wrapped"]),
11993
- providerAddonId: string(),
11994
- providerNodeId: string(),
11995
- nativeAddonId: string()
11996
- }))
11997
- }))), method(object({
12036
+ }), method(object({ deviceId: number() }), DeviceBindingsForDeviceSchema), method(object({ deviceIds: array(number()) }), array(DeviceBindingsForDeviceSchema)), method(object({}), array(DeviceBindingsForDeviceSchema)), method(object({
11998
12037
  deviceId: number(),
11999
12038
  capName: string(),
12000
12039
  wrapperAddonId: string(),
@@ -14366,12 +14405,15 @@ var NcOccupancyConditionSchema = object({
14366
14405
  * there is no second switch that can disagree with the first and every rule
14367
14406
  * authored before the decision migrates for free (`audioModeOf`):
14368
14407
  *
14369
- * - **LABEL mode — `labels` present.** The rule fires on the FIRST frame the
14370
- * classifier labels with one of them. No window, no percentage:
14371
- * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
14372
- * `throttle` cooldown is the only brake. The per-label confidence floor is
14373
- * the analyzer's (`classificationMinScore`, per device) a label only
14374
- * reaches this condition if the classifier was already confident enough.
14408
+ * - **LABEL mode — `labels` present.** The rule fires when `confirmHits`
14409
+ * labelled frames land inside `confirmWindowSec` (default 2 in 5 s).
14410
+ * `hitPercent` and `samplingSeconds` are still ignored a percentage of
14411
+ * frames is the wrong question for a classifier that labels 1–3 frames
14412
+ * per episode. The count window is the brake that drops a single-frame
14413
+ * false positive; the rule's own `throttle` cooldown is the other. The
14414
+ * per-label confidence floor is the analyzer's (`classificationMinScore`,
14415
+ * per device) — a label only reaches this condition if the classifier was
14416
+ * already confident enough. `confirmHits: 1` restores first-frame fire.
14375
14417
  * - **LEVEL mode — `dbThreshold` present, no labels.** The sampling window IS
14376
14418
  * the condition: at least `hitPercent`% of the samples over
14377
14419
  * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
@@ -14398,14 +14440,22 @@ var NcOccupancyConditionSchema = object({
14398
14440
  * an operator who typed `dog` mean the same thing.
14399
14441
  */
14400
14442
  var NcAudioConditionSchema = object({
14401
- /** LABEL MODE: audio macro labels. Present ⇒ fires on the first labelled frame. */
14443
+ /** LABEL MODE: audio macro labels. Present ⇒ count-in-window confirm. */
14402
14444
  labels: array(string().min(1)).min(1).optional(),
14403
14445
  /** LEVEL MODE: floor in dBFS (negative-going, `0` = full scale). */
14404
14446
  dbThreshold: number().min(-96).max(0).optional(),
14405
14447
  /** LEVEL MODE ONLY: percentage of the window's samples that must be hits (1–100). */
14406
14448
  hitPercent: number().int().min(1).max(100).default(60),
14407
14449
  /** LEVEL MODE ONLY: length of the sampling window in seconds. */
14408
- samplingSeconds: number().int().min(1).max(300).default(10)
14450
+ samplingSeconds: number().int().min(1).max(300).default(10),
14451
+ /**
14452
+ * LABEL MODE: how many labelled frames must land inside
14453
+ * {@link NcAudioConditionSchema.shape.confirmWindowSec} before dispatch.
14454
+ * Absent ⇒ 2 (the matcher default). `1` is first-frame fire.
14455
+ */
14456
+ confirmHits: number().int().min(1).max(20).optional(),
14457
+ /** LABEL MODE: the window those frames must share, in seconds. Absent ⇒ 5. */
14458
+ confirmWindowSec: number().int().min(1).max(60).optional()
14409
14459
  });
14410
14460
  /**
14411
14461
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
@@ -16779,6 +16829,46 @@ var RecentTracksPageSchema = object({
16779
16829
  /** Cursor for the next page, or null when this page is the last. */
16780
16830
  nextCursor: string().nullable()
16781
16831
  });
16832
+ var LIST_GROUPS_DEFAULT_LIMIT = 40;
16833
+ var LIST_GROUPS_MAX_LIMIT = 100;
16834
+ var AnalyticsGroupRecordSchema = object({
16835
+ id: string(),
16836
+ deviceId: number().int(),
16837
+ openedAt: number().int(),
16838
+ closedAt: number().int(),
16839
+ timestamp: number().int(),
16840
+ memberCount: number().int(),
16841
+ memberTrackIds: array(string()).readonly(),
16842
+ className: string(),
16843
+ classes: array(string()).readonly(),
16844
+ /** Relative event-media path, or null when the group has no picture yet. */
16845
+ mediaUrl: string().nullable(),
16846
+ singleton: boolean()
16847
+ });
16848
+ var AnalyticsGroupMemberSchema = object({
16849
+ trackId: string(),
16850
+ deviceId: number().int(),
16851
+ className: string(),
16852
+ firstSeen: number().int(),
16853
+ lastSeen: number().int(),
16854
+ mediaUrl: string().nullable()
16855
+ });
16856
+ var AnalyticsGroupDetailSchema = AnalyticsGroupRecordSchema.extend({ members: array(AnalyticsGroupMemberSchema).readonly() });
16857
+ var ListGroupsQueryInput = object({
16858
+ /** Devices to merge. An empty array yields `{ groups: [], nextCursor: null }`. */
16859
+ deviceIds: array(number()),
16860
+ /** Window lower bound on `closedAt` (inclusive). */
16861
+ since: number().optional(),
16862
+ /** Window upper bound on `openedAt` (inclusive). */
16863
+ until: number().optional(),
16864
+ limit: number().int().min(1).max(LIST_GROUPS_MAX_LIMIT).default(LIST_GROUPS_DEFAULT_LIMIT),
16865
+ /** Opaque continuation cursor from a previous page's `nextCursor`. */
16866
+ cursor: string().optional()
16867
+ });
16868
+ var ListGroupsPageSchema = object({
16869
+ groups: array(AnalyticsGroupRecordSchema).readonly(),
16870
+ nextCursor: string().nullable()
16871
+ });
16782
16872
  var KeyEventQueryInput = object({
16783
16873
  deviceId: number(),
16784
16874
  /** Window lower bound (track firstSeen ≥ since). */
@@ -16854,7 +16944,9 @@ var TrackCascadeCountsSchema = object({
16854
16944
  /** Unassigned plate reads removed (best-effort; plate leg deferred to plate-intelligence). */
16855
16945
  plates: number().int(),
16856
16946
  /** Per-track CLIP search vectors removed (best-effort). */
16857
- embeddings: number().int()
16947
+ embeddings: number().int(),
16948
+ /** Group membership + group rows removed with their last member (best-effort). */
16949
+ groups: number().int()
16858
16950
  });
16859
16951
  /** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
16860
16952
  var DiskReconcileCountsSchema = object({
@@ -17000,7 +17092,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17000
17092
  * stationary registry). Default false: the timeline lists passages,
17001
17093
  * not parking records (operator decision, 2026-08-15). */
17002
17094
  includeStationary: boolean().optional()
17003
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
17095
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(ListGroupsQueryInput, ListGroupsPageSchema), method(object({
17096
+ deviceId: number(),
17097
+ groupId: string().min(1)
17098
+ }), AnalyticsGroupDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
17004
17099
  kind: "mutation",
17005
17100
  auth: "admin"
17006
17101
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -17310,7 +17405,8 @@ var PipelineModelOptionSchema = object({
17310
17405
  sizeMB: number()
17311
17406
  })),
17312
17407
  group: ModelVariantGroupSchema.optional(),
17313
- legacy: boolean().optional()
17408
+ legacy: boolean().optional(),
17409
+ provider: ModelProviderIdSchema.optional()
17314
17410
  });
17315
17411
  var ConfigFieldBridge = custom();
17316
17412
  var PipelineAddonSchemaSchema = object({
@@ -23917,7 +24013,12 @@ var PlateInfoSchema = object({
23917
24013
  plateBbox: BoundingBoxSchema.optional(),
23918
24014
  /** keyFrame parity: MediaStore key of the track's native-resolution key frame. */
23919
24015
  keyFrameMediaKey: string().optional(),
23920
- base64: string().optional()
24016
+ base64: string().optional(),
24017
+ /**
24018
+ * Same crop as a data-plane URL. `getPlateByTrack` returns this and
24019
+ * never inlines JPEG; `listPlates` still inlines for the admin-ui.
24020
+ */
24021
+ cropUrl: string().optional()
23921
24022
  });
23922
24023
  var MediaFileLiteSchema = object({
23923
24024
  key: string(),
@@ -27557,6 +27658,12 @@ Object.freeze({
27557
27658
  addonId: null,
27558
27659
  access: "view"
27559
27660
  },
27661
+ "deviceManager.getBindingsBatch": {
27662
+ capName: "device-manager",
27663
+ capScope: "system",
27664
+ addonId: null,
27665
+ access: "view"
27666
+ },
27560
27667
  "deviceManager.getChildren": {
27561
27668
  capName: "device-manager",
27562
27669
  capScope: "system",
@@ -27617,6 +27724,12 @@ Object.freeze({
27617
27724
  addonId: null,
27618
27725
  access: "view"
27619
27726
  },
27727
+ "deviceManager.getLinkedDevicesBatch": {
27728
+ capName: "device-manager",
27729
+ capScope: "system",
27730
+ addonId: null,
27731
+ access: "view"
27732
+ },
27620
27733
  "deviceManager.getRoleDisplayDefaults": {
27621
27734
  capName: "device-manager",
27622
27735
  capScope: "system",
@@ -29387,6 +29500,12 @@ Object.freeze({
29387
29500
  addonId: null,
29388
29501
  access: "view"
29389
29502
  },
29503
+ "pipelineAnalytics.getGroup": {
29504
+ capName: "pipeline-analytics",
29505
+ capScope: "device",
29506
+ addonId: null,
29507
+ access: "view"
29508
+ },
29390
29509
  "pipelineAnalytics.getKeyEvents": {
29391
29510
  capName: "pipeline-analytics",
29392
29511
  capScope: "device",
@@ -29471,6 +29590,12 @@ Object.freeze({
29471
29590
  addonId: null,
29472
29591
  access: "view"
29473
29592
  },
29593
+ "pipelineAnalytics.listGroups": {
29594
+ capName: "pipeline-analytics",
29595
+ capScope: "device",
29596
+ addonId: null,
29597
+ access: "view"
29598
+ },
29474
29599
  "pipelineAnalytics.listOpsLog": {
29475
29600
  capName: "pipeline-analytics",
29476
29601
  capScope: "device",
@@ -32252,6 +32377,11 @@ Object.freeze({
32252
32377
  form: "single",
32253
32378
  optional: false
32254
32379
  }],
32380
+ "deviceManager.getBindingsBatch": [{
32381
+ name: "deviceIds",
32382
+ form: "array",
32383
+ optional: false
32384
+ }],
32255
32385
  "deviceManager.getChildren": [{
32256
32386
  name: "parentDeviceId",
32257
32387
  form: "single",
@@ -32297,6 +32427,11 @@ Object.freeze({
32297
32427
  form: "single",
32298
32428
  optional: false
32299
32429
  }],
32430
+ "deviceManager.getLinkedDevicesBatch": [{
32431
+ name: "deviceIds",
32432
+ form: "array",
32433
+ optional: false
32434
+ }],
32300
32435
  "deviceManager.getSettingsSchema": [{
32301
32436
  name: "deviceId",
32302
32437
  form: "single",
@@ -32317,6 +32452,11 @@ Object.freeze({
32317
32452
  form: "single",
32318
32453
  optional: false
32319
32454
  }],
32455
+ "deviceManager.listAll": [{
32456
+ name: "deviceIds",
32457
+ form: "array",
32458
+ optional: true
32459
+ }],
32320
32460
  "deviceManager.loadConfig": [{
32321
32461
  name: "deviceId",
32322
32462
  form: "single",
@@ -32890,6 +33030,11 @@ Object.freeze({
32890
33030
  form: "single",
32891
33031
  optional: false
32892
33032
  }],
33033
+ "pipelineAnalytics.getGroup": [{
33034
+ name: "deviceId",
33035
+ form: "single",
33036
+ optional: false
33037
+ }],
32893
33038
  "pipelineAnalytics.getKeyEvents": [{
32894
33039
  name: "deviceId",
32895
33040
  form: "single",
@@ -32945,6 +33090,11 @@ Object.freeze({
32945
33090
  form: "array",
32946
33091
  optional: false
32947
33092
  }],
33093
+ "pipelineAnalytics.listGroups": [{
33094
+ name: "deviceIds",
33095
+ form: "array",
33096
+ optional: false
33097
+ }],
32948
33098
  "pipelineAnalytics.listOpsLog": [{
32949
33099
  name: "deviceId",
32950
33100
  form: "single",
@@ -5800,6 +5800,13 @@ var BaseAddon = class {
5800
5800
  _readinessGeneration = typeof crypto !== "undefined" && crypto.randomUUID ? crypto.randomUUID() : Math.random().toString(36).slice(2, 14);
5801
5801
  /** Capability names this addon registered at init — used to emit matching `down` events on shutdown. */
5802
5802
  _registeredCapNames = [];
5803
+ /**
5804
+ * True only after `readAddonStore` actually answered. Constructor
5805
+ * defaults look like stored config when the store is down — a forked
5806
+ * addon that auto-starts from those defaults (cloudflare-tunnel quick
5807
+ * mode, 2026-08-25) is not "the operator chose this".
5808
+ */
5809
+ settingsStoreReady = false;
5803
5810
  /** Default config values. Provided via constructor. */
5804
5811
  defaults;
5805
5812
  constructor(defaults) {
@@ -6200,7 +6207,9 @@ var BaseAddon = class {
6200
6207
  ];
6201
6208
  let lastErr;
6202
6209
  for (let attempt = 0; attempt <= delaysMs.length; attempt++) try {
6203
- return await settings.readAddonStore() ?? {};
6210
+ const stored = await settings.readAddonStore() ?? {};
6211
+ this.settingsStoreReady = true;
6212
+ return stored;
6204
6213
  } catch (err) {
6205
6214
  lastErr = err;
6206
6215
  const msg = err instanceof Error ? err.message : String(err);
@@ -6208,6 +6217,7 @@ var BaseAddon = class {
6208
6217
  if (attempt === delaysMs.length) break;
6209
6218
  await new Promise((r) => setTimeout(r, delaysMs[attempt]));
6210
6219
  }
6220
+ this.settingsStoreReady = false;
6211
6221
  this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
6212
6222
  return {};
6213
6223
  }
@@ -8095,6 +8105,12 @@ var ModelVariantGroupSchema = object({
8095
8105
  */
8096
8106
  resolution: number().int().positive().optional()
8097
8107
  });
8108
+ var ModelProviderIdSchema = _enum([
8109
+ "camstack",
8110
+ "frigate",
8111
+ "scrypted",
8112
+ "custom"
8113
+ ]);
8098
8114
  var ModelCatalogEntrySchema = object({
8099
8115
  id: string(),
8100
8116
  name: string(),
@@ -8192,6 +8208,12 @@ var ModelCatalogEntrySchema = object({
8192
8208
  */
8193
8209
  group: ModelVariantGroupSchema.optional(),
8194
8210
  /**
8211
+ * Catalog source for the pipeline stepper's provider-first picker. Absent on
8212
+ * built-in CamStack entries (treated as `camstack`) and on registry rows
8213
+ * persisted before this field existed (`inferModelProvider` fills those).
8214
+ */
8215
+ provider: ModelProviderIdSchema.optional(),
8216
+ /**
8195
8217
  * Per-MODEL class map override. Absent ⇒ the step's `StepDefinition.classMap`
8196
8218
  * applies (Frigate / COCO public catalog). Set on a custom model whose raw
8197
8219
  * labels already ARE the CamStack macros (Scrypted identity map).
@@ -11719,6 +11741,27 @@ var LinkedDeviceSchema = object({
11719
11741
  features: array(string()),
11720
11742
  producesTrackedEvents: boolean().optional()
11721
11743
  });
11744
+ /** One camera's resolved linked set, tagged with the camera it belongs to.
11745
+ * The batch answer needs the tag; the single-device answer already has it
11746
+ * from the input, which is why `getLinkedDevices` keeps the untagged shape. */
11747
+ var LinkedDevicesForDeviceSchema = object({
11748
+ deviceId: number(),
11749
+ mode: LinkedDevicesModeSchema,
11750
+ devices: array(LinkedDeviceSchema)
11751
+ });
11752
+ /** One device's binding map — the shape `getBindings`, `getBindingsBatch` and
11753
+ * `getAllBindings` all answer in. Declared once: three copies of the same
11754
+ * object literal is exactly how the three drift apart. */
11755
+ var DeviceBindingsForDeviceSchema = object({
11756
+ deviceId: number(),
11757
+ entries: array(object({
11758
+ capName: string(),
11759
+ kind: _enum(["native", "wrapped"]),
11760
+ providerAddonId: string(),
11761
+ providerNodeId: string(),
11762
+ nativeAddonId: string()
11763
+ }))
11764
+ });
11722
11765
  var SavedDeviceRowSchema = object({
11723
11766
  /** Numeric id reserved at allocateDeviceId time. */
11724
11767
  id: number(),
@@ -11944,11 +11987,25 @@ method(object({
11944
11987
  projection: _enum(["full", "slim"]).optional(),
11945
11988
  /** Return only camera devices. Filtering server-side instead of
11946
11989
  * shipping 293 rows to find 12. */
11947
- isCamera: boolean().optional()
11990
+ isCamera: boolean().optional(),
11991
+ /**
11992
+ * Return only these device ids. For the caller that already KNOWS the
11993
+ * handful it wants and needs a field the id-bearing answer does not
11994
+ * carry — the viewer's linked-devices panel joins `type` and `online`
11995
+ * onto ~8 linked ids and, unfiltered, dragged the fleet across to do
11996
+ * it: 433 KB slim / 958 KB full for 967 devices, on a query that
11997
+ * refetches on the reconcile interval, on a phone.
11998
+ *
11999
+ * Safe to send at a hub that predates it: Zod STRIPS unknown input
12000
+ * keys rather than rejecting them (verified against the live hub
12001
+ * 2026-08-25 — 967 rows came back), so an old hub answers exactly what
12002
+ * it answers today and the caller filters as it already does.
12003
+ */
12004
+ deviceIds: array(number()).optional()
11948
12005
  }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
11949
12006
  mode: LinkedDevicesModeSchema,
11950
12007
  devices: array(LinkedDeviceSchema)
11951
- })), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
12008
+ })), method(object({ deviceIds: array(number()) }), array(LinkedDevicesForDeviceSchema)), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
11952
12009
  deviceId: number(),
11953
12010
  values: record(string(), unknown())
11954
12011
  }), object({ success: literal(true) }), {
@@ -11975,25 +12032,7 @@ method(object({
11975
12032
  }), method(object({ deviceId: number() }), array(StreamProbeResultSchema), {
11976
12033
  kind: "mutation",
11977
12034
  auth: "admin"
11978
- }), method(object({ deviceId: number() }), object({
11979
- deviceId: number(),
11980
- entries: array(object({
11981
- capName: string(),
11982
- kind: _enum(["native", "wrapped"]),
11983
- providerAddonId: string(),
11984
- providerNodeId: string(),
11985
- nativeAddonId: string()
11986
- }))
11987
- })), method(object({}), array(object({
11988
- deviceId: number(),
11989
- entries: array(object({
11990
- capName: string(),
11991
- kind: _enum(["native", "wrapped"]),
11992
- providerAddonId: string(),
11993
- providerNodeId: string(),
11994
- nativeAddonId: string()
11995
- }))
11996
- }))), method(object({
12035
+ }), method(object({ deviceId: number() }), DeviceBindingsForDeviceSchema), method(object({ deviceIds: array(number()) }), array(DeviceBindingsForDeviceSchema)), method(object({}), array(DeviceBindingsForDeviceSchema)), method(object({
11997
12036
  deviceId: number(),
11998
12037
  capName: string(),
11999
12038
  wrapperAddonId: string(),
@@ -14365,12 +14404,15 @@ var NcOccupancyConditionSchema = object({
14365
14404
  * there is no second switch that can disagree with the first and every rule
14366
14405
  * authored before the decision migrates for free (`audioModeOf`):
14367
14406
  *
14368
- * - **LABEL mode — `labels` present.** The rule fires on the FIRST frame the
14369
- * classifier labels with one of them. No window, no percentage:
14370
- * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
14371
- * `throttle` cooldown is the only brake. The per-label confidence floor is
14372
- * the analyzer's (`classificationMinScore`, per device) a label only
14373
- * reaches this condition if the classifier was already confident enough.
14407
+ * - **LABEL mode — `labels` present.** The rule fires when `confirmHits`
14408
+ * labelled frames land inside `confirmWindowSec` (default 2 in 5 s).
14409
+ * `hitPercent` and `samplingSeconds` are still ignored a percentage of
14410
+ * frames is the wrong question for a classifier that labels 1–3 frames
14411
+ * per episode. The count window is the brake that drops a single-frame
14412
+ * false positive; the rule's own `throttle` cooldown is the other. The
14413
+ * per-label confidence floor is the analyzer's (`classificationMinScore`,
14414
+ * per device) — a label only reaches this condition if the classifier was
14415
+ * already confident enough. `confirmHits: 1` restores first-frame fire.
14374
14416
  * - **LEVEL mode — `dbThreshold` present, no labels.** The sampling window IS
14375
14417
  * the condition: at least `hitPercent`% of the samples over
14376
14418
  * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
@@ -14397,14 +14439,22 @@ var NcOccupancyConditionSchema = object({
14397
14439
  * an operator who typed `dog` mean the same thing.
14398
14440
  */
14399
14441
  var NcAudioConditionSchema = object({
14400
- /** LABEL MODE: audio macro labels. Present ⇒ fires on the first labelled frame. */
14442
+ /** LABEL MODE: audio macro labels. Present ⇒ count-in-window confirm. */
14401
14443
  labels: array(string().min(1)).min(1).optional(),
14402
14444
  /** LEVEL MODE: floor in dBFS (negative-going, `0` = full scale). */
14403
14445
  dbThreshold: number().min(-96).max(0).optional(),
14404
14446
  /** LEVEL MODE ONLY: percentage of the window's samples that must be hits (1–100). */
14405
14447
  hitPercent: number().int().min(1).max(100).default(60),
14406
14448
  /** LEVEL MODE ONLY: length of the sampling window in seconds. */
14407
- samplingSeconds: number().int().min(1).max(300).default(10)
14449
+ samplingSeconds: number().int().min(1).max(300).default(10),
14450
+ /**
14451
+ * LABEL MODE: how many labelled frames must land inside
14452
+ * {@link NcAudioConditionSchema.shape.confirmWindowSec} before dispatch.
14453
+ * Absent ⇒ 2 (the matcher default). `1` is first-frame fire.
14454
+ */
14455
+ confirmHits: number().int().min(1).max(20).optional(),
14456
+ /** LABEL MODE: the window those frames must share, in seconds. Absent ⇒ 5. */
14457
+ confirmWindowSec: number().int().min(1).max(60).optional()
14408
14458
  });
14409
14459
  /**
14410
14460
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
@@ -16778,6 +16828,46 @@ var RecentTracksPageSchema = object({
16778
16828
  /** Cursor for the next page, or null when this page is the last. */
16779
16829
  nextCursor: string().nullable()
16780
16830
  });
16831
+ var LIST_GROUPS_DEFAULT_LIMIT = 40;
16832
+ var LIST_GROUPS_MAX_LIMIT = 100;
16833
+ var AnalyticsGroupRecordSchema = object({
16834
+ id: string(),
16835
+ deviceId: number().int(),
16836
+ openedAt: number().int(),
16837
+ closedAt: number().int(),
16838
+ timestamp: number().int(),
16839
+ memberCount: number().int(),
16840
+ memberTrackIds: array(string()).readonly(),
16841
+ className: string(),
16842
+ classes: array(string()).readonly(),
16843
+ /** Relative event-media path, or null when the group has no picture yet. */
16844
+ mediaUrl: string().nullable(),
16845
+ singleton: boolean()
16846
+ });
16847
+ var AnalyticsGroupMemberSchema = object({
16848
+ trackId: string(),
16849
+ deviceId: number().int(),
16850
+ className: string(),
16851
+ firstSeen: number().int(),
16852
+ lastSeen: number().int(),
16853
+ mediaUrl: string().nullable()
16854
+ });
16855
+ var AnalyticsGroupDetailSchema = AnalyticsGroupRecordSchema.extend({ members: array(AnalyticsGroupMemberSchema).readonly() });
16856
+ var ListGroupsQueryInput = object({
16857
+ /** Devices to merge. An empty array yields `{ groups: [], nextCursor: null }`. */
16858
+ deviceIds: array(number()),
16859
+ /** Window lower bound on `closedAt` (inclusive). */
16860
+ since: number().optional(),
16861
+ /** Window upper bound on `openedAt` (inclusive). */
16862
+ until: number().optional(),
16863
+ limit: number().int().min(1).max(LIST_GROUPS_MAX_LIMIT).default(LIST_GROUPS_DEFAULT_LIMIT),
16864
+ /** Opaque continuation cursor from a previous page's `nextCursor`. */
16865
+ cursor: string().optional()
16866
+ });
16867
+ var ListGroupsPageSchema = object({
16868
+ groups: array(AnalyticsGroupRecordSchema).readonly(),
16869
+ nextCursor: string().nullable()
16870
+ });
16781
16871
  var KeyEventQueryInput = object({
16782
16872
  deviceId: number(),
16783
16873
  /** Window lower bound (track firstSeen ≥ since). */
@@ -16853,7 +16943,9 @@ var TrackCascadeCountsSchema = object({
16853
16943
  /** Unassigned plate reads removed (best-effort; plate leg deferred to plate-intelligence). */
16854
16944
  plates: number().int(),
16855
16945
  /** Per-track CLIP search vectors removed (best-effort). */
16856
- embeddings: number().int()
16946
+ embeddings: number().int(),
16947
+ /** Group membership + group rows removed with their last member (best-effort). */
16948
+ groups: number().int()
16857
16949
  });
16858
16950
  /** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
16859
16951
  var DiskReconcileCountsSchema = object({
@@ -16999,7 +17091,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16999
17091
  * stationary registry). Default false: the timeline lists passages,
17000
17092
  * not parking records (operator decision, 2026-08-15). */
17001
17093
  includeStationary: boolean().optional()
17002
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
17094
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(ListGroupsQueryInput, ListGroupsPageSchema), method(object({
17095
+ deviceId: number(),
17096
+ groupId: string().min(1)
17097
+ }), AnalyticsGroupDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
17003
17098
  kind: "mutation",
17004
17099
  auth: "admin"
17005
17100
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -17309,7 +17404,8 @@ var PipelineModelOptionSchema = object({
17309
17404
  sizeMB: number()
17310
17405
  })),
17311
17406
  group: ModelVariantGroupSchema.optional(),
17312
- legacy: boolean().optional()
17407
+ legacy: boolean().optional(),
17408
+ provider: ModelProviderIdSchema.optional()
17313
17409
  });
17314
17410
  var ConfigFieldBridge = custom();
17315
17411
  var PipelineAddonSchemaSchema = object({
@@ -23916,7 +24012,12 @@ var PlateInfoSchema = object({
23916
24012
  plateBbox: BoundingBoxSchema.optional(),
23917
24013
  /** keyFrame parity: MediaStore key of the track's native-resolution key frame. */
23918
24014
  keyFrameMediaKey: string().optional(),
23919
- base64: string().optional()
24015
+ base64: string().optional(),
24016
+ /**
24017
+ * Same crop as a data-plane URL. `getPlateByTrack` returns this and
24018
+ * never inlines JPEG; `listPlates` still inlines for the admin-ui.
24019
+ */
24020
+ cropUrl: string().optional()
23920
24021
  });
23921
24022
  var MediaFileLiteSchema = object({
23922
24023
  key: string(),
@@ -27556,6 +27657,12 @@ Object.freeze({
27556
27657
  addonId: null,
27557
27658
  access: "view"
27558
27659
  },
27660
+ "deviceManager.getBindingsBatch": {
27661
+ capName: "device-manager",
27662
+ capScope: "system",
27663
+ addonId: null,
27664
+ access: "view"
27665
+ },
27559
27666
  "deviceManager.getChildren": {
27560
27667
  capName: "device-manager",
27561
27668
  capScope: "system",
@@ -27616,6 +27723,12 @@ Object.freeze({
27616
27723
  addonId: null,
27617
27724
  access: "view"
27618
27725
  },
27726
+ "deviceManager.getLinkedDevicesBatch": {
27727
+ capName: "device-manager",
27728
+ capScope: "system",
27729
+ addonId: null,
27730
+ access: "view"
27731
+ },
27619
27732
  "deviceManager.getRoleDisplayDefaults": {
27620
27733
  capName: "device-manager",
27621
27734
  capScope: "system",
@@ -29386,6 +29499,12 @@ Object.freeze({
29386
29499
  addonId: null,
29387
29500
  access: "view"
29388
29501
  },
29502
+ "pipelineAnalytics.getGroup": {
29503
+ capName: "pipeline-analytics",
29504
+ capScope: "device",
29505
+ addonId: null,
29506
+ access: "view"
29507
+ },
29389
29508
  "pipelineAnalytics.getKeyEvents": {
29390
29509
  capName: "pipeline-analytics",
29391
29510
  capScope: "device",
@@ -29470,6 +29589,12 @@ Object.freeze({
29470
29589
  addonId: null,
29471
29590
  access: "view"
29472
29591
  },
29592
+ "pipelineAnalytics.listGroups": {
29593
+ capName: "pipeline-analytics",
29594
+ capScope: "device",
29595
+ addonId: null,
29596
+ access: "view"
29597
+ },
29473
29598
  "pipelineAnalytics.listOpsLog": {
29474
29599
  capName: "pipeline-analytics",
29475
29600
  capScope: "device",
@@ -32251,6 +32376,11 @@ Object.freeze({
32251
32376
  form: "single",
32252
32377
  optional: false
32253
32378
  }],
32379
+ "deviceManager.getBindingsBatch": [{
32380
+ name: "deviceIds",
32381
+ form: "array",
32382
+ optional: false
32383
+ }],
32254
32384
  "deviceManager.getChildren": [{
32255
32385
  name: "parentDeviceId",
32256
32386
  form: "single",
@@ -32296,6 +32426,11 @@ Object.freeze({
32296
32426
  form: "single",
32297
32427
  optional: false
32298
32428
  }],
32429
+ "deviceManager.getLinkedDevicesBatch": [{
32430
+ name: "deviceIds",
32431
+ form: "array",
32432
+ optional: false
32433
+ }],
32299
32434
  "deviceManager.getSettingsSchema": [{
32300
32435
  name: "deviceId",
32301
32436
  form: "single",
@@ -32316,6 +32451,11 @@ Object.freeze({
32316
32451
  form: "single",
32317
32452
  optional: false
32318
32453
  }],
32454
+ "deviceManager.listAll": [{
32455
+ name: "deviceIds",
32456
+ form: "array",
32457
+ optional: true
32458
+ }],
32319
32459
  "deviceManager.loadConfig": [{
32320
32460
  name: "deviceId",
32321
32461
  form: "single",
@@ -32889,6 +33029,11 @@ Object.freeze({
32889
33029
  form: "single",
32890
33030
  optional: false
32891
33031
  }],
33032
+ "pipelineAnalytics.getGroup": [{
33033
+ name: "deviceId",
33034
+ form: "single",
33035
+ optional: false
33036
+ }],
32892
33037
  "pipelineAnalytics.getKeyEvents": [{
32893
33038
  name: "deviceId",
32894
33039
  form: "single",
@@ -32944,6 +33089,11 @@ Object.freeze({
32944
33089
  form: "array",
32945
33090
  optional: false
32946
33091
  }],
33092
+ "pipelineAnalytics.listGroups": [{
33093
+ name: "deviceIds",
33094
+ form: "array",
33095
+ optional: false
33096
+ }],
32947
33097
  "pipelineAnalytics.listOpsLog": [{
32948
33098
  name: "deviceId",
32949
33099
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-static-turn",
3
- "version": "1.2.26",
3
+ "version": "1.2.27",
4
4
  "description": "Static / self-hosted (coturn) TURN provider for CamStack",
5
5
  "keywords": [
6
6
  "camstack",