@camstack/addon-model-studio 1.1.170 → 1.1.172

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-QVVEC220.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-DNTptTqU.mjs → PrivacyMaskSettings-xeMI1BTC.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-DlFCIgLK.mjs → SceneMonitorEditor-C269t1tC.mjs} +3 -3
  4. package/dist/_stub.js +10 -10
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-CzKIbASt.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-Co04mmEH.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CEMfSnqp.mjs +26 -0
  7. package/dist/{hostInit-CqNbveFJ.mjs → hostInit-GDWPIFmC.mjs} +2 -2
  8. package/dist/model-studio.addon.js +221 -14
  9. package/dist/model-studio.addon.mjs +221 -14
  10. package/dist/{player-overlays-BQcXFid_.mjs → player-overlays-CjVxAzYe.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-jf0lxp6K.mjs → responsive-CH1mGJTo.mjs} +1 -1
  13. package/dist/{scene-monitor-copy-CncglTT-.mjs → scene-monitor-copy-BIVlnlk5.mjs} +1 -1
  14. package/dist/{square-CKSQ7rAe.mjs → square-Bul4urrS.mjs} +1 -1
  15. package/dist/{trash-2-h_VbLaR6.mjs → trash-2-DqNDJcPu.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CxcjtoPK.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-SwmSP59i.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
@@ -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({
@@ -18563,9 +18658,29 @@ var NcTestResultSchema = object({
18563
18658
  className: string().optional(),
18564
18659
  label: string().optional()
18565
18660
  });
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. */
18661
+ /** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is the
18662
+ * same union; the template-vars spec pins the two together. `mixed` is DERIVED
18663
+ * (a stored system rule whose kinds span families, D637) and never authored. */
18568
18664
  var NcRuleKindSchema = _enum([
18665
+ "detection",
18666
+ "sensor",
18667
+ "occupancy",
18668
+ "sound",
18669
+ "device-events",
18670
+ "system",
18671
+ "alarm",
18672
+ "mixed"
18673
+ ]);
18674
+ /**
18675
+ * The kinds a SERVED template-variable descriptor may name: the five that
18676
+ * existed before D637, frozen. `getTemplateCatalog` ships `kinds` to every
18677
+ * installed viewer, and a viewer at `@camstack/types` 1.2.25x parses them with a
18678
+ * strict five-member enum — one `device-events` in one descriptor fails the
18679
+ * whole catalog parse. So the WIRE says `system`, and the MATCH widens it:
18680
+ * `templateVarKindApplies` reads a `system` descriptor as applying to every
18681
+ * system rule kind (`device-events`, `system`, `alarm`, `mixed`).
18682
+ */
18683
+ var NcTemplateVarKindSchema = _enum([
18569
18684
  "detection",
18570
18685
  "sensor",
18571
18686
  "occupancy",
@@ -18603,7 +18718,7 @@ var NcTemplateVarGroupSchema = _enum([
18603
18718
  *
18604
18719
  * `families` / `fields` / `kinds` / `deliveries` / `systemEventKinds` say WHERE
18605
18720
  * 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
18721
+ * read only for a system-event rule (any family, or `mixed`). `dynamic` declares a FAMILY of names
18607
18722
  * (`count_<class>`): the descriptor's `name` is the example member.
18608
18723
  */
18609
18724
  var NcTemplateVarDescriptorSchema = object({
@@ -18614,7 +18729,7 @@ var NcTemplateVarDescriptorSchema = object({
18614
18729
  group: NcTemplateVarGroupSchema,
18615
18730
  families: array(NcTemplateFamilySchema).min(1),
18616
18731
  fields: array(NcTemplateFieldSchema).optional(),
18617
- kinds: array(NcRuleKindSchema).optional(),
18732
+ kinds: array(NcTemplateVarKindSchema).optional(),
18618
18733
  deliveries: array(NcDeliverySchema).optional(),
18619
18734
  systemEventKinds: array(NcSystemEventKindSchema).optional(),
18620
18735
  dynamic: object({
@@ -29726,7 +29841,30 @@ var RenameNodeResultSchema = object({
29726
29841
  nodeId: string(),
29727
29842
  name: string()
29728
29843
  });
29729
- method(_void(), array(TopologyNodeSchema).readonly(), { auth: "admin" }), method(NodeAddonInputSchema, SuccessSchema, {
29844
+ /**
29845
+ * The cheap node list. A consumer's rule for a STORED node id (a rule's
29846
+ * `nodeIds`) that is missing from `nodes`, whatever `complete` says: render it
29847
+ * as a removable chip labelled unknown, never drop it (D49). Even a complete
29848
+ * list omits a node that joined and left between two history captures, so a
29849
+ * missing id means "not known to the hub", never "removed". Only the operator
29850
+ * removes it.
29851
+ *
29852
+ * `complete` changes only the WORDING: `false` = no history read has ever
29853
+ * answered, so the list may be missing offline nodes the hub does know (D315).
29854
+ *
29855
+ * `name` is the history row's name (≤ 30 s behind a rename), or the id when
29856
+ * the history has none.
29857
+ */
29858
+ var NodeDirectorySchema = object({
29859
+ nodes: array(object({
29860
+ id: string(),
29861
+ name: string(),
29862
+ isHub: boolean(),
29863
+ isOnline: boolean()
29864
+ })).readonly(),
29865
+ complete: boolean()
29866
+ });
29867
+ method(_void(), array(TopologyNodeSchema).readonly(), { auth: "admin" }), method(_void(), NodeDirectorySchema, { auth: "admin" }), method(NodeAddonInputSchema, SuccessSchema, {
29730
29868
  kind: "mutation",
29731
29869
  auth: "admin"
29732
29870
  }), method(NodeAddonInputSchema, SuccessSchema, {
@@ -38155,12 +38293,30 @@ Object.freeze({
38155
38293
  addonId: null,
38156
38294
  access: "create"
38157
38295
  },
38296
+ "llmRuntime.appleAvailability": {
38297
+ capName: "llm-runtime",
38298
+ capScope: "system",
38299
+ addonId: null,
38300
+ access: "view"
38301
+ },
38302
+ "llmRuntime.cancel": {
38303
+ capName: "llm-runtime",
38304
+ capScope: "system",
38305
+ addonId: null,
38306
+ access: "create"
38307
+ },
38158
38308
  "llmRuntime.complete": {
38159
38309
  capName: "llm-runtime",
38160
38310
  capScope: "system",
38161
38311
  addonId: null,
38162
38312
  access: "create"
38163
38313
  },
38314
+ "llmRuntime.completeApple": {
38315
+ capName: "llm-runtime",
38316
+ capScope: "system",
38317
+ addonId: null,
38318
+ access: "create"
38319
+ },
38164
38320
  "llmRuntime.deleteModel": {
38165
38321
  capName: "llm-runtime",
38166
38322
  capScope: "system",
@@ -38833,6 +38989,12 @@ Object.freeze({
38833
38989
  addonId: null,
38834
38990
  access: "create"
38835
38991
  },
38992
+ "nodes.directory": {
38993
+ capName: "nodes",
38994
+ capScope: "system",
38995
+ addonId: null,
38996
+ access: "view"
38997
+ },
38836
38998
  "nodes.executeQuery": {
38837
38999
  capName: "nodes",
38838
39000
  capScope: "system",
@@ -44597,6 +44759,51 @@ var NC_AUDIO_DEFAULTS = {
44597
44759
  samplingSeconds: 10
44598
44760
  };
44599
44761
  new Set(["devices", "classes"]);
44762
+ /** Every filter, for the callers that must cover all four (guards, tests). */
44763
+ var NC_SYSTEM_EVENT_FILTER_KEYS = [
44764
+ "deviceIds",
44765
+ "deviceTypes",
44766
+ "nodeIds",
44767
+ "packageNames"
44768
+ ];
44769
+ new Map(Object.entries({
44770
+ "device-online": "device-events",
44771
+ "device-offline": "device-events",
44772
+ "device-disabled": "device-events",
44773
+ "device-enabled": "device-events",
44774
+ "device-battery-low": "device-events",
44775
+ "device-battery-normal": "device-events",
44776
+ "device-consumable-low": "device-events",
44777
+ "device-consumable-normal": "device-events",
44778
+ "stream-online": "device-events",
44779
+ "stream-offline": "device-events",
44780
+ "detection-blind": "device-events",
44781
+ "node-online": "system",
44782
+ "node-offline": "system",
44783
+ "node-inference-unavailable": "system",
44784
+ "addon-crash-loop": "system",
44785
+ "addon-update-available": "system",
44786
+ "addon-updated": "system",
44787
+ "server-update-available": "system",
44788
+ "server-updated": "system",
44789
+ "wrapper-update-available": "system",
44790
+ "backup-completed": "system",
44791
+ "export-completed": "system",
44792
+ "alarm-triggered": "alarm",
44793
+ "alarm-armed": "alarm",
44794
+ "alarm-disarmed": "alarm",
44795
+ "alarm-arming": "alarm",
44796
+ "alarm-arm-refused": "alarm",
44797
+ "alarm-pending": "alarm",
44798
+ "alarm-rearmed": "alarm",
44799
+ "alarm-sensor-bypass": "alarm",
44800
+ "alarm-check-failed": "alarm",
44801
+ "camera-online": null,
44802
+ "camera-offline": null,
44803
+ "camera-disabled": null,
44804
+ "camera-enabled": null
44805
+ }));
44806
+ [...NC_SYSTEM_EVENT_FILTER_KEYS];
44600
44807
  NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
44601
44808
  var RULE_BODY_ONLY = ["body"];
44602
44809
  var RULE_TEXT = ["title", "body"];
@@ -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({
@@ -18542,9 +18637,29 @@ var NcTestResultSchema = object({
18542
18637
  className: string().optional(),
18543
18638
  label: string().optional()
18544
18639
  });
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. */
18640
+ /** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is the
18641
+ * same union; the template-vars spec pins the two together. `mixed` is DERIVED
18642
+ * (a stored system rule whose kinds span families, D637) and never authored. */
18547
18643
  var NcRuleKindSchema = _enum([
18644
+ "detection",
18645
+ "sensor",
18646
+ "occupancy",
18647
+ "sound",
18648
+ "device-events",
18649
+ "system",
18650
+ "alarm",
18651
+ "mixed"
18652
+ ]);
18653
+ /**
18654
+ * The kinds a SERVED template-variable descriptor may name: the five that
18655
+ * existed before D637, frozen. `getTemplateCatalog` ships `kinds` to every
18656
+ * installed viewer, and a viewer at `@camstack/types` 1.2.25x parses them with a
18657
+ * strict five-member enum — one `device-events` in one descriptor fails the
18658
+ * whole catalog parse. So the WIRE says `system`, and the MATCH widens it:
18659
+ * `templateVarKindApplies` reads a `system` descriptor as applying to every
18660
+ * system rule kind (`device-events`, `system`, `alarm`, `mixed`).
18661
+ */
18662
+ var NcTemplateVarKindSchema = _enum([
18548
18663
  "detection",
18549
18664
  "sensor",
18550
18665
  "occupancy",
@@ -18582,7 +18697,7 @@ var NcTemplateVarGroupSchema = _enum([
18582
18697
  *
18583
18698
  * `families` / `fields` / `kinds` / `deliveries` / `systemEventKinds` say WHERE
18584
18699
  * 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
18700
+ * read only for a system-event rule (any family, or `mixed`). `dynamic` declares a FAMILY of names
18586
18701
  * (`count_<class>`): the descriptor's `name` is the example member.
18587
18702
  */
18588
18703
  var NcTemplateVarDescriptorSchema = object({
@@ -18593,7 +18708,7 @@ var NcTemplateVarDescriptorSchema = object({
18593
18708
  group: NcTemplateVarGroupSchema,
18594
18709
  families: array(NcTemplateFamilySchema).min(1),
18595
18710
  fields: array(NcTemplateFieldSchema).optional(),
18596
- kinds: array(NcRuleKindSchema).optional(),
18711
+ kinds: array(NcTemplateVarKindSchema).optional(),
18597
18712
  deliveries: array(NcDeliverySchema).optional(),
18598
18713
  systemEventKinds: array(NcSystemEventKindSchema).optional(),
18599
18714
  dynamic: object({
@@ -29705,7 +29820,30 @@ var RenameNodeResultSchema = object({
29705
29820
  nodeId: string(),
29706
29821
  name: string()
29707
29822
  });
29708
- method(_void(), array(TopologyNodeSchema).readonly(), { auth: "admin" }), method(NodeAddonInputSchema, SuccessSchema, {
29823
+ /**
29824
+ * The cheap node list. A consumer's rule for a STORED node id (a rule's
29825
+ * `nodeIds`) that is missing from `nodes`, whatever `complete` says: render it
29826
+ * as a removable chip labelled unknown, never drop it (D49). Even a complete
29827
+ * list omits a node that joined and left between two history captures, so a
29828
+ * missing id means "not known to the hub", never "removed". Only the operator
29829
+ * removes it.
29830
+ *
29831
+ * `complete` changes only the WORDING: `false` = no history read has ever
29832
+ * answered, so the list may be missing offline nodes the hub does know (D315).
29833
+ *
29834
+ * `name` is the history row's name (≤ 30 s behind a rename), or the id when
29835
+ * the history has none.
29836
+ */
29837
+ var NodeDirectorySchema = object({
29838
+ nodes: array(object({
29839
+ id: string(),
29840
+ name: string(),
29841
+ isHub: boolean(),
29842
+ isOnline: boolean()
29843
+ })).readonly(),
29844
+ complete: boolean()
29845
+ });
29846
+ method(_void(), array(TopologyNodeSchema).readonly(), { auth: "admin" }), method(_void(), NodeDirectorySchema, { auth: "admin" }), method(NodeAddonInputSchema, SuccessSchema, {
29709
29847
  kind: "mutation",
29710
29848
  auth: "admin"
29711
29849
  }), method(NodeAddonInputSchema, SuccessSchema, {
@@ -38134,12 +38272,30 @@ Object.freeze({
38134
38272
  addonId: null,
38135
38273
  access: "create"
38136
38274
  },
38275
+ "llmRuntime.appleAvailability": {
38276
+ capName: "llm-runtime",
38277
+ capScope: "system",
38278
+ addonId: null,
38279
+ access: "view"
38280
+ },
38281
+ "llmRuntime.cancel": {
38282
+ capName: "llm-runtime",
38283
+ capScope: "system",
38284
+ addonId: null,
38285
+ access: "create"
38286
+ },
38137
38287
  "llmRuntime.complete": {
38138
38288
  capName: "llm-runtime",
38139
38289
  capScope: "system",
38140
38290
  addonId: null,
38141
38291
  access: "create"
38142
38292
  },
38293
+ "llmRuntime.completeApple": {
38294
+ capName: "llm-runtime",
38295
+ capScope: "system",
38296
+ addonId: null,
38297
+ access: "create"
38298
+ },
38143
38299
  "llmRuntime.deleteModel": {
38144
38300
  capName: "llm-runtime",
38145
38301
  capScope: "system",
@@ -38812,6 +38968,12 @@ Object.freeze({
38812
38968
  addonId: null,
38813
38969
  access: "create"
38814
38970
  },
38971
+ "nodes.directory": {
38972
+ capName: "nodes",
38973
+ capScope: "system",
38974
+ addonId: null,
38975
+ access: "view"
38976
+ },
38815
38977
  "nodes.executeQuery": {
38816
38978
  capName: "nodes",
38817
38979
  capScope: "system",
@@ -44576,6 +44738,51 @@ var NC_AUDIO_DEFAULTS = {
44576
44738
  samplingSeconds: 10
44577
44739
  };
44578
44740
  new Set(["devices", "classes"]);
44741
+ /** Every filter, for the callers that must cover all four (guards, tests). */
44742
+ var NC_SYSTEM_EVENT_FILTER_KEYS = [
44743
+ "deviceIds",
44744
+ "deviceTypes",
44745
+ "nodeIds",
44746
+ "packageNames"
44747
+ ];
44748
+ new Map(Object.entries({
44749
+ "device-online": "device-events",
44750
+ "device-offline": "device-events",
44751
+ "device-disabled": "device-events",
44752
+ "device-enabled": "device-events",
44753
+ "device-battery-low": "device-events",
44754
+ "device-battery-normal": "device-events",
44755
+ "device-consumable-low": "device-events",
44756
+ "device-consumable-normal": "device-events",
44757
+ "stream-online": "device-events",
44758
+ "stream-offline": "device-events",
44759
+ "detection-blind": "device-events",
44760
+ "node-online": "system",
44761
+ "node-offline": "system",
44762
+ "node-inference-unavailable": "system",
44763
+ "addon-crash-loop": "system",
44764
+ "addon-update-available": "system",
44765
+ "addon-updated": "system",
44766
+ "server-update-available": "system",
44767
+ "server-updated": "system",
44768
+ "wrapper-update-available": "system",
44769
+ "backup-completed": "system",
44770
+ "export-completed": "system",
44771
+ "alarm-triggered": "alarm",
44772
+ "alarm-armed": "alarm",
44773
+ "alarm-disarmed": "alarm",
44774
+ "alarm-arming": "alarm",
44775
+ "alarm-arm-refused": "alarm",
44776
+ "alarm-pending": "alarm",
44777
+ "alarm-rearmed": "alarm",
44778
+ "alarm-sensor-bypass": "alarm",
44779
+ "alarm-check-failed": "alarm",
44780
+ "camera-online": null,
44781
+ "camera-offline": null,
44782
+ "camera-disabled": null,
44783
+ "camera-enabled": null
44784
+ }));
44785
+ [...NC_SYSTEM_EVENT_FILTER_KEYS];
44579
44786
  NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
44580
44787
  var RULE_BODY_ONLY = ["body"];
44581
44788
  var RULE_TEXT = ["title", "body"];
@@ -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-CH1mGJTo.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",