@camstack/addon-model-studio 1.1.171 → 1.1.173

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. package/dist/{MotionZonesSettings-BQUO-o7V.mjs → MotionZonesSettings-BfCoYgxT.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-DNTptTqU.mjs → PrivacyMaskSettings-Th5IVviI.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-DlFCIgLK.mjs → SceneMonitorEditor-BERqxPAZ.mjs} +3 -3
  4. package/dist/_stub.js +10 -10
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-yYlhCyNB.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-CP30dIZR.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-ak-DR-J7.mjs +26 -0
  7. package/dist/{hostInit-CX6rSlfE.mjs → hostInit-BZQ7ikZC.mjs} +2 -2
  8. package/dist/model-studio.addon.js +369 -17
  9. package/dist/model-studio.addon.mjs +369 -17
  10. package/dist/{player-overlays-BQcXFid_.mjs → player-overlays-B4uXOi-a.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-jf0lxp6K.mjs → responsive-CEbpemt_.mjs} +1 -1
  13. package/dist/{scene-monitor-copy-CncglTT-.mjs → scene-monitor-copy-DXDF5cQH.mjs} +1 -1
  14. package/dist/{square-CKSQ7rAe.mjs → square-B_pecyJV.mjs} +1 -1
  15. package/dist/{trash-2-h_VbLaR6.mjs → trash-2-DfAU2tvI.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-C8fGYhC2.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DRHKHJI4.mjs} +1 -1
  17. package/package.json +1 -1
  18. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-wbtR-IuO.mjs +0 -26
@@ -5884,7 +5884,7 @@ var ZodIssueCode = {
5884
5884
  var ZodFirstPartyTypeKind;
5885
5885
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5886
5886
  //#endregion
5887
- //#region ../types/dist/sleep-D_4W7xuQ.mjs
5887
+ //#region ../types/dist/sleep-DU7mu4wb.mjs
5888
5888
  /**
5889
5889
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5890
5890
  * window to float samples (D455).
@@ -15157,18 +15157,30 @@ var LlmErrorCodeSchema = _enum([
15157
15157
  "budget-exceeded",
15158
15158
  "adapter-error"
15159
15159
  ]);
15160
- var LlmGenerateResultSchema = discriminatedUnion("ok", [object({
15160
+ var LlmGenerateOkSchema = object({
15161
15161
  ok: literal(true),
15162
15162
  text: string(),
15163
15163
  model: string(),
15164
15164
  usage: LlmUsageSchema,
15165
15165
  truncated: boolean(),
15166
15166
  latencyMs: number()
15167
- }), object({
15167
+ });
15168
+ /**
15169
+ * WHO refused, on a `refusal`. `guardrail` = a safety filter in front of the
15170
+ * model rejected the request before it answered (Apple Foundation Models
15171
+ * refuses surveillance-framed prompts in 0.1 s); `model` = the model itself
15172
+ * declined. They are different faults: a guardrail refusal is a property of
15173
+ * the BACKEND, so the provider falls back to the next profile; a model refusal
15174
+ * is an answer. Absent on every other code, and on a refusal a wire cannot
15175
+ * attribute.
15176
+ */
15177
+ var LlmRefusalSourceSchema = _enum(["guardrail", "model"]);
15178
+ var LlmGenerateResultSchema = discriminatedUnion("ok", [LlmGenerateOkSchema, object({
15168
15179
  ok: literal(false),
15169
15180
  code: LlmErrorCodeSchema,
15170
15181
  message: string(),
15171
- retryAfterMs: number().optional()
15182
+ retryAfterMs: number().optional(),
15183
+ refusalSource: LlmRefusalSourceSchema.optional()
15172
15184
  })]);
15173
15185
  /**
15174
15186
  * `Uint8Array` is the sanctioned binary convention — superjson + the UDS
@@ -15398,12 +15410,78 @@ var LlmRuntimeDiskUsageSchema = object({
15398
15410
  modelsBytes: number(),
15399
15411
  freeBytes: number().optional()
15400
15412
  });
15401
- method(LlmGenerateBaseInputSchema.extend({
15413
+ var LlmRuntimeCompleteInputSchema = LlmGenerateBaseInputSchema.extend({
15402
15414
  images: array(LlmImageSchema).optional(),
15403
15415
  runtime: ManagedRuntimeConfigSchema,
15404
15416
  /** The managed profile's timeout, threaded by the hub provider. */
15405
15417
  timeoutMs: number().int().positive().optional()
15406
- }), LlmGenerateResultSchema, {
15418
+ });
15419
+ /**
15420
+ * Why Apple Foundation Models cannot run on a node that has it in principle.
15421
+ * The first three are Apple's own `UnavailableReason`s, verbatim; the rest are
15422
+ * ours: the OS predates the framework (macOS < 26), the helper binary is not
15423
+ * in the installed addon, or it crashed past the respawn bound.
15424
+ */
15425
+ var AppleFmUnavailableReasonSchema = _enum([
15426
+ "deviceNotEligible",
15427
+ "appleIntelligenceNotEnabled",
15428
+ "modelNotReady",
15429
+ "osTooOld",
15430
+ "helperMissing",
15431
+ "helperCrashed"
15432
+ ]);
15433
+ /**
15434
+ * Apple Foundation Models on ONE node — four states, never a boolean (D315).
15435
+ *
15436
+ * - `available` — the helper probed it; what it CAN do is reported
15437
+ * here (`imageInput`, `contextSize`, languages),
15438
+ * never typed by an operator.
15439
+ * - `unavailable` — a known absence, with the reason to act on.
15440
+ * - `unsupported-platform` — not a Mac; there is nothing to enable.
15441
+ * - `unknown` — the probe did not answer (not yet run, timed
15442
+ * out, helper crashed mid-probe). A failed
15443
+ * measurement is NEVER `unavailable` (D393).
15444
+ */
15445
+ var AppleFmAvailabilitySchema = discriminatedUnion("state", [
15446
+ object({
15447
+ state: literal("available"),
15448
+ osVersion: string(),
15449
+ /** Tokens, as the framework reports it. Read at runtime, never assumed. */
15450
+ contextSize: number().int().positive(),
15451
+ /** BCP-47-ish tags (`it-IT`) of the languages the model supports. */
15452
+ languages: array(string()),
15453
+ /** Whether prompts may carry images. `false` on a macOS 26 build. */
15454
+ imageInput: boolean()
15455
+ }),
15456
+ object({
15457
+ state: literal("unavailable"),
15458
+ reason: AppleFmUnavailableReasonSchema,
15459
+ osVersion: string().nullable(),
15460
+ detail: string()
15461
+ }),
15462
+ object({
15463
+ state: literal("unsupported-platform"),
15464
+ platform: string()
15465
+ }),
15466
+ object({
15467
+ state: literal("unknown"),
15468
+ error: string()
15469
+ })
15470
+ ]);
15471
+ /**
15472
+ * A generation on the node's Apple Foundation Models helper. A separate verb
15473
+ * from `complete`, whose `runtime` is a llama.cpp config: overloading it would
15474
+ * drag a GGUF model reference into a backend that has none. `images` is part
15475
+ * of the contract so vision needs no cap change later; a node whose model has
15476
+ * no image input REFUSES them (`unavailable`), never drops them.
15477
+ */
15478
+ var LlmRuntimeAppleCompleteInputSchema = LlmGenerateBaseInputSchema.extend({
15479
+ images: array(LlmImageSchema).optional(),
15480
+ /** The profile's timeout, threaded by the hub provider. */
15481
+ timeoutMs: number().int().positive().optional()
15482
+ });
15483
+ var LlmRuntimeCancelInputSchema = object({ requestId: string() });
15484
+ method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
15407
15485
  kind: "mutation",
15408
15486
  auth: "admin",
15409
15487
  timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
@@ -15421,7 +15499,14 @@ method(LlmGenerateBaseInputSchema.extend({
15421
15499
  }), method(object({ file: string() }), _void(), {
15422
15500
  kind: "mutation",
15423
15501
  auth: "admin"
15424
- }), method(object({}), array(LlmNodeModelSchema), { auth: "admin" }), method(object({}), LlmRuntimeDiskUsageSchema, { auth: "admin" });
15502
+ }), method(object({}), array(LlmNodeModelSchema), { auth: "admin" }), method(object({}), LlmRuntimeDiskUsageSchema, { auth: "admin" }), method(LlmRuntimeCancelInputSchema, _void(), {
15503
+ kind: "mutation",
15504
+ auth: "admin"
15505
+ }), method(object({}), AppleFmAvailabilitySchema, { auth: "admin" }), method(LlmRuntimeAppleCompleteInputSchema, LlmGenerateResultSchema, {
15506
+ kind: "mutation",
15507
+ auth: "admin",
15508
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
15509
+ });
15425
15510
  /**
15426
15511
  * `llm` — consumer-facing LLM surface (spec §1-§3). Collection-mode: array
15427
15512
  * methods concat-fan across providers; single-row methods route to ONE
@@ -15438,7 +15523,8 @@ var LlmProfileKindSchema = _enum([
15438
15523
  "openai",
15439
15524
  "anthropic",
15440
15525
  "google",
15441
- "managed-local"
15526
+ "managed-local",
15527
+ "apple-foundation"
15442
15528
  ]);
15443
15529
  var LlmProfileSchema = object({
15444
15530
  id: string(),
@@ -15496,7 +15582,14 @@ var LlmProfileSchema = object({
15496
15582
  toolsEnabled: boolean().default(false),
15497
15583
  extraHeaders: record(string(), string()).optional(),
15498
15584
  /** kind === 'managed-local' only (spec §4). */
15499
- runtime: ManagedRuntimeConfigSchema.optional()
15585
+ runtime: ManagedRuntimeConfigSchema.optional(),
15586
+ /**
15587
+ * kind === 'apple-foundation' only: WHERE it runs — the only thing there is
15588
+ * to configure (no key, no URL, no download; `model` is `apple-system`).
15589
+ * `supportsVision` on such a row is stamped by the provider from the node's
15590
+ * reported `imageInput`, never taken from the operator (D62).
15591
+ */
15592
+ appleFoundation: object({ nodeId: string() }).optional()
15500
15593
  });
15501
15594
  /** ConfigUISchema tree passed through untyped on the wire (the
15502
15595
  * notification-output `ConfigSchemaPassthrough` precedent at
@@ -15578,7 +15671,9 @@ var LlmRuntimeNodeSchema = object({
15578
15671
  reachable: boolean(),
15579
15672
  status: LlmRuntimeStatusSchema.optional(),
15580
15673
  disk: LlmRuntimeDiskUsageSchema.optional(),
15581
- error: string().optional()
15674
+ error: string().optional(),
15675
+ /** Absent = the node did not answer the question (render as unknown). */
15676
+ apple: AppleFmAvailabilitySchema.optional()
15582
15677
  });
15583
15678
  var GenerateVisionInputSchema = LlmGenerateBaseInputSchema.extend({ images: array(LlmImageSchema).min(1) });
15584
15679
  var ProfileRefInputSchema = object({
@@ -17742,6 +17837,16 @@ var NcCrossingSchema = _enum([
17742
17837
  "exit",
17743
17838
  "any"
17744
17839
  ]);
17840
+ /**
17841
+ * Which edge of a BOOLEAN sensor fires a device-event rule (D640).
17842
+ * - `raised` — the sensor went high: water detected, smoke, open, tampered.
17843
+ * - `cleared` — it went back: dry, clear, closed.
17844
+ * - absent — both edges, which is what every rule authored before this did.
17845
+ *
17846
+ * There is no third member for "both": absence already says it, and a value
17847
+ * that means the same as absence is a second way to write one rule.
17848
+ */
17849
+ var NcSensorTransitionSchema = _enum(["raised", "cleared"]);
17745
17850
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
17746
17851
  var NcZoneConditionSchema = object({
17747
17852
  ids: array(string().min(1)).min(1),
@@ -17931,6 +18036,20 @@ var NcConditionsSchema = object({
17931
18036
  scene: NcSceneConditionSchema.optional(),
17932
18037
  /** Device scope — absent = all devices. */
17933
18038
  devices: array(number()).optional(),
18039
+ /**
18040
+ * Device EXCLUSION (D641) — "every device except these". Judged on the SAME
18041
+ * subject ids {@link devices} is judged on (the camera, the sensor that
18042
+ * fired, a linked set's sensor and row cameras), so a sensor fanned out per
18043
+ * linked camera is excluded exactly where an include would have tested it.
18044
+ * `min(1)`: an empty exclusion excludes nothing and is written as absent.
18045
+ *
18046
+ * Not for `system-event` rules — those carry their own
18047
+ * `systemEvent.excludeDeviceIds` (D636), and the hub refuses this key there.
18048
+ * Editors present the two lists as ONE field (All | Only these | All except
18049
+ * these); the engine evaluates each independently, so a legacy rule
18050
+ * carrying both still means "these, minus those".
18051
+ */
18052
+ devicesExclude: array(number()).min(1).optional(),
17934
18053
  /** Detector class names (any overlap with the record's class set). */
17935
18054
  classes: array(string().min(1)).optional(),
17936
18055
  /** Veto classes — any overlap fails the rule. */
@@ -18064,6 +18183,16 @@ var NcConditionsSchema = object({
18064
18183
  */
18065
18184
  sensorKinds: array(string().min(1)).optional(),
18066
18185
  /**
18186
+ * DEVICE-EVENT only (D640). Fire on one edge of a boolean sensor —
18187
+ * {@link NcSensorTransitionSchema}. Which field of the slice means "raised"
18188
+ * is `@camstack/types` → `notification/sensor-raised.ts`. A reading the
18189
+ * engine cannot place (a kind with no raise, an unreadable slice) PASSES:
18190
+ * the condition fails open towards notifying, never towards silence. Editors
18191
+ * offer it only when every chosen {@link sensorKinds} member has a raise
18192
+ * (`sensorTransitionOffered`), and the hub refuses it on any other delivery.
18193
+ */
18194
+ sensorTransition: NcSensorTransitionSchema.optional(),
18195
+ /**
18067
18196
  * PACKAGE-EVENT only. Which package phase fires the rule — `delivered`
18068
18197
  * (a parked parcel appeared), `picked-up` (it departed), or `both`. Fails
18069
18198
  * when the subject's phase does not match (a subject always carries a phase
@@ -18563,9 +18692,29 @@ var NcTestResultSchema = object({
18563
18692
  className: string().optional(),
18564
18693
  label: string().optional()
18565
18694
  });
18566
- /** The five rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts`
18567
- * is the same union; the template-vars spec pins the two together. */
18695
+ /** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is the
18696
+ * same union; the template-vars spec pins the two together. `mixed` is DERIVED
18697
+ * (a stored system rule whose kinds span families, D637) and never authored. */
18568
18698
  var NcRuleKindSchema = _enum([
18699
+ "detection",
18700
+ "sensor",
18701
+ "occupancy",
18702
+ "sound",
18703
+ "device-events",
18704
+ "system",
18705
+ "alarm",
18706
+ "mixed"
18707
+ ]);
18708
+ /**
18709
+ * The kinds a SERVED template-variable descriptor may name: the five that
18710
+ * existed before D637, frozen. `getTemplateCatalog` ships `kinds` to every
18711
+ * installed viewer, and a viewer at `@camstack/types` 1.2.25x parses them with a
18712
+ * strict five-member enum — one `device-events` in one descriptor fails the
18713
+ * whole catalog parse. So the WIRE says `system`, and the MATCH widens it:
18714
+ * `templateVarKindApplies` reads a `system` descriptor as applying to every
18715
+ * system rule kind (`device-events`, `system`, `alarm`, `mixed`).
18716
+ */
18717
+ var NcTemplateVarKindSchema = _enum([
18569
18718
  "detection",
18570
18719
  "sensor",
18571
18720
  "occupancy",
@@ -18603,7 +18752,7 @@ var NcTemplateVarGroupSchema = _enum([
18603
18752
  *
18604
18753
  * `families` / `fields` / `kinds` / `deliveries` / `systemEventKinds` say WHERE
18605
18754
  * it has a value; absent = no restriction on that axis. `systemEventKinds` is
18606
- * read only for a `system` rule. `dynamic` declares a FAMILY of names
18755
+ * read only for a system-event rule (any family, or `mixed`). `dynamic` declares a FAMILY of names
18607
18756
  * (`count_<class>`): the descriptor's `name` is the example member.
18608
18757
  */
18609
18758
  var NcTemplateVarDescriptorSchema = object({
@@ -18614,7 +18763,7 @@ var NcTemplateVarDescriptorSchema = object({
18614
18763
  group: NcTemplateVarGroupSchema,
18615
18764
  families: array(NcTemplateFamilySchema).min(1),
18616
18765
  fields: array(NcTemplateFieldSchema).optional(),
18617
- kinds: array(NcRuleKindSchema).optional(),
18766
+ kinds: array(NcTemplateVarKindSchema).optional(),
18618
18767
  deliveries: array(NcDeliverySchema).optional(),
18619
18768
  systemEventKinds: array(NcSystemEventKindSchema).optional(),
18620
18769
  dynamic: object({
@@ -18662,6 +18811,7 @@ var NcConditionDescriptorSchema = object({
18662
18811
  /** Editor widget the UI renders — never hardcode per-condition forms. */
18663
18812
  valueType: _enum([
18664
18813
  "deviceIdList",
18814
+ "deviceIdExcludeList",
18665
18815
  "stringList",
18666
18816
  "number01",
18667
18817
  "number",
@@ -18672,6 +18822,7 @@ var NcConditionDescriptorSchema = object({
18672
18822
  "plateMatcher",
18673
18823
  "packagePhase",
18674
18824
  "crossingSelect",
18825
+ "sensorTransition",
18675
18826
  "polygonDraw",
18676
18827
  "occupancy",
18677
18828
  "audio",
@@ -18822,6 +18973,28 @@ var NcHistoryFilterSchema = object({
18822
18973
  limit: number().int().min(1).max(500).default(100)
18823
18974
  });
18824
18975
  /**
18976
+ * Every rule's last run, in one answer.
18977
+ *
18978
+ * A rule ABSENT from `runs` produced no delivery inside `horizonMs` — how far
18979
+ * back this answer looked, in ms before the hub's now. It is the outbox prune
18980
+ * window (7 days by default, operator-configurable), NARROWED when the read hit
18981
+ * its row bound: the answer never claims a window it did not read. `null` means
18982
+ * the operator keeps the outbox forever AND the read reached its end, so absent
18983
+ * means "never on record". A UI derives its "not in the last N days" from this
18984
+ * value, never from a constant — and only when the call ANSWERED (D315).
18985
+ */
18986
+ var NcRuleLastRunsSchema = object({
18987
+ runs: array(object({
18988
+ ruleId: string(),
18989
+ /** Fire time of the newest row (`createdAt`, epoch ms). */
18990
+ lastAt: number(),
18991
+ status: NcHistoryStatusSchema,
18992
+ /** The camera/device of that row (a digest row files under its first camera). */
18993
+ deviceId: number()
18994
+ })),
18995
+ horizonMs: number().nonnegative().nullable()
18996
+ });
18997
+ /**
18825
18998
  * What a snooze covers. Broader scopes win when several overlap, so one window
18826
18999
  * leaves ONE digest rather than a rule snooze and a whole-feed snooze both
18827
19000
  * summarising the same silence.
@@ -19002,6 +19175,14 @@ var NcAlarmModeCoverageSchema = object({
19002
19175
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
19003
19176
  deviceIds: array(number().int()),
19004
19177
  /**
19178
+ * D641: the ids NOT covered although `allDevices` is true — every unscoped
19179
+ * covering rule EXCLUDES them (`conditions.devicesExclude`) and no named rule
19180
+ * covers them. Always `[]` when `allDevices` is false. Excluded by the rules,
19181
+ * which is not the same as skipped by a switch: never in `skippedDevices`.
19182
+ * Defaulted so an answer computed before this field parses as "none".
19183
+ */
19184
+ allDevicesExcept: array(number().int()).default([]),
19185
+ /**
19005
19186
  * Devices this mode NAMES but cannot actually arm, each with the switch that
19006
19187
  * excludes it.
19007
19188
  *
@@ -19137,7 +19318,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
19137
19318
  })), method(object({}), object({ vars: array(NcTemplateVarDescriptorSchema) })), method(NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, {
19138
19319
  kind: "mutation",
19139
19320
  access: "view"
19140
- }), 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 }), {
19321
+ }), 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 }), {
19141
19322
  kind: "mutation",
19142
19323
  caller: "required"
19143
19324
  }), method(object({ snoozeId: string() }), object({ success: literal(true) }), {
@@ -23583,7 +23764,11 @@ function buildDescriptor(capName, kind) {
23583
23764
  icon: legacyIcon(t.iconId)
23584
23765
  };
23585
23766
  }
23586
- Object.freeze(Object.fromEntries(Object.entries(CAP_TO_KIND).map(([capName, kind]) => [capName, buildDescriptor(capName, kind)])));
23767
+ /**
23768
+ * Sensor / control cap name → static event-kind descriptor. A linked device
23769
+ * contributes one entry per bound cap present in this map.
23770
+ */
23771
+ var EVENT_KIND_BY_CAP = Object.freeze(Object.fromEntries(Object.entries(CAP_TO_KIND).map(([capName, kind]) => [capName, buildDescriptor(capName, kind)])));
23587
23772
  /**
23588
23773
  * server-management — per-NODE singleton capability for a node's ROOT
23589
23774
  * package lifecycle (runtime-updatable node packages).
@@ -29726,7 +29911,30 @@ var RenameNodeResultSchema = object({
29726
29911
  nodeId: string(),
29727
29912
  name: string()
29728
29913
  });
29729
- method(_void(), array(TopologyNodeSchema).readonly(), { auth: "admin" }), method(NodeAddonInputSchema, SuccessSchema, {
29914
+ /**
29915
+ * The cheap node list. A consumer's rule for a STORED node id (a rule's
29916
+ * `nodeIds`) that is missing from `nodes`, whatever `complete` says: render it
29917
+ * as a removable chip labelled unknown, never drop it (D49). Even a complete
29918
+ * list omits a node that joined and left between two history captures, so a
29919
+ * missing id means "not known to the hub", never "removed". Only the operator
29920
+ * removes it.
29921
+ *
29922
+ * `complete` changes only the WORDING: `false` = no history read has ever
29923
+ * answered, so the list may be missing offline nodes the hub does know (D315).
29924
+ *
29925
+ * `name` is the history row's name (≤ 30 s behind a rename), or the id when
29926
+ * the history has none.
29927
+ */
29928
+ var NodeDirectorySchema = object({
29929
+ nodes: array(object({
29930
+ id: string(),
29931
+ name: string(),
29932
+ isHub: boolean(),
29933
+ isOnline: boolean()
29934
+ })).readonly(),
29935
+ complete: boolean()
29936
+ });
29937
+ method(_void(), array(TopologyNodeSchema).readonly(), { auth: "admin" }), method(_void(), NodeDirectorySchema, { auth: "admin" }), method(NodeAddonInputSchema, SuccessSchema, {
29730
29938
  kind: "mutation",
29731
29939
  auth: "admin"
29732
29940
  }), method(NodeAddonInputSchema, SuccessSchema, {
@@ -34120,6 +34328,42 @@ DeviceType.Camera, method(object({
34120
34328
  package: array(ZoneRuleSchema).readonly()
34121
34329
  });
34122
34330
  /**
34331
+ * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
34332
+ * valutatore puro del suo FRONTE.
34333
+ *
34334
+ * Viveva dentro il builtin virtual-doorbell
34335
+ * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
34336
+ * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
34337
+ * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
34338
+ * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
34339
+ * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
34340
+ * SPOSTA qui e il doorbell la ri-esporta.
34341
+ *
34342
+ * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
34343
+ * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
34344
+ * regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
34345
+ * booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
34346
+ */
34347
+ /**
34348
+ * Known binary / switch source caps → the boolean slice field whose
34349
+ * false→true rise counts as ACTIVE. Every entry is "fire on active".
34350
+ * Sensors whose "active" reading is not a plain boolean (presence's string
34351
+ * state, connectivity's connected flag) are deliberately excluded — a
34352
+ * reconnect is not a doorbell press, and it is not a recording either.
34353
+ */
34354
+ var SOURCE_CAP_ACTIVE_FIELD = {
34355
+ contact: "entryOpen",
34356
+ binary: "on",
34357
+ switch: "on",
34358
+ motion: "detected",
34359
+ flood: "flooded",
34360
+ gas: "detected",
34361
+ smoke: "detected",
34362
+ "carbon-monoxide": "detected",
34363
+ vibration: "detected",
34364
+ tamper: "tampered"
34365
+ };
34366
+ /**
34123
34367
  * Accessory device helpers — shared across drivers.
34124
34368
  *
34125
34369
  * Many vendor-specific drivers register accessory child devices on
@@ -38155,12 +38399,30 @@ Object.freeze({
38155
38399
  addonId: null,
38156
38400
  access: "create"
38157
38401
  },
38402
+ "llmRuntime.appleAvailability": {
38403
+ capName: "llm-runtime",
38404
+ capScope: "system",
38405
+ addonId: null,
38406
+ access: "view"
38407
+ },
38408
+ "llmRuntime.cancel": {
38409
+ capName: "llm-runtime",
38410
+ capScope: "system",
38411
+ addonId: null,
38412
+ access: "create"
38413
+ },
38158
38414
  "llmRuntime.complete": {
38159
38415
  capName: "llm-runtime",
38160
38416
  capScope: "system",
38161
38417
  addonId: null,
38162
38418
  access: "create"
38163
38419
  },
38420
+ "llmRuntime.completeApple": {
38421
+ capName: "llm-runtime",
38422
+ capScope: "system",
38423
+ addonId: null,
38424
+ access: "create"
38425
+ },
38164
38426
  "llmRuntime.deleteModel": {
38165
38427
  capName: "llm-runtime",
38166
38428
  capScope: "system",
@@ -38833,6 +39095,12 @@ Object.freeze({
38833
39095
  addonId: null,
38834
39096
  access: "create"
38835
39097
  },
39098
+ "nodes.directory": {
39099
+ capName: "nodes",
39100
+ capScope: "system",
39101
+ addonId: null,
39102
+ access: "view"
39103
+ },
38836
39104
  "nodes.executeQuery": {
38837
39105
  capName: "nodes",
38838
39106
  capScope: "system",
@@ -39001,6 +39269,12 @@ Object.freeze({
39001
39269
  addonId: null,
39002
39270
  access: "view"
39003
39271
  },
39272
+ "notificationRules.getRuleLastRuns": {
39273
+ capName: "notification-rules",
39274
+ capScope: "system",
39275
+ addonId: null,
39276
+ access: "view"
39277
+ },
39004
39278
  "notificationRules.getTemplateCatalog": {
39005
39279
  capName: "notification-rules",
39006
39280
  capScope: "system",
@@ -44597,7 +44871,85 @@ var NC_AUDIO_DEFAULTS = {
44597
44871
  samplingSeconds: 10
44598
44872
  };
44599
44873
  new Set(["devices", "classes"]);
44874
+ /** Every filter, for the callers that must cover all four (guards, tests). */
44875
+ var NC_SYSTEM_EVENT_FILTER_KEYS = [
44876
+ "deviceIds",
44877
+ "deviceTypes",
44878
+ "nodeIds",
44879
+ "packageNames"
44880
+ ];
44881
+ new Map(Object.entries({
44882
+ "device-online": "device-events",
44883
+ "device-offline": "device-events",
44884
+ "device-disabled": "device-events",
44885
+ "device-enabled": "device-events",
44886
+ "device-battery-low": "device-events",
44887
+ "device-battery-normal": "device-events",
44888
+ "device-consumable-low": "device-events",
44889
+ "device-consumable-normal": "device-events",
44890
+ "stream-online": "device-events",
44891
+ "stream-offline": "device-events",
44892
+ "detection-blind": "device-events",
44893
+ "node-online": "system",
44894
+ "node-offline": "system",
44895
+ "node-inference-unavailable": "system",
44896
+ "addon-crash-loop": "system",
44897
+ "addon-update-available": "system",
44898
+ "addon-updated": "system",
44899
+ "server-update-available": "system",
44900
+ "server-updated": "system",
44901
+ "wrapper-update-available": "system",
44902
+ "backup-completed": "system",
44903
+ "export-completed": "system",
44904
+ "alarm-triggered": "alarm",
44905
+ "alarm-armed": "alarm",
44906
+ "alarm-disarmed": "alarm",
44907
+ "alarm-arming": "alarm",
44908
+ "alarm-arm-refused": "alarm",
44909
+ "alarm-pending": "alarm",
44910
+ "alarm-rearmed": "alarm",
44911
+ "alarm-sensor-bypass": "alarm",
44912
+ "alarm-check-failed": "alarm",
44913
+ "camera-online": null,
44914
+ "camera-offline": null,
44915
+ "camera-disabled": null,
44916
+ "camera-enabled": null
44917
+ }));
44918
+ [...NC_SYSTEM_EVENT_FILTER_KEYS];
44600
44919
  NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
44920
+ /**
44921
+ * WHICH WAY A BOOLEAN SENSOR MOVED — read off the one slice a sensor event
44922
+ * persists (D640 "a sensor rule fires on the raise, the clear, or both").
44923
+ *
44924
+ * A device-event rule over a flood sensor notified on BOTH edges: water
44925
+ * detected, and back to dry. `NcConditions.sensorTransition` lets the rule
44926
+ * name one edge; this file answers, for one `SensorEvent`, which edge it is.
44927
+ *
44928
+ * NOT A SECOND TABLE. The "which boolean of this cap counts as HIGH" question
44929
+ * already has one answer, `SOURCE_CAP_ACTIVE_FIELD`
44930
+ * (`catalogs/sensor-active-state.ts`, the doorbell's and the recorder's edge
44931
+ * table), and a sensor event names its kind, not its cap. So the table here is
44932
+ * DERIVED: event kind → cap (`EVENT_KIND_BY_CAP`) → that cap's active field.
44933
+ * Only kinds whose taxonomy category is `sensor` take part — a switch has an
44934
+ * `on` boolean too, but "it triggers / it clears" is not a sentence about a
44935
+ * light, and offering it there would be a knob with a misleading label.
44936
+ * `presence` is a WORD (`home` / `not_home` / a zone), not a boolean, and is
44937
+ * absent from the source table, so it is absent here.
44938
+ *
44939
+ * `undefined` = never guessed: a kind with no raise (a doorbell press, a
44940
+ * button, a cover), or a slice whose field is missing or not a boolean. The
44941
+ * engine then does NOT filter — a flood alert must not go silent because one
44942
+ * read came back unreadable (the same stance as the alarm's `sensorEdgeOf`).
44943
+ *
44944
+ * Pure, RN-safe: the viewer imports the support rule from here.
44945
+ */
44946
+ /** Event kind → the boolean field of its cap slice that means "raised". */
44947
+ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.entries(EVENT_KIND_BY_CAP).flatMap(([capName, descriptor]) => {
44948
+ const field = SOURCE_CAP_ACTIVE_FIELD[capName];
44949
+ if (field === void 0 || descriptor.category !== "sensor") return [];
44950
+ return [[descriptor.kind, field]];
44951
+ })));
44952
+ Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
44601
44953
  var RULE_BODY_ONLY = ["body"];
44602
44954
  var RULE_TEXT = ["title", "body"];
44603
44955
  var BATTERY = ["device-battery-low", "device-battery-normal"];