@camstack/addon-provider-petkit 0.2.131 → 0.2.133

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
@@ -6516,7 +6516,7 @@ var ZodIssueCode = {
6516
6516
  var ZodFirstPartyTypeKind;
6517
6517
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6518
6518
  //#endregion
6519
- //#region ../types/dist/sleep-yKL5gfrH.mjs
6519
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
6520
6520
  /**
6521
6521
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6522
6522
  * window to float samples (D455).
@@ -18096,7 +18096,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
18096
18096
  kind: literal("node"),
18097
18097
  nodeId: string().min(1)
18098
18098
  })]);
18099
+ /**
18100
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
18101
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
18102
+ * meaning); a rollup keeps the time spent in each state (`states`).
18103
+ */
18099
18104
  var DeviceHistoryKindSchema = _enum([
18105
+ "gauge",
18106
+ "counter",
18107
+ "boolean",
18108
+ "enum"
18109
+ ]);
18110
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
18111
+ var DeviceHistoryProducerKindSchema = _enum([
18100
18112
  "gauge",
18101
18113
  "counter",
18102
18114
  "boolean"
@@ -18133,7 +18145,13 @@ var SeriesInfoSchema = object({
18133
18145
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
18134
18146
  unit: string().nullable(),
18135
18147
  displayName: string(),
18136
- source: _enum(["cap", "addon"]),
18148
+ source: _enum([
18149
+ "cap",
18150
+ "addon",
18151
+ "derived"
18152
+ ]),
18153
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
18154
+ values: array(string()).readonly().nullable(),
18137
18155
  firstTs: number(),
18138
18156
  lastTs: number()
18139
18157
  });
@@ -18147,17 +18165,31 @@ var QueryPointSchema = object({
18147
18165
  twMean: number().nullable(),
18148
18166
  min: number(),
18149
18167
  max: number(),
18150
- /** `null` is unknown, never zero (D393). */
18151
- last: number().nullable()
18168
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
18169
+ last: number().nullable(),
18170
+ /**
18171
+ * The increase over the point: a `counter`'s growth since the previous point
18172
+ * or bucket (a drop is a reset, counted from zero), and for
18173
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
18174
+ * every other kind, and when it cannot be known.
18175
+ */
18176
+ delta: number().nullable(),
18177
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
18178
+ state: string().nullable(),
18179
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
18180
+ states: record(string(), number()).nullable()
18152
18181
  });
18153
18182
  var QuerySeriesSchema = object({
18154
18183
  scope: string(),
18155
18184
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
18156
18185
  before: object({
18157
18186
  t: number(),
18158
- value: number().nullable()
18187
+ value: number().nullable(),
18188
+ state: string().nullable()
18159
18189
  }).nullable(),
18160
- points: array(QueryPointSchema).readonly()
18190
+ points: array(QueryPointSchema).readonly(),
18191
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
18192
+ derivedFrom: string().nullable()
18161
18193
  });
18162
18194
  /** The window part of a query, shared by the device and node forms. */
18163
18195
  var QueryWindowShape = {
@@ -18173,6 +18205,23 @@ var QueryResultSchema = object({
18173
18205
  series: array(QuerySeriesSchema).readonly(),
18174
18206
  truncated: boolean()
18175
18207
  });
18208
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
18209
+ var QueryManyItemSchema = union([object({
18210
+ deviceId: number().int(),
18211
+ key: string(),
18212
+ scope: string().optional()
18213
+ }), object({
18214
+ forNodeId: string().min(1),
18215
+ key: string(),
18216
+ scope: string().optional()
18217
+ })]);
18218
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
18219
+ ok: literal(true),
18220
+ result: QueryResultSchema
18221
+ }), object({
18222
+ ok: literal(false),
18223
+ error: string()
18224
+ })]);
18176
18225
  var TierStatusSchema = object({
18177
18226
  tier: DeviceHistoryResolutionSchema,
18178
18227
  /** `null` until the first background count answered. */
@@ -18228,16 +18277,22 @@ var DeviceHistoryStatusSchema = object({
18228
18277
  lastRefreshAt: number().nullable()
18229
18278
  })
18230
18279
  });
18231
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
18280
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
18232
18281
  deviceId: number().int(),
18233
18282
  ...QueryWindowShape
18234
18283
  }), QueryResultSchema), method(object({
18235
- nodeId: string().min(1),
18284
+ forNodeId: string().min(1),
18236
18285
  ...QueryWindowShape
18237
18286
  }), QueryResultSchema, { auth: "admin" }), method(object({
18287
+ items: array(QueryManyItemSchema).min(1).max(24),
18288
+ from: QueryWindowShape.from,
18289
+ to: QueryWindowShape.to,
18290
+ resolution: QueryWindowShape.resolution,
18291
+ maxPoints: QueryWindowShape.maxPoints
18292
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
18238
18293
  name: string().regex(/^[a-z0-9-]+$/),
18239
18294
  subjectKind: _enum(["device", "node"]),
18240
- kind: DeviceHistoryKindSchema,
18295
+ kind: DeviceHistoryProducerKindSchema,
18241
18296
  unit: string().optional(),
18242
18297
  displayName: string().min(1),
18243
18298
  ingest: _enum(["points", "buckets"])
@@ -41463,14 +41518,106 @@ var LogEntrySchema = object({
41463
41518
  meta: record(string(), unknown()).optional(),
41464
41519
  tags: record(string(), string()).optional()
41465
41520
  });
41466
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
41467
- scope: array(string()).optional(),
41521
+ /**
41522
+ * A history READ against one destination (D898).
41523
+ *
41524
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
41525
+ * browser applied after the limit is what made a rare device's lines
41526
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
41527
+ * minted (opaque to everyone else): a file position for the rotated files, a
41528
+ * nanosecond timestamp for Loki.
41529
+ *
41530
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
41531
+ * store answers `done: false` with the cursor it reached and the bytes it
41532
+ * scanned, and the caller decides whether to go on. That is what makes a long
41533
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
41534
+ * flight, and not asking for the next slice ends the scan.
41535
+ */
41536
+ var LogReadQuerySchema = object({
41537
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
41538
+ requestId: string().min(1).max(64).optional(),
41539
+ /** The device the line is about (`tags.deviceId`, numeric). */
41540
+ deviceId: number().int().optional(),
41541
+ /**
41542
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
41543
+ * match. Not `addonId`: a cap router reads that name as "which provider".
41544
+ */
41545
+ fromAddonId: string().min(1).max(200).optional(),
41546
+ /**
41547
+ * The emitting node: matches the agent that emitted the line, the node
41548
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
41549
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
41550
+ * name as "which node's provider".
41551
+ */
41552
+ fromNodeId: string().min(1).max(200).optional(),
41553
+ /** Any other tag, exact match (AND). */
41554
+ tags: record(string(), union([string(), number()])).optional(),
41555
+ /** Severity FLOOR: this level and above. */
41468
41556
  level: LogLevelSchema.optional(),
41469
- since: date().optional(),
41470
- until: date().optional(),
41471
- limit: number().optional(),
41472
- tags: record(string(), string()).optional()
41473
- }), array(LogEntrySchema).readonly());
41557
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
41558
+ text: string().min(1).max(200).optional(),
41559
+ /** Epoch ms, inclusive. */
41560
+ since: number().optional(),
41561
+ /** Epoch ms, inclusive. */
41562
+ until: number().optional(),
41563
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
41564
+ before: string().min(1).max(1024).optional(),
41565
+ /** Newer than this cursor (exclusive). */
41566
+ after: string().min(1).max(1024).optional(),
41567
+ limit: number().int().min(1).max(1e3).optional(),
41568
+ /** Wall-clock bound of this slice. The provider caps it. */
41569
+ budgetMs: number().int().min(50).max(1e4).optional()
41570
+ });
41571
+ var LogReadResultSchema = object({
41572
+ /** Newest first. */
41573
+ entries: array(object({
41574
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
41575
+ id: string().optional(),
41576
+ /** Epoch ms. */
41577
+ timestamp: number(),
41578
+ level: LogLevelSchema,
41579
+ scope: string().optional(),
41580
+ message: string(),
41581
+ tags: record(string(), union([string(), number()])).optional(),
41582
+ meta: record(string(), unknown()).optional()
41583
+ })),
41584
+ /** Pass as `before` for the next older page; null when nothing older exists. */
41585
+ nextBefore: string().nullable(),
41586
+ /** Pass as `after` to read what arrived since; null when unknown. */
41587
+ nextAfter: string().nullable(),
41588
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
41589
+ scannedBytes: number().int().nonnegative(),
41590
+ /**
41591
+ * True when the scan in this direction reached the end of the store.
41592
+ * False with fewer than `limit` entries means the budget ran out first —
41593
+ * call again with `nextBefore` to go on.
41594
+ */
41595
+ done: boolean(),
41596
+ /** True when `cancelRead` ended this slice early. */
41597
+ cancelled: boolean().optional()
41598
+ });
41599
+ var LogReadCapabilitiesSchema = object({
41600
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
41601
+ readable: boolean(),
41602
+ /** Why not, when `readable` is false — rendered next to the source. */
41603
+ reason: string().nullable(),
41604
+ /** Filters the provider applies itself. A false one is applied by nobody. */
41605
+ filters: object({
41606
+ deviceId: boolean(),
41607
+ addonId: boolean(),
41608
+ nodeId: boolean(),
41609
+ tags: boolean(),
41610
+ level: boolean(),
41611
+ text: boolean(),
41612
+ timeRange: boolean()
41613
+ }),
41614
+ /** How far back the store reaches, when the provider knows (days). */
41615
+ retentionDays: number().nullable()
41616
+ });
41617
+ 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() }), {
41618
+ kind: "mutation",
41619
+ auth: "admin"
41620
+ });
41474
41621
  /**
41475
41622
  * `login-method` — collection cap through which auth addons contribute
41476
41623
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -43188,9 +43335,11 @@ var alarmPanelCapability = {
43188
43335
  */
43189
43336
  durability: "restored",
43190
43337
  /**
43191
- * History (D850): none — enum state; arm/disarm history belongs in the events ledger.
43338
+ * History (D850): the panel's lifecycle state as an `enum` series —
43339
+ * change-only, no floor, so an `arming -> pending -> triggered` sequence of a
43340
+ * few seconds keeps every step. Who armed it stays in the events ledger.
43192
43341
  */
43193
- history: "none",
43342
+ history: { fields: { state: { kind: "enum" } } },
43194
43343
  /** Clock fields: written, but excluded from the compare that decides
43195
43344
  * whether persisting is worth a SQLite commit. */
43196
43345
  volatileStateFields: ["lastChangedAt"]
@@ -44068,6 +44217,33 @@ var NcRuleTargetSchema = object({
44068
44217
  params: record(string(), unknown()).optional()
44069
44218
  });
44070
44219
  /**
44220
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
44221
+ *
44222
+ * Every mode starts from the same CLEAN source frame of the trigger moment
44223
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
44224
+ * to the zone that fired the rule) and renders it once at send time:
44225
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
44226
+ * colour and every OTHER track visible at that instant outlined thin, each
44227
+ * labelled with class and confidence ("dog 87%").
44228
+ * - `crop` — the subject cut out of that frame around its box at that instant.
44229
+ * - `clean` — the whole scene with nothing drawn on it.
44230
+ * - `none` — no picture.
44231
+ *
44232
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
44233
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
44234
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
44235
+ * ship a crop on one event and a boxed scene on the next depending on which
44236
+ * stored kind had landed.
44237
+ */
44238
+ var NcMediaImageSchema = _enum([
44239
+ "scene-boxes",
44240
+ "crop",
44241
+ "clean",
44242
+ "none"
44243
+ ]);
44244
+ /**
44245
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
44246
+ *
44071
44247
  * Media attachment policy (P1 still-image subset).
44072
44248
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
44073
44249
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -44081,6 +44257,8 @@ var NcRuleTargetSchema = object({
44081
44257
  * - `none` — no attachment.
44082
44258
  */
44083
44259
  /**
44260
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
44261
+ *
44084
44262
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
44085
44263
  * conflate it with the selection strategy and betray the request: asking for
44086
44264
  * the clean scene frame on an object-event owner used to start at
@@ -44109,16 +44287,29 @@ var NcMediaFrameSchema = _enum([
44109
44287
  */
44110
44288
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
44111
44289
  var NcMediaPolicySchema = object({
44290
+ /**
44291
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
44292
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
44293
+ * triple below, at load and at every write, and the store keeps only this.
44294
+ */
44295
+ image: NcMediaImageSchema.optional(),
44296
+ /**
44297
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
44298
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
44299
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
44300
+ * Replaces `zoneCrop`.
44301
+ */
44302
+ showTriggerZone: boolean().optional(),
44303
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
44112
44304
  attach: _enum([
44113
44305
  "best",
44114
44306
  "best-matching",
44115
44307
  "keyFrame",
44116
44308
  "none"
44117
- ]).default("best"),
44118
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
44309
+ ]).optional(),
44310
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
44119
44311
  frame: NcMediaFrameSchema.optional(),
44120
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
44121
- * "show me the ZONE", not the whole scene or the subject crop. */
44312
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
44122
44313
  zoneCrop: boolean().optional(),
44123
44314
  /**
44124
44315
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -44290,7 +44481,9 @@ var NcRuleInputSchema = object({
44290
44481
  * targets.
44291
44482
  */
44292
44483
  targetUsers: array(string()).optional(),
44293
- media: NcMediaPolicySchema.default({ attach: "best" }),
44484
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
44485
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
44486
+ media: NcMediaPolicySchema.default({}),
44294
44487
  throttle: NcThrottleSchema.default({
44295
44488
  cooldownSec: 60,
44296
44489
  scope: "rule-device"
@@ -45227,13 +45420,37 @@ var NcAlarmModeOpeningsSchema = object({
45227
45420
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
45228
45421
  unknown: array(number().int())
45229
45422
  });
45423
+ /**
45424
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
45425
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
45426
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
45427
+ * never looks fully armed (D62: off must never look like broken).
45428
+ */
45429
+ var NcAlarmInputBypassViewSchema = object({
45430
+ ruleId: string(),
45431
+ /** The rule's current name (its frozen name when the rule is gone). */
45432
+ ruleName: string(),
45433
+ /** The input: the sensor of the match, else its camera. */
45434
+ deviceId: number().int(),
45435
+ /** The input's current name. */
45436
+ name: string(),
45437
+ /** When it was bypassed (ms epoch). */
45438
+ since: number(),
45439
+ /** Triggers from this input dropped since. */
45440
+ dropped: number().int().min(0)
45441
+ });
45230
45442
  var NcAlarmLiveSchema = object({
45231
45443
  state: AlarmStateSchema,
45232
45444
  /** The mode being armed into (exit delay) or held; null when disarmed. */
45233
45445
  targetMode: AlarmArmModeSchema.nullable(),
45234
45446
  availableModes: array(AlarmArmModeSchema),
45235
45447
  openings: array(NcAlarmModeOpeningsSchema),
45236
- exclusions: array(NcAlarmExclusionViewSchema)
45448
+ exclusions: array(NcAlarmExclusionViewSchema),
45449
+ /**
45450
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
45451
+ * Defaulted so an older hub answer still parses (as "none known").
45452
+ */
45453
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
45237
45454
  });
45238
45455
  var NcAlarmConfigSchema = object({
45239
45456
  /**
@@ -55960,9 +56177,11 @@ var connectivityCapability = {
55960
56177
  */
55961
56178
  durability: "restored",
55962
56179
  /**
55963
- * History (D850): none — duplicates device-status.online (one authority for availability).
56180
+ * History (D850): `connected` as a boolean series — change-only, no floor. It
56181
+ * is the upstream entity's own link (a HA connectivity sensor), not the
56182
+ * device's reachability, which stays `device-status.online`.
55964
56183
  */
55965
- history: "none",
56184
+ history: { fields: { connected: { kind: "boolean" } } },
55966
56185
  /** Clock fields: written, but excluded from the compare that decides
55967
56186
  * whether persisting is worth a SQLite commit. */
55968
56187
  volatileStateFields: ["lastChangedAt"]
@@ -56786,11 +57005,22 @@ var dishwasherCapability = {
56786
57005
  },
56787
57006
  runtimeState: DishwasherStatusSchema,
56788
57007
  durability: "session",
56789
- history: { fields: { progressPercent: {
56790
- kind: "gauge",
56791
- unit: "%",
56792
- deadband: 2
56793
- } } }
57008
+ history: { fields: {
57009
+ progressPercent: {
57010
+ kind: "gauge",
57011
+ unit: "%",
57012
+ deadband: 2
57013
+ },
57014
+ state: { kind: "enum" },
57015
+ operationState: { kind: "enum" },
57016
+ remainingSeconds: {
57017
+ kind: "gauge",
57018
+ unit: "s",
57019
+ minIntervalMs: 6e4
57020
+ },
57021
+ doorOpen: { kind: "boolean" },
57022
+ powerOn: { kind: "boolean" }
57023
+ } }
56794
57024
  };
56795
57025
  var DoorbellStatusSchema = object({
56796
57026
  /** Ms epoch of the last press. null = never observed since this provider started. */
@@ -56907,9 +57137,15 @@ var enumSensorCapability = {
56907
57137
  */
56908
57138
  durability: "restored",
56909
57139
  /**
56910
- * History (D850): none — text/enum state has no history (non-goal).
57140
+ * History (D850): the value as an `enum` series (an appliance's program or
57141
+ * operation state, an HVAC action). The option set is per device, so the
57142
+ * value list is LEARNED as values are first seen (bounded). A sensor with a
57143
+ * `format` carries a timestamp, not a state, and is not recorded.
56911
57144
  */
56912
- history: "none",
57145
+ history: { fields: { value: {
57146
+ kind: "enum",
57147
+ skipWhenSet: "format"
57148
+ } } },
56913
57149
  /** Clock fields: written, but excluded from the compare that decides
56914
57150
  * whether persisting is worth a SQLite commit. */
56915
57151
  volatileStateFields: ["lastFetchedAt"]
@@ -58883,9 +59119,10 @@ var lockControlCapability = {
58883
59119
  */
58884
59120
  durability: "restored",
58885
59121
  /**
58886
- * History (D850): none — enum state; lock events belong in the events ledger.
59122
+ * History (D850): the lock's state as an `enum` series — change-only, no
59123
+ * floor: a jam or an unlock lasting seconds is the edge an operator looks for.
58887
59124
  */
58888
- history: "none",
59125
+ history: { fields: { state: { kind: "enum" } } },
58889
59126
  /** Clock fields: written, but excluded from the compare that decides
58890
59127
  * whether persisting is worth a SQLite commit. */
58891
59128
  volatileStateFields: ["lastChangedAt"]
@@ -59059,9 +59296,18 @@ var mediaPlayerCapability = {
59059
59296
  */
59060
59297
  durability: "session",
59061
59298
  /**
59062
- * History (D850): none — `positionMs` moves continuously while playing; volume is transient.
59299
+ * History (D850): volume (a level an operator or an automation sets; the
59300
+ * default 10 s floor folds a slider drag into its end value) and mute.
59301
+ * `positionMs` is not recorded: it moves continuously while playing.
59063
59302
  */
59064
- history: "none"
59303
+ history: { fields: {
59304
+ volumeLevel: {
59305
+ kind: "gauge",
59306
+ unit: "%",
59307
+ deadband: 1
59308
+ },
59309
+ isMuted: { kind: "boolean" }
59310
+ } }
59065
59311
  };
59066
59312
  /**
59067
59313
  * mesh-network — collection cap for mesh-VPN providers.
@@ -61205,9 +61451,24 @@ var NpuInfoSchema = object({
61205
61451
  name: string().optional(),
61206
61452
  generation: _enum(["xdna1", "xdna2"]).optional()
61207
61453
  });
61454
+ var CoralBusSchema = _enum(["usb", "pci"]);
61208
61455
  var CoralInfoSchema = object({
61209
61456
  type: literal("coral-edgetpu"),
61210
- bus: string().optional()
61457
+ /** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
61458
+ bus: string().optional(),
61459
+ /** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
61460
+ count: number().int().nonnegative().optional(),
61461
+ /** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
61462
+ units: array(object({
61463
+ bus: CoralBusSchema,
61464
+ count: number().int().nonnegative()
61465
+ })).readonly().optional(),
61466
+ /** Present-but-unusable units, each with its typed reason (never "absent"). */
61467
+ unavailable: array(object({
61468
+ bus: CoralBusSchema,
61469
+ count: number().int().nonnegative(),
61470
+ reason: _enum(["driver-missing", "device-not-accessible"])
61471
+ })).readonly().optional()
61211
61472
  });
61212
61473
  var HardwareInfoSchema = object({
61213
61474
  platform: HardwarePlatformSchema,
@@ -64354,9 +64615,29 @@ var streamParamsCapability = {
64354
64615
  */
64355
64616
  durability: "restored",
64356
64617
  /**
64357
- * History (D850): none — encoder configuration.
64618
+ * History (D850): the configured bitrate and frame rate of the main and sub
64619
+ * profiles. Configuration, so change-only on the default floor: a point is an
64620
+ * operator's (or a tuner's) edit, which is exactly what a chart of a stream's
64621
+ * quality over time must show.
64358
64622
  */
64359
- history: "none",
64623
+ history: { fields: {
64624
+ "main.bitrate": {
64625
+ kind: "gauge",
64626
+ unit: "kbps"
64627
+ },
64628
+ "main.framerate": {
64629
+ kind: "gauge",
64630
+ unit: "fps"
64631
+ },
64632
+ "sub.bitrate": {
64633
+ kind: "gauge",
64634
+ unit: "kbps"
64635
+ },
64636
+ "sub.framerate": {
64637
+ kind: "gauge",
64638
+ unit: "fps"
64639
+ }
64640
+ } },
64360
64641
  /** Clock fields: written, but excluded from the compare that decides
64361
64642
  * whether persisting is worth a SQLite commit. */
64362
64643
  volatileStateFields: ["lastFetchedAt"]
@@ -67534,6 +67815,15 @@ var BaseDevice = class {
67534
67815
  * Drivers can use the `getProbeFlags()` helper to read the flag bag
67535
67816
  * with a typed cast.
67536
67817
  *
67818
+ * Answer what you KNOW. A plain array is read as the complete list only
67819
+ * while this device is `online` and probed; return
67820
+ * `accessoryChildrenUnknown(reason)` whenever you cannot know the list right
67821
+ * now (no credentials, parent not connected, a failed or partial read) —
67822
+ * the kernel then deletes nothing. Return `accessoryChildrenComplete(list)`
67823
+ * to say "connected, and this is the complete list" explicitly. A shrink is
67824
+ * deleted only after a second agreeing complete read on a later probe (D49;
67825
+ * `packages/system/src/kernel/moleculer/accessory-prune-gate.ts`).
67826
+ *
67537
67827
  * Default: no children.
67538
67828
  */
67539
67829
  getAccessoryChildren() {
@@ -71665,7 +71955,19 @@ Object.freeze({
71665
71955
  addonId: null,
71666
71956
  access: "view"
71667
71957
  },
71668
- "logDestination.query": {
71958
+ "logDestination.cancelRead": {
71959
+ capName: "log-destination",
71960
+ capScope: "system",
71961
+ addonId: null,
71962
+ access: "create"
71963
+ },
71964
+ "logDestination.describeRead": {
71965
+ capName: "log-destination",
71966
+ capScope: "system",
71967
+ addonId: null,
71968
+ access: "view"
71969
+ },
71970
+ "logDestination.read": {
71669
71971
  capName: "log-destination",
71670
71972
  capScope: "system",
71671
71973
  addonId: null,
@@ -77672,6 +77974,11 @@ Object.freeze({
77672
77974
  form: "single",
77673
77975
  optional: false
77674
77976
  }],
77977
+ "logDestination.read": [{
77978
+ name: "deviceId",
77979
+ form: "single",
77980
+ optional: true
77981
+ }],
77675
77982
  "mediaPlayer.getStatus": [{
77676
77983
  name: "deviceId",
77677
77984
  form: "single",
package/dist/addon.mjs CHANGED
@@ -6515,7 +6515,7 @@ var ZodIssueCode = {
6515
6515
  var ZodFirstPartyTypeKind;
6516
6516
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6517
6517
  //#endregion
6518
- //#region ../types/dist/sleep-yKL5gfrH.mjs
6518
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
6519
6519
  /**
6520
6520
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6521
6521
  * window to float samples (D455).
@@ -18095,7 +18095,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
18095
18095
  kind: literal("node"),
18096
18096
  nodeId: string().min(1)
18097
18097
  })]);
18098
+ /**
18099
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
18100
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
18101
+ * meaning); a rollup keeps the time spent in each state (`states`).
18102
+ */
18098
18103
  var DeviceHistoryKindSchema = _enum([
18104
+ "gauge",
18105
+ "counter",
18106
+ "boolean",
18107
+ "enum"
18108
+ ]);
18109
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
18110
+ var DeviceHistoryProducerKindSchema = _enum([
18099
18111
  "gauge",
18100
18112
  "counter",
18101
18113
  "boolean"
@@ -18132,7 +18144,13 @@ var SeriesInfoSchema = object({
18132
18144
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
18133
18145
  unit: string().nullable(),
18134
18146
  displayName: string(),
18135
- source: _enum(["cap", "addon"]),
18147
+ source: _enum([
18148
+ "cap",
18149
+ "addon",
18150
+ "derived"
18151
+ ]),
18152
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
18153
+ values: array(string()).readonly().nullable(),
18136
18154
  firstTs: number(),
18137
18155
  lastTs: number()
18138
18156
  });
@@ -18146,17 +18164,31 @@ var QueryPointSchema = object({
18146
18164
  twMean: number().nullable(),
18147
18165
  min: number(),
18148
18166
  max: number(),
18149
- /** `null` is unknown, never zero (D393). */
18150
- last: number().nullable()
18167
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
18168
+ last: number().nullable(),
18169
+ /**
18170
+ * The increase over the point: a `counter`'s growth since the previous point
18171
+ * or bucket (a drop is a reset, counted from zero), and for
18172
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
18173
+ * every other kind, and when it cannot be known.
18174
+ */
18175
+ delta: number().nullable(),
18176
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
18177
+ state: string().nullable(),
18178
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
18179
+ states: record(string(), number()).nullable()
18151
18180
  });
18152
18181
  var QuerySeriesSchema = object({
18153
18182
  scope: string(),
18154
18183
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
18155
18184
  before: object({
18156
18185
  t: number(),
18157
- value: number().nullable()
18186
+ value: number().nullable(),
18187
+ state: string().nullable()
18158
18188
  }).nullable(),
18159
- points: array(QueryPointSchema).readonly()
18189
+ points: array(QueryPointSchema).readonly(),
18190
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
18191
+ derivedFrom: string().nullable()
18160
18192
  });
18161
18193
  /** The window part of a query, shared by the device and node forms. */
18162
18194
  var QueryWindowShape = {
@@ -18172,6 +18204,23 @@ var QueryResultSchema = object({
18172
18204
  series: array(QuerySeriesSchema).readonly(),
18173
18205
  truncated: boolean()
18174
18206
  });
18207
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
18208
+ var QueryManyItemSchema = union([object({
18209
+ deviceId: number().int(),
18210
+ key: string(),
18211
+ scope: string().optional()
18212
+ }), object({
18213
+ forNodeId: string().min(1),
18214
+ key: string(),
18215
+ scope: string().optional()
18216
+ })]);
18217
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
18218
+ ok: literal(true),
18219
+ result: QueryResultSchema
18220
+ }), object({
18221
+ ok: literal(false),
18222
+ error: string()
18223
+ })]);
18175
18224
  var TierStatusSchema = object({
18176
18225
  tier: DeviceHistoryResolutionSchema,
18177
18226
  /** `null` until the first background count answered. */
@@ -18227,16 +18276,22 @@ var DeviceHistoryStatusSchema = object({
18227
18276
  lastRefreshAt: number().nullable()
18228
18277
  })
18229
18278
  });
18230
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
18279
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
18231
18280
  deviceId: number().int(),
18232
18281
  ...QueryWindowShape
18233
18282
  }), QueryResultSchema), method(object({
18234
- nodeId: string().min(1),
18283
+ forNodeId: string().min(1),
18235
18284
  ...QueryWindowShape
18236
18285
  }), QueryResultSchema, { auth: "admin" }), method(object({
18286
+ items: array(QueryManyItemSchema).min(1).max(24),
18287
+ from: QueryWindowShape.from,
18288
+ to: QueryWindowShape.to,
18289
+ resolution: QueryWindowShape.resolution,
18290
+ maxPoints: QueryWindowShape.maxPoints
18291
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
18237
18292
  name: string().regex(/^[a-z0-9-]+$/),
18238
18293
  subjectKind: _enum(["device", "node"]),
18239
- kind: DeviceHistoryKindSchema,
18294
+ kind: DeviceHistoryProducerKindSchema,
18240
18295
  unit: string().optional(),
18241
18296
  displayName: string().min(1),
18242
18297
  ingest: _enum(["points", "buckets"])
@@ -41462,14 +41517,106 @@ var LogEntrySchema = object({
41462
41517
  meta: record(string(), unknown()).optional(),
41463
41518
  tags: record(string(), string()).optional()
41464
41519
  });
41465
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
41466
- scope: array(string()).optional(),
41520
+ /**
41521
+ * A history READ against one destination (D898).
41522
+ *
41523
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
41524
+ * browser applied after the limit is what made a rare device's lines
41525
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
41526
+ * minted (opaque to everyone else): a file position for the rotated files, a
41527
+ * nanosecond timestamp for Loki.
41528
+ *
41529
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
41530
+ * store answers `done: false` with the cursor it reached and the bytes it
41531
+ * scanned, and the caller decides whether to go on. That is what makes a long
41532
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
41533
+ * flight, and not asking for the next slice ends the scan.
41534
+ */
41535
+ var LogReadQuerySchema = object({
41536
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
41537
+ requestId: string().min(1).max(64).optional(),
41538
+ /** The device the line is about (`tags.deviceId`, numeric). */
41539
+ deviceId: number().int().optional(),
41540
+ /**
41541
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
41542
+ * match. Not `addonId`: a cap router reads that name as "which provider".
41543
+ */
41544
+ fromAddonId: string().min(1).max(200).optional(),
41545
+ /**
41546
+ * The emitting node: matches the agent that emitted the line, the node
41547
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
41548
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
41549
+ * name as "which node's provider".
41550
+ */
41551
+ fromNodeId: string().min(1).max(200).optional(),
41552
+ /** Any other tag, exact match (AND). */
41553
+ tags: record(string(), union([string(), number()])).optional(),
41554
+ /** Severity FLOOR: this level and above. */
41467
41555
  level: LogLevelSchema.optional(),
41468
- since: date().optional(),
41469
- until: date().optional(),
41470
- limit: number().optional(),
41471
- tags: record(string(), string()).optional()
41472
- }), array(LogEntrySchema).readonly());
41556
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
41557
+ text: string().min(1).max(200).optional(),
41558
+ /** Epoch ms, inclusive. */
41559
+ since: number().optional(),
41560
+ /** Epoch ms, inclusive. */
41561
+ until: number().optional(),
41562
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
41563
+ before: string().min(1).max(1024).optional(),
41564
+ /** Newer than this cursor (exclusive). */
41565
+ after: string().min(1).max(1024).optional(),
41566
+ limit: number().int().min(1).max(1e3).optional(),
41567
+ /** Wall-clock bound of this slice. The provider caps it. */
41568
+ budgetMs: number().int().min(50).max(1e4).optional()
41569
+ });
41570
+ var LogReadResultSchema = object({
41571
+ /** Newest first. */
41572
+ entries: array(object({
41573
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
41574
+ id: string().optional(),
41575
+ /** Epoch ms. */
41576
+ timestamp: number(),
41577
+ level: LogLevelSchema,
41578
+ scope: string().optional(),
41579
+ message: string(),
41580
+ tags: record(string(), union([string(), number()])).optional(),
41581
+ meta: record(string(), unknown()).optional()
41582
+ })),
41583
+ /** Pass as `before` for the next older page; null when nothing older exists. */
41584
+ nextBefore: string().nullable(),
41585
+ /** Pass as `after` to read what arrived since; null when unknown. */
41586
+ nextAfter: string().nullable(),
41587
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
41588
+ scannedBytes: number().int().nonnegative(),
41589
+ /**
41590
+ * True when the scan in this direction reached the end of the store.
41591
+ * False with fewer than `limit` entries means the budget ran out first —
41592
+ * call again with `nextBefore` to go on.
41593
+ */
41594
+ done: boolean(),
41595
+ /** True when `cancelRead` ended this slice early. */
41596
+ cancelled: boolean().optional()
41597
+ });
41598
+ var LogReadCapabilitiesSchema = object({
41599
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
41600
+ readable: boolean(),
41601
+ /** Why not, when `readable` is false — rendered next to the source. */
41602
+ reason: string().nullable(),
41603
+ /** Filters the provider applies itself. A false one is applied by nobody. */
41604
+ filters: object({
41605
+ deviceId: boolean(),
41606
+ addonId: boolean(),
41607
+ nodeId: boolean(),
41608
+ tags: boolean(),
41609
+ level: boolean(),
41610
+ text: boolean(),
41611
+ timeRange: boolean()
41612
+ }),
41613
+ /** How far back the store reaches, when the provider knows (days). */
41614
+ retentionDays: number().nullable()
41615
+ });
41616
+ 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() }), {
41617
+ kind: "mutation",
41618
+ auth: "admin"
41619
+ });
41473
41620
  /**
41474
41621
  * `login-method` — collection cap through which auth addons contribute
41475
41622
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -43187,9 +43334,11 @@ var alarmPanelCapability = {
43187
43334
  */
43188
43335
  durability: "restored",
43189
43336
  /**
43190
- * History (D850): none — enum state; arm/disarm history belongs in the events ledger.
43337
+ * History (D850): the panel's lifecycle state as an `enum` series —
43338
+ * change-only, no floor, so an `arming -> pending -> triggered` sequence of a
43339
+ * few seconds keeps every step. Who armed it stays in the events ledger.
43191
43340
  */
43192
- history: "none",
43341
+ history: { fields: { state: { kind: "enum" } } },
43193
43342
  /** Clock fields: written, but excluded from the compare that decides
43194
43343
  * whether persisting is worth a SQLite commit. */
43195
43344
  volatileStateFields: ["lastChangedAt"]
@@ -44067,6 +44216,33 @@ var NcRuleTargetSchema = object({
44067
44216
  params: record(string(), unknown()).optional()
44068
44217
  });
44069
44218
  /**
44219
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
44220
+ *
44221
+ * Every mode starts from the same CLEAN source frame of the trigger moment
44222
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
44223
+ * to the zone that fired the rule) and renders it once at send time:
44224
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
44225
+ * colour and every OTHER track visible at that instant outlined thin, each
44226
+ * labelled with class and confidence ("dog 87%").
44227
+ * - `crop` — the subject cut out of that frame around its box at that instant.
44228
+ * - `clean` — the whole scene with nothing drawn on it.
44229
+ * - `none` — no picture.
44230
+ *
44231
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
44232
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
44233
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
44234
+ * ship a crop on one event and a boxed scene on the next depending on which
44235
+ * stored kind had landed.
44236
+ */
44237
+ var NcMediaImageSchema = _enum([
44238
+ "scene-boxes",
44239
+ "crop",
44240
+ "clean",
44241
+ "none"
44242
+ ]);
44243
+ /**
44244
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
44245
+ *
44070
44246
  * Media attachment policy (P1 still-image subset).
44071
44247
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
44072
44248
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -44080,6 +44256,8 @@ var NcRuleTargetSchema = object({
44080
44256
  * - `none` — no attachment.
44081
44257
  */
44082
44258
  /**
44259
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
44260
+ *
44083
44261
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
44084
44262
  * conflate it with the selection strategy and betray the request: asking for
44085
44263
  * the clean scene frame on an object-event owner used to start at
@@ -44108,16 +44286,29 @@ var NcMediaFrameSchema = _enum([
44108
44286
  */
44109
44287
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
44110
44288
  var NcMediaPolicySchema = object({
44289
+ /**
44290
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
44291
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
44292
+ * triple below, at load and at every write, and the store keeps only this.
44293
+ */
44294
+ image: NcMediaImageSchema.optional(),
44295
+ /**
44296
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
44297
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
44298
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
44299
+ * Replaces `zoneCrop`.
44300
+ */
44301
+ showTriggerZone: boolean().optional(),
44302
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
44111
44303
  attach: _enum([
44112
44304
  "best",
44113
44305
  "best-matching",
44114
44306
  "keyFrame",
44115
44307
  "none"
44116
- ]).default("best"),
44117
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
44308
+ ]).optional(),
44309
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
44118
44310
  frame: NcMediaFrameSchema.optional(),
44119
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
44120
- * "show me the ZONE", not the whole scene or the subject crop. */
44311
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
44121
44312
  zoneCrop: boolean().optional(),
44122
44313
  /**
44123
44314
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -44289,7 +44480,9 @@ var NcRuleInputSchema = object({
44289
44480
  * targets.
44290
44481
  */
44291
44482
  targetUsers: array(string()).optional(),
44292
- media: NcMediaPolicySchema.default({ attach: "best" }),
44483
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
44484
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
44485
+ media: NcMediaPolicySchema.default({}),
44293
44486
  throttle: NcThrottleSchema.default({
44294
44487
  cooldownSec: 60,
44295
44488
  scope: "rule-device"
@@ -45226,13 +45419,37 @@ var NcAlarmModeOpeningsSchema = object({
45226
45419
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
45227
45420
  unknown: array(number().int())
45228
45421
  });
45422
+ /**
45423
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
45424
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
45425
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
45426
+ * never looks fully armed (D62: off must never look like broken).
45427
+ */
45428
+ var NcAlarmInputBypassViewSchema = object({
45429
+ ruleId: string(),
45430
+ /** The rule's current name (its frozen name when the rule is gone). */
45431
+ ruleName: string(),
45432
+ /** The input: the sensor of the match, else its camera. */
45433
+ deviceId: number().int(),
45434
+ /** The input's current name. */
45435
+ name: string(),
45436
+ /** When it was bypassed (ms epoch). */
45437
+ since: number(),
45438
+ /** Triggers from this input dropped since. */
45439
+ dropped: number().int().min(0)
45440
+ });
45229
45441
  var NcAlarmLiveSchema = object({
45230
45442
  state: AlarmStateSchema,
45231
45443
  /** The mode being armed into (exit delay) or held; null when disarmed. */
45232
45444
  targetMode: AlarmArmModeSchema.nullable(),
45233
45445
  availableModes: array(AlarmArmModeSchema),
45234
45446
  openings: array(NcAlarmModeOpeningsSchema),
45235
- exclusions: array(NcAlarmExclusionViewSchema)
45447
+ exclusions: array(NcAlarmExclusionViewSchema),
45448
+ /**
45449
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
45450
+ * Defaulted so an older hub answer still parses (as "none known").
45451
+ */
45452
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
45236
45453
  });
45237
45454
  var NcAlarmConfigSchema = object({
45238
45455
  /**
@@ -55959,9 +56176,11 @@ var connectivityCapability = {
55959
56176
  */
55960
56177
  durability: "restored",
55961
56178
  /**
55962
- * History (D850): none — duplicates device-status.online (one authority for availability).
56179
+ * History (D850): `connected` as a boolean series — change-only, no floor. It
56180
+ * is the upstream entity's own link (a HA connectivity sensor), not the
56181
+ * device's reachability, which stays `device-status.online`.
55963
56182
  */
55964
- history: "none",
56183
+ history: { fields: { connected: { kind: "boolean" } } },
55965
56184
  /** Clock fields: written, but excluded from the compare that decides
55966
56185
  * whether persisting is worth a SQLite commit. */
55967
56186
  volatileStateFields: ["lastChangedAt"]
@@ -56785,11 +57004,22 @@ var dishwasherCapability = {
56785
57004
  },
56786
57005
  runtimeState: DishwasherStatusSchema,
56787
57006
  durability: "session",
56788
- history: { fields: { progressPercent: {
56789
- kind: "gauge",
56790
- unit: "%",
56791
- deadband: 2
56792
- } } }
57007
+ history: { fields: {
57008
+ progressPercent: {
57009
+ kind: "gauge",
57010
+ unit: "%",
57011
+ deadband: 2
57012
+ },
57013
+ state: { kind: "enum" },
57014
+ operationState: { kind: "enum" },
57015
+ remainingSeconds: {
57016
+ kind: "gauge",
57017
+ unit: "s",
57018
+ minIntervalMs: 6e4
57019
+ },
57020
+ doorOpen: { kind: "boolean" },
57021
+ powerOn: { kind: "boolean" }
57022
+ } }
56793
57023
  };
56794
57024
  var DoorbellStatusSchema = object({
56795
57025
  /** Ms epoch of the last press. null = never observed since this provider started. */
@@ -56906,9 +57136,15 @@ var enumSensorCapability = {
56906
57136
  */
56907
57137
  durability: "restored",
56908
57138
  /**
56909
- * History (D850): none — text/enum state has no history (non-goal).
57139
+ * History (D850): the value as an `enum` series (an appliance's program or
57140
+ * operation state, an HVAC action). The option set is per device, so the
57141
+ * value list is LEARNED as values are first seen (bounded). A sensor with a
57142
+ * `format` carries a timestamp, not a state, and is not recorded.
56910
57143
  */
56911
- history: "none",
57144
+ history: { fields: { value: {
57145
+ kind: "enum",
57146
+ skipWhenSet: "format"
57147
+ } } },
56912
57148
  /** Clock fields: written, but excluded from the compare that decides
56913
57149
  * whether persisting is worth a SQLite commit. */
56914
57150
  volatileStateFields: ["lastFetchedAt"]
@@ -58882,9 +59118,10 @@ var lockControlCapability = {
58882
59118
  */
58883
59119
  durability: "restored",
58884
59120
  /**
58885
- * History (D850): none — enum state; lock events belong in the events ledger.
59121
+ * History (D850): the lock's state as an `enum` series — change-only, no
59122
+ * floor: a jam or an unlock lasting seconds is the edge an operator looks for.
58886
59123
  */
58887
- history: "none",
59124
+ history: { fields: { state: { kind: "enum" } } },
58888
59125
  /** Clock fields: written, but excluded from the compare that decides
58889
59126
  * whether persisting is worth a SQLite commit. */
58890
59127
  volatileStateFields: ["lastChangedAt"]
@@ -59058,9 +59295,18 @@ var mediaPlayerCapability = {
59058
59295
  */
59059
59296
  durability: "session",
59060
59297
  /**
59061
- * History (D850): none — `positionMs` moves continuously while playing; volume is transient.
59298
+ * History (D850): volume (a level an operator or an automation sets; the
59299
+ * default 10 s floor folds a slider drag into its end value) and mute.
59300
+ * `positionMs` is not recorded: it moves continuously while playing.
59062
59301
  */
59063
- history: "none"
59302
+ history: { fields: {
59303
+ volumeLevel: {
59304
+ kind: "gauge",
59305
+ unit: "%",
59306
+ deadband: 1
59307
+ },
59308
+ isMuted: { kind: "boolean" }
59309
+ } }
59064
59310
  };
59065
59311
  /**
59066
59312
  * mesh-network — collection cap for mesh-VPN providers.
@@ -61204,9 +61450,24 @@ var NpuInfoSchema = object({
61204
61450
  name: string().optional(),
61205
61451
  generation: _enum(["xdna1", "xdna2"]).optional()
61206
61452
  });
61453
+ var CoralBusSchema = _enum(["usb", "pci"]);
61207
61454
  var CoralInfoSchema = object({
61208
61455
  type: literal("coral-edgetpu"),
61209
- bus: string().optional()
61456
+ /** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
61457
+ bus: string().optional(),
61458
+ /** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
61459
+ count: number().int().nonnegative().optional(),
61460
+ /** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
61461
+ units: array(object({
61462
+ bus: CoralBusSchema,
61463
+ count: number().int().nonnegative()
61464
+ })).readonly().optional(),
61465
+ /** Present-but-unusable units, each with its typed reason (never "absent"). */
61466
+ unavailable: array(object({
61467
+ bus: CoralBusSchema,
61468
+ count: number().int().nonnegative(),
61469
+ reason: _enum(["driver-missing", "device-not-accessible"])
61470
+ })).readonly().optional()
61210
61471
  });
61211
61472
  var HardwareInfoSchema = object({
61212
61473
  platform: HardwarePlatformSchema,
@@ -64353,9 +64614,29 @@ var streamParamsCapability = {
64353
64614
  */
64354
64615
  durability: "restored",
64355
64616
  /**
64356
- * History (D850): none — encoder configuration.
64617
+ * History (D850): the configured bitrate and frame rate of the main and sub
64618
+ * profiles. Configuration, so change-only on the default floor: a point is an
64619
+ * operator's (or a tuner's) edit, which is exactly what a chart of a stream's
64620
+ * quality over time must show.
64357
64621
  */
64358
- history: "none",
64622
+ history: { fields: {
64623
+ "main.bitrate": {
64624
+ kind: "gauge",
64625
+ unit: "kbps"
64626
+ },
64627
+ "main.framerate": {
64628
+ kind: "gauge",
64629
+ unit: "fps"
64630
+ },
64631
+ "sub.bitrate": {
64632
+ kind: "gauge",
64633
+ unit: "kbps"
64634
+ },
64635
+ "sub.framerate": {
64636
+ kind: "gauge",
64637
+ unit: "fps"
64638
+ }
64639
+ } },
64359
64640
  /** Clock fields: written, but excluded from the compare that decides
64360
64641
  * whether persisting is worth a SQLite commit. */
64361
64642
  volatileStateFields: ["lastFetchedAt"]
@@ -67533,6 +67814,15 @@ var BaseDevice = class {
67533
67814
  * Drivers can use the `getProbeFlags()` helper to read the flag bag
67534
67815
  * with a typed cast.
67535
67816
  *
67817
+ * Answer what you KNOW. A plain array is read as the complete list only
67818
+ * while this device is `online` and probed; return
67819
+ * `accessoryChildrenUnknown(reason)` whenever you cannot know the list right
67820
+ * now (no credentials, parent not connected, a failed or partial read) —
67821
+ * the kernel then deletes nothing. Return `accessoryChildrenComplete(list)`
67822
+ * to say "connected, and this is the complete list" explicitly. A shrink is
67823
+ * deleted only after a second agreeing complete read on a later probe (D49;
67824
+ * `packages/system/src/kernel/moleculer/accessory-prune-gate.ts`).
67825
+ *
67536
67826
  * Default: no children.
67537
67827
  */
67538
67828
  getAccessoryChildren() {
@@ -71664,7 +71954,19 @@ Object.freeze({
71664
71954
  addonId: null,
71665
71955
  access: "view"
71666
71956
  },
71667
- "logDestination.query": {
71957
+ "logDestination.cancelRead": {
71958
+ capName: "log-destination",
71959
+ capScope: "system",
71960
+ addonId: null,
71961
+ access: "create"
71962
+ },
71963
+ "logDestination.describeRead": {
71964
+ capName: "log-destination",
71965
+ capScope: "system",
71966
+ addonId: null,
71967
+ access: "view"
71968
+ },
71969
+ "logDestination.read": {
71668
71970
  capName: "log-destination",
71669
71971
  capScope: "system",
71670
71972
  addonId: null,
@@ -77671,6 +77973,11 @@ Object.freeze({
77671
77973
  form: "single",
77672
77974
  optional: false
77673
77975
  }],
77976
+ "logDestination.read": [{
77977
+ name: "deviceId",
77978
+ form: "single",
77979
+ optional: true
77980
+ }],
77674
77981
  "mediaPlayer.getStatus": [{
77675
77982
  name: "deviceId",
77676
77983
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-petkit",
3
- "version": "0.2.131",
3
+ "version": "0.2.133",
4
4
  "description": "PetKit smart-feeder device-provider addon for CamStack — wraps the @apocaliss92/nodepetkit PetKit cloud client",
5
5
  "keywords": [
6
6
  "camstack",