@camstack/addon-agent-ui 1.2.145 → 1.2.147
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 +370 -18
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -5361,7 +5361,7 @@ var ZodIssueCode = {
|
|
|
5361
5361
|
var ZodFirstPartyTypeKind;
|
|
5362
5362
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5363
5363
|
//#endregion
|
|
5364
|
-
//#region ../types/dist/sleep-
|
|
5364
|
+
//#region ../types/dist/sleep-DU7mu4wb.mjs
|
|
5365
5365
|
/**
|
|
5366
5366
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5367
5367
|
* window to float samples (D455).
|
|
@@ -14537,18 +14537,30 @@ var LlmErrorCodeSchema = _enum([
|
|
|
14537
14537
|
"budget-exceeded",
|
|
14538
14538
|
"adapter-error"
|
|
14539
14539
|
]);
|
|
14540
|
-
var
|
|
14540
|
+
var LlmGenerateOkSchema = object({
|
|
14541
14541
|
ok: literal(true),
|
|
14542
14542
|
text: string(),
|
|
14543
14543
|
model: string(),
|
|
14544
14544
|
usage: LlmUsageSchema,
|
|
14545
14545
|
truncated: boolean(),
|
|
14546
14546
|
latencyMs: number()
|
|
14547
|
-
})
|
|
14547
|
+
});
|
|
14548
|
+
/**
|
|
14549
|
+
* WHO refused, on a `refusal`. `guardrail` = a safety filter in front of the
|
|
14550
|
+
* model rejected the request before it answered (Apple Foundation Models
|
|
14551
|
+
* refuses surveillance-framed prompts in 0.1 s); `model` = the model itself
|
|
14552
|
+
* declined. They are different faults: a guardrail refusal is a property of
|
|
14553
|
+
* the BACKEND, so the provider falls back to the next profile; a model refusal
|
|
14554
|
+
* is an answer. Absent on every other code, and on a refusal a wire cannot
|
|
14555
|
+
* attribute.
|
|
14556
|
+
*/
|
|
14557
|
+
var LlmRefusalSourceSchema = _enum(["guardrail", "model"]);
|
|
14558
|
+
var LlmGenerateResultSchema = discriminatedUnion("ok", [LlmGenerateOkSchema, object({
|
|
14548
14559
|
ok: literal(false),
|
|
14549
14560
|
code: LlmErrorCodeSchema,
|
|
14550
14561
|
message: string(),
|
|
14551
|
-
retryAfterMs: number().optional()
|
|
14562
|
+
retryAfterMs: number().optional(),
|
|
14563
|
+
refusalSource: LlmRefusalSourceSchema.optional()
|
|
14552
14564
|
})]);
|
|
14553
14565
|
/**
|
|
14554
14566
|
* `Uint8Array` is the sanctioned binary convention — superjson + the UDS
|
|
@@ -14778,12 +14790,78 @@ var LlmRuntimeDiskUsageSchema = object({
|
|
|
14778
14790
|
modelsBytes: number(),
|
|
14779
14791
|
freeBytes: number().optional()
|
|
14780
14792
|
});
|
|
14781
|
-
|
|
14793
|
+
var LlmRuntimeCompleteInputSchema = LlmGenerateBaseInputSchema.extend({
|
|
14782
14794
|
images: array(LlmImageSchema).optional(),
|
|
14783
14795
|
runtime: ManagedRuntimeConfigSchema,
|
|
14784
14796
|
/** The managed profile's timeout, threaded by the hub provider. */
|
|
14785
14797
|
timeoutMs: number().int().positive().optional()
|
|
14786
|
-
})
|
|
14798
|
+
});
|
|
14799
|
+
/**
|
|
14800
|
+
* Why Apple Foundation Models cannot run on a node that has it in principle.
|
|
14801
|
+
* The first three are Apple's own `UnavailableReason`s, verbatim; the rest are
|
|
14802
|
+
* ours: the OS predates the framework (macOS < 26), the helper binary is not
|
|
14803
|
+
* in the installed addon, or it crashed past the respawn bound.
|
|
14804
|
+
*/
|
|
14805
|
+
var AppleFmUnavailableReasonSchema = _enum([
|
|
14806
|
+
"deviceNotEligible",
|
|
14807
|
+
"appleIntelligenceNotEnabled",
|
|
14808
|
+
"modelNotReady",
|
|
14809
|
+
"osTooOld",
|
|
14810
|
+
"helperMissing",
|
|
14811
|
+
"helperCrashed"
|
|
14812
|
+
]);
|
|
14813
|
+
/**
|
|
14814
|
+
* Apple Foundation Models on ONE node — four states, never a boolean (D315).
|
|
14815
|
+
*
|
|
14816
|
+
* - `available` — the helper probed it; what it CAN do is reported
|
|
14817
|
+
* here (`imageInput`, `contextSize`, languages),
|
|
14818
|
+
* never typed by an operator.
|
|
14819
|
+
* - `unavailable` — a known absence, with the reason to act on.
|
|
14820
|
+
* - `unsupported-platform` — not a Mac; there is nothing to enable.
|
|
14821
|
+
* - `unknown` — the probe did not answer (not yet run, timed
|
|
14822
|
+
* out, helper crashed mid-probe). A failed
|
|
14823
|
+
* measurement is NEVER `unavailable` (D393).
|
|
14824
|
+
*/
|
|
14825
|
+
var AppleFmAvailabilitySchema = discriminatedUnion("state", [
|
|
14826
|
+
object({
|
|
14827
|
+
state: literal("available"),
|
|
14828
|
+
osVersion: string(),
|
|
14829
|
+
/** Tokens, as the framework reports it. Read at runtime, never assumed. */
|
|
14830
|
+
contextSize: number().int().positive(),
|
|
14831
|
+
/** BCP-47-ish tags (`it-IT`) of the languages the model supports. */
|
|
14832
|
+
languages: array(string()),
|
|
14833
|
+
/** Whether prompts may carry images. `false` on a macOS 26 build. */
|
|
14834
|
+
imageInput: boolean()
|
|
14835
|
+
}),
|
|
14836
|
+
object({
|
|
14837
|
+
state: literal("unavailable"),
|
|
14838
|
+
reason: AppleFmUnavailableReasonSchema,
|
|
14839
|
+
osVersion: string().nullable(),
|
|
14840
|
+
detail: string()
|
|
14841
|
+
}),
|
|
14842
|
+
object({
|
|
14843
|
+
state: literal("unsupported-platform"),
|
|
14844
|
+
platform: string()
|
|
14845
|
+
}),
|
|
14846
|
+
object({
|
|
14847
|
+
state: literal("unknown"),
|
|
14848
|
+
error: string()
|
|
14849
|
+
})
|
|
14850
|
+
]);
|
|
14851
|
+
/**
|
|
14852
|
+
* A generation on the node's Apple Foundation Models helper. A separate verb
|
|
14853
|
+
* from `complete`, whose `runtime` is a llama.cpp config: overloading it would
|
|
14854
|
+
* drag a GGUF model reference into a backend that has none. `images` is part
|
|
14855
|
+
* of the contract so vision needs no cap change later; a node whose model has
|
|
14856
|
+
* no image input REFUSES them (`unavailable`), never drops them.
|
|
14857
|
+
*/
|
|
14858
|
+
var LlmRuntimeAppleCompleteInputSchema = LlmGenerateBaseInputSchema.extend({
|
|
14859
|
+
images: array(LlmImageSchema).optional(),
|
|
14860
|
+
/** The profile's timeout, threaded by the hub provider. */
|
|
14861
|
+
timeoutMs: number().int().positive().optional()
|
|
14862
|
+
});
|
|
14863
|
+
var LlmRuntimeCancelInputSchema = object({ requestId: string() });
|
|
14864
|
+
method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
|
|
14787
14865
|
kind: "mutation",
|
|
14788
14866
|
auth: "admin",
|
|
14789
14867
|
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
@@ -14801,7 +14879,14 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
14801
14879
|
}), method(object({ file: string() }), _void(), {
|
|
14802
14880
|
kind: "mutation",
|
|
14803
14881
|
auth: "admin"
|
|
14804
|
-
}), method(object({}), array(LlmNodeModelSchema), { auth: "admin" }), method(object({}), LlmRuntimeDiskUsageSchema, { auth: "admin" })
|
|
14882
|
+
}), method(object({}), array(LlmNodeModelSchema), { auth: "admin" }), method(object({}), LlmRuntimeDiskUsageSchema, { auth: "admin" }), method(LlmRuntimeCancelInputSchema, _void(), {
|
|
14883
|
+
kind: "mutation",
|
|
14884
|
+
auth: "admin"
|
|
14885
|
+
}), method(object({}), AppleFmAvailabilitySchema, { auth: "admin" }), method(LlmRuntimeAppleCompleteInputSchema, LlmGenerateResultSchema, {
|
|
14886
|
+
kind: "mutation",
|
|
14887
|
+
auth: "admin",
|
|
14888
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14889
|
+
});
|
|
14805
14890
|
/**
|
|
14806
14891
|
* `llm` — consumer-facing LLM surface (spec §1-§3). Collection-mode: array
|
|
14807
14892
|
* methods concat-fan across providers; single-row methods route to ONE
|
|
@@ -14818,7 +14903,8 @@ var LlmProfileKindSchema = _enum([
|
|
|
14818
14903
|
"openai",
|
|
14819
14904
|
"anthropic",
|
|
14820
14905
|
"google",
|
|
14821
|
-
"managed-local"
|
|
14906
|
+
"managed-local",
|
|
14907
|
+
"apple-foundation"
|
|
14822
14908
|
]);
|
|
14823
14909
|
var LlmProfileSchema = object({
|
|
14824
14910
|
id: string(),
|
|
@@ -14876,7 +14962,14 @@ var LlmProfileSchema = object({
|
|
|
14876
14962
|
toolsEnabled: boolean().default(false),
|
|
14877
14963
|
extraHeaders: record(string(), string()).optional(),
|
|
14878
14964
|
/** kind === 'managed-local' only (spec §4). */
|
|
14879
|
-
runtime: ManagedRuntimeConfigSchema.optional()
|
|
14965
|
+
runtime: ManagedRuntimeConfigSchema.optional(),
|
|
14966
|
+
/**
|
|
14967
|
+
* kind === 'apple-foundation' only: WHERE it runs — the only thing there is
|
|
14968
|
+
* to configure (no key, no URL, no download; `model` is `apple-system`).
|
|
14969
|
+
* `supportsVision` on such a row is stamped by the provider from the node's
|
|
14970
|
+
* reported `imageInput`, never taken from the operator (D62).
|
|
14971
|
+
*/
|
|
14972
|
+
appleFoundation: object({ nodeId: string() }).optional()
|
|
14880
14973
|
});
|
|
14881
14974
|
/** ConfigUISchema tree passed through untyped on the wire (the
|
|
14882
14975
|
* notification-output `ConfigSchemaPassthrough` precedent at
|
|
@@ -14958,7 +15051,9 @@ var LlmRuntimeNodeSchema = object({
|
|
|
14958
15051
|
reachable: boolean(),
|
|
14959
15052
|
status: LlmRuntimeStatusSchema.optional(),
|
|
14960
15053
|
disk: LlmRuntimeDiskUsageSchema.optional(),
|
|
14961
|
-
error: string().optional()
|
|
15054
|
+
error: string().optional(),
|
|
15055
|
+
/** Absent = the node did not answer the question (render as unknown). */
|
|
15056
|
+
apple: AppleFmAvailabilitySchema.optional()
|
|
14962
15057
|
});
|
|
14963
15058
|
var GenerateVisionInputSchema = LlmGenerateBaseInputSchema.extend({ images: array(LlmImageSchema).min(1) });
|
|
14964
15059
|
var ProfileRefInputSchema = object({
|
|
@@ -17116,6 +17211,16 @@ var NcCrossingSchema = _enum([
|
|
|
17116
17211
|
"exit",
|
|
17117
17212
|
"any"
|
|
17118
17213
|
]);
|
|
17214
|
+
/**
|
|
17215
|
+
* Which edge of a BOOLEAN sensor fires a device-event rule (D640).
|
|
17216
|
+
* - `raised` — the sensor went high: water detected, smoke, open, tampered.
|
|
17217
|
+
* - `cleared` — it went back: dry, clear, closed.
|
|
17218
|
+
* - absent — both edges, which is what every rule authored before this did.
|
|
17219
|
+
*
|
|
17220
|
+
* There is no third member for "both": absence already says it, and a value
|
|
17221
|
+
* that means the same as absence is a second way to write one rule.
|
|
17222
|
+
*/
|
|
17223
|
+
var NcSensorTransitionSchema = _enum(["raised", "cleared"]);
|
|
17119
17224
|
/** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
|
|
17120
17225
|
var NcZoneConditionSchema = object({
|
|
17121
17226
|
ids: array(string().min(1)).min(1),
|
|
@@ -17305,6 +17410,20 @@ var NcConditionsSchema = object({
|
|
|
17305
17410
|
scene: NcSceneConditionSchema.optional(),
|
|
17306
17411
|
/** Device scope — absent = all devices. */
|
|
17307
17412
|
devices: array(number()).optional(),
|
|
17413
|
+
/**
|
|
17414
|
+
* Device EXCLUSION (D641) — "every device except these". Judged on the SAME
|
|
17415
|
+
* subject ids {@link devices} is judged on (the camera, the sensor that
|
|
17416
|
+
* fired, a linked set's sensor and row cameras), so a sensor fanned out per
|
|
17417
|
+
* linked camera is excluded exactly where an include would have tested it.
|
|
17418
|
+
* `min(1)`: an empty exclusion excludes nothing and is written as absent.
|
|
17419
|
+
*
|
|
17420
|
+
* Not for `system-event` rules — those carry their own
|
|
17421
|
+
* `systemEvent.excludeDeviceIds` (D636), and the hub refuses this key there.
|
|
17422
|
+
* Editors present the two lists as ONE field (All | Only these | All except
|
|
17423
|
+
* these); the engine evaluates each independently, so a legacy rule
|
|
17424
|
+
* carrying both still means "these, minus those".
|
|
17425
|
+
*/
|
|
17426
|
+
devicesExclude: array(number()).min(1).optional(),
|
|
17308
17427
|
/** Detector class names (any overlap with the record's class set). */
|
|
17309
17428
|
classes: array(string().min(1)).optional(),
|
|
17310
17429
|
/** Veto classes — any overlap fails the rule. */
|
|
@@ -17438,6 +17557,16 @@ var NcConditionsSchema = object({
|
|
|
17438
17557
|
*/
|
|
17439
17558
|
sensorKinds: array(string().min(1)).optional(),
|
|
17440
17559
|
/**
|
|
17560
|
+
* DEVICE-EVENT only (D640). Fire on one edge of a boolean sensor —
|
|
17561
|
+
* {@link NcSensorTransitionSchema}. Which field of the slice means "raised"
|
|
17562
|
+
* is `@camstack/types` → `notification/sensor-raised.ts`. A reading the
|
|
17563
|
+
* engine cannot place (a kind with no raise, an unreadable slice) PASSES:
|
|
17564
|
+
* the condition fails open towards notifying, never towards silence. Editors
|
|
17565
|
+
* offer it only when every chosen {@link sensorKinds} member has a raise
|
|
17566
|
+
* (`sensorTransitionOffered`), and the hub refuses it on any other delivery.
|
|
17567
|
+
*/
|
|
17568
|
+
sensorTransition: NcSensorTransitionSchema.optional(),
|
|
17569
|
+
/**
|
|
17441
17570
|
* PACKAGE-EVENT only. Which package phase fires the rule — `delivered`
|
|
17442
17571
|
* (a parked parcel appeared), `picked-up` (it departed), or `both`. Fails
|
|
17443
17572
|
* when the subject's phase does not match (a subject always carries a phase
|
|
@@ -17937,9 +18066,29 @@ var NcTestResultSchema = object({
|
|
|
17937
18066
|
className: string().optional(),
|
|
17938
18067
|
label: string().optional()
|
|
17939
18068
|
});
|
|
17940
|
-
/** The
|
|
17941
|
-
*
|
|
18069
|
+
/** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is the
|
|
18070
|
+
* same union; the template-vars spec pins the two together. `mixed` is DERIVED
|
|
18071
|
+
* (a stored system rule whose kinds span families, D637) and never authored. */
|
|
17942
18072
|
var NcRuleKindSchema = _enum([
|
|
18073
|
+
"detection",
|
|
18074
|
+
"sensor",
|
|
18075
|
+
"occupancy",
|
|
18076
|
+
"sound",
|
|
18077
|
+
"device-events",
|
|
18078
|
+
"system",
|
|
18079
|
+
"alarm",
|
|
18080
|
+
"mixed"
|
|
18081
|
+
]);
|
|
18082
|
+
/**
|
|
18083
|
+
* The kinds a SERVED template-variable descriptor may name: the five that
|
|
18084
|
+
* existed before D637, frozen. `getTemplateCatalog` ships `kinds` to every
|
|
18085
|
+
* installed viewer, and a viewer at `@camstack/types` 1.2.25x parses them with a
|
|
18086
|
+
* strict five-member enum — one `device-events` in one descriptor fails the
|
|
18087
|
+
* whole catalog parse. So the WIRE says `system`, and the MATCH widens it:
|
|
18088
|
+
* `templateVarKindApplies` reads a `system` descriptor as applying to every
|
|
18089
|
+
* system rule kind (`device-events`, `system`, `alarm`, `mixed`).
|
|
18090
|
+
*/
|
|
18091
|
+
var NcTemplateVarKindSchema = _enum([
|
|
17943
18092
|
"detection",
|
|
17944
18093
|
"sensor",
|
|
17945
18094
|
"occupancy",
|
|
@@ -17977,7 +18126,7 @@ var NcTemplateVarGroupSchema = _enum([
|
|
|
17977
18126
|
*
|
|
17978
18127
|
* `families` / `fields` / `kinds` / `deliveries` / `systemEventKinds` say WHERE
|
|
17979
18128
|
* it has a value; absent = no restriction on that axis. `systemEventKinds` is
|
|
17980
|
-
* read only for a
|
|
18129
|
+
* read only for a system-event rule (any family, or `mixed`). `dynamic` declares a FAMILY of names
|
|
17981
18130
|
* (`count_<class>`): the descriptor's `name` is the example member.
|
|
17982
18131
|
*/
|
|
17983
18132
|
var NcTemplateVarDescriptorSchema = object({
|
|
@@ -17988,7 +18137,7 @@ var NcTemplateVarDescriptorSchema = object({
|
|
|
17988
18137
|
group: NcTemplateVarGroupSchema,
|
|
17989
18138
|
families: array(NcTemplateFamilySchema).min(1),
|
|
17990
18139
|
fields: array(NcTemplateFieldSchema).optional(),
|
|
17991
|
-
kinds: array(
|
|
18140
|
+
kinds: array(NcTemplateVarKindSchema).optional(),
|
|
17992
18141
|
deliveries: array(NcDeliverySchema).optional(),
|
|
17993
18142
|
systemEventKinds: array(NcSystemEventKindSchema).optional(),
|
|
17994
18143
|
dynamic: object({
|
|
@@ -18036,6 +18185,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
18036
18185
|
/** Editor widget the UI renders — never hardcode per-condition forms. */
|
|
18037
18186
|
valueType: _enum([
|
|
18038
18187
|
"deviceIdList",
|
|
18188
|
+
"deviceIdExcludeList",
|
|
18039
18189
|
"stringList",
|
|
18040
18190
|
"number01",
|
|
18041
18191
|
"number",
|
|
@@ -18046,6 +18196,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
18046
18196
|
"plateMatcher",
|
|
18047
18197
|
"packagePhase",
|
|
18048
18198
|
"crossingSelect",
|
|
18199
|
+
"sensorTransition",
|
|
18049
18200
|
"polygonDraw",
|
|
18050
18201
|
"occupancy",
|
|
18051
18202
|
"audio",
|
|
@@ -18196,6 +18347,28 @@ var NcHistoryFilterSchema = object({
|
|
|
18196
18347
|
limit: number().int().min(1).max(500).default(100)
|
|
18197
18348
|
});
|
|
18198
18349
|
/**
|
|
18350
|
+
* Every rule's last run, in one answer.
|
|
18351
|
+
*
|
|
18352
|
+
* A rule ABSENT from `runs` produced no delivery inside `horizonMs` — how far
|
|
18353
|
+
* back this answer looked, in ms before the hub's now. It is the outbox prune
|
|
18354
|
+
* window (7 days by default, operator-configurable), NARROWED when the read hit
|
|
18355
|
+
* its row bound: the answer never claims a window it did not read. `null` means
|
|
18356
|
+
* the operator keeps the outbox forever AND the read reached its end, so absent
|
|
18357
|
+
* means "never on record". A UI derives its "not in the last N days" from this
|
|
18358
|
+
* value, never from a constant — and only when the call ANSWERED (D315).
|
|
18359
|
+
*/
|
|
18360
|
+
var NcRuleLastRunsSchema = object({
|
|
18361
|
+
runs: array(object({
|
|
18362
|
+
ruleId: string(),
|
|
18363
|
+
/** Fire time of the newest row (`createdAt`, epoch ms). */
|
|
18364
|
+
lastAt: number(),
|
|
18365
|
+
status: NcHistoryStatusSchema,
|
|
18366
|
+
/** The camera/device of that row (a digest row files under its first camera). */
|
|
18367
|
+
deviceId: number()
|
|
18368
|
+
})),
|
|
18369
|
+
horizonMs: number().nonnegative().nullable()
|
|
18370
|
+
});
|
|
18371
|
+
/**
|
|
18199
18372
|
* What a snooze covers. Broader scopes win when several overlap, so one window
|
|
18200
18373
|
* leaves ONE digest rather than a rule snooze and a whole-feed snooze both
|
|
18201
18374
|
* summarising the same silence.
|
|
@@ -18376,6 +18549,14 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
18376
18549
|
/** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
|
|
18377
18550
|
deviceIds: array(number().int()),
|
|
18378
18551
|
/**
|
|
18552
|
+
* D641: the ids NOT covered although `allDevices` is true — every unscoped
|
|
18553
|
+
* covering rule EXCLUDES them (`conditions.devicesExclude`) and no named rule
|
|
18554
|
+
* covers them. Always `[]` when `allDevices` is false. Excluded by the rules,
|
|
18555
|
+
* which is not the same as skipped by a switch: never in `skippedDevices`.
|
|
18556
|
+
* Defaulted so an answer computed before this field parses as "none".
|
|
18557
|
+
*/
|
|
18558
|
+
allDevicesExcept: array(number().int()).default([]),
|
|
18559
|
+
/**
|
|
18379
18560
|
* Devices this mode NAMES but cannot actually arm, each with the switch that
|
|
18380
18561
|
* excludes it.
|
|
18381
18562
|
*
|
|
@@ -18511,7 +18692,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18511
18692
|
})), method(object({}), object({ vars: array(NcTemplateVarDescriptorSchema) })), method(NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, {
|
|
18512
18693
|
kind: "mutation",
|
|
18513
18694
|
access: "view"
|
|
18514
|
-
}), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" }), method(object({ artifactId: string().min(1) }), object({ url: string().nullable() }), { auth: "admin" }), method(object({}), object({ snoozes: array(NcSnoozeSchema) }), { caller: "required" }), method(object({ snooze: NcSnoozeInputSchema }), object({ snooze: NcSnoozeSchema }), {
|
|
18695
|
+
}), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" }), method(object({}), NcRuleLastRunsSchema, { auth: "admin" }), method(object({ artifactId: string().min(1) }), object({ url: string().nullable() }), { auth: "admin" }), method(object({}), object({ snoozes: array(NcSnoozeSchema) }), { caller: "required" }), method(object({ snooze: NcSnoozeInputSchema }), object({ snooze: NcSnoozeSchema }), {
|
|
18515
18696
|
kind: "mutation",
|
|
18516
18697
|
caller: "required"
|
|
18517
18698
|
}), method(object({ snoozeId: string() }), object({ success: literal(true) }), {
|
|
@@ -22957,7 +23138,11 @@ function buildDescriptor(capName, kind) {
|
|
|
22957
23138
|
icon: legacyIcon(t.iconId)
|
|
22958
23139
|
};
|
|
22959
23140
|
}
|
|
22960
|
-
|
|
23141
|
+
/**
|
|
23142
|
+
* Sensor / control cap name → static event-kind descriptor. A linked device
|
|
23143
|
+
* contributes one entry per bound cap present in this map.
|
|
23144
|
+
*/
|
|
23145
|
+
var EVENT_KIND_BY_CAP = Object.freeze(Object.fromEntries(Object.entries(CAP_TO_KIND).map(([capName, kind]) => [capName, buildDescriptor(capName, kind)])));
|
|
22961
23146
|
/**
|
|
22962
23147
|
* server-management — per-NODE singleton capability for a node's ROOT
|
|
22963
23148
|
* package lifecycle (runtime-updatable node packages).
|
|
@@ -29100,7 +29285,30 @@ var RenameNodeResultSchema = object({
|
|
|
29100
29285
|
nodeId: string(),
|
|
29101
29286
|
name: string()
|
|
29102
29287
|
});
|
|
29103
|
-
|
|
29288
|
+
/**
|
|
29289
|
+
* The cheap node list. A consumer's rule for a STORED node id (a rule's
|
|
29290
|
+
* `nodeIds`) that is missing from `nodes`, whatever `complete` says: render it
|
|
29291
|
+
* as a removable chip labelled unknown, never drop it (D49). Even a complete
|
|
29292
|
+
* list omits a node that joined and left between two history captures, so a
|
|
29293
|
+
* missing id means "not known to the hub", never "removed". Only the operator
|
|
29294
|
+
* removes it.
|
|
29295
|
+
*
|
|
29296
|
+
* `complete` changes only the WORDING: `false` = no history read has ever
|
|
29297
|
+
* answered, so the list may be missing offline nodes the hub does know (D315).
|
|
29298
|
+
*
|
|
29299
|
+
* `name` is the history row's name (≤ 30 s behind a rename), or the id when
|
|
29300
|
+
* the history has none.
|
|
29301
|
+
*/
|
|
29302
|
+
var NodeDirectorySchema = object({
|
|
29303
|
+
nodes: array(object({
|
|
29304
|
+
id: string(),
|
|
29305
|
+
name: string(),
|
|
29306
|
+
isHub: boolean(),
|
|
29307
|
+
isOnline: boolean()
|
|
29308
|
+
})).readonly(),
|
|
29309
|
+
complete: boolean()
|
|
29310
|
+
});
|
|
29311
|
+
method(_void(), array(TopologyNodeSchema).readonly(), { auth: "admin" }), method(_void(), NodeDirectorySchema, { auth: "admin" }), method(NodeAddonInputSchema, SuccessSchema, {
|
|
29104
29312
|
kind: "mutation",
|
|
29105
29313
|
auth: "admin"
|
|
29106
29314
|
}), method(NodeAddonInputSchema, SuccessSchema, {
|
|
@@ -33494,6 +33702,42 @@ DeviceType.Camera, method(object({
|
|
|
33494
33702
|
package: array(ZoneRuleSchema).readonly()
|
|
33495
33703
|
});
|
|
33496
33704
|
/**
|
|
33705
|
+
* LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
|
|
33706
|
+
* valutatore puro del suo FRONTE.
|
|
33707
|
+
*
|
|
33708
|
+
* Viveva dentro il builtin virtual-doorbell
|
|
33709
|
+
* (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
|
|
33710
|
+
* predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
|
|
33711
|
+
* `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
|
|
33712
|
+
* tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
|
|
33713
|
+
* fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
|
|
33714
|
+
* SPOSTA qui e il doorbell la ri-esporta.
|
|
33715
|
+
*
|
|
33716
|
+
* ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
|
|
33717
|
+
* due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
|
|
33718
|
+
* regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
|
|
33719
|
+
* booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
|
|
33720
|
+
*/
|
|
33721
|
+
/**
|
|
33722
|
+
* Known binary / switch source caps → the boolean slice field whose
|
|
33723
|
+
* false→true rise counts as ACTIVE. Every entry is "fire on active".
|
|
33724
|
+
* Sensors whose "active" reading is not a plain boolean (presence's string
|
|
33725
|
+
* state, connectivity's connected flag) are deliberately excluded — a
|
|
33726
|
+
* reconnect is not a doorbell press, and it is not a recording either.
|
|
33727
|
+
*/
|
|
33728
|
+
var SOURCE_CAP_ACTIVE_FIELD = {
|
|
33729
|
+
contact: "entryOpen",
|
|
33730
|
+
binary: "on",
|
|
33731
|
+
switch: "on",
|
|
33732
|
+
motion: "detected",
|
|
33733
|
+
flood: "flooded",
|
|
33734
|
+
gas: "detected",
|
|
33735
|
+
smoke: "detected",
|
|
33736
|
+
"carbon-monoxide": "detected",
|
|
33737
|
+
vibration: "detected",
|
|
33738
|
+
tamper: "tampered"
|
|
33739
|
+
};
|
|
33740
|
+
/**
|
|
33497
33741
|
* Accessory device helpers — shared across drivers.
|
|
33498
33742
|
*
|
|
33499
33743
|
* Many vendor-specific drivers register accessory child devices on
|
|
@@ -37529,12 +37773,30 @@ Object.freeze({
|
|
|
37529
37773
|
addonId: null,
|
|
37530
37774
|
access: "create"
|
|
37531
37775
|
},
|
|
37776
|
+
"llmRuntime.appleAvailability": {
|
|
37777
|
+
capName: "llm-runtime",
|
|
37778
|
+
capScope: "system",
|
|
37779
|
+
addonId: null,
|
|
37780
|
+
access: "view"
|
|
37781
|
+
},
|
|
37782
|
+
"llmRuntime.cancel": {
|
|
37783
|
+
capName: "llm-runtime",
|
|
37784
|
+
capScope: "system",
|
|
37785
|
+
addonId: null,
|
|
37786
|
+
access: "create"
|
|
37787
|
+
},
|
|
37532
37788
|
"llmRuntime.complete": {
|
|
37533
37789
|
capName: "llm-runtime",
|
|
37534
37790
|
capScope: "system",
|
|
37535
37791
|
addonId: null,
|
|
37536
37792
|
access: "create"
|
|
37537
37793
|
},
|
|
37794
|
+
"llmRuntime.completeApple": {
|
|
37795
|
+
capName: "llm-runtime",
|
|
37796
|
+
capScope: "system",
|
|
37797
|
+
addonId: null,
|
|
37798
|
+
access: "create"
|
|
37799
|
+
},
|
|
37538
37800
|
"llmRuntime.deleteModel": {
|
|
37539
37801
|
capName: "llm-runtime",
|
|
37540
37802
|
capScope: "system",
|
|
@@ -38207,6 +38469,12 @@ Object.freeze({
|
|
|
38207
38469
|
addonId: null,
|
|
38208
38470
|
access: "create"
|
|
38209
38471
|
},
|
|
38472
|
+
"nodes.directory": {
|
|
38473
|
+
capName: "nodes",
|
|
38474
|
+
capScope: "system",
|
|
38475
|
+
addonId: null,
|
|
38476
|
+
access: "view"
|
|
38477
|
+
},
|
|
38210
38478
|
"nodes.executeQuery": {
|
|
38211
38479
|
capName: "nodes",
|
|
38212
38480
|
capScope: "system",
|
|
@@ -38375,6 +38643,12 @@ Object.freeze({
|
|
|
38375
38643
|
addonId: null,
|
|
38376
38644
|
access: "view"
|
|
38377
38645
|
},
|
|
38646
|
+
"notificationRules.getRuleLastRuns": {
|
|
38647
|
+
capName: "notification-rules",
|
|
38648
|
+
capScope: "system",
|
|
38649
|
+
addonId: null,
|
|
38650
|
+
access: "view"
|
|
38651
|
+
},
|
|
38378
38652
|
"notificationRules.getTemplateCatalog": {
|
|
38379
38653
|
capName: "notification-rules",
|
|
38380
38654
|
capScope: "system",
|
|
@@ -43971,7 +44245,85 @@ var NC_AUDIO_DEFAULTS = {
|
|
|
43971
44245
|
samplingSeconds: 10
|
|
43972
44246
|
};
|
|
43973
44247
|
new Set(["devices", "classes"]);
|
|
44248
|
+
/** Every filter, for the callers that must cover all four (guards, tests). */
|
|
44249
|
+
var NC_SYSTEM_EVENT_FILTER_KEYS = [
|
|
44250
|
+
"deviceIds",
|
|
44251
|
+
"deviceTypes",
|
|
44252
|
+
"nodeIds",
|
|
44253
|
+
"packageNames"
|
|
44254
|
+
];
|
|
44255
|
+
new Map(Object.entries({
|
|
44256
|
+
"device-online": "device-events",
|
|
44257
|
+
"device-offline": "device-events",
|
|
44258
|
+
"device-disabled": "device-events",
|
|
44259
|
+
"device-enabled": "device-events",
|
|
44260
|
+
"device-battery-low": "device-events",
|
|
44261
|
+
"device-battery-normal": "device-events",
|
|
44262
|
+
"device-consumable-low": "device-events",
|
|
44263
|
+
"device-consumable-normal": "device-events",
|
|
44264
|
+
"stream-online": "device-events",
|
|
44265
|
+
"stream-offline": "device-events",
|
|
44266
|
+
"detection-blind": "device-events",
|
|
44267
|
+
"node-online": "system",
|
|
44268
|
+
"node-offline": "system",
|
|
44269
|
+
"node-inference-unavailable": "system",
|
|
44270
|
+
"addon-crash-loop": "system",
|
|
44271
|
+
"addon-update-available": "system",
|
|
44272
|
+
"addon-updated": "system",
|
|
44273
|
+
"server-update-available": "system",
|
|
44274
|
+
"server-updated": "system",
|
|
44275
|
+
"wrapper-update-available": "system",
|
|
44276
|
+
"backup-completed": "system",
|
|
44277
|
+
"export-completed": "system",
|
|
44278
|
+
"alarm-triggered": "alarm",
|
|
44279
|
+
"alarm-armed": "alarm",
|
|
44280
|
+
"alarm-disarmed": "alarm",
|
|
44281
|
+
"alarm-arming": "alarm",
|
|
44282
|
+
"alarm-arm-refused": "alarm",
|
|
44283
|
+
"alarm-pending": "alarm",
|
|
44284
|
+
"alarm-rearmed": "alarm",
|
|
44285
|
+
"alarm-sensor-bypass": "alarm",
|
|
44286
|
+
"alarm-check-failed": "alarm",
|
|
44287
|
+
"camera-online": null,
|
|
44288
|
+
"camera-offline": null,
|
|
44289
|
+
"camera-disabled": null,
|
|
44290
|
+
"camera-enabled": null
|
|
44291
|
+
}));
|
|
44292
|
+
[...NC_SYSTEM_EVENT_FILTER_KEYS];
|
|
43974
44293
|
NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
|
|
44294
|
+
/**
|
|
44295
|
+
* WHICH WAY A BOOLEAN SENSOR MOVED — read off the one slice a sensor event
|
|
44296
|
+
* persists (D640 "a sensor rule fires on the raise, the clear, or both").
|
|
44297
|
+
*
|
|
44298
|
+
* A device-event rule over a flood sensor notified on BOTH edges: water
|
|
44299
|
+
* detected, and back to dry. `NcConditions.sensorTransition` lets the rule
|
|
44300
|
+
* name one edge; this file answers, for one `SensorEvent`, which edge it is.
|
|
44301
|
+
*
|
|
44302
|
+
* NOT A SECOND TABLE. The "which boolean of this cap counts as HIGH" question
|
|
44303
|
+
* already has one answer, `SOURCE_CAP_ACTIVE_FIELD`
|
|
44304
|
+
* (`catalogs/sensor-active-state.ts`, the doorbell's and the recorder's edge
|
|
44305
|
+
* table), and a sensor event names its kind, not its cap. So the table here is
|
|
44306
|
+
* DERIVED: event kind → cap (`EVENT_KIND_BY_CAP`) → that cap's active field.
|
|
44307
|
+
* Only kinds whose taxonomy category is `sensor` take part — a switch has an
|
|
44308
|
+
* `on` boolean too, but "it triggers / it clears" is not a sentence about a
|
|
44309
|
+
* light, and offering it there would be a knob with a misleading label.
|
|
44310
|
+
* `presence` is a WORD (`home` / `not_home` / a zone), not a boolean, and is
|
|
44311
|
+
* absent from the source table, so it is absent here.
|
|
44312
|
+
*
|
|
44313
|
+
* `undefined` = never guessed: a kind with no raise (a doorbell press, a
|
|
44314
|
+
* button, a cover), or a slice whose field is missing or not a boolean. The
|
|
44315
|
+
* engine then does NOT filter — a flood alert must not go silent because one
|
|
44316
|
+
* read came back unreadable (the same stance as the alarm's `sensorEdgeOf`).
|
|
44317
|
+
*
|
|
44318
|
+
* Pure, RN-safe: the viewer imports the support rule from here.
|
|
44319
|
+
*/
|
|
44320
|
+
/** Event kind → the boolean field of its cap slice that means "raised". */
|
|
44321
|
+
var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.entries(EVENT_KIND_BY_CAP).flatMap(([capName, descriptor]) => {
|
|
44322
|
+
const field = SOURCE_CAP_ACTIVE_FIELD[capName];
|
|
44323
|
+
if (field === void 0 || descriptor.category !== "sensor") return [];
|
|
44324
|
+
return [[descriptor.kind, field]];
|
|
44325
|
+
})));
|
|
44326
|
+
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
43975
44327
|
var RULE_BODY_ONLY = ["body"];
|
|
43976
44328
|
var RULE_TEXT = ["title", "body"];
|
|
43977
44329
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -44503,7 +44855,7 @@ var AgentUIAddon = class extends BaseAddon {
|
|
|
44503
44855
|
capability: adminUiCapability,
|
|
44504
44856
|
provider: {
|
|
44505
44857
|
getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
|
|
44506
|
-
getVersion: async () => ({ version: "1.2.
|
|
44858
|
+
getVersion: async () => ({ version: "1.2.147" })
|
|
44507
44859
|
}
|
|
44508
44860
|
}];
|
|
44509
44861
|
}
|