@camstack/addon-provider-reolink 1.2.192 → 1.2.194

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
@@ -5451,7 +5451,7 @@ var ZodIssueCode = {
5451
5451
  var ZodFirstPartyTypeKind;
5452
5452
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5453
5453
  //#endregion
5454
- //#region ../types/dist/sleep-yKL5gfrH.mjs
5454
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5455
5455
  /**
5456
5456
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5457
5457
  * window to float samples (D455).
@@ -17649,7 +17649,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
17649
17649
  kind: literal("node"),
17650
17650
  nodeId: string().min(1)
17651
17651
  })]);
17652
+ /**
17653
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
17654
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
17655
+ * meaning); a rollup keeps the time spent in each state (`states`).
17656
+ */
17652
17657
  var DeviceHistoryKindSchema = _enum([
17658
+ "gauge",
17659
+ "counter",
17660
+ "boolean",
17661
+ "enum"
17662
+ ]);
17663
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
17664
+ var DeviceHistoryProducerKindSchema = _enum([
17653
17665
  "gauge",
17654
17666
  "counter",
17655
17667
  "boolean"
@@ -17686,7 +17698,13 @@ var SeriesInfoSchema = object({
17686
17698
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
17687
17699
  unit: string().nullable(),
17688
17700
  displayName: string(),
17689
- source: _enum(["cap", "addon"]),
17701
+ source: _enum([
17702
+ "cap",
17703
+ "addon",
17704
+ "derived"
17705
+ ]),
17706
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
17707
+ values: array(string()).readonly().nullable(),
17690
17708
  firstTs: number(),
17691
17709
  lastTs: number()
17692
17710
  });
@@ -17700,17 +17718,31 @@ var QueryPointSchema = object({
17700
17718
  twMean: number().nullable(),
17701
17719
  min: number(),
17702
17720
  max: number(),
17703
- /** `null` is unknown, never zero (D393). */
17704
- last: number().nullable()
17721
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
17722
+ last: number().nullable(),
17723
+ /**
17724
+ * The increase over the point: a `counter`'s growth since the previous point
17725
+ * or bucket (a drop is a reset, counted from zero), and for
17726
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
17727
+ * every other kind, and when it cannot be known.
17728
+ */
17729
+ delta: number().nullable(),
17730
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
17731
+ state: string().nullable(),
17732
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
17733
+ states: record(string(), number()).nullable()
17705
17734
  });
17706
17735
  var QuerySeriesSchema = object({
17707
17736
  scope: string(),
17708
17737
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
17709
17738
  before: object({
17710
17739
  t: number(),
17711
- value: number().nullable()
17740
+ value: number().nullable(),
17741
+ state: string().nullable()
17712
17742
  }).nullable(),
17713
- points: array(QueryPointSchema).readonly()
17743
+ points: array(QueryPointSchema).readonly(),
17744
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
17745
+ derivedFrom: string().nullable()
17714
17746
  });
17715
17747
  /** The window part of a query, shared by the device and node forms. */
17716
17748
  var QueryWindowShape = {
@@ -17726,6 +17758,23 @@ var QueryResultSchema = object({
17726
17758
  series: array(QuerySeriesSchema).readonly(),
17727
17759
  truncated: boolean()
17728
17760
  });
17761
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
17762
+ var QueryManyItemSchema = union([object({
17763
+ deviceId: number().int(),
17764
+ key: string(),
17765
+ scope: string().optional()
17766
+ }), object({
17767
+ forNodeId: string().min(1),
17768
+ key: string(),
17769
+ scope: string().optional()
17770
+ })]);
17771
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
17772
+ ok: literal(true),
17773
+ result: QueryResultSchema
17774
+ }), object({
17775
+ ok: literal(false),
17776
+ error: string()
17777
+ })]);
17729
17778
  var TierStatusSchema = object({
17730
17779
  tier: DeviceHistoryResolutionSchema,
17731
17780
  /** `null` until the first background count answered. */
@@ -17781,16 +17830,22 @@ var DeviceHistoryStatusSchema = object({
17781
17830
  lastRefreshAt: number().nullable()
17782
17831
  })
17783
17832
  });
17784
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17833
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17785
17834
  deviceId: number().int(),
17786
17835
  ...QueryWindowShape
17787
17836
  }), QueryResultSchema), method(object({
17788
- nodeId: string().min(1),
17837
+ forNodeId: string().min(1),
17789
17838
  ...QueryWindowShape
17790
17839
  }), QueryResultSchema, { auth: "admin" }), method(object({
17840
+ items: array(QueryManyItemSchema).min(1).max(24),
17841
+ from: QueryWindowShape.from,
17842
+ to: QueryWindowShape.to,
17843
+ resolution: QueryWindowShape.resolution,
17844
+ maxPoints: QueryWindowShape.maxPoints
17845
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
17791
17846
  name: string().regex(/^[a-z0-9-]+$/),
17792
17847
  subjectKind: _enum(["device", "node"]),
17793
- kind: DeviceHistoryKindSchema,
17848
+ kind: DeviceHistoryProducerKindSchema,
17794
17849
  unit: string().optional(),
17795
17850
  displayName: string().min(1),
17796
17851
  ingest: _enum(["points", "buckets"])
@@ -41152,14 +41207,106 @@ var LogEntrySchema = object({
41152
41207
  meta: record(string(), unknown()).optional(),
41153
41208
  tags: record(string(), string()).optional()
41154
41209
  });
41155
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
41156
- scope: array(string()).optional(),
41210
+ /**
41211
+ * A history READ against one destination (D898).
41212
+ *
41213
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
41214
+ * browser applied after the limit is what made a rare device's lines
41215
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
41216
+ * minted (opaque to everyone else): a file position for the rotated files, a
41217
+ * nanosecond timestamp for Loki.
41218
+ *
41219
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
41220
+ * store answers `done: false` with the cursor it reached and the bytes it
41221
+ * scanned, and the caller decides whether to go on. That is what makes a long
41222
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
41223
+ * flight, and not asking for the next slice ends the scan.
41224
+ */
41225
+ var LogReadQuerySchema = object({
41226
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
41227
+ requestId: string().min(1).max(64).optional(),
41228
+ /** The device the line is about (`tags.deviceId`, numeric). */
41229
+ deviceId: number().int().optional(),
41230
+ /**
41231
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
41232
+ * match. Not `addonId`: a cap router reads that name as "which provider".
41233
+ */
41234
+ fromAddonId: string().min(1).max(200).optional(),
41235
+ /**
41236
+ * The emitting node: matches the agent that emitted the line, the node
41237
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
41238
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
41239
+ * name as "which node's provider".
41240
+ */
41241
+ fromNodeId: string().min(1).max(200).optional(),
41242
+ /** Any other tag, exact match (AND). */
41243
+ tags: record(string(), union([string(), number()])).optional(),
41244
+ /** Severity FLOOR: this level and above. */
41157
41245
  level: LogLevelSchema.optional(),
41158
- since: date().optional(),
41159
- until: date().optional(),
41160
- limit: number().optional(),
41161
- tags: record(string(), string()).optional()
41162
- }), array(LogEntrySchema).readonly());
41246
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
41247
+ text: string().min(1).max(200).optional(),
41248
+ /** Epoch ms, inclusive. */
41249
+ since: number().optional(),
41250
+ /** Epoch ms, inclusive. */
41251
+ until: number().optional(),
41252
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
41253
+ before: string().min(1).max(1024).optional(),
41254
+ /** Newer than this cursor (exclusive). */
41255
+ after: string().min(1).max(1024).optional(),
41256
+ limit: number().int().min(1).max(1e3).optional(),
41257
+ /** Wall-clock bound of this slice. The provider caps it. */
41258
+ budgetMs: number().int().min(50).max(1e4).optional()
41259
+ });
41260
+ var LogReadResultSchema = object({
41261
+ /** Newest first. */
41262
+ entries: array(object({
41263
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
41264
+ id: string().optional(),
41265
+ /** Epoch ms. */
41266
+ timestamp: number(),
41267
+ level: LogLevelSchema,
41268
+ scope: string().optional(),
41269
+ message: string(),
41270
+ tags: record(string(), union([string(), number()])).optional(),
41271
+ meta: record(string(), unknown()).optional()
41272
+ })),
41273
+ /** Pass as `before` for the next older page; null when nothing older exists. */
41274
+ nextBefore: string().nullable(),
41275
+ /** Pass as `after` to read what arrived since; null when unknown. */
41276
+ nextAfter: string().nullable(),
41277
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
41278
+ scannedBytes: number().int().nonnegative(),
41279
+ /**
41280
+ * True when the scan in this direction reached the end of the store.
41281
+ * False with fewer than `limit` entries means the budget ran out first —
41282
+ * call again with `nextBefore` to go on.
41283
+ */
41284
+ done: boolean(),
41285
+ /** True when `cancelRead` ended this slice early. */
41286
+ cancelled: boolean().optional()
41287
+ });
41288
+ var LogReadCapabilitiesSchema = object({
41289
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
41290
+ readable: boolean(),
41291
+ /** Why not, when `readable` is false — rendered next to the source. */
41292
+ reason: string().nullable(),
41293
+ /** Filters the provider applies itself. A false one is applied by nobody. */
41294
+ filters: object({
41295
+ deviceId: boolean(),
41296
+ addonId: boolean(),
41297
+ nodeId: boolean(),
41298
+ tags: boolean(),
41299
+ level: boolean(),
41300
+ text: boolean(),
41301
+ timeRange: boolean()
41302
+ }),
41303
+ /** How far back the store reaches, when the provider knows (days). */
41304
+ retentionDays: number().nullable()
41305
+ });
41306
+ 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() }), {
41307
+ kind: "mutation",
41308
+ auth: "admin"
41309
+ });
41163
41310
  /**
41164
41311
  * `login-method` — collection cap through which auth addons contribute
41165
41312
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -42877,9 +43024,11 @@ var alarmPanelCapability = {
42877
43024
  */
42878
43025
  durability: "restored",
42879
43026
  /**
42880
- * History (D850): none — enum state; arm/disarm history belongs in the events ledger.
43027
+ * History (D850): the panel's lifecycle state as an `enum` series —
43028
+ * change-only, no floor, so an `arming -> pending -> triggered` sequence of a
43029
+ * few seconds keeps every step. Who armed it stays in the events ledger.
42881
43030
  */
42882
- history: "none",
43031
+ history: { fields: { state: { kind: "enum" } } },
42883
43032
  /** Clock fields: written, but excluded from the compare that decides
42884
43033
  * whether persisting is worth a SQLite commit. */
42885
43034
  volatileStateFields: ["lastChangedAt"]
@@ -43757,6 +43906,33 @@ var NcRuleTargetSchema = object({
43757
43906
  params: record(string(), unknown()).optional()
43758
43907
  });
43759
43908
  /**
43909
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
43910
+ *
43911
+ * Every mode starts from the same CLEAN source frame of the trigger moment
43912
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
43913
+ * to the zone that fired the rule) and renders it once at send time:
43914
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
43915
+ * colour and every OTHER track visible at that instant outlined thin, each
43916
+ * labelled with class and confidence ("dog 87%").
43917
+ * - `crop` — the subject cut out of that frame around its box at that instant.
43918
+ * - `clean` — the whole scene with nothing drawn on it.
43919
+ * - `none` — no picture.
43920
+ *
43921
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
43922
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
43923
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
43924
+ * ship a crop on one event and a boxed scene on the next depending on which
43925
+ * stored kind had landed.
43926
+ */
43927
+ var NcMediaImageSchema = _enum([
43928
+ "scene-boxes",
43929
+ "crop",
43930
+ "clean",
43931
+ "none"
43932
+ ]);
43933
+ /**
43934
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43935
+ *
43760
43936
  * Media attachment policy (P1 still-image subset).
43761
43937
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
43762
43938
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -43770,6 +43946,8 @@ var NcRuleTargetSchema = object({
43770
43946
  * - `none` — no attachment.
43771
43947
  */
43772
43948
  /**
43949
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43950
+ *
43773
43951
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
43774
43952
  * conflate it with the selection strategy and betray the request: asking for
43775
43953
  * the clean scene frame on an object-event owner used to start at
@@ -43798,16 +43976,29 @@ var NcMediaFrameSchema = _enum([
43798
43976
  */
43799
43977
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
43800
43978
  var NcMediaPolicySchema = object({
43979
+ /**
43980
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
43981
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
43982
+ * triple below, at load and at every write, and the store keeps only this.
43983
+ */
43984
+ image: NcMediaImageSchema.optional(),
43985
+ /**
43986
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
43987
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
43988
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
43989
+ * Replaces `zoneCrop`.
43990
+ */
43991
+ showTriggerZone: boolean().optional(),
43992
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43801
43993
  attach: _enum([
43802
43994
  "best",
43803
43995
  "best-matching",
43804
43996
  "keyFrame",
43805
43997
  "none"
43806
- ]).default("best"),
43807
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
43998
+ ]).optional(),
43999
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43808
44000
  frame: NcMediaFrameSchema.optional(),
43809
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
43810
- * "show me the ZONE", not the whole scene or the subject crop. */
44001
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
43811
44002
  zoneCrop: boolean().optional(),
43812
44003
  /**
43813
44004
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -43979,7 +44170,9 @@ var NcRuleInputSchema = object({
43979
44170
  * targets.
43980
44171
  */
43981
44172
  targetUsers: array(string()).optional(),
43982
- media: NcMediaPolicySchema.default({ attach: "best" }),
44173
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
44174
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
44175
+ media: NcMediaPolicySchema.default({}),
43983
44176
  throttle: NcThrottleSchema.default({
43984
44177
  cooldownSec: 60,
43985
44178
  scope: "rule-device"
@@ -44916,13 +45109,37 @@ var NcAlarmModeOpeningsSchema = object({
44916
45109
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
44917
45110
  unknown: array(number().int())
44918
45111
  });
45112
+ /**
45113
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
45114
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
45115
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
45116
+ * never looks fully armed (D62: off must never look like broken).
45117
+ */
45118
+ var NcAlarmInputBypassViewSchema = object({
45119
+ ruleId: string(),
45120
+ /** The rule's current name (its frozen name when the rule is gone). */
45121
+ ruleName: string(),
45122
+ /** The input: the sensor of the match, else its camera. */
45123
+ deviceId: number().int(),
45124
+ /** The input's current name. */
45125
+ name: string(),
45126
+ /** When it was bypassed (ms epoch). */
45127
+ since: number(),
45128
+ /** Triggers from this input dropped since. */
45129
+ dropped: number().int().min(0)
45130
+ });
44919
45131
  var NcAlarmLiveSchema = object({
44920
45132
  state: AlarmStateSchema,
44921
45133
  /** The mode being armed into (exit delay) or held; null when disarmed. */
44922
45134
  targetMode: AlarmArmModeSchema.nullable(),
44923
45135
  availableModes: array(AlarmArmModeSchema),
44924
45136
  openings: array(NcAlarmModeOpeningsSchema),
44925
- exclusions: array(NcAlarmExclusionViewSchema)
45137
+ exclusions: array(NcAlarmExclusionViewSchema),
45138
+ /**
45139
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
45140
+ * Defaulted so an older hub answer still parses (as "none known").
45141
+ */
45142
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
44926
45143
  });
44927
45144
  var NcAlarmConfigSchema = object({
44928
45145
  /**
@@ -56163,9 +56380,11 @@ var connectivityCapability = {
56163
56380
  */
56164
56381
  durability: "restored",
56165
56382
  /**
56166
- * History (D850): none — duplicates device-status.online (one authority for availability).
56383
+ * History (D850): `connected` as a boolean series — change-only, no floor. It
56384
+ * is the upstream entity's own link (a HA connectivity sensor), not the
56385
+ * device's reachability, which stays `device-status.online`.
56167
56386
  */
56168
- history: "none",
56387
+ history: { fields: { connected: { kind: "boolean" } } },
56169
56388
  /** Clock fields: written, but excluded from the compare that decides
56170
56389
  * whether persisting is worth a SQLite commit. */
56171
56390
  volatileStateFields: ["lastChangedAt"]
@@ -56989,11 +57208,22 @@ var dishwasherCapability = {
56989
57208
  },
56990
57209
  runtimeState: DishwasherStatusSchema,
56991
57210
  durability: "session",
56992
- history: { fields: { progressPercent: {
56993
- kind: "gauge",
56994
- unit: "%",
56995
- deadband: 2
56996
- } } }
57211
+ history: { fields: {
57212
+ progressPercent: {
57213
+ kind: "gauge",
57214
+ unit: "%",
57215
+ deadband: 2
57216
+ },
57217
+ state: { kind: "enum" },
57218
+ operationState: { kind: "enum" },
57219
+ remainingSeconds: {
57220
+ kind: "gauge",
57221
+ unit: "s",
57222
+ minIntervalMs: 6e4
57223
+ },
57224
+ doorOpen: { kind: "boolean" },
57225
+ powerOn: { kind: "boolean" }
57226
+ } }
56997
57227
  };
56998
57228
  var DoorbellStatusSchema = object({
56999
57229
  /** Ms epoch of the last press. null = never observed since this provider started. */
@@ -57110,9 +57340,15 @@ var enumSensorCapability = {
57110
57340
  */
57111
57341
  durability: "restored",
57112
57342
  /**
57113
- * History (D850): none — text/enum state has no history (non-goal).
57343
+ * History (D850): the value as an `enum` series (an appliance's program or
57344
+ * operation state, an HVAC action). The option set is per device, so the
57345
+ * value list is LEARNED as values are first seen (bounded). A sensor with a
57346
+ * `format` carries a timestamp, not a state, and is not recorded.
57114
57347
  */
57115
- history: "none",
57348
+ history: { fields: { value: {
57349
+ kind: "enum",
57350
+ skipWhenSet: "format"
57351
+ } } },
57116
57352
  /** Clock fields: written, but excluded from the compare that decides
57117
57353
  * whether persisting is worth a SQLite commit. */
57118
57354
  volatileStateFields: ["lastFetchedAt"]
@@ -59086,9 +59322,10 @@ var lockControlCapability = {
59086
59322
  */
59087
59323
  durability: "restored",
59088
59324
  /**
59089
- * History (D850): none — enum state; lock events belong in the events ledger.
59325
+ * History (D850): the lock's state as an `enum` series — change-only, no
59326
+ * floor: a jam or an unlock lasting seconds is the edge an operator looks for.
59090
59327
  */
59091
- history: "none",
59328
+ history: { fields: { state: { kind: "enum" } } },
59092
59329
  /** Clock fields: written, but excluded from the compare that decides
59093
59330
  * whether persisting is worth a SQLite commit. */
59094
59331
  volatileStateFields: ["lastChangedAt"]
@@ -59262,9 +59499,18 @@ var mediaPlayerCapability = {
59262
59499
  */
59263
59500
  durability: "session",
59264
59501
  /**
59265
- * History (D850): none — `positionMs` moves continuously while playing; volume is transient.
59502
+ * History (D850): volume (a level an operator or an automation sets; the
59503
+ * default 10 s floor folds a slider drag into its end value) and mute.
59504
+ * `positionMs` is not recorded: it moves continuously while playing.
59266
59505
  */
59267
- history: "none"
59506
+ history: { fields: {
59507
+ volumeLevel: {
59508
+ kind: "gauge",
59509
+ unit: "%",
59510
+ deadband: 1
59511
+ },
59512
+ isMuted: { kind: "boolean" }
59513
+ } }
59268
59514
  };
59269
59515
  /**
59270
59516
  * mesh-network — collection cap for mesh-VPN providers.
@@ -61474,9 +61720,24 @@ var NpuInfoSchema = object({
61474
61720
  name: string().optional(),
61475
61721
  generation: _enum(["xdna1", "xdna2"]).optional()
61476
61722
  });
61723
+ var CoralBusSchema = _enum(["usb", "pci"]);
61477
61724
  var CoralInfoSchema = object({
61478
61725
  type: literal("coral-edgetpu"),
61479
- bus: string().optional()
61726
+ /** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
61727
+ bus: string().optional(),
61728
+ /** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
61729
+ count: number().int().nonnegative().optional(),
61730
+ /** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
61731
+ units: array(object({
61732
+ bus: CoralBusSchema,
61733
+ count: number().int().nonnegative()
61734
+ })).readonly().optional(),
61735
+ /** Present-but-unusable units, each with its typed reason (never "absent"). */
61736
+ unavailable: array(object({
61737
+ bus: CoralBusSchema,
61738
+ count: number().int().nonnegative(),
61739
+ reason: _enum(["driver-missing", "device-not-accessible"])
61740
+ })).readonly().optional()
61480
61741
  });
61481
61742
  var HardwareInfoSchema = object({
61482
61743
  platform: HardwarePlatformSchema,
@@ -64929,9 +65190,29 @@ var streamParamsCapability = {
64929
65190
  */
64930
65191
  durability: "restored",
64931
65192
  /**
64932
- * History (D850): none — encoder configuration.
65193
+ * History (D850): the configured bitrate and frame rate of the main and sub
65194
+ * profiles. Configuration, so change-only on the default floor: a point is an
65195
+ * operator's (or a tuner's) edit, which is exactly what a chart of a stream's
65196
+ * quality over time must show.
64933
65197
  */
64934
- history: "none",
65198
+ history: { fields: {
65199
+ "main.bitrate": {
65200
+ kind: "gauge",
65201
+ unit: "kbps"
65202
+ },
65203
+ "main.framerate": {
65204
+ kind: "gauge",
65205
+ unit: "fps"
65206
+ },
65207
+ "sub.bitrate": {
65208
+ kind: "gauge",
65209
+ unit: "kbps"
65210
+ },
65211
+ "sub.framerate": {
65212
+ kind: "gauge",
65213
+ unit: "fps"
65214
+ }
65215
+ } },
64935
65216
  /** Clock fields: written, but excluded from the compare that decides
64936
65217
  * whether persisting is worth a SQLite commit. */
64937
65218
  volatileStateFields: ["lastFetchedAt"]
@@ -68322,6 +68603,15 @@ var BaseDevice = class {
68322
68603
  * Drivers can use the `getProbeFlags()` helper to read the flag bag
68323
68604
  * with a typed cast.
68324
68605
  *
68606
+ * Answer what you KNOW. A plain array is read as the complete list only
68607
+ * while this device is `online` and probed; return
68608
+ * `accessoryChildrenUnknown(reason)` whenever you cannot know the list right
68609
+ * now (no credentials, parent not connected, a failed or partial read) —
68610
+ * the kernel then deletes nothing. Return `accessoryChildrenComplete(list)`
68611
+ * to say "connected, and this is the complete list" explicitly. A shrink is
68612
+ * deleted only after a second agreeing complete read on a later probe (D49;
68613
+ * `packages/system/src/kernel/moleculer/accessory-prune-gate.ts`).
68614
+ *
68325
68615
  * Default: no children.
68326
68616
  */
68327
68617
  getAccessoryChildren() {
@@ -72453,7 +72743,19 @@ Object.freeze({
72453
72743
  addonId: null,
72454
72744
  access: "view"
72455
72745
  },
72456
- "logDestination.query": {
72746
+ "logDestination.cancelRead": {
72747
+ capName: "log-destination",
72748
+ capScope: "system",
72749
+ addonId: null,
72750
+ access: "create"
72751
+ },
72752
+ "logDestination.describeRead": {
72753
+ capName: "log-destination",
72754
+ capScope: "system",
72755
+ addonId: null,
72756
+ access: "view"
72757
+ },
72758
+ "logDestination.read": {
72457
72759
  capName: "log-destination",
72458
72760
  capScope: "system",
72459
72761
  addonId: null,
@@ -78612,6 +78914,11 @@ Object.freeze({
78612
78914
  form: "single",
78613
78915
  optional: false
78614
78916
  }],
78917
+ "logDestination.read": [{
78918
+ name: "deviceId",
78919
+ form: "single",
78920
+ optional: true
78921
+ }],
78615
78922
  "mediaPlayer.getStatus": [{
78616
78923
  name: "deviceId",
78617
78924
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5443,7 +5443,7 @@ var ZodIssueCode = {
5443
5443
  var ZodFirstPartyTypeKind;
5444
5444
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5445
5445
  //#endregion
5446
- //#region ../types/dist/sleep-yKL5gfrH.mjs
5446
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5447
5447
  /**
5448
5448
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5449
5449
  * window to float samples (D455).
@@ -17641,7 +17641,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
17641
17641
  kind: literal("node"),
17642
17642
  nodeId: string().min(1)
17643
17643
  })]);
17644
+ /**
17645
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
17646
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
17647
+ * meaning); a rollup keeps the time spent in each state (`states`).
17648
+ */
17644
17649
  var DeviceHistoryKindSchema = _enum([
17650
+ "gauge",
17651
+ "counter",
17652
+ "boolean",
17653
+ "enum"
17654
+ ]);
17655
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
17656
+ var DeviceHistoryProducerKindSchema = _enum([
17645
17657
  "gauge",
17646
17658
  "counter",
17647
17659
  "boolean"
@@ -17678,7 +17690,13 @@ var SeriesInfoSchema = object({
17678
17690
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
17679
17691
  unit: string().nullable(),
17680
17692
  displayName: string(),
17681
- source: _enum(["cap", "addon"]),
17693
+ source: _enum([
17694
+ "cap",
17695
+ "addon",
17696
+ "derived"
17697
+ ]),
17698
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
17699
+ values: array(string()).readonly().nullable(),
17682
17700
  firstTs: number(),
17683
17701
  lastTs: number()
17684
17702
  });
@@ -17692,17 +17710,31 @@ var QueryPointSchema = object({
17692
17710
  twMean: number().nullable(),
17693
17711
  min: number(),
17694
17712
  max: number(),
17695
- /** `null` is unknown, never zero (D393). */
17696
- last: number().nullable()
17713
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
17714
+ last: number().nullable(),
17715
+ /**
17716
+ * The increase over the point: a `counter`'s growth since the previous point
17717
+ * or bucket (a drop is a reset, counted from zero), and for
17718
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
17719
+ * every other kind, and when it cannot be known.
17720
+ */
17721
+ delta: number().nullable(),
17722
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
17723
+ state: string().nullable(),
17724
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
17725
+ states: record(string(), number()).nullable()
17697
17726
  });
17698
17727
  var QuerySeriesSchema = object({
17699
17728
  scope: string(),
17700
17729
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
17701
17730
  before: object({
17702
17731
  t: number(),
17703
- value: number().nullable()
17732
+ value: number().nullable(),
17733
+ state: string().nullable()
17704
17734
  }).nullable(),
17705
- points: array(QueryPointSchema).readonly()
17735
+ points: array(QueryPointSchema).readonly(),
17736
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
17737
+ derivedFrom: string().nullable()
17706
17738
  });
17707
17739
  /** The window part of a query, shared by the device and node forms. */
17708
17740
  var QueryWindowShape = {
@@ -17718,6 +17750,23 @@ var QueryResultSchema = object({
17718
17750
  series: array(QuerySeriesSchema).readonly(),
17719
17751
  truncated: boolean()
17720
17752
  });
17753
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
17754
+ var QueryManyItemSchema = union([object({
17755
+ deviceId: number().int(),
17756
+ key: string(),
17757
+ scope: string().optional()
17758
+ }), object({
17759
+ forNodeId: string().min(1),
17760
+ key: string(),
17761
+ scope: string().optional()
17762
+ })]);
17763
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
17764
+ ok: literal(true),
17765
+ result: QueryResultSchema
17766
+ }), object({
17767
+ ok: literal(false),
17768
+ error: string()
17769
+ })]);
17721
17770
  var TierStatusSchema = object({
17722
17771
  tier: DeviceHistoryResolutionSchema,
17723
17772
  /** `null` until the first background count answered. */
@@ -17773,16 +17822,22 @@ var DeviceHistoryStatusSchema = object({
17773
17822
  lastRefreshAt: number().nullable()
17774
17823
  })
17775
17824
  });
17776
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17825
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17777
17826
  deviceId: number().int(),
17778
17827
  ...QueryWindowShape
17779
17828
  }), QueryResultSchema), method(object({
17780
- nodeId: string().min(1),
17829
+ forNodeId: string().min(1),
17781
17830
  ...QueryWindowShape
17782
17831
  }), QueryResultSchema, { auth: "admin" }), method(object({
17832
+ items: array(QueryManyItemSchema).min(1).max(24),
17833
+ from: QueryWindowShape.from,
17834
+ to: QueryWindowShape.to,
17835
+ resolution: QueryWindowShape.resolution,
17836
+ maxPoints: QueryWindowShape.maxPoints
17837
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
17783
17838
  name: string().regex(/^[a-z0-9-]+$/),
17784
17839
  subjectKind: _enum(["device", "node"]),
17785
- kind: DeviceHistoryKindSchema,
17840
+ kind: DeviceHistoryProducerKindSchema,
17786
17841
  unit: string().optional(),
17787
17842
  displayName: string().min(1),
17788
17843
  ingest: _enum(["points", "buckets"])
@@ -41144,14 +41199,106 @@ var LogEntrySchema = object({
41144
41199
  meta: record(string(), unknown()).optional(),
41145
41200
  tags: record(string(), string()).optional()
41146
41201
  });
41147
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
41148
- scope: array(string()).optional(),
41202
+ /**
41203
+ * A history READ against one destination (D898).
41204
+ *
41205
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
41206
+ * browser applied after the limit is what made a rare device's lines
41207
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
41208
+ * minted (opaque to everyone else): a file position for the rotated files, a
41209
+ * nanosecond timestamp for Loki.
41210
+ *
41211
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
41212
+ * store answers `done: false` with the cursor it reached and the bytes it
41213
+ * scanned, and the caller decides whether to go on. That is what makes a long
41214
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
41215
+ * flight, and not asking for the next slice ends the scan.
41216
+ */
41217
+ var LogReadQuerySchema = object({
41218
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
41219
+ requestId: string().min(1).max(64).optional(),
41220
+ /** The device the line is about (`tags.deviceId`, numeric). */
41221
+ deviceId: number().int().optional(),
41222
+ /**
41223
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
41224
+ * match. Not `addonId`: a cap router reads that name as "which provider".
41225
+ */
41226
+ fromAddonId: string().min(1).max(200).optional(),
41227
+ /**
41228
+ * The emitting node: matches the agent that emitted the line, the node
41229
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
41230
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
41231
+ * name as "which node's provider".
41232
+ */
41233
+ fromNodeId: string().min(1).max(200).optional(),
41234
+ /** Any other tag, exact match (AND). */
41235
+ tags: record(string(), union([string(), number()])).optional(),
41236
+ /** Severity FLOOR: this level and above. */
41149
41237
  level: LogLevelSchema.optional(),
41150
- since: date().optional(),
41151
- until: date().optional(),
41152
- limit: number().optional(),
41153
- tags: record(string(), string()).optional()
41154
- }), array(LogEntrySchema).readonly());
41238
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
41239
+ text: string().min(1).max(200).optional(),
41240
+ /** Epoch ms, inclusive. */
41241
+ since: number().optional(),
41242
+ /** Epoch ms, inclusive. */
41243
+ until: number().optional(),
41244
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
41245
+ before: string().min(1).max(1024).optional(),
41246
+ /** Newer than this cursor (exclusive). */
41247
+ after: string().min(1).max(1024).optional(),
41248
+ limit: number().int().min(1).max(1e3).optional(),
41249
+ /** Wall-clock bound of this slice. The provider caps it. */
41250
+ budgetMs: number().int().min(50).max(1e4).optional()
41251
+ });
41252
+ var LogReadResultSchema = object({
41253
+ /** Newest first. */
41254
+ entries: array(object({
41255
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
41256
+ id: string().optional(),
41257
+ /** Epoch ms. */
41258
+ timestamp: number(),
41259
+ level: LogLevelSchema,
41260
+ scope: string().optional(),
41261
+ message: string(),
41262
+ tags: record(string(), union([string(), number()])).optional(),
41263
+ meta: record(string(), unknown()).optional()
41264
+ })),
41265
+ /** Pass as `before` for the next older page; null when nothing older exists. */
41266
+ nextBefore: string().nullable(),
41267
+ /** Pass as `after` to read what arrived since; null when unknown. */
41268
+ nextAfter: string().nullable(),
41269
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
41270
+ scannedBytes: number().int().nonnegative(),
41271
+ /**
41272
+ * True when the scan in this direction reached the end of the store.
41273
+ * False with fewer than `limit` entries means the budget ran out first —
41274
+ * call again with `nextBefore` to go on.
41275
+ */
41276
+ done: boolean(),
41277
+ /** True when `cancelRead` ended this slice early. */
41278
+ cancelled: boolean().optional()
41279
+ });
41280
+ var LogReadCapabilitiesSchema = object({
41281
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
41282
+ readable: boolean(),
41283
+ /** Why not, when `readable` is false — rendered next to the source. */
41284
+ reason: string().nullable(),
41285
+ /** Filters the provider applies itself. A false one is applied by nobody. */
41286
+ filters: object({
41287
+ deviceId: boolean(),
41288
+ addonId: boolean(),
41289
+ nodeId: boolean(),
41290
+ tags: boolean(),
41291
+ level: boolean(),
41292
+ text: boolean(),
41293
+ timeRange: boolean()
41294
+ }),
41295
+ /** How far back the store reaches, when the provider knows (days). */
41296
+ retentionDays: number().nullable()
41297
+ });
41298
+ 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() }), {
41299
+ kind: "mutation",
41300
+ auth: "admin"
41301
+ });
41155
41302
  /**
41156
41303
  * `login-method` — collection cap through which auth addons contribute
41157
41304
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -42869,9 +43016,11 @@ var alarmPanelCapability = {
42869
43016
  */
42870
43017
  durability: "restored",
42871
43018
  /**
42872
- * History (D850): none — enum state; arm/disarm history belongs in the events ledger.
43019
+ * History (D850): the panel's lifecycle state as an `enum` series —
43020
+ * change-only, no floor, so an `arming -> pending -> triggered` sequence of a
43021
+ * few seconds keeps every step. Who armed it stays in the events ledger.
42873
43022
  */
42874
- history: "none",
43023
+ history: { fields: { state: { kind: "enum" } } },
42875
43024
  /** Clock fields: written, but excluded from the compare that decides
42876
43025
  * whether persisting is worth a SQLite commit. */
42877
43026
  volatileStateFields: ["lastChangedAt"]
@@ -43749,6 +43898,33 @@ var NcRuleTargetSchema = object({
43749
43898
  params: record(string(), unknown()).optional()
43750
43899
  });
43751
43900
  /**
43901
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
43902
+ *
43903
+ * Every mode starts from the same CLEAN source frame of the trigger moment
43904
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
43905
+ * to the zone that fired the rule) and renders it once at send time:
43906
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
43907
+ * colour and every OTHER track visible at that instant outlined thin, each
43908
+ * labelled with class and confidence ("dog 87%").
43909
+ * - `crop` — the subject cut out of that frame around its box at that instant.
43910
+ * - `clean` — the whole scene with nothing drawn on it.
43911
+ * - `none` — no picture.
43912
+ *
43913
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
43914
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
43915
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
43916
+ * ship a crop on one event and a boxed scene on the next depending on which
43917
+ * stored kind had landed.
43918
+ */
43919
+ var NcMediaImageSchema = _enum([
43920
+ "scene-boxes",
43921
+ "crop",
43922
+ "clean",
43923
+ "none"
43924
+ ]);
43925
+ /**
43926
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43927
+ *
43752
43928
  * Media attachment policy (P1 still-image subset).
43753
43929
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
43754
43930
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -43762,6 +43938,8 @@ var NcRuleTargetSchema = object({
43762
43938
  * - `none` — no attachment.
43763
43939
  */
43764
43940
  /**
43941
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43942
+ *
43765
43943
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
43766
43944
  * conflate it with the selection strategy and betray the request: asking for
43767
43945
  * the clean scene frame on an object-event owner used to start at
@@ -43790,16 +43968,29 @@ var NcMediaFrameSchema = _enum([
43790
43968
  */
43791
43969
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
43792
43970
  var NcMediaPolicySchema = object({
43971
+ /**
43972
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
43973
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
43974
+ * triple below, at load and at every write, and the store keeps only this.
43975
+ */
43976
+ image: NcMediaImageSchema.optional(),
43977
+ /**
43978
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
43979
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
43980
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
43981
+ * Replaces `zoneCrop`.
43982
+ */
43983
+ showTriggerZone: boolean().optional(),
43984
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43793
43985
  attach: _enum([
43794
43986
  "best",
43795
43987
  "best-matching",
43796
43988
  "keyFrame",
43797
43989
  "none"
43798
- ]).default("best"),
43799
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
43990
+ ]).optional(),
43991
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43800
43992
  frame: NcMediaFrameSchema.optional(),
43801
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
43802
- * "show me the ZONE", not the whole scene or the subject crop. */
43993
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
43803
43994
  zoneCrop: boolean().optional(),
43804
43995
  /**
43805
43996
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -43971,7 +44162,9 @@ var NcRuleInputSchema = object({
43971
44162
  * targets.
43972
44163
  */
43973
44164
  targetUsers: array(string()).optional(),
43974
- media: NcMediaPolicySchema.default({ attach: "best" }),
44165
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
44166
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
44167
+ media: NcMediaPolicySchema.default({}),
43975
44168
  throttle: NcThrottleSchema.default({
43976
44169
  cooldownSec: 60,
43977
44170
  scope: "rule-device"
@@ -44908,13 +45101,37 @@ var NcAlarmModeOpeningsSchema = object({
44908
45101
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
44909
45102
  unknown: array(number().int())
44910
45103
  });
45104
+ /**
45105
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
45106
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
45107
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
45108
+ * never looks fully armed (D62: off must never look like broken).
45109
+ */
45110
+ var NcAlarmInputBypassViewSchema = object({
45111
+ ruleId: string(),
45112
+ /** The rule's current name (its frozen name when the rule is gone). */
45113
+ ruleName: string(),
45114
+ /** The input: the sensor of the match, else its camera. */
45115
+ deviceId: number().int(),
45116
+ /** The input's current name. */
45117
+ name: string(),
45118
+ /** When it was bypassed (ms epoch). */
45119
+ since: number(),
45120
+ /** Triggers from this input dropped since. */
45121
+ dropped: number().int().min(0)
45122
+ });
44911
45123
  var NcAlarmLiveSchema = object({
44912
45124
  state: AlarmStateSchema,
44913
45125
  /** The mode being armed into (exit delay) or held; null when disarmed. */
44914
45126
  targetMode: AlarmArmModeSchema.nullable(),
44915
45127
  availableModes: array(AlarmArmModeSchema),
44916
45128
  openings: array(NcAlarmModeOpeningsSchema),
44917
- exclusions: array(NcAlarmExclusionViewSchema)
45129
+ exclusions: array(NcAlarmExclusionViewSchema),
45130
+ /**
45131
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
45132
+ * Defaulted so an older hub answer still parses (as "none known").
45133
+ */
45134
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
44918
45135
  });
44919
45136
  var NcAlarmConfigSchema = object({
44920
45137
  /**
@@ -56155,9 +56372,11 @@ var connectivityCapability = {
56155
56372
  */
56156
56373
  durability: "restored",
56157
56374
  /**
56158
- * History (D850): none — duplicates device-status.online (one authority for availability).
56375
+ * History (D850): `connected` as a boolean series — change-only, no floor. It
56376
+ * is the upstream entity's own link (a HA connectivity sensor), not the
56377
+ * device's reachability, which stays `device-status.online`.
56159
56378
  */
56160
- history: "none",
56379
+ history: { fields: { connected: { kind: "boolean" } } },
56161
56380
  /** Clock fields: written, but excluded from the compare that decides
56162
56381
  * whether persisting is worth a SQLite commit. */
56163
56382
  volatileStateFields: ["lastChangedAt"]
@@ -56981,11 +57200,22 @@ var dishwasherCapability = {
56981
57200
  },
56982
57201
  runtimeState: DishwasherStatusSchema,
56983
57202
  durability: "session",
56984
- history: { fields: { progressPercent: {
56985
- kind: "gauge",
56986
- unit: "%",
56987
- deadband: 2
56988
- } } }
57203
+ history: { fields: {
57204
+ progressPercent: {
57205
+ kind: "gauge",
57206
+ unit: "%",
57207
+ deadband: 2
57208
+ },
57209
+ state: { kind: "enum" },
57210
+ operationState: { kind: "enum" },
57211
+ remainingSeconds: {
57212
+ kind: "gauge",
57213
+ unit: "s",
57214
+ minIntervalMs: 6e4
57215
+ },
57216
+ doorOpen: { kind: "boolean" },
57217
+ powerOn: { kind: "boolean" }
57218
+ } }
56989
57219
  };
56990
57220
  var DoorbellStatusSchema = object({
56991
57221
  /** Ms epoch of the last press. null = never observed since this provider started. */
@@ -57102,9 +57332,15 @@ var enumSensorCapability = {
57102
57332
  */
57103
57333
  durability: "restored",
57104
57334
  /**
57105
- * History (D850): none — text/enum state has no history (non-goal).
57335
+ * History (D850): the value as an `enum` series (an appliance's program or
57336
+ * operation state, an HVAC action). The option set is per device, so the
57337
+ * value list is LEARNED as values are first seen (bounded). A sensor with a
57338
+ * `format` carries a timestamp, not a state, and is not recorded.
57106
57339
  */
57107
- history: "none",
57340
+ history: { fields: { value: {
57341
+ kind: "enum",
57342
+ skipWhenSet: "format"
57343
+ } } },
57108
57344
  /** Clock fields: written, but excluded from the compare that decides
57109
57345
  * whether persisting is worth a SQLite commit. */
57110
57346
  volatileStateFields: ["lastFetchedAt"]
@@ -59078,9 +59314,10 @@ var lockControlCapability = {
59078
59314
  */
59079
59315
  durability: "restored",
59080
59316
  /**
59081
- * History (D850): none — enum state; lock events belong in the events ledger.
59317
+ * History (D850): the lock's state as an `enum` series — change-only, no
59318
+ * floor: a jam or an unlock lasting seconds is the edge an operator looks for.
59082
59319
  */
59083
- history: "none",
59320
+ history: { fields: { state: { kind: "enum" } } },
59084
59321
  /** Clock fields: written, but excluded from the compare that decides
59085
59322
  * whether persisting is worth a SQLite commit. */
59086
59323
  volatileStateFields: ["lastChangedAt"]
@@ -59254,9 +59491,18 @@ var mediaPlayerCapability = {
59254
59491
  */
59255
59492
  durability: "session",
59256
59493
  /**
59257
- * History (D850): none — `positionMs` moves continuously while playing; volume is transient.
59494
+ * History (D850): volume (a level an operator or an automation sets; the
59495
+ * default 10 s floor folds a slider drag into its end value) and mute.
59496
+ * `positionMs` is not recorded: it moves continuously while playing.
59258
59497
  */
59259
- history: "none"
59498
+ history: { fields: {
59499
+ volumeLevel: {
59500
+ kind: "gauge",
59501
+ unit: "%",
59502
+ deadband: 1
59503
+ },
59504
+ isMuted: { kind: "boolean" }
59505
+ } }
59260
59506
  };
59261
59507
  /**
59262
59508
  * mesh-network — collection cap for mesh-VPN providers.
@@ -61466,9 +61712,24 @@ var NpuInfoSchema = object({
61466
61712
  name: string().optional(),
61467
61713
  generation: _enum(["xdna1", "xdna2"]).optional()
61468
61714
  });
61715
+ var CoralBusSchema = _enum(["usb", "pci"]);
61469
61716
  var CoralInfoSchema = object({
61470
61717
  type: literal("coral-edgetpu"),
61471
- bus: string().optional()
61718
+ /** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
61719
+ bus: string().optional(),
61720
+ /** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
61721
+ count: number().int().nonnegative().optional(),
61722
+ /** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
61723
+ units: array(object({
61724
+ bus: CoralBusSchema,
61725
+ count: number().int().nonnegative()
61726
+ })).readonly().optional(),
61727
+ /** Present-but-unusable units, each with its typed reason (never "absent"). */
61728
+ unavailable: array(object({
61729
+ bus: CoralBusSchema,
61730
+ count: number().int().nonnegative(),
61731
+ reason: _enum(["driver-missing", "device-not-accessible"])
61732
+ })).readonly().optional()
61472
61733
  });
61473
61734
  var HardwareInfoSchema = object({
61474
61735
  platform: HardwarePlatformSchema,
@@ -64921,9 +65182,29 @@ var streamParamsCapability = {
64921
65182
  */
64922
65183
  durability: "restored",
64923
65184
  /**
64924
- * History (D850): none — encoder configuration.
65185
+ * History (D850): the configured bitrate and frame rate of the main and sub
65186
+ * profiles. Configuration, so change-only on the default floor: a point is an
65187
+ * operator's (or a tuner's) edit, which is exactly what a chart of a stream's
65188
+ * quality over time must show.
64925
65189
  */
64926
- history: "none",
65190
+ history: { fields: {
65191
+ "main.bitrate": {
65192
+ kind: "gauge",
65193
+ unit: "kbps"
65194
+ },
65195
+ "main.framerate": {
65196
+ kind: "gauge",
65197
+ unit: "fps"
65198
+ },
65199
+ "sub.bitrate": {
65200
+ kind: "gauge",
65201
+ unit: "kbps"
65202
+ },
65203
+ "sub.framerate": {
65204
+ kind: "gauge",
65205
+ unit: "fps"
65206
+ }
65207
+ } },
64927
65208
  /** Clock fields: written, but excluded from the compare that decides
64928
65209
  * whether persisting is worth a SQLite commit. */
64929
65210
  volatileStateFields: ["lastFetchedAt"]
@@ -68314,6 +68595,15 @@ var BaseDevice = class {
68314
68595
  * Drivers can use the `getProbeFlags()` helper to read the flag bag
68315
68596
  * with a typed cast.
68316
68597
  *
68598
+ * Answer what you KNOW. A plain array is read as the complete list only
68599
+ * while this device is `online` and probed; return
68600
+ * `accessoryChildrenUnknown(reason)` whenever you cannot know the list right
68601
+ * now (no credentials, parent not connected, a failed or partial read) —
68602
+ * the kernel then deletes nothing. Return `accessoryChildrenComplete(list)`
68603
+ * to say "connected, and this is the complete list" explicitly. A shrink is
68604
+ * deleted only after a second agreeing complete read on a later probe (D49;
68605
+ * `packages/system/src/kernel/moleculer/accessory-prune-gate.ts`).
68606
+ *
68317
68607
  * Default: no children.
68318
68608
  */
68319
68609
  getAccessoryChildren() {
@@ -72445,7 +72735,19 @@ Object.freeze({
72445
72735
  addonId: null,
72446
72736
  access: "view"
72447
72737
  },
72448
- "logDestination.query": {
72738
+ "logDestination.cancelRead": {
72739
+ capName: "log-destination",
72740
+ capScope: "system",
72741
+ addonId: null,
72742
+ access: "create"
72743
+ },
72744
+ "logDestination.describeRead": {
72745
+ capName: "log-destination",
72746
+ capScope: "system",
72747
+ addonId: null,
72748
+ access: "view"
72749
+ },
72750
+ "logDestination.read": {
72449
72751
  capName: "log-destination",
72450
72752
  capScope: "system",
72451
72753
  addonId: null,
@@ -78604,6 +78906,11 @@ Object.freeze({
78604
78906
  form: "single",
78605
78907
  optional: false
78606
78908
  }],
78909
+ "logDestination.read": [{
78910
+ name: "deviceId",
78911
+ form: "single",
78912
+ optional: true
78913
+ }],
78607
78914
  "mediaPlayer.getStatus": [{
78608
78915
  name: "deviceId",
78609
78916
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-reolink",
3
- "version": "1.2.192",
3
+ "version": "1.2.194",
4
4
  "description": "Reolink camera device provider addon for CamStack — native Baichuan protocol",
5
5
  "keywords": [
6
6
  "camstack",