@camstack/addon-ai 0.2.19 → 0.2.20
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 +72 -9
- package/dist/addon.mjs +72 -9
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -13101,7 +13101,23 @@ var NotificationActionSchema = object({
|
|
|
13101
13101
|
* else — see `notification-center/action-token.ts` for what that does and
|
|
13102
13102
|
* does not buy.
|
|
13103
13103
|
*/
|
|
13104
|
-
destructive: boolean().optional()
|
|
13104
|
+
destructive: boolean().optional(),
|
|
13105
|
+
/**
|
|
13106
|
+
* How the tap should REACH the url.
|
|
13107
|
+
*
|
|
13108
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
13109
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
13110
|
+
* That is right for a button whose answer the operator wants to read.
|
|
13111
|
+
*
|
|
13112
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
13113
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
13114
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
13115
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
13116
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
13117
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
13118
|
+
* a requirement.
|
|
13119
|
+
*/
|
|
13120
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
13105
13121
|
});
|
|
13106
13122
|
/**
|
|
13107
13123
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
@@ -14102,6 +14118,9 @@ var NcSystemEventConditionSchema = object({
|
|
|
14102
14118
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14103
14119
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14104
14120
|
});
|
|
14121
|
+
/** Hard ceiling on a window (24h). A snooze that could not expire would be an
|
|
14122
|
+
* outage the operator asked for once and forgot. */
|
|
14123
|
+
var NC_SNOOZE_MAX_MINUTES = 1440;
|
|
14105
14124
|
/** Weekly schedule — OR of windows; absence on the rule = always active. */
|
|
14106
14125
|
var NcScheduleSchema = object({
|
|
14107
14126
|
windows: array(object({
|
|
@@ -14478,15 +14497,15 @@ var NcConditionsSchema = object({
|
|
|
14478
14497
|
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14479
14498
|
* classified sample) stays exactly as it was for rules that already use it.
|
|
14480
14499
|
*
|
|
14481
|
-
*
|
|
14482
|
-
* rather than an
|
|
14483
|
-
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14484
|
-
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor
|
|
14500
|
+
* In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
|
|
14501
|
+
* rule rather than an accident: the viewer mirrors the descriptor enums BY
|
|
14502
|
+
* HAND (`camstack/src/data/notification-center.ts`, guarded by
|
|
14503
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
|
|
14485
14504
|
* condition fields it does not know when a rule is saved from the phone.
|
|
14486
14505
|
* 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
|
|
14488
|
-
*
|
|
14489
|
-
*
|
|
14506
|
+
* operator loses a rule's conditions by opening it — so the viewer mirror
|
|
14507
|
+
* (P3, shipped) went FIRST, and the descriptor an editor renders from
|
|
14508
|
+
* follows here.
|
|
14490
14509
|
*/
|
|
14491
14510
|
audio: NcAudioConditionSchema.optional()
|
|
14492
14511
|
});
|
|
@@ -14722,6 +14741,30 @@ var NcRuleInputSchema = object({
|
|
|
14722
14741
|
*/
|
|
14723
14742
|
snoozeAllowGlobal: boolean().optional(),
|
|
14724
14743
|
/**
|
|
14744
|
+
* The snooze durations THIS rule's notification offers as buttons, in
|
|
14745
|
+
* minutes.
|
|
14746
|
+
*
|
|
14747
|
+
* Three states, and all three are distinct — which is exactly why this is
|
|
14748
|
+
* `.optional()` and never `.default()`. A Zod default does not run on the
|
|
14749
|
+
* addon cap path (three production failures in one day), so a schema default
|
|
14750
|
+
* would collapse the first two:
|
|
14751
|
+
*
|
|
14752
|
+
* | value | meaning |
|
|
14753
|
+
* | --- | --- |
|
|
14754
|
+
* | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
|
|
14755
|
+
* | `[]` | **no snooze buttons on this rule** — the explicit override |
|
|
14756
|
+
* | a list | these choices, de-duplicated and sorted, at most four |
|
|
14757
|
+
*
|
|
14758
|
+
* `.max(4)` because the notifier's own action budget is small (ntfy allows
|
|
14759
|
+
* three buttons in total) and a rule that spent it all on snooze choices
|
|
14760
|
+
* would push its own tap-through actions off the notification.
|
|
14761
|
+
*
|
|
14762
|
+
* An empty list is NOT an alarm exemption: a rule the alarm is about, or
|
|
14763
|
+
* that arms the panel, is exempt automatically and cannot be silenced by a
|
|
14764
|
+
* window from anywhere (D133).
|
|
14765
|
+
*/
|
|
14766
|
+
snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
|
|
14767
|
+
/**
|
|
14725
14768
|
* Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
|
|
14726
14769
|
*
|
|
14727
14770
|
* This is what makes the rule set the alarm's trigger set without the alarm
|
|
@@ -14821,6 +14864,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14821
14864
|
"device",
|
|
14822
14865
|
"package",
|
|
14823
14866
|
"occupancy",
|
|
14867
|
+
"audio",
|
|
14824
14868
|
"system"
|
|
14825
14869
|
]),
|
|
14826
14870
|
label: string(),
|
|
@@ -14839,6 +14883,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14839
14883
|
"crossingSelect",
|
|
14840
14884
|
"polygonDraw",
|
|
14841
14885
|
"occupancy",
|
|
14886
|
+
"audio",
|
|
14842
14887
|
"deviceState",
|
|
14843
14888
|
"systemEvent"
|
|
14844
14889
|
]),
|
|
@@ -14990,7 +15035,20 @@ var NcSnoozeInputSchema = object({
|
|
|
14990
15035
|
ruleId: string().optional(),
|
|
14991
15036
|
/** Required when `scope: 'device'`. */
|
|
14992
15037
|
deviceId: number().int().optional(),
|
|
14993
|
-
|
|
15038
|
+
/**
|
|
15039
|
+
* Narrow the window to these subject classes — "the cat, not the person".
|
|
15040
|
+
*
|
|
15041
|
+
* ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
|
|
15042
|
+
* what every window authored before this field meant, so no persisted row
|
|
15043
|
+
* changes meaning and no client has to learn anything to keep working.
|
|
15044
|
+
*
|
|
15045
|
+
* It is what makes the window's real key `(deviceId, classes[])` and lets it
|
|
15046
|
+
* cross rules (D133): the operator points at a camera and a kind of thing,
|
|
15047
|
+
* not at whichever of their four rules happened to produce the notification
|
|
15048
|
+
* they are dismissing.
|
|
15049
|
+
*/
|
|
15050
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15051
|
+
durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
|
|
14994
15052
|
/**
|
|
14995
15053
|
* Silence this for EVERY recipient, not just the caller. Permission is
|
|
14996
15054
|
* checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
|
|
@@ -15015,6 +15073,10 @@ var NcSnoozeSchema = object({
|
|
|
15015
15073
|
scope: NcSnoozeScopeSchema,
|
|
15016
15074
|
ruleId: string().optional(),
|
|
15017
15075
|
deviceId: number().int().optional(),
|
|
15076
|
+
/** Subject classes this window covers. ABSENT = every class — see
|
|
15077
|
+
* {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
|
|
15078
|
+
* no SQLite column: nothing queries a window by class. */
|
|
15079
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15018
15080
|
startedAt: number(),
|
|
15019
15081
|
/** Exclusive: at exactly this instant the snooze is over. Expiry is a
|
|
15020
15082
|
* COMPARISON, not a job — no sweeper can leave the operator silenced. */
|
|
@@ -30587,6 +30649,7 @@ Object.freeze({
|
|
|
30587
30649
|
"network-access": "ingress",
|
|
30588
30650
|
"smtp-provider": "email"
|
|
30589
30651
|
});
|
|
30652
|
+
new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
|
|
30590
30653
|
new Set(["devices", "classes"]);
|
|
30591
30654
|
/**
|
|
30592
30655
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
package/dist/addon.mjs
CHANGED
|
@@ -13063,7 +13063,23 @@ var NotificationActionSchema = object({
|
|
|
13063
13063
|
* else — see `notification-center/action-token.ts` for what that does and
|
|
13064
13064
|
* does not buy.
|
|
13065
13065
|
*/
|
|
13066
|
-
destructive: boolean().optional()
|
|
13066
|
+
destructive: boolean().optional(),
|
|
13067
|
+
/**
|
|
13068
|
+
* How the tap should REACH the url.
|
|
13069
|
+
*
|
|
13070
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
13071
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
13072
|
+
* That is right for a button whose answer the operator wants to read.
|
|
13073
|
+
*
|
|
13074
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
13075
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
13076
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
13077
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
13078
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
13079
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
13080
|
+
* a requirement.
|
|
13081
|
+
*/
|
|
13082
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
13067
13083
|
});
|
|
13068
13084
|
/**
|
|
13069
13085
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
@@ -14064,6 +14080,9 @@ var NcSystemEventConditionSchema = object({
|
|
|
14064
14080
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14065
14081
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14066
14082
|
});
|
|
14083
|
+
/** Hard ceiling on a window (24h). A snooze that could not expire would be an
|
|
14084
|
+
* outage the operator asked for once and forgot. */
|
|
14085
|
+
var NC_SNOOZE_MAX_MINUTES = 1440;
|
|
14067
14086
|
/** Weekly schedule — OR of windows; absence on the rule = always active. */
|
|
14068
14087
|
var NcScheduleSchema = object({
|
|
14069
14088
|
windows: array(object({
|
|
@@ -14440,15 +14459,15 @@ var NcConditionsSchema = object({
|
|
|
14440
14459
|
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14441
14460
|
* classified sample) stays exactly as it was for rules that already use it.
|
|
14442
14461
|
*
|
|
14443
|
-
*
|
|
14444
|
-
* rather than an
|
|
14445
|
-
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14446
|
-
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor
|
|
14462
|
+
* In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
|
|
14463
|
+
* rule rather than an accident: the viewer mirrors the descriptor enums BY
|
|
14464
|
+
* HAND (`camstack/src/data/notification-center.ts`, guarded by
|
|
14465
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
|
|
14447
14466
|
* condition fields it does not know when a rule is saved from the phone.
|
|
14448
14467
|
* 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
|
|
14450
|
-
*
|
|
14451
|
-
*
|
|
14468
|
+
* operator loses a rule's conditions by opening it — so the viewer mirror
|
|
14469
|
+
* (P3, shipped) went FIRST, and the descriptor an editor renders from
|
|
14470
|
+
* follows here.
|
|
14452
14471
|
*/
|
|
14453
14472
|
audio: NcAudioConditionSchema.optional()
|
|
14454
14473
|
});
|
|
@@ -14684,6 +14703,30 @@ var NcRuleInputSchema = object({
|
|
|
14684
14703
|
*/
|
|
14685
14704
|
snoozeAllowGlobal: boolean().optional(),
|
|
14686
14705
|
/**
|
|
14706
|
+
* The snooze durations THIS rule's notification offers as buttons, in
|
|
14707
|
+
* minutes.
|
|
14708
|
+
*
|
|
14709
|
+
* Three states, and all three are distinct — which is exactly why this is
|
|
14710
|
+
* `.optional()` and never `.default()`. A Zod default does not run on the
|
|
14711
|
+
* addon cap path (three production failures in one day), so a schema default
|
|
14712
|
+
* would collapse the first two:
|
|
14713
|
+
*
|
|
14714
|
+
* | value | meaning |
|
|
14715
|
+
* | --- | --- |
|
|
14716
|
+
* | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
|
|
14717
|
+
* | `[]` | **no snooze buttons on this rule** — the explicit override |
|
|
14718
|
+
* | a list | these choices, de-duplicated and sorted, at most four |
|
|
14719
|
+
*
|
|
14720
|
+
* `.max(4)` because the notifier's own action budget is small (ntfy allows
|
|
14721
|
+
* three buttons in total) and a rule that spent it all on snooze choices
|
|
14722
|
+
* would push its own tap-through actions off the notification.
|
|
14723
|
+
*
|
|
14724
|
+
* An empty list is NOT an alarm exemption: a rule the alarm is about, or
|
|
14725
|
+
* that arms the panel, is exempt automatically and cannot be silenced by a
|
|
14726
|
+
* window from anywhere (D133).
|
|
14727
|
+
*/
|
|
14728
|
+
snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
|
|
14729
|
+
/**
|
|
14687
14730
|
* Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
|
|
14688
14731
|
*
|
|
14689
14732
|
* This is what makes the rule set the alarm's trigger set without the alarm
|
|
@@ -14783,6 +14826,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14783
14826
|
"device",
|
|
14784
14827
|
"package",
|
|
14785
14828
|
"occupancy",
|
|
14829
|
+
"audio",
|
|
14786
14830
|
"system"
|
|
14787
14831
|
]),
|
|
14788
14832
|
label: string(),
|
|
@@ -14801,6 +14845,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14801
14845
|
"crossingSelect",
|
|
14802
14846
|
"polygonDraw",
|
|
14803
14847
|
"occupancy",
|
|
14848
|
+
"audio",
|
|
14804
14849
|
"deviceState",
|
|
14805
14850
|
"systemEvent"
|
|
14806
14851
|
]),
|
|
@@ -14952,7 +14997,20 @@ var NcSnoozeInputSchema = object({
|
|
|
14952
14997
|
ruleId: string().optional(),
|
|
14953
14998
|
/** Required when `scope: 'device'`. */
|
|
14954
14999
|
deviceId: number().int().optional(),
|
|
14955
|
-
|
|
15000
|
+
/**
|
|
15001
|
+
* Narrow the window to these subject classes — "the cat, not the person".
|
|
15002
|
+
*
|
|
15003
|
+
* ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
|
|
15004
|
+
* what every window authored before this field meant, so no persisted row
|
|
15005
|
+
* changes meaning and no client has to learn anything to keep working.
|
|
15006
|
+
*
|
|
15007
|
+
* It is what makes the window's real key `(deviceId, classes[])` and lets it
|
|
15008
|
+
* cross rules (D133): the operator points at a camera and a kind of thing,
|
|
15009
|
+
* not at whichever of their four rules happened to produce the notification
|
|
15010
|
+
* they are dismissing.
|
|
15011
|
+
*/
|
|
15012
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15013
|
+
durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
|
|
14956
15014
|
/**
|
|
14957
15015
|
* Silence this for EVERY recipient, not just the caller. Permission is
|
|
14958
15016
|
* checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
|
|
@@ -14977,6 +15035,10 @@ var NcSnoozeSchema = object({
|
|
|
14977
15035
|
scope: NcSnoozeScopeSchema,
|
|
14978
15036
|
ruleId: string().optional(),
|
|
14979
15037
|
deviceId: number().int().optional(),
|
|
15038
|
+
/** Subject classes this window covers. ABSENT = every class — see
|
|
15039
|
+
* {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
|
|
15040
|
+
* no SQLite column: nothing queries a window by class. */
|
|
15041
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
14980
15042
|
startedAt: number(),
|
|
14981
15043
|
/** Exclusive: at exactly this instant the snooze is over. Expiry is a
|
|
14982
15044
|
* COMPARISON, not a job — no sweeper can leave the operator silenced. */
|
|
@@ -30549,6 +30611,7 @@ Object.freeze({
|
|
|
30549
30611
|
"network-access": "ingress",
|
|
30550
30612
|
"smtp-provider": "email"
|
|
30551
30613
|
});
|
|
30614
|
+
new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
|
|
30552
30615
|
new Set(["devices", "classes"]);
|
|
30553
30616
|
/**
|
|
30554
30617
|
* 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.
|
|
3
|
+
"version": "0.2.20",
|
|
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",
|