@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
@@ -5863,7 +5863,7 @@ var ZodIssueCode = {
5863
5863
  var ZodFirstPartyTypeKind;
5864
5864
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5865
5865
  //#endregion
5866
- //#region ../types/dist/sleep-D_4W7xuQ.mjs
5866
+ //#region ../types/dist/sleep-DU7mu4wb.mjs
5867
5867
  /**
5868
5868
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5869
5869
  * window to float samples (D455).
@@ -15136,18 +15136,30 @@ var LlmErrorCodeSchema = _enum([
15136
15136
  "budget-exceeded",
15137
15137
  "adapter-error"
15138
15138
  ]);
15139
- var LlmGenerateResultSchema = discriminatedUnion("ok", [object({
15139
+ var LlmGenerateOkSchema = object({
15140
15140
  ok: literal(true),
15141
15141
  text: string(),
15142
15142
  model: string(),
15143
15143
  usage: LlmUsageSchema,
15144
15144
  truncated: boolean(),
15145
15145
  latencyMs: number()
15146
- }), object({
15146
+ });
15147
+ /**
15148
+ * WHO refused, on a `refusal`. `guardrail` = a safety filter in front of the
15149
+ * model rejected the request before it answered (Apple Foundation Models
15150
+ * refuses surveillance-framed prompts in 0.1 s); `model` = the model itself
15151
+ * declined. They are different faults: a guardrail refusal is a property of
15152
+ * the BACKEND, so the provider falls back to the next profile; a model refusal
15153
+ * is an answer. Absent on every other code, and on a refusal a wire cannot
15154
+ * attribute.
15155
+ */
15156
+ var LlmRefusalSourceSchema = _enum(["guardrail", "model"]);
15157
+ var LlmGenerateResultSchema = discriminatedUnion("ok", [LlmGenerateOkSchema, object({
15147
15158
  ok: literal(false),
15148
15159
  code: LlmErrorCodeSchema,
15149
15160
  message: string(),
15150
- retryAfterMs: number().optional()
15161
+ retryAfterMs: number().optional(),
15162
+ refusalSource: LlmRefusalSourceSchema.optional()
15151
15163
  })]);
15152
15164
  /**
15153
15165
  * `Uint8Array` is the sanctioned binary convention — superjson + the UDS
@@ -15377,12 +15389,78 @@ var LlmRuntimeDiskUsageSchema = object({
15377
15389
  modelsBytes: number(),
15378
15390
  freeBytes: number().optional()
15379
15391
  });
15380
- method(LlmGenerateBaseInputSchema.extend({
15392
+ var LlmRuntimeCompleteInputSchema = LlmGenerateBaseInputSchema.extend({
15381
15393
  images: array(LlmImageSchema).optional(),
15382
15394
  runtime: ManagedRuntimeConfigSchema,
15383
15395
  /** The managed profile's timeout, threaded by the hub provider. */
15384
15396
  timeoutMs: number().int().positive().optional()
15385
- }), LlmGenerateResultSchema, {
15397
+ });
15398
+ /**
15399
+ * Why Apple Foundation Models cannot run on a node that has it in principle.
15400
+ * The first three are Apple's own `UnavailableReason`s, verbatim; the rest are
15401
+ * ours: the OS predates the framework (macOS < 26), the helper binary is not
15402
+ * in the installed addon, or it crashed past the respawn bound.
15403
+ */
15404
+ var AppleFmUnavailableReasonSchema = _enum([
15405
+ "deviceNotEligible",
15406
+ "appleIntelligenceNotEnabled",
15407
+ "modelNotReady",
15408
+ "osTooOld",
15409
+ "helperMissing",
15410
+ "helperCrashed"
15411
+ ]);
15412
+ /**
15413
+ * Apple Foundation Models on ONE node — four states, never a boolean (D315).
15414
+ *
15415
+ * - `available` — the helper probed it; what it CAN do is reported
15416
+ * here (`imageInput`, `contextSize`, languages),
15417
+ * never typed by an operator.
15418
+ * - `unavailable` — a known absence, with the reason to act on.
15419
+ * - `unsupported-platform` — not a Mac; there is nothing to enable.
15420
+ * - `unknown` — the probe did not answer (not yet run, timed
15421
+ * out, helper crashed mid-probe). A failed
15422
+ * measurement is NEVER `unavailable` (D393).
15423
+ */
15424
+ var AppleFmAvailabilitySchema = discriminatedUnion("state", [
15425
+ object({
15426
+ state: literal("available"),
15427
+ osVersion: string(),
15428
+ /** Tokens, as the framework reports it. Read at runtime, never assumed. */
15429
+ contextSize: number().int().positive(),
15430
+ /** BCP-47-ish tags (`it-IT`) of the languages the model supports. */
15431
+ languages: array(string()),
15432
+ /** Whether prompts may carry images. `false` on a macOS 26 build. */
15433
+ imageInput: boolean()
15434
+ }),
15435
+ object({
15436
+ state: literal("unavailable"),
15437
+ reason: AppleFmUnavailableReasonSchema,
15438
+ osVersion: string().nullable(),
15439
+ detail: string()
15440
+ }),
15441
+ object({
15442
+ state: literal("unsupported-platform"),
15443
+ platform: string()
15444
+ }),
15445
+ object({
15446
+ state: literal("unknown"),
15447
+ error: string()
15448
+ })
15449
+ ]);
15450
+ /**
15451
+ * A generation on the node's Apple Foundation Models helper. A separate verb
15452
+ * from `complete`, whose `runtime` is a llama.cpp config: overloading it would
15453
+ * drag a GGUF model reference into a backend that has none. `images` is part
15454
+ * of the contract so vision needs no cap change later; a node whose model has
15455
+ * no image input REFUSES them (`unavailable`), never drops them.
15456
+ */
15457
+ var LlmRuntimeAppleCompleteInputSchema = LlmGenerateBaseInputSchema.extend({
15458
+ images: array(LlmImageSchema).optional(),
15459
+ /** The profile's timeout, threaded by the hub provider. */
15460
+ timeoutMs: number().int().positive().optional()
15461
+ });
15462
+ var LlmRuntimeCancelInputSchema = object({ requestId: string() });
15463
+ method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
15386
15464
  kind: "mutation",
15387
15465
  auth: "admin",
15388
15466
  timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
@@ -15400,7 +15478,14 @@ method(LlmGenerateBaseInputSchema.extend({
15400
15478
  }), method(object({ file: string() }), _void(), {
15401
15479
  kind: "mutation",
15402
15480
  auth: "admin"
15403
- }), method(object({}), array(LlmNodeModelSchema), { auth: "admin" }), method(object({}), LlmRuntimeDiskUsageSchema, { auth: "admin" });
15481
+ }), method(object({}), array(LlmNodeModelSchema), { auth: "admin" }), method(object({}), LlmRuntimeDiskUsageSchema, { auth: "admin" }), method(LlmRuntimeCancelInputSchema, _void(), {
15482
+ kind: "mutation",
15483
+ auth: "admin"
15484
+ }), method(object({}), AppleFmAvailabilitySchema, { auth: "admin" }), method(LlmRuntimeAppleCompleteInputSchema, LlmGenerateResultSchema, {
15485
+ kind: "mutation",
15486
+ auth: "admin",
15487
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
15488
+ });
15404
15489
  /**
15405
15490
  * `llm` — consumer-facing LLM surface (spec §1-§3). Collection-mode: array
15406
15491
  * methods concat-fan across providers; single-row methods route to ONE
@@ -15417,7 +15502,8 @@ var LlmProfileKindSchema = _enum([
15417
15502
  "openai",
15418
15503
  "anthropic",
15419
15504
  "google",
15420
- "managed-local"
15505
+ "managed-local",
15506
+ "apple-foundation"
15421
15507
  ]);
15422
15508
  var LlmProfileSchema = object({
15423
15509
  id: string(),
@@ -15475,7 +15561,14 @@ var LlmProfileSchema = object({
15475
15561
  toolsEnabled: boolean().default(false),
15476
15562
  extraHeaders: record(string(), string()).optional(),
15477
15563
  /** kind === 'managed-local' only (spec §4). */
15478
- runtime: ManagedRuntimeConfigSchema.optional()
15564
+ runtime: ManagedRuntimeConfigSchema.optional(),
15565
+ /**
15566
+ * kind === 'apple-foundation' only: WHERE it runs — the only thing there is
15567
+ * to configure (no key, no URL, no download; `model` is `apple-system`).
15568
+ * `supportsVision` on such a row is stamped by the provider from the node's
15569
+ * reported `imageInput`, never taken from the operator (D62).
15570
+ */
15571
+ appleFoundation: object({ nodeId: string() }).optional()
15479
15572
  });
15480
15573
  /** ConfigUISchema tree passed through untyped on the wire (the
15481
15574
  * notification-output `ConfigSchemaPassthrough` precedent at
@@ -15557,7 +15650,9 @@ var LlmRuntimeNodeSchema = object({
15557
15650
  reachable: boolean(),
15558
15651
  status: LlmRuntimeStatusSchema.optional(),
15559
15652
  disk: LlmRuntimeDiskUsageSchema.optional(),
15560
- error: string().optional()
15653
+ error: string().optional(),
15654
+ /** Absent = the node did not answer the question (render as unknown). */
15655
+ apple: AppleFmAvailabilitySchema.optional()
15561
15656
  });
15562
15657
  var GenerateVisionInputSchema = LlmGenerateBaseInputSchema.extend({ images: array(LlmImageSchema).min(1) });
15563
15658
  var ProfileRefInputSchema = object({
@@ -17721,6 +17816,16 @@ var NcCrossingSchema = _enum([
17721
17816
  "exit",
17722
17817
  "any"
17723
17818
  ]);
17819
+ /**
17820
+ * Which edge of a BOOLEAN sensor fires a device-event rule (D640).
17821
+ * - `raised` — the sensor went high: water detected, smoke, open, tampered.
17822
+ * - `cleared` — it went back: dry, clear, closed.
17823
+ * - absent — both edges, which is what every rule authored before this did.
17824
+ *
17825
+ * There is no third member for "both": absence already says it, and a value
17826
+ * that means the same as absence is a second way to write one rule.
17827
+ */
17828
+ var NcSensorTransitionSchema = _enum(["raised", "cleared"]);
17724
17829
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
17725
17830
  var NcZoneConditionSchema = object({
17726
17831
  ids: array(string().min(1)).min(1),
@@ -17910,6 +18015,20 @@ var NcConditionsSchema = object({
17910
18015
  scene: NcSceneConditionSchema.optional(),
17911
18016
  /** Device scope — absent = all devices. */
17912
18017
  devices: array(number()).optional(),
18018
+ /**
18019
+ * Device EXCLUSION (D641) — "every device except these". Judged on the SAME
18020
+ * subject ids {@link devices} is judged on (the camera, the sensor that
18021
+ * fired, a linked set's sensor and row cameras), so a sensor fanned out per
18022
+ * linked camera is excluded exactly where an include would have tested it.
18023
+ * `min(1)`: an empty exclusion excludes nothing and is written as absent.
18024
+ *
18025
+ * Not for `system-event` rules — those carry their own
18026
+ * `systemEvent.excludeDeviceIds` (D636), and the hub refuses this key there.
18027
+ * Editors present the two lists as ONE field (All | Only these | All except
18028
+ * these); the engine evaluates each independently, so a legacy rule
18029
+ * carrying both still means "these, minus those".
18030
+ */
18031
+ devicesExclude: array(number()).min(1).optional(),
17913
18032
  /** Detector class names (any overlap with the record's class set). */
17914
18033
  classes: array(string().min(1)).optional(),
17915
18034
  /** Veto classes — any overlap fails the rule. */
@@ -18043,6 +18162,16 @@ var NcConditionsSchema = object({
18043
18162
  */
18044
18163
  sensorKinds: array(string().min(1)).optional(),
18045
18164
  /**
18165
+ * DEVICE-EVENT only (D640). Fire on one edge of a boolean sensor —
18166
+ * {@link NcSensorTransitionSchema}. Which field of the slice means "raised"
18167
+ * is `@camstack/types` → `notification/sensor-raised.ts`. A reading the
18168
+ * engine cannot place (a kind with no raise, an unreadable slice) PASSES:
18169
+ * the condition fails open towards notifying, never towards silence. Editors
18170
+ * offer it only when every chosen {@link sensorKinds} member has a raise
18171
+ * (`sensorTransitionOffered`), and the hub refuses it on any other delivery.
18172
+ */
18173
+ sensorTransition: NcSensorTransitionSchema.optional(),
18174
+ /**
18046
18175
  * PACKAGE-EVENT only. Which package phase fires the rule — `delivered`
18047
18176
  * (a parked parcel appeared), `picked-up` (it departed), or `both`. Fails
18048
18177
  * when the subject's phase does not match (a subject always carries a phase
@@ -18542,9 +18671,29 @@ var NcTestResultSchema = object({
18542
18671
  className: string().optional(),
18543
18672
  label: string().optional()
18544
18673
  });
18545
- /** The five rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts`
18546
- * is the same union; the template-vars spec pins the two together. */
18674
+ /** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is the
18675
+ * same union; the template-vars spec pins the two together. `mixed` is DERIVED
18676
+ * (a stored system rule whose kinds span families, D637) and never authored. */
18547
18677
  var NcRuleKindSchema = _enum([
18678
+ "detection",
18679
+ "sensor",
18680
+ "occupancy",
18681
+ "sound",
18682
+ "device-events",
18683
+ "system",
18684
+ "alarm",
18685
+ "mixed"
18686
+ ]);
18687
+ /**
18688
+ * The kinds a SERVED template-variable descriptor may name: the five that
18689
+ * existed before D637, frozen. `getTemplateCatalog` ships `kinds` to every
18690
+ * installed viewer, and a viewer at `@camstack/types` 1.2.25x parses them with a
18691
+ * strict five-member enum — one `device-events` in one descriptor fails the
18692
+ * whole catalog parse. So the WIRE says `system`, and the MATCH widens it:
18693
+ * `templateVarKindApplies` reads a `system` descriptor as applying to every
18694
+ * system rule kind (`device-events`, `system`, `alarm`, `mixed`).
18695
+ */
18696
+ var NcTemplateVarKindSchema = _enum([
18548
18697
  "detection",
18549
18698
  "sensor",
18550
18699
  "occupancy",
@@ -18582,7 +18731,7 @@ var NcTemplateVarGroupSchema = _enum([
18582
18731
  *
18583
18732
  * `families` / `fields` / `kinds` / `deliveries` / `systemEventKinds` say WHERE
18584
18733
  * it has a value; absent = no restriction on that axis. `systemEventKinds` is
18585
- * read only for a `system` rule. `dynamic` declares a FAMILY of names
18734
+ * read only for a system-event rule (any family, or `mixed`). `dynamic` declares a FAMILY of names
18586
18735
  * (`count_<class>`): the descriptor's `name` is the example member.
18587
18736
  */
18588
18737
  var NcTemplateVarDescriptorSchema = object({
@@ -18593,7 +18742,7 @@ var NcTemplateVarDescriptorSchema = object({
18593
18742
  group: NcTemplateVarGroupSchema,
18594
18743
  families: array(NcTemplateFamilySchema).min(1),
18595
18744
  fields: array(NcTemplateFieldSchema).optional(),
18596
- kinds: array(NcRuleKindSchema).optional(),
18745
+ kinds: array(NcTemplateVarKindSchema).optional(),
18597
18746
  deliveries: array(NcDeliverySchema).optional(),
18598
18747
  systemEventKinds: array(NcSystemEventKindSchema).optional(),
18599
18748
  dynamic: object({
@@ -18641,6 +18790,7 @@ var NcConditionDescriptorSchema = object({
18641
18790
  /** Editor widget the UI renders — never hardcode per-condition forms. */
18642
18791
  valueType: _enum([
18643
18792
  "deviceIdList",
18793
+ "deviceIdExcludeList",
18644
18794
  "stringList",
18645
18795
  "number01",
18646
18796
  "number",
@@ -18651,6 +18801,7 @@ var NcConditionDescriptorSchema = object({
18651
18801
  "plateMatcher",
18652
18802
  "packagePhase",
18653
18803
  "crossingSelect",
18804
+ "sensorTransition",
18654
18805
  "polygonDraw",
18655
18806
  "occupancy",
18656
18807
  "audio",
@@ -18801,6 +18952,28 @@ var NcHistoryFilterSchema = object({
18801
18952
  limit: number().int().min(1).max(500).default(100)
18802
18953
  });
18803
18954
  /**
18955
+ * Every rule's last run, in one answer.
18956
+ *
18957
+ * A rule ABSENT from `runs` produced no delivery inside `horizonMs` — how far
18958
+ * back this answer looked, in ms before the hub's now. It is the outbox prune
18959
+ * window (7 days by default, operator-configurable), NARROWED when the read hit
18960
+ * its row bound: the answer never claims a window it did not read. `null` means
18961
+ * the operator keeps the outbox forever AND the read reached its end, so absent
18962
+ * means "never on record". A UI derives its "not in the last N days" from this
18963
+ * value, never from a constant — and only when the call ANSWERED (D315).
18964
+ */
18965
+ var NcRuleLastRunsSchema = object({
18966
+ runs: array(object({
18967
+ ruleId: string(),
18968
+ /** Fire time of the newest row (`createdAt`, epoch ms). */
18969
+ lastAt: number(),
18970
+ status: NcHistoryStatusSchema,
18971
+ /** The camera/device of that row (a digest row files under its first camera). */
18972
+ deviceId: number()
18973
+ })),
18974
+ horizonMs: number().nonnegative().nullable()
18975
+ });
18976
+ /**
18804
18977
  * What a snooze covers. Broader scopes win when several overlap, so one window
18805
18978
  * leaves ONE digest rather than a rule snooze and a whole-feed snooze both
18806
18979
  * summarising the same silence.
@@ -18981,6 +19154,14 @@ var NcAlarmModeCoverageSchema = object({
18981
19154
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
18982
19155
  deviceIds: array(number().int()),
18983
19156
  /**
19157
+ * D641: the ids NOT covered although `allDevices` is true — every unscoped
19158
+ * covering rule EXCLUDES them (`conditions.devicesExclude`) and no named rule
19159
+ * covers them. Always `[]` when `allDevices` is false. Excluded by the rules,
19160
+ * which is not the same as skipped by a switch: never in `skippedDevices`.
19161
+ * Defaulted so an answer computed before this field parses as "none".
19162
+ */
19163
+ allDevicesExcept: array(number().int()).default([]),
19164
+ /**
18984
19165
  * Devices this mode NAMES but cannot actually arm, each with the switch that
18985
19166
  * excludes it.
18986
19167
  *
@@ -19116,7 +19297,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
19116
19297
  })), method(object({}), object({ vars: array(NcTemplateVarDescriptorSchema) })), method(NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, {
19117
19298
  kind: "mutation",
19118
19299
  access: "view"
19119
- }), 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 }), {
19300
+ }), 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 }), {
19120
19301
  kind: "mutation",
19121
19302
  caller: "required"
19122
19303
  }), method(object({ snoozeId: string() }), object({ success: literal(true) }), {
@@ -23562,7 +23743,11 @@ function buildDescriptor(capName, kind) {
23562
23743
  icon: legacyIcon(t.iconId)
23563
23744
  };
23564
23745
  }
23565
- Object.freeze(Object.fromEntries(Object.entries(CAP_TO_KIND).map(([capName, kind]) => [capName, buildDescriptor(capName, kind)])));
23746
+ /**
23747
+ * Sensor / control cap name → static event-kind descriptor. A linked device
23748
+ * contributes one entry per bound cap present in this map.
23749
+ */
23750
+ var EVENT_KIND_BY_CAP = Object.freeze(Object.fromEntries(Object.entries(CAP_TO_KIND).map(([capName, kind]) => [capName, buildDescriptor(capName, kind)])));
23566
23751
  /**
23567
23752
  * server-management — per-NODE singleton capability for a node's ROOT
23568
23753
  * package lifecycle (runtime-updatable node packages).
@@ -29705,7 +29890,30 @@ var RenameNodeResultSchema = object({
29705
29890
  nodeId: string(),
29706
29891
  name: string()
29707
29892
  });
29708
- method(_void(), array(TopologyNodeSchema).readonly(), { auth: "admin" }), method(NodeAddonInputSchema, SuccessSchema, {
29893
+ /**
29894
+ * The cheap node list. A consumer's rule for a STORED node id (a rule's
29895
+ * `nodeIds`) that is missing from `nodes`, whatever `complete` says: render it
29896
+ * as a removable chip labelled unknown, never drop it (D49). Even a complete
29897
+ * list omits a node that joined and left between two history captures, so a
29898
+ * missing id means "not known to the hub", never "removed". Only the operator
29899
+ * removes it.
29900
+ *
29901
+ * `complete` changes only the WORDING: `false` = no history read has ever
29902
+ * answered, so the list may be missing offline nodes the hub does know (D315).
29903
+ *
29904
+ * `name` is the history row's name (≤ 30 s behind a rename), or the id when
29905
+ * the history has none.
29906
+ */
29907
+ var NodeDirectorySchema = object({
29908
+ nodes: array(object({
29909
+ id: string(),
29910
+ name: string(),
29911
+ isHub: boolean(),
29912
+ isOnline: boolean()
29913
+ })).readonly(),
29914
+ complete: boolean()
29915
+ });
29916
+ method(_void(), array(TopologyNodeSchema).readonly(), { auth: "admin" }), method(_void(), NodeDirectorySchema, { auth: "admin" }), method(NodeAddonInputSchema, SuccessSchema, {
29709
29917
  kind: "mutation",
29710
29918
  auth: "admin"
29711
29919
  }), method(NodeAddonInputSchema, SuccessSchema, {
@@ -34099,6 +34307,42 @@ DeviceType.Camera, method(object({
34099
34307
  package: array(ZoneRuleSchema).readonly()
34100
34308
  });
34101
34309
  /**
34310
+ * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
34311
+ * valutatore puro del suo FRONTE.
34312
+ *
34313
+ * Viveva dentro il builtin virtual-doorbell
34314
+ * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
34315
+ * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
34316
+ * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
34317
+ * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
34318
+ * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
34319
+ * SPOSTA qui e il doorbell la ri-esporta.
34320
+ *
34321
+ * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
34322
+ * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
34323
+ * regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
34324
+ * booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
34325
+ */
34326
+ /**
34327
+ * Known binary / switch source caps → the boolean slice field whose
34328
+ * false→true rise counts as ACTIVE. Every entry is "fire on active".
34329
+ * Sensors whose "active" reading is not a plain boolean (presence's string
34330
+ * state, connectivity's connected flag) are deliberately excluded — a
34331
+ * reconnect is not a doorbell press, and it is not a recording either.
34332
+ */
34333
+ var SOURCE_CAP_ACTIVE_FIELD = {
34334
+ contact: "entryOpen",
34335
+ binary: "on",
34336
+ switch: "on",
34337
+ motion: "detected",
34338
+ flood: "flooded",
34339
+ gas: "detected",
34340
+ smoke: "detected",
34341
+ "carbon-monoxide": "detected",
34342
+ vibration: "detected",
34343
+ tamper: "tampered"
34344
+ };
34345
+ /**
34102
34346
  * Accessory device helpers — shared across drivers.
34103
34347
  *
34104
34348
  * Many vendor-specific drivers register accessory child devices on
@@ -38134,12 +38378,30 @@ Object.freeze({
38134
38378
  addonId: null,
38135
38379
  access: "create"
38136
38380
  },
38381
+ "llmRuntime.appleAvailability": {
38382
+ capName: "llm-runtime",
38383
+ capScope: "system",
38384
+ addonId: null,
38385
+ access: "view"
38386
+ },
38387
+ "llmRuntime.cancel": {
38388
+ capName: "llm-runtime",
38389
+ capScope: "system",
38390
+ addonId: null,
38391
+ access: "create"
38392
+ },
38137
38393
  "llmRuntime.complete": {
38138
38394
  capName: "llm-runtime",
38139
38395
  capScope: "system",
38140
38396
  addonId: null,
38141
38397
  access: "create"
38142
38398
  },
38399
+ "llmRuntime.completeApple": {
38400
+ capName: "llm-runtime",
38401
+ capScope: "system",
38402
+ addonId: null,
38403
+ access: "create"
38404
+ },
38143
38405
  "llmRuntime.deleteModel": {
38144
38406
  capName: "llm-runtime",
38145
38407
  capScope: "system",
@@ -38812,6 +39074,12 @@ Object.freeze({
38812
39074
  addonId: null,
38813
39075
  access: "create"
38814
39076
  },
39077
+ "nodes.directory": {
39078
+ capName: "nodes",
39079
+ capScope: "system",
39080
+ addonId: null,
39081
+ access: "view"
39082
+ },
38815
39083
  "nodes.executeQuery": {
38816
39084
  capName: "nodes",
38817
39085
  capScope: "system",
@@ -38980,6 +39248,12 @@ Object.freeze({
38980
39248
  addonId: null,
38981
39249
  access: "view"
38982
39250
  },
39251
+ "notificationRules.getRuleLastRuns": {
39252
+ capName: "notification-rules",
39253
+ capScope: "system",
39254
+ addonId: null,
39255
+ access: "view"
39256
+ },
38983
39257
  "notificationRules.getTemplateCatalog": {
38984
39258
  capName: "notification-rules",
38985
39259
  capScope: "system",
@@ -44576,7 +44850,85 @@ var NC_AUDIO_DEFAULTS = {
44576
44850
  samplingSeconds: 10
44577
44851
  };
44578
44852
  new Set(["devices", "classes"]);
44853
+ /** Every filter, for the callers that must cover all four (guards, tests). */
44854
+ var NC_SYSTEM_EVENT_FILTER_KEYS = [
44855
+ "deviceIds",
44856
+ "deviceTypes",
44857
+ "nodeIds",
44858
+ "packageNames"
44859
+ ];
44860
+ new Map(Object.entries({
44861
+ "device-online": "device-events",
44862
+ "device-offline": "device-events",
44863
+ "device-disabled": "device-events",
44864
+ "device-enabled": "device-events",
44865
+ "device-battery-low": "device-events",
44866
+ "device-battery-normal": "device-events",
44867
+ "device-consumable-low": "device-events",
44868
+ "device-consumable-normal": "device-events",
44869
+ "stream-online": "device-events",
44870
+ "stream-offline": "device-events",
44871
+ "detection-blind": "device-events",
44872
+ "node-online": "system",
44873
+ "node-offline": "system",
44874
+ "node-inference-unavailable": "system",
44875
+ "addon-crash-loop": "system",
44876
+ "addon-update-available": "system",
44877
+ "addon-updated": "system",
44878
+ "server-update-available": "system",
44879
+ "server-updated": "system",
44880
+ "wrapper-update-available": "system",
44881
+ "backup-completed": "system",
44882
+ "export-completed": "system",
44883
+ "alarm-triggered": "alarm",
44884
+ "alarm-armed": "alarm",
44885
+ "alarm-disarmed": "alarm",
44886
+ "alarm-arming": "alarm",
44887
+ "alarm-arm-refused": "alarm",
44888
+ "alarm-pending": "alarm",
44889
+ "alarm-rearmed": "alarm",
44890
+ "alarm-sensor-bypass": "alarm",
44891
+ "alarm-check-failed": "alarm",
44892
+ "camera-online": null,
44893
+ "camera-offline": null,
44894
+ "camera-disabled": null,
44895
+ "camera-enabled": null
44896
+ }));
44897
+ [...NC_SYSTEM_EVENT_FILTER_KEYS];
44579
44898
  NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
44899
+ /**
44900
+ * WHICH WAY A BOOLEAN SENSOR MOVED — read off the one slice a sensor event
44901
+ * persists (D640 "a sensor rule fires on the raise, the clear, or both").
44902
+ *
44903
+ * A device-event rule over a flood sensor notified on BOTH edges: water
44904
+ * detected, and back to dry. `NcConditions.sensorTransition` lets the rule
44905
+ * name one edge; this file answers, for one `SensorEvent`, which edge it is.
44906
+ *
44907
+ * NOT A SECOND TABLE. The "which boolean of this cap counts as HIGH" question
44908
+ * already has one answer, `SOURCE_CAP_ACTIVE_FIELD`
44909
+ * (`catalogs/sensor-active-state.ts`, the doorbell's and the recorder's edge
44910
+ * table), and a sensor event names its kind, not its cap. So the table here is
44911
+ * DERIVED: event kind → cap (`EVENT_KIND_BY_CAP`) → that cap's active field.
44912
+ * Only kinds whose taxonomy category is `sensor` take part — a switch has an
44913
+ * `on` boolean too, but "it triggers / it clears" is not a sentence about a
44914
+ * light, and offering it there would be a knob with a misleading label.
44915
+ * `presence` is a WORD (`home` / `not_home` / a zone), not a boolean, and is
44916
+ * absent from the source table, so it is absent here.
44917
+ *
44918
+ * `undefined` = never guessed: a kind with no raise (a doorbell press, a
44919
+ * button, a cover), or a slice whose field is missing or not a boolean. The
44920
+ * engine then does NOT filter — a flood alert must not go silent because one
44921
+ * read came back unreadable (the same stance as the alarm's `sensorEdgeOf`).
44922
+ *
44923
+ * Pure, RN-safe: the viewer imports the support rule from here.
44924
+ */
44925
+ /** Event kind → the boolean field of its cap slice that means "raised". */
44926
+ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.entries(EVENT_KIND_BY_CAP).flatMap(([capName, descriptor]) => {
44927
+ const field = SOURCE_CAP_ACTIVE_FIELD[capName];
44928
+ if (field === void 0 || descriptor.category !== "sensor") return [];
44929
+ return [[descriptor.kind, field]];
44930
+ })));
44931
+ Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
44580
44932
  var RULE_BODY_ONLY = ["body"];
44581
44933
  var RULE_TEXT = ["title", "body"];
44582
44934
  var BATTERY = ["device-battery-low", "device-battery-normal"];
@@ -1,5 +1,5 @@
1
1
  import { h as e, l as t, u as n, y as r } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DJDHChgO.mjs";
2
- import { o as i, s as a } from "./responsive-jf0lxp6K.mjs";
2
+ import { o as i, s as a } from "./responsive-CEbpemt_.mjs";
3
3
  import { n as o, r as s, t as c } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-ds_Ehzaa.mjs";
4
4
  var l = a("chevron-down", [["path", {
5
5
  d: "m6 9 6 6 6-6",
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-C8fGYhC2.mjs";
1
+ import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DRHKHJI4.mjs";
2
2
  export { t as get, e as init };
@@ -1,6 +1,6 @@
1
1
  import { c as e, g as t, h as n, l as r, n as i, p as a, r as o, t as s, u as c, y as l } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DJDHChgO.mjs";
2
2
  import "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-ds_Ehzaa.mjs";
3
- import { n as u } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-wbtR-IuO.mjs";
3
+ import { n as u } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-ak-DR-J7.mjs";
4
4
  //#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
5
5
  l();
6
6
  var d = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), f = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), p = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), m = (e) => {
@@ -1,5 +1,5 @@
1
1
  import { c as e, h as t, p as n, y as r } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DJDHChgO.mjs";
2
- import { s as i } from "./responsive-jf0lxp6K.mjs";
2
+ import { s as i } from "./responsive-CEbpemt_.mjs";
3
3
  var a = i("camera", [["path", {
4
4
  d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",
5
5
  key: "18u6gg"
@@ -1,4 +1,4 @@
1
- import { s as e } from "./responsive-jf0lxp6K.mjs";
1
+ import { s as e } from "./responsive-CEbpemt_.mjs";
2
2
  var t = e("eye-off", [
3
3
  ["path", {
4
4
  d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
@@ -1,4 +1,4 @@
1
- import { s as e } from "./responsive-jf0lxp6K.mjs";
1
+ import { s as e } from "./responsive-CEbpemt_.mjs";
2
2
  var t = e("trash-2", [
3
3
  ["path", {
4
4
  d: "M10 11v6",
@@ -2753,7 +2753,7 @@ async function rr(e) {
2753
2753
  }
2754
2754
  }
2755
2755
  async function ir() {
2756
- return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-yYlhCyNB.mjs")).catch((e) => {
2756
+ return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-CP30dIZR.mjs")).catch((e) => {
2757
2757
  throw tr = void 0, e;
2758
2758
  }), tr;
2759
2759
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-model-studio",
3
- "version": "1.1.171",
3
+ "version": "1.1.173",
4
4
  "description": "Custom detection model registry, conversion & distribution for CamStack",
5
5
  "keywords": [
6
6
  "camstack",