@camstack/addon-provider-homematic 1.2.141 → 1.2.143

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 (3) hide show
  1. package/dist/addon.js +348 -41
  2. package/dist/addon.mjs +348 -41
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -5556,7 +5556,7 @@ var ZodIssueCode = {
5556
5556
  var ZodFirstPartyTypeKind;
5557
5557
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5558
5558
  //#endregion
5559
- //#region ../types/dist/sleep-yKL5gfrH.mjs
5559
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5560
5560
  /**
5561
5561
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5562
5562
  * window to float samples (D455).
@@ -17385,7 +17385,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
17385
17385
  kind: literal("node"),
17386
17386
  nodeId: string().min(1)
17387
17387
  })]);
17388
+ /**
17389
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
17390
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
17391
+ * meaning); a rollup keeps the time spent in each state (`states`).
17392
+ */
17388
17393
  var DeviceHistoryKindSchema = _enum([
17394
+ "gauge",
17395
+ "counter",
17396
+ "boolean",
17397
+ "enum"
17398
+ ]);
17399
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
17400
+ var DeviceHistoryProducerKindSchema = _enum([
17389
17401
  "gauge",
17390
17402
  "counter",
17391
17403
  "boolean"
@@ -17422,7 +17434,13 @@ var SeriesInfoSchema = object({
17422
17434
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
17423
17435
  unit: string().nullable(),
17424
17436
  displayName: string(),
17425
- source: _enum(["cap", "addon"]),
17437
+ source: _enum([
17438
+ "cap",
17439
+ "addon",
17440
+ "derived"
17441
+ ]),
17442
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
17443
+ values: array(string()).readonly().nullable(),
17426
17444
  firstTs: number(),
17427
17445
  lastTs: number()
17428
17446
  });
@@ -17436,17 +17454,31 @@ var QueryPointSchema = object({
17436
17454
  twMean: number().nullable(),
17437
17455
  min: number(),
17438
17456
  max: number(),
17439
- /** `null` is unknown, never zero (D393). */
17440
- last: number().nullable()
17457
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
17458
+ last: number().nullable(),
17459
+ /**
17460
+ * The increase over the point: a `counter`'s growth since the previous point
17461
+ * or bucket (a drop is a reset, counted from zero), and for
17462
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
17463
+ * every other kind, and when it cannot be known.
17464
+ */
17465
+ delta: number().nullable(),
17466
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
17467
+ state: string().nullable(),
17468
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
17469
+ states: record(string(), number()).nullable()
17441
17470
  });
17442
17471
  var QuerySeriesSchema = object({
17443
17472
  scope: string(),
17444
17473
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
17445
17474
  before: object({
17446
17475
  t: number(),
17447
- value: number().nullable()
17476
+ value: number().nullable(),
17477
+ state: string().nullable()
17448
17478
  }).nullable(),
17449
- points: array(QueryPointSchema).readonly()
17479
+ points: array(QueryPointSchema).readonly(),
17480
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
17481
+ derivedFrom: string().nullable()
17450
17482
  });
17451
17483
  /** The window part of a query, shared by the device and node forms. */
17452
17484
  var QueryWindowShape = {
@@ -17462,6 +17494,23 @@ var QueryResultSchema = object({
17462
17494
  series: array(QuerySeriesSchema).readonly(),
17463
17495
  truncated: boolean()
17464
17496
  });
17497
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
17498
+ var QueryManyItemSchema = union([object({
17499
+ deviceId: number().int(),
17500
+ key: string(),
17501
+ scope: string().optional()
17502
+ }), object({
17503
+ forNodeId: string().min(1),
17504
+ key: string(),
17505
+ scope: string().optional()
17506
+ })]);
17507
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
17508
+ ok: literal(true),
17509
+ result: QueryResultSchema
17510
+ }), object({
17511
+ ok: literal(false),
17512
+ error: string()
17513
+ })]);
17465
17514
  var TierStatusSchema = object({
17466
17515
  tier: DeviceHistoryResolutionSchema,
17467
17516
  /** `null` until the first background count answered. */
@@ -17517,16 +17566,22 @@ var DeviceHistoryStatusSchema = object({
17517
17566
  lastRefreshAt: number().nullable()
17518
17567
  })
17519
17568
  });
17520
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17569
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17521
17570
  deviceId: number().int(),
17522
17571
  ...QueryWindowShape
17523
17572
  }), QueryResultSchema), method(object({
17524
- nodeId: string().min(1),
17573
+ forNodeId: string().min(1),
17525
17574
  ...QueryWindowShape
17526
17575
  }), QueryResultSchema, { auth: "admin" }), method(object({
17576
+ items: array(QueryManyItemSchema).min(1).max(24),
17577
+ from: QueryWindowShape.from,
17578
+ to: QueryWindowShape.to,
17579
+ resolution: QueryWindowShape.resolution,
17580
+ maxPoints: QueryWindowShape.maxPoints
17581
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
17527
17582
  name: string().regex(/^[a-z0-9-]+$/),
17528
17583
  subjectKind: _enum(["device", "node"]),
17529
- kind: DeviceHistoryKindSchema,
17584
+ kind: DeviceHistoryProducerKindSchema,
17530
17585
  unit: string().optional(),
17531
17586
  displayName: string().min(1),
17532
17587
  ingest: _enum(["points", "buckets"])
@@ -40865,14 +40920,106 @@ var LogEntrySchema = object({
40865
40920
  meta: record(string(), unknown()).optional(),
40866
40921
  tags: record(string(), string()).optional()
40867
40922
  });
40868
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
40869
- scope: array(string()).optional(),
40923
+ /**
40924
+ * A history READ against one destination (D898).
40925
+ *
40926
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
40927
+ * browser applied after the limit is what made a rare device's lines
40928
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
40929
+ * minted (opaque to everyone else): a file position for the rotated files, a
40930
+ * nanosecond timestamp for Loki.
40931
+ *
40932
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
40933
+ * store answers `done: false` with the cursor it reached and the bytes it
40934
+ * scanned, and the caller decides whether to go on. That is what makes a long
40935
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
40936
+ * flight, and not asking for the next slice ends the scan.
40937
+ */
40938
+ var LogReadQuerySchema = object({
40939
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
40940
+ requestId: string().min(1).max(64).optional(),
40941
+ /** The device the line is about (`tags.deviceId`, numeric). */
40942
+ deviceId: number().int().optional(),
40943
+ /**
40944
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
40945
+ * match. Not `addonId`: a cap router reads that name as "which provider".
40946
+ */
40947
+ fromAddonId: string().min(1).max(200).optional(),
40948
+ /**
40949
+ * The emitting node: matches the agent that emitted the line, the node
40950
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
40951
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
40952
+ * name as "which node's provider".
40953
+ */
40954
+ fromNodeId: string().min(1).max(200).optional(),
40955
+ /** Any other tag, exact match (AND). */
40956
+ tags: record(string(), union([string(), number()])).optional(),
40957
+ /** Severity FLOOR: this level and above. */
40870
40958
  level: LogLevelSchema.optional(),
40871
- since: date().optional(),
40872
- until: date().optional(),
40873
- limit: number().optional(),
40874
- tags: record(string(), string()).optional()
40875
- }), array(LogEntrySchema).readonly());
40959
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
40960
+ text: string().min(1).max(200).optional(),
40961
+ /** Epoch ms, inclusive. */
40962
+ since: number().optional(),
40963
+ /** Epoch ms, inclusive. */
40964
+ until: number().optional(),
40965
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
40966
+ before: string().min(1).max(1024).optional(),
40967
+ /** Newer than this cursor (exclusive). */
40968
+ after: string().min(1).max(1024).optional(),
40969
+ limit: number().int().min(1).max(1e3).optional(),
40970
+ /** Wall-clock bound of this slice. The provider caps it. */
40971
+ budgetMs: number().int().min(50).max(1e4).optional()
40972
+ });
40973
+ var LogReadResultSchema = object({
40974
+ /** Newest first. */
40975
+ entries: array(object({
40976
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
40977
+ id: string().optional(),
40978
+ /** Epoch ms. */
40979
+ timestamp: number(),
40980
+ level: LogLevelSchema,
40981
+ scope: string().optional(),
40982
+ message: string(),
40983
+ tags: record(string(), union([string(), number()])).optional(),
40984
+ meta: record(string(), unknown()).optional()
40985
+ })),
40986
+ /** Pass as `before` for the next older page; null when nothing older exists. */
40987
+ nextBefore: string().nullable(),
40988
+ /** Pass as `after` to read what arrived since; null when unknown. */
40989
+ nextAfter: string().nullable(),
40990
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
40991
+ scannedBytes: number().int().nonnegative(),
40992
+ /**
40993
+ * True when the scan in this direction reached the end of the store.
40994
+ * False with fewer than `limit` entries means the budget ran out first —
40995
+ * call again with `nextBefore` to go on.
40996
+ */
40997
+ done: boolean(),
40998
+ /** True when `cancelRead` ended this slice early. */
40999
+ cancelled: boolean().optional()
41000
+ });
41001
+ var LogReadCapabilitiesSchema = object({
41002
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
41003
+ readable: boolean(),
41004
+ /** Why not, when `readable` is false — rendered next to the source. */
41005
+ reason: string().nullable(),
41006
+ /** Filters the provider applies itself. A false one is applied by nobody. */
41007
+ filters: object({
41008
+ deviceId: boolean(),
41009
+ addonId: boolean(),
41010
+ nodeId: boolean(),
41011
+ tags: boolean(),
41012
+ level: boolean(),
41013
+ text: boolean(),
41014
+ timeRange: boolean()
41015
+ }),
41016
+ /** How far back the store reaches, when the provider knows (days). */
41017
+ retentionDays: number().nullable()
41018
+ });
41019
+ method(LogEntrySchema, _void(), { kind: "mutation" }), optionalMethod(_void(), LogReadCapabilitiesSchema, { auth: "admin" }), optionalMethod(LogReadQuerySchema, LogReadResultSchema, { auth: "admin" }), optionalMethod(object({ requestId: string().min(1).max(64) }), object({ cancelled: boolean() }), {
41020
+ kind: "mutation",
41021
+ auth: "admin"
41022
+ });
40876
41023
  /**
40877
41024
  * `login-method` — collection cap through which auth addons contribute
40878
41025
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -42590,9 +42737,11 @@ var alarmPanelCapability = {
42590
42737
  */
42591
42738
  durability: "restored",
42592
42739
  /**
42593
- * History (D850): none — enum state; arm/disarm history belongs in the events ledger.
42740
+ * History (D850): the panel's lifecycle state as an `enum` series —
42741
+ * change-only, no floor, so an `arming -> pending -> triggered` sequence of a
42742
+ * few seconds keeps every step. Who armed it stays in the events ledger.
42594
42743
  */
42595
- history: "none",
42744
+ history: { fields: { state: { kind: "enum" } } },
42596
42745
  /** Clock fields: written, but excluded from the compare that decides
42597
42746
  * whether persisting is worth a SQLite commit. */
42598
42747
  volatileStateFields: ["lastChangedAt"]
@@ -43470,6 +43619,33 @@ var NcRuleTargetSchema = object({
43470
43619
  params: record(string(), unknown()).optional()
43471
43620
  });
43472
43621
  /**
43622
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
43623
+ *
43624
+ * Every mode starts from the same CLEAN source frame of the trigger moment
43625
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
43626
+ * to the zone that fired the rule) and renders it once at send time:
43627
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
43628
+ * colour and every OTHER track visible at that instant outlined thin, each
43629
+ * labelled with class and confidence ("dog 87%").
43630
+ * - `crop` — the subject cut out of that frame around its box at that instant.
43631
+ * - `clean` — the whole scene with nothing drawn on it.
43632
+ * - `none` — no picture.
43633
+ *
43634
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
43635
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
43636
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
43637
+ * ship a crop on one event and a boxed scene on the next depending on which
43638
+ * stored kind had landed.
43639
+ */
43640
+ var NcMediaImageSchema = _enum([
43641
+ "scene-boxes",
43642
+ "crop",
43643
+ "clean",
43644
+ "none"
43645
+ ]);
43646
+ /**
43647
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43648
+ *
43473
43649
  * Media attachment policy (P1 still-image subset).
43474
43650
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
43475
43651
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -43483,6 +43659,8 @@ var NcRuleTargetSchema = object({
43483
43659
  * - `none` — no attachment.
43484
43660
  */
43485
43661
  /**
43662
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43663
+ *
43486
43664
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
43487
43665
  * conflate it with the selection strategy and betray the request: asking for
43488
43666
  * the clean scene frame on an object-event owner used to start at
@@ -43511,16 +43689,29 @@ var NcMediaFrameSchema = _enum([
43511
43689
  */
43512
43690
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
43513
43691
  var NcMediaPolicySchema = object({
43692
+ /**
43693
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
43694
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
43695
+ * triple below, at load and at every write, and the store keeps only this.
43696
+ */
43697
+ image: NcMediaImageSchema.optional(),
43698
+ /**
43699
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
43700
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
43701
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
43702
+ * Replaces `zoneCrop`.
43703
+ */
43704
+ showTriggerZone: boolean().optional(),
43705
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43514
43706
  attach: _enum([
43515
43707
  "best",
43516
43708
  "best-matching",
43517
43709
  "keyFrame",
43518
43710
  "none"
43519
- ]).default("best"),
43520
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
43711
+ ]).optional(),
43712
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43521
43713
  frame: NcMediaFrameSchema.optional(),
43522
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
43523
- * "show me the ZONE", not the whole scene or the subject crop. */
43714
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
43524
43715
  zoneCrop: boolean().optional(),
43525
43716
  /**
43526
43717
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -43692,7 +43883,9 @@ var NcRuleInputSchema = object({
43692
43883
  * targets.
43693
43884
  */
43694
43885
  targetUsers: array(string()).optional(),
43695
- media: NcMediaPolicySchema.default({ attach: "best" }),
43886
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
43887
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
43888
+ media: NcMediaPolicySchema.default({}),
43696
43889
  throttle: NcThrottleSchema.default({
43697
43890
  cooldownSec: 60,
43698
43891
  scope: "rule-device"
@@ -44629,13 +44822,37 @@ var NcAlarmModeOpeningsSchema = object({
44629
44822
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
44630
44823
  unknown: array(number().int())
44631
44824
  });
44825
+ /**
44826
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
44827
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
44828
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
44829
+ * never looks fully armed (D62: off must never look like broken).
44830
+ */
44831
+ var NcAlarmInputBypassViewSchema = object({
44832
+ ruleId: string(),
44833
+ /** The rule's current name (its frozen name when the rule is gone). */
44834
+ ruleName: string(),
44835
+ /** The input: the sensor of the match, else its camera. */
44836
+ deviceId: number().int(),
44837
+ /** The input's current name. */
44838
+ name: string(),
44839
+ /** When it was bypassed (ms epoch). */
44840
+ since: number(),
44841
+ /** Triggers from this input dropped since. */
44842
+ dropped: number().int().min(0)
44843
+ });
44632
44844
  var NcAlarmLiveSchema = object({
44633
44845
  state: AlarmStateSchema,
44634
44846
  /** The mode being armed into (exit delay) or held; null when disarmed. */
44635
44847
  targetMode: AlarmArmModeSchema.nullable(),
44636
44848
  availableModes: array(AlarmArmModeSchema),
44637
44849
  openings: array(NcAlarmModeOpeningsSchema),
44638
- exclusions: array(NcAlarmExclusionViewSchema)
44850
+ exclusions: array(NcAlarmExclusionViewSchema),
44851
+ /**
44852
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
44853
+ * Defaulted so an older hub answer still parses (as "none known").
44854
+ */
44855
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
44639
44856
  });
44640
44857
  var NcAlarmConfigSchema = object({
44641
44858
  /**
@@ -55354,9 +55571,11 @@ var connectivityCapability = {
55354
55571
  */
55355
55572
  durability: "restored",
55356
55573
  /**
55357
- * History (D850): none — duplicates device-status.online (one authority for availability).
55574
+ * History (D850): `connected` as a boolean series — change-only, no floor. It
55575
+ * is the upstream entity's own link (a HA connectivity sensor), not the
55576
+ * device's reachability, which stays `device-status.online`.
55358
55577
  */
55359
- history: "none",
55578
+ history: { fields: { connected: { kind: "boolean" } } },
55360
55579
  /** Clock fields: written, but excluded from the compare that decides
55361
55580
  * whether persisting is worth a SQLite commit. */
55362
55581
  volatileStateFields: ["lastChangedAt"]
@@ -56180,11 +56399,22 @@ var dishwasherCapability = {
56180
56399
  },
56181
56400
  runtimeState: DishwasherStatusSchema,
56182
56401
  durability: "session",
56183
- history: { fields: { progressPercent: {
56184
- kind: "gauge",
56185
- unit: "%",
56186
- deadband: 2
56187
- } } }
56402
+ history: { fields: {
56403
+ progressPercent: {
56404
+ kind: "gauge",
56405
+ unit: "%",
56406
+ deadband: 2
56407
+ },
56408
+ state: { kind: "enum" },
56409
+ operationState: { kind: "enum" },
56410
+ remainingSeconds: {
56411
+ kind: "gauge",
56412
+ unit: "s",
56413
+ minIntervalMs: 6e4
56414
+ },
56415
+ doorOpen: { kind: "boolean" },
56416
+ powerOn: { kind: "boolean" }
56417
+ } }
56188
56418
  };
56189
56419
  var DoorbellStatusSchema = object({
56190
56420
  /** Ms epoch of the last press. null = never observed since this provider started. */
@@ -56301,9 +56531,15 @@ var enumSensorCapability = {
56301
56531
  */
56302
56532
  durability: "restored",
56303
56533
  /**
56304
- * History (D850): none — text/enum state has no history (non-goal).
56534
+ * History (D850): the value as an `enum` series (an appliance's program or
56535
+ * operation state, an HVAC action). The option set is per device, so the
56536
+ * value list is LEARNED as values are first seen (bounded). A sensor with a
56537
+ * `format` carries a timestamp, not a state, and is not recorded.
56305
56538
  */
56306
- history: "none",
56539
+ history: { fields: { value: {
56540
+ kind: "enum",
56541
+ skipWhenSet: "format"
56542
+ } } },
56307
56543
  /** Clock fields: written, but excluded from the compare that decides
56308
56544
  * whether persisting is worth a SQLite commit. */
56309
56545
  volatileStateFields: ["lastFetchedAt"]
@@ -58277,9 +58513,10 @@ var lockControlCapability = {
58277
58513
  */
58278
58514
  durability: "restored",
58279
58515
  /**
58280
- * History (D850): none — enum state; lock events belong in the events ledger.
58516
+ * History (D850): the lock's state as an `enum` series — change-only, no
58517
+ * floor: a jam or an unlock lasting seconds is the edge an operator looks for.
58281
58518
  */
58282
- history: "none",
58519
+ history: { fields: { state: { kind: "enum" } } },
58283
58520
  /** Clock fields: written, but excluded from the compare that decides
58284
58521
  * whether persisting is worth a SQLite commit. */
58285
58522
  volatileStateFields: ["lastChangedAt"]
@@ -58453,9 +58690,18 @@ var mediaPlayerCapability = {
58453
58690
  */
58454
58691
  durability: "session",
58455
58692
  /**
58456
- * History (D850): none — `positionMs` moves continuously while playing; volume is transient.
58693
+ * History (D850): volume (a level an operator or an automation sets; the
58694
+ * default 10 s floor folds a slider drag into its end value) and mute.
58695
+ * `positionMs` is not recorded: it moves continuously while playing.
58457
58696
  */
58458
- history: "none"
58697
+ history: { fields: {
58698
+ volumeLevel: {
58699
+ kind: "gauge",
58700
+ unit: "%",
58701
+ deadband: 1
58702
+ },
58703
+ isMuted: { kind: "boolean" }
58704
+ } }
58459
58705
  };
58460
58706
  /**
58461
58707
  * mesh-network — collection cap for mesh-VPN providers.
@@ -60599,9 +60845,24 @@ var NpuInfoSchema = object({
60599
60845
  name: string().optional(),
60600
60846
  generation: _enum(["xdna1", "xdna2"]).optional()
60601
60847
  });
60848
+ var CoralBusSchema = _enum(["usb", "pci"]);
60602
60849
  var CoralInfoSchema = object({
60603
60850
  type: literal("coral-edgetpu"),
60604
- bus: string().optional()
60851
+ /** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
60852
+ bus: string().optional(),
60853
+ /** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
60854
+ count: number().int().nonnegative().optional(),
60855
+ /** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
60856
+ units: array(object({
60857
+ bus: CoralBusSchema,
60858
+ count: number().int().nonnegative()
60859
+ })).readonly().optional(),
60860
+ /** Present-but-unusable units, each with its typed reason (never "absent"). */
60861
+ unavailable: array(object({
60862
+ bus: CoralBusSchema,
60863
+ count: number().int().nonnegative(),
60864
+ reason: _enum(["driver-missing", "device-not-accessible"])
60865
+ })).readonly().optional()
60605
60866
  });
60606
60867
  var HardwareInfoSchema = object({
60607
60868
  platform: HardwarePlatformSchema,
@@ -63748,9 +64009,29 @@ var streamParamsCapability = {
63748
64009
  */
63749
64010
  durability: "restored",
63750
64011
  /**
63751
- * History (D850): none — encoder configuration.
64012
+ * History (D850): the configured bitrate and frame rate of the main and sub
64013
+ * profiles. Configuration, so change-only on the default floor: a point is an
64014
+ * operator's (or a tuner's) edit, which is exactly what a chart of a stream's
64015
+ * quality over time must show.
63752
64016
  */
63753
- history: "none",
64017
+ history: { fields: {
64018
+ "main.bitrate": {
64019
+ kind: "gauge",
64020
+ unit: "kbps"
64021
+ },
64022
+ "main.framerate": {
64023
+ kind: "gauge",
64024
+ unit: "fps"
64025
+ },
64026
+ "sub.bitrate": {
64027
+ kind: "gauge",
64028
+ unit: "kbps"
64029
+ },
64030
+ "sub.framerate": {
64031
+ kind: "gauge",
64032
+ unit: "fps"
64033
+ }
64034
+ } },
63754
64035
  /** Clock fields: written, but excluded from the compare that decides
63755
64036
  * whether persisting is worth a SQLite commit. */
63756
64037
  volatileStateFields: ["lastFetchedAt"]
@@ -66928,6 +67209,15 @@ var BaseDevice = class {
66928
67209
  * Drivers can use the `getProbeFlags()` helper to read the flag bag
66929
67210
  * with a typed cast.
66930
67211
  *
67212
+ * Answer what you KNOW. A plain array is read as the complete list only
67213
+ * while this device is `online` and probed; return
67214
+ * `accessoryChildrenUnknown(reason)` whenever you cannot know the list right
67215
+ * now (no credentials, parent not connected, a failed or partial read) —
67216
+ * the kernel then deletes nothing. Return `accessoryChildrenComplete(list)`
67217
+ * to say "connected, and this is the complete list" explicitly. A shrink is
67218
+ * deleted only after a second agreeing complete read on a later probe (D49;
67219
+ * `packages/system/src/kernel/moleculer/accessory-prune-gate.ts`).
67220
+ *
66931
67221
  * Default: no children.
66932
67222
  */
66933
67223
  getAccessoryChildren() {
@@ -71059,7 +71349,19 @@ Object.freeze({
71059
71349
  addonId: null,
71060
71350
  access: "view"
71061
71351
  },
71062
- "logDestination.query": {
71352
+ "logDestination.cancelRead": {
71353
+ capName: "log-destination",
71354
+ capScope: "system",
71355
+ addonId: null,
71356
+ access: "create"
71357
+ },
71358
+ "logDestination.describeRead": {
71359
+ capName: "log-destination",
71360
+ capScope: "system",
71361
+ addonId: null,
71362
+ access: "view"
71363
+ },
71364
+ "logDestination.read": {
71063
71365
  capName: "log-destination",
71064
71366
  capScope: "system",
71065
71367
  addonId: null,
@@ -77066,6 +77368,11 @@ Object.freeze({
77066
77368
  form: "single",
77067
77369
  optional: false
77068
77370
  }],
77371
+ "logDestination.read": [{
77372
+ name: "deviceId",
77373
+ form: "single",
77374
+ optional: true
77375
+ }],
77069
77376
  "mediaPlayer.getStatus": [{
77070
77377
  name: "deviceId",
77071
77378
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5557,7 +5557,7 @@ var ZodIssueCode = {
5557
5557
  var ZodFirstPartyTypeKind;
5558
5558
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5559
5559
  //#endregion
5560
- //#region ../types/dist/sleep-yKL5gfrH.mjs
5560
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5561
5561
  /**
5562
5562
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5563
5563
  * window to float samples (D455).
@@ -17386,7 +17386,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
17386
17386
  kind: literal("node"),
17387
17387
  nodeId: string().min(1)
17388
17388
  })]);
17389
+ /**
17390
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
17391
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
17392
+ * meaning); a rollup keeps the time spent in each state (`states`).
17393
+ */
17389
17394
  var DeviceHistoryKindSchema = _enum([
17395
+ "gauge",
17396
+ "counter",
17397
+ "boolean",
17398
+ "enum"
17399
+ ]);
17400
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
17401
+ var DeviceHistoryProducerKindSchema = _enum([
17390
17402
  "gauge",
17391
17403
  "counter",
17392
17404
  "boolean"
@@ -17423,7 +17435,13 @@ var SeriesInfoSchema = object({
17423
17435
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
17424
17436
  unit: string().nullable(),
17425
17437
  displayName: string(),
17426
- source: _enum(["cap", "addon"]),
17438
+ source: _enum([
17439
+ "cap",
17440
+ "addon",
17441
+ "derived"
17442
+ ]),
17443
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
17444
+ values: array(string()).readonly().nullable(),
17427
17445
  firstTs: number(),
17428
17446
  lastTs: number()
17429
17447
  });
@@ -17437,17 +17455,31 @@ var QueryPointSchema = object({
17437
17455
  twMean: number().nullable(),
17438
17456
  min: number(),
17439
17457
  max: number(),
17440
- /** `null` is unknown, never zero (D393). */
17441
- last: number().nullable()
17458
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
17459
+ last: number().nullable(),
17460
+ /**
17461
+ * The increase over the point: a `counter`'s growth since the previous point
17462
+ * or bucket (a drop is a reset, counted from zero), and for
17463
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
17464
+ * every other kind, and when it cannot be known.
17465
+ */
17466
+ delta: number().nullable(),
17467
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
17468
+ state: string().nullable(),
17469
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
17470
+ states: record(string(), number()).nullable()
17442
17471
  });
17443
17472
  var QuerySeriesSchema = object({
17444
17473
  scope: string(),
17445
17474
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
17446
17475
  before: object({
17447
17476
  t: number(),
17448
- value: number().nullable()
17477
+ value: number().nullable(),
17478
+ state: string().nullable()
17449
17479
  }).nullable(),
17450
- points: array(QueryPointSchema).readonly()
17480
+ points: array(QueryPointSchema).readonly(),
17481
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
17482
+ derivedFrom: string().nullable()
17451
17483
  });
17452
17484
  /** The window part of a query, shared by the device and node forms. */
17453
17485
  var QueryWindowShape = {
@@ -17463,6 +17495,23 @@ var QueryResultSchema = object({
17463
17495
  series: array(QuerySeriesSchema).readonly(),
17464
17496
  truncated: boolean()
17465
17497
  });
17498
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
17499
+ var QueryManyItemSchema = union([object({
17500
+ deviceId: number().int(),
17501
+ key: string(),
17502
+ scope: string().optional()
17503
+ }), object({
17504
+ forNodeId: string().min(1),
17505
+ key: string(),
17506
+ scope: string().optional()
17507
+ })]);
17508
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
17509
+ ok: literal(true),
17510
+ result: QueryResultSchema
17511
+ }), object({
17512
+ ok: literal(false),
17513
+ error: string()
17514
+ })]);
17466
17515
  var TierStatusSchema = object({
17467
17516
  tier: DeviceHistoryResolutionSchema,
17468
17517
  /** `null` until the first background count answered. */
@@ -17518,16 +17567,22 @@ var DeviceHistoryStatusSchema = object({
17518
17567
  lastRefreshAt: number().nullable()
17519
17568
  })
17520
17569
  });
17521
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17570
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17522
17571
  deviceId: number().int(),
17523
17572
  ...QueryWindowShape
17524
17573
  }), QueryResultSchema), method(object({
17525
- nodeId: string().min(1),
17574
+ forNodeId: string().min(1),
17526
17575
  ...QueryWindowShape
17527
17576
  }), QueryResultSchema, { auth: "admin" }), method(object({
17577
+ items: array(QueryManyItemSchema).min(1).max(24),
17578
+ from: QueryWindowShape.from,
17579
+ to: QueryWindowShape.to,
17580
+ resolution: QueryWindowShape.resolution,
17581
+ maxPoints: QueryWindowShape.maxPoints
17582
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
17528
17583
  name: string().regex(/^[a-z0-9-]+$/),
17529
17584
  subjectKind: _enum(["device", "node"]),
17530
- kind: DeviceHistoryKindSchema,
17585
+ kind: DeviceHistoryProducerKindSchema,
17531
17586
  unit: string().optional(),
17532
17587
  displayName: string().min(1),
17533
17588
  ingest: _enum(["points", "buckets"])
@@ -40866,14 +40921,106 @@ var LogEntrySchema = object({
40866
40921
  meta: record(string(), unknown()).optional(),
40867
40922
  tags: record(string(), string()).optional()
40868
40923
  });
40869
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
40870
- scope: array(string()).optional(),
40924
+ /**
40925
+ * A history READ against one destination (D898).
40926
+ *
40927
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
40928
+ * browser applied after the limit is what made a rare device's lines
40929
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
40930
+ * minted (opaque to everyone else): a file position for the rotated files, a
40931
+ * nanosecond timestamp for Loki.
40932
+ *
40933
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
40934
+ * store answers `done: false` with the cursor it reached and the bytes it
40935
+ * scanned, and the caller decides whether to go on. That is what makes a long
40936
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
40937
+ * flight, and not asking for the next slice ends the scan.
40938
+ */
40939
+ var LogReadQuerySchema = object({
40940
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
40941
+ requestId: string().min(1).max(64).optional(),
40942
+ /** The device the line is about (`tags.deviceId`, numeric). */
40943
+ deviceId: number().int().optional(),
40944
+ /**
40945
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
40946
+ * match. Not `addonId`: a cap router reads that name as "which provider".
40947
+ */
40948
+ fromAddonId: string().min(1).max(200).optional(),
40949
+ /**
40950
+ * The emitting node: matches the agent that emitted the line, the node
40951
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
40952
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
40953
+ * name as "which node's provider".
40954
+ */
40955
+ fromNodeId: string().min(1).max(200).optional(),
40956
+ /** Any other tag, exact match (AND). */
40957
+ tags: record(string(), union([string(), number()])).optional(),
40958
+ /** Severity FLOOR: this level and above. */
40871
40959
  level: LogLevelSchema.optional(),
40872
- since: date().optional(),
40873
- until: date().optional(),
40874
- limit: number().optional(),
40875
- tags: record(string(), string()).optional()
40876
- }), array(LogEntrySchema).readonly());
40960
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
40961
+ text: string().min(1).max(200).optional(),
40962
+ /** Epoch ms, inclusive. */
40963
+ since: number().optional(),
40964
+ /** Epoch ms, inclusive. */
40965
+ until: number().optional(),
40966
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
40967
+ before: string().min(1).max(1024).optional(),
40968
+ /** Newer than this cursor (exclusive). */
40969
+ after: string().min(1).max(1024).optional(),
40970
+ limit: number().int().min(1).max(1e3).optional(),
40971
+ /** Wall-clock bound of this slice. The provider caps it. */
40972
+ budgetMs: number().int().min(50).max(1e4).optional()
40973
+ });
40974
+ var LogReadResultSchema = object({
40975
+ /** Newest first. */
40976
+ entries: array(object({
40977
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
40978
+ id: string().optional(),
40979
+ /** Epoch ms. */
40980
+ timestamp: number(),
40981
+ level: LogLevelSchema,
40982
+ scope: string().optional(),
40983
+ message: string(),
40984
+ tags: record(string(), union([string(), number()])).optional(),
40985
+ meta: record(string(), unknown()).optional()
40986
+ })),
40987
+ /** Pass as `before` for the next older page; null when nothing older exists. */
40988
+ nextBefore: string().nullable(),
40989
+ /** Pass as `after` to read what arrived since; null when unknown. */
40990
+ nextAfter: string().nullable(),
40991
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
40992
+ scannedBytes: number().int().nonnegative(),
40993
+ /**
40994
+ * True when the scan in this direction reached the end of the store.
40995
+ * False with fewer than `limit` entries means the budget ran out first —
40996
+ * call again with `nextBefore` to go on.
40997
+ */
40998
+ done: boolean(),
40999
+ /** True when `cancelRead` ended this slice early. */
41000
+ cancelled: boolean().optional()
41001
+ });
41002
+ var LogReadCapabilitiesSchema = object({
41003
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
41004
+ readable: boolean(),
41005
+ /** Why not, when `readable` is false — rendered next to the source. */
41006
+ reason: string().nullable(),
41007
+ /** Filters the provider applies itself. A false one is applied by nobody. */
41008
+ filters: object({
41009
+ deviceId: boolean(),
41010
+ addonId: boolean(),
41011
+ nodeId: boolean(),
41012
+ tags: boolean(),
41013
+ level: boolean(),
41014
+ text: boolean(),
41015
+ timeRange: boolean()
41016
+ }),
41017
+ /** How far back the store reaches, when the provider knows (days). */
41018
+ retentionDays: number().nullable()
41019
+ });
41020
+ method(LogEntrySchema, _void(), { kind: "mutation" }), optionalMethod(_void(), LogReadCapabilitiesSchema, { auth: "admin" }), optionalMethod(LogReadQuerySchema, LogReadResultSchema, { auth: "admin" }), optionalMethod(object({ requestId: string().min(1).max(64) }), object({ cancelled: boolean() }), {
41021
+ kind: "mutation",
41022
+ auth: "admin"
41023
+ });
40877
41024
  /**
40878
41025
  * `login-method` — collection cap through which auth addons contribute
40879
41026
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -42591,9 +42738,11 @@ var alarmPanelCapability = {
42591
42738
  */
42592
42739
  durability: "restored",
42593
42740
  /**
42594
- * History (D850): none — enum state; arm/disarm history belongs in the events ledger.
42741
+ * History (D850): the panel's lifecycle state as an `enum` series —
42742
+ * change-only, no floor, so an `arming -> pending -> triggered` sequence of a
42743
+ * few seconds keeps every step. Who armed it stays in the events ledger.
42595
42744
  */
42596
- history: "none",
42745
+ history: { fields: { state: { kind: "enum" } } },
42597
42746
  /** Clock fields: written, but excluded from the compare that decides
42598
42747
  * whether persisting is worth a SQLite commit. */
42599
42748
  volatileStateFields: ["lastChangedAt"]
@@ -43471,6 +43620,33 @@ var NcRuleTargetSchema = object({
43471
43620
  params: record(string(), unknown()).optional()
43472
43621
  });
43473
43622
  /**
43623
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
43624
+ *
43625
+ * Every mode starts from the same CLEAN source frame of the trigger moment
43626
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
43627
+ * to the zone that fired the rule) and renders it once at send time:
43628
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
43629
+ * colour and every OTHER track visible at that instant outlined thin, each
43630
+ * labelled with class and confidence ("dog 87%").
43631
+ * - `crop` — the subject cut out of that frame around its box at that instant.
43632
+ * - `clean` — the whole scene with nothing drawn on it.
43633
+ * - `none` — no picture.
43634
+ *
43635
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
43636
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
43637
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
43638
+ * ship a crop on one event and a boxed scene on the next depending on which
43639
+ * stored kind had landed.
43640
+ */
43641
+ var NcMediaImageSchema = _enum([
43642
+ "scene-boxes",
43643
+ "crop",
43644
+ "clean",
43645
+ "none"
43646
+ ]);
43647
+ /**
43648
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43649
+ *
43474
43650
  * Media attachment policy (P1 still-image subset).
43475
43651
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
43476
43652
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -43484,6 +43660,8 @@ var NcRuleTargetSchema = object({
43484
43660
  * - `none` — no attachment.
43485
43661
  */
43486
43662
  /**
43663
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43664
+ *
43487
43665
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
43488
43666
  * conflate it with the selection strategy and betray the request: asking for
43489
43667
  * the clean scene frame on an object-event owner used to start at
@@ -43512,16 +43690,29 @@ var NcMediaFrameSchema = _enum([
43512
43690
  */
43513
43691
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
43514
43692
  var NcMediaPolicySchema = object({
43693
+ /**
43694
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
43695
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
43696
+ * triple below, at load and at every write, and the store keeps only this.
43697
+ */
43698
+ image: NcMediaImageSchema.optional(),
43699
+ /**
43700
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
43701
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
43702
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
43703
+ * Replaces `zoneCrop`.
43704
+ */
43705
+ showTriggerZone: boolean().optional(),
43706
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43515
43707
  attach: _enum([
43516
43708
  "best",
43517
43709
  "best-matching",
43518
43710
  "keyFrame",
43519
43711
  "none"
43520
- ]).default("best"),
43521
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
43712
+ ]).optional(),
43713
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43522
43714
  frame: NcMediaFrameSchema.optional(),
43523
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
43524
- * "show me the ZONE", not the whole scene or the subject crop. */
43715
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
43525
43716
  zoneCrop: boolean().optional(),
43526
43717
  /**
43527
43718
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -43693,7 +43884,9 @@ var NcRuleInputSchema = object({
43693
43884
  * targets.
43694
43885
  */
43695
43886
  targetUsers: array(string()).optional(),
43696
- media: NcMediaPolicySchema.default({ attach: "best" }),
43887
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
43888
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
43889
+ media: NcMediaPolicySchema.default({}),
43697
43890
  throttle: NcThrottleSchema.default({
43698
43891
  cooldownSec: 60,
43699
43892
  scope: "rule-device"
@@ -44630,13 +44823,37 @@ var NcAlarmModeOpeningsSchema = object({
44630
44823
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
44631
44824
  unknown: array(number().int())
44632
44825
  });
44826
+ /**
44827
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
44828
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
44829
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
44830
+ * never looks fully armed (D62: off must never look like broken).
44831
+ */
44832
+ var NcAlarmInputBypassViewSchema = object({
44833
+ ruleId: string(),
44834
+ /** The rule's current name (its frozen name when the rule is gone). */
44835
+ ruleName: string(),
44836
+ /** The input: the sensor of the match, else its camera. */
44837
+ deviceId: number().int(),
44838
+ /** The input's current name. */
44839
+ name: string(),
44840
+ /** When it was bypassed (ms epoch). */
44841
+ since: number(),
44842
+ /** Triggers from this input dropped since. */
44843
+ dropped: number().int().min(0)
44844
+ });
44633
44845
  var NcAlarmLiveSchema = object({
44634
44846
  state: AlarmStateSchema,
44635
44847
  /** The mode being armed into (exit delay) or held; null when disarmed. */
44636
44848
  targetMode: AlarmArmModeSchema.nullable(),
44637
44849
  availableModes: array(AlarmArmModeSchema),
44638
44850
  openings: array(NcAlarmModeOpeningsSchema),
44639
- exclusions: array(NcAlarmExclusionViewSchema)
44851
+ exclusions: array(NcAlarmExclusionViewSchema),
44852
+ /**
44853
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
44854
+ * Defaulted so an older hub answer still parses (as "none known").
44855
+ */
44856
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
44640
44857
  });
44641
44858
  var NcAlarmConfigSchema = object({
44642
44859
  /**
@@ -55355,9 +55572,11 @@ var connectivityCapability = {
55355
55572
  */
55356
55573
  durability: "restored",
55357
55574
  /**
55358
- * History (D850): none — duplicates device-status.online (one authority for availability).
55575
+ * History (D850): `connected` as a boolean series — change-only, no floor. It
55576
+ * is the upstream entity's own link (a HA connectivity sensor), not the
55577
+ * device's reachability, which stays `device-status.online`.
55359
55578
  */
55360
- history: "none",
55579
+ history: { fields: { connected: { kind: "boolean" } } },
55361
55580
  /** Clock fields: written, but excluded from the compare that decides
55362
55581
  * whether persisting is worth a SQLite commit. */
55363
55582
  volatileStateFields: ["lastChangedAt"]
@@ -56181,11 +56400,22 @@ var dishwasherCapability = {
56181
56400
  },
56182
56401
  runtimeState: DishwasherStatusSchema,
56183
56402
  durability: "session",
56184
- history: { fields: { progressPercent: {
56185
- kind: "gauge",
56186
- unit: "%",
56187
- deadband: 2
56188
- } } }
56403
+ history: { fields: {
56404
+ progressPercent: {
56405
+ kind: "gauge",
56406
+ unit: "%",
56407
+ deadband: 2
56408
+ },
56409
+ state: { kind: "enum" },
56410
+ operationState: { kind: "enum" },
56411
+ remainingSeconds: {
56412
+ kind: "gauge",
56413
+ unit: "s",
56414
+ minIntervalMs: 6e4
56415
+ },
56416
+ doorOpen: { kind: "boolean" },
56417
+ powerOn: { kind: "boolean" }
56418
+ } }
56189
56419
  };
56190
56420
  var DoorbellStatusSchema = object({
56191
56421
  /** Ms epoch of the last press. null = never observed since this provider started. */
@@ -56302,9 +56532,15 @@ var enumSensorCapability = {
56302
56532
  */
56303
56533
  durability: "restored",
56304
56534
  /**
56305
- * History (D850): none — text/enum state has no history (non-goal).
56535
+ * History (D850): the value as an `enum` series (an appliance's program or
56536
+ * operation state, an HVAC action). The option set is per device, so the
56537
+ * value list is LEARNED as values are first seen (bounded). A sensor with a
56538
+ * `format` carries a timestamp, not a state, and is not recorded.
56306
56539
  */
56307
- history: "none",
56540
+ history: { fields: { value: {
56541
+ kind: "enum",
56542
+ skipWhenSet: "format"
56543
+ } } },
56308
56544
  /** Clock fields: written, but excluded from the compare that decides
56309
56545
  * whether persisting is worth a SQLite commit. */
56310
56546
  volatileStateFields: ["lastFetchedAt"]
@@ -58278,9 +58514,10 @@ var lockControlCapability = {
58278
58514
  */
58279
58515
  durability: "restored",
58280
58516
  /**
58281
- * History (D850): none — enum state; lock events belong in the events ledger.
58517
+ * History (D850): the lock's state as an `enum` series — change-only, no
58518
+ * floor: a jam or an unlock lasting seconds is the edge an operator looks for.
58282
58519
  */
58283
- history: "none",
58520
+ history: { fields: { state: { kind: "enum" } } },
58284
58521
  /** Clock fields: written, but excluded from the compare that decides
58285
58522
  * whether persisting is worth a SQLite commit. */
58286
58523
  volatileStateFields: ["lastChangedAt"]
@@ -58454,9 +58691,18 @@ var mediaPlayerCapability = {
58454
58691
  */
58455
58692
  durability: "session",
58456
58693
  /**
58457
- * History (D850): none — `positionMs` moves continuously while playing; volume is transient.
58694
+ * History (D850): volume (a level an operator or an automation sets; the
58695
+ * default 10 s floor folds a slider drag into its end value) and mute.
58696
+ * `positionMs` is not recorded: it moves continuously while playing.
58458
58697
  */
58459
- history: "none"
58698
+ history: { fields: {
58699
+ volumeLevel: {
58700
+ kind: "gauge",
58701
+ unit: "%",
58702
+ deadband: 1
58703
+ },
58704
+ isMuted: { kind: "boolean" }
58705
+ } }
58460
58706
  };
58461
58707
  /**
58462
58708
  * mesh-network — collection cap for mesh-VPN providers.
@@ -60600,9 +60846,24 @@ var NpuInfoSchema = object({
60600
60846
  name: string().optional(),
60601
60847
  generation: _enum(["xdna1", "xdna2"]).optional()
60602
60848
  });
60849
+ var CoralBusSchema = _enum(["usb", "pci"]);
60603
60850
  var CoralInfoSchema = object({
60604
60851
  type: literal("coral-edgetpu"),
60605
- bus: string().optional()
60852
+ /** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
60853
+ bus: string().optional(),
60854
+ /** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
60855
+ count: number().int().nonnegative().optional(),
60856
+ /** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
60857
+ units: array(object({
60858
+ bus: CoralBusSchema,
60859
+ count: number().int().nonnegative()
60860
+ })).readonly().optional(),
60861
+ /** Present-but-unusable units, each with its typed reason (never "absent"). */
60862
+ unavailable: array(object({
60863
+ bus: CoralBusSchema,
60864
+ count: number().int().nonnegative(),
60865
+ reason: _enum(["driver-missing", "device-not-accessible"])
60866
+ })).readonly().optional()
60606
60867
  });
60607
60868
  var HardwareInfoSchema = object({
60608
60869
  platform: HardwarePlatformSchema,
@@ -63749,9 +64010,29 @@ var streamParamsCapability = {
63749
64010
  */
63750
64011
  durability: "restored",
63751
64012
  /**
63752
- * History (D850): none — encoder configuration.
64013
+ * History (D850): the configured bitrate and frame rate of the main and sub
64014
+ * profiles. Configuration, so change-only on the default floor: a point is an
64015
+ * operator's (or a tuner's) edit, which is exactly what a chart of a stream's
64016
+ * quality over time must show.
63753
64017
  */
63754
- history: "none",
64018
+ history: { fields: {
64019
+ "main.bitrate": {
64020
+ kind: "gauge",
64021
+ unit: "kbps"
64022
+ },
64023
+ "main.framerate": {
64024
+ kind: "gauge",
64025
+ unit: "fps"
64026
+ },
64027
+ "sub.bitrate": {
64028
+ kind: "gauge",
64029
+ unit: "kbps"
64030
+ },
64031
+ "sub.framerate": {
64032
+ kind: "gauge",
64033
+ unit: "fps"
64034
+ }
64035
+ } },
63755
64036
  /** Clock fields: written, but excluded from the compare that decides
63756
64037
  * whether persisting is worth a SQLite commit. */
63757
64038
  volatileStateFields: ["lastFetchedAt"]
@@ -66929,6 +67210,15 @@ var BaseDevice = class {
66929
67210
  * Drivers can use the `getProbeFlags()` helper to read the flag bag
66930
67211
  * with a typed cast.
66931
67212
  *
67213
+ * Answer what you KNOW. A plain array is read as the complete list only
67214
+ * while this device is `online` and probed; return
67215
+ * `accessoryChildrenUnknown(reason)` whenever you cannot know the list right
67216
+ * now (no credentials, parent not connected, a failed or partial read) —
67217
+ * the kernel then deletes nothing. Return `accessoryChildrenComplete(list)`
67218
+ * to say "connected, and this is the complete list" explicitly. A shrink is
67219
+ * deleted only after a second agreeing complete read on a later probe (D49;
67220
+ * `packages/system/src/kernel/moleculer/accessory-prune-gate.ts`).
67221
+ *
66932
67222
  * Default: no children.
66933
67223
  */
66934
67224
  getAccessoryChildren() {
@@ -71060,7 +71350,19 @@ Object.freeze({
71060
71350
  addonId: null,
71061
71351
  access: "view"
71062
71352
  },
71063
- "logDestination.query": {
71353
+ "logDestination.cancelRead": {
71354
+ capName: "log-destination",
71355
+ capScope: "system",
71356
+ addonId: null,
71357
+ access: "create"
71358
+ },
71359
+ "logDestination.describeRead": {
71360
+ capName: "log-destination",
71361
+ capScope: "system",
71362
+ addonId: null,
71363
+ access: "view"
71364
+ },
71365
+ "logDestination.read": {
71064
71366
  capName: "log-destination",
71065
71367
  capScope: "system",
71066
71368
  addonId: null,
@@ -77067,6 +77369,11 @@ Object.freeze({
77067
77369
  form: "single",
77068
77370
  optional: false
77069
77371
  }],
77372
+ "logDestination.read": [{
77373
+ name: "deviceId",
77374
+ form: "single",
77375
+ optional: true
77376
+ }],
77070
77377
  "mediaPlayer.getStatus": [{
77071
77378
  name: "deviceId",
77072
77379
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homematic",
3
- "version": "1.2.141",
3
+ "version": "1.2.143",
4
4
  "description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
5
5
  "keywords": [
6
6
  "camstack",