@camstack/addon-ai 0.2.19 → 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.
Files changed (3) hide show
  1. package/dist/addon.js +148 -17
  2. package/dist/addon.mjs +148 -17
  3. package/package.json +1 -1
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({
@@ -13101,7 +13127,23 @@ var NotificationActionSchema = object({
13101
13127
  * else — see `notification-center/action-token.ts` for what that does and
13102
13128
  * does not buy.
13103
13129
  */
13104
- destructive: boolean().optional()
13130
+ destructive: boolean().optional(),
13131
+ /**
13132
+ * How the tap should REACH the url.
13133
+ *
13134
+ * `navigate` (absent, and every button authored before this field) opens it:
13135
+ * the phone leaves the notification and shows whatever the callback returns.
13136
+ * That is right for a button whose answer the operator wants to read.
13137
+ *
13138
+ * `background` fires it as a POST and stays put. It exists for the buttons
13139
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13140
+ * an answer to the notification, and being thrown into a browser tab to
13141
+ * confirm it costs more attention than the notification did. A backend that
13142
+ * cannot do a background call renders it as an ordinary link (the adapters
13143
+ * fall back rather than dropping the button), so this is a preference, never
13144
+ * a requirement.
13145
+ */
13146
+ mode: _enum(["navigate", "background"]).optional()
13105
13147
  });
13106
13148
  /**
13107
13149
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -13269,6 +13311,24 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
13269
13311
  targetId: string(),
13270
13312
  enabled: boolean()
13271
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));
13272
13332
  var COCO_TO_MACRO = {
13273
13333
  mapping: {
13274
13334
  person: "person",
@@ -14066,6 +14126,8 @@ var NcSystemEventKindSchema = _enum([
14066
14126
  "alarm-triggered",
14067
14127
  "alarm-armed",
14068
14128
  "alarm-disarmed",
14129
+ "alarm-arming",
14130
+ "alarm-arm-refused",
14069
14131
  "camera-online",
14070
14132
  "camera-offline",
14071
14133
  "camera-disabled",
@@ -14102,6 +14164,9 @@ var NcSystemEventConditionSchema = object({
14102
14164
  nodeIds: array(string().min(1)).min(1).optional(),
14103
14165
  packageNames: array(string().min(1)).min(1).optional()
14104
14166
  });
14167
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14168
+ * outage the operator asked for once and forgot. */
14169
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14105
14170
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14106
14171
  var NcScheduleSchema = object({
14107
14172
  windows: array(object({
@@ -14478,15 +14543,15 @@ var NcConditionsSchema = object({
14478
14543
  * (an `immediate` rule naming an `audio-*` class, one notification per
14479
14544
  * classified sample) stays exactly as it was for rules that already use it.
14480
14545
  *
14481
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14482
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14483
- * (`camstack/src/data/notification-center.ts`, guarded by
14484
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14546
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14547
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14548
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14549
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14485
14550
  * condition fields it does not know when a rule is saved from the phone.
14486
14551
  * Publishing an editor for a condition the app cannot round-trip is how an
14487
- * operator loses a rule's conditions by opening it — so the descriptor, the
14488
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14489
- * does an audio rule become authorable.
14552
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14553
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14554
+ * follows here.
14490
14555
  */
14491
14556
  audio: NcAudioConditionSchema.optional()
14492
14557
  });
@@ -14722,6 +14787,30 @@ var NcRuleInputSchema = object({
14722
14787
  */
14723
14788
  snoozeAllowGlobal: boolean().optional(),
14724
14789
  /**
14790
+ * The snooze durations THIS rule's notification offers as buttons, in
14791
+ * minutes.
14792
+ *
14793
+ * Three states, and all three are distinct — which is exactly why this is
14794
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14795
+ * addon cap path (three production failures in one day), so a schema default
14796
+ * would collapse the first two:
14797
+ *
14798
+ * | value | meaning |
14799
+ * | --- | --- |
14800
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14801
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14802
+ * | a list | these choices, de-duplicated and sorted, at most four |
14803
+ *
14804
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14805
+ * three buttons in total) and a rule that spent it all on snooze choices
14806
+ * would push its own tap-through actions off the notification.
14807
+ *
14808
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14809
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14810
+ * window from anywhere (D133).
14811
+ */
14812
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14813
+ /**
14725
14814
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14726
14815
  *
14727
14816
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14821,6 +14910,7 @@ var NcConditionDescriptorSchema = object({
14821
14910
  "device",
14822
14911
  "package",
14823
14912
  "occupancy",
14913
+ "audio",
14824
14914
  "system"
14825
14915
  ]),
14826
14916
  label: string(),
@@ -14839,6 +14929,7 @@ var NcConditionDescriptorSchema = object({
14839
14929
  "crossingSelect",
14840
14930
  "polygonDraw",
14841
14931
  "occupancy",
14932
+ "audio",
14842
14933
  "deviceState",
14843
14934
  "systemEvent"
14844
14935
  ]),
@@ -14990,7 +15081,20 @@ var NcSnoozeInputSchema = object({
14990
15081
  ruleId: string().optional(),
14991
15082
  /** Required when `scope: 'device'`. */
14992
15083
  deviceId: number().int().optional(),
14993
- durationMinutes: number().int().min(1).max(1440),
15084
+ /**
15085
+ * Narrow the window to these subject classes — "the cat, not the person".
15086
+ *
15087
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15088
+ * what every window authored before this field meant, so no persisted row
15089
+ * changes meaning and no client has to learn anything to keep working.
15090
+ *
15091
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15092
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15093
+ * not at whichever of their four rules happened to produce the notification
15094
+ * they are dismissing.
15095
+ */
15096
+ classes: array(string().min(1)).min(1).optional(),
15097
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
14994
15098
  /**
14995
15099
  * Silence this for EVERY recipient, not just the caller. Permission is
14996
15100
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -15015,6 +15119,10 @@ var NcSnoozeSchema = object({
15015
15119
  scope: NcSnoozeScopeSchema,
15016
15120
  ruleId: string().optional(),
15017
15121
  deviceId: number().int().optional(),
15122
+ /** Subject classes this window covers. ABSENT = every class — see
15123
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15124
+ * no SQLite column: nothing queries a window by class. */
15125
+ classes: array(string().min(1)).min(1).optional(),
15018
15126
  startedAt: number(),
15019
15127
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
15020
15128
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -17252,6 +17360,22 @@ var detectionFpsField = {
17252
17360
  default: 10,
17253
17361
  step: 1
17254
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
+ */
17255
17379
  var occupancyRecheckSecField = {
17256
17380
  min: 0,
17257
17381
  max: 300,
@@ -17453,15 +17577,21 @@ var RunnerCameraConfigSchema = object({
17453
17577
  */
17454
17578
  onboardMotionDrivesAnalyzer: boolean().default(true),
17455
17579
  /**
17456
- * Master toggle for the occupancy re-check. When `false` (DEFAULT) the runner
17457
- * never arms the periodic recheck timer, regardless of `occupancyRecheckSec` —
17458
- * this is off by default because the recheck re-subscribes a detection session
17459
- * every N seconds while `watching`, a major source of pull-decoder re-dial
17460
- * 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
17461
17582
  * `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
17462
17583
  * (and only render) when this is enabled.
17463
- */
17464
- 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),
17465
17595
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
17466
17596
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
17467
17597
  /**
@@ -30587,6 +30717,7 @@ Object.freeze({
30587
30717
  "network-access": "ingress",
30588
30718
  "smtp-provider": "email"
30589
30719
  });
30720
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
30590
30721
  new Set(["devices", "classes"]);
30591
30722
  /**
30592
30723
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
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({
@@ -13063,7 +13089,23 @@ var NotificationActionSchema = object({
13063
13089
  * else — see `notification-center/action-token.ts` for what that does and
13064
13090
  * does not buy.
13065
13091
  */
13066
- destructive: boolean().optional()
13092
+ destructive: boolean().optional(),
13093
+ /**
13094
+ * How the tap should REACH the url.
13095
+ *
13096
+ * `navigate` (absent, and every button authored before this field) opens it:
13097
+ * the phone leaves the notification and shows whatever the callback returns.
13098
+ * That is right for a button whose answer the operator wants to read.
13099
+ *
13100
+ * `background` fires it as a POST and stays put. It exists for the buttons
13101
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13102
+ * an answer to the notification, and being thrown into a browser tab to
13103
+ * confirm it costs more attention than the notification did. A backend that
13104
+ * cannot do a background call renders it as an ordinary link (the adapters
13105
+ * fall back rather than dropping the button), so this is a preference, never
13106
+ * a requirement.
13107
+ */
13108
+ mode: _enum(["navigate", "background"]).optional()
13067
13109
  });
13068
13110
  /**
13069
13111
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -13231,6 +13273,24 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
13231
13273
  targetId: string(),
13232
13274
  enabled: boolean()
13233
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));
13234
13294
  var COCO_TO_MACRO = {
13235
13295
  mapping: {
13236
13296
  person: "person",
@@ -14028,6 +14088,8 @@ var NcSystemEventKindSchema = _enum([
14028
14088
  "alarm-triggered",
14029
14089
  "alarm-armed",
14030
14090
  "alarm-disarmed",
14091
+ "alarm-arming",
14092
+ "alarm-arm-refused",
14031
14093
  "camera-online",
14032
14094
  "camera-offline",
14033
14095
  "camera-disabled",
@@ -14064,6 +14126,9 @@ var NcSystemEventConditionSchema = object({
14064
14126
  nodeIds: array(string().min(1)).min(1).optional(),
14065
14127
  packageNames: array(string().min(1)).min(1).optional()
14066
14128
  });
14129
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14130
+ * outage the operator asked for once and forgot. */
14131
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14067
14132
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14068
14133
  var NcScheduleSchema = object({
14069
14134
  windows: array(object({
@@ -14440,15 +14505,15 @@ var NcConditionsSchema = object({
14440
14505
  * (an `immediate` rule naming an `audio-*` class, one notification per
14441
14506
  * classified sample) stays exactly as it was for rules that already use it.
14442
14507
  *
14443
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14444
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14445
- * (`camstack/src/data/notification-center.ts`, guarded by
14446
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14508
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14509
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14510
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14511
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14447
14512
  * condition fields it does not know when a rule is saved from the phone.
14448
14513
  * Publishing an editor for a condition the app cannot round-trip is how an
14449
- * operator loses a rule's conditions by opening it — so the descriptor, the
14450
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14451
- * does an audio rule become authorable.
14514
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14515
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14516
+ * follows here.
14452
14517
  */
14453
14518
  audio: NcAudioConditionSchema.optional()
14454
14519
  });
@@ -14684,6 +14749,30 @@ var NcRuleInputSchema = object({
14684
14749
  */
14685
14750
  snoozeAllowGlobal: boolean().optional(),
14686
14751
  /**
14752
+ * The snooze durations THIS rule's notification offers as buttons, in
14753
+ * minutes.
14754
+ *
14755
+ * Three states, and all three are distinct — which is exactly why this is
14756
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14757
+ * addon cap path (three production failures in one day), so a schema default
14758
+ * would collapse the first two:
14759
+ *
14760
+ * | value | meaning |
14761
+ * | --- | --- |
14762
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14763
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14764
+ * | a list | these choices, de-duplicated and sorted, at most four |
14765
+ *
14766
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14767
+ * three buttons in total) and a rule that spent it all on snooze choices
14768
+ * would push its own tap-through actions off the notification.
14769
+ *
14770
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14771
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14772
+ * window from anywhere (D133).
14773
+ */
14774
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14775
+ /**
14687
14776
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14688
14777
  *
14689
14778
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14783,6 +14872,7 @@ var NcConditionDescriptorSchema = object({
14783
14872
  "device",
14784
14873
  "package",
14785
14874
  "occupancy",
14875
+ "audio",
14786
14876
  "system"
14787
14877
  ]),
14788
14878
  label: string(),
@@ -14801,6 +14891,7 @@ var NcConditionDescriptorSchema = object({
14801
14891
  "crossingSelect",
14802
14892
  "polygonDraw",
14803
14893
  "occupancy",
14894
+ "audio",
14804
14895
  "deviceState",
14805
14896
  "systemEvent"
14806
14897
  ]),
@@ -14952,7 +15043,20 @@ var NcSnoozeInputSchema = object({
14952
15043
  ruleId: string().optional(),
14953
15044
  /** Required when `scope: 'device'`. */
14954
15045
  deviceId: number().int().optional(),
14955
- durationMinutes: number().int().min(1).max(1440),
15046
+ /**
15047
+ * Narrow the window to these subject classes — "the cat, not the person".
15048
+ *
15049
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15050
+ * what every window authored before this field meant, so no persisted row
15051
+ * changes meaning and no client has to learn anything to keep working.
15052
+ *
15053
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15054
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15055
+ * not at whichever of their four rules happened to produce the notification
15056
+ * they are dismissing.
15057
+ */
15058
+ classes: array(string().min(1)).min(1).optional(),
15059
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
14956
15060
  /**
14957
15061
  * Silence this for EVERY recipient, not just the caller. Permission is
14958
15062
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -14977,6 +15081,10 @@ var NcSnoozeSchema = object({
14977
15081
  scope: NcSnoozeScopeSchema,
14978
15082
  ruleId: string().optional(),
14979
15083
  deviceId: number().int().optional(),
15084
+ /** Subject classes this window covers. ABSENT = every class — see
15085
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15086
+ * no SQLite column: nothing queries a window by class. */
15087
+ classes: array(string().min(1)).min(1).optional(),
14980
15088
  startedAt: number(),
14981
15089
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
14982
15090
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -17214,6 +17322,22 @@ var detectionFpsField = {
17214
17322
  default: 10,
17215
17323
  step: 1
17216
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
+ */
17217
17341
  var occupancyRecheckSecField = {
17218
17342
  min: 0,
17219
17343
  max: 300,
@@ -17415,15 +17539,21 @@ var RunnerCameraConfigSchema = object({
17415
17539
  */
17416
17540
  onboardMotionDrivesAnalyzer: boolean().default(true),
17417
17541
  /**
17418
- * Master toggle for the occupancy re-check. When `false` (DEFAULT) the runner
17419
- * never arms the periodic recheck timer, regardless of `occupancyRecheckSec` —
17420
- * this is off by default because the recheck re-subscribes a detection session
17421
- * every N seconds while `watching`, a major source of pull-decoder re-dial
17422
- * 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
17423
17544
  * `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
17424
17545
  * (and only render) when this is enabled.
17425
- */
17426
- 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),
17427
17557
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
17428
17558
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
17429
17559
  /**
@@ -30549,6 +30679,7 @@ Object.freeze({
30549
30679
  "network-access": "ingress",
30550
30680
  "smtp-provider": "email"
30551
30681
  });
30682
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
30552
30683
  new Set(["devices", "classes"]);
30553
30684
  /**
30554
30685
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-ai",
3
- "version": "0.2.19",
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",