@camstack/addon-agent-ui 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/addon.js +149 -18
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -12931,11 +12931,33 @@ var NotificationFormatSchema = _enum([
|
|
|
12931
12931
|
* Named by INTENT, never by glyph. "check" would tie the vocabulary to one
|
|
12932
12932
|
* renderer's icon set; "acknowledge" survives an adapter that draws it
|
|
12933
12933
|
* differently.
|
|
12934
|
+
*
|
|
12935
|
+
* ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
|
|
12936
|
+
*
|
|
12937
|
+
* These names are for US. **No adapter may forward one verbatim.** Each maps
|
|
12938
|
+
* the whole set onto its own renderer's vocabulary through a
|
|
12939
|
+
* `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
|
|
12940
|
+
* fallback, so adding a member here fails every adapter's build until someone
|
|
12941
|
+
* decides its glyph, which is the only place that decision can be made
|
|
12942
|
+
* honestly.
|
|
12943
|
+
*
|
|
12944
|
+
* This paragraph is the bug. Zentik declared `actionIcons: true` and passed
|
|
12945
|
+
* `disarm` straight through; iOS feeds that string to
|
|
12946
|
+
* `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
|
|
12947
|
+
* and every snooze and alarm button arrived BLANK. A pass-through is not a
|
|
12948
|
+
* mapping, and "the field is documented" is not "the value renders".
|
|
12949
|
+
*
|
|
12950
|
+
* Adding a member is TRAIN-BOUND. The enum lives in the published
|
|
12951
|
+
* `@camstack/server` closure and the cap seam validates against the HUB's copy,
|
|
12952
|
+
* so an addon that emits a token the running hub does not know does not lose an
|
|
12953
|
+
* icon — its whole `send` fails Zod validation and the notification never
|
|
12954
|
+
* arrives. Never emit a new token from an addon before the train carrying it.
|
|
12934
12955
|
*/
|
|
12935
12956
|
var NotificationActionIconSchema = _enum([
|
|
12936
12957
|
"acknowledge",
|
|
12937
12958
|
"dismiss",
|
|
12938
12959
|
"silence",
|
|
12960
|
+
"snooze",
|
|
12939
12961
|
"view",
|
|
12940
12962
|
"play",
|
|
12941
12963
|
"open",
|
|
@@ -12943,9 +12965,13 @@ var NotificationActionIconSchema = _enum([
|
|
|
12943
12965
|
"lock",
|
|
12944
12966
|
"unlock",
|
|
12945
12967
|
"arm",
|
|
12968
|
+
"arm-home",
|
|
12969
|
+
"arm-away",
|
|
12970
|
+
"arm-night",
|
|
12946
12971
|
"disarm",
|
|
12947
12972
|
"light",
|
|
12948
|
-
"alert"
|
|
12973
|
+
"alert",
|
|
12974
|
+
"camera"
|
|
12949
12975
|
]);
|
|
12950
12976
|
/** A single tap-through action button. */
|
|
12951
12977
|
var NotificationActionSchema = object({
|
|
@@ -12961,7 +12987,23 @@ var NotificationActionSchema = object({
|
|
|
12961
12987
|
* else — see `notification-center/action-token.ts` for what that does and
|
|
12962
12988
|
* does not buy.
|
|
12963
12989
|
*/
|
|
12964
|
-
destructive: boolean().optional()
|
|
12990
|
+
destructive: boolean().optional(),
|
|
12991
|
+
/**
|
|
12992
|
+
* How the tap should REACH the url.
|
|
12993
|
+
*
|
|
12994
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
12995
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
12996
|
+
* That is right for a button whose answer the operator wants to read.
|
|
12997
|
+
*
|
|
12998
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
12999
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
13000
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
13001
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
13002
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
13003
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
13004
|
+
* a requirement.
|
|
13005
|
+
*/
|
|
13006
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
12965
13007
|
});
|
|
12966
13008
|
/**
|
|
12967
13009
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
@@ -13129,6 +13171,24 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
13129
13171
|
targetId: string(),
|
|
13130
13172
|
enabled: boolean()
|
|
13131
13173
|
}), _void(), { kind: "mutation" });
|
|
13174
|
+
new Set([
|
|
13175
|
+
{
|
|
13176
|
+
id: "person",
|
|
13177
|
+
name: "Person"
|
|
13178
|
+
},
|
|
13179
|
+
{
|
|
13180
|
+
id: "vehicle",
|
|
13181
|
+
name: "Vehicle"
|
|
13182
|
+
},
|
|
13183
|
+
{
|
|
13184
|
+
id: "animal",
|
|
13185
|
+
name: "Animal"
|
|
13186
|
+
},
|
|
13187
|
+
{
|
|
13188
|
+
id: "package",
|
|
13189
|
+
name: "Package"
|
|
13190
|
+
}
|
|
13191
|
+
].map((l) => l.id));
|
|
13132
13192
|
var COCO_TO_MACRO = {
|
|
13133
13193
|
mapping: {
|
|
13134
13194
|
person: "person",
|
|
@@ -13926,6 +13986,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
13926
13986
|
"alarm-triggered",
|
|
13927
13987
|
"alarm-armed",
|
|
13928
13988
|
"alarm-disarmed",
|
|
13989
|
+
"alarm-arming",
|
|
13990
|
+
"alarm-arm-refused",
|
|
13929
13991
|
"camera-online",
|
|
13930
13992
|
"camera-offline",
|
|
13931
13993
|
"camera-disabled",
|
|
@@ -13962,6 +14024,9 @@ var NcSystemEventConditionSchema = object({
|
|
|
13962
14024
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
13963
14025
|
packageNames: array(string().min(1)).min(1).optional()
|
|
13964
14026
|
});
|
|
14027
|
+
/** Hard ceiling on a window (24h). A snooze that could not expire would be an
|
|
14028
|
+
* outage the operator asked for once and forgot. */
|
|
14029
|
+
var NC_SNOOZE_MAX_MINUTES = 1440;
|
|
13965
14030
|
/** Weekly schedule — OR of windows; absence on the rule = always active. */
|
|
13966
14031
|
var NcScheduleSchema = object({
|
|
13967
14032
|
windows: array(object({
|
|
@@ -14338,15 +14403,15 @@ var NcConditionsSchema = object({
|
|
|
14338
14403
|
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14339
14404
|
* classified sample) stays exactly as it was for rules that already use it.
|
|
14340
14405
|
*
|
|
14341
|
-
*
|
|
14342
|
-
* rather than an
|
|
14343
|
-
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14344
|
-
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor
|
|
14406
|
+
* In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
|
|
14407
|
+
* rule rather than an accident: the viewer mirrors the descriptor enums BY
|
|
14408
|
+
* HAND (`camstack/src/data/notification-center.ts`, guarded by
|
|
14409
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
|
|
14345
14410
|
* condition fields it does not know when a rule is saved from the phone.
|
|
14346
14411
|
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14347
|
-
* operator loses a rule's conditions by opening it — so the
|
|
14348
|
-
*
|
|
14349
|
-
*
|
|
14412
|
+
* operator loses a rule's conditions by opening it — so the viewer mirror
|
|
14413
|
+
* (P3, shipped) went FIRST, and the descriptor an editor renders from
|
|
14414
|
+
* follows here.
|
|
14350
14415
|
*/
|
|
14351
14416
|
audio: NcAudioConditionSchema.optional()
|
|
14352
14417
|
});
|
|
@@ -14582,6 +14647,30 @@ var NcRuleInputSchema = object({
|
|
|
14582
14647
|
*/
|
|
14583
14648
|
snoozeAllowGlobal: boolean().optional(),
|
|
14584
14649
|
/**
|
|
14650
|
+
* The snooze durations THIS rule's notification offers as buttons, in
|
|
14651
|
+
* minutes.
|
|
14652
|
+
*
|
|
14653
|
+
* Three states, and all three are distinct — which is exactly why this is
|
|
14654
|
+
* `.optional()` and never `.default()`. A Zod default does not run on the
|
|
14655
|
+
* addon cap path (three production failures in one day), so a schema default
|
|
14656
|
+
* would collapse the first two:
|
|
14657
|
+
*
|
|
14658
|
+
* | value | meaning |
|
|
14659
|
+
* | --- | --- |
|
|
14660
|
+
* | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
|
|
14661
|
+
* | `[]` | **no snooze buttons on this rule** — the explicit override |
|
|
14662
|
+
* | a list | these choices, de-duplicated and sorted, at most four |
|
|
14663
|
+
*
|
|
14664
|
+
* `.max(4)` because the notifier's own action budget is small (ntfy allows
|
|
14665
|
+
* three buttons in total) and a rule that spent it all on snooze choices
|
|
14666
|
+
* would push its own tap-through actions off the notification.
|
|
14667
|
+
*
|
|
14668
|
+
* An empty list is NOT an alarm exemption: a rule the alarm is about, or
|
|
14669
|
+
* that arms the panel, is exempt automatically and cannot be silenced by a
|
|
14670
|
+
* window from anywhere (D133).
|
|
14671
|
+
*/
|
|
14672
|
+
snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
|
|
14673
|
+
/**
|
|
14585
14674
|
* Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
|
|
14586
14675
|
*
|
|
14587
14676
|
* This is what makes the rule set the alarm's trigger set without the alarm
|
|
@@ -14681,6 +14770,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14681
14770
|
"device",
|
|
14682
14771
|
"package",
|
|
14683
14772
|
"occupancy",
|
|
14773
|
+
"audio",
|
|
14684
14774
|
"system"
|
|
14685
14775
|
]),
|
|
14686
14776
|
label: string(),
|
|
@@ -14699,6 +14789,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14699
14789
|
"crossingSelect",
|
|
14700
14790
|
"polygonDraw",
|
|
14701
14791
|
"occupancy",
|
|
14792
|
+
"audio",
|
|
14702
14793
|
"deviceState",
|
|
14703
14794
|
"systemEvent"
|
|
14704
14795
|
]),
|
|
@@ -14850,7 +14941,20 @@ var NcSnoozeInputSchema = object({
|
|
|
14850
14941
|
ruleId: string().optional(),
|
|
14851
14942
|
/** Required when `scope: 'device'`. */
|
|
14852
14943
|
deviceId: number().int().optional(),
|
|
14853
|
-
|
|
14944
|
+
/**
|
|
14945
|
+
* Narrow the window to these subject classes — "the cat, not the person".
|
|
14946
|
+
*
|
|
14947
|
+
* ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
|
|
14948
|
+
* what every window authored before this field meant, so no persisted row
|
|
14949
|
+
* changes meaning and no client has to learn anything to keep working.
|
|
14950
|
+
*
|
|
14951
|
+
* It is what makes the window's real key `(deviceId, classes[])` and lets it
|
|
14952
|
+
* cross rules (D133): the operator points at a camera and a kind of thing,
|
|
14953
|
+
* not at whichever of their four rules happened to produce the notification
|
|
14954
|
+
* they are dismissing.
|
|
14955
|
+
*/
|
|
14956
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
14957
|
+
durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
|
|
14854
14958
|
/**
|
|
14855
14959
|
* Silence this for EVERY recipient, not just the caller. Permission is
|
|
14856
14960
|
* checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
|
|
@@ -14875,6 +14979,10 @@ var NcSnoozeSchema = object({
|
|
|
14875
14979
|
scope: NcSnoozeScopeSchema,
|
|
14876
14980
|
ruleId: string().optional(),
|
|
14877
14981
|
deviceId: number().int().optional(),
|
|
14982
|
+
/** Subject classes this window covers. ABSENT = every class — see
|
|
14983
|
+
* {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
|
|
14984
|
+
* no SQLite column: nothing queries a window by class. */
|
|
14985
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
14878
14986
|
startedAt: number(),
|
|
14879
14987
|
/** Exclusive: at exactly this instant the snooze is over. Expiry is a
|
|
14880
14988
|
* COMPARISON, not a job — no sweeper can leave the operator silenced. */
|
|
@@ -17112,6 +17220,22 @@ var detectionFpsField = {
|
|
|
17112
17220
|
default: 10,
|
|
17113
17221
|
step: 1
|
|
17114
17222
|
};
|
|
17223
|
+
/**
|
|
17224
|
+
* The occupancy re-check interval. DEFAULT 300 s (2026-08-13 — was 30 s).
|
|
17225
|
+
*
|
|
17226
|
+
* The recheck is now on by default (a parked car is invisible to occupancy
|
|
17227
|
+
* rules until the stationary registry has been rebuilt by motion, which after a
|
|
17228
|
+
* restart may be never on a quiet camera). Each cycle re-subscribes a detection
|
|
17229
|
+
* session — an RTSP re-dial — so the switch is only affordable at a WIDE
|
|
17230
|
+
* interval: 300 s is ~12 re-dials an hour per camera, against 120 at the old
|
|
17231
|
+
* 30 s. A parked car is therefore counted within 5 minutes of a restart.
|
|
17232
|
+
*
|
|
17233
|
+
* Why not wider: `max` is 300 and raising it is TRAIN-BOUND, not addon-bound —
|
|
17234
|
+
* the host validates `attachCamera` against ITS copy of this schema, so a
|
|
17235
|
+
* runner asked for 600 would be rejected by the hub until a `@camstack/server`
|
|
17236
|
+
* carrying the wider bound is installed everywhere. 300 is the widest value
|
|
17237
|
+
* that ships with an addon deploy.
|
|
17238
|
+
*/
|
|
17115
17239
|
var occupancyRecheckSecField = {
|
|
17116
17240
|
min: 0,
|
|
17117
17241
|
max: 300,
|
|
@@ -17313,15 +17437,21 @@ var RunnerCameraConfigSchema = object({
|
|
|
17313
17437
|
*/
|
|
17314
17438
|
onboardMotionDrivesAnalyzer: boolean().default(true),
|
|
17315
17439
|
/**
|
|
17316
|
-
* Master toggle for the occupancy re-check. When `false`
|
|
17317
|
-
*
|
|
17318
|
-
* this is off by default because the recheck re-subscribes a detection session
|
|
17319
|
-
* every N seconds while `watching`, a major source of pull-decoder re-dial
|
|
17320
|
-
* churn (each cycle creates+tears a session → RTSP re-dial → latency). The
|
|
17440
|
+
* Master toggle for the occupancy re-check. When `false` the runner never arms
|
|
17441
|
+
* the periodic recheck timer, regardless of `occupancyRecheckSec`; the
|
|
17321
17442
|
* `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
|
|
17322
17443
|
* (and only render) when this is enabled.
|
|
17323
|
-
|
|
17324
|
-
|
|
17444
|
+
*
|
|
17445
|
+
* DEFAULT `true` since 2026-08-13 (was `false`). It was off because the
|
|
17446
|
+
* recheck re-subscribes a detection session every N seconds while `watching`
|
|
17447
|
+
* — each cycle creates+tears a session ⇒ an RTSP re-dial ⇒ latency, a major
|
|
17448
|
+
* pull-decoder churn source. What that bought was a blind spot: a STATIONARY
|
|
17449
|
+
* object is counted only while the stationary registry holds it, and the
|
|
17450
|
+
* registry rebuilds from motion, so after a restart a parked car was invisible
|
|
17451
|
+
* to every occupancy rule until something moved in front of it. The churn is
|
|
17452
|
+
* now paid on the interval instead — see `occupancyRecheckSecField`.
|
|
17453
|
+
*/
|
|
17454
|
+
occupancyRecheckEnabled: boolean().default(true),
|
|
17325
17455
|
occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
|
|
17326
17456
|
occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
|
|
17327
17457
|
/**
|
|
@@ -30447,6 +30577,7 @@ Object.freeze({
|
|
|
30447
30577
|
"network-access": "ingress",
|
|
30448
30578
|
"smtp-provider": "email"
|
|
30449
30579
|
});
|
|
30580
|
+
new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
|
|
30450
30581
|
new Set(["devices", "classes"]);
|
|
30451
30582
|
/**
|
|
30452
30583
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
@@ -30836,7 +30967,7 @@ var AgentUIAddon = class extends BaseAddon {
|
|
|
30836
30967
|
capability: adminUiCapability,
|
|
30837
30968
|
provider: {
|
|
30838
30969
|
getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
|
|
30839
|
-
getVersion: async () => ({ version: "1.2.
|
|
30970
|
+
getVersion: async () => ({ version: "1.2.17" })
|
|
30840
30971
|
}
|
|
30841
30972
|
}];
|
|
30842
30973
|
}
|