@camstack/addon-ai 0.2.20 → 0.2.21

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.
package/dist/addon.js CHANGED
@@ -13071,11 +13071,33 @@ var NotificationFormatSchema = _enum([
13071
13071
  * Named by INTENT, never by glyph. "check" would tie the vocabulary to one
13072
13072
  * renderer's icon set; "acknowledge" survives an adapter that draws it
13073
13073
  * differently.
13074
+ *
13075
+ * ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
13076
+ *
13077
+ * These names are for US. **No adapter may forward one verbatim.** Each maps
13078
+ * the whole set onto its own renderer's vocabulary through a
13079
+ * `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
13080
+ * fallback, so adding a member here fails every adapter's build until someone
13081
+ * decides its glyph, which is the only place that decision can be made
13082
+ * honestly.
13083
+ *
13084
+ * This paragraph is the bug. Zentik declared `actionIcons: true` and passed
13085
+ * `disarm` straight through; iOS feeds that string to
13086
+ * `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
13087
+ * and every snooze and alarm button arrived BLANK. A pass-through is not a
13088
+ * mapping, and "the field is documented" is not "the value renders".
13089
+ *
13090
+ * Adding a member is TRAIN-BOUND. The enum lives in the published
13091
+ * `@camstack/server` closure and the cap seam validates against the HUB's copy,
13092
+ * so an addon that emits a token the running hub does not know does not lose an
13093
+ * icon — its whole `send` fails Zod validation and the notification never
13094
+ * arrives. Never emit a new token from an addon before the train carrying it.
13074
13095
  */
13075
13096
  var NotificationActionIconSchema = _enum([
13076
13097
  "acknowledge",
13077
13098
  "dismiss",
13078
13099
  "silence",
13100
+ "snooze",
13079
13101
  "view",
13080
13102
  "play",
13081
13103
  "open",
@@ -13083,9 +13105,13 @@ var NotificationActionIconSchema = _enum([
13083
13105
  "lock",
13084
13106
  "unlock",
13085
13107
  "arm",
13108
+ "arm-home",
13109
+ "arm-away",
13110
+ "arm-night",
13086
13111
  "disarm",
13087
13112
  "light",
13088
- "alert"
13113
+ "alert",
13114
+ "camera"
13089
13115
  ]);
13090
13116
  /** A single tap-through action button. */
13091
13117
  var NotificationActionSchema = object({
@@ -13285,6 +13311,24 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
13285
13311
  targetId: string(),
13286
13312
  enabled: boolean()
13287
13313
  }), _void(), { kind: "mutation" });
13314
+ new Set([
13315
+ {
13316
+ id: "person",
13317
+ name: "Person"
13318
+ },
13319
+ {
13320
+ id: "vehicle",
13321
+ name: "Vehicle"
13322
+ },
13323
+ {
13324
+ id: "animal",
13325
+ name: "Animal"
13326
+ },
13327
+ {
13328
+ id: "package",
13329
+ name: "Package"
13330
+ }
13331
+ ].map((l) => l.id));
13288
13332
  var COCO_TO_MACRO = {
13289
13333
  mapping: {
13290
13334
  person: "person",
@@ -14082,6 +14126,8 @@ var NcSystemEventKindSchema = _enum([
14082
14126
  "alarm-triggered",
14083
14127
  "alarm-armed",
14084
14128
  "alarm-disarmed",
14129
+ "alarm-arming",
14130
+ "alarm-arm-refused",
14085
14131
  "camera-online",
14086
14132
  "camera-offline",
14087
14133
  "camera-disabled",
@@ -17314,6 +17360,22 @@ var detectionFpsField = {
17314
17360
  default: 10,
17315
17361
  step: 1
17316
17362
  };
17363
+ /**
17364
+ * The occupancy re-check interval. DEFAULT 300 s (2026-08-13 — was 30 s).
17365
+ *
17366
+ * The recheck is now on by default (a parked car is invisible to occupancy
17367
+ * rules until the stationary registry has been rebuilt by motion, which after a
17368
+ * restart may be never on a quiet camera). Each cycle re-subscribes a detection
17369
+ * session — an RTSP re-dial — so the switch is only affordable at a WIDE
17370
+ * interval: 300 s is ~12 re-dials an hour per camera, against 120 at the old
17371
+ * 30 s. A parked car is therefore counted within 5 minutes of a restart.
17372
+ *
17373
+ * Why not wider: `max` is 300 and raising it is TRAIN-BOUND, not addon-bound —
17374
+ * the host validates `attachCamera` against ITS copy of this schema, so a
17375
+ * runner asked for 600 would be rejected by the hub until a `@camstack/server`
17376
+ * carrying the wider bound is installed everywhere. 300 is the widest value
17377
+ * that ships with an addon deploy.
17378
+ */
17317
17379
  var occupancyRecheckSecField = {
17318
17380
  min: 0,
17319
17381
  max: 300,
@@ -17515,15 +17577,21 @@ var RunnerCameraConfigSchema = object({
17515
17577
  */
17516
17578
  onboardMotionDrivesAnalyzer: boolean().default(true),
17517
17579
  /**
17518
- * Master toggle for the occupancy re-check. When `false` (DEFAULT) the runner
17519
- * never arms the periodic recheck timer, regardless of `occupancyRecheckSec` —
17520
- * this is off by default because the recheck re-subscribes a detection session
17521
- * every N seconds while `watching`, a major source of pull-decoder re-dial
17522
- * churn (each cycle creates+tears a session → RTSP re-dial → latency). The
17580
+ * Master toggle for the occupancy re-check. When `false` the runner never arms
17581
+ * the periodic recheck timer, regardless of `occupancyRecheckSec`; the
17523
17582
  * `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
17524
17583
  * (and only render) when this is enabled.
17525
- */
17526
- occupancyRecheckEnabled: boolean().default(false),
17584
+ *
17585
+ * DEFAULT `true` since 2026-08-13 (was `false`). It was off because the
17586
+ * recheck re-subscribes a detection session every N seconds while `watching`
17587
+ * — each cycle creates+tears a session ⇒ an RTSP re-dial ⇒ latency, a major
17588
+ * pull-decoder churn source. What that bought was a blind spot: a STATIONARY
17589
+ * object is counted only while the stationary registry holds it, and the
17590
+ * registry rebuilds from motion, so after a restart a parked car was invisible
17591
+ * to every occupancy rule until something moved in front of it. The churn is
17592
+ * now paid on the interval instead — see `occupancyRecheckSecField`.
17593
+ */
17594
+ occupancyRecheckEnabled: boolean().default(true),
17527
17595
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
17528
17596
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
17529
17597
  /**
package/dist/addon.mjs CHANGED
@@ -13033,11 +13033,33 @@ var NotificationFormatSchema = _enum([
13033
13033
  * Named by INTENT, never by glyph. "check" would tie the vocabulary to one
13034
13034
  * renderer's icon set; "acknowledge" survives an adapter that draws it
13035
13035
  * differently.
13036
+ *
13037
+ * ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
13038
+ *
13039
+ * These names are for US. **No adapter may forward one verbatim.** Each maps
13040
+ * the whole set onto its own renderer's vocabulary through a
13041
+ * `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
13042
+ * fallback, so adding a member here fails every adapter's build until someone
13043
+ * decides its glyph, which is the only place that decision can be made
13044
+ * honestly.
13045
+ *
13046
+ * This paragraph is the bug. Zentik declared `actionIcons: true` and passed
13047
+ * `disarm` straight through; iOS feeds that string to
13048
+ * `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
13049
+ * and every snooze and alarm button arrived BLANK. A pass-through is not a
13050
+ * mapping, and "the field is documented" is not "the value renders".
13051
+ *
13052
+ * Adding a member is TRAIN-BOUND. The enum lives in the published
13053
+ * `@camstack/server` closure and the cap seam validates against the HUB's copy,
13054
+ * so an addon that emits a token the running hub does not know does not lose an
13055
+ * icon — its whole `send` fails Zod validation and the notification never
13056
+ * arrives. Never emit a new token from an addon before the train carrying it.
13036
13057
  */
13037
13058
  var NotificationActionIconSchema = _enum([
13038
13059
  "acknowledge",
13039
13060
  "dismiss",
13040
13061
  "silence",
13062
+ "snooze",
13041
13063
  "view",
13042
13064
  "play",
13043
13065
  "open",
@@ -13045,9 +13067,13 @@ var NotificationActionIconSchema = _enum([
13045
13067
  "lock",
13046
13068
  "unlock",
13047
13069
  "arm",
13070
+ "arm-home",
13071
+ "arm-away",
13072
+ "arm-night",
13048
13073
  "disarm",
13049
13074
  "light",
13050
- "alert"
13075
+ "alert",
13076
+ "camera"
13051
13077
  ]);
13052
13078
  /** A single tap-through action button. */
13053
13079
  var NotificationActionSchema = object({
@@ -13247,6 +13273,24 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
13247
13273
  targetId: string(),
13248
13274
  enabled: boolean()
13249
13275
  }), _void(), { kind: "mutation" });
13276
+ new Set([
13277
+ {
13278
+ id: "person",
13279
+ name: "Person"
13280
+ },
13281
+ {
13282
+ id: "vehicle",
13283
+ name: "Vehicle"
13284
+ },
13285
+ {
13286
+ id: "animal",
13287
+ name: "Animal"
13288
+ },
13289
+ {
13290
+ id: "package",
13291
+ name: "Package"
13292
+ }
13293
+ ].map((l) => l.id));
13250
13294
  var COCO_TO_MACRO = {
13251
13295
  mapping: {
13252
13296
  person: "person",
@@ -14044,6 +14088,8 @@ var NcSystemEventKindSchema = _enum([
14044
14088
  "alarm-triggered",
14045
14089
  "alarm-armed",
14046
14090
  "alarm-disarmed",
14091
+ "alarm-arming",
14092
+ "alarm-arm-refused",
14047
14093
  "camera-online",
14048
14094
  "camera-offline",
14049
14095
  "camera-disabled",
@@ -17276,6 +17322,22 @@ var detectionFpsField = {
17276
17322
  default: 10,
17277
17323
  step: 1
17278
17324
  };
17325
+ /**
17326
+ * The occupancy re-check interval. DEFAULT 300 s (2026-08-13 — was 30 s).
17327
+ *
17328
+ * The recheck is now on by default (a parked car is invisible to occupancy
17329
+ * rules until the stationary registry has been rebuilt by motion, which after a
17330
+ * restart may be never on a quiet camera). Each cycle re-subscribes a detection
17331
+ * session — an RTSP re-dial — so the switch is only affordable at a WIDE
17332
+ * interval: 300 s is ~12 re-dials an hour per camera, against 120 at the old
17333
+ * 30 s. A parked car is therefore counted within 5 minutes of a restart.
17334
+ *
17335
+ * Why not wider: `max` is 300 and raising it is TRAIN-BOUND, not addon-bound —
17336
+ * the host validates `attachCamera` against ITS copy of this schema, so a
17337
+ * runner asked for 600 would be rejected by the hub until a `@camstack/server`
17338
+ * carrying the wider bound is installed everywhere. 300 is the widest value
17339
+ * that ships with an addon deploy.
17340
+ */
17279
17341
  var occupancyRecheckSecField = {
17280
17342
  min: 0,
17281
17343
  max: 300,
@@ -17477,15 +17539,21 @@ var RunnerCameraConfigSchema = object({
17477
17539
  */
17478
17540
  onboardMotionDrivesAnalyzer: boolean().default(true),
17479
17541
  /**
17480
- * Master toggle for the occupancy re-check. When `false` (DEFAULT) the runner
17481
- * never arms the periodic recheck timer, regardless of `occupancyRecheckSec` —
17482
- * this is off by default because the recheck re-subscribes a detection session
17483
- * every N seconds while `watching`, a major source of pull-decoder re-dial
17484
- * churn (each cycle creates+tears a session → RTSP re-dial → latency). The
17542
+ * Master toggle for the occupancy re-check. When `false` the runner never arms
17543
+ * the periodic recheck timer, regardless of `occupancyRecheckSec`; the
17485
17544
  * `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
17486
17545
  * (and only render) when this is enabled.
17487
- */
17488
- occupancyRecheckEnabled: boolean().default(false),
17546
+ *
17547
+ * DEFAULT `true` since 2026-08-13 (was `false`). It was off because the
17548
+ * recheck re-subscribes a detection session every N seconds while `watching`
17549
+ * — each cycle creates+tears a session ⇒ an RTSP re-dial ⇒ latency, a major
17550
+ * pull-decoder churn source. What that bought was a blind spot: a STATIONARY
17551
+ * object is counted only while the stationary registry holds it, and the
17552
+ * registry rebuilds from motion, so after a restart a parked car was invisible
17553
+ * to every occupancy rule until something moved in front of it. The churn is
17554
+ * now paid on the interval instead — see `occupancyRecheckSecField`.
17555
+ */
17556
+ occupancyRecheckEnabled: boolean().default(true),
17489
17557
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
17490
17558
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
17491
17559
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-ai",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "description": "AI addon for CamStack — the `llm` collection provider (cloud, LAN, and camstack-managed local llama.cpp profiles) plus the per-node `llm-runtime` managed executor.",
5
5
  "keywords": [
6
6
  "camstack",