@camstack/addon-smtp-nodemailer 1.2.19 → 1.2.21

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,65 @@ 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
+ * Distinct object classes attached to this visit (`person`, `car`, …),
19918
+ * dominant first, capped at {@link MAX_CLIP_LABELS}. The ribbon renders these
19919
+ * instead of the bare kind — "Object" tells the operator nothing a colour bar
19920
+ * did not. Absent (never empty) when the visit attached no classified object
19921
+ * event, so a motion/audio-only visit keeps its kind label.
19922
+ */
19923
+ labels: array(string()).max(3).optional(),
19924
+ /**
19925
+ * Lazy thumbnail URL, never inlined.
19926
+ *
19927
+ * Recording-derived clips (events-mode keep-window, and the prepared
19928
+ * continuous event+fragment visit) MUST use the snapshot of the **main
19929
+ * event of the interval** — `getEventMedia({ eventId, kind: 'snapshot' })`
19930
+ * of the event that owns `kind` (object > motion > audio). Do not extract
19931
+ * a keyframe from the recorded segments. Other providers (onboard, HKSV)
19932
+ * mint their own stills.
19933
+ *
19934
+ * **VOUCHED, never fabricated.** A provider emits this only for an event it
19935
+ * has CONFIRMED owns at least one media row (its own, or its owning track's).
19936
+ * Absent is meaningful — "this visit has no event still" — never "we did not
19937
+ * look". Stamping it from a URL template made 35% of one camera's clips point
19938
+ * at a 404 (device 3836, 2026-08-17: 64 of 179 clips dead, 63 of them motion).
19939
+ * A read that FAILS drops the claim; it never invents it.
19940
+ */
19941
+ thumbnail: string().optional(),
19942
+ /**
19943
+ * An instant INSIDE this visit's footage, hole-safe, where a recorded still
19944
+ * can be decoded. Present whenever the visit came from recorded availability;
19945
+ * absent on a per-event padded window (there is no footage to promise).
19946
+ *
19947
+ * This is not a thumbnail and not a second byte path: it is the argument to
19948
+ * the recorder's existing still route. The surface — never the provider —
19949
+ * decides whether to use it. It is the midpoint of the visit's LONGEST
19950
+ * contiguous range, not of the visit: a visit spans its holes by
19951
+ * construction, so a naive midpoint lands in dead air.
19952
+ */
19953
+ stillAtMs: number().optional(),
19954
+ /**
19955
+ * Analytics event ids that overlap this visit — a BOUNDED sample, newest
19956
+ * first within kind (object → motion → audio), capped at
19957
+ * {@link MAX_CLIP_EVENT_IDS}. Empty on footage-only clips.
19958
+ *
19959
+ * Bounded because it is not a payload the surface pages through: one visit on
19960
+ * device 615 carried 2 345 ids, and `eventIds` was 99% of a 153 KB
19961
+ * camera-day. Read {@link eventCount} for the true total.
19962
+ */
19963
+ eventIds: array(string()).optional(),
19964
+ /** How many analytics events actually overlap this visit. Differs from
19965
+ * `eventIds.length` exactly when the sample was capped — so a truncated
19966
+ * list is never mistaken for a quiet visit. */
19967
+ eventCount: number().int().nonnegative().optional(),
19968
+ /** Intra-visit footage holes (GOP rolls, discarded segments) still shorter
19969
+ * than `VISIT_MERGE_GAP_MS`. Playback concatenates around them; the timeline
19970
+ * bar keeps showing them via `recording.getAvailability`. */
19971
+ holes: array(object({
19972
+ startMs: number(),
19973
+ endMs: number()
19974
+ })).optional()
19860
19975
  });
19861
19976
  var ClipPlaybackSchema = object({
19862
19977
  /** HLS master URL through the hub data-plane (Range + token in path). */
@@ -20320,7 +20435,14 @@ var SearchResultSchema = object({
20320
20435
  });
20321
20436
  var AutoUpdateSettingsSchema = object({
20322
20437
  channel: ChannelSchema,
20323
- intervalSeconds: number()
20438
+ intervalSeconds: number(),
20439
+ /**
20440
+ * Cadence of the "an update exists" POLLER, in seconds. Independent of
20441
+ * `channel`: the poller runs while auto-apply is `off`, because being told
20442
+ * about a publish and installing it are different decisions. Clamped
20443
+ * server-side to 900 s … 604800 s; defaults to 21600 s (6 h).
20444
+ */
20445
+ updateCheckIntervalSeconds: number()
20324
20446
  });
20325
20447
  var AddonAutoUpdateSchema = ChannelWithInheritSchema;
20326
20448
  var RestartAddonResultSchema = unknown();
@@ -20461,7 +20583,9 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
20461
20583
  auth: "admin"
20462
20584
  }), method(_void(), AutoUpdateSettingsSchema, { auth: "admin" }), method(object({
20463
20585
  channel: ChannelSchema,
20464
- intervalSeconds: number().min(300).max(86400).optional()
20586
+ intervalSeconds: number().min(300).max(86400).optional(),
20587
+ /** Availability-poll cadence; see AutoUpdateSettingsSchema. */
20588
+ updateCheckIntervalSeconds: number().min(900).max(604800).optional()
20465
20589
  }), unknown(), {
20466
20590
  kind: "mutation",
20467
20591
  auth: "admin"
@@ -24454,7 +24578,9 @@ var ExportOptionsSchema = object({
24454
24578
  includeAudio: boolean(),
24455
24579
  maxLifeMs: number().int().positive(),
24456
24580
  deleteAfterDownload: boolean(),
24457
- title: string().max(200).optional()
24581
+ title: string().max(200).optional(),
24582
+ /** Notification-output target ids to ping when this export becomes ready. */
24583
+ notifyTargetIds: array(string().min(1)).max(20).optional()
24458
24584
  }).superRefine((v, ctx) => {
24459
24585
  if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
24460
24586
  code: ZodIssueCode.custom,
@@ -24513,10 +24639,18 @@ var ExportBytesSchema = object({
24513
24639
  });
24514
24640
  method(object({
24515
24641
  deviceId: number(),
24516
- profile: string(),
24642
+ /** @deprecated Prefer `profiles`. Kept so timelapse/notifiers keep working. */
24643
+ profile: string().optional(),
24644
+ profiles: array(string()).min(1).optional(),
24517
24645
  fromMs: number(),
24518
24646
  toMs: number(),
24519
24647
  options: ExportOptionsSchema
24648
+ }).superRefine((v, ctx) => {
24649
+ if ((v.profiles !== void 0 && v.profiles.length > 0 ? v.profiles : v.profile !== void 0 ? [v.profile] : []).length < 1) ctx.addIssue({
24650
+ code: ZodIssueCode.custom,
24651
+ message: "pass profiles[] (min 1) or legacy profile",
24652
+ path: ["profiles"]
24653
+ });
24520
24654
  }), ExportRecordSchema, {
24521
24655
  kind: "mutation",
24522
24656
  auth: "protected"
@@ -29116,6 +29250,12 @@ Object.freeze({
29116
29250
  addonId: null,
29117
29251
  access: "create"
29118
29252
  },
29253
+ "pipelineAnalytics.reconcileFromDisk": {
29254
+ capName: "pipeline-analytics",
29255
+ capScope: "device",
29256
+ addonId: null,
29257
+ access: "create"
29258
+ },
29119
29259
  "pipelineAnalytics.refreshStorageLocationsForMigration": {
29120
29260
  capName: "pipeline-analytics",
29121
29261
  capScope: "device",
@@ -29518,6 +29658,12 @@ Object.freeze({
29518
29658
  addonId: null,
29519
29659
  access: "view"
29520
29660
  },
29661
+ "pipelineOrchestrator.getReconcileFromDiskStatus": {
29662
+ capName: "pipeline-orchestrator",
29663
+ capScope: "system",
29664
+ addonId: null,
29665
+ access: "view"
29666
+ },
29521
29667
  "pipelineOrchestrator.listAgentSettings": {
29522
29668
  capName: "pipeline-orchestrator",
29523
29669
  capScope: "system",
@@ -29542,6 +29688,12 @@ Object.freeze({
29542
29688
  addonId: null,
29543
29689
  access: "create"
29544
29690
  },
29691
+ "pipelineOrchestrator.reconcileFromDisk": {
29692
+ capName: "pipeline-orchestrator",
29693
+ capScope: "system",
29694
+ addonId: null,
29695
+ access: "create"
29696
+ },
29545
29697
  "pipelineOrchestrator.removeAgentSettings": {
29546
29698
  capName: "pipeline-orchestrator",
29547
29699
  capScope: "system",
@@ -32533,6 +32685,11 @@ Object.freeze({
32533
32685
  form: "single",
32534
32686
  optional: true
32535
32687
  }],
32688
+ "pipelineAnalytics.reconcileFromDisk": [{
32689
+ name: "deviceId",
32690
+ form: "single",
32691
+ optional: false
32692
+ }],
32536
32693
  "pipelineAnalytics.restageRetrainTrack": [{
32537
32694
  name: "deviceId",
32538
32695
  form: "single",
@@ -33598,6 +33755,8 @@ DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
33598
33755
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
33599
33756
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
33600
33757
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
33758
+ var MB = 1024 * 1024;
33759
+ 1024 * MB, 3072 * MB;
33601
33760
  //#endregion
33602
33761
  //#region ../../node_modules/nodemailer/lib/punycode/index.js
33603
33762
  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,65 @@ 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
+ * Distinct object classes attached to this visit (`person`, `car`, …),
19916
+ * dominant first, capped at {@link MAX_CLIP_LABELS}. The ribbon renders these
19917
+ * instead of the bare kind — "Object" tells the operator nothing a colour bar
19918
+ * did not. Absent (never empty) when the visit attached no classified object
19919
+ * event, so a motion/audio-only visit keeps its kind label.
19920
+ */
19921
+ labels: array(string()).max(3).optional(),
19922
+ /**
19923
+ * Lazy thumbnail URL, never inlined.
19924
+ *
19925
+ * Recording-derived clips (events-mode keep-window, and the prepared
19926
+ * continuous event+fragment visit) MUST use the snapshot of the **main
19927
+ * event of the interval** — `getEventMedia({ eventId, kind: 'snapshot' })`
19928
+ * of the event that owns `kind` (object > motion > audio). Do not extract
19929
+ * a keyframe from the recorded segments. Other providers (onboard, HKSV)
19930
+ * mint their own stills.
19931
+ *
19932
+ * **VOUCHED, never fabricated.** A provider emits this only for an event it
19933
+ * has CONFIRMED owns at least one media row (its own, or its owning track's).
19934
+ * Absent is meaningful — "this visit has no event still" — never "we did not
19935
+ * look". Stamping it from a URL template made 35% of one camera's clips point
19936
+ * at a 404 (device 3836, 2026-08-17: 64 of 179 clips dead, 63 of them motion).
19937
+ * A read that FAILS drops the claim; it never invents it.
19938
+ */
19939
+ thumbnail: string().optional(),
19940
+ /**
19941
+ * An instant INSIDE this visit's footage, hole-safe, where a recorded still
19942
+ * can be decoded. Present whenever the visit came from recorded availability;
19943
+ * absent on a per-event padded window (there is no footage to promise).
19944
+ *
19945
+ * This is not a thumbnail and not a second byte path: it is the argument to
19946
+ * the recorder's existing still route. The surface — never the provider —
19947
+ * decides whether to use it. It is the midpoint of the visit's LONGEST
19948
+ * contiguous range, not of the visit: a visit spans its holes by
19949
+ * construction, so a naive midpoint lands in dead air.
19950
+ */
19951
+ stillAtMs: number().optional(),
19952
+ /**
19953
+ * Analytics event ids that overlap this visit — a BOUNDED sample, newest
19954
+ * first within kind (object → motion → audio), capped at
19955
+ * {@link MAX_CLIP_EVENT_IDS}. Empty on footage-only clips.
19956
+ *
19957
+ * Bounded because it is not a payload the surface pages through: one visit on
19958
+ * device 615 carried 2 345 ids, and `eventIds` was 99% of a 153 KB
19959
+ * camera-day. Read {@link eventCount} for the true total.
19960
+ */
19961
+ eventIds: array(string()).optional(),
19962
+ /** How many analytics events actually overlap this visit. Differs from
19963
+ * `eventIds.length` exactly when the sample was capped — so a truncated
19964
+ * list is never mistaken for a quiet visit. */
19965
+ eventCount: number().int().nonnegative().optional(),
19966
+ /** Intra-visit footage holes (GOP rolls, discarded segments) still shorter
19967
+ * than `VISIT_MERGE_GAP_MS`. Playback concatenates around them; the timeline
19968
+ * bar keeps showing them via `recording.getAvailability`. */
19969
+ holes: array(object({
19970
+ startMs: number(),
19971
+ endMs: number()
19972
+ })).optional()
19858
19973
  });
19859
19974
  var ClipPlaybackSchema = object({
19860
19975
  /** HLS master URL through the hub data-plane (Range + token in path). */
@@ -20318,7 +20433,14 @@ var SearchResultSchema = object({
20318
20433
  });
20319
20434
  var AutoUpdateSettingsSchema = object({
20320
20435
  channel: ChannelSchema,
20321
- intervalSeconds: number()
20436
+ intervalSeconds: number(),
20437
+ /**
20438
+ * Cadence of the "an update exists" POLLER, in seconds. Independent of
20439
+ * `channel`: the poller runs while auto-apply is `off`, because being told
20440
+ * about a publish and installing it are different decisions. Clamped
20441
+ * server-side to 900 s … 604800 s; defaults to 21600 s (6 h).
20442
+ */
20443
+ updateCheckIntervalSeconds: number()
20322
20444
  });
20323
20445
  var AddonAutoUpdateSchema = ChannelWithInheritSchema;
20324
20446
  var RestartAddonResultSchema = unknown();
@@ -20459,7 +20581,9 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
20459
20581
  auth: "admin"
20460
20582
  }), method(_void(), AutoUpdateSettingsSchema, { auth: "admin" }), method(object({
20461
20583
  channel: ChannelSchema,
20462
- intervalSeconds: number().min(300).max(86400).optional()
20584
+ intervalSeconds: number().min(300).max(86400).optional(),
20585
+ /** Availability-poll cadence; see AutoUpdateSettingsSchema. */
20586
+ updateCheckIntervalSeconds: number().min(900).max(604800).optional()
20463
20587
  }), unknown(), {
20464
20588
  kind: "mutation",
20465
20589
  auth: "admin"
@@ -24452,7 +24576,9 @@ var ExportOptionsSchema = object({
24452
24576
  includeAudio: boolean(),
24453
24577
  maxLifeMs: number().int().positive(),
24454
24578
  deleteAfterDownload: boolean(),
24455
- title: string().max(200).optional()
24579
+ title: string().max(200).optional(),
24580
+ /** Notification-output target ids to ping when this export becomes ready. */
24581
+ notifyTargetIds: array(string().min(1)).max(20).optional()
24456
24582
  }).superRefine((v, ctx) => {
24457
24583
  if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
24458
24584
  code: ZodIssueCode.custom,
@@ -24511,10 +24637,18 @@ var ExportBytesSchema = object({
24511
24637
  });
24512
24638
  method(object({
24513
24639
  deviceId: number(),
24514
- profile: string(),
24640
+ /** @deprecated Prefer `profiles`. Kept so timelapse/notifiers keep working. */
24641
+ profile: string().optional(),
24642
+ profiles: array(string()).min(1).optional(),
24515
24643
  fromMs: number(),
24516
24644
  toMs: number(),
24517
24645
  options: ExportOptionsSchema
24646
+ }).superRefine((v, ctx) => {
24647
+ if ((v.profiles !== void 0 && v.profiles.length > 0 ? v.profiles : v.profile !== void 0 ? [v.profile] : []).length < 1) ctx.addIssue({
24648
+ code: ZodIssueCode.custom,
24649
+ message: "pass profiles[] (min 1) or legacy profile",
24650
+ path: ["profiles"]
24651
+ });
24518
24652
  }), ExportRecordSchema, {
24519
24653
  kind: "mutation",
24520
24654
  auth: "protected"
@@ -29114,6 +29248,12 @@ Object.freeze({
29114
29248
  addonId: null,
29115
29249
  access: "create"
29116
29250
  },
29251
+ "pipelineAnalytics.reconcileFromDisk": {
29252
+ capName: "pipeline-analytics",
29253
+ capScope: "device",
29254
+ addonId: null,
29255
+ access: "create"
29256
+ },
29117
29257
  "pipelineAnalytics.refreshStorageLocationsForMigration": {
29118
29258
  capName: "pipeline-analytics",
29119
29259
  capScope: "device",
@@ -29516,6 +29656,12 @@ Object.freeze({
29516
29656
  addonId: null,
29517
29657
  access: "view"
29518
29658
  },
29659
+ "pipelineOrchestrator.getReconcileFromDiskStatus": {
29660
+ capName: "pipeline-orchestrator",
29661
+ capScope: "system",
29662
+ addonId: null,
29663
+ access: "view"
29664
+ },
29519
29665
  "pipelineOrchestrator.listAgentSettings": {
29520
29666
  capName: "pipeline-orchestrator",
29521
29667
  capScope: "system",
@@ -29540,6 +29686,12 @@ Object.freeze({
29540
29686
  addonId: null,
29541
29687
  access: "create"
29542
29688
  },
29689
+ "pipelineOrchestrator.reconcileFromDisk": {
29690
+ capName: "pipeline-orchestrator",
29691
+ capScope: "system",
29692
+ addonId: null,
29693
+ access: "create"
29694
+ },
29543
29695
  "pipelineOrchestrator.removeAgentSettings": {
29544
29696
  capName: "pipeline-orchestrator",
29545
29697
  capScope: "system",
@@ -32531,6 +32683,11 @@ Object.freeze({
32531
32683
  form: "single",
32532
32684
  optional: true
32533
32685
  }],
32686
+ "pipelineAnalytics.reconcileFromDisk": [{
32687
+ name: "deviceId",
32688
+ form: "single",
32689
+ optional: false
32690
+ }],
32534
32691
  "pipelineAnalytics.restageRetrainTrack": [{
32535
32692
  name: "deviceId",
32536
32693
  form: "single",
@@ -33596,6 +33753,8 @@ DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
33596
33753
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
33597
33754
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
33598
33755
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
33756
+ var MB = 1024 * 1024;
33757
+ 1024 * MB, 3072 * MB;
33599
33758
  //#endregion
33600
33759
  //#region ../../node_modules/nodemailer/lib/punycode/index.js
33601
33760
  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.21",
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",