@camstack/addon-terminal 0.1.137 → 0.1.138

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 +332 -40
  2. package/dist/addon.mjs +332 -40
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -5446,7 +5446,7 @@ var ZodIssueCode = {
5446
5446
  var ZodFirstPartyTypeKind;
5447
5447
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5448
5448
  //#endregion
5449
- //#region ../types/dist/sleep-yKL5gfrH.mjs
5449
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5450
5450
  /**
5451
5451
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5452
5452
  * window to float samples (D455).
@@ -17117,7 +17117,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
17117
17117
  kind: literal("node"),
17118
17118
  nodeId: string().min(1)
17119
17119
  })]);
17120
+ /**
17121
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
17122
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
17123
+ * meaning); a rollup keeps the time spent in each state (`states`).
17124
+ */
17120
17125
  var DeviceHistoryKindSchema = _enum([
17126
+ "gauge",
17127
+ "counter",
17128
+ "boolean",
17129
+ "enum"
17130
+ ]);
17131
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
17132
+ var DeviceHistoryProducerKindSchema = _enum([
17121
17133
  "gauge",
17122
17134
  "counter",
17123
17135
  "boolean"
@@ -17154,7 +17166,13 @@ var SeriesInfoSchema = object({
17154
17166
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
17155
17167
  unit: string().nullable(),
17156
17168
  displayName: string(),
17157
- source: _enum(["cap", "addon"]),
17169
+ source: _enum([
17170
+ "cap",
17171
+ "addon",
17172
+ "derived"
17173
+ ]),
17174
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
17175
+ values: array(string()).readonly().nullable(),
17158
17176
  firstTs: number(),
17159
17177
  lastTs: number()
17160
17178
  });
@@ -17168,17 +17186,31 @@ var QueryPointSchema = object({
17168
17186
  twMean: number().nullable(),
17169
17187
  min: number(),
17170
17188
  max: number(),
17171
- /** `null` is unknown, never zero (D393). */
17172
- last: number().nullable()
17189
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
17190
+ last: number().nullable(),
17191
+ /**
17192
+ * The increase over the point: a `counter`'s growth since the previous point
17193
+ * or bucket (a drop is a reset, counted from zero), and for
17194
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
17195
+ * every other kind, and when it cannot be known.
17196
+ */
17197
+ delta: number().nullable(),
17198
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
17199
+ state: string().nullable(),
17200
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
17201
+ states: record(string(), number()).nullable()
17173
17202
  });
17174
17203
  var QuerySeriesSchema = object({
17175
17204
  scope: string(),
17176
17205
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
17177
17206
  before: object({
17178
17207
  t: number(),
17179
- value: number().nullable()
17208
+ value: number().nullable(),
17209
+ state: string().nullable()
17180
17210
  }).nullable(),
17181
- points: array(QueryPointSchema).readonly()
17211
+ points: array(QueryPointSchema).readonly(),
17212
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
17213
+ derivedFrom: string().nullable()
17182
17214
  });
17183
17215
  /** The window part of a query, shared by the device and node forms. */
17184
17216
  var QueryWindowShape = {
@@ -17194,6 +17226,23 @@ var QueryResultSchema = object({
17194
17226
  series: array(QuerySeriesSchema).readonly(),
17195
17227
  truncated: boolean()
17196
17228
  });
17229
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
17230
+ var QueryManyItemSchema = union([object({
17231
+ deviceId: number().int(),
17232
+ key: string(),
17233
+ scope: string().optional()
17234
+ }), object({
17235
+ forNodeId: string().min(1),
17236
+ key: string(),
17237
+ scope: string().optional()
17238
+ })]);
17239
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
17240
+ ok: literal(true),
17241
+ result: QueryResultSchema
17242
+ }), object({
17243
+ ok: literal(false),
17244
+ error: string()
17245
+ })]);
17197
17246
  var TierStatusSchema = object({
17198
17247
  tier: DeviceHistoryResolutionSchema,
17199
17248
  /** `null` until the first background count answered. */
@@ -17249,16 +17298,22 @@ var DeviceHistoryStatusSchema = object({
17249
17298
  lastRefreshAt: number().nullable()
17250
17299
  })
17251
17300
  });
17252
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17301
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17253
17302
  deviceId: number().int(),
17254
17303
  ...QueryWindowShape
17255
17304
  }), QueryResultSchema), method(object({
17256
- nodeId: string().min(1),
17305
+ forNodeId: string().min(1),
17257
17306
  ...QueryWindowShape
17258
17307
  }), QueryResultSchema, { auth: "admin" }), method(object({
17308
+ items: array(QueryManyItemSchema).min(1).max(24),
17309
+ from: QueryWindowShape.from,
17310
+ to: QueryWindowShape.to,
17311
+ resolution: QueryWindowShape.resolution,
17312
+ maxPoints: QueryWindowShape.maxPoints
17313
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
17259
17314
  name: string().regex(/^[a-z0-9-]+$/),
17260
17315
  subjectKind: _enum(["device", "node"]),
17261
- kind: DeviceHistoryKindSchema,
17316
+ kind: DeviceHistoryProducerKindSchema,
17262
17317
  unit: string().optional(),
17263
17318
  displayName: string().min(1),
17264
17319
  ingest: _enum(["points", "buckets"])
@@ -40386,14 +40441,106 @@ var LogEntrySchema = object({
40386
40441
  meta: record(string(), unknown()).optional(),
40387
40442
  tags: record(string(), string()).optional()
40388
40443
  });
40389
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
40390
- scope: array(string()).optional(),
40444
+ /**
40445
+ * A history READ against one destination (D898).
40446
+ *
40447
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
40448
+ * browser applied after the limit is what made a rare device's lines
40449
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
40450
+ * minted (opaque to everyone else): a file position for the rotated files, a
40451
+ * nanosecond timestamp for Loki.
40452
+ *
40453
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
40454
+ * store answers `done: false` with the cursor it reached and the bytes it
40455
+ * scanned, and the caller decides whether to go on. That is what makes a long
40456
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
40457
+ * flight, and not asking for the next slice ends the scan.
40458
+ */
40459
+ var LogReadQuerySchema = object({
40460
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
40461
+ requestId: string().min(1).max(64).optional(),
40462
+ /** The device the line is about (`tags.deviceId`, numeric). */
40463
+ deviceId: number().int().optional(),
40464
+ /**
40465
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
40466
+ * match. Not `addonId`: a cap router reads that name as "which provider".
40467
+ */
40468
+ fromAddonId: string().min(1).max(200).optional(),
40469
+ /**
40470
+ * The emitting node: matches the agent that emitted the line, the node
40471
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
40472
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
40473
+ * name as "which node's provider".
40474
+ */
40475
+ fromNodeId: string().min(1).max(200).optional(),
40476
+ /** Any other tag, exact match (AND). */
40477
+ tags: record(string(), union([string(), number()])).optional(),
40478
+ /** Severity FLOOR: this level and above. */
40391
40479
  level: LogLevelSchema.optional(),
40392
- since: date().optional(),
40393
- until: date().optional(),
40394
- limit: number().optional(),
40395
- tags: record(string(), string()).optional()
40396
- }), array(LogEntrySchema).readonly());
40480
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
40481
+ text: string().min(1).max(200).optional(),
40482
+ /** Epoch ms, inclusive. */
40483
+ since: number().optional(),
40484
+ /** Epoch ms, inclusive. */
40485
+ until: number().optional(),
40486
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
40487
+ before: string().min(1).max(1024).optional(),
40488
+ /** Newer than this cursor (exclusive). */
40489
+ after: string().min(1).max(1024).optional(),
40490
+ limit: number().int().min(1).max(1e3).optional(),
40491
+ /** Wall-clock bound of this slice. The provider caps it. */
40492
+ budgetMs: number().int().min(50).max(1e4).optional()
40493
+ });
40494
+ var LogReadResultSchema = object({
40495
+ /** Newest first. */
40496
+ entries: array(object({
40497
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
40498
+ id: string().optional(),
40499
+ /** Epoch ms. */
40500
+ timestamp: number(),
40501
+ level: LogLevelSchema,
40502
+ scope: string().optional(),
40503
+ message: string(),
40504
+ tags: record(string(), union([string(), number()])).optional(),
40505
+ meta: record(string(), unknown()).optional()
40506
+ })),
40507
+ /** Pass as `before` for the next older page; null when nothing older exists. */
40508
+ nextBefore: string().nullable(),
40509
+ /** Pass as `after` to read what arrived since; null when unknown. */
40510
+ nextAfter: string().nullable(),
40511
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
40512
+ scannedBytes: number().int().nonnegative(),
40513
+ /**
40514
+ * True when the scan in this direction reached the end of the store.
40515
+ * False with fewer than `limit` entries means the budget ran out first —
40516
+ * call again with `nextBefore` to go on.
40517
+ */
40518
+ done: boolean(),
40519
+ /** True when `cancelRead` ended this slice early. */
40520
+ cancelled: boolean().optional()
40521
+ });
40522
+ var LogReadCapabilitiesSchema = object({
40523
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
40524
+ readable: boolean(),
40525
+ /** Why not, when `readable` is false — rendered next to the source. */
40526
+ reason: string().nullable(),
40527
+ /** Filters the provider applies itself. A false one is applied by nobody. */
40528
+ filters: object({
40529
+ deviceId: boolean(),
40530
+ addonId: boolean(),
40531
+ nodeId: boolean(),
40532
+ tags: boolean(),
40533
+ level: boolean(),
40534
+ text: boolean(),
40535
+ timeRange: boolean()
40536
+ }),
40537
+ /** How far back the store reaches, when the provider knows (days). */
40538
+ retentionDays: number().nullable()
40539
+ });
40540
+ 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() }), {
40541
+ kind: "mutation",
40542
+ auth: "admin"
40543
+ });
40397
40544
  /**
40398
40545
  * `login-method` — collection cap through which auth addons contribute
40399
40546
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -42111,9 +42258,11 @@ var alarmPanelCapability = {
42111
42258
  */
42112
42259
  durability: "restored",
42113
42260
  /**
42114
- * History (D850): none — enum state; arm/disarm history belongs in the events ledger.
42261
+ * History (D850): the panel's lifecycle state as an `enum` series —
42262
+ * change-only, no floor, so an `arming -> pending -> triggered` sequence of a
42263
+ * few seconds keeps every step. Who armed it stays in the events ledger.
42115
42264
  */
42116
- history: "none",
42265
+ history: { fields: { state: { kind: "enum" } } },
42117
42266
  /** Clock fields: written, but excluded from the compare that decides
42118
42267
  * whether persisting is worth a SQLite commit. */
42119
42268
  volatileStateFields: ["lastChangedAt"]
@@ -42991,6 +43140,33 @@ var NcRuleTargetSchema = object({
42991
43140
  params: record(string(), unknown()).optional()
42992
43141
  });
42993
43142
  /**
43143
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
43144
+ *
43145
+ * Every mode starts from the same CLEAN source frame of the trigger moment
43146
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
43147
+ * to the zone that fired the rule) and renders it once at send time:
43148
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
43149
+ * colour and every OTHER track visible at that instant outlined thin, each
43150
+ * labelled with class and confidence ("dog 87%").
43151
+ * - `crop` — the subject cut out of that frame around its box at that instant.
43152
+ * - `clean` — the whole scene with nothing drawn on it.
43153
+ * - `none` — no picture.
43154
+ *
43155
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
43156
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
43157
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
43158
+ * ship a crop on one event and a boxed scene on the next depending on which
43159
+ * stored kind had landed.
43160
+ */
43161
+ var NcMediaImageSchema = _enum([
43162
+ "scene-boxes",
43163
+ "crop",
43164
+ "clean",
43165
+ "none"
43166
+ ]);
43167
+ /**
43168
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43169
+ *
42994
43170
  * Media attachment policy (P1 still-image subset).
42995
43171
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
42996
43172
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -43004,6 +43180,8 @@ var NcRuleTargetSchema = object({
43004
43180
  * - `none` — no attachment.
43005
43181
  */
43006
43182
  /**
43183
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43184
+ *
43007
43185
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
43008
43186
  * conflate it with the selection strategy and betray the request: asking for
43009
43187
  * the clean scene frame on an object-event owner used to start at
@@ -43032,16 +43210,29 @@ var NcMediaFrameSchema = _enum([
43032
43210
  */
43033
43211
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
43034
43212
  var NcMediaPolicySchema = object({
43213
+ /**
43214
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
43215
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
43216
+ * triple below, at load and at every write, and the store keeps only this.
43217
+ */
43218
+ image: NcMediaImageSchema.optional(),
43219
+ /**
43220
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
43221
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
43222
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
43223
+ * Replaces `zoneCrop`.
43224
+ */
43225
+ showTriggerZone: boolean().optional(),
43226
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43035
43227
  attach: _enum([
43036
43228
  "best",
43037
43229
  "best-matching",
43038
43230
  "keyFrame",
43039
43231
  "none"
43040
- ]).default("best"),
43041
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
43232
+ ]).optional(),
43233
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43042
43234
  frame: NcMediaFrameSchema.optional(),
43043
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
43044
- * "show me the ZONE", not the whole scene or the subject crop. */
43235
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
43045
43236
  zoneCrop: boolean().optional(),
43046
43237
  /**
43047
43238
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -43213,7 +43404,9 @@ var NcRuleInputSchema = object({
43213
43404
  * targets.
43214
43405
  */
43215
43406
  targetUsers: array(string()).optional(),
43216
- media: NcMediaPolicySchema.default({ attach: "best" }),
43407
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
43408
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
43409
+ media: NcMediaPolicySchema.default({}),
43217
43410
  throttle: NcThrottleSchema.default({
43218
43411
  cooldownSec: 60,
43219
43412
  scope: "rule-device"
@@ -44150,13 +44343,37 @@ var NcAlarmModeOpeningsSchema = object({
44150
44343
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
44151
44344
  unknown: array(number().int())
44152
44345
  });
44346
+ /**
44347
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
44348
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
44349
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
44350
+ * never looks fully armed (D62: off must never look like broken).
44351
+ */
44352
+ var NcAlarmInputBypassViewSchema = object({
44353
+ ruleId: string(),
44354
+ /** The rule's current name (its frozen name when the rule is gone). */
44355
+ ruleName: string(),
44356
+ /** The input: the sensor of the match, else its camera. */
44357
+ deviceId: number().int(),
44358
+ /** The input's current name. */
44359
+ name: string(),
44360
+ /** When it was bypassed (ms epoch). */
44361
+ since: number(),
44362
+ /** Triggers from this input dropped since. */
44363
+ dropped: number().int().min(0)
44364
+ });
44153
44365
  var NcAlarmLiveSchema = object({
44154
44366
  state: AlarmStateSchema,
44155
44367
  /** The mode being armed into (exit delay) or held; null when disarmed. */
44156
44368
  targetMode: AlarmArmModeSchema.nullable(),
44157
44369
  availableModes: array(AlarmArmModeSchema),
44158
44370
  openings: array(NcAlarmModeOpeningsSchema),
44159
- exclusions: array(NcAlarmExclusionViewSchema)
44371
+ exclusions: array(NcAlarmExclusionViewSchema),
44372
+ /**
44373
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
44374
+ * Defaulted so an older hub answer still parses (as "none known").
44375
+ */
44376
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
44160
44377
  });
44161
44378
  var NcAlarmConfigSchema = object({
44162
44379
  /**
@@ -55023,9 +55240,11 @@ var connectivityCapability = {
55023
55240
  */
55024
55241
  durability: "restored",
55025
55242
  /**
55026
- * History (D850): none — duplicates device-status.online (one authority for availability).
55243
+ * History (D850): `connected` as a boolean series — change-only, no floor. It
55244
+ * is the upstream entity's own link (a HA connectivity sensor), not the
55245
+ * device's reachability, which stays `device-status.online`.
55027
55246
  */
55028
- history: "none",
55247
+ history: { fields: { connected: { kind: "boolean" } } },
55029
55248
  /** Clock fields: written, but excluded from the compare that decides
55030
55249
  * whether persisting is worth a SQLite commit. */
55031
55250
  volatileStateFields: ["lastChangedAt"]
@@ -55849,11 +56068,22 @@ var dishwasherCapability = {
55849
56068
  },
55850
56069
  runtimeState: DishwasherStatusSchema,
55851
56070
  durability: "session",
55852
- history: { fields: { progressPercent: {
55853
- kind: "gauge",
55854
- unit: "%",
55855
- deadband: 2
55856
- } } }
56071
+ history: { fields: {
56072
+ progressPercent: {
56073
+ kind: "gauge",
56074
+ unit: "%",
56075
+ deadband: 2
56076
+ },
56077
+ state: { kind: "enum" },
56078
+ operationState: { kind: "enum" },
56079
+ remainingSeconds: {
56080
+ kind: "gauge",
56081
+ unit: "s",
56082
+ minIntervalMs: 6e4
56083
+ },
56084
+ doorOpen: { kind: "boolean" },
56085
+ powerOn: { kind: "boolean" }
56086
+ } }
55857
56087
  };
55858
56088
  var DoorbellStatusSchema = object({
55859
56089
  /** Ms epoch of the last press. null = never observed since this provider started. */
@@ -55970,9 +56200,15 @@ var enumSensorCapability = {
55970
56200
  */
55971
56201
  durability: "restored",
55972
56202
  /**
55973
- * History (D850): none — text/enum state has no history (non-goal).
56203
+ * History (D850): the value as an `enum` series (an appliance's program or
56204
+ * operation state, an HVAC action). The option set is per device, so the
56205
+ * value list is LEARNED as values are first seen (bounded). A sensor with a
56206
+ * `format` carries a timestamp, not a state, and is not recorded.
55974
56207
  */
55975
- history: "none",
56208
+ history: { fields: { value: {
56209
+ kind: "enum",
56210
+ skipWhenSet: "format"
56211
+ } } },
55976
56212
  /** Clock fields: written, but excluded from the compare that decides
55977
56213
  * whether persisting is worth a SQLite commit. */
55978
56214
  volatileStateFields: ["lastFetchedAt"]
@@ -57946,9 +58182,10 @@ var lockControlCapability = {
57946
58182
  */
57947
58183
  durability: "restored",
57948
58184
  /**
57949
- * History (D850): none — enum state; lock events belong in the events ledger.
58185
+ * History (D850): the lock's state as an `enum` series — change-only, no
58186
+ * floor: a jam or an unlock lasting seconds is the edge an operator looks for.
57950
58187
  */
57951
- history: "none",
58188
+ history: { fields: { state: { kind: "enum" } } },
57952
58189
  /** Clock fields: written, but excluded from the compare that decides
57953
58190
  * whether persisting is worth a SQLite commit. */
57954
58191
  volatileStateFields: ["lastChangedAt"]
@@ -58122,9 +58359,18 @@ var mediaPlayerCapability = {
58122
58359
  */
58123
58360
  durability: "session",
58124
58361
  /**
58125
- * History (D850): none — `positionMs` moves continuously while playing; volume is transient.
58362
+ * History (D850): volume (a level an operator or an automation sets; the
58363
+ * default 10 s floor folds a slider drag into its end value) and mute.
58364
+ * `positionMs` is not recorded: it moves continuously while playing.
58126
58365
  */
58127
- history: "none"
58366
+ history: { fields: {
58367
+ volumeLevel: {
58368
+ kind: "gauge",
58369
+ unit: "%",
58370
+ deadband: 1
58371
+ },
58372
+ isMuted: { kind: "boolean" }
58373
+ } }
58128
58374
  };
58129
58375
  /**
58130
58376
  * mesh-network — collection cap for mesh-VPN providers.
@@ -63417,9 +63663,29 @@ var streamParamsCapability = {
63417
63663
  */
63418
63664
  durability: "restored",
63419
63665
  /**
63420
- * History (D850): none — encoder configuration.
63666
+ * History (D850): the configured bitrate and frame rate of the main and sub
63667
+ * profiles. Configuration, so change-only on the default floor: a point is an
63668
+ * operator's (or a tuner's) edit, which is exactly what a chart of a stream's
63669
+ * quality over time must show.
63421
63670
  */
63422
- history: "none",
63671
+ history: { fields: {
63672
+ "main.bitrate": {
63673
+ kind: "gauge",
63674
+ unit: "kbps"
63675
+ },
63676
+ "main.framerate": {
63677
+ kind: "gauge",
63678
+ unit: "fps"
63679
+ },
63680
+ "sub.bitrate": {
63681
+ kind: "gauge",
63682
+ unit: "kbps"
63683
+ },
63684
+ "sub.framerate": {
63685
+ kind: "gauge",
63686
+ unit: "fps"
63687
+ }
63688
+ } },
63423
63689
  /** Clock fields: written, but excluded from the compare that decides
63424
63690
  * whether persisting is worth a SQLite commit. */
63425
63691
  volatileStateFields: ["lastFetchedAt"]
@@ -66597,6 +66863,15 @@ var BaseDevice = class {
66597
66863
  * Drivers can use the `getProbeFlags()` helper to read the flag bag
66598
66864
  * with a typed cast.
66599
66865
  *
66866
+ * Answer what you KNOW. A plain array is read as the complete list only
66867
+ * while this device is `online` and probed; return
66868
+ * `accessoryChildrenUnknown(reason)` whenever you cannot know the list right
66869
+ * now (no credentials, parent not connected, a failed or partial read) —
66870
+ * the kernel then deletes nothing. Return `accessoryChildrenComplete(list)`
66871
+ * to say "connected, and this is the complete list" explicitly. A shrink is
66872
+ * deleted only after a second agreeing complete read on a later probe (D49;
66873
+ * `packages/system/src/kernel/moleculer/accessory-prune-gate.ts`).
66874
+ *
66600
66875
  * Default: no children.
66601
66876
  */
66602
66877
  getAccessoryChildren() {
@@ -70245,7 +70520,19 @@ Object.freeze({
70245
70520
  addonId: null,
70246
70521
  access: "view"
70247
70522
  },
70248
- "logDestination.query": {
70523
+ "logDestination.cancelRead": {
70524
+ capName: "log-destination",
70525
+ capScope: "system",
70526
+ addonId: null,
70527
+ access: "create"
70528
+ },
70529
+ "logDestination.describeRead": {
70530
+ capName: "log-destination",
70531
+ capScope: "system",
70532
+ addonId: null,
70533
+ access: "view"
70534
+ },
70535
+ "logDestination.read": {
70249
70536
  capName: "log-destination",
70250
70537
  capScope: "system",
70251
70538
  addonId: null,
@@ -76252,6 +76539,11 @@ Object.freeze({
76252
76539
  form: "single",
76253
76540
  optional: false
76254
76541
  }],
76542
+ "logDestination.read": [{
76543
+ name: "deviceId",
76544
+ form: "single",
76545
+ optional: true
76546
+ }],
76255
76547
  "mediaPlayer.getStatus": [{
76256
76548
  name: "deviceId",
76257
76549
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5423,7 +5423,7 @@ var ZodIssueCode = {
5423
5423
  var ZodFirstPartyTypeKind;
5424
5424
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5425
5425
  //#endregion
5426
- //#region ../types/dist/sleep-yKL5gfrH.mjs
5426
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5427
5427
  /**
5428
5428
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5429
5429
  * window to float samples (D455).
@@ -17094,7 +17094,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
17094
17094
  kind: literal("node"),
17095
17095
  nodeId: string().min(1)
17096
17096
  })]);
17097
+ /**
17098
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
17099
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
17100
+ * meaning); a rollup keeps the time spent in each state (`states`).
17101
+ */
17097
17102
  var DeviceHistoryKindSchema = _enum([
17103
+ "gauge",
17104
+ "counter",
17105
+ "boolean",
17106
+ "enum"
17107
+ ]);
17108
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
17109
+ var DeviceHistoryProducerKindSchema = _enum([
17098
17110
  "gauge",
17099
17111
  "counter",
17100
17112
  "boolean"
@@ -17131,7 +17143,13 @@ var SeriesInfoSchema = object({
17131
17143
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
17132
17144
  unit: string().nullable(),
17133
17145
  displayName: string(),
17134
- source: _enum(["cap", "addon"]),
17146
+ source: _enum([
17147
+ "cap",
17148
+ "addon",
17149
+ "derived"
17150
+ ]),
17151
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
17152
+ values: array(string()).readonly().nullable(),
17135
17153
  firstTs: number(),
17136
17154
  lastTs: number()
17137
17155
  });
@@ -17145,17 +17163,31 @@ var QueryPointSchema = object({
17145
17163
  twMean: number().nullable(),
17146
17164
  min: number(),
17147
17165
  max: number(),
17148
- /** `null` is unknown, never zero (D393). */
17149
- last: number().nullable()
17166
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
17167
+ last: number().nullable(),
17168
+ /**
17169
+ * The increase over the point: a `counter`'s growth since the previous point
17170
+ * or bucket (a drop is a reset, counted from zero), and for
17171
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
17172
+ * every other kind, and when it cannot be known.
17173
+ */
17174
+ delta: number().nullable(),
17175
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
17176
+ state: string().nullable(),
17177
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
17178
+ states: record(string(), number()).nullable()
17150
17179
  });
17151
17180
  var QuerySeriesSchema = object({
17152
17181
  scope: string(),
17153
17182
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
17154
17183
  before: object({
17155
17184
  t: number(),
17156
- value: number().nullable()
17185
+ value: number().nullable(),
17186
+ state: string().nullable()
17157
17187
  }).nullable(),
17158
- points: array(QueryPointSchema).readonly()
17188
+ points: array(QueryPointSchema).readonly(),
17189
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
17190
+ derivedFrom: string().nullable()
17159
17191
  });
17160
17192
  /** The window part of a query, shared by the device and node forms. */
17161
17193
  var QueryWindowShape = {
@@ -17171,6 +17203,23 @@ var QueryResultSchema = object({
17171
17203
  series: array(QuerySeriesSchema).readonly(),
17172
17204
  truncated: boolean()
17173
17205
  });
17206
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
17207
+ var QueryManyItemSchema = union([object({
17208
+ deviceId: number().int(),
17209
+ key: string(),
17210
+ scope: string().optional()
17211
+ }), object({
17212
+ forNodeId: string().min(1),
17213
+ key: string(),
17214
+ scope: string().optional()
17215
+ })]);
17216
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
17217
+ ok: literal(true),
17218
+ result: QueryResultSchema
17219
+ }), object({
17220
+ ok: literal(false),
17221
+ error: string()
17222
+ })]);
17174
17223
  var TierStatusSchema = object({
17175
17224
  tier: DeviceHistoryResolutionSchema,
17176
17225
  /** `null` until the first background count answered. */
@@ -17226,16 +17275,22 @@ var DeviceHistoryStatusSchema = object({
17226
17275
  lastRefreshAt: number().nullable()
17227
17276
  })
17228
17277
  });
17229
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17278
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17230
17279
  deviceId: number().int(),
17231
17280
  ...QueryWindowShape
17232
17281
  }), QueryResultSchema), method(object({
17233
- nodeId: string().min(1),
17282
+ forNodeId: string().min(1),
17234
17283
  ...QueryWindowShape
17235
17284
  }), QueryResultSchema, { auth: "admin" }), method(object({
17285
+ items: array(QueryManyItemSchema).min(1).max(24),
17286
+ from: QueryWindowShape.from,
17287
+ to: QueryWindowShape.to,
17288
+ resolution: QueryWindowShape.resolution,
17289
+ maxPoints: QueryWindowShape.maxPoints
17290
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
17236
17291
  name: string().regex(/^[a-z0-9-]+$/),
17237
17292
  subjectKind: _enum(["device", "node"]),
17238
- kind: DeviceHistoryKindSchema,
17293
+ kind: DeviceHistoryProducerKindSchema,
17239
17294
  unit: string().optional(),
17240
17295
  displayName: string().min(1),
17241
17296
  ingest: _enum(["points", "buckets"])
@@ -40363,14 +40418,106 @@ var LogEntrySchema = object({
40363
40418
  meta: record(string(), unknown()).optional(),
40364
40419
  tags: record(string(), string()).optional()
40365
40420
  });
40366
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
40367
- scope: array(string()).optional(),
40421
+ /**
40422
+ * A history READ against one destination (D898).
40423
+ *
40424
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
40425
+ * browser applied after the limit is what made a rare device's lines
40426
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
40427
+ * minted (opaque to everyone else): a file position for the rotated files, a
40428
+ * nanosecond timestamp for Loki.
40429
+ *
40430
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
40431
+ * store answers `done: false` with the cursor it reached and the bytes it
40432
+ * scanned, and the caller decides whether to go on. That is what makes a long
40433
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
40434
+ * flight, and not asking for the next slice ends the scan.
40435
+ */
40436
+ var LogReadQuerySchema = object({
40437
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
40438
+ requestId: string().min(1).max(64).optional(),
40439
+ /** The device the line is about (`tags.deviceId`, numeric). */
40440
+ deviceId: number().int().optional(),
40441
+ /**
40442
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
40443
+ * match. Not `addonId`: a cap router reads that name as "which provider".
40444
+ */
40445
+ fromAddonId: string().min(1).max(200).optional(),
40446
+ /**
40447
+ * The emitting node: matches the agent that emitted the line, the node
40448
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
40449
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
40450
+ * name as "which node's provider".
40451
+ */
40452
+ fromNodeId: string().min(1).max(200).optional(),
40453
+ /** Any other tag, exact match (AND). */
40454
+ tags: record(string(), union([string(), number()])).optional(),
40455
+ /** Severity FLOOR: this level and above. */
40368
40456
  level: LogLevelSchema.optional(),
40369
- since: date().optional(),
40370
- until: date().optional(),
40371
- limit: number().optional(),
40372
- tags: record(string(), string()).optional()
40373
- }), array(LogEntrySchema).readonly());
40457
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
40458
+ text: string().min(1).max(200).optional(),
40459
+ /** Epoch ms, inclusive. */
40460
+ since: number().optional(),
40461
+ /** Epoch ms, inclusive. */
40462
+ until: number().optional(),
40463
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
40464
+ before: string().min(1).max(1024).optional(),
40465
+ /** Newer than this cursor (exclusive). */
40466
+ after: string().min(1).max(1024).optional(),
40467
+ limit: number().int().min(1).max(1e3).optional(),
40468
+ /** Wall-clock bound of this slice. The provider caps it. */
40469
+ budgetMs: number().int().min(50).max(1e4).optional()
40470
+ });
40471
+ var LogReadResultSchema = object({
40472
+ /** Newest first. */
40473
+ entries: array(object({
40474
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
40475
+ id: string().optional(),
40476
+ /** Epoch ms. */
40477
+ timestamp: number(),
40478
+ level: LogLevelSchema,
40479
+ scope: string().optional(),
40480
+ message: string(),
40481
+ tags: record(string(), union([string(), number()])).optional(),
40482
+ meta: record(string(), unknown()).optional()
40483
+ })),
40484
+ /** Pass as `before` for the next older page; null when nothing older exists. */
40485
+ nextBefore: string().nullable(),
40486
+ /** Pass as `after` to read what arrived since; null when unknown. */
40487
+ nextAfter: string().nullable(),
40488
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
40489
+ scannedBytes: number().int().nonnegative(),
40490
+ /**
40491
+ * True when the scan in this direction reached the end of the store.
40492
+ * False with fewer than `limit` entries means the budget ran out first —
40493
+ * call again with `nextBefore` to go on.
40494
+ */
40495
+ done: boolean(),
40496
+ /** True when `cancelRead` ended this slice early. */
40497
+ cancelled: boolean().optional()
40498
+ });
40499
+ var LogReadCapabilitiesSchema = object({
40500
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
40501
+ readable: boolean(),
40502
+ /** Why not, when `readable` is false — rendered next to the source. */
40503
+ reason: string().nullable(),
40504
+ /** Filters the provider applies itself. A false one is applied by nobody. */
40505
+ filters: object({
40506
+ deviceId: boolean(),
40507
+ addonId: boolean(),
40508
+ nodeId: boolean(),
40509
+ tags: boolean(),
40510
+ level: boolean(),
40511
+ text: boolean(),
40512
+ timeRange: boolean()
40513
+ }),
40514
+ /** How far back the store reaches, when the provider knows (days). */
40515
+ retentionDays: number().nullable()
40516
+ });
40517
+ 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() }), {
40518
+ kind: "mutation",
40519
+ auth: "admin"
40520
+ });
40374
40521
  /**
40375
40522
  * `login-method` — collection cap through which auth addons contribute
40376
40523
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -42088,9 +42235,11 @@ var alarmPanelCapability = {
42088
42235
  */
42089
42236
  durability: "restored",
42090
42237
  /**
42091
- * History (D850): none — enum state; arm/disarm history belongs in the events ledger.
42238
+ * History (D850): the panel's lifecycle state as an `enum` series —
42239
+ * change-only, no floor, so an `arming -> pending -> triggered` sequence of a
42240
+ * few seconds keeps every step. Who armed it stays in the events ledger.
42092
42241
  */
42093
- history: "none",
42242
+ history: { fields: { state: { kind: "enum" } } },
42094
42243
  /** Clock fields: written, but excluded from the compare that decides
42095
42244
  * whether persisting is worth a SQLite commit. */
42096
42245
  volatileStateFields: ["lastChangedAt"]
@@ -42968,6 +43117,33 @@ var NcRuleTargetSchema = object({
42968
43117
  params: record(string(), unknown()).optional()
42969
43118
  });
42970
43119
  /**
43120
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
43121
+ *
43122
+ * Every mode starts from the same CLEAN source frame of the trigger moment
43123
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
43124
+ * to the zone that fired the rule) and renders it once at send time:
43125
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
43126
+ * colour and every OTHER track visible at that instant outlined thin, each
43127
+ * labelled with class and confidence ("dog 87%").
43128
+ * - `crop` — the subject cut out of that frame around its box at that instant.
43129
+ * - `clean` — the whole scene with nothing drawn on it.
43130
+ * - `none` — no picture.
43131
+ *
43132
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
43133
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
43134
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
43135
+ * ship a crop on one event and a boxed scene on the next depending on which
43136
+ * stored kind had landed.
43137
+ */
43138
+ var NcMediaImageSchema = _enum([
43139
+ "scene-boxes",
43140
+ "crop",
43141
+ "clean",
43142
+ "none"
43143
+ ]);
43144
+ /**
43145
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43146
+ *
42971
43147
  * Media attachment policy (P1 still-image subset).
42972
43148
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
42973
43149
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -42981,6 +43157,8 @@ var NcRuleTargetSchema = object({
42981
43157
  * - `none` — no attachment.
42982
43158
  */
42983
43159
  /**
43160
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43161
+ *
42984
43162
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
42985
43163
  * conflate it with the selection strategy and betray the request: asking for
42986
43164
  * the clean scene frame on an object-event owner used to start at
@@ -43009,16 +43187,29 @@ var NcMediaFrameSchema = _enum([
43009
43187
  */
43010
43188
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
43011
43189
  var NcMediaPolicySchema = object({
43190
+ /**
43191
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
43192
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
43193
+ * triple below, at load and at every write, and the store keeps only this.
43194
+ */
43195
+ image: NcMediaImageSchema.optional(),
43196
+ /**
43197
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
43198
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
43199
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
43200
+ * Replaces `zoneCrop`.
43201
+ */
43202
+ showTriggerZone: boolean().optional(),
43203
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43012
43204
  attach: _enum([
43013
43205
  "best",
43014
43206
  "best-matching",
43015
43207
  "keyFrame",
43016
43208
  "none"
43017
- ]).default("best"),
43018
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
43209
+ ]).optional(),
43210
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43019
43211
  frame: NcMediaFrameSchema.optional(),
43020
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
43021
- * "show me the ZONE", not the whole scene or the subject crop. */
43212
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
43022
43213
  zoneCrop: boolean().optional(),
43023
43214
  /**
43024
43215
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -43190,7 +43381,9 @@ var NcRuleInputSchema = object({
43190
43381
  * targets.
43191
43382
  */
43192
43383
  targetUsers: array(string()).optional(),
43193
- media: NcMediaPolicySchema.default({ attach: "best" }),
43384
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
43385
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
43386
+ media: NcMediaPolicySchema.default({}),
43194
43387
  throttle: NcThrottleSchema.default({
43195
43388
  cooldownSec: 60,
43196
43389
  scope: "rule-device"
@@ -44127,13 +44320,37 @@ var NcAlarmModeOpeningsSchema = object({
44127
44320
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
44128
44321
  unknown: array(number().int())
44129
44322
  });
44323
+ /**
44324
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
44325
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
44326
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
44327
+ * never looks fully armed (D62: off must never look like broken).
44328
+ */
44329
+ var NcAlarmInputBypassViewSchema = object({
44330
+ ruleId: string(),
44331
+ /** The rule's current name (its frozen name when the rule is gone). */
44332
+ ruleName: string(),
44333
+ /** The input: the sensor of the match, else its camera. */
44334
+ deviceId: number().int(),
44335
+ /** The input's current name. */
44336
+ name: string(),
44337
+ /** When it was bypassed (ms epoch). */
44338
+ since: number(),
44339
+ /** Triggers from this input dropped since. */
44340
+ dropped: number().int().min(0)
44341
+ });
44130
44342
  var NcAlarmLiveSchema = object({
44131
44343
  state: AlarmStateSchema,
44132
44344
  /** The mode being armed into (exit delay) or held; null when disarmed. */
44133
44345
  targetMode: AlarmArmModeSchema.nullable(),
44134
44346
  availableModes: array(AlarmArmModeSchema),
44135
44347
  openings: array(NcAlarmModeOpeningsSchema),
44136
- exclusions: array(NcAlarmExclusionViewSchema)
44348
+ exclusions: array(NcAlarmExclusionViewSchema),
44349
+ /**
44350
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
44351
+ * Defaulted so an older hub answer still parses (as "none known").
44352
+ */
44353
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
44137
44354
  });
44138
44355
  var NcAlarmConfigSchema = object({
44139
44356
  /**
@@ -55000,9 +55217,11 @@ var connectivityCapability = {
55000
55217
  */
55001
55218
  durability: "restored",
55002
55219
  /**
55003
- * History (D850): none — duplicates device-status.online (one authority for availability).
55220
+ * History (D850): `connected` as a boolean series — change-only, no floor. It
55221
+ * is the upstream entity's own link (a HA connectivity sensor), not the
55222
+ * device's reachability, which stays `device-status.online`.
55004
55223
  */
55005
- history: "none",
55224
+ history: { fields: { connected: { kind: "boolean" } } },
55006
55225
  /** Clock fields: written, but excluded from the compare that decides
55007
55226
  * whether persisting is worth a SQLite commit. */
55008
55227
  volatileStateFields: ["lastChangedAt"]
@@ -55826,11 +56045,22 @@ var dishwasherCapability = {
55826
56045
  },
55827
56046
  runtimeState: DishwasherStatusSchema,
55828
56047
  durability: "session",
55829
- history: { fields: { progressPercent: {
55830
- kind: "gauge",
55831
- unit: "%",
55832
- deadband: 2
55833
- } } }
56048
+ history: { fields: {
56049
+ progressPercent: {
56050
+ kind: "gauge",
56051
+ unit: "%",
56052
+ deadband: 2
56053
+ },
56054
+ state: { kind: "enum" },
56055
+ operationState: { kind: "enum" },
56056
+ remainingSeconds: {
56057
+ kind: "gauge",
56058
+ unit: "s",
56059
+ minIntervalMs: 6e4
56060
+ },
56061
+ doorOpen: { kind: "boolean" },
56062
+ powerOn: { kind: "boolean" }
56063
+ } }
55834
56064
  };
55835
56065
  var DoorbellStatusSchema = object({
55836
56066
  /** Ms epoch of the last press. null = never observed since this provider started. */
@@ -55947,9 +56177,15 @@ var enumSensorCapability = {
55947
56177
  */
55948
56178
  durability: "restored",
55949
56179
  /**
55950
- * History (D850): none — text/enum state has no history (non-goal).
56180
+ * History (D850): the value as an `enum` series (an appliance's program or
56181
+ * operation state, an HVAC action). The option set is per device, so the
56182
+ * value list is LEARNED as values are first seen (bounded). A sensor with a
56183
+ * `format` carries a timestamp, not a state, and is not recorded.
55951
56184
  */
55952
- history: "none",
56185
+ history: { fields: { value: {
56186
+ kind: "enum",
56187
+ skipWhenSet: "format"
56188
+ } } },
55953
56189
  /** Clock fields: written, but excluded from the compare that decides
55954
56190
  * whether persisting is worth a SQLite commit. */
55955
56191
  volatileStateFields: ["lastFetchedAt"]
@@ -57923,9 +58159,10 @@ var lockControlCapability = {
57923
58159
  */
57924
58160
  durability: "restored",
57925
58161
  /**
57926
- * History (D850): none — enum state; lock events belong in the events ledger.
58162
+ * History (D850): the lock's state as an `enum` series — change-only, no
58163
+ * floor: a jam or an unlock lasting seconds is the edge an operator looks for.
57927
58164
  */
57928
- history: "none",
58165
+ history: { fields: { state: { kind: "enum" } } },
57929
58166
  /** Clock fields: written, but excluded from the compare that decides
57930
58167
  * whether persisting is worth a SQLite commit. */
57931
58168
  volatileStateFields: ["lastChangedAt"]
@@ -58099,9 +58336,18 @@ var mediaPlayerCapability = {
58099
58336
  */
58100
58337
  durability: "session",
58101
58338
  /**
58102
- * History (D850): none — `positionMs` moves continuously while playing; volume is transient.
58339
+ * History (D850): volume (a level an operator or an automation sets; the
58340
+ * default 10 s floor folds a slider drag into its end value) and mute.
58341
+ * `positionMs` is not recorded: it moves continuously while playing.
58103
58342
  */
58104
- history: "none"
58343
+ history: { fields: {
58344
+ volumeLevel: {
58345
+ kind: "gauge",
58346
+ unit: "%",
58347
+ deadband: 1
58348
+ },
58349
+ isMuted: { kind: "boolean" }
58350
+ } }
58105
58351
  };
58106
58352
  /**
58107
58353
  * mesh-network — collection cap for mesh-VPN providers.
@@ -63394,9 +63640,29 @@ var streamParamsCapability = {
63394
63640
  */
63395
63641
  durability: "restored",
63396
63642
  /**
63397
- * History (D850): none — encoder configuration.
63643
+ * History (D850): the configured bitrate and frame rate of the main and sub
63644
+ * profiles. Configuration, so change-only on the default floor: a point is an
63645
+ * operator's (or a tuner's) edit, which is exactly what a chart of a stream's
63646
+ * quality over time must show.
63398
63647
  */
63399
- history: "none",
63648
+ history: { fields: {
63649
+ "main.bitrate": {
63650
+ kind: "gauge",
63651
+ unit: "kbps"
63652
+ },
63653
+ "main.framerate": {
63654
+ kind: "gauge",
63655
+ unit: "fps"
63656
+ },
63657
+ "sub.bitrate": {
63658
+ kind: "gauge",
63659
+ unit: "kbps"
63660
+ },
63661
+ "sub.framerate": {
63662
+ kind: "gauge",
63663
+ unit: "fps"
63664
+ }
63665
+ } },
63400
63666
  /** Clock fields: written, but excluded from the compare that decides
63401
63667
  * whether persisting is worth a SQLite commit. */
63402
63668
  volatileStateFields: ["lastFetchedAt"]
@@ -66574,6 +66840,15 @@ var BaseDevice = class {
66574
66840
  * Drivers can use the `getProbeFlags()` helper to read the flag bag
66575
66841
  * with a typed cast.
66576
66842
  *
66843
+ * Answer what you KNOW. A plain array is read as the complete list only
66844
+ * while this device is `online` and probed; return
66845
+ * `accessoryChildrenUnknown(reason)` whenever you cannot know the list right
66846
+ * now (no credentials, parent not connected, a failed or partial read) —
66847
+ * the kernel then deletes nothing. Return `accessoryChildrenComplete(list)`
66848
+ * to say "connected, and this is the complete list" explicitly. A shrink is
66849
+ * deleted only after a second agreeing complete read on a later probe (D49;
66850
+ * `packages/system/src/kernel/moleculer/accessory-prune-gate.ts`).
66851
+ *
66577
66852
  * Default: no children.
66578
66853
  */
66579
66854
  getAccessoryChildren() {
@@ -70222,7 +70497,19 @@ Object.freeze({
70222
70497
  addonId: null,
70223
70498
  access: "view"
70224
70499
  },
70225
- "logDestination.query": {
70500
+ "logDestination.cancelRead": {
70501
+ capName: "log-destination",
70502
+ capScope: "system",
70503
+ addonId: null,
70504
+ access: "create"
70505
+ },
70506
+ "logDestination.describeRead": {
70507
+ capName: "log-destination",
70508
+ capScope: "system",
70509
+ addonId: null,
70510
+ access: "view"
70511
+ },
70512
+ "logDestination.read": {
70226
70513
  capName: "log-destination",
70227
70514
  capScope: "system",
70228
70515
  addonId: null,
@@ -76229,6 +76516,11 @@ Object.freeze({
76229
76516
  form: "single",
76230
76517
  optional: false
76231
76518
  }],
76519
+ "logDestination.read": [{
76520
+ name: "deviceId",
76521
+ form: "single",
76522
+ optional: true
76523
+ }],
76232
76524
  "mediaPlayer.getStatus": [{
76233
76525
  name: "deviceId",
76234
76526
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-terminal",
3
- "version": "0.1.137",
3
+ "version": "0.1.138",
4
4
  "description": "Interactive terminal sessions (pty + xterm) as a CamStack addon",
5
5
  "keywords": [
6
6
  "camstack",