@camstack/system 1.2.4 → 1.2.5

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.
@@ -4,7 +4,9 @@ import { ProviderContext } from './device-provider-context.js';
4
4
  export declare const LINKED_MODE_CONFIG_KEY = "_linkedDevicesMode";
5
5
  export declare const LINKED_IDS_CONFIG_KEY = "_linkedDeviceIds";
6
6
  /** Reserved key: subset of linked devices that materialize synthetic tracked
7
- * events on the camera. Absent ⇒ ALL linked devices produce tracked events. */
7
+ * events on the camera. Absent ⇒ NONE producing tracked events is an
8
+ * explicit operator OPT-IN (2026-07-22 flip: the old absent⇒ALL default
9
+ * auto-materialized sensor snapshots the operator never asked for). */
8
10
  export declare const LINKED_TRACKED_IDS_CONFIG_KEY = "_linkedDeviceTrackedIds";
9
11
  export interface LinkedDevicesConfig {
10
12
  readonly mode: DeviceLinkMode;
@@ -32,8 +34,9 @@ export declare function resolveLinkedDeviceIds(params: {
32
34
  }): readonly number[];
33
35
  /**
34
36
  * Which linked devices materialize synthetic tracked events on the camera.
35
- * Absent / non-array config key ⇒ ALL linked devices (back-compat with the
36
- * pre-existing "every linked device produces events" behaviour). Otherwise the
37
+ * Absent / non-array config key ⇒ NONE the operator must explicitly pick
38
+ * producers (opt-in; flipped from the legacy absent⇒ALL default, which
39
+ * auto-materialized sensor snapshots for every linked device). Otherwise the
37
40
  * configured subset intersected with the currently-resolved linked set (a
38
41
  * picked id no longer linked is dropped). Ids may arrive as numbers or numeric
39
42
  * strings (the multiselect stores string option values); non-numeric entries
@@ -1210,7 +1210,9 @@ async function testField(pctx, input) {
1210
1210
  var LINKED_MODE_CONFIG_KEY = "_linkedDevicesMode";
1211
1211
  var LINKED_IDS_CONFIG_KEY = "_linkedDeviceIds";
1212
1212
  /** Reserved key: subset of linked devices that materialize synthetic tracked
1213
- * events on the camera. Absent ⇒ ALL linked devices produce tracked events. */
1213
+ * events on the camera. Absent ⇒ NONE producing tracked events is an
1214
+ * explicit operator OPT-IN (2026-07-22 flip: the old absent⇒ALL default
1215
+ * auto-materialized sensor snapshots the operator never asked for). */
1214
1216
  var LINKED_TRACKED_IDS_CONFIG_KEY = "_linkedDeviceTrackedIds";
1215
1217
  /** Parse the two reserved keys out of a device-config blob. Tolerant:
1216
1218
  * ids may arrive as numbers or numeric strings (the multiselect field
@@ -1249,8 +1251,9 @@ function resolveLinkedDeviceIds(params) {
1249
1251
  }
1250
1252
  /**
1251
1253
  * Which linked devices materialize synthetic tracked events on the camera.
1252
- * Absent / non-array config key ⇒ ALL linked devices (back-compat with the
1253
- * pre-existing "every linked device produces events" behaviour). Otherwise the
1254
+ * Absent / non-array config key ⇒ NONE the operator must explicitly pick
1255
+ * producers (opt-in; flipped from the legacy absent⇒ALL default, which
1256
+ * auto-materialized sensor snapshots for every linked device). Otherwise the
1254
1257
  * configured subset intersected with the currently-resolved linked set (a
1255
1258
  * picked id no longer linked is dropped). Ids may arrive as numbers or numeric
1256
1259
  * strings (the multiselect stores string option values); non-numeric entries
@@ -1258,7 +1261,7 @@ function resolveLinkedDeviceIds(params) {
1258
1261
  */
1259
1262
  function resolveTrackedEventDeviceIds(config, linkedIds) {
1260
1263
  const raw = config[LINKED_TRACKED_IDS_CONFIG_KEY];
1261
- if (!Array.isArray(raw)) return linkedIds;
1264
+ if (!Array.isArray(raw)) return [];
1262
1265
  const picked = /* @__PURE__ */ new Set();
1263
1266
  for (const v of raw) {
1264
1267
  const n = typeof v === "number" ? v : typeof v === "string" ? Number(v) : NaN;
@@ -1363,7 +1366,7 @@ async function buildLinkedDevicesContribution(pctx, deviceId) {
1363
1366
  type: "multiselect",
1364
1367
  key: LINKED_TRACKED_IDS_CONFIG_KEY,
1365
1368
  label: "Devices that produce tracked events",
1366
- description: "Linked devices whose state changes materialize a synthetic tracked event on this camera. Default: all linked devices.",
1369
+ description: "Linked devices whose state changes materialize a synthetic tracked event on this camera. Default: none (opt-in).",
1367
1370
  options: trackedOptions,
1368
1371
  value: trackedValue
1369
1372
  }
@@ -1205,7 +1205,9 @@ async function testField(pctx, input) {
1205
1205
  var LINKED_MODE_CONFIG_KEY = "_linkedDevicesMode";
1206
1206
  var LINKED_IDS_CONFIG_KEY = "_linkedDeviceIds";
1207
1207
  /** Reserved key: subset of linked devices that materialize synthetic tracked
1208
- * events on the camera. Absent ⇒ ALL linked devices produce tracked events. */
1208
+ * events on the camera. Absent ⇒ NONE producing tracked events is an
1209
+ * explicit operator OPT-IN (2026-07-22 flip: the old absent⇒ALL default
1210
+ * auto-materialized sensor snapshots the operator never asked for). */
1209
1211
  var LINKED_TRACKED_IDS_CONFIG_KEY = "_linkedDeviceTrackedIds";
1210
1212
  /** Parse the two reserved keys out of a device-config blob. Tolerant:
1211
1213
  * ids may arrive as numbers or numeric strings (the multiselect field
@@ -1244,8 +1246,9 @@ function resolveLinkedDeviceIds(params) {
1244
1246
  }
1245
1247
  /**
1246
1248
  * Which linked devices materialize synthetic tracked events on the camera.
1247
- * Absent / non-array config key ⇒ ALL linked devices (back-compat with the
1248
- * pre-existing "every linked device produces events" behaviour). Otherwise the
1249
+ * Absent / non-array config key ⇒ NONE the operator must explicitly pick
1250
+ * producers (opt-in; flipped from the legacy absent⇒ALL default, which
1251
+ * auto-materialized sensor snapshots for every linked device). Otherwise the
1249
1252
  * configured subset intersected with the currently-resolved linked set (a
1250
1253
  * picked id no longer linked is dropped). Ids may arrive as numbers or numeric
1251
1254
  * strings (the multiselect stores string option values); non-numeric entries
@@ -1253,7 +1256,7 @@ function resolveLinkedDeviceIds(params) {
1253
1256
  */
1254
1257
  function resolveTrackedEventDeviceIds(config, linkedIds) {
1255
1258
  const raw = config[LINKED_TRACKED_IDS_CONFIG_KEY];
1256
- if (!Array.isArray(raw)) return linkedIds;
1259
+ if (!Array.isArray(raw)) return [];
1257
1260
  const picked = /* @__PURE__ */ new Set();
1258
1261
  for (const v of raw) {
1259
1262
  const n = typeof v === "number" ? v : typeof v === "string" ? Number(v) : NaN;
@@ -1358,7 +1361,7 @@ async function buildLinkedDevicesContribution(pctx, deviceId) {
1358
1361
  type: "multiselect",
1359
1362
  key: LINKED_TRACKED_IDS_CONFIG_KEY,
1360
1363
  label: "Devices that produce tracked events",
1361
- description: "Linked devices whose state changes materialize a synthetic tracked event on this camera. Default: all linked devices.",
1364
+ description: "Linked devices whose state changes materialize a synthetic tracked event on this camera. Default: none (opt-in).",
1362
1365
  options: trackedOptions,
1363
1366
  value: trackedValue
1364
1367
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",