@camstack/addon-smtp-nodemailer 1.2.19 → 1.2.20

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.
@@ -36,7 +36,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
36
36
  }) : target, mod));
37
37
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
  //#endregion
39
- //#region ../types/dist/event-category-Bxo5yJjt.mjs
39
+ //#region ../types/dist/event-category-XfKNtfCc.mjs
40
40
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
41
41
  EventCategory["SystemBoot"] = "system.boot";
42
42
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -53,9 +53,10 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
53
53
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
54
54
  /**
55
55
  * A newer addon or server-root package version was found by the
56
- * authoritative registry check. Emitted once per
57
- * `(target, packageName, currentVersion, latestVersion)` transition; repeated
58
- * polling of the same result is deduplicated by the checker.
56
+ * authoritative registry check. Emitted once when any observed
57
+ * `latestVersion` changes (or a package/node first appears behind);
58
+ * the payload carries the full currently-available list. Repeated
59
+ * polling of the same latests is silent.
59
60
  */
60
61
  EventCategory["UpdateAvailable"] = "update.available";
61
62
  /**
@@ -74,6 +75,22 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
74
75
  EventCategory["AddonInstalled"] = "addon.installed";
75
76
  EventCategory["AddonUninstalled"] = "addon.uninstalled";
76
77
  EventCategory["AddonCrashed"] = "addon.crashed";
78
+ /**
79
+ * A RUNNER the D6 crash circuit-breaker gave up on — terminal.
80
+ *
81
+ * `AddonCrashed` is the routine, self-healing fact ("it crashed; it is being
82
+ * respawned"); this is the one that never resolves itself. Emitted exactly
83
+ * once per trip, by `process-service.ts`, carrying the node, the runner, the
84
+ * addons it hosted and the crash count that tripped the breaker.
85
+ *
86
+ * It exists because a runner marked terminally `failed` used to be SILENT:
87
+ * on 2026-08-18 the `recorder` runner died of three unhandled ffmpeg spawn
88
+ * errors, the breaker stopped respawning it (correctly), `/health` kept
89
+ * returning 200, and fleet-wide recording was gone for 3h15 before the
90
+ * operator's phone told him. The Notification Center's system-event intake
91
+ * consumes this category and maps it to the `addon-crash-loop` kind.
92
+ */
93
+ EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
77
94
  EventCategory["AddonError"] = "addon.error";
78
95
  EventCategory["AddonPageReady"] = "addon.page-ready";
79
96
  EventCategory["AddonWidgetReady"] = "addon.widget-ready";
@@ -7569,6 +7586,10 @@ var RecordingBandSchema = object({
7569
7586
  preBufferSec: number().min(0).optional(),
7570
7587
  postBufferSec: number().min(0).optional()
7571
7588
  });
7589
+ ({
7590
+ preBufferSec: 10,
7591
+ postBufferSec: 30
7592
+ }).postBufferSec * 1e3;
7572
7593
  /**
7573
7594
  * Per-device retention overrides. Every field is optional; an unset or `0`
7574
7595
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7616,6 +7637,12 @@ var RecordingConfigSchema = object({
7616
7637
  /** DERIVED summary of `bands`, stamped by the recorder on every save.
7617
7638
  * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7618
7639
  mode: RecordingStorageModeSchema.optional(),
7640
+ /**
7641
+ * Which assigned broker slots to record. Absent / empty = {@link
7642
+ * DEFAULT_RECORDING_PROFILES} (`high`+`low`) intersected with the
7643
+ * camera's currently assigned slots — never `mid` unless the operator
7644
+ * picks it, and never a slot the broker has not assigned.
7645
+ */
7619
7646
  profiles: array(CamProfileSchema).optional(),
7620
7647
  segmentSeconds: number().int().positive().optional(),
7621
7648
  /**
@@ -7696,7 +7723,11 @@ var RelocateFootageInputSchema = object({
7696
7723
  profiles: array(string()).optional(),
7697
7724
  /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7698
7725
  * never allowed to starve live writers. */
7699
- throttleMbps: number().min(1).max(1e3).optional()
7726
+ throttleMbps: number().min(1).max(1e3).optional(),
7727
+ /** Move only segments whose startMs is >= this. Absent = the whole source
7728
+ * pile. Used when a full drain is too expensive and the operator only
7729
+ * wants the recent window on the new disk. */
7730
+ sinceMs: number().int().optional()
7700
7731
  });
7701
7732
  /** Internal, lease-scoped participant operation. It is intentionally separate
7702
7733
  * from persistent recording settings: a migration never changes
@@ -14259,6 +14290,7 @@ var NcSystemEventKindSchema = _enum([
14259
14290
  "node-offline",
14260
14291
  "node-inference-unavailable",
14261
14292
  "detection-blind",
14293
+ "addon-crash-loop",
14262
14294
  "addon-update-available",
14263
14295
  "server-update-available",
14264
14296
  "alarm-triggered",
@@ -14266,6 +14298,9 @@ var NcSystemEventKindSchema = _enum([
14266
14298
  "alarm-disarmed",
14267
14299
  "alarm-arming",
14268
14300
  "alarm-arm-refused",
14301
+ "addon-updated",
14302
+ "server-updated",
14303
+ "export-completed",
14269
14304
  "camera-online",
14270
14305
  "camera-offline",
14271
14306
  "camera-disabled",
@@ -16159,13 +16194,19 @@ var RetrainStatusSchema = _enum([
16159
16194
  * "never marked" from "already trained" must read `retrainStatus`.
16160
16195
  *
16161
16196
  * `debug` does NOT pin; it is attention, not durability.
16197
+ *
16198
+ * `favourited` IS a BOOLEAN pin (durability bit), not a retrain lifecycle.
16199
+ * A favourited track is skipped by retention the same way `staging` is, but
16200
+ * it does not enter `none|staging|trained` and has no staging budget.
16162
16201
  */
16163
16202
  var TrackFlagFields = {
16164
16203
  /** Operator marked this track as training material — i.e. `retrainStatus` is
16165
16204
  * `'staging'`. */
16166
16205
  markForTrain: boolean().optional(),
16167
16206
  /** Operator marked this track for diagnostic attention. */
16168
- debug: boolean().optional()
16207
+ debug: boolean().optional(),
16208
+ /** Operator favourited this track. Pins it against pruning. */
16209
+ favourited: boolean().optional()
16169
16210
  };
16170
16211
  /**
16171
16212
  * The lifecycle field itself, on the READ surfaces only (`Track`, `KeyEvent`).
@@ -16190,6 +16231,7 @@ var TrackFlagsSchema = object({
16190
16231
  trackId: string(),
16191
16232
  markForTrain: boolean(),
16192
16233
  debug: boolean(),
16234
+ favourited: boolean(),
16193
16235
  /** The lifecycle state the boolean was derived from. Required here (unlike on
16194
16236
  * a track row) because this shape is only ever produced by the write body,
16195
16237
  * which always knows it — and a surface that has just written needs to render
@@ -16822,6 +16864,12 @@ var TrackCascadeCountsSchema = object({
16822
16864
  /** Per-track CLIP search vectors removed (best-effort). */
16823
16865
  embeddings: number().int()
16824
16866
  });
16867
+ /** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
16868
+ var DiskReconcileCountsSchema = object({
16869
+ mediaDropped: number().int(),
16870
+ tracks: number().int(),
16871
+ events: number().int()
16872
+ });
16825
16873
  /** Event-store footprint for one camera. */
16826
16874
  var EventStoreDeviceFootprintSchema = object({
16827
16875
  deviceId: number(),
@@ -16998,6 +17046,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16998
17046
  }), method(object({ deviceId: number() }), TrackCascadeCountsSchema, {
16999
17047
  kind: "mutation",
17000
17048
  auth: "admin"
17049
+ }), method(object({ deviceId: number() }), DiskReconcileCountsSchema, {
17050
+ kind: "mutation",
17051
+ auth: "admin"
17001
17052
  }), method(object({
17002
17053
  deviceId: number(),
17003
17054
  trackIds: array(string()).min(1)
@@ -18508,6 +18559,24 @@ var CameraStatusDegradationSchema = object({
18508
18559
  *
18509
18560
  * See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
18510
18561
  */
18562
+ var DiskReconcileJobSchema = object({
18563
+ state: _enum([
18564
+ "idle",
18565
+ "running",
18566
+ "done",
18567
+ "error"
18568
+ ]),
18569
+ total: number().int().nonnegative(),
18570
+ completed: number().int().nonnegative(),
18571
+ currentDeviceId: number().int().nullable(),
18572
+ failed: array(number().int()).readonly(),
18573
+ mediaDropped: number().int().nonnegative(),
18574
+ tracks: number().int().nonnegative(),
18575
+ events: number().int().nonnegative(),
18576
+ startedAtMs: number().int().nullable(),
18577
+ finishedAtMs: number().int().nullable(),
18578
+ error: string().nullable()
18579
+ });
18511
18580
  var CameraStatusSchema = object({
18512
18581
  deviceId: number(),
18513
18582
  assignment: CameraAssignmentStatusSchema,
@@ -18739,7 +18808,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
18739
18808
  }), CameraSwitchGroupSchema, {
18740
18809
  kind: "mutation",
18741
18810
  auth: "admin"
18742
- }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
18811
+ }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
18812
+ kind: "mutation",
18813
+ auth: "admin"
18814
+ }), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
18743
18815
  name: string(),
18744
18816
  description: string().optional(),
18745
18817
  config: CameraPipelineConfigSchema
@@ -19825,20 +19897,6 @@ var VectorStatsResultSchema = object({
19825
19897
  exact: boolean()
19826
19898
  });
19827
19899
  method(VectorDeclareIndexInputSchema, _void(), { kind: "mutation" }), method(VectorUpsertInputSchema, VectorUpsertResultSchema, { kind: "mutation" }), method(VectorQueryInputSchema, VectorQueryResultSchema), method(VectorGetInputSchema, VectorGetResultSchema), method(VectorDeleteInputSchema, VectorDeleteResultSchema, { kind: "mutation" }), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, { kind: "mutation" }), method(VectorStatsInputSchema, VectorStatsResultSchema);
19828
- /**
19829
- * `videoclips` — the unified, navigable-clip surface for a camera.
19830
- *
19831
- * A device-scoped WRAPPER cap (like `pipeline-analytics`): exactly one active
19832
- * provider per device, substitutable. The DEFAULT provider (registered by
19833
- * `addon-post-analysis`, `defaultActive: true`) composes the analytics event
19834
- * log (markers + thumbnails) with the recorder's `getPlaybackManifest` — a clip
19835
- * is a time-WINDOW over existing footage, never a separate file. A camera that
19836
- * exposes NATIVE onboard clips (Reolink/Hikvision NVR) can later substitute the
19837
- * wrapper provider for its device and serve its own clip catalog + URLs.
19838
- *
19839
- * A `Clip` is purely time-based (subtree-blind): playback resolves segments by
19840
- * temporal overlap, so the API never decides `continuous` vs `events`.
19841
- */
19842
19900
  var ClipSchema = object({
19843
19901
  /** Opaque, provider-namespaced id. The default provider encodes the time
19844
19902
  * window so `getClipPlayback` is self-contained (no event re-query). */
@@ -19855,8 +19913,57 @@ var ClipSchema = object({
19855
19913
  startMs: number(),
19856
19914
  endMs: number()
19857
19915
  }),
19858
- /** Thumbnail URL (lazy; e.g. analytics `getEventMedia`). Never inlined. */
19859
- thumbnail: string().optional()
19916
+ /**
19917
+ * Lazy thumbnail URL, never inlined.
19918
+ *
19919
+ * Recording-derived clips (events-mode keep-window, and the prepared
19920
+ * continuous event+fragment visit) MUST use the snapshot of the **main
19921
+ * event of the interval** — `getEventMedia({ eventId, kind: 'snapshot' })`
19922
+ * of the event that owns `kind` (object > motion > audio). Do not extract
19923
+ * a keyframe from the recorded segments. Other providers (onboard, HKSV)
19924
+ * mint their own stills.
19925
+ *
19926
+ * **VOUCHED, never fabricated.** A provider emits this only for an event it
19927
+ * has CONFIRMED owns at least one media row (its own, or its owning track's).
19928
+ * Absent is meaningful — "this visit has no event still" — never "we did not
19929
+ * look". Stamping it from a URL template made 35% of one camera's clips point
19930
+ * at a 404 (device 3836, 2026-08-17: 64 of 179 clips dead, 63 of them motion).
19931
+ * A read that FAILS drops the claim; it never invents it.
19932
+ */
19933
+ thumbnail: string().optional(),
19934
+ /**
19935
+ * An instant INSIDE this visit's footage, hole-safe, where a recorded still
19936
+ * can be decoded. Present whenever the visit came from recorded availability;
19937
+ * absent on a per-event padded window (there is no footage to promise).
19938
+ *
19939
+ * This is not a thumbnail and not a second byte path: it is the argument to
19940
+ * the recorder's existing still route. The surface — never the provider —
19941
+ * decides whether to use it. It is the midpoint of the visit's LONGEST
19942
+ * contiguous range, not of the visit: a visit spans its holes by
19943
+ * construction, so a naive midpoint lands in dead air.
19944
+ */
19945
+ stillAtMs: number().optional(),
19946
+ /**
19947
+ * Analytics event ids that overlap this visit — a BOUNDED sample, newest
19948
+ * first within kind (object → motion → audio), capped at
19949
+ * {@link MAX_CLIP_EVENT_IDS}. Empty on footage-only clips.
19950
+ *
19951
+ * Bounded because it is not a payload the surface pages through: one visit on
19952
+ * device 615 carried 2 345 ids, and `eventIds` was 99% of a 153 KB
19953
+ * camera-day. Read {@link eventCount} for the true total.
19954
+ */
19955
+ eventIds: array(string()).optional(),
19956
+ /** How many analytics events actually overlap this visit. Differs from
19957
+ * `eventIds.length` exactly when the sample was capped — so a truncated
19958
+ * list is never mistaken for a quiet visit. */
19959
+ eventCount: number().int().nonnegative().optional(),
19960
+ /** Intra-visit footage holes (GOP rolls, discarded segments) still shorter
19961
+ * than `VISIT_MERGE_GAP_MS`. Playback concatenates around them; the timeline
19962
+ * bar keeps showing them via `recording.getAvailability`. */
19963
+ holes: array(object({
19964
+ startMs: number(),
19965
+ endMs: number()
19966
+ })).optional()
19860
19967
  });
19861
19968
  var ClipPlaybackSchema = object({
19862
19969
  /** HLS master URL through the hub data-plane (Range + token in path). */
@@ -20320,7 +20427,14 @@ var SearchResultSchema = object({
20320
20427
  });
20321
20428
  var AutoUpdateSettingsSchema = object({
20322
20429
  channel: ChannelSchema,
20323
- intervalSeconds: number()
20430
+ intervalSeconds: number(),
20431
+ /**
20432
+ * Cadence of the "an update exists" POLLER, in seconds. Independent of
20433
+ * `channel`: the poller runs while auto-apply is `off`, because being told
20434
+ * about a publish and installing it are different decisions. Clamped
20435
+ * server-side to 900 s … 604800 s; defaults to 21600 s (6 h).
20436
+ */
20437
+ updateCheckIntervalSeconds: number()
20324
20438
  });
20325
20439
  var AddonAutoUpdateSchema = ChannelWithInheritSchema;
20326
20440
  var RestartAddonResultSchema = unknown();
@@ -20461,7 +20575,9 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
20461
20575
  auth: "admin"
20462
20576
  }), method(_void(), AutoUpdateSettingsSchema, { auth: "admin" }), method(object({
20463
20577
  channel: ChannelSchema,
20464
- intervalSeconds: number().min(300).max(86400).optional()
20578
+ intervalSeconds: number().min(300).max(86400).optional(),
20579
+ /** Availability-poll cadence; see AutoUpdateSettingsSchema. */
20580
+ updateCheckIntervalSeconds: number().min(900).max(604800).optional()
20465
20581
  }), unknown(), {
20466
20582
  kind: "mutation",
20467
20583
  auth: "admin"
@@ -24454,7 +24570,9 @@ var ExportOptionsSchema = object({
24454
24570
  includeAudio: boolean(),
24455
24571
  maxLifeMs: number().int().positive(),
24456
24572
  deleteAfterDownload: boolean(),
24457
- title: string().max(200).optional()
24573
+ title: string().max(200).optional(),
24574
+ /** Notification-output target ids to ping when this export becomes ready. */
24575
+ notifyTargetIds: array(string().min(1)).max(20).optional()
24458
24576
  }).superRefine((v, ctx) => {
24459
24577
  if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
24460
24578
  code: ZodIssueCode.custom,
@@ -24513,10 +24631,18 @@ var ExportBytesSchema = object({
24513
24631
  });
24514
24632
  method(object({
24515
24633
  deviceId: number(),
24516
- profile: string(),
24634
+ /** @deprecated Prefer `profiles`. Kept so timelapse/notifiers keep working. */
24635
+ profile: string().optional(),
24636
+ profiles: array(string()).min(1).optional(),
24517
24637
  fromMs: number(),
24518
24638
  toMs: number(),
24519
24639
  options: ExportOptionsSchema
24640
+ }).superRefine((v, ctx) => {
24641
+ if ((v.profiles !== void 0 && v.profiles.length > 0 ? v.profiles : v.profile !== void 0 ? [v.profile] : []).length < 1) ctx.addIssue({
24642
+ code: ZodIssueCode.custom,
24643
+ message: "pass profiles[] (min 1) or legacy profile",
24644
+ path: ["profiles"]
24645
+ });
24520
24646
  }), ExportRecordSchema, {
24521
24647
  kind: "mutation",
24522
24648
  auth: "protected"
@@ -29116,6 +29242,12 @@ Object.freeze({
29116
29242
  addonId: null,
29117
29243
  access: "create"
29118
29244
  },
29245
+ "pipelineAnalytics.reconcileFromDisk": {
29246
+ capName: "pipeline-analytics",
29247
+ capScope: "device",
29248
+ addonId: null,
29249
+ access: "create"
29250
+ },
29119
29251
  "pipelineAnalytics.refreshStorageLocationsForMigration": {
29120
29252
  capName: "pipeline-analytics",
29121
29253
  capScope: "device",
@@ -29518,6 +29650,12 @@ Object.freeze({
29518
29650
  addonId: null,
29519
29651
  access: "view"
29520
29652
  },
29653
+ "pipelineOrchestrator.getReconcileFromDiskStatus": {
29654
+ capName: "pipeline-orchestrator",
29655
+ capScope: "system",
29656
+ addonId: null,
29657
+ access: "view"
29658
+ },
29521
29659
  "pipelineOrchestrator.listAgentSettings": {
29522
29660
  capName: "pipeline-orchestrator",
29523
29661
  capScope: "system",
@@ -29542,6 +29680,12 @@ Object.freeze({
29542
29680
  addonId: null,
29543
29681
  access: "create"
29544
29682
  },
29683
+ "pipelineOrchestrator.reconcileFromDisk": {
29684
+ capName: "pipeline-orchestrator",
29685
+ capScope: "system",
29686
+ addonId: null,
29687
+ access: "create"
29688
+ },
29545
29689
  "pipelineOrchestrator.removeAgentSettings": {
29546
29690
  capName: "pipeline-orchestrator",
29547
29691
  capScope: "system",
@@ -32533,6 +32677,11 @@ Object.freeze({
32533
32677
  form: "single",
32534
32678
  optional: true
32535
32679
  }],
32680
+ "pipelineAnalytics.reconcileFromDisk": [{
32681
+ name: "deviceId",
32682
+ form: "single",
32683
+ optional: false
32684
+ }],
32536
32685
  "pipelineAnalytics.restageRetrainTrack": [{
32537
32686
  name: "deviceId",
32538
32687
  form: "single",
@@ -33598,6 +33747,8 @@ DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
33598
33747
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
33599
33748
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
33600
33749
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
33750
+ var MB = 1024 * 1024;
33751
+ 1024 * MB, 3072 * MB;
33601
33752
  //#endregion
33602
33753
  //#region ../../node_modules/nodemailer/lib/punycode/index.js
33603
33754
  var require_punycode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -34,7 +34,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
34
34
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
36
36
  //#endregion
37
- //#region ../types/dist/event-category-Bxo5yJjt.mjs
37
+ //#region ../types/dist/event-category-XfKNtfCc.mjs
38
38
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
39
39
  EventCategory["SystemBoot"] = "system.boot";
40
40
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -51,9 +51,10 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
51
51
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
52
52
  /**
53
53
  * A newer addon or server-root package version was found by the
54
- * authoritative registry check. Emitted once per
55
- * `(target, packageName, currentVersion, latestVersion)` transition; repeated
56
- * polling of the same result is deduplicated by the checker.
54
+ * authoritative registry check. Emitted once when any observed
55
+ * `latestVersion` changes (or a package/node first appears behind);
56
+ * the payload carries the full currently-available list. Repeated
57
+ * polling of the same latests is silent.
57
58
  */
58
59
  EventCategory["UpdateAvailable"] = "update.available";
59
60
  /**
@@ -72,6 +73,22 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
72
73
  EventCategory["AddonInstalled"] = "addon.installed";
73
74
  EventCategory["AddonUninstalled"] = "addon.uninstalled";
74
75
  EventCategory["AddonCrashed"] = "addon.crashed";
76
+ /**
77
+ * A RUNNER the D6 crash circuit-breaker gave up on — terminal.
78
+ *
79
+ * `AddonCrashed` is the routine, self-healing fact ("it crashed; it is being
80
+ * respawned"); this is the one that never resolves itself. Emitted exactly
81
+ * once per trip, by `process-service.ts`, carrying the node, the runner, the
82
+ * addons it hosted and the crash count that tripped the breaker.
83
+ *
84
+ * It exists because a runner marked terminally `failed` used to be SILENT:
85
+ * on 2026-08-18 the `recorder` runner died of three unhandled ffmpeg spawn
86
+ * errors, the breaker stopped respawning it (correctly), `/health` kept
87
+ * returning 200, and fleet-wide recording was gone for 3h15 before the
88
+ * operator's phone told him. The Notification Center's system-event intake
89
+ * consumes this category and maps it to the `addon-crash-loop` kind.
90
+ */
91
+ EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
75
92
  EventCategory["AddonError"] = "addon.error";
76
93
  EventCategory["AddonPageReady"] = "addon.page-ready";
77
94
  EventCategory["AddonWidgetReady"] = "addon.widget-ready";
@@ -7567,6 +7584,10 @@ var RecordingBandSchema = object({
7567
7584
  preBufferSec: number().min(0).optional(),
7568
7585
  postBufferSec: number().min(0).optional()
7569
7586
  });
7587
+ ({
7588
+ preBufferSec: 10,
7589
+ postBufferSec: 30
7590
+ }).postBufferSec * 1e3;
7570
7591
  /**
7571
7592
  * Per-device retention overrides. Every field is optional; an unset or `0`
7572
7593
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7614,6 +7635,12 @@ var RecordingConfigSchema = object({
7614
7635
  /** DERIVED summary of `bands`, stamped by the recorder on every save.
7615
7636
  * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7616
7637
  mode: RecordingStorageModeSchema.optional(),
7638
+ /**
7639
+ * Which assigned broker slots to record. Absent / empty = {@link
7640
+ * DEFAULT_RECORDING_PROFILES} (`high`+`low`) intersected with the
7641
+ * camera's currently assigned slots — never `mid` unless the operator
7642
+ * picks it, and never a slot the broker has not assigned.
7643
+ */
7617
7644
  profiles: array(CamProfileSchema).optional(),
7618
7645
  segmentSeconds: number().int().positive().optional(),
7619
7646
  /**
@@ -7694,7 +7721,11 @@ var RelocateFootageInputSchema = object({
7694
7721
  profiles: array(string()).optional(),
7695
7722
  /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7696
7723
  * never allowed to starve live writers. */
7697
- throttleMbps: number().min(1).max(1e3).optional()
7724
+ throttleMbps: number().min(1).max(1e3).optional(),
7725
+ /** Move only segments whose startMs is >= this. Absent = the whole source
7726
+ * pile. Used when a full drain is too expensive and the operator only
7727
+ * wants the recent window on the new disk. */
7728
+ sinceMs: number().int().optional()
7698
7729
  });
7699
7730
  /** Internal, lease-scoped participant operation. It is intentionally separate
7700
7731
  * from persistent recording settings: a migration never changes
@@ -14257,6 +14288,7 @@ var NcSystemEventKindSchema = _enum([
14257
14288
  "node-offline",
14258
14289
  "node-inference-unavailable",
14259
14290
  "detection-blind",
14291
+ "addon-crash-loop",
14260
14292
  "addon-update-available",
14261
14293
  "server-update-available",
14262
14294
  "alarm-triggered",
@@ -14264,6 +14296,9 @@ var NcSystemEventKindSchema = _enum([
14264
14296
  "alarm-disarmed",
14265
14297
  "alarm-arming",
14266
14298
  "alarm-arm-refused",
14299
+ "addon-updated",
14300
+ "server-updated",
14301
+ "export-completed",
14267
14302
  "camera-online",
14268
14303
  "camera-offline",
14269
14304
  "camera-disabled",
@@ -16157,13 +16192,19 @@ var RetrainStatusSchema = _enum([
16157
16192
  * "never marked" from "already trained" must read `retrainStatus`.
16158
16193
  *
16159
16194
  * `debug` does NOT pin; it is attention, not durability.
16195
+ *
16196
+ * `favourited` IS a BOOLEAN pin (durability bit), not a retrain lifecycle.
16197
+ * A favourited track is skipped by retention the same way `staging` is, but
16198
+ * it does not enter `none|staging|trained` and has no staging budget.
16160
16199
  */
16161
16200
  var TrackFlagFields = {
16162
16201
  /** Operator marked this track as training material — i.e. `retrainStatus` is
16163
16202
  * `'staging'`. */
16164
16203
  markForTrain: boolean().optional(),
16165
16204
  /** Operator marked this track for diagnostic attention. */
16166
- debug: boolean().optional()
16205
+ debug: boolean().optional(),
16206
+ /** Operator favourited this track. Pins it against pruning. */
16207
+ favourited: boolean().optional()
16167
16208
  };
16168
16209
  /**
16169
16210
  * The lifecycle field itself, on the READ surfaces only (`Track`, `KeyEvent`).
@@ -16188,6 +16229,7 @@ var TrackFlagsSchema = object({
16188
16229
  trackId: string(),
16189
16230
  markForTrain: boolean(),
16190
16231
  debug: boolean(),
16232
+ favourited: boolean(),
16191
16233
  /** The lifecycle state the boolean was derived from. Required here (unlike on
16192
16234
  * a track row) because this shape is only ever produced by the write body,
16193
16235
  * which always knows it — and a surface that has just written needs to render
@@ -16820,6 +16862,12 @@ var TrackCascadeCountsSchema = object({
16820
16862
  /** Per-track CLIP search vectors removed (best-effort). */
16821
16863
  embeddings: number().int()
16822
16864
  });
16865
+ /** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
16866
+ var DiskReconcileCountsSchema = object({
16867
+ mediaDropped: number().int(),
16868
+ tracks: number().int(),
16869
+ events: number().int()
16870
+ });
16823
16871
  /** Event-store footprint for one camera. */
16824
16872
  var EventStoreDeviceFootprintSchema = object({
16825
16873
  deviceId: number(),
@@ -16996,6 +17044,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16996
17044
  }), method(object({ deviceId: number() }), TrackCascadeCountsSchema, {
16997
17045
  kind: "mutation",
16998
17046
  auth: "admin"
17047
+ }), method(object({ deviceId: number() }), DiskReconcileCountsSchema, {
17048
+ kind: "mutation",
17049
+ auth: "admin"
16999
17050
  }), method(object({
17000
17051
  deviceId: number(),
17001
17052
  trackIds: array(string()).min(1)
@@ -18506,6 +18557,24 @@ var CameraStatusDegradationSchema = object({
18506
18557
  *
18507
18558
  * See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
18508
18559
  */
18560
+ var DiskReconcileJobSchema = object({
18561
+ state: _enum([
18562
+ "idle",
18563
+ "running",
18564
+ "done",
18565
+ "error"
18566
+ ]),
18567
+ total: number().int().nonnegative(),
18568
+ completed: number().int().nonnegative(),
18569
+ currentDeviceId: number().int().nullable(),
18570
+ failed: array(number().int()).readonly(),
18571
+ mediaDropped: number().int().nonnegative(),
18572
+ tracks: number().int().nonnegative(),
18573
+ events: number().int().nonnegative(),
18574
+ startedAtMs: number().int().nullable(),
18575
+ finishedAtMs: number().int().nullable(),
18576
+ error: string().nullable()
18577
+ });
18509
18578
  var CameraStatusSchema = object({
18510
18579
  deviceId: number(),
18511
18580
  assignment: CameraAssignmentStatusSchema,
@@ -18737,7 +18806,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
18737
18806
  }), CameraSwitchGroupSchema, {
18738
18807
  kind: "mutation",
18739
18808
  auth: "admin"
18740
- }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
18809
+ }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
18810
+ kind: "mutation",
18811
+ auth: "admin"
18812
+ }), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
18741
18813
  name: string(),
18742
18814
  description: string().optional(),
18743
18815
  config: CameraPipelineConfigSchema
@@ -19823,20 +19895,6 @@ var VectorStatsResultSchema = object({
19823
19895
  exact: boolean()
19824
19896
  });
19825
19897
  method(VectorDeclareIndexInputSchema, _void(), { kind: "mutation" }), method(VectorUpsertInputSchema, VectorUpsertResultSchema, { kind: "mutation" }), method(VectorQueryInputSchema, VectorQueryResultSchema), method(VectorGetInputSchema, VectorGetResultSchema), method(VectorDeleteInputSchema, VectorDeleteResultSchema, { kind: "mutation" }), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, { kind: "mutation" }), method(VectorStatsInputSchema, VectorStatsResultSchema);
19826
- /**
19827
- * `videoclips` — the unified, navigable-clip surface for a camera.
19828
- *
19829
- * A device-scoped WRAPPER cap (like `pipeline-analytics`): exactly one active
19830
- * provider per device, substitutable. The DEFAULT provider (registered by
19831
- * `addon-post-analysis`, `defaultActive: true`) composes the analytics event
19832
- * log (markers + thumbnails) with the recorder's `getPlaybackManifest` — a clip
19833
- * is a time-WINDOW over existing footage, never a separate file. A camera that
19834
- * exposes NATIVE onboard clips (Reolink/Hikvision NVR) can later substitute the
19835
- * wrapper provider for its device and serve its own clip catalog + URLs.
19836
- *
19837
- * A `Clip` is purely time-based (subtree-blind): playback resolves segments by
19838
- * temporal overlap, so the API never decides `continuous` vs `events`.
19839
- */
19840
19898
  var ClipSchema = object({
19841
19899
  /** Opaque, provider-namespaced id. The default provider encodes the time
19842
19900
  * window so `getClipPlayback` is self-contained (no event re-query). */
@@ -19853,8 +19911,57 @@ var ClipSchema = object({
19853
19911
  startMs: number(),
19854
19912
  endMs: number()
19855
19913
  }),
19856
- /** Thumbnail URL (lazy; e.g. analytics `getEventMedia`). Never inlined. */
19857
- thumbnail: string().optional()
19914
+ /**
19915
+ * Lazy thumbnail URL, never inlined.
19916
+ *
19917
+ * Recording-derived clips (events-mode keep-window, and the prepared
19918
+ * continuous event+fragment visit) MUST use the snapshot of the **main
19919
+ * event of the interval** — `getEventMedia({ eventId, kind: 'snapshot' })`
19920
+ * of the event that owns `kind` (object > motion > audio). Do not extract
19921
+ * a keyframe from the recorded segments. Other providers (onboard, HKSV)
19922
+ * mint their own stills.
19923
+ *
19924
+ * **VOUCHED, never fabricated.** A provider emits this only for an event it
19925
+ * has CONFIRMED owns at least one media row (its own, or its owning track's).
19926
+ * Absent is meaningful — "this visit has no event still" — never "we did not
19927
+ * look". Stamping it from a URL template made 35% of one camera's clips point
19928
+ * at a 404 (device 3836, 2026-08-17: 64 of 179 clips dead, 63 of them motion).
19929
+ * A read that FAILS drops the claim; it never invents it.
19930
+ */
19931
+ thumbnail: string().optional(),
19932
+ /**
19933
+ * An instant INSIDE this visit's footage, hole-safe, where a recorded still
19934
+ * can be decoded. Present whenever the visit came from recorded availability;
19935
+ * absent on a per-event padded window (there is no footage to promise).
19936
+ *
19937
+ * This is not a thumbnail and not a second byte path: it is the argument to
19938
+ * the recorder's existing still route. The surface — never the provider —
19939
+ * decides whether to use it. It is the midpoint of the visit's LONGEST
19940
+ * contiguous range, not of the visit: a visit spans its holes by
19941
+ * construction, so a naive midpoint lands in dead air.
19942
+ */
19943
+ stillAtMs: number().optional(),
19944
+ /**
19945
+ * Analytics event ids that overlap this visit — a BOUNDED sample, newest
19946
+ * first within kind (object → motion → audio), capped at
19947
+ * {@link MAX_CLIP_EVENT_IDS}. Empty on footage-only clips.
19948
+ *
19949
+ * Bounded because it is not a payload the surface pages through: one visit on
19950
+ * device 615 carried 2 345 ids, and `eventIds` was 99% of a 153 KB
19951
+ * camera-day. Read {@link eventCount} for the true total.
19952
+ */
19953
+ eventIds: array(string()).optional(),
19954
+ /** How many analytics events actually overlap this visit. Differs from
19955
+ * `eventIds.length` exactly when the sample was capped — so a truncated
19956
+ * list is never mistaken for a quiet visit. */
19957
+ eventCount: number().int().nonnegative().optional(),
19958
+ /** Intra-visit footage holes (GOP rolls, discarded segments) still shorter
19959
+ * than `VISIT_MERGE_GAP_MS`. Playback concatenates around them; the timeline
19960
+ * bar keeps showing them via `recording.getAvailability`. */
19961
+ holes: array(object({
19962
+ startMs: number(),
19963
+ endMs: number()
19964
+ })).optional()
19858
19965
  });
19859
19966
  var ClipPlaybackSchema = object({
19860
19967
  /** HLS master URL through the hub data-plane (Range + token in path). */
@@ -20318,7 +20425,14 @@ var SearchResultSchema = object({
20318
20425
  });
20319
20426
  var AutoUpdateSettingsSchema = object({
20320
20427
  channel: ChannelSchema,
20321
- intervalSeconds: number()
20428
+ intervalSeconds: number(),
20429
+ /**
20430
+ * Cadence of the "an update exists" POLLER, in seconds. Independent of
20431
+ * `channel`: the poller runs while auto-apply is `off`, because being told
20432
+ * about a publish and installing it are different decisions. Clamped
20433
+ * server-side to 900 s … 604800 s; defaults to 21600 s (6 h).
20434
+ */
20435
+ updateCheckIntervalSeconds: number()
20322
20436
  });
20323
20437
  var AddonAutoUpdateSchema = ChannelWithInheritSchema;
20324
20438
  var RestartAddonResultSchema = unknown();
@@ -20459,7 +20573,9 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
20459
20573
  auth: "admin"
20460
20574
  }), method(_void(), AutoUpdateSettingsSchema, { auth: "admin" }), method(object({
20461
20575
  channel: ChannelSchema,
20462
- intervalSeconds: number().min(300).max(86400).optional()
20576
+ intervalSeconds: number().min(300).max(86400).optional(),
20577
+ /** Availability-poll cadence; see AutoUpdateSettingsSchema. */
20578
+ updateCheckIntervalSeconds: number().min(900).max(604800).optional()
20463
20579
  }), unknown(), {
20464
20580
  kind: "mutation",
20465
20581
  auth: "admin"
@@ -24452,7 +24568,9 @@ var ExportOptionsSchema = object({
24452
24568
  includeAudio: boolean(),
24453
24569
  maxLifeMs: number().int().positive(),
24454
24570
  deleteAfterDownload: boolean(),
24455
- title: string().max(200).optional()
24571
+ title: string().max(200).optional(),
24572
+ /** Notification-output target ids to ping when this export becomes ready. */
24573
+ notifyTargetIds: array(string().min(1)).max(20).optional()
24456
24574
  }).superRefine((v, ctx) => {
24457
24575
  if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
24458
24576
  code: ZodIssueCode.custom,
@@ -24511,10 +24629,18 @@ var ExportBytesSchema = object({
24511
24629
  });
24512
24630
  method(object({
24513
24631
  deviceId: number(),
24514
- profile: string(),
24632
+ /** @deprecated Prefer `profiles`. Kept so timelapse/notifiers keep working. */
24633
+ profile: string().optional(),
24634
+ profiles: array(string()).min(1).optional(),
24515
24635
  fromMs: number(),
24516
24636
  toMs: number(),
24517
24637
  options: ExportOptionsSchema
24638
+ }).superRefine((v, ctx) => {
24639
+ if ((v.profiles !== void 0 && v.profiles.length > 0 ? v.profiles : v.profile !== void 0 ? [v.profile] : []).length < 1) ctx.addIssue({
24640
+ code: ZodIssueCode.custom,
24641
+ message: "pass profiles[] (min 1) or legacy profile",
24642
+ path: ["profiles"]
24643
+ });
24518
24644
  }), ExportRecordSchema, {
24519
24645
  kind: "mutation",
24520
24646
  auth: "protected"
@@ -29114,6 +29240,12 @@ Object.freeze({
29114
29240
  addonId: null,
29115
29241
  access: "create"
29116
29242
  },
29243
+ "pipelineAnalytics.reconcileFromDisk": {
29244
+ capName: "pipeline-analytics",
29245
+ capScope: "device",
29246
+ addonId: null,
29247
+ access: "create"
29248
+ },
29117
29249
  "pipelineAnalytics.refreshStorageLocationsForMigration": {
29118
29250
  capName: "pipeline-analytics",
29119
29251
  capScope: "device",
@@ -29516,6 +29648,12 @@ Object.freeze({
29516
29648
  addonId: null,
29517
29649
  access: "view"
29518
29650
  },
29651
+ "pipelineOrchestrator.getReconcileFromDiskStatus": {
29652
+ capName: "pipeline-orchestrator",
29653
+ capScope: "system",
29654
+ addonId: null,
29655
+ access: "view"
29656
+ },
29519
29657
  "pipelineOrchestrator.listAgentSettings": {
29520
29658
  capName: "pipeline-orchestrator",
29521
29659
  capScope: "system",
@@ -29540,6 +29678,12 @@ Object.freeze({
29540
29678
  addonId: null,
29541
29679
  access: "create"
29542
29680
  },
29681
+ "pipelineOrchestrator.reconcileFromDisk": {
29682
+ capName: "pipeline-orchestrator",
29683
+ capScope: "system",
29684
+ addonId: null,
29685
+ access: "create"
29686
+ },
29543
29687
  "pipelineOrchestrator.removeAgentSettings": {
29544
29688
  capName: "pipeline-orchestrator",
29545
29689
  capScope: "system",
@@ -32531,6 +32675,11 @@ Object.freeze({
32531
32675
  form: "single",
32532
32676
  optional: true
32533
32677
  }],
32678
+ "pipelineAnalytics.reconcileFromDisk": [{
32679
+ name: "deviceId",
32680
+ form: "single",
32681
+ optional: false
32682
+ }],
32534
32683
  "pipelineAnalytics.restageRetrainTrack": [{
32535
32684
  name: "deviceId",
32536
32685
  form: "single",
@@ -33596,6 +33745,8 @@ DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
33596
33745
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
33597
33746
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
33598
33747
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
33748
+ var MB = 1024 * 1024;
33749
+ 1024 * MB, 3072 * MB;
33599
33750
  //#endregion
33600
33751
  //#region ../../node_modules/nodemailer/lib/punycode/index.js
33601
33752
  var require_punycode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-smtp-nodemailer",
3
- "version": "1.2.19",
3
+ "version": "1.2.20",
4
4
  "description": "SMTP email provider addon for CamStack — wraps `nodemailer` and registers a `smtp-provider` cap collection entry. Used by magic-link login + notifier addons.",
5
5
  "keywords": [
6
6
  "camstack",