@camstack/addon-training 0.1.61 → 0.1.62

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 (20) hide show
  1. package/dist/{MotionZonesSettings-DSFRn3u7.mjs → MotionZonesSettings-BYD4vYtX.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-CJUs69K5.mjs → PrivacyMaskSettings-BIzsQTVG.mjs} +2 -2
  3. package/dist/{SceneMonitorEditor-BjEBJhp2.mjs → SceneMonitorEditor-CnU0WfHZ.mjs} +1 -1
  4. package/dist/_stub.js +10 -10
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-B9bxvWW7.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-CerRxYN4.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BTskGj2K.mjs +26 -0
  7. package/dist/{dist-Bw72X0Lw.js → dist-D4JlXYdi.js} +255 -23
  8. package/dist/{dist-BrdzZGWE.mjs → dist-cb89Kr5k.mjs} +255 -23
  9. package/dist/{hostInit-Bi_brUZe.mjs → hostInit-f6pcodUU.mjs} +3 -3
  10. package/dist/index.js +1 -1
  11. package/dist/orchestrator/training.addon.js +1 -1
  12. package/dist/orchestrator/training.addon.mjs +1 -1
  13. package/dist/{player-overlays-DfEn3UiJ.mjs → player-overlays-saWxwbq-.mjs} +1 -1
  14. package/dist/providers/modal/training-modal.addon.js +1 -1
  15. package/dist/providers/modal/training-modal.addon.mjs +1 -1
  16. package/dist/remoteEntry.js +1 -1
  17. package/dist/{responsive-KcnxmMOF.mjs → responsive-C-kjtT6v.mjs} +1 -1
  18. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-764ClezD.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-DcBJVR_p.mjs} +1 -1
  19. package/package.json +1 -1
  20. package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BRYzagHC.mjs +0 -26
@@ -5580,7 +5580,7 @@ var ZodIssueCode = {
5580
5580
  var ZodFirstPartyTypeKind;
5581
5581
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5582
5582
  //#endregion
5583
- //#region ../types/dist/sleep-yKL5gfrH.mjs
5583
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5584
5584
  /**
5585
5585
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5586
5586
  * window to float samples (D455).
@@ -17267,7 +17267,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
17267
17267
  kind: literal("node"),
17268
17268
  nodeId: string().min(1)
17269
17269
  })]);
17270
+ /**
17271
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
17272
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
17273
+ * meaning); a rollup keeps the time spent in each state (`states`).
17274
+ */
17270
17275
  var DeviceHistoryKindSchema = _enum([
17276
+ "gauge",
17277
+ "counter",
17278
+ "boolean",
17279
+ "enum"
17280
+ ]);
17281
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
17282
+ var DeviceHistoryProducerKindSchema = _enum([
17271
17283
  "gauge",
17272
17284
  "counter",
17273
17285
  "boolean"
@@ -17304,7 +17316,13 @@ var SeriesInfoSchema = object({
17304
17316
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
17305
17317
  unit: string().nullable(),
17306
17318
  displayName: string(),
17307
- source: _enum(["cap", "addon"]),
17319
+ source: _enum([
17320
+ "cap",
17321
+ "addon",
17322
+ "derived"
17323
+ ]),
17324
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
17325
+ values: array(string()).readonly().nullable(),
17308
17326
  firstTs: number(),
17309
17327
  lastTs: number()
17310
17328
  });
@@ -17318,17 +17336,31 @@ var QueryPointSchema = object({
17318
17336
  twMean: number().nullable(),
17319
17337
  min: number(),
17320
17338
  max: number(),
17321
- /** `null` is unknown, never zero (D393). */
17322
- last: number().nullable()
17339
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
17340
+ last: number().nullable(),
17341
+ /**
17342
+ * The increase over the point: a `counter`'s growth since the previous point
17343
+ * or bucket (a drop is a reset, counted from zero), and for
17344
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
17345
+ * every other kind, and when it cannot be known.
17346
+ */
17347
+ delta: number().nullable(),
17348
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
17349
+ state: string().nullable(),
17350
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
17351
+ states: record(string(), number()).nullable()
17323
17352
  });
17324
17353
  var QuerySeriesSchema = object({
17325
17354
  scope: string(),
17326
17355
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
17327
17356
  before: object({
17328
17357
  t: number(),
17329
- value: number().nullable()
17358
+ value: number().nullable(),
17359
+ state: string().nullable()
17330
17360
  }).nullable(),
17331
- points: array(QueryPointSchema).readonly()
17361
+ points: array(QueryPointSchema).readonly(),
17362
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
17363
+ derivedFrom: string().nullable()
17332
17364
  });
17333
17365
  /** The window part of a query, shared by the device and node forms. */
17334
17366
  var QueryWindowShape = {
@@ -17344,6 +17376,23 @@ var QueryResultSchema = object({
17344
17376
  series: array(QuerySeriesSchema).readonly(),
17345
17377
  truncated: boolean()
17346
17378
  });
17379
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
17380
+ var QueryManyItemSchema = union([object({
17381
+ deviceId: number().int(),
17382
+ key: string(),
17383
+ scope: string().optional()
17384
+ }), object({
17385
+ forNodeId: string().min(1),
17386
+ key: string(),
17387
+ scope: string().optional()
17388
+ })]);
17389
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
17390
+ ok: literal(true),
17391
+ result: QueryResultSchema
17392
+ }), object({
17393
+ ok: literal(false),
17394
+ error: string()
17395
+ })]);
17347
17396
  var TierStatusSchema = object({
17348
17397
  tier: DeviceHistoryResolutionSchema,
17349
17398
  /** `null` until the first background count answered. */
@@ -17399,16 +17448,22 @@ var DeviceHistoryStatusSchema = object({
17399
17448
  lastRefreshAt: number().nullable()
17400
17449
  })
17401
17450
  });
17402
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17451
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17403
17452
  deviceId: number().int(),
17404
17453
  ...QueryWindowShape
17405
17454
  }), QueryResultSchema), method(object({
17406
- nodeId: string().min(1),
17455
+ forNodeId: string().min(1),
17407
17456
  ...QueryWindowShape
17408
17457
  }), QueryResultSchema, { auth: "admin" }), method(object({
17458
+ items: array(QueryManyItemSchema).min(1).max(24),
17459
+ from: QueryWindowShape.from,
17460
+ to: QueryWindowShape.to,
17461
+ resolution: QueryWindowShape.resolution,
17462
+ maxPoints: QueryWindowShape.maxPoints
17463
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
17409
17464
  name: string().regex(/^[a-z0-9-]+$/),
17410
17465
  subjectKind: _enum(["device", "node"]),
17411
- kind: DeviceHistoryKindSchema,
17466
+ kind: DeviceHistoryProducerKindSchema,
17412
17467
  unit: string().optional(),
17413
17468
  displayName: string().min(1),
17414
17469
  ingest: _enum(["points", "buckets"])
@@ -40425,14 +40480,106 @@ var LogEntrySchema = object({
40425
40480
  meta: record(string(), unknown()).optional(),
40426
40481
  tags: record(string(), string()).optional()
40427
40482
  });
40428
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
40429
- scope: array(string()).optional(),
40483
+ /**
40484
+ * A history READ against one destination (D898).
40485
+ *
40486
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
40487
+ * browser applied after the limit is what made a rare device's lines
40488
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
40489
+ * minted (opaque to everyone else): a file position for the rotated files, a
40490
+ * nanosecond timestamp for Loki.
40491
+ *
40492
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
40493
+ * store answers `done: false` with the cursor it reached and the bytes it
40494
+ * scanned, and the caller decides whether to go on. That is what makes a long
40495
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
40496
+ * flight, and not asking for the next slice ends the scan.
40497
+ */
40498
+ var LogReadQuerySchema = object({
40499
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
40500
+ requestId: string().min(1).max(64).optional(),
40501
+ /** The device the line is about (`tags.deviceId`, numeric). */
40502
+ deviceId: number().int().optional(),
40503
+ /**
40504
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
40505
+ * match. Not `addonId`: a cap router reads that name as "which provider".
40506
+ */
40507
+ fromAddonId: string().min(1).max(200).optional(),
40508
+ /**
40509
+ * The emitting node: matches the agent that emitted the line, the node
40510
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
40511
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
40512
+ * name as "which node's provider".
40513
+ */
40514
+ fromNodeId: string().min(1).max(200).optional(),
40515
+ /** Any other tag, exact match (AND). */
40516
+ tags: record(string(), union([string(), number()])).optional(),
40517
+ /** Severity FLOOR: this level and above. */
40430
40518
  level: LogLevelSchema.optional(),
40431
- since: date().optional(),
40432
- until: date().optional(),
40433
- limit: number().optional(),
40434
- tags: record(string(), string()).optional()
40435
- }), array(LogEntrySchema).readonly());
40519
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
40520
+ text: string().min(1).max(200).optional(),
40521
+ /** Epoch ms, inclusive. */
40522
+ since: number().optional(),
40523
+ /** Epoch ms, inclusive. */
40524
+ until: number().optional(),
40525
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
40526
+ before: string().min(1).max(1024).optional(),
40527
+ /** Newer than this cursor (exclusive). */
40528
+ after: string().min(1).max(1024).optional(),
40529
+ limit: number().int().min(1).max(1e3).optional(),
40530
+ /** Wall-clock bound of this slice. The provider caps it. */
40531
+ budgetMs: number().int().min(50).max(1e4).optional()
40532
+ });
40533
+ var LogReadResultSchema = object({
40534
+ /** Newest first. */
40535
+ entries: array(object({
40536
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
40537
+ id: string().optional(),
40538
+ /** Epoch ms. */
40539
+ timestamp: number(),
40540
+ level: LogLevelSchema,
40541
+ scope: string().optional(),
40542
+ message: string(),
40543
+ tags: record(string(), union([string(), number()])).optional(),
40544
+ meta: record(string(), unknown()).optional()
40545
+ })),
40546
+ /** Pass as `before` for the next older page; null when nothing older exists. */
40547
+ nextBefore: string().nullable(),
40548
+ /** Pass as `after` to read what arrived since; null when unknown. */
40549
+ nextAfter: string().nullable(),
40550
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
40551
+ scannedBytes: number().int().nonnegative(),
40552
+ /**
40553
+ * True when the scan in this direction reached the end of the store.
40554
+ * False with fewer than `limit` entries means the budget ran out first —
40555
+ * call again with `nextBefore` to go on.
40556
+ */
40557
+ done: boolean(),
40558
+ /** True when `cancelRead` ended this slice early. */
40559
+ cancelled: boolean().optional()
40560
+ });
40561
+ var LogReadCapabilitiesSchema = object({
40562
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
40563
+ readable: boolean(),
40564
+ /** Why not, when `readable` is false — rendered next to the source. */
40565
+ reason: string().nullable(),
40566
+ /** Filters the provider applies itself. A false one is applied by nobody. */
40567
+ filters: object({
40568
+ deviceId: boolean(),
40569
+ addonId: boolean(),
40570
+ nodeId: boolean(),
40571
+ tags: boolean(),
40572
+ level: boolean(),
40573
+ text: boolean(),
40574
+ timeRange: boolean()
40575
+ }),
40576
+ /** How far back the store reaches, when the provider knows (days). */
40577
+ retentionDays: number().nullable()
40578
+ });
40579
+ 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() }), {
40580
+ kind: "mutation",
40581
+ auth: "admin"
40582
+ });
40436
40583
  /**
40437
40584
  * `login-method` — collection cap through which auth addons contribute
40438
40585
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -42988,6 +43135,33 @@ var NcRuleTargetSchema = object({
42988
43135
  params: record(string(), unknown()).optional()
42989
43136
  });
42990
43137
  /**
43138
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
43139
+ *
43140
+ * Every mode starts from the same CLEAN source frame of the trigger moment
43141
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
43142
+ * to the zone that fired the rule) and renders it once at send time:
43143
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
43144
+ * colour and every OTHER track visible at that instant outlined thin, each
43145
+ * labelled with class and confidence ("dog 87%").
43146
+ * - `crop` — the subject cut out of that frame around its box at that instant.
43147
+ * - `clean` — the whole scene with nothing drawn on it.
43148
+ * - `none` — no picture.
43149
+ *
43150
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
43151
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
43152
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
43153
+ * ship a crop on one event and a boxed scene on the next depending on which
43154
+ * stored kind had landed.
43155
+ */
43156
+ var NcMediaImageSchema = _enum([
43157
+ "scene-boxes",
43158
+ "crop",
43159
+ "clean",
43160
+ "none"
43161
+ ]);
43162
+ /**
43163
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43164
+ *
42991
43165
  * Media attachment policy (P1 still-image subset).
42992
43166
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
42993
43167
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -43001,6 +43175,8 @@ var NcRuleTargetSchema = object({
43001
43175
  * - `none` — no attachment.
43002
43176
  */
43003
43177
  /**
43178
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43179
+ *
43004
43180
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
43005
43181
  * conflate it with the selection strategy and betray the request: asking for
43006
43182
  * the clean scene frame on an object-event owner used to start at
@@ -43029,16 +43205,29 @@ var NcMediaFrameSchema = _enum([
43029
43205
  */
43030
43206
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
43031
43207
  var NcMediaPolicySchema = object({
43208
+ /**
43209
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
43210
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
43211
+ * triple below, at load and at every write, and the store keeps only this.
43212
+ */
43213
+ image: NcMediaImageSchema.optional(),
43214
+ /**
43215
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
43216
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
43217
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
43218
+ * Replaces `zoneCrop`.
43219
+ */
43220
+ showTriggerZone: boolean().optional(),
43221
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43032
43222
  attach: _enum([
43033
43223
  "best",
43034
43224
  "best-matching",
43035
43225
  "keyFrame",
43036
43226
  "none"
43037
- ]).default("best"),
43038
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
43227
+ ]).optional(),
43228
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
43039
43229
  frame: NcMediaFrameSchema.optional(),
43040
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
43041
- * "show me the ZONE", not the whole scene or the subject crop. */
43230
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
43042
43231
  zoneCrop: boolean().optional(),
43043
43232
  /**
43044
43233
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -43210,7 +43399,9 @@ var NcRuleInputSchema = object({
43210
43399
  * targets.
43211
43400
  */
43212
43401
  targetUsers: array(string()).optional(),
43213
- media: NcMediaPolicySchema.default({ attach: "best" }),
43402
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
43403
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
43404
+ media: NcMediaPolicySchema.default({}),
43214
43405
  throttle: NcThrottleSchema.default({
43215
43406
  cooldownSec: 60,
43216
43407
  scope: "rule-device"
@@ -44147,13 +44338,37 @@ var NcAlarmModeOpeningsSchema = object({
44147
44338
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
44148
44339
  unknown: array(number().int())
44149
44340
  });
44341
+ /**
44342
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
44343
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
44344
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
44345
+ * never looks fully armed (D62: off must never look like broken).
44346
+ */
44347
+ var NcAlarmInputBypassViewSchema = object({
44348
+ ruleId: string(),
44349
+ /** The rule's current name (its frozen name when the rule is gone). */
44350
+ ruleName: string(),
44351
+ /** The input: the sensor of the match, else its camera. */
44352
+ deviceId: number().int(),
44353
+ /** The input's current name. */
44354
+ name: string(),
44355
+ /** When it was bypassed (ms epoch). */
44356
+ since: number(),
44357
+ /** Triggers from this input dropped since. */
44358
+ dropped: number().int().min(0)
44359
+ });
44150
44360
  var NcAlarmLiveSchema = object({
44151
44361
  state: AlarmStateSchema,
44152
44362
  /** The mode being armed into (exit delay) or held; null when disarmed. */
44153
44363
  targetMode: AlarmArmModeSchema.nullable(),
44154
44364
  availableModes: array(AlarmArmModeSchema),
44155
44365
  openings: array(NcAlarmModeOpeningsSchema),
44156
- exclusions: array(NcAlarmExclusionViewSchema)
44366
+ exclusions: array(NcAlarmExclusionViewSchema),
44367
+ /**
44368
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
44369
+ * Defaulted so an older hub answer still parses (as "none known").
44370
+ */
44371
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
44157
44372
  });
44158
44373
  var NcAlarmConfigSchema = object({
44159
44374
  /**
@@ -65892,7 +66107,19 @@ Object.freeze({
65892
66107
  addonId: null,
65893
66108
  access: "view"
65894
66109
  },
65895
- "logDestination.query": {
66110
+ "logDestination.cancelRead": {
66111
+ capName: "log-destination",
66112
+ capScope: "system",
66113
+ addonId: null,
66114
+ access: "create"
66115
+ },
66116
+ "logDestination.describeRead": {
66117
+ capName: "log-destination",
66118
+ capScope: "system",
66119
+ addonId: null,
66120
+ access: "view"
66121
+ },
66122
+ "logDestination.read": {
65896
66123
  capName: "log-destination",
65897
66124
  capScope: "system",
65898
66125
  addonId: null,
@@ -71899,6 +72126,11 @@ Object.freeze({
71899
72126
  form: "single",
71900
72127
  optional: false
71901
72128
  }],
72129
+ "logDestination.read": [{
72130
+ name: "deviceId",
72131
+ form: "single",
72132
+ optional: true
72133
+ }],
71902
72134
  "mediaPlayer.getStatus": [{
71903
72135
  name: "deviceId",
71904
72136
  form: "single",