@camstack/addon-mqtt-broker 1.2.15 → 1.2.17
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/mqtt-broker.addon.js +148 -17
- package/dist/mqtt-broker.addon.mjs +148 -17
- package/package.json +1 -1
|
@@ -13034,11 +13034,33 @@ var NotificationFormatSchema = _enum([
|
|
|
13034
13034
|
* Named by INTENT, never by glyph. "check" would tie the vocabulary to one
|
|
13035
13035
|
* renderer's icon set; "acknowledge" survives an adapter that draws it
|
|
13036
13036
|
* differently.
|
|
13037
|
+
*
|
|
13038
|
+
* ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
|
|
13039
|
+
*
|
|
13040
|
+
* These names are for US. **No adapter may forward one verbatim.** Each maps
|
|
13041
|
+
* the whole set onto its own renderer's vocabulary through a
|
|
13042
|
+
* `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
|
|
13043
|
+
* fallback, so adding a member here fails every adapter's build until someone
|
|
13044
|
+
* decides its glyph, which is the only place that decision can be made
|
|
13045
|
+
* honestly.
|
|
13046
|
+
*
|
|
13047
|
+
* This paragraph is the bug. Zentik declared `actionIcons: true` and passed
|
|
13048
|
+
* `disarm` straight through; iOS feeds that string to
|
|
13049
|
+
* `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
|
|
13050
|
+
* and every snooze and alarm button arrived BLANK. A pass-through is not a
|
|
13051
|
+
* mapping, and "the field is documented" is not "the value renders".
|
|
13052
|
+
*
|
|
13053
|
+
* Adding a member is TRAIN-BOUND. The enum lives in the published
|
|
13054
|
+
* `@camstack/server` closure and the cap seam validates against the HUB's copy,
|
|
13055
|
+
* so an addon that emits a token the running hub does not know does not lose an
|
|
13056
|
+
* icon — its whole `send` fails Zod validation and the notification never
|
|
13057
|
+
* arrives. Never emit a new token from an addon before the train carrying it.
|
|
13037
13058
|
*/
|
|
13038
13059
|
var NotificationActionIconSchema = _enum([
|
|
13039
13060
|
"acknowledge",
|
|
13040
13061
|
"dismiss",
|
|
13041
13062
|
"silence",
|
|
13063
|
+
"snooze",
|
|
13042
13064
|
"view",
|
|
13043
13065
|
"play",
|
|
13044
13066
|
"open",
|
|
@@ -13046,9 +13068,13 @@ var NotificationActionIconSchema = _enum([
|
|
|
13046
13068
|
"lock",
|
|
13047
13069
|
"unlock",
|
|
13048
13070
|
"arm",
|
|
13071
|
+
"arm-home",
|
|
13072
|
+
"arm-away",
|
|
13073
|
+
"arm-night",
|
|
13049
13074
|
"disarm",
|
|
13050
13075
|
"light",
|
|
13051
|
-
"alert"
|
|
13076
|
+
"alert",
|
|
13077
|
+
"camera"
|
|
13052
13078
|
]);
|
|
13053
13079
|
/** A single tap-through action button. */
|
|
13054
13080
|
var NotificationActionSchema = object({
|
|
@@ -13064,7 +13090,23 @@ var NotificationActionSchema = object({
|
|
|
13064
13090
|
* else — see `notification-center/action-token.ts` for what that does and
|
|
13065
13091
|
* does not buy.
|
|
13066
13092
|
*/
|
|
13067
|
-
destructive: boolean().optional()
|
|
13093
|
+
destructive: boolean().optional(),
|
|
13094
|
+
/**
|
|
13095
|
+
* How the tap should REACH the url.
|
|
13096
|
+
*
|
|
13097
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
13098
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
13099
|
+
* That is right for a button whose answer the operator wants to read.
|
|
13100
|
+
*
|
|
13101
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
13102
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
13103
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
13104
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
13105
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
13106
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
13107
|
+
* a requirement.
|
|
13108
|
+
*/
|
|
13109
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
13068
13110
|
});
|
|
13069
13111
|
/**
|
|
13070
13112
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
@@ -13232,6 +13274,24 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
13232
13274
|
targetId: string(),
|
|
13233
13275
|
enabled: boolean()
|
|
13234
13276
|
}), _void(), { kind: "mutation" });
|
|
13277
|
+
new Set([
|
|
13278
|
+
{
|
|
13279
|
+
id: "person",
|
|
13280
|
+
name: "Person"
|
|
13281
|
+
},
|
|
13282
|
+
{
|
|
13283
|
+
id: "vehicle",
|
|
13284
|
+
name: "Vehicle"
|
|
13285
|
+
},
|
|
13286
|
+
{
|
|
13287
|
+
id: "animal",
|
|
13288
|
+
name: "Animal"
|
|
13289
|
+
},
|
|
13290
|
+
{
|
|
13291
|
+
id: "package",
|
|
13292
|
+
name: "Package"
|
|
13293
|
+
}
|
|
13294
|
+
].map((l) => l.id));
|
|
13235
13295
|
var COCO_TO_MACRO = {
|
|
13236
13296
|
mapping: {
|
|
13237
13297
|
person: "person",
|
|
@@ -14029,6 +14089,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14029
14089
|
"alarm-triggered",
|
|
14030
14090
|
"alarm-armed",
|
|
14031
14091
|
"alarm-disarmed",
|
|
14092
|
+
"alarm-arming",
|
|
14093
|
+
"alarm-arm-refused",
|
|
14032
14094
|
"camera-online",
|
|
14033
14095
|
"camera-offline",
|
|
14034
14096
|
"camera-disabled",
|
|
@@ -14065,6 +14127,9 @@ var NcSystemEventConditionSchema = object({
|
|
|
14065
14127
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14066
14128
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14067
14129
|
});
|
|
14130
|
+
/** Hard ceiling on a window (24h). A snooze that could not expire would be an
|
|
14131
|
+
* outage the operator asked for once and forgot. */
|
|
14132
|
+
var NC_SNOOZE_MAX_MINUTES = 1440;
|
|
14068
14133
|
/** Weekly schedule — OR of windows; absence on the rule = always active. */
|
|
14069
14134
|
var NcScheduleSchema = object({
|
|
14070
14135
|
windows: array(object({
|
|
@@ -14441,15 +14506,15 @@ var NcConditionsSchema = object({
|
|
|
14441
14506
|
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14442
14507
|
* classified sample) stays exactly as it was for rules that already use it.
|
|
14443
14508
|
*
|
|
14444
|
-
*
|
|
14445
|
-
* rather than an
|
|
14446
|
-
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14447
|
-
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor
|
|
14509
|
+
* In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
|
|
14510
|
+
* rule rather than an accident: the viewer mirrors the descriptor enums BY
|
|
14511
|
+
* HAND (`camstack/src/data/notification-center.ts`, guarded by
|
|
14512
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
|
|
14448
14513
|
* condition fields it does not know when a rule is saved from the phone.
|
|
14449
14514
|
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14450
|
-
* operator loses a rule's conditions by opening it — so the
|
|
14451
|
-
*
|
|
14452
|
-
*
|
|
14515
|
+
* operator loses a rule's conditions by opening it — so the viewer mirror
|
|
14516
|
+
* (P3, shipped) went FIRST, and the descriptor an editor renders from
|
|
14517
|
+
* follows here.
|
|
14453
14518
|
*/
|
|
14454
14519
|
audio: NcAudioConditionSchema.optional()
|
|
14455
14520
|
});
|
|
@@ -14685,6 +14750,30 @@ var NcRuleInputSchema = object({
|
|
|
14685
14750
|
*/
|
|
14686
14751
|
snoozeAllowGlobal: boolean().optional(),
|
|
14687
14752
|
/**
|
|
14753
|
+
* The snooze durations THIS rule's notification offers as buttons, in
|
|
14754
|
+
* minutes.
|
|
14755
|
+
*
|
|
14756
|
+
* Three states, and all three are distinct — which is exactly why this is
|
|
14757
|
+
* `.optional()` and never `.default()`. A Zod default does not run on the
|
|
14758
|
+
* addon cap path (three production failures in one day), so a schema default
|
|
14759
|
+
* would collapse the first two:
|
|
14760
|
+
*
|
|
14761
|
+
* | value | meaning |
|
|
14762
|
+
* | --- | --- |
|
|
14763
|
+
* | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
|
|
14764
|
+
* | `[]` | **no snooze buttons on this rule** — the explicit override |
|
|
14765
|
+
* | a list | these choices, de-duplicated and sorted, at most four |
|
|
14766
|
+
*
|
|
14767
|
+
* `.max(4)` because the notifier's own action budget is small (ntfy allows
|
|
14768
|
+
* three buttons in total) and a rule that spent it all on snooze choices
|
|
14769
|
+
* would push its own tap-through actions off the notification.
|
|
14770
|
+
*
|
|
14771
|
+
* An empty list is NOT an alarm exemption: a rule the alarm is about, or
|
|
14772
|
+
* that arms the panel, is exempt automatically and cannot be silenced by a
|
|
14773
|
+
* window from anywhere (D133).
|
|
14774
|
+
*/
|
|
14775
|
+
snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
|
|
14776
|
+
/**
|
|
14688
14777
|
* Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
|
|
14689
14778
|
*
|
|
14690
14779
|
* This is what makes the rule set the alarm's trigger set without the alarm
|
|
@@ -14784,6 +14873,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14784
14873
|
"device",
|
|
14785
14874
|
"package",
|
|
14786
14875
|
"occupancy",
|
|
14876
|
+
"audio",
|
|
14787
14877
|
"system"
|
|
14788
14878
|
]),
|
|
14789
14879
|
label: string(),
|
|
@@ -14802,6 +14892,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14802
14892
|
"crossingSelect",
|
|
14803
14893
|
"polygonDraw",
|
|
14804
14894
|
"occupancy",
|
|
14895
|
+
"audio",
|
|
14805
14896
|
"deviceState",
|
|
14806
14897
|
"systemEvent"
|
|
14807
14898
|
]),
|
|
@@ -14953,7 +15044,20 @@ var NcSnoozeInputSchema = object({
|
|
|
14953
15044
|
ruleId: string().optional(),
|
|
14954
15045
|
/** Required when `scope: 'device'`. */
|
|
14955
15046
|
deviceId: number().int().optional(),
|
|
14956
|
-
|
|
15047
|
+
/**
|
|
15048
|
+
* Narrow the window to these subject classes — "the cat, not the person".
|
|
15049
|
+
*
|
|
15050
|
+
* ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
|
|
15051
|
+
* what every window authored before this field meant, so no persisted row
|
|
15052
|
+
* changes meaning and no client has to learn anything to keep working.
|
|
15053
|
+
*
|
|
15054
|
+
* It is what makes the window's real key `(deviceId, classes[])` and lets it
|
|
15055
|
+
* cross rules (D133): the operator points at a camera and a kind of thing,
|
|
15056
|
+
* not at whichever of their four rules happened to produce the notification
|
|
15057
|
+
* they are dismissing.
|
|
15058
|
+
*/
|
|
15059
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15060
|
+
durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
|
|
14957
15061
|
/**
|
|
14958
15062
|
* Silence this for EVERY recipient, not just the caller. Permission is
|
|
14959
15063
|
* checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
|
|
@@ -14978,6 +15082,10 @@ var NcSnoozeSchema = object({
|
|
|
14978
15082
|
scope: NcSnoozeScopeSchema,
|
|
14979
15083
|
ruleId: string().optional(),
|
|
14980
15084
|
deviceId: number().int().optional(),
|
|
15085
|
+
/** Subject classes this window covers. ABSENT = every class — see
|
|
15086
|
+
* {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
|
|
15087
|
+
* no SQLite column: nothing queries a window by class. */
|
|
15088
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
14981
15089
|
startedAt: number(),
|
|
14982
15090
|
/** Exclusive: at exactly this instant the snooze is over. Expiry is a
|
|
14983
15091
|
* COMPARISON, not a job — no sweeper can leave the operator silenced. */
|
|
@@ -17215,6 +17323,22 @@ var detectionFpsField = {
|
|
|
17215
17323
|
default: 10,
|
|
17216
17324
|
step: 1
|
|
17217
17325
|
};
|
|
17326
|
+
/**
|
|
17327
|
+
* The occupancy re-check interval. DEFAULT 300 s (2026-08-13 — was 30 s).
|
|
17328
|
+
*
|
|
17329
|
+
* The recheck is now on by default (a parked car is invisible to occupancy
|
|
17330
|
+
* rules until the stationary registry has been rebuilt by motion, which after a
|
|
17331
|
+
* restart may be never on a quiet camera). Each cycle re-subscribes a detection
|
|
17332
|
+
* session — an RTSP re-dial — so the switch is only affordable at a WIDE
|
|
17333
|
+
* interval: 300 s is ~12 re-dials an hour per camera, against 120 at the old
|
|
17334
|
+
* 30 s. A parked car is therefore counted within 5 minutes of a restart.
|
|
17335
|
+
*
|
|
17336
|
+
* Why not wider: `max` is 300 and raising it is TRAIN-BOUND, not addon-bound —
|
|
17337
|
+
* the host validates `attachCamera` against ITS copy of this schema, so a
|
|
17338
|
+
* runner asked for 600 would be rejected by the hub until a `@camstack/server`
|
|
17339
|
+
* carrying the wider bound is installed everywhere. 300 is the widest value
|
|
17340
|
+
* that ships with an addon deploy.
|
|
17341
|
+
*/
|
|
17218
17342
|
var occupancyRecheckSecField = {
|
|
17219
17343
|
min: 0,
|
|
17220
17344
|
max: 300,
|
|
@@ -17416,15 +17540,21 @@ var RunnerCameraConfigSchema = object({
|
|
|
17416
17540
|
*/
|
|
17417
17541
|
onboardMotionDrivesAnalyzer: boolean().default(true),
|
|
17418
17542
|
/**
|
|
17419
|
-
* Master toggle for the occupancy re-check. When `false`
|
|
17420
|
-
*
|
|
17421
|
-
* this is off by default because the recheck re-subscribes a detection session
|
|
17422
|
-
* every N seconds while `watching`, a major source of pull-decoder re-dial
|
|
17423
|
-
* churn (each cycle creates+tears a session → RTSP re-dial → latency). The
|
|
17543
|
+
* Master toggle for the occupancy re-check. When `false` the runner never arms
|
|
17544
|
+
* the periodic recheck timer, regardless of `occupancyRecheckSec`; the
|
|
17424
17545
|
* `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
|
|
17425
17546
|
* (and only render) when this is enabled.
|
|
17426
|
-
|
|
17427
|
-
|
|
17547
|
+
*
|
|
17548
|
+
* DEFAULT `true` since 2026-08-13 (was `false`). It was off because the
|
|
17549
|
+
* recheck re-subscribes a detection session every N seconds while `watching`
|
|
17550
|
+
* — each cycle creates+tears a session ⇒ an RTSP re-dial ⇒ latency, a major
|
|
17551
|
+
* pull-decoder churn source. What that bought was a blind spot: a STATIONARY
|
|
17552
|
+
* object is counted only while the stationary registry holds it, and the
|
|
17553
|
+
* registry rebuilds from motion, so after a restart a parked car was invisible
|
|
17554
|
+
* to every occupancy rule until something moved in front of it. The churn is
|
|
17555
|
+
* now paid on the interval instead — see `occupancyRecheckSecField`.
|
|
17556
|
+
*/
|
|
17557
|
+
occupancyRecheckEnabled: boolean().default(true),
|
|
17428
17558
|
occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
|
|
17429
17559
|
occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
|
|
17430
17560
|
/**
|
|
@@ -30550,6 +30680,7 @@ Object.freeze({
|
|
|
30550
30680
|
"network-access": "ingress",
|
|
30551
30681
|
"smtp-provider": "email"
|
|
30552
30682
|
});
|
|
30683
|
+
new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
|
|
30553
30684
|
new Set(["devices", "classes"]);
|
|
30554
30685
|
/**
|
|
30555
30686
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
@@ -13029,11 +13029,33 @@ var NotificationFormatSchema = _enum([
|
|
|
13029
13029
|
* Named by INTENT, never by glyph. "check" would tie the vocabulary to one
|
|
13030
13030
|
* renderer's icon set; "acknowledge" survives an adapter that draws it
|
|
13031
13031
|
* differently.
|
|
13032
|
+
*
|
|
13033
|
+
* ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
|
|
13034
|
+
*
|
|
13035
|
+
* These names are for US. **No adapter may forward one verbatim.** Each maps
|
|
13036
|
+
* the whole set onto its own renderer's vocabulary through a
|
|
13037
|
+
* `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
|
|
13038
|
+
* fallback, so adding a member here fails every adapter's build until someone
|
|
13039
|
+
* decides its glyph, which is the only place that decision can be made
|
|
13040
|
+
* honestly.
|
|
13041
|
+
*
|
|
13042
|
+
* This paragraph is the bug. Zentik declared `actionIcons: true` and passed
|
|
13043
|
+
* `disarm` straight through; iOS feeds that string to
|
|
13044
|
+
* `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
|
|
13045
|
+
* and every snooze and alarm button arrived BLANK. A pass-through is not a
|
|
13046
|
+
* mapping, and "the field is documented" is not "the value renders".
|
|
13047
|
+
*
|
|
13048
|
+
* Adding a member is TRAIN-BOUND. The enum lives in the published
|
|
13049
|
+
* `@camstack/server` closure and the cap seam validates against the HUB's copy,
|
|
13050
|
+
* so an addon that emits a token the running hub does not know does not lose an
|
|
13051
|
+
* icon — its whole `send` fails Zod validation and the notification never
|
|
13052
|
+
* arrives. Never emit a new token from an addon before the train carrying it.
|
|
13032
13053
|
*/
|
|
13033
13054
|
var NotificationActionIconSchema = _enum([
|
|
13034
13055
|
"acknowledge",
|
|
13035
13056
|
"dismiss",
|
|
13036
13057
|
"silence",
|
|
13058
|
+
"snooze",
|
|
13037
13059
|
"view",
|
|
13038
13060
|
"play",
|
|
13039
13061
|
"open",
|
|
@@ -13041,9 +13063,13 @@ var NotificationActionIconSchema = _enum([
|
|
|
13041
13063
|
"lock",
|
|
13042
13064
|
"unlock",
|
|
13043
13065
|
"arm",
|
|
13066
|
+
"arm-home",
|
|
13067
|
+
"arm-away",
|
|
13068
|
+
"arm-night",
|
|
13044
13069
|
"disarm",
|
|
13045
13070
|
"light",
|
|
13046
|
-
"alert"
|
|
13071
|
+
"alert",
|
|
13072
|
+
"camera"
|
|
13047
13073
|
]);
|
|
13048
13074
|
/** A single tap-through action button. */
|
|
13049
13075
|
var NotificationActionSchema = object({
|
|
@@ -13059,7 +13085,23 @@ var NotificationActionSchema = object({
|
|
|
13059
13085
|
* else — see `notification-center/action-token.ts` for what that does and
|
|
13060
13086
|
* does not buy.
|
|
13061
13087
|
*/
|
|
13062
|
-
destructive: boolean().optional()
|
|
13088
|
+
destructive: boolean().optional(),
|
|
13089
|
+
/**
|
|
13090
|
+
* How the tap should REACH the url.
|
|
13091
|
+
*
|
|
13092
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
13093
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
13094
|
+
* That is right for a button whose answer the operator wants to read.
|
|
13095
|
+
*
|
|
13096
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
13097
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
13098
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
13099
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
13100
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
13101
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
13102
|
+
* a requirement.
|
|
13103
|
+
*/
|
|
13104
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
13063
13105
|
});
|
|
13064
13106
|
/**
|
|
13065
13107
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
@@ -13227,6 +13269,24 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
13227
13269
|
targetId: string(),
|
|
13228
13270
|
enabled: boolean()
|
|
13229
13271
|
}), _void(), { kind: "mutation" });
|
|
13272
|
+
new Set([
|
|
13273
|
+
{
|
|
13274
|
+
id: "person",
|
|
13275
|
+
name: "Person"
|
|
13276
|
+
},
|
|
13277
|
+
{
|
|
13278
|
+
id: "vehicle",
|
|
13279
|
+
name: "Vehicle"
|
|
13280
|
+
},
|
|
13281
|
+
{
|
|
13282
|
+
id: "animal",
|
|
13283
|
+
name: "Animal"
|
|
13284
|
+
},
|
|
13285
|
+
{
|
|
13286
|
+
id: "package",
|
|
13287
|
+
name: "Package"
|
|
13288
|
+
}
|
|
13289
|
+
].map((l) => l.id));
|
|
13230
13290
|
var COCO_TO_MACRO = {
|
|
13231
13291
|
mapping: {
|
|
13232
13292
|
person: "person",
|
|
@@ -14024,6 +14084,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
14024
14084
|
"alarm-triggered",
|
|
14025
14085
|
"alarm-armed",
|
|
14026
14086
|
"alarm-disarmed",
|
|
14087
|
+
"alarm-arming",
|
|
14088
|
+
"alarm-arm-refused",
|
|
14027
14089
|
"camera-online",
|
|
14028
14090
|
"camera-offline",
|
|
14029
14091
|
"camera-disabled",
|
|
@@ -14060,6 +14122,9 @@ var NcSystemEventConditionSchema = object({
|
|
|
14060
14122
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14061
14123
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14062
14124
|
});
|
|
14125
|
+
/** Hard ceiling on a window (24h). A snooze that could not expire would be an
|
|
14126
|
+
* outage the operator asked for once and forgot. */
|
|
14127
|
+
var NC_SNOOZE_MAX_MINUTES = 1440;
|
|
14063
14128
|
/** Weekly schedule — OR of windows; absence on the rule = always active. */
|
|
14064
14129
|
var NcScheduleSchema = object({
|
|
14065
14130
|
windows: array(object({
|
|
@@ -14436,15 +14501,15 @@ var NcConditionsSchema = object({
|
|
|
14436
14501
|
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14437
14502
|
* classified sample) stays exactly as it was for rules that already use it.
|
|
14438
14503
|
*
|
|
14439
|
-
*
|
|
14440
|
-
* rather than an
|
|
14441
|
-
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14442
|
-
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor
|
|
14504
|
+
* In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
|
|
14505
|
+
* rule rather than an accident: the viewer mirrors the descriptor enums BY
|
|
14506
|
+
* HAND (`camstack/src/data/notification-center.ts`, guarded by
|
|
14507
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
|
|
14443
14508
|
* condition fields it does not know when a rule is saved from the phone.
|
|
14444
14509
|
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14445
|
-
* operator loses a rule's conditions by opening it — so the
|
|
14446
|
-
*
|
|
14447
|
-
*
|
|
14510
|
+
* operator loses a rule's conditions by opening it — so the viewer mirror
|
|
14511
|
+
* (P3, shipped) went FIRST, and the descriptor an editor renders from
|
|
14512
|
+
* follows here.
|
|
14448
14513
|
*/
|
|
14449
14514
|
audio: NcAudioConditionSchema.optional()
|
|
14450
14515
|
});
|
|
@@ -14680,6 +14745,30 @@ var NcRuleInputSchema = object({
|
|
|
14680
14745
|
*/
|
|
14681
14746
|
snoozeAllowGlobal: boolean().optional(),
|
|
14682
14747
|
/**
|
|
14748
|
+
* The snooze durations THIS rule's notification offers as buttons, in
|
|
14749
|
+
* minutes.
|
|
14750
|
+
*
|
|
14751
|
+
* Three states, and all three are distinct — which is exactly why this is
|
|
14752
|
+
* `.optional()` and never `.default()`. A Zod default does not run on the
|
|
14753
|
+
* addon cap path (three production failures in one day), so a schema default
|
|
14754
|
+
* would collapse the first two:
|
|
14755
|
+
*
|
|
14756
|
+
* | value | meaning |
|
|
14757
|
+
* | --- | --- |
|
|
14758
|
+
* | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
|
|
14759
|
+
* | `[]` | **no snooze buttons on this rule** — the explicit override |
|
|
14760
|
+
* | a list | these choices, de-duplicated and sorted, at most four |
|
|
14761
|
+
*
|
|
14762
|
+
* `.max(4)` because the notifier's own action budget is small (ntfy allows
|
|
14763
|
+
* three buttons in total) and a rule that spent it all on snooze choices
|
|
14764
|
+
* would push its own tap-through actions off the notification.
|
|
14765
|
+
*
|
|
14766
|
+
* An empty list is NOT an alarm exemption: a rule the alarm is about, or
|
|
14767
|
+
* that arms the panel, is exempt automatically and cannot be silenced by a
|
|
14768
|
+
* window from anywhere (D133).
|
|
14769
|
+
*/
|
|
14770
|
+
snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
|
|
14771
|
+
/**
|
|
14683
14772
|
* Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
|
|
14684
14773
|
*
|
|
14685
14774
|
* This is what makes the rule set the alarm's trigger set without the alarm
|
|
@@ -14779,6 +14868,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14779
14868
|
"device",
|
|
14780
14869
|
"package",
|
|
14781
14870
|
"occupancy",
|
|
14871
|
+
"audio",
|
|
14782
14872
|
"system"
|
|
14783
14873
|
]),
|
|
14784
14874
|
label: string(),
|
|
@@ -14797,6 +14887,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14797
14887
|
"crossingSelect",
|
|
14798
14888
|
"polygonDraw",
|
|
14799
14889
|
"occupancy",
|
|
14890
|
+
"audio",
|
|
14800
14891
|
"deviceState",
|
|
14801
14892
|
"systemEvent"
|
|
14802
14893
|
]),
|
|
@@ -14948,7 +15039,20 @@ var NcSnoozeInputSchema = object({
|
|
|
14948
15039
|
ruleId: string().optional(),
|
|
14949
15040
|
/** Required when `scope: 'device'`. */
|
|
14950
15041
|
deviceId: number().int().optional(),
|
|
14951
|
-
|
|
15042
|
+
/**
|
|
15043
|
+
* Narrow the window to these subject classes — "the cat, not the person".
|
|
15044
|
+
*
|
|
15045
|
+
* ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
|
|
15046
|
+
* what every window authored before this field meant, so no persisted row
|
|
15047
|
+
* changes meaning and no client has to learn anything to keep working.
|
|
15048
|
+
*
|
|
15049
|
+
* It is what makes the window's real key `(deviceId, classes[])` and lets it
|
|
15050
|
+
* cross rules (D133): the operator points at a camera and a kind of thing,
|
|
15051
|
+
* not at whichever of their four rules happened to produce the notification
|
|
15052
|
+
* they are dismissing.
|
|
15053
|
+
*/
|
|
15054
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15055
|
+
durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
|
|
14952
15056
|
/**
|
|
14953
15057
|
* Silence this for EVERY recipient, not just the caller. Permission is
|
|
14954
15058
|
* checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
|
|
@@ -14973,6 +15077,10 @@ var NcSnoozeSchema = object({
|
|
|
14973
15077
|
scope: NcSnoozeScopeSchema,
|
|
14974
15078
|
ruleId: string().optional(),
|
|
14975
15079
|
deviceId: number().int().optional(),
|
|
15080
|
+
/** Subject classes this window covers. ABSENT = every class — see
|
|
15081
|
+
* {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
|
|
15082
|
+
* no SQLite column: nothing queries a window by class. */
|
|
15083
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
14976
15084
|
startedAt: number(),
|
|
14977
15085
|
/** Exclusive: at exactly this instant the snooze is over. Expiry is a
|
|
14978
15086
|
* COMPARISON, not a job — no sweeper can leave the operator silenced. */
|
|
@@ -17210,6 +17318,22 @@ var detectionFpsField = {
|
|
|
17210
17318
|
default: 10,
|
|
17211
17319
|
step: 1
|
|
17212
17320
|
};
|
|
17321
|
+
/**
|
|
17322
|
+
* The occupancy re-check interval. DEFAULT 300 s (2026-08-13 — was 30 s).
|
|
17323
|
+
*
|
|
17324
|
+
* The recheck is now on by default (a parked car is invisible to occupancy
|
|
17325
|
+
* rules until the stationary registry has been rebuilt by motion, which after a
|
|
17326
|
+
* restart may be never on a quiet camera). Each cycle re-subscribes a detection
|
|
17327
|
+
* session — an RTSP re-dial — so the switch is only affordable at a WIDE
|
|
17328
|
+
* interval: 300 s is ~12 re-dials an hour per camera, against 120 at the old
|
|
17329
|
+
* 30 s. A parked car is therefore counted within 5 minutes of a restart.
|
|
17330
|
+
*
|
|
17331
|
+
* Why not wider: `max` is 300 and raising it is TRAIN-BOUND, not addon-bound —
|
|
17332
|
+
* the host validates `attachCamera` against ITS copy of this schema, so a
|
|
17333
|
+
* runner asked for 600 would be rejected by the hub until a `@camstack/server`
|
|
17334
|
+
* carrying the wider bound is installed everywhere. 300 is the widest value
|
|
17335
|
+
* that ships with an addon deploy.
|
|
17336
|
+
*/
|
|
17213
17337
|
var occupancyRecheckSecField = {
|
|
17214
17338
|
min: 0,
|
|
17215
17339
|
max: 300,
|
|
@@ -17411,15 +17535,21 @@ var RunnerCameraConfigSchema = object({
|
|
|
17411
17535
|
*/
|
|
17412
17536
|
onboardMotionDrivesAnalyzer: boolean().default(true),
|
|
17413
17537
|
/**
|
|
17414
|
-
* Master toggle for the occupancy re-check. When `false`
|
|
17415
|
-
*
|
|
17416
|
-
* this is off by default because the recheck re-subscribes a detection session
|
|
17417
|
-
* every N seconds while `watching`, a major source of pull-decoder re-dial
|
|
17418
|
-
* churn (each cycle creates+tears a session → RTSP re-dial → latency). The
|
|
17538
|
+
* Master toggle for the occupancy re-check. When `false` the runner never arms
|
|
17539
|
+
* the periodic recheck timer, regardless of `occupancyRecheckSec`; the
|
|
17419
17540
|
* `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
|
|
17420
17541
|
* (and only render) when this is enabled.
|
|
17421
|
-
|
|
17422
|
-
|
|
17542
|
+
*
|
|
17543
|
+
* DEFAULT `true` since 2026-08-13 (was `false`). It was off because the
|
|
17544
|
+
* recheck re-subscribes a detection session every N seconds while `watching`
|
|
17545
|
+
* — each cycle creates+tears a session ⇒ an RTSP re-dial ⇒ latency, a major
|
|
17546
|
+
* pull-decoder churn source. What that bought was a blind spot: a STATIONARY
|
|
17547
|
+
* object is counted only while the stationary registry holds it, and the
|
|
17548
|
+
* registry rebuilds from motion, so after a restart a parked car was invisible
|
|
17549
|
+
* to every occupancy rule until something moved in front of it. The churn is
|
|
17550
|
+
* now paid on the interval instead — see `occupancyRecheckSecField`.
|
|
17551
|
+
*/
|
|
17552
|
+
occupancyRecheckEnabled: boolean().default(true),
|
|
17423
17553
|
occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
|
|
17424
17554
|
occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
|
|
17425
17555
|
/**
|
|
@@ -30545,6 +30675,7 @@ Object.freeze({
|
|
|
30545
30675
|
"network-access": "ingress",
|
|
30546
30676
|
"smtp-provider": "email"
|
|
30547
30677
|
});
|
|
30678
|
+
new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
|
|
30548
30679
|
new Set(["devices", "classes"]);
|
|
30549
30680
|
/**
|
|
30550
30681
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-mqtt-broker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.17",
|
|
4
4
|
"description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|