@camstack/addon-notifiers 1.2.605 → 1.2.607

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 +271 -24
  2. package/dist/addon.mjs +271 -24
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -5577,7 +5577,7 @@ var ZodIssueCode = {
5577
5577
  var ZodFirstPartyTypeKind;
5578
5578
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5579
5579
  //#endregion
5580
- //#region ../types/dist/sleep-yKL5gfrH.mjs
5580
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5581
5581
  /**
5582
5582
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5583
5583
  * window to float samples (D455).
@@ -17356,7 +17356,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
17356
17356
  kind: literal("node"),
17357
17357
  nodeId: string().min(1)
17358
17358
  })]);
17359
+ /**
17360
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
17361
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
17362
+ * meaning); a rollup keeps the time spent in each state (`states`).
17363
+ */
17359
17364
  var DeviceHistoryKindSchema = _enum([
17365
+ "gauge",
17366
+ "counter",
17367
+ "boolean",
17368
+ "enum"
17369
+ ]);
17370
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
17371
+ var DeviceHistoryProducerKindSchema = _enum([
17360
17372
  "gauge",
17361
17373
  "counter",
17362
17374
  "boolean"
@@ -17393,7 +17405,13 @@ var SeriesInfoSchema = object({
17393
17405
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
17394
17406
  unit: string().nullable(),
17395
17407
  displayName: string(),
17396
- source: _enum(["cap", "addon"]),
17408
+ source: _enum([
17409
+ "cap",
17410
+ "addon",
17411
+ "derived"
17412
+ ]),
17413
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
17414
+ values: array(string()).readonly().nullable(),
17397
17415
  firstTs: number(),
17398
17416
  lastTs: number()
17399
17417
  });
@@ -17407,17 +17425,31 @@ var QueryPointSchema = object({
17407
17425
  twMean: number().nullable(),
17408
17426
  min: number(),
17409
17427
  max: number(),
17410
- /** `null` is unknown, never zero (D393). */
17411
- last: number().nullable()
17428
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
17429
+ last: number().nullable(),
17430
+ /**
17431
+ * The increase over the point: a `counter`'s growth since the previous point
17432
+ * or bucket (a drop is a reset, counted from zero), and for
17433
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
17434
+ * every other kind, and when it cannot be known.
17435
+ */
17436
+ delta: number().nullable(),
17437
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
17438
+ state: string().nullable(),
17439
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
17440
+ states: record(string(), number()).nullable()
17412
17441
  });
17413
17442
  var QuerySeriesSchema = object({
17414
17443
  scope: string(),
17415
17444
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
17416
17445
  before: object({
17417
17446
  t: number(),
17418
- value: number().nullable()
17447
+ value: number().nullable(),
17448
+ state: string().nullable()
17419
17449
  }).nullable(),
17420
- points: array(QueryPointSchema).readonly()
17450
+ points: array(QueryPointSchema).readonly(),
17451
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
17452
+ derivedFrom: string().nullable()
17421
17453
  });
17422
17454
  /** The window part of a query, shared by the device and node forms. */
17423
17455
  var QueryWindowShape = {
@@ -17433,6 +17465,23 @@ var QueryResultSchema = object({
17433
17465
  series: array(QuerySeriesSchema).readonly(),
17434
17466
  truncated: boolean()
17435
17467
  });
17468
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
17469
+ var QueryManyItemSchema = union([object({
17470
+ deviceId: number().int(),
17471
+ key: string(),
17472
+ scope: string().optional()
17473
+ }), object({
17474
+ forNodeId: string().min(1),
17475
+ key: string(),
17476
+ scope: string().optional()
17477
+ })]);
17478
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
17479
+ ok: literal(true),
17480
+ result: QueryResultSchema
17481
+ }), object({
17482
+ ok: literal(false),
17483
+ error: string()
17484
+ })]);
17436
17485
  var TierStatusSchema = object({
17437
17486
  tier: DeviceHistoryResolutionSchema,
17438
17487
  /** `null` until the first background count answered. */
@@ -17488,16 +17537,22 @@ var DeviceHistoryStatusSchema = object({
17488
17537
  lastRefreshAt: number().nullable()
17489
17538
  })
17490
17539
  });
17491
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17540
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17492
17541
  deviceId: number().int(),
17493
17542
  ...QueryWindowShape
17494
17543
  }), QueryResultSchema), method(object({
17495
- nodeId: string().min(1),
17544
+ forNodeId: string().min(1),
17496
17545
  ...QueryWindowShape
17497
17546
  }), QueryResultSchema, { auth: "admin" }), method(object({
17547
+ items: array(QueryManyItemSchema).min(1).max(24),
17548
+ from: QueryWindowShape.from,
17549
+ to: QueryWindowShape.to,
17550
+ resolution: QueryWindowShape.resolution,
17551
+ maxPoints: QueryWindowShape.maxPoints
17552
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
17498
17553
  name: string().regex(/^[a-z0-9-]+$/),
17499
17554
  subjectKind: _enum(["device", "node"]),
17500
- kind: DeviceHistoryKindSchema,
17555
+ kind: DeviceHistoryProducerKindSchema,
17501
17556
  unit: string().optional(),
17502
17557
  displayName: string().min(1),
17503
17558
  ingest: _enum(["points", "buckets"])
@@ -40514,14 +40569,106 @@ var LogEntrySchema = object({
40514
40569
  meta: record(string(), unknown()).optional(),
40515
40570
  tags: record(string(), string()).optional()
40516
40571
  });
40517
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
40518
- scope: array(string()).optional(),
40572
+ /**
40573
+ * A history READ against one destination (D898).
40574
+ *
40575
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
40576
+ * browser applied after the limit is what made a rare device's lines
40577
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
40578
+ * minted (opaque to everyone else): a file position for the rotated files, a
40579
+ * nanosecond timestamp for Loki.
40580
+ *
40581
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
40582
+ * store answers `done: false` with the cursor it reached and the bytes it
40583
+ * scanned, and the caller decides whether to go on. That is what makes a long
40584
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
40585
+ * flight, and not asking for the next slice ends the scan.
40586
+ */
40587
+ var LogReadQuerySchema = object({
40588
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
40589
+ requestId: string().min(1).max(64).optional(),
40590
+ /** The device the line is about (`tags.deviceId`, numeric). */
40591
+ deviceId: number().int().optional(),
40592
+ /**
40593
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
40594
+ * match. Not `addonId`: a cap router reads that name as "which provider".
40595
+ */
40596
+ fromAddonId: string().min(1).max(200).optional(),
40597
+ /**
40598
+ * The emitting node: matches the agent that emitted the line, the node
40599
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
40600
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
40601
+ * name as "which node's provider".
40602
+ */
40603
+ fromNodeId: string().min(1).max(200).optional(),
40604
+ /** Any other tag, exact match (AND). */
40605
+ tags: record(string(), union([string(), number()])).optional(),
40606
+ /** Severity FLOOR: this level and above. */
40519
40607
  level: LogLevelSchema.optional(),
40520
- since: date().optional(),
40521
- until: date().optional(),
40522
- limit: number().optional(),
40523
- tags: record(string(), string()).optional()
40524
- }), array(LogEntrySchema).readonly());
40608
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
40609
+ text: string().min(1).max(200).optional(),
40610
+ /** Epoch ms, inclusive. */
40611
+ since: number().optional(),
40612
+ /** Epoch ms, inclusive. */
40613
+ until: number().optional(),
40614
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
40615
+ before: string().min(1).max(1024).optional(),
40616
+ /** Newer than this cursor (exclusive). */
40617
+ after: string().min(1).max(1024).optional(),
40618
+ limit: number().int().min(1).max(1e3).optional(),
40619
+ /** Wall-clock bound of this slice. The provider caps it. */
40620
+ budgetMs: number().int().min(50).max(1e4).optional()
40621
+ });
40622
+ var LogReadResultSchema = object({
40623
+ /** Newest first. */
40624
+ entries: array(object({
40625
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
40626
+ id: string().optional(),
40627
+ /** Epoch ms. */
40628
+ timestamp: number(),
40629
+ level: LogLevelSchema,
40630
+ scope: string().optional(),
40631
+ message: string(),
40632
+ tags: record(string(), union([string(), number()])).optional(),
40633
+ meta: record(string(), unknown()).optional()
40634
+ })),
40635
+ /** Pass as `before` for the next older page; null when nothing older exists. */
40636
+ nextBefore: string().nullable(),
40637
+ /** Pass as `after` to read what arrived since; null when unknown. */
40638
+ nextAfter: string().nullable(),
40639
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
40640
+ scannedBytes: number().int().nonnegative(),
40641
+ /**
40642
+ * True when the scan in this direction reached the end of the store.
40643
+ * False with fewer than `limit` entries means the budget ran out first —
40644
+ * call again with `nextBefore` to go on.
40645
+ */
40646
+ done: boolean(),
40647
+ /** True when `cancelRead` ended this slice early. */
40648
+ cancelled: boolean().optional()
40649
+ });
40650
+ var LogReadCapabilitiesSchema = object({
40651
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
40652
+ readable: boolean(),
40653
+ /** Why not, when `readable` is false — rendered next to the source. */
40654
+ reason: string().nullable(),
40655
+ /** Filters the provider applies itself. A false one is applied by nobody. */
40656
+ filters: object({
40657
+ deviceId: boolean(),
40658
+ addonId: boolean(),
40659
+ nodeId: boolean(),
40660
+ tags: boolean(),
40661
+ level: boolean(),
40662
+ text: boolean(),
40663
+ timeRange: boolean()
40664
+ }),
40665
+ /** How far back the store reaches, when the provider knows (days). */
40666
+ retentionDays: number().nullable()
40667
+ });
40668
+ 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() }), {
40669
+ kind: "mutation",
40670
+ auth: "admin"
40671
+ });
40525
40672
  /**
40526
40673
  * `login-method` — collection cap through which auth addons contribute
40527
40674
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -43099,6 +43246,33 @@ var NcRuleTargetSchema = object({
43099
43246
  params: record(string(), unknown()).optional()
43100
43247
  });
43101
43248
  /**
43249
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
43250
+ *
43251
+ * Every mode starts from the same CLEAN source frame of the trigger moment
43252
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
43253
+ * to the zone that fired the rule) and renders it once at send time:
43254
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
43255
+ * colour and every OTHER track visible at that instant outlined thin, each
43256
+ * labelled with class and confidence ("dog 87%").
43257
+ * - `crop` — the subject cut out of that frame around its box at that instant.
43258
+ * - `clean` — the whole scene with nothing drawn on it.
43259
+ * - `none` — no picture.
43260
+ *
43261
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
43262
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
43263
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
43264
+ * ship a crop on one event and a boxed scene on the next depending on which
43265
+ * stored kind had landed.
43266
+ */
43267
+ var NcMediaImageSchema = _enum([
43268
+ "scene-boxes",
43269
+ "crop",
43270
+ "clean",
43271
+ "none"
43272
+ ]);
43273
+ /**
43274
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43275
+ *
43102
43276
  * Media attachment policy (P1 still-image subset).
43103
43277
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
43104
43278
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -43112,6 +43286,8 @@ var NcRuleTargetSchema = object({
43112
43286
  * - `none` — no attachment.
43113
43287
  */
43114
43288
  /**
43289
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43290
+ *
43115
43291
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
43116
43292
  * conflate it with the selection strategy and betray the request: asking for
43117
43293
  * the clean scene frame on an object-event owner used to start at
@@ -43140,16 +43316,29 @@ var NcMediaFrameSchema = _enum([
43140
43316
  */
43141
43317
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
43142
43318
  var NcMediaPolicySchema = object({
43319
+ /**
43320
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
43321
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
43322
+ * triple below, at load and at every write, and the store keeps only this.
43323
+ */
43324
+ image: NcMediaImageSchema.optional(),
43325
+ /**
43326
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
43327
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
43328
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
43329
+ * Replaces `zoneCrop`.
43330
+ */
43331
+ showTriggerZone: boolean().optional(),
43332
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43143
43333
  attach: _enum([
43144
43334
  "best",
43145
43335
  "best-matching",
43146
43336
  "keyFrame",
43147
43337
  "none"
43148
- ]).default("best"),
43149
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
43338
+ ]).optional(),
43339
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43150
43340
  frame: NcMediaFrameSchema.optional(),
43151
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
43152
- * "show me the ZONE", not the whole scene or the subject crop. */
43341
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
43153
43342
  zoneCrop: boolean().optional(),
43154
43343
  /**
43155
43344
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -43321,7 +43510,9 @@ var NcRuleInputSchema = object({
43321
43510
  * targets.
43322
43511
  */
43323
43512
  targetUsers: array(string()).optional(),
43324
- media: NcMediaPolicySchema.default({ attach: "best" }),
43513
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
43514
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
43515
+ media: NcMediaPolicySchema.default({}),
43325
43516
  throttle: NcThrottleSchema.default({
43326
43517
  cooldownSec: 60,
43327
43518
  scope: "rule-device"
@@ -44258,13 +44449,37 @@ var NcAlarmModeOpeningsSchema = object({
44258
44449
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
44259
44450
  unknown: array(number().int())
44260
44451
  });
44452
+ /**
44453
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
44454
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
44455
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
44456
+ * never looks fully armed (D62: off must never look like broken).
44457
+ */
44458
+ var NcAlarmInputBypassViewSchema = object({
44459
+ ruleId: string(),
44460
+ /** The rule's current name (its frozen name when the rule is gone). */
44461
+ ruleName: string(),
44462
+ /** The input: the sensor of the match, else its camera. */
44463
+ deviceId: number().int(),
44464
+ /** The input's current name. */
44465
+ name: string(),
44466
+ /** When it was bypassed (ms epoch). */
44467
+ since: number(),
44468
+ /** Triggers from this input dropped since. */
44469
+ dropped: number().int().min(0)
44470
+ });
44261
44471
  var NcAlarmLiveSchema = object({
44262
44472
  state: AlarmStateSchema,
44263
44473
  /** The mode being armed into (exit delay) or held; null when disarmed. */
44264
44474
  targetMode: AlarmArmModeSchema.nullable(),
44265
44475
  availableModes: array(AlarmArmModeSchema),
44266
44476
  openings: array(NcAlarmModeOpeningsSchema),
44267
- exclusions: array(NcAlarmExclusionViewSchema)
44477
+ exclusions: array(NcAlarmExclusionViewSchema),
44478
+ /**
44479
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
44480
+ * Defaulted so an older hub answer still parses (as "none known").
44481
+ */
44482
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
44268
44483
  });
44269
44484
  var NcAlarmConfigSchema = object({
44270
44485
  /**
@@ -58161,9 +58376,24 @@ var NpuInfoSchema = object({
58161
58376
  name: string().optional(),
58162
58377
  generation: _enum(["xdna1", "xdna2"]).optional()
58163
58378
  });
58379
+ var CoralBusSchema = _enum(["usb", "pci"]);
58164
58380
  var CoralInfoSchema = object({
58165
58381
  type: literal("coral-edgetpu"),
58166
- bus: string().optional()
58382
+ /** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
58383
+ bus: string().optional(),
58384
+ /** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
58385
+ count: number().int().nonnegative().optional(),
58386
+ /** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
58387
+ units: array(object({
58388
+ bus: CoralBusSchema,
58389
+ count: number().int().nonnegative()
58390
+ })).readonly().optional(),
58391
+ /** Present-but-unusable units, each with its typed reason (never "absent"). */
58392
+ unavailable: array(object({
58393
+ bus: CoralBusSchema,
58394
+ count: number().int().nonnegative(),
58395
+ reason: _enum(["driver-missing", "device-not-accessible"])
58396
+ })).readonly().optional()
58167
58397
  });
58168
58398
  var HardwareInfoSchema = object({
58169
58399
  platform: HardwarePlatformSchema,
@@ -65903,7 +66133,19 @@ Object.freeze({
65903
66133
  addonId: null,
65904
66134
  access: "view"
65905
66135
  },
65906
- "logDestination.query": {
66136
+ "logDestination.cancelRead": {
66137
+ capName: "log-destination",
66138
+ capScope: "system",
66139
+ addonId: null,
66140
+ access: "create"
66141
+ },
66142
+ "logDestination.describeRead": {
66143
+ capName: "log-destination",
66144
+ capScope: "system",
66145
+ addonId: null,
66146
+ access: "view"
66147
+ },
66148
+ "logDestination.read": {
65907
66149
  capName: "log-destination",
65908
66150
  capScope: "system",
65909
66151
  addonId: null,
@@ -71910,6 +72152,11 @@ Object.freeze({
71910
72152
  form: "single",
71911
72153
  optional: false
71912
72154
  }],
72155
+ "logDestination.read": [{
72156
+ name: "deviceId",
72157
+ form: "single",
72158
+ optional: true
72159
+ }],
71913
72160
  "mediaPlayer.getStatus": [{
71914
72161
  name: "deviceId",
71915
72162
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5550,7 +5550,7 @@ var ZodIssueCode = {
5550
5550
  var ZodFirstPartyTypeKind;
5551
5551
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5552
5552
  //#endregion
5553
- //#region ../types/dist/sleep-yKL5gfrH.mjs
5553
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5554
5554
  /**
5555
5555
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5556
5556
  * window to float samples (D455).
@@ -17329,7 +17329,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
17329
17329
  kind: literal("node"),
17330
17330
  nodeId: string().min(1)
17331
17331
  })]);
17332
+ /**
17333
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
17334
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
17335
+ * meaning); a rollup keeps the time spent in each state (`states`).
17336
+ */
17332
17337
  var DeviceHistoryKindSchema = _enum([
17338
+ "gauge",
17339
+ "counter",
17340
+ "boolean",
17341
+ "enum"
17342
+ ]);
17343
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
17344
+ var DeviceHistoryProducerKindSchema = _enum([
17333
17345
  "gauge",
17334
17346
  "counter",
17335
17347
  "boolean"
@@ -17366,7 +17378,13 @@ var SeriesInfoSchema = object({
17366
17378
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
17367
17379
  unit: string().nullable(),
17368
17380
  displayName: string(),
17369
- source: _enum(["cap", "addon"]),
17381
+ source: _enum([
17382
+ "cap",
17383
+ "addon",
17384
+ "derived"
17385
+ ]),
17386
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
17387
+ values: array(string()).readonly().nullable(),
17370
17388
  firstTs: number(),
17371
17389
  lastTs: number()
17372
17390
  });
@@ -17380,17 +17398,31 @@ var QueryPointSchema = object({
17380
17398
  twMean: number().nullable(),
17381
17399
  min: number(),
17382
17400
  max: number(),
17383
- /** `null` is unknown, never zero (D393). */
17384
- last: number().nullable()
17401
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
17402
+ last: number().nullable(),
17403
+ /**
17404
+ * The increase over the point: a `counter`'s growth since the previous point
17405
+ * or bucket (a drop is a reset, counted from zero), and for
17406
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
17407
+ * every other kind, and when it cannot be known.
17408
+ */
17409
+ delta: number().nullable(),
17410
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
17411
+ state: string().nullable(),
17412
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
17413
+ states: record(string(), number()).nullable()
17385
17414
  });
17386
17415
  var QuerySeriesSchema = object({
17387
17416
  scope: string(),
17388
17417
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
17389
17418
  before: object({
17390
17419
  t: number(),
17391
- value: number().nullable()
17420
+ value: number().nullable(),
17421
+ state: string().nullable()
17392
17422
  }).nullable(),
17393
- points: array(QueryPointSchema).readonly()
17423
+ points: array(QueryPointSchema).readonly(),
17424
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
17425
+ derivedFrom: string().nullable()
17394
17426
  });
17395
17427
  /** The window part of a query, shared by the device and node forms. */
17396
17428
  var QueryWindowShape = {
@@ -17406,6 +17438,23 @@ var QueryResultSchema = object({
17406
17438
  series: array(QuerySeriesSchema).readonly(),
17407
17439
  truncated: boolean()
17408
17440
  });
17441
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
17442
+ var QueryManyItemSchema = union([object({
17443
+ deviceId: number().int(),
17444
+ key: string(),
17445
+ scope: string().optional()
17446
+ }), object({
17447
+ forNodeId: string().min(1),
17448
+ key: string(),
17449
+ scope: string().optional()
17450
+ })]);
17451
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
17452
+ ok: literal(true),
17453
+ result: QueryResultSchema
17454
+ }), object({
17455
+ ok: literal(false),
17456
+ error: string()
17457
+ })]);
17409
17458
  var TierStatusSchema = object({
17410
17459
  tier: DeviceHistoryResolutionSchema,
17411
17460
  /** `null` until the first background count answered. */
@@ -17461,16 +17510,22 @@ var DeviceHistoryStatusSchema = object({
17461
17510
  lastRefreshAt: number().nullable()
17462
17511
  })
17463
17512
  });
17464
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17513
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17465
17514
  deviceId: number().int(),
17466
17515
  ...QueryWindowShape
17467
17516
  }), QueryResultSchema), method(object({
17468
- nodeId: string().min(1),
17517
+ forNodeId: string().min(1),
17469
17518
  ...QueryWindowShape
17470
17519
  }), QueryResultSchema, { auth: "admin" }), method(object({
17520
+ items: array(QueryManyItemSchema).min(1).max(24),
17521
+ from: QueryWindowShape.from,
17522
+ to: QueryWindowShape.to,
17523
+ resolution: QueryWindowShape.resolution,
17524
+ maxPoints: QueryWindowShape.maxPoints
17525
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
17471
17526
  name: string().regex(/^[a-z0-9-]+$/),
17472
17527
  subjectKind: _enum(["device", "node"]),
17473
- kind: DeviceHistoryKindSchema,
17528
+ kind: DeviceHistoryProducerKindSchema,
17474
17529
  unit: string().optional(),
17475
17530
  displayName: string().min(1),
17476
17531
  ingest: _enum(["points", "buckets"])
@@ -40487,14 +40542,106 @@ var LogEntrySchema = object({
40487
40542
  meta: record(string(), unknown()).optional(),
40488
40543
  tags: record(string(), string()).optional()
40489
40544
  });
40490
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
40491
- scope: array(string()).optional(),
40545
+ /**
40546
+ * A history READ against one destination (D898).
40547
+ *
40548
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
40549
+ * browser applied after the limit is what made a rare device's lines
40550
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
40551
+ * minted (opaque to everyone else): a file position for the rotated files, a
40552
+ * nanosecond timestamp for Loki.
40553
+ *
40554
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
40555
+ * store answers `done: false` with the cursor it reached and the bytes it
40556
+ * scanned, and the caller decides whether to go on. That is what makes a long
40557
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
40558
+ * flight, and not asking for the next slice ends the scan.
40559
+ */
40560
+ var LogReadQuerySchema = object({
40561
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
40562
+ requestId: string().min(1).max(64).optional(),
40563
+ /** The device the line is about (`tags.deviceId`, numeric). */
40564
+ deviceId: number().int().optional(),
40565
+ /**
40566
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
40567
+ * match. Not `addonId`: a cap router reads that name as "which provider".
40568
+ */
40569
+ fromAddonId: string().min(1).max(200).optional(),
40570
+ /**
40571
+ * The emitting node: matches the agent that emitted the line, the node
40572
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
40573
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
40574
+ * name as "which node's provider".
40575
+ */
40576
+ fromNodeId: string().min(1).max(200).optional(),
40577
+ /** Any other tag, exact match (AND). */
40578
+ tags: record(string(), union([string(), number()])).optional(),
40579
+ /** Severity FLOOR: this level and above. */
40492
40580
  level: LogLevelSchema.optional(),
40493
- since: date().optional(),
40494
- until: date().optional(),
40495
- limit: number().optional(),
40496
- tags: record(string(), string()).optional()
40497
- }), array(LogEntrySchema).readonly());
40581
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
40582
+ text: string().min(1).max(200).optional(),
40583
+ /** Epoch ms, inclusive. */
40584
+ since: number().optional(),
40585
+ /** Epoch ms, inclusive. */
40586
+ until: number().optional(),
40587
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
40588
+ before: string().min(1).max(1024).optional(),
40589
+ /** Newer than this cursor (exclusive). */
40590
+ after: string().min(1).max(1024).optional(),
40591
+ limit: number().int().min(1).max(1e3).optional(),
40592
+ /** Wall-clock bound of this slice. The provider caps it. */
40593
+ budgetMs: number().int().min(50).max(1e4).optional()
40594
+ });
40595
+ var LogReadResultSchema = object({
40596
+ /** Newest first. */
40597
+ entries: array(object({
40598
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
40599
+ id: string().optional(),
40600
+ /** Epoch ms. */
40601
+ timestamp: number(),
40602
+ level: LogLevelSchema,
40603
+ scope: string().optional(),
40604
+ message: string(),
40605
+ tags: record(string(), union([string(), number()])).optional(),
40606
+ meta: record(string(), unknown()).optional()
40607
+ })),
40608
+ /** Pass as `before` for the next older page; null when nothing older exists. */
40609
+ nextBefore: string().nullable(),
40610
+ /** Pass as `after` to read what arrived since; null when unknown. */
40611
+ nextAfter: string().nullable(),
40612
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
40613
+ scannedBytes: number().int().nonnegative(),
40614
+ /**
40615
+ * True when the scan in this direction reached the end of the store.
40616
+ * False with fewer than `limit` entries means the budget ran out first —
40617
+ * call again with `nextBefore` to go on.
40618
+ */
40619
+ done: boolean(),
40620
+ /** True when `cancelRead` ended this slice early. */
40621
+ cancelled: boolean().optional()
40622
+ });
40623
+ var LogReadCapabilitiesSchema = object({
40624
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
40625
+ readable: boolean(),
40626
+ /** Why not, when `readable` is false — rendered next to the source. */
40627
+ reason: string().nullable(),
40628
+ /** Filters the provider applies itself. A false one is applied by nobody. */
40629
+ filters: object({
40630
+ deviceId: boolean(),
40631
+ addonId: boolean(),
40632
+ nodeId: boolean(),
40633
+ tags: boolean(),
40634
+ level: boolean(),
40635
+ text: boolean(),
40636
+ timeRange: boolean()
40637
+ }),
40638
+ /** How far back the store reaches, when the provider knows (days). */
40639
+ retentionDays: number().nullable()
40640
+ });
40641
+ 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() }), {
40642
+ kind: "mutation",
40643
+ auth: "admin"
40644
+ });
40498
40645
  /**
40499
40646
  * `login-method` — collection cap through which auth addons contribute
40500
40647
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -43072,6 +43219,33 @@ var NcRuleTargetSchema = object({
43072
43219
  params: record(string(), unknown()).optional()
43073
43220
  });
43074
43221
  /**
43222
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
43223
+ *
43224
+ * Every mode starts from the same CLEAN source frame of the trigger moment
43225
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
43226
+ * to the zone that fired the rule) and renders it once at send time:
43227
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
43228
+ * colour and every OTHER track visible at that instant outlined thin, each
43229
+ * labelled with class and confidence ("dog 87%").
43230
+ * - `crop` — the subject cut out of that frame around its box at that instant.
43231
+ * - `clean` — the whole scene with nothing drawn on it.
43232
+ * - `none` — no picture.
43233
+ *
43234
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
43235
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
43236
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
43237
+ * ship a crop on one event and a boxed scene on the next depending on which
43238
+ * stored kind had landed.
43239
+ */
43240
+ var NcMediaImageSchema = _enum([
43241
+ "scene-boxes",
43242
+ "crop",
43243
+ "clean",
43244
+ "none"
43245
+ ]);
43246
+ /**
43247
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43248
+ *
43075
43249
  * Media attachment policy (P1 still-image subset).
43076
43250
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
43077
43251
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -43085,6 +43259,8 @@ var NcRuleTargetSchema = object({
43085
43259
  * - `none` — no attachment.
43086
43260
  */
43087
43261
  /**
43262
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43263
+ *
43088
43264
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
43089
43265
  * conflate it with the selection strategy and betray the request: asking for
43090
43266
  * the clean scene frame on an object-event owner used to start at
@@ -43113,16 +43289,29 @@ var NcMediaFrameSchema = _enum([
43113
43289
  */
43114
43290
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
43115
43291
  var NcMediaPolicySchema = object({
43292
+ /**
43293
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
43294
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
43295
+ * triple below, at load and at every write, and the store keeps only this.
43296
+ */
43297
+ image: NcMediaImageSchema.optional(),
43298
+ /**
43299
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
43300
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
43301
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
43302
+ * Replaces `zoneCrop`.
43303
+ */
43304
+ showTriggerZone: boolean().optional(),
43305
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43116
43306
  attach: _enum([
43117
43307
  "best",
43118
43308
  "best-matching",
43119
43309
  "keyFrame",
43120
43310
  "none"
43121
- ]).default("best"),
43122
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
43311
+ ]).optional(),
43312
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43123
43313
  frame: NcMediaFrameSchema.optional(),
43124
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
43125
- * "show me the ZONE", not the whole scene or the subject crop. */
43314
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
43126
43315
  zoneCrop: boolean().optional(),
43127
43316
  /**
43128
43317
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -43294,7 +43483,9 @@ var NcRuleInputSchema = object({
43294
43483
  * targets.
43295
43484
  */
43296
43485
  targetUsers: array(string()).optional(),
43297
- media: NcMediaPolicySchema.default({ attach: "best" }),
43486
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
43487
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
43488
+ media: NcMediaPolicySchema.default({}),
43298
43489
  throttle: NcThrottleSchema.default({
43299
43490
  cooldownSec: 60,
43300
43491
  scope: "rule-device"
@@ -44231,13 +44422,37 @@ var NcAlarmModeOpeningsSchema = object({
44231
44422
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
44232
44423
  unknown: array(number().int())
44233
44424
  });
44425
+ /**
44426
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
44427
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
44428
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
44429
+ * never looks fully armed (D62: off must never look like broken).
44430
+ */
44431
+ var NcAlarmInputBypassViewSchema = object({
44432
+ ruleId: string(),
44433
+ /** The rule's current name (its frozen name when the rule is gone). */
44434
+ ruleName: string(),
44435
+ /** The input: the sensor of the match, else its camera. */
44436
+ deviceId: number().int(),
44437
+ /** The input's current name. */
44438
+ name: string(),
44439
+ /** When it was bypassed (ms epoch). */
44440
+ since: number(),
44441
+ /** Triggers from this input dropped since. */
44442
+ dropped: number().int().min(0)
44443
+ });
44234
44444
  var NcAlarmLiveSchema = object({
44235
44445
  state: AlarmStateSchema,
44236
44446
  /** The mode being armed into (exit delay) or held; null when disarmed. */
44237
44447
  targetMode: AlarmArmModeSchema.nullable(),
44238
44448
  availableModes: array(AlarmArmModeSchema),
44239
44449
  openings: array(NcAlarmModeOpeningsSchema),
44240
- exclusions: array(NcAlarmExclusionViewSchema)
44450
+ exclusions: array(NcAlarmExclusionViewSchema),
44451
+ /**
44452
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
44453
+ * Defaulted so an older hub answer still parses (as "none known").
44454
+ */
44455
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
44241
44456
  });
44242
44457
  var NcAlarmConfigSchema = object({
44243
44458
  /**
@@ -58134,9 +58349,24 @@ var NpuInfoSchema = object({
58134
58349
  name: string().optional(),
58135
58350
  generation: _enum(["xdna1", "xdna2"]).optional()
58136
58351
  });
58352
+ var CoralBusSchema = _enum(["usb", "pci"]);
58137
58353
  var CoralInfoSchema = object({
58138
58354
  type: literal("coral-edgetpu"),
58139
- bus: string().optional()
58355
+ /** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
58356
+ bus: string().optional(),
58357
+ /** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
58358
+ count: number().int().nonnegative().optional(),
58359
+ /** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
58360
+ units: array(object({
58361
+ bus: CoralBusSchema,
58362
+ count: number().int().nonnegative()
58363
+ })).readonly().optional(),
58364
+ /** Present-but-unusable units, each with its typed reason (never "absent"). */
58365
+ unavailable: array(object({
58366
+ bus: CoralBusSchema,
58367
+ count: number().int().nonnegative(),
58368
+ reason: _enum(["driver-missing", "device-not-accessible"])
58369
+ })).readonly().optional()
58140
58370
  });
58141
58371
  var HardwareInfoSchema = object({
58142
58372
  platform: HardwarePlatformSchema,
@@ -65876,7 +66106,19 @@ Object.freeze({
65876
66106
  addonId: null,
65877
66107
  access: "view"
65878
66108
  },
65879
- "logDestination.query": {
66109
+ "logDestination.cancelRead": {
66110
+ capName: "log-destination",
66111
+ capScope: "system",
66112
+ addonId: null,
66113
+ access: "create"
66114
+ },
66115
+ "logDestination.describeRead": {
66116
+ capName: "log-destination",
66117
+ capScope: "system",
66118
+ addonId: null,
66119
+ access: "view"
66120
+ },
66121
+ "logDestination.read": {
65880
66122
  capName: "log-destination",
65881
66123
  capScope: "system",
65882
66124
  addonId: null,
@@ -71883,6 +72125,11 @@ Object.freeze({
71883
72125
  form: "single",
71884
72126
  optional: false
71885
72127
  }],
72128
+ "logDestination.read": [{
72129
+ name: "deviceId",
72130
+ form: "single",
72131
+ optional: true
72132
+ }],
71886
72133
  "mediaPlayer.getStatus": [{
71887
72134
  name: "deviceId",
71888
72135
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-notifiers",
3
- "version": "1.2.605",
3
+ "version": "1.2.607",
4
4
  "description": "System notifiers addon for CamStack — a `notification-output` collection provider hosting per-kind notifier adapters (ntfy, pushover, gotify, telegram, discord, webhook, zentik).",
5
5
  "keywords": [
6
6
  "camstack",