@camstack/addon-smtp-nodemailer 1.2.125 → 1.2.126

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.
@@ -5451,7 +5451,7 @@ var ZodIssueCode = {
5451
5451
  var ZodFirstPartyTypeKind;
5452
5452
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5453
5453
  //#endregion
5454
- //#region ../types/dist/sleep-BxjU_fJM.mjs
5454
+ //#region ../types/dist/sleep-yKL5gfrH.mjs
5455
5455
  /**
5456
5456
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5457
5457
  * window to float samples (D455).
@@ -7834,9 +7834,9 @@ function normalizeAddonInitResult(result) {
7834
7834
  return result;
7835
7835
  }
7836
7836
  /**
7837
- * The share-view scope kinds a `csv_*` share token can carry. The hub mints
7838
- * and validates them (`share-token.service.ts` builds its enum from this
7839
- * list); a data plane names the kinds it ACCEPTS in `share`.
7837
+ * The share-view scope kinds a share-link token can carry. The hub mints
7838
+ * and validates them (`ShareViewGrantSchema` builds its
7839
+ * enum from this list); a data plane names the kinds it ACCEPTS in `share`.
7840
7840
  */
7841
7841
  var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
7842
7842
  /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
@@ -12445,7 +12445,7 @@ var ConvertResultSchema = object({
12445
12445
  * `super_admin` — collapsed onto the single boolean because every
12446
12446
  * non-admin caller is governed by the same scope-check rules; the
12447
12447
  * distinction was only ever used to route role-specific procedures
12448
- * which we no longer have. CLI / webhook integrations are `cst_*` tokens
12448
+ * which we no longer have. CLI / webhook integrations are tokens (`auth.mintToken`)
12449
12449
  * with `isAdmin: false` + an explicit scope list.
12450
12450
  */
12451
12451
  /** Per-method access flavour. Materialised on every cap method via codegen. */
@@ -12634,10 +12634,12 @@ var AddonRoutesScopeSchema = object({
12634
12634
  type: literal("addon-routes"),
12635
12635
  access: array(MethodAccessSchema).min(1)
12636
12636
  });
12637
+ var PreferencesSelfScopeSchema = object({ type: literal("preferences-self") });
12637
12638
  var CredentialScopeSchema = union([
12638
12639
  literal("*"),
12639
12640
  ShareViewScopeSchema,
12640
12641
  AddonRoutesScopeSchema,
12642
+ PreferencesSelfScopeSchema,
12641
12643
  TokenScopeSchema
12642
12644
  ]);
12643
12645
  object({
@@ -12646,6 +12648,55 @@ object({
12646
12648
  jti: string().min(16),
12647
12649
  scopes: array(CredentialScopeSchema).min(1)
12648
12650
  });
12651
+ var PreferenceNamespaceSchema = string().regex(/^[a-z][a-z0-9.-]{0,63}$/);
12652
+ /** A namespace's value: a JSON object, opaque to the hub. */
12653
+ var PreferenceValueSchema = record(string(), unknown());
12654
+ var PreferenceDeviceIdSchema = string().min(1).max(64);
12655
+ /** A stored row, as the owner reads it. */
12656
+ var PreferenceRowSchema = object({
12657
+ namespace: PreferenceNamespaceSchema,
12658
+ value: PreferenceValueSchema,
12659
+ /** Starts at 1, +1 on every write of this namespace. A delete ends the row and its count. */
12660
+ revision: number().int().positive(),
12661
+ updatedAt: number().int(),
12662
+ /** The client id the last writer sent; `null` when it sent none. */
12663
+ updatedByDevice: PreferenceDeviceIdSchema.nullable()
12664
+ });
12665
+ object({
12666
+ /** Absent: every namespace the caller holds. */
12667
+ namespaces: array(PreferenceNamespaceSchema).max(32).optional() });
12668
+ object({ rows: array(PreferenceRowSchema) });
12669
+ object({
12670
+ namespace: PreferenceNamespaceSchema,
12671
+ value: PreferenceValueSchema,
12672
+ /**
12673
+ * The revision the edit was based on. Absent: last write wins. `0`: the
12674
+ * namespace must not exist yet. Any other value that is not the current
12675
+ * revision answers `conflict` and writes nothing.
12676
+ */
12677
+ baseRevision: number().int().nonnegative().optional(),
12678
+ deviceId: PreferenceDeviceIdSchema.optional()
12679
+ });
12680
+ discriminatedUnion("status", [object({
12681
+ status: literal("saved"),
12682
+ row: PreferenceRowSchema
12683
+ }), object({
12684
+ status: literal("conflict"),
12685
+ current: PreferenceRowSchema.nullable()
12686
+ })]);
12687
+ object({ namespace: PreferenceNamespaceSchema });
12688
+ object({
12689
+ /** `false` when the namespace did not exist. */
12690
+ deleted: boolean() });
12691
+ object({
12692
+ /** The revision the client holds per namespace; a namespace it does not list is new to it. */
12693
+ revisionByNamespace: record(PreferenceNamespaceSchema, number().int().nonnegative()).refine((map) => Object.keys(map).length <= 32, { message: `at most 32 namespaces` }) });
12694
+ object({
12695
+ /** Every row whose revision differs from the client's, and every row it did not list. */
12696
+ rows: array(PreferenceRowSchema),
12697
+ /** Namespaces the client listed that no longer exist. */
12698
+ deleted: array(PreferenceNamespaceSchema)
12699
+ });
12649
12700
  _enum(["new-session", "step-up"]);
12650
12701
  /** The languages the hub's app landing pages are written in (D858). */
12651
12702
  var AppPageLangSchema = _enum(["en", "it"]);
@@ -39524,38 +39575,37 @@ method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
39524
39575
  auth: "admin",
39525
39576
  timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
39526
39577
  });
39578
+ var LlmProfileKindSchema = string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "a kind id is lower-case letters, digits and dashes");
39579
+ /** What a model (or, by default, every model of a kind) can do. */
39580
+ var LlmModelFeaturesSchema = object({
39581
+ vision: boolean(),
39582
+ tools: boolean(),
39583
+ streaming: boolean()
39584
+ });
39585
+ /** One model a provider offers. `features` overrides the kind's defaults, per field. */
39586
+ var LlmModelInfoSchema = object({
39587
+ id: string(),
39588
+ label: string().optional(),
39589
+ contextLength: number().int().positive().optional(),
39590
+ features: LlmModelFeaturesSchema.partial().optional()
39591
+ });
39527
39592
  /**
39528
- * `llm` — consumer-facing LLM surface (spec §1-§3). Collection-mode: array
39529
- * methods concat-fan across providers; single-row methods route to ONE
39530
- * provider by the `addonId` in the call input (the notification-output
39531
- * posture, notification-output.cap.ts:215-250). Provided by `addon-ai`
39532
- * (hub-placed); the cap stays open for future providers.
39533
- *
39534
- * Profiles are ROWS (data), not addons: one row = one usable model endpoint.
39535
- * `apiKey` is a password field — providers REDACT it on read and merge on
39536
- * write; a stored key NEVER round-trips to a client.
39593
+ * The provider-specific part of a profile, validated by the provider that owns
39594
+ * the kind (`upsertProfile` refuses what it does not accept). A field its
39595
+ * `connectionSchema` declares `type: 'password'` is a secret: it is held in the
39596
+ * keychain, never in the row, and reads back as the redaction marker.
39537
39597
  */
39538
- var LlmProfileKindSchema = _enum([
39539
- "openai-compatible",
39540
- "openai",
39541
- "anthropic",
39542
- "google",
39543
- "managed-local",
39544
- "apple-foundation"
39545
- ]);
39598
+ var LlmProviderConfigSchema = record(string(), unknown());
39546
39599
  var LlmProfileSchema = object({
39547
39600
  id: string(),
39548
39601
  name: string(),
39602
+ /** The provider-declared kind (`LlmProfileKindDescriptor.kind`). */
39549
39603
  kind: LlmProfileKindSchema,
39550
39604
  /** Stamped by the provider — keeps the fanned catalog routable. */
39551
39605
  addonId: string(),
39552
39606
  enabled: boolean(),
39553
39607
  /** Vendor model id, or the managed runtime's loaded model. */
39554
39608
  model: string(),
39555
- /** Required for openai-compatible; override for cloud kinds. */
39556
- baseUrl: string().optional(),
39557
- /** ConfigUISchema type:'password' — never round-trips (spec §5). */
39558
- apiKey: string().optional(),
39559
39609
  /** Vision on/off. A vision call against a `false` profile is REFUSED, never
39560
39610
  * degraded to text — that shipped once and produced a confident answer to a
39561
39611
  * question about a picture nobody sent. */
@@ -39563,15 +39613,11 @@ var LlmProfileSchema = object({
39563
39613
  temperature: number().min(0).max(2).optional(),
39564
39614
  /** Nucleus sampling. Every wire we speak has it. */
39565
39615
  topP: number().min(0).max(1).optional(),
39566
- /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
39567
- * wire does, and the client drops it there (measured: the request body gets
39568
- * `top_p` and no `top_k`). The profile editor hides the field wherever it
39569
- * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
39616
+ /** Top-k sampling. Carried only by the wires that have it — a kind offers the
39617
+ * field in its editor only when its descriptor lists it in `profileFields`. */
39570
39618
  topK: number().int().positive().optional(),
39571
39619
  maxTokens: number().int().positive().optional(),
39572
- /** Prompt context window. Advisory for cloud kinds (they enforce their own);
39573
- * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
39574
- * the model with, so it is the one field that changes a PROCESS. */
39620
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own). */
39575
39621
  contextLength: number().int().positive().optional(),
39576
39622
  /** Default system prompt. A caller's `system` REPLACES it (never appends —
39577
39623
  * two system prompts fighting is worse than either alone). */
@@ -39597,16 +39643,37 @@ var LlmProfileSchema = object({
39597
39643
  * library; the REGISTRY of callable tools is ours and is empty in v1, so a
39598
39644
  * `true` here buys the wiring, not behaviour, until tools are registered. */
39599
39645
  toolsEnabled: boolean().default(false),
39600
- extraHeaders: record(string(), string()).optional(),
39601
- /** kind === 'managed-local' only (spec §4). */
39602
- runtime: ManagedRuntimeConfigSchema.optional(),
39603
- /**
39604
- * kind === 'apple-foundation' only: WHERE it runs — the only thing there is
39605
- * to configure (no key, no URL, no download; `model` is `apple-system`).
39606
- * `supportsVision` on such a row is stamped by the provider from the node's
39607
- * reported `imageInput`, never taken from the operator (D62).
39608
- */
39609
- appleFoundation: object({ nodeId: string() }).optional()
39646
+ /** Everything the kind's provider owns (endpoint, key, node, runtime…). */
39647
+ providerConfig: LlmProviderConfigSchema.default({})
39648
+ });
39649
+ /**
39650
+ * The common profile fields a kind's editor offers. The editor owns how each
39651
+ * one is drawn; the provider says which of them mean something on its wire.
39652
+ */
39653
+ var LlmProfileFieldSchema = _enum([
39654
+ "temperature",
39655
+ "topP",
39656
+ "topK",
39657
+ "maxTokens",
39658
+ "contextLength",
39659
+ "systemPrompt",
39660
+ "timeoutMs",
39661
+ "connectTimeoutMs",
39662
+ "firstTokenTimeoutMs",
39663
+ "idleTimeoutMs",
39664
+ "retry",
39665
+ "toolsEnabled"
39666
+ ]);
39667
+ /**
39668
+ * A provider-drawn part of the editor, by a generic widget id the admin UI
39669
+ * registers (`ai/apple-node`). `placement: 'model'` replaces the generic model
39670
+ * picker: that widget owns the model choice.
39671
+ */
39672
+ var LlmProviderWidgetSchema = object({
39673
+ id: string(),
39674
+ placement: _enum(["connection", "model"]),
39675
+ /** `providerConfig` keys this widget must fill before the profile can be saved. */
39676
+ requires: array(string()).optional()
39610
39677
  });
39611
39678
  /** ConfigUISchema tree passed through untyped on the wire (the
39612
39679
  * notification-output `ConfigSchemaPassthrough` precedent at
@@ -39615,11 +39682,56 @@ var ConfigSchemaPassthrough$3 = unknown();
39615
39682
  var LlmProfileKindDescriptorSchema = object({
39616
39683
  kind: LlmProfileKindSchema,
39617
39684
  label: string(),
39685
+ /** A generic icon name (`cloud`, `plug`, `cpu`) — never a glyph or a logo. */
39618
39686
  icon: string(),
39619
39687
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
39620
39688
  addonId: string(),
39621
- configSchema: ConfigSchemaPassthrough$3
39689
+ /** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
39690
+ connectionSchema: ConfigSchemaPassthrough$3,
39691
+ /** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
39692
+ advancedSchema: ConfigSchemaPassthrough$3.optional(),
39693
+ /** The kind's defaults; a model from `listModels` may override any of them. */
39694
+ features: LlmModelFeaturesSchema,
39695
+ /** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
39696
+ visionEditable: boolean(),
39697
+ /** Where the model list comes from: `listModels`, `staticModels`, or nowhere. */
39698
+ modelCatalog: _enum([
39699
+ "fetch",
39700
+ "static",
39701
+ "none"
39702
+ ]),
39703
+ staticModels: array(LlmModelInfoSchema).optional(),
39704
+ /** The common fields that mean something on this kind's wire. */
39705
+ profileFields: array(LlmProfileFieldSchema),
39706
+ providerWidgets: array(LlmProviderWidgetSchema).optional()
39622
39707
  });
39708
+ /**
39709
+ * `listModels` input. `connection` is an UNSAVED draft of `providerConfig`
39710
+ * (the editor's form); with `profileId` too, a secret the draft leaves
39711
+ * untouched (absent or the redaction marker) is resolved server-side from the
39712
+ * stored profile — the browser never receives it.
39713
+ */
39714
+ var LlmListModelsInputSchema = object({
39715
+ addonId: string(),
39716
+ kind: LlmProfileKindSchema,
39717
+ profileId: string().optional(),
39718
+ connection: LlmProviderConfigSchema.optional()
39719
+ });
39720
+ var LlmListModelsErrorCodeSchema = _enum([
39721
+ "auth",
39722
+ "network",
39723
+ "unsupported",
39724
+ "invalid"
39725
+ ]);
39726
+ /** A RESULT, never a throw: "wrong key" is an answer the editor renders inline. */
39727
+ var LlmListModelsResultSchema = discriminatedUnion("ok", [object({
39728
+ ok: literal(true),
39729
+ models: array(LlmModelInfoSchema)
39730
+ }), object({
39731
+ ok: literal(false),
39732
+ code: LlmListModelsErrorCodeSchema,
39733
+ message: string()
39734
+ })]);
39623
39735
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
39624
39736
  var LlmDefaultSchema = object({
39625
39737
  selector: LlmDefaultSelectorSchema,
@@ -39719,7 +39831,10 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
39719
39831
  kind: "mutation",
39720
39832
  auth: "admin",
39721
39833
  timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
39722
- }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
39834
+ }), method(LlmListModelsInputSchema, LlmListModelsResultSchema, {
39835
+ kind: "mutation",
39836
+ auth: "admin"
39837
+ }), method(object({}), array(LlmDefaultSchema)), method(object({
39723
39838
  selector: LlmDefaultSelectorSchema,
39724
39839
  profileId: string().nullable()
39725
39840
  }), _void(), {
@@ -60727,26 +60842,6 @@ var ApiKeySummarySchema = object({
60727
60842
  createdAt: number(),
60728
60843
  lastUsedAt: number().optional()
60729
60844
  });
60730
- var ScopedTokenSummarySchema = object({
60731
- id: string(),
60732
- userId: string(),
60733
- name: string(),
60734
- tokenPrefix: string(),
60735
- scopes: array(TokenScopeSchema),
60736
- expiresAt: number().nullish(),
60737
- lastUsedAt: number().nullish(),
60738
- createdAt: number()
60739
- });
60740
- var CreateScopedTokenInputSchema = object({
60741
- userId: string(),
60742
- name: string(),
60743
- scopes: array(TokenScopeSchema),
60744
- expiresAt: number().optional()
60745
- });
60746
- var CreateScopedTokenResultSchema = object({
60747
- token: string(),
60748
- record: ScopedTokenSummarySchema
60749
- });
60750
60845
  var OauthSessionSummarySchema = object({
60751
60846
  id: string(),
60752
60847
  userId: string(),
@@ -60768,11 +60863,11 @@ var TotpStatusSchema = object({
60768
60863
  confirmedAt: number().nullable()
60769
60864
  });
60770
60865
  /**
60771
- * user-management — singleton capability for user accounts, API keys,
60772
- * and scoped tokens.
60866
+ * user-management — singleton capability for user accounts and the
60867
+ * legacy API-key rows.
60773
60868
  *
60774
60869
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
60775
- * — the subset check on `setUserScopes` / `createScopedToken` is moot
60870
+ * — the subset check on `setUserScopes` is moot
60776
60871
  * because non-admins never reach these. If/when we open non-admin
60777
60872
  * delegation, structural caller-scope subset check goes inside the
60778
60873
  * provider.
@@ -60829,15 +60924,7 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
60829
60924
  kind: "mutation",
60830
60925
  auth: "admin",
60831
60926
  access: "delete"
60832
- }), method(CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, {
60833
- kind: "mutation",
60834
- auth: "admin",
60835
- access: "create"
60836
- }), method(object({ id: string() }), object({ success: literal(true) }), {
60837
- kind: "mutation",
60838
- auth: "admin",
60839
- access: "delete"
60840
- }), method(object({ token: string() }), ScopedTokenSummarySchema.nullable(), { access: "view" }), method(object({ userId: string() }), array(ScopedTokenSummarySchema), { auth: "admin" }), method(object({ userId: string() }), TotpSetupResultSchema, {
60927
+ }), method(object({ userId: string() }), TotpSetupResultSchema, {
60841
60928
  kind: "mutation",
60842
60929
  auth: "admin",
60843
60930
  access: "create"
@@ -64993,7 +65080,7 @@ Object.freeze({
64993
65080
  capName: "llm",
64994
65081
  capScope: "system",
64995
65082
  addonId: null,
64996
- access: "view"
65083
+ access: "create"
64997
65084
  },
64998
65085
  "llm.listNodeModels": {
64999
65086
  capName: "llm",
@@ -69657,12 +69744,6 @@ Object.freeze({
69657
69744
  addonId: null,
69658
69745
  access: "create"
69659
69746
  },
69660
- "userManagement.createScopedToken": {
69661
- capName: "user-management",
69662
- capScope: "system",
69663
- addonId: null,
69664
- access: "create"
69665
- },
69666
69747
  "userManagement.createUser": {
69667
69748
  capName: "user-management",
69668
69749
  capScope: "system",
@@ -69711,12 +69792,6 @@ Object.freeze({
69711
69792
  addonId: null,
69712
69793
  access: "view"
69713
69794
  },
69714
- "userManagement.listScopedTokens": {
69715
- capName: "user-management",
69716
- capScope: "system",
69717
- addonId: null,
69718
- access: "view"
69719
- },
69720
69795
  "userManagement.listUsers": {
69721
69796
  capName: "user-management",
69722
69797
  capScope: "system",
@@ -69771,12 +69846,6 @@ Object.freeze({
69771
69846
  addonId: null,
69772
69847
  access: "delete"
69773
69848
  },
69774
- "userManagement.revokeScopedToken": {
69775
- capName: "user-management",
69776
- capScope: "system",
69777
- addonId: null,
69778
- access: "delete"
69779
- },
69780
69849
  "userManagement.setupTotp": {
69781
69850
  capName: "user-management",
69782
69851
  capScope: "system",
@@ -69807,12 +69876,6 @@ Object.freeze({
69807
69876
  addonId: null,
69808
69877
  access: "view"
69809
69878
  },
69810
- "userManagement.validateScopedToken": {
69811
- capName: "user-management",
69812
- capScope: "system",
69813
- addonId: null,
69814
- access: "view"
69815
- },
69816
69879
  "userManagement.verifyTotp": {
69817
69880
  capName: "user-management",
69818
69881
  capScope: "system",
@@ -5449,7 +5449,7 @@ var ZodIssueCode = {
5449
5449
  var ZodFirstPartyTypeKind;
5450
5450
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5451
5451
  //#endregion
5452
- //#region ../types/dist/sleep-BxjU_fJM.mjs
5452
+ //#region ../types/dist/sleep-yKL5gfrH.mjs
5453
5453
  /**
5454
5454
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5455
5455
  * window to float samples (D455).
@@ -7832,9 +7832,9 @@ function normalizeAddonInitResult(result) {
7832
7832
  return result;
7833
7833
  }
7834
7834
  /**
7835
- * The share-view scope kinds a `csv_*` share token can carry. The hub mints
7836
- * and validates them (`share-token.service.ts` builds its enum from this
7837
- * list); a data plane names the kinds it ACCEPTS in `share`.
7835
+ * The share-view scope kinds a share-link token can carry. The hub mints
7836
+ * and validates them (`ShareViewGrantSchema` builds its
7837
+ * enum from this list); a data plane names the kinds it ACCEPTS in `share`.
7838
7838
  */
7839
7839
  var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
7840
7840
  /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
@@ -12443,7 +12443,7 @@ var ConvertResultSchema = object({
12443
12443
  * `super_admin` — collapsed onto the single boolean because every
12444
12444
  * non-admin caller is governed by the same scope-check rules; the
12445
12445
  * distinction was only ever used to route role-specific procedures
12446
- * which we no longer have. CLI / webhook integrations are `cst_*` tokens
12446
+ * which we no longer have. CLI / webhook integrations are tokens (`auth.mintToken`)
12447
12447
  * with `isAdmin: false` + an explicit scope list.
12448
12448
  */
12449
12449
  /** Per-method access flavour. Materialised on every cap method via codegen. */
@@ -12632,10 +12632,12 @@ var AddonRoutesScopeSchema = object({
12632
12632
  type: literal("addon-routes"),
12633
12633
  access: array(MethodAccessSchema).min(1)
12634
12634
  });
12635
+ var PreferencesSelfScopeSchema = object({ type: literal("preferences-self") });
12635
12636
  var CredentialScopeSchema = union([
12636
12637
  literal("*"),
12637
12638
  ShareViewScopeSchema,
12638
12639
  AddonRoutesScopeSchema,
12640
+ PreferencesSelfScopeSchema,
12639
12641
  TokenScopeSchema
12640
12642
  ]);
12641
12643
  object({
@@ -12644,6 +12646,55 @@ object({
12644
12646
  jti: string().min(16),
12645
12647
  scopes: array(CredentialScopeSchema).min(1)
12646
12648
  });
12649
+ var PreferenceNamespaceSchema = string().regex(/^[a-z][a-z0-9.-]{0,63}$/);
12650
+ /** A namespace's value: a JSON object, opaque to the hub. */
12651
+ var PreferenceValueSchema = record(string(), unknown());
12652
+ var PreferenceDeviceIdSchema = string().min(1).max(64);
12653
+ /** A stored row, as the owner reads it. */
12654
+ var PreferenceRowSchema = object({
12655
+ namespace: PreferenceNamespaceSchema,
12656
+ value: PreferenceValueSchema,
12657
+ /** Starts at 1, +1 on every write of this namespace. A delete ends the row and its count. */
12658
+ revision: number().int().positive(),
12659
+ updatedAt: number().int(),
12660
+ /** The client id the last writer sent; `null` when it sent none. */
12661
+ updatedByDevice: PreferenceDeviceIdSchema.nullable()
12662
+ });
12663
+ object({
12664
+ /** Absent: every namespace the caller holds. */
12665
+ namespaces: array(PreferenceNamespaceSchema).max(32).optional() });
12666
+ object({ rows: array(PreferenceRowSchema) });
12667
+ object({
12668
+ namespace: PreferenceNamespaceSchema,
12669
+ value: PreferenceValueSchema,
12670
+ /**
12671
+ * The revision the edit was based on. Absent: last write wins. `0`: the
12672
+ * namespace must not exist yet. Any other value that is not the current
12673
+ * revision answers `conflict` and writes nothing.
12674
+ */
12675
+ baseRevision: number().int().nonnegative().optional(),
12676
+ deviceId: PreferenceDeviceIdSchema.optional()
12677
+ });
12678
+ discriminatedUnion("status", [object({
12679
+ status: literal("saved"),
12680
+ row: PreferenceRowSchema
12681
+ }), object({
12682
+ status: literal("conflict"),
12683
+ current: PreferenceRowSchema.nullable()
12684
+ })]);
12685
+ object({ namespace: PreferenceNamespaceSchema });
12686
+ object({
12687
+ /** `false` when the namespace did not exist. */
12688
+ deleted: boolean() });
12689
+ object({
12690
+ /** The revision the client holds per namespace; a namespace it does not list is new to it. */
12691
+ revisionByNamespace: record(PreferenceNamespaceSchema, number().int().nonnegative()).refine((map) => Object.keys(map).length <= 32, { message: `at most 32 namespaces` }) });
12692
+ object({
12693
+ /** Every row whose revision differs from the client's, and every row it did not list. */
12694
+ rows: array(PreferenceRowSchema),
12695
+ /** Namespaces the client listed that no longer exist. */
12696
+ deleted: array(PreferenceNamespaceSchema)
12697
+ });
12647
12698
  _enum(["new-session", "step-up"]);
12648
12699
  /** The languages the hub's app landing pages are written in (D858). */
12649
12700
  var AppPageLangSchema = _enum(["en", "it"]);
@@ -39522,38 +39573,37 @@ method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
39522
39573
  auth: "admin",
39523
39574
  timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
39524
39575
  });
39576
+ var LlmProfileKindSchema = string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "a kind id is lower-case letters, digits and dashes");
39577
+ /** What a model (or, by default, every model of a kind) can do. */
39578
+ var LlmModelFeaturesSchema = object({
39579
+ vision: boolean(),
39580
+ tools: boolean(),
39581
+ streaming: boolean()
39582
+ });
39583
+ /** One model a provider offers. `features` overrides the kind's defaults, per field. */
39584
+ var LlmModelInfoSchema = object({
39585
+ id: string(),
39586
+ label: string().optional(),
39587
+ contextLength: number().int().positive().optional(),
39588
+ features: LlmModelFeaturesSchema.partial().optional()
39589
+ });
39525
39590
  /**
39526
- * `llm` — consumer-facing LLM surface (spec §1-§3). Collection-mode: array
39527
- * methods concat-fan across providers; single-row methods route to ONE
39528
- * provider by the `addonId` in the call input (the notification-output
39529
- * posture, notification-output.cap.ts:215-250). Provided by `addon-ai`
39530
- * (hub-placed); the cap stays open for future providers.
39531
- *
39532
- * Profiles are ROWS (data), not addons: one row = one usable model endpoint.
39533
- * `apiKey` is a password field — providers REDACT it on read and merge on
39534
- * write; a stored key NEVER round-trips to a client.
39591
+ * The provider-specific part of a profile, validated by the provider that owns
39592
+ * the kind (`upsertProfile` refuses what it does not accept). A field its
39593
+ * `connectionSchema` declares `type: 'password'` is a secret: it is held in the
39594
+ * keychain, never in the row, and reads back as the redaction marker.
39535
39595
  */
39536
- var LlmProfileKindSchema = _enum([
39537
- "openai-compatible",
39538
- "openai",
39539
- "anthropic",
39540
- "google",
39541
- "managed-local",
39542
- "apple-foundation"
39543
- ]);
39596
+ var LlmProviderConfigSchema = record(string(), unknown());
39544
39597
  var LlmProfileSchema = object({
39545
39598
  id: string(),
39546
39599
  name: string(),
39600
+ /** The provider-declared kind (`LlmProfileKindDescriptor.kind`). */
39547
39601
  kind: LlmProfileKindSchema,
39548
39602
  /** Stamped by the provider — keeps the fanned catalog routable. */
39549
39603
  addonId: string(),
39550
39604
  enabled: boolean(),
39551
39605
  /** Vendor model id, or the managed runtime's loaded model. */
39552
39606
  model: string(),
39553
- /** Required for openai-compatible; override for cloud kinds. */
39554
- baseUrl: string().optional(),
39555
- /** ConfigUISchema type:'password' — never round-trips (spec §5). */
39556
- apiKey: string().optional(),
39557
39607
  /** Vision on/off. A vision call against a `false` profile is REFUSED, never
39558
39608
  * degraded to text — that shipped once and produced a confident answer to a
39559
39609
  * question about a picture nobody sent. */
@@ -39561,15 +39611,11 @@ var LlmProfileSchema = object({
39561
39611
  temperature: number().min(0).max(2).optional(),
39562
39612
  /** Nucleus sampling. Every wire we speak has it. */
39563
39613
  topP: number().min(0).max(1).optional(),
39564
- /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
39565
- * wire does, and the client drops it there (measured: the request body gets
39566
- * `top_p` and no `top_k`). The profile editor hides the field wherever it
39567
- * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
39614
+ /** Top-k sampling. Carried only by the wires that have it — a kind offers the
39615
+ * field in its editor only when its descriptor lists it in `profileFields`. */
39568
39616
  topK: number().int().positive().optional(),
39569
39617
  maxTokens: number().int().positive().optional(),
39570
- /** Prompt context window. Advisory for cloud kinds (they enforce their own);
39571
- * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
39572
- * the model with, so it is the one field that changes a PROCESS. */
39618
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own). */
39573
39619
  contextLength: number().int().positive().optional(),
39574
39620
  /** Default system prompt. A caller's `system` REPLACES it (never appends —
39575
39621
  * two system prompts fighting is worse than either alone). */
@@ -39595,16 +39641,37 @@ var LlmProfileSchema = object({
39595
39641
  * library; the REGISTRY of callable tools is ours and is empty in v1, so a
39596
39642
  * `true` here buys the wiring, not behaviour, until tools are registered. */
39597
39643
  toolsEnabled: boolean().default(false),
39598
- extraHeaders: record(string(), string()).optional(),
39599
- /** kind === 'managed-local' only (spec §4). */
39600
- runtime: ManagedRuntimeConfigSchema.optional(),
39601
- /**
39602
- * kind === 'apple-foundation' only: WHERE it runs — the only thing there is
39603
- * to configure (no key, no URL, no download; `model` is `apple-system`).
39604
- * `supportsVision` on such a row is stamped by the provider from the node's
39605
- * reported `imageInput`, never taken from the operator (D62).
39606
- */
39607
- appleFoundation: object({ nodeId: string() }).optional()
39644
+ /** Everything the kind's provider owns (endpoint, key, node, runtime…). */
39645
+ providerConfig: LlmProviderConfigSchema.default({})
39646
+ });
39647
+ /**
39648
+ * The common profile fields a kind's editor offers. The editor owns how each
39649
+ * one is drawn; the provider says which of them mean something on its wire.
39650
+ */
39651
+ var LlmProfileFieldSchema = _enum([
39652
+ "temperature",
39653
+ "topP",
39654
+ "topK",
39655
+ "maxTokens",
39656
+ "contextLength",
39657
+ "systemPrompt",
39658
+ "timeoutMs",
39659
+ "connectTimeoutMs",
39660
+ "firstTokenTimeoutMs",
39661
+ "idleTimeoutMs",
39662
+ "retry",
39663
+ "toolsEnabled"
39664
+ ]);
39665
+ /**
39666
+ * A provider-drawn part of the editor, by a generic widget id the admin UI
39667
+ * registers (`ai/apple-node`). `placement: 'model'` replaces the generic model
39668
+ * picker: that widget owns the model choice.
39669
+ */
39670
+ var LlmProviderWidgetSchema = object({
39671
+ id: string(),
39672
+ placement: _enum(["connection", "model"]),
39673
+ /** `providerConfig` keys this widget must fill before the profile can be saved. */
39674
+ requires: array(string()).optional()
39608
39675
  });
39609
39676
  /** ConfigUISchema tree passed through untyped on the wire (the
39610
39677
  * notification-output `ConfigSchemaPassthrough` precedent at
@@ -39613,11 +39680,56 @@ var ConfigSchemaPassthrough$3 = unknown();
39613
39680
  var LlmProfileKindDescriptorSchema = object({
39614
39681
  kind: LlmProfileKindSchema,
39615
39682
  label: string(),
39683
+ /** A generic icon name (`cloud`, `plug`, `cpu`) — never a glyph or a logo. */
39616
39684
  icon: string(),
39617
39685
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
39618
39686
  addonId: string(),
39619
- configSchema: ConfigSchemaPassthrough$3
39687
+ /** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
39688
+ connectionSchema: ConfigSchemaPassthrough$3,
39689
+ /** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
39690
+ advancedSchema: ConfigSchemaPassthrough$3.optional(),
39691
+ /** The kind's defaults; a model from `listModels` may override any of them. */
39692
+ features: LlmModelFeaturesSchema,
39693
+ /** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
39694
+ visionEditable: boolean(),
39695
+ /** Where the model list comes from: `listModels`, `staticModels`, or nowhere. */
39696
+ modelCatalog: _enum([
39697
+ "fetch",
39698
+ "static",
39699
+ "none"
39700
+ ]),
39701
+ staticModels: array(LlmModelInfoSchema).optional(),
39702
+ /** The common fields that mean something on this kind's wire. */
39703
+ profileFields: array(LlmProfileFieldSchema),
39704
+ providerWidgets: array(LlmProviderWidgetSchema).optional()
39620
39705
  });
39706
+ /**
39707
+ * `listModels` input. `connection` is an UNSAVED draft of `providerConfig`
39708
+ * (the editor's form); with `profileId` too, a secret the draft leaves
39709
+ * untouched (absent or the redaction marker) is resolved server-side from the
39710
+ * stored profile — the browser never receives it.
39711
+ */
39712
+ var LlmListModelsInputSchema = object({
39713
+ addonId: string(),
39714
+ kind: LlmProfileKindSchema,
39715
+ profileId: string().optional(),
39716
+ connection: LlmProviderConfigSchema.optional()
39717
+ });
39718
+ var LlmListModelsErrorCodeSchema = _enum([
39719
+ "auth",
39720
+ "network",
39721
+ "unsupported",
39722
+ "invalid"
39723
+ ]);
39724
+ /** A RESULT, never a throw: "wrong key" is an answer the editor renders inline. */
39725
+ var LlmListModelsResultSchema = discriminatedUnion("ok", [object({
39726
+ ok: literal(true),
39727
+ models: array(LlmModelInfoSchema)
39728
+ }), object({
39729
+ ok: literal(false),
39730
+ code: LlmListModelsErrorCodeSchema,
39731
+ message: string()
39732
+ })]);
39621
39733
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
39622
39734
  var LlmDefaultSchema = object({
39623
39735
  selector: LlmDefaultSelectorSchema,
@@ -39717,7 +39829,10 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
39717
39829
  kind: "mutation",
39718
39830
  auth: "admin",
39719
39831
  timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
39720
- }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
39832
+ }), method(LlmListModelsInputSchema, LlmListModelsResultSchema, {
39833
+ kind: "mutation",
39834
+ auth: "admin"
39835
+ }), method(object({}), array(LlmDefaultSchema)), method(object({
39721
39836
  selector: LlmDefaultSelectorSchema,
39722
39837
  profileId: string().nullable()
39723
39838
  }), _void(), {
@@ -60725,26 +60840,6 @@ var ApiKeySummarySchema = object({
60725
60840
  createdAt: number(),
60726
60841
  lastUsedAt: number().optional()
60727
60842
  });
60728
- var ScopedTokenSummarySchema = object({
60729
- id: string(),
60730
- userId: string(),
60731
- name: string(),
60732
- tokenPrefix: string(),
60733
- scopes: array(TokenScopeSchema),
60734
- expiresAt: number().nullish(),
60735
- lastUsedAt: number().nullish(),
60736
- createdAt: number()
60737
- });
60738
- var CreateScopedTokenInputSchema = object({
60739
- userId: string(),
60740
- name: string(),
60741
- scopes: array(TokenScopeSchema),
60742
- expiresAt: number().optional()
60743
- });
60744
- var CreateScopedTokenResultSchema = object({
60745
- token: string(),
60746
- record: ScopedTokenSummarySchema
60747
- });
60748
60843
  var OauthSessionSummarySchema = object({
60749
60844
  id: string(),
60750
60845
  userId: string(),
@@ -60766,11 +60861,11 @@ var TotpStatusSchema = object({
60766
60861
  confirmedAt: number().nullable()
60767
60862
  });
60768
60863
  /**
60769
- * user-management — singleton capability for user accounts, API keys,
60770
- * and scoped tokens.
60864
+ * user-management — singleton capability for user accounts and the
60865
+ * legacy API-key rows.
60771
60866
  *
60772
60867
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
60773
- * — the subset check on `setUserScopes` / `createScopedToken` is moot
60868
+ * — the subset check on `setUserScopes` is moot
60774
60869
  * because non-admins never reach these. If/when we open non-admin
60775
60870
  * delegation, structural caller-scope subset check goes inside the
60776
60871
  * provider.
@@ -60827,15 +60922,7 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
60827
60922
  kind: "mutation",
60828
60923
  auth: "admin",
60829
60924
  access: "delete"
60830
- }), method(CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, {
60831
- kind: "mutation",
60832
- auth: "admin",
60833
- access: "create"
60834
- }), method(object({ id: string() }), object({ success: literal(true) }), {
60835
- kind: "mutation",
60836
- auth: "admin",
60837
- access: "delete"
60838
- }), method(object({ token: string() }), ScopedTokenSummarySchema.nullable(), { access: "view" }), method(object({ userId: string() }), array(ScopedTokenSummarySchema), { auth: "admin" }), method(object({ userId: string() }), TotpSetupResultSchema, {
60925
+ }), method(object({ userId: string() }), TotpSetupResultSchema, {
60839
60926
  kind: "mutation",
60840
60927
  auth: "admin",
60841
60928
  access: "create"
@@ -64991,7 +65078,7 @@ Object.freeze({
64991
65078
  capName: "llm",
64992
65079
  capScope: "system",
64993
65080
  addonId: null,
64994
- access: "view"
65081
+ access: "create"
64995
65082
  },
64996
65083
  "llm.listNodeModels": {
64997
65084
  capName: "llm",
@@ -69655,12 +69742,6 @@ Object.freeze({
69655
69742
  addonId: null,
69656
69743
  access: "create"
69657
69744
  },
69658
- "userManagement.createScopedToken": {
69659
- capName: "user-management",
69660
- capScope: "system",
69661
- addonId: null,
69662
- access: "create"
69663
- },
69664
69745
  "userManagement.createUser": {
69665
69746
  capName: "user-management",
69666
69747
  capScope: "system",
@@ -69709,12 +69790,6 @@ Object.freeze({
69709
69790
  addonId: null,
69710
69791
  access: "view"
69711
69792
  },
69712
- "userManagement.listScopedTokens": {
69713
- capName: "user-management",
69714
- capScope: "system",
69715
- addonId: null,
69716
- access: "view"
69717
- },
69718
69793
  "userManagement.listUsers": {
69719
69794
  capName: "user-management",
69720
69795
  capScope: "system",
@@ -69769,12 +69844,6 @@ Object.freeze({
69769
69844
  addonId: null,
69770
69845
  access: "delete"
69771
69846
  },
69772
- "userManagement.revokeScopedToken": {
69773
- capName: "user-management",
69774
- capScope: "system",
69775
- addonId: null,
69776
- access: "delete"
69777
- },
69778
69847
  "userManagement.setupTotp": {
69779
69848
  capName: "user-management",
69780
69849
  capScope: "system",
@@ -69805,12 +69874,6 @@ Object.freeze({
69805
69874
  addonId: null,
69806
69875
  access: "view"
69807
69876
  },
69808
- "userManagement.validateScopedToken": {
69809
- capName: "user-management",
69810
- capScope: "system",
69811
- addonId: null,
69812
- access: "view"
69813
- },
69814
69877
  "userManagement.verifyTotp": {
69815
69878
  capName: "user-management",
69816
69879
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-smtp-nodemailer",
3
- "version": "1.2.125",
3
+ "version": "1.2.126",
4
4
  "description": "SMTP email provider addon for CamStack — wraps `nodemailer` and registers a `smtp-provider` cap collection entry. Used by notifier addons.",
5
5
  "keywords": [
6
6
  "camstack",