@camstack/addon-smtp-nodemailer 1.1.0 → 1.1.2

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.
@@ -4665,7 +4665,7 @@ function _instanceof(cls, params = {}) {
4665
4665
  return inst;
4666
4666
  }
4667
4667
  //#endregion
4668
- //#region ../types/dist/sleep-B1dKJAMJ.mjs
4668
+ //#region ../types/dist/sleep-BV7rLc6Y.mjs
4669
4669
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4670
4670
  EventCategory["SystemBoot"] = "system.boot";
4671
4671
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5144,6 +5144,12 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5144
5144
  * Payload: `{ deviceId, childDeviceIds, hiddenChildIds }`.
5145
5145
  */
5146
5146
  EventCategory["AccessoriesChanged"] = "accessories.onAccessoriesChanged";
5147
+ /**
5148
+ * Progress update from a running model conversion job.
5149
+ * Payload: `{ kind: 'model-convert', phase, sessionId?, pct?, detail? }`.
5150
+ * Emitted by `addon-model-studio` on the converting node.
5151
+ */
5152
+ EventCategory["ModelConvertProgress"] = "model-convert.progress";
5147
5153
  return EventCategory;
5148
5154
  }({});
5149
5155
  Object.fromEntries([
@@ -6665,6 +6671,13 @@ object({
6665
6671
  unreachable: number()
6666
6672
  })
6667
6673
  });
6674
+ var LabelDefinitionSchema = object({
6675
+ id: string(),
6676
+ name: string(),
6677
+ category: string().optional(),
6678
+ description: string().optional(),
6679
+ icon: string().optional()
6680
+ });
6668
6681
  var MODEL_FORMATS = [
6669
6682
  "onnx",
6670
6683
  "coreml",
@@ -6673,6 +6686,120 @@ var MODEL_FORMATS = [
6673
6686
  "pt"
6674
6687
  ];
6675
6688
  /**
6689
+ * Multi-file format payload.
6690
+ *
6691
+ * - Directory formats (`isDirectory: true`, e.g. `.mlpackage`): files
6692
+ * relative to the directory root — the downloader fetches each from
6693
+ * `{url}/{file}` into `{modelDir}/{file}`. If omitted, it probes the
6694
+ * HuggingFace API (slower).
6695
+ * - Single-file formats (no `isDirectory`, e.g. OpenVINO IR): sibling
6696
+ * files fetched from the SAME remote directory as `url` and stored flat
6697
+ * alongside the main file — e.g. `['camstack-yolov9t.bin']` for the IR
6698
+ * weights next to `camstack-yolov9t.xml`.
6699
+ */
6700
+ var ModelFormatEntrySchema = object({
6701
+ url: string(),
6702
+ sizeMB: number(),
6703
+ /** Whether this format is a directory bundle (e.g., .mlpackage) rather than a single file */
6704
+ isDirectory: boolean().optional(),
6705
+ /** Multi-file payload (directory members or sibling files). */
6706
+ files: array(string()).readonly().optional(),
6707
+ /** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
6708
+ runtimes: array(_enum(["node", "python"])).readonly().optional()
6709
+ });
6710
+ /**
6711
+ * Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
6712
+ * The downloader fetches from `url` and saves to `{modelsDir}/{filename}`.
6713
+ */
6714
+ var ModelExtraFileSchema = object({
6715
+ url: string(),
6716
+ filename: string(),
6717
+ sizeMB: number()
6718
+ });
6719
+ /**
6720
+ * Per-format payload map. Modelled as an explicit object (one optional key
6721
+ * per `ModelFormat`) rather than `z.record(enum, …)` — zod v4's enum-keyed
6722
+ * record requires every key, but a catalog entry only ships a subset of
6723
+ * formats.
6724
+ */
6725
+ var ModelFormatsSchema = object({
6726
+ onnx: ModelFormatEntrySchema.optional(),
6727
+ coreml: ModelFormatEntrySchema.optional(),
6728
+ openvino: ModelFormatEntrySchema.optional(),
6729
+ tflite: ModelFormatEntrySchema.optional(),
6730
+ pt: ModelFormatEntrySchema.optional()
6731
+ });
6732
+ var ModelCatalogEntrySchema = object({
6733
+ id: string(),
6734
+ name: string(),
6735
+ description: string(),
6736
+ formats: ModelFormatsSchema,
6737
+ inputSize: object({
6738
+ width: number(),
6739
+ height: number()
6740
+ }),
6741
+ labels: array(LabelDefinitionSchema).readonly(),
6742
+ inputLayout: _enum(["nchw", "nhwc"]).optional(),
6743
+ inputNormalization: _enum([
6744
+ "zero-one",
6745
+ "imagenet",
6746
+ "none"
6747
+ ]).optional(),
6748
+ preprocessMode: _enum(["letterbox", "resize"]).optional(),
6749
+ /**
6750
+ * When true, the executor produces a landmark-aligned crop (similarity warp
6751
+ * onto the canonical template) before this step runs, instead of a plain
6752
+ * axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
6753
+ * their embeddings are only discriminative on an aligned input. The face
6754
+ * detector that produced the parent detail must emit 5 landmarks.
6755
+ */
6756
+ faceAlignment: boolean().optional(),
6757
+ /**
6758
+ * Auxiliary files required at runtime (labels JSON, charset dict, etc.).
6759
+ * Downloaded into the same modelsDir alongside the model file.
6760
+ */
6761
+ extraFiles: array(ModelExtraFileSchema).readonly().optional()
6762
+ });
6763
+ var ConvertTargetSchema = discriminatedUnion("format", [object({
6764
+ format: literal("openvino"),
6765
+ precisions: array(_enum(["fp16", "int8"])).min(1).readonly()
6766
+ }), object({ format: literal("coreml") })]);
6767
+ var ModelConvertMetadataSchema = object({
6768
+ id: string().regex(/^[a-zA-Z0-9._-]+$/),
6769
+ name: string(),
6770
+ labels: array(LabelDefinitionSchema).readonly(),
6771
+ inputSize: object({
6772
+ width: number(),
6773
+ height: number()
6774
+ }),
6775
+ inputLayout: _enum(["nchw", "nhwc"]).optional(),
6776
+ inputNormalization: _enum([
6777
+ "zero-one",
6778
+ "imagenet",
6779
+ "none"
6780
+ ]).optional(),
6781
+ preprocessMode: _enum(["letterbox", "resize"]).optional(),
6782
+ outputFormat: _enum([
6783
+ "yolo",
6784
+ "ssd",
6785
+ "embedding",
6786
+ "classification",
6787
+ "ocr",
6788
+ "segmentation"
6789
+ ]),
6790
+ faceAlignment: boolean().optional()
6791
+ });
6792
+ var ConvertResultSchema = object({
6793
+ entry: ModelCatalogEntrySchema,
6794
+ artifacts: array(object({
6795
+ format: _enum(MODEL_FORMATS),
6796
+ precision: _enum(["fp16", "int8"]).optional(),
6797
+ sizeMB: number(),
6798
+ validated: boolean(),
6799
+ files: array(string()).readonly()
6800
+ })).readonly()
6801
+ });
6802
+ /**
6676
6803
  * Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
6677
6804
  * Named `RecordingWeekday` to avoid collision with the string-union
6678
6805
  * `Weekday` exported from `interfaces/timezones.ts`.
@@ -12524,6 +12651,54 @@ var EnrichedWidgetMetadataSchema = WidgetMetadataSchema.extend({
12524
12651
  bundleUrl: string()
12525
12652
  });
12526
12653
  method(_void(), array(EnrichedWidgetMetadataSchema).readonly());
12654
+ /**
12655
+ * `custom-model-registry` — collection cap exposing operator-registered
12656
+ * custom detection models. Each provider (today: `addon-model-studio`)
12657
+ * contributes a list of `CustomModelDescriptor`s; the hub auto-concatenates
12658
+ * them across providers (`concatCollection`).
12659
+ *
12660
+ * The detection-pipeline is *aware* of this cap: when at least one provider
12661
+ * exists it unions these descriptors into the per-step model picker and the
12662
+ * runtime model-resolution path, alongside the static catalog. When no
12663
+ * provider exists the consumer no-ops entirely (identical to the catalog-only
12664
+ * behaviour).
12665
+ *
12666
+ * A descriptor carries a full `ModelCatalogEntry` directly — the same shape
12667
+ * the static catalog uses — so the existing download/resolution code consumes
12668
+ * it unchanged. `stepId` is the detection step the model targets
12669
+ * (e.g. `'object-detection'`).
12670
+ */
12671
+ var CustomModelDescriptorSchema = object({
12672
+ stepId: string(),
12673
+ entry: ModelCatalogEntrySchema
12674
+ });
12675
+ method(_void(), array(CustomModelDescriptorSchema).readonly());
12676
+ method(object({
12677
+ nodeId: string(),
12678
+ modelId: string(),
12679
+ format: _enum(MODEL_FORMATS),
12680
+ entry: ModelCatalogEntrySchema
12681
+ }), object({
12682
+ ok: boolean(),
12683
+ /** sha256 of the staged tarball (empty for a hub-local no-op). */
12684
+ sha256: string(),
12685
+ bytes: number(),
12686
+ /** The target node's modelsDir the artifact landed in. */
12687
+ path: string()
12688
+ }), {
12689
+ kind: "mutation",
12690
+ auth: "admin"
12691
+ });
12692
+ method(object({
12693
+ sourceUrl: string(),
12694
+ metadata: ModelConvertMetadataSchema,
12695
+ targets: array(ConvertTargetSchema).min(1).readonly(),
12696
+ calibrationRef: string().optional(),
12697
+ sessionId: string().optional()
12698
+ }), ConvertResultSchema, {
12699
+ kind: "mutation",
12700
+ auth: "admin"
12701
+ });
12527
12702
  var AddonHttpRouteSchema = object({
12528
12703
  method: _enum([
12529
12704
  "GET",
@@ -17418,6 +17593,12 @@ Object.freeze({
17418
17593
  addonId: null,
17419
17594
  access: "create"
17420
17595
  },
17596
+ "customModelRegistry.listModels": {
17597
+ capName: "custom-model-registry",
17598
+ capScope: "system",
17599
+ addonId: null,
17600
+ access: "view"
17601
+ },
17421
17602
  "decoder.createSession": {
17422
17603
  capName: "decoder",
17423
17604
  capScope: "system",
@@ -18642,6 +18823,18 @@ Object.freeze({
18642
18823
  addonId: null,
18643
18824
  access: "view"
18644
18825
  },
18826
+ "modelConvert.convert": {
18827
+ capName: "model-convert",
18828
+ capScope: "system",
18829
+ addonId: null,
18830
+ access: "create"
18831
+ },
18832
+ "modelDistributor.distributeModel": {
18833
+ capName: "model-distributor",
18834
+ capScope: "system",
18835
+ addonId: null,
18836
+ access: "create"
18837
+ },
18645
18838
  "motion.isDetected": {
18646
18839
  capName: "motion",
18647
18840
  capScope: "device",
@@ -4663,7 +4663,7 @@ function _instanceof(cls, params = {}) {
4663
4663
  return inst;
4664
4664
  }
4665
4665
  //#endregion
4666
- //#region ../types/dist/sleep-B1dKJAMJ.mjs
4666
+ //#region ../types/dist/sleep-BV7rLc6Y.mjs
4667
4667
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4668
4668
  EventCategory["SystemBoot"] = "system.boot";
4669
4669
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5142,6 +5142,12 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5142
5142
  * Payload: `{ deviceId, childDeviceIds, hiddenChildIds }`.
5143
5143
  */
5144
5144
  EventCategory["AccessoriesChanged"] = "accessories.onAccessoriesChanged";
5145
+ /**
5146
+ * Progress update from a running model conversion job.
5147
+ * Payload: `{ kind: 'model-convert', phase, sessionId?, pct?, detail? }`.
5148
+ * Emitted by `addon-model-studio` on the converting node.
5149
+ */
5150
+ EventCategory["ModelConvertProgress"] = "model-convert.progress";
5145
5151
  return EventCategory;
5146
5152
  }({});
5147
5153
  Object.fromEntries([
@@ -6663,6 +6669,13 @@ object({
6663
6669
  unreachable: number()
6664
6670
  })
6665
6671
  });
6672
+ var LabelDefinitionSchema = object({
6673
+ id: string(),
6674
+ name: string(),
6675
+ category: string().optional(),
6676
+ description: string().optional(),
6677
+ icon: string().optional()
6678
+ });
6666
6679
  var MODEL_FORMATS = [
6667
6680
  "onnx",
6668
6681
  "coreml",
@@ -6671,6 +6684,120 @@ var MODEL_FORMATS = [
6671
6684
  "pt"
6672
6685
  ];
6673
6686
  /**
6687
+ * Multi-file format payload.
6688
+ *
6689
+ * - Directory formats (`isDirectory: true`, e.g. `.mlpackage`): files
6690
+ * relative to the directory root — the downloader fetches each from
6691
+ * `{url}/{file}` into `{modelDir}/{file}`. If omitted, it probes the
6692
+ * HuggingFace API (slower).
6693
+ * - Single-file formats (no `isDirectory`, e.g. OpenVINO IR): sibling
6694
+ * files fetched from the SAME remote directory as `url` and stored flat
6695
+ * alongside the main file — e.g. `['camstack-yolov9t.bin']` for the IR
6696
+ * weights next to `camstack-yolov9t.xml`.
6697
+ */
6698
+ var ModelFormatEntrySchema = object({
6699
+ url: string(),
6700
+ sizeMB: number(),
6701
+ /** Whether this format is a directory bundle (e.g., .mlpackage) rather than a single file */
6702
+ isDirectory: boolean().optional(),
6703
+ /** Multi-file payload (directory members or sibling files). */
6704
+ files: array(string()).readonly().optional(),
6705
+ /** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
6706
+ runtimes: array(_enum(["node", "python"])).readonly().optional()
6707
+ });
6708
+ /**
6709
+ * Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
6710
+ * The downloader fetches from `url` and saves to `{modelsDir}/{filename}`.
6711
+ */
6712
+ var ModelExtraFileSchema = object({
6713
+ url: string(),
6714
+ filename: string(),
6715
+ sizeMB: number()
6716
+ });
6717
+ /**
6718
+ * Per-format payload map. Modelled as an explicit object (one optional key
6719
+ * per `ModelFormat`) rather than `z.record(enum, …)` — zod v4's enum-keyed
6720
+ * record requires every key, but a catalog entry only ships a subset of
6721
+ * formats.
6722
+ */
6723
+ var ModelFormatsSchema = object({
6724
+ onnx: ModelFormatEntrySchema.optional(),
6725
+ coreml: ModelFormatEntrySchema.optional(),
6726
+ openvino: ModelFormatEntrySchema.optional(),
6727
+ tflite: ModelFormatEntrySchema.optional(),
6728
+ pt: ModelFormatEntrySchema.optional()
6729
+ });
6730
+ var ModelCatalogEntrySchema = object({
6731
+ id: string(),
6732
+ name: string(),
6733
+ description: string(),
6734
+ formats: ModelFormatsSchema,
6735
+ inputSize: object({
6736
+ width: number(),
6737
+ height: number()
6738
+ }),
6739
+ labels: array(LabelDefinitionSchema).readonly(),
6740
+ inputLayout: _enum(["nchw", "nhwc"]).optional(),
6741
+ inputNormalization: _enum([
6742
+ "zero-one",
6743
+ "imagenet",
6744
+ "none"
6745
+ ]).optional(),
6746
+ preprocessMode: _enum(["letterbox", "resize"]).optional(),
6747
+ /**
6748
+ * When true, the executor produces a landmark-aligned crop (similarity warp
6749
+ * onto the canonical template) before this step runs, instead of a plain
6750
+ * axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
6751
+ * their embeddings are only discriminative on an aligned input. The face
6752
+ * detector that produced the parent detail must emit 5 landmarks.
6753
+ */
6754
+ faceAlignment: boolean().optional(),
6755
+ /**
6756
+ * Auxiliary files required at runtime (labels JSON, charset dict, etc.).
6757
+ * Downloaded into the same modelsDir alongside the model file.
6758
+ */
6759
+ extraFiles: array(ModelExtraFileSchema).readonly().optional()
6760
+ });
6761
+ var ConvertTargetSchema = discriminatedUnion("format", [object({
6762
+ format: literal("openvino"),
6763
+ precisions: array(_enum(["fp16", "int8"])).min(1).readonly()
6764
+ }), object({ format: literal("coreml") })]);
6765
+ var ModelConvertMetadataSchema = object({
6766
+ id: string().regex(/^[a-zA-Z0-9._-]+$/),
6767
+ name: string(),
6768
+ labels: array(LabelDefinitionSchema).readonly(),
6769
+ inputSize: object({
6770
+ width: number(),
6771
+ height: number()
6772
+ }),
6773
+ inputLayout: _enum(["nchw", "nhwc"]).optional(),
6774
+ inputNormalization: _enum([
6775
+ "zero-one",
6776
+ "imagenet",
6777
+ "none"
6778
+ ]).optional(),
6779
+ preprocessMode: _enum(["letterbox", "resize"]).optional(),
6780
+ outputFormat: _enum([
6781
+ "yolo",
6782
+ "ssd",
6783
+ "embedding",
6784
+ "classification",
6785
+ "ocr",
6786
+ "segmentation"
6787
+ ]),
6788
+ faceAlignment: boolean().optional()
6789
+ });
6790
+ var ConvertResultSchema = object({
6791
+ entry: ModelCatalogEntrySchema,
6792
+ artifacts: array(object({
6793
+ format: _enum(MODEL_FORMATS),
6794
+ precision: _enum(["fp16", "int8"]).optional(),
6795
+ sizeMB: number(),
6796
+ validated: boolean(),
6797
+ files: array(string()).readonly()
6798
+ })).readonly()
6799
+ });
6800
+ /**
6674
6801
  * Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
6675
6802
  * Named `RecordingWeekday` to avoid collision with the string-union
6676
6803
  * `Weekday` exported from `interfaces/timezones.ts`.
@@ -12522,6 +12649,54 @@ var EnrichedWidgetMetadataSchema = WidgetMetadataSchema.extend({
12522
12649
  bundleUrl: string()
12523
12650
  });
12524
12651
  method(_void(), array(EnrichedWidgetMetadataSchema).readonly());
12652
+ /**
12653
+ * `custom-model-registry` — collection cap exposing operator-registered
12654
+ * custom detection models. Each provider (today: `addon-model-studio`)
12655
+ * contributes a list of `CustomModelDescriptor`s; the hub auto-concatenates
12656
+ * them across providers (`concatCollection`).
12657
+ *
12658
+ * The detection-pipeline is *aware* of this cap: when at least one provider
12659
+ * exists it unions these descriptors into the per-step model picker and the
12660
+ * runtime model-resolution path, alongside the static catalog. When no
12661
+ * provider exists the consumer no-ops entirely (identical to the catalog-only
12662
+ * behaviour).
12663
+ *
12664
+ * A descriptor carries a full `ModelCatalogEntry` directly — the same shape
12665
+ * the static catalog uses — so the existing download/resolution code consumes
12666
+ * it unchanged. `stepId` is the detection step the model targets
12667
+ * (e.g. `'object-detection'`).
12668
+ */
12669
+ var CustomModelDescriptorSchema = object({
12670
+ stepId: string(),
12671
+ entry: ModelCatalogEntrySchema
12672
+ });
12673
+ method(_void(), array(CustomModelDescriptorSchema).readonly());
12674
+ method(object({
12675
+ nodeId: string(),
12676
+ modelId: string(),
12677
+ format: _enum(MODEL_FORMATS),
12678
+ entry: ModelCatalogEntrySchema
12679
+ }), object({
12680
+ ok: boolean(),
12681
+ /** sha256 of the staged tarball (empty for a hub-local no-op). */
12682
+ sha256: string(),
12683
+ bytes: number(),
12684
+ /** The target node's modelsDir the artifact landed in. */
12685
+ path: string()
12686
+ }), {
12687
+ kind: "mutation",
12688
+ auth: "admin"
12689
+ });
12690
+ method(object({
12691
+ sourceUrl: string(),
12692
+ metadata: ModelConvertMetadataSchema,
12693
+ targets: array(ConvertTargetSchema).min(1).readonly(),
12694
+ calibrationRef: string().optional(),
12695
+ sessionId: string().optional()
12696
+ }), ConvertResultSchema, {
12697
+ kind: "mutation",
12698
+ auth: "admin"
12699
+ });
12525
12700
  var AddonHttpRouteSchema = object({
12526
12701
  method: _enum([
12527
12702
  "GET",
@@ -17416,6 +17591,12 @@ Object.freeze({
17416
17591
  addonId: null,
17417
17592
  access: "create"
17418
17593
  },
17594
+ "customModelRegistry.listModels": {
17595
+ capName: "custom-model-registry",
17596
+ capScope: "system",
17597
+ addonId: null,
17598
+ access: "view"
17599
+ },
17419
17600
  "decoder.createSession": {
17420
17601
  capName: "decoder",
17421
17602
  capScope: "system",
@@ -18640,6 +18821,18 @@ Object.freeze({
18640
18821
  addonId: null,
18641
18822
  access: "view"
18642
18823
  },
18824
+ "modelConvert.convert": {
18825
+ capName: "model-convert",
18826
+ capScope: "system",
18827
+ addonId: null,
18828
+ access: "create"
18829
+ },
18830
+ "modelDistributor.distributeModel": {
18831
+ capName: "model-distributor",
18832
+ capScope: "system",
18833
+ addonId: null,
18834
+ access: "create"
18835
+ },
18643
18836
  "motion.isDetected": {
18644
18837
  capName: "motion",
18645
18838
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-smtp-nodemailer",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
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",