@camstack/addon-smtp-nodemailer 1.2.125 → 1.2.127

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.
@@ -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-BSuCCFjf.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"]);
@@ -16791,7 +16842,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
16791
16842
  kind: literal("node"),
16792
16843
  nodeId: string().min(1)
16793
16844
  })]);
16845
+ /**
16846
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
16847
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
16848
+ * meaning); a rollup keeps the time spent in each state (`states`).
16849
+ */
16794
16850
  var DeviceHistoryKindSchema = _enum([
16851
+ "gauge",
16852
+ "counter",
16853
+ "boolean",
16854
+ "enum"
16855
+ ]);
16856
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
16857
+ var DeviceHistoryProducerKindSchema = _enum([
16795
16858
  "gauge",
16796
16859
  "counter",
16797
16860
  "boolean"
@@ -16828,7 +16891,13 @@ var SeriesInfoSchema = object({
16828
16891
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
16829
16892
  unit: string().nullable(),
16830
16893
  displayName: string(),
16831
- source: _enum(["cap", "addon"]),
16894
+ source: _enum([
16895
+ "cap",
16896
+ "addon",
16897
+ "derived"
16898
+ ]),
16899
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
16900
+ values: array(string()).readonly().nullable(),
16832
16901
  firstTs: number(),
16833
16902
  lastTs: number()
16834
16903
  });
@@ -16842,17 +16911,31 @@ var QueryPointSchema = object({
16842
16911
  twMean: number().nullable(),
16843
16912
  min: number(),
16844
16913
  max: number(),
16845
- /** `null` is unknown, never zero (D393). */
16846
- last: number().nullable()
16914
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
16915
+ last: number().nullable(),
16916
+ /**
16917
+ * The increase over the point: a `counter`'s growth since the previous point
16918
+ * or bucket (a drop is a reset, counted from zero), and for
16919
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
16920
+ * every other kind, and when it cannot be known.
16921
+ */
16922
+ delta: number().nullable(),
16923
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
16924
+ state: string().nullable(),
16925
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
16926
+ states: record(string(), number()).nullable()
16847
16927
  });
16848
16928
  var QuerySeriesSchema = object({
16849
16929
  scope: string(),
16850
16930
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
16851
16931
  before: object({
16852
16932
  t: number(),
16853
- value: number().nullable()
16933
+ value: number().nullable(),
16934
+ state: string().nullable()
16854
16935
  }).nullable(),
16855
- points: array(QueryPointSchema).readonly()
16936
+ points: array(QueryPointSchema).readonly(),
16937
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
16938
+ derivedFrom: string().nullable()
16856
16939
  });
16857
16940
  /** The window part of a query, shared by the device and node forms. */
16858
16941
  var QueryWindowShape = {
@@ -16868,6 +16951,23 @@ var QueryResultSchema = object({
16868
16951
  series: array(QuerySeriesSchema).readonly(),
16869
16952
  truncated: boolean()
16870
16953
  });
16954
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
16955
+ var QueryManyItemSchema = union([object({
16956
+ deviceId: number().int(),
16957
+ key: string(),
16958
+ scope: string().optional()
16959
+ }), object({
16960
+ forNodeId: string().min(1),
16961
+ key: string(),
16962
+ scope: string().optional()
16963
+ })]);
16964
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
16965
+ ok: literal(true),
16966
+ result: QueryResultSchema
16967
+ }), object({
16968
+ ok: literal(false),
16969
+ error: string()
16970
+ })]);
16871
16971
  var TierStatusSchema = object({
16872
16972
  tier: DeviceHistoryResolutionSchema,
16873
16973
  /** `null` until the first background count answered. */
@@ -16923,16 +17023,22 @@ var DeviceHistoryStatusSchema = object({
16923
17023
  lastRefreshAt: number().nullable()
16924
17024
  })
16925
17025
  });
16926
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17026
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
16927
17027
  deviceId: number().int(),
16928
17028
  ...QueryWindowShape
16929
17029
  }), QueryResultSchema), method(object({
16930
- nodeId: string().min(1),
17030
+ forNodeId: string().min(1),
16931
17031
  ...QueryWindowShape
16932
17032
  }), QueryResultSchema, { auth: "admin" }), method(object({
17033
+ items: array(QueryManyItemSchema).min(1).max(24),
17034
+ from: QueryWindowShape.from,
17035
+ to: QueryWindowShape.to,
17036
+ resolution: QueryWindowShape.resolution,
17037
+ maxPoints: QueryWindowShape.maxPoints
17038
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
16933
17039
  name: string().regex(/^[a-z0-9-]+$/),
16934
17040
  subjectKind: _enum(["device", "node"]),
16935
- kind: DeviceHistoryKindSchema,
17041
+ kind: DeviceHistoryProducerKindSchema,
16936
17042
  unit: string().optional(),
16937
17043
  displayName: string().min(1),
16938
17044
  ingest: _enum(["points", "buckets"])
@@ -39522,38 +39628,37 @@ method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
39522
39628
  auth: "admin",
39523
39629
  timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
39524
39630
  });
39631
+ var LlmProfileKindSchema = string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "a kind id is lower-case letters, digits and dashes");
39632
+ /** What a model (or, by default, every model of a kind) can do. */
39633
+ var LlmModelFeaturesSchema = object({
39634
+ vision: boolean(),
39635
+ tools: boolean(),
39636
+ streaming: boolean()
39637
+ });
39638
+ /** One model a provider offers. `features` overrides the kind's defaults, per field. */
39639
+ var LlmModelInfoSchema = object({
39640
+ id: string(),
39641
+ label: string().optional(),
39642
+ contextLength: number().int().positive().optional(),
39643
+ features: LlmModelFeaturesSchema.partial().optional()
39644
+ });
39525
39645
  /**
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.
39646
+ * The provider-specific part of a profile, validated by the provider that owns
39647
+ * the kind (`upsertProfile` refuses what it does not accept). A field its
39648
+ * `connectionSchema` declares `type: 'password'` is a secret: it is held in the
39649
+ * keychain, never in the row, and reads back as the redaction marker.
39535
39650
  */
39536
- var LlmProfileKindSchema = _enum([
39537
- "openai-compatible",
39538
- "openai",
39539
- "anthropic",
39540
- "google",
39541
- "managed-local",
39542
- "apple-foundation"
39543
- ]);
39651
+ var LlmProviderConfigSchema = record(string(), unknown());
39544
39652
  var LlmProfileSchema = object({
39545
39653
  id: string(),
39546
39654
  name: string(),
39655
+ /** The provider-declared kind (`LlmProfileKindDescriptor.kind`). */
39547
39656
  kind: LlmProfileKindSchema,
39548
39657
  /** Stamped by the provider — keeps the fanned catalog routable. */
39549
39658
  addonId: string(),
39550
39659
  enabled: boolean(),
39551
39660
  /** Vendor model id, or the managed runtime's loaded model. */
39552
39661
  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
39662
  /** Vision on/off. A vision call against a `false` profile is REFUSED, never
39558
39663
  * degraded to text — that shipped once and produced a confident answer to a
39559
39664
  * question about a picture nobody sent. */
@@ -39561,15 +39666,11 @@ var LlmProfileSchema = object({
39561
39666
  temperature: number().min(0).max(2).optional(),
39562
39667
  /** Nucleus sampling. Every wire we speak has it. */
39563
39668
  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. */
39669
+ /** Top-k sampling. Carried only by the wires that have it — a kind offers the
39670
+ * field in its editor only when its descriptor lists it in `profileFields`. */
39568
39671
  topK: number().int().positive().optional(),
39569
39672
  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. */
39673
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own). */
39573
39674
  contextLength: number().int().positive().optional(),
39574
39675
  /** Default system prompt. A caller's `system` REPLACES it (never appends —
39575
39676
  * two system prompts fighting is worse than either alone). */
@@ -39595,16 +39696,37 @@ var LlmProfileSchema = object({
39595
39696
  * library; the REGISTRY of callable tools is ours and is empty in v1, so a
39596
39697
  * `true` here buys the wiring, not behaviour, until tools are registered. */
39597
39698
  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()
39699
+ /** Everything the kind's provider owns (endpoint, key, node, runtime…). */
39700
+ providerConfig: LlmProviderConfigSchema.default({})
39701
+ });
39702
+ /**
39703
+ * The common profile fields a kind's editor offers. The editor owns how each
39704
+ * one is drawn; the provider says which of them mean something on its wire.
39705
+ */
39706
+ var LlmProfileFieldSchema = _enum([
39707
+ "temperature",
39708
+ "topP",
39709
+ "topK",
39710
+ "maxTokens",
39711
+ "contextLength",
39712
+ "systemPrompt",
39713
+ "timeoutMs",
39714
+ "connectTimeoutMs",
39715
+ "firstTokenTimeoutMs",
39716
+ "idleTimeoutMs",
39717
+ "retry",
39718
+ "toolsEnabled"
39719
+ ]);
39720
+ /**
39721
+ * A provider-drawn part of the editor, by a generic widget id the admin UI
39722
+ * registers (`ai/apple-node`). `placement: 'model'` replaces the generic model
39723
+ * picker: that widget owns the model choice.
39724
+ */
39725
+ var LlmProviderWidgetSchema = object({
39726
+ id: string(),
39727
+ placement: _enum(["connection", "model"]),
39728
+ /** `providerConfig` keys this widget must fill before the profile can be saved. */
39729
+ requires: array(string()).optional()
39608
39730
  });
39609
39731
  /** ConfigUISchema tree passed through untyped on the wire (the
39610
39732
  * notification-output `ConfigSchemaPassthrough` precedent at
@@ -39613,11 +39735,56 @@ var ConfigSchemaPassthrough$3 = unknown();
39613
39735
  var LlmProfileKindDescriptorSchema = object({
39614
39736
  kind: LlmProfileKindSchema,
39615
39737
  label: string(),
39738
+ /** A generic icon name (`cloud`, `plug`, `cpu`) — never a glyph or a logo. */
39616
39739
  icon: string(),
39617
39740
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
39618
39741
  addonId: string(),
39619
- configSchema: ConfigSchemaPassthrough$3
39742
+ /** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
39743
+ connectionSchema: ConfigSchemaPassthrough$3,
39744
+ /** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
39745
+ advancedSchema: ConfigSchemaPassthrough$3.optional(),
39746
+ /** The kind's defaults; a model from `listModels` may override any of them. */
39747
+ features: LlmModelFeaturesSchema,
39748
+ /** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
39749
+ visionEditable: boolean(),
39750
+ /** Where the model list comes from: `listModels`, `staticModels`, or nowhere. */
39751
+ modelCatalog: _enum([
39752
+ "fetch",
39753
+ "static",
39754
+ "none"
39755
+ ]),
39756
+ staticModels: array(LlmModelInfoSchema).optional(),
39757
+ /** The common fields that mean something on this kind's wire. */
39758
+ profileFields: array(LlmProfileFieldSchema),
39759
+ providerWidgets: array(LlmProviderWidgetSchema).optional()
39760
+ });
39761
+ /**
39762
+ * `listModels` input. `connection` is an UNSAVED draft of `providerConfig`
39763
+ * (the editor's form); with `profileId` too, a secret the draft leaves
39764
+ * untouched (absent or the redaction marker) is resolved server-side from the
39765
+ * stored profile — the browser never receives it.
39766
+ */
39767
+ var LlmListModelsInputSchema = object({
39768
+ addonId: string(),
39769
+ kind: LlmProfileKindSchema,
39770
+ profileId: string().optional(),
39771
+ connection: LlmProviderConfigSchema.optional()
39620
39772
  });
39773
+ var LlmListModelsErrorCodeSchema = _enum([
39774
+ "auth",
39775
+ "network",
39776
+ "unsupported",
39777
+ "invalid"
39778
+ ]);
39779
+ /** A RESULT, never a throw: "wrong key" is an answer the editor renders inline. */
39780
+ var LlmListModelsResultSchema = discriminatedUnion("ok", [object({
39781
+ ok: literal(true),
39782
+ models: array(LlmModelInfoSchema)
39783
+ }), object({
39784
+ ok: literal(false),
39785
+ code: LlmListModelsErrorCodeSchema,
39786
+ message: string()
39787
+ })]);
39621
39788
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
39622
39789
  var LlmDefaultSchema = object({
39623
39790
  selector: LlmDefaultSelectorSchema,
@@ -39717,7 +39884,10 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
39717
39884
  kind: "mutation",
39718
39885
  auth: "admin",
39719
39886
  timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
39720
- }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
39887
+ }), method(LlmListModelsInputSchema, LlmListModelsResultSchema, {
39888
+ kind: "mutation",
39889
+ auth: "admin"
39890
+ }), method(object({}), array(LlmDefaultSchema)), method(object({
39721
39891
  selector: LlmDefaultSelectorSchema,
39722
39892
  profileId: string().nullable()
39723
39893
  }), _void(), {
@@ -39885,14 +40055,106 @@ var LogEntrySchema = object({
39885
40055
  meta: record(string(), unknown()).optional(),
39886
40056
  tags: record(string(), string()).optional()
39887
40057
  });
39888
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
39889
- scope: array(string()).optional(),
40058
+ /**
40059
+ * A history READ against one destination (D898).
40060
+ *
40061
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
40062
+ * browser applied after the limit is what made a rare device's lines
40063
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
40064
+ * minted (opaque to everyone else): a file position for the rotated files, a
40065
+ * nanosecond timestamp for Loki.
40066
+ *
40067
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
40068
+ * store answers `done: false` with the cursor it reached and the bytes it
40069
+ * scanned, and the caller decides whether to go on. That is what makes a long
40070
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
40071
+ * flight, and not asking for the next slice ends the scan.
40072
+ */
40073
+ var LogReadQuerySchema = object({
40074
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
40075
+ requestId: string().min(1).max(64).optional(),
40076
+ /** The device the line is about (`tags.deviceId`, numeric). */
40077
+ deviceId: number().int().optional(),
40078
+ /**
40079
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
40080
+ * match. Not `addonId`: a cap router reads that name as "which provider".
40081
+ */
40082
+ fromAddonId: string().min(1).max(200).optional(),
40083
+ /**
40084
+ * The emitting node: matches the agent that emitted the line, the node
40085
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
40086
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
40087
+ * name as "which node's provider".
40088
+ */
40089
+ fromNodeId: string().min(1).max(200).optional(),
40090
+ /** Any other tag, exact match (AND). */
40091
+ tags: record(string(), union([string(), number()])).optional(),
40092
+ /** Severity FLOOR: this level and above. */
39890
40093
  level: LogLevelSchema.optional(),
39891
- since: date().optional(),
39892
- until: date().optional(),
39893
- limit: number().optional(),
39894
- tags: record(string(), string()).optional()
39895
- }), array(LogEntrySchema).readonly());
40094
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
40095
+ text: string().min(1).max(200).optional(),
40096
+ /** Epoch ms, inclusive. */
40097
+ since: number().optional(),
40098
+ /** Epoch ms, inclusive. */
40099
+ until: number().optional(),
40100
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
40101
+ before: string().min(1).max(1024).optional(),
40102
+ /** Newer than this cursor (exclusive). */
40103
+ after: string().min(1).max(1024).optional(),
40104
+ limit: number().int().min(1).max(1e3).optional(),
40105
+ /** Wall-clock bound of this slice. The provider caps it. */
40106
+ budgetMs: number().int().min(50).max(1e4).optional()
40107
+ });
40108
+ var LogReadResultSchema = object({
40109
+ /** Newest first. */
40110
+ entries: array(object({
40111
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
40112
+ id: string().optional(),
40113
+ /** Epoch ms. */
40114
+ timestamp: number(),
40115
+ level: LogLevelSchema,
40116
+ scope: string().optional(),
40117
+ message: string(),
40118
+ tags: record(string(), union([string(), number()])).optional(),
40119
+ meta: record(string(), unknown()).optional()
40120
+ })),
40121
+ /** Pass as `before` for the next older page; null when nothing older exists. */
40122
+ nextBefore: string().nullable(),
40123
+ /** Pass as `after` to read what arrived since; null when unknown. */
40124
+ nextAfter: string().nullable(),
40125
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
40126
+ scannedBytes: number().int().nonnegative(),
40127
+ /**
40128
+ * True when the scan in this direction reached the end of the store.
40129
+ * False with fewer than `limit` entries means the budget ran out first —
40130
+ * call again with `nextBefore` to go on.
40131
+ */
40132
+ done: boolean(),
40133
+ /** True when `cancelRead` ended this slice early. */
40134
+ cancelled: boolean().optional()
40135
+ });
40136
+ var LogReadCapabilitiesSchema = object({
40137
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
40138
+ readable: boolean(),
40139
+ /** Why not, when `readable` is false — rendered next to the source. */
40140
+ reason: string().nullable(),
40141
+ /** Filters the provider applies itself. A false one is applied by nobody. */
40142
+ filters: object({
40143
+ deviceId: boolean(),
40144
+ addonId: boolean(),
40145
+ nodeId: boolean(),
40146
+ tags: boolean(),
40147
+ level: boolean(),
40148
+ text: boolean(),
40149
+ timeRange: boolean()
40150
+ }),
40151
+ /** How far back the store reaches, when the provider knows (days). */
40152
+ retentionDays: number().nullable()
40153
+ });
40154
+ method(LogEntrySchema, _void(), { kind: "mutation" }), optionalMethod(_void(), LogReadCapabilitiesSchema, { auth: "admin" }), optionalMethod(LogReadQuerySchema, LogReadResultSchema, { auth: "admin" }), optionalMethod(object({ requestId: string().min(1).max(64) }), object({ cancelled: boolean() }), {
40155
+ kind: "mutation",
40156
+ auth: "admin"
40157
+ });
39896
40158
  /**
39897
40159
  * `login-method` — collection cap through which auth addons contribute
39898
40160
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -42448,6 +42710,33 @@ var NcRuleTargetSchema = object({
42448
42710
  params: record(string(), unknown()).optional()
42449
42711
  });
42450
42712
  /**
42713
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
42714
+ *
42715
+ * Every mode starts from the same CLEAN source frame of the trigger moment
42716
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
42717
+ * to the zone that fired the rule) and renders it once at send time:
42718
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
42719
+ * colour and every OTHER track visible at that instant outlined thin, each
42720
+ * labelled with class and confidence ("dog 87%").
42721
+ * - `crop` — the subject cut out of that frame around its box at that instant.
42722
+ * - `clean` — the whole scene with nothing drawn on it.
42723
+ * - `none` — no picture.
42724
+ *
42725
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
42726
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
42727
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
42728
+ * ship a crop on one event and a boxed scene on the next depending on which
42729
+ * stored kind had landed.
42730
+ */
42731
+ var NcMediaImageSchema = _enum([
42732
+ "scene-boxes",
42733
+ "crop",
42734
+ "clean",
42735
+ "none"
42736
+ ]);
42737
+ /**
42738
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
42739
+ *
42451
42740
  * Media attachment policy (P1 still-image subset).
42452
42741
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
42453
42742
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -42461,6 +42750,8 @@ var NcRuleTargetSchema = object({
42461
42750
  * - `none` — no attachment.
42462
42751
  */
42463
42752
  /**
42753
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
42754
+ *
42464
42755
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
42465
42756
  * conflate it with the selection strategy and betray the request: asking for
42466
42757
  * the clean scene frame on an object-event owner used to start at
@@ -42489,16 +42780,29 @@ var NcMediaFrameSchema = _enum([
42489
42780
  */
42490
42781
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
42491
42782
  var NcMediaPolicySchema = object({
42783
+ /**
42784
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
42785
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
42786
+ * triple below, at load and at every write, and the store keeps only this.
42787
+ */
42788
+ image: NcMediaImageSchema.optional(),
42789
+ /**
42790
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
42791
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
42792
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
42793
+ * Replaces `zoneCrop`.
42794
+ */
42795
+ showTriggerZone: boolean().optional(),
42796
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42492
42797
  attach: _enum([
42493
42798
  "best",
42494
42799
  "best-matching",
42495
42800
  "keyFrame",
42496
42801
  "none"
42497
- ]).default("best"),
42498
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
42802
+ ]).optional(),
42803
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42499
42804
  frame: NcMediaFrameSchema.optional(),
42500
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
42501
- * "show me the ZONE", not the whole scene or the subject crop. */
42805
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
42502
42806
  zoneCrop: boolean().optional(),
42503
42807
  /**
42504
42808
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -42670,7 +42974,9 @@ var NcRuleInputSchema = object({
42670
42974
  * targets.
42671
42975
  */
42672
42976
  targetUsers: array(string()).optional(),
42673
- media: NcMediaPolicySchema.default({ attach: "best" }),
42977
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
42978
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
42979
+ media: NcMediaPolicySchema.default({}),
42674
42980
  throttle: NcThrottleSchema.default({
42675
42981
  cooldownSec: 60,
42676
42982
  scope: "rule-device"
@@ -43607,13 +43913,37 @@ var NcAlarmModeOpeningsSchema = object({
43607
43913
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
43608
43914
  unknown: array(number().int())
43609
43915
  });
43916
+ /**
43917
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
43918
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
43919
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
43920
+ * never looks fully armed (D62: off must never look like broken).
43921
+ */
43922
+ var NcAlarmInputBypassViewSchema = object({
43923
+ ruleId: string(),
43924
+ /** The rule's current name (its frozen name when the rule is gone). */
43925
+ ruleName: string(),
43926
+ /** The input: the sensor of the match, else its camera. */
43927
+ deviceId: number().int(),
43928
+ /** The input's current name. */
43929
+ name: string(),
43930
+ /** When it was bypassed (ms epoch). */
43931
+ since: number(),
43932
+ /** Triggers from this input dropped since. */
43933
+ dropped: number().int().min(0)
43934
+ });
43610
43935
  var NcAlarmLiveSchema = object({
43611
43936
  state: AlarmStateSchema,
43612
43937
  /** The mode being armed into (exit delay) or held; null when disarmed. */
43613
43938
  targetMode: AlarmArmModeSchema.nullable(),
43614
43939
  availableModes: array(AlarmArmModeSchema),
43615
43940
  openings: array(NcAlarmModeOpeningsSchema),
43616
- exclusions: array(NcAlarmExclusionViewSchema)
43941
+ exclusions: array(NcAlarmExclusionViewSchema),
43942
+ /**
43943
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
43944
+ * Defaulted so an older hub answer still parses (as "none known").
43945
+ */
43946
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
43617
43947
  });
43618
43948
  var NcAlarmConfigSchema = object({
43619
43949
  /**
@@ -60725,26 +61055,6 @@ var ApiKeySummarySchema = object({
60725
61055
  createdAt: number(),
60726
61056
  lastUsedAt: number().optional()
60727
61057
  });
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
61058
  var OauthSessionSummarySchema = object({
60749
61059
  id: string(),
60750
61060
  userId: string(),
@@ -60766,11 +61076,11 @@ var TotpStatusSchema = object({
60766
61076
  confirmedAt: number().nullable()
60767
61077
  });
60768
61078
  /**
60769
- * user-management — singleton capability for user accounts, API keys,
60770
- * and scoped tokens.
61079
+ * user-management — singleton capability for user accounts and the
61080
+ * legacy API-key rows.
60771
61081
  *
60772
61082
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
60773
- * — the subset check on `setUserScopes` / `createScopedToken` is moot
61083
+ * — the subset check on `setUserScopes` is moot
60774
61084
  * because non-admins never reach these. If/when we open non-admin
60775
61085
  * delegation, structural caller-scope subset check goes inside the
60776
61086
  * provider.
@@ -60827,15 +61137,7 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
60827
61137
  kind: "mutation",
60828
61138
  auth: "admin",
60829
61139
  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, {
61140
+ }), method(object({ userId: string() }), TotpSetupResultSchema, {
60839
61141
  kind: "mutation",
60840
61142
  auth: "admin",
60841
61143
  access: "create"
@@ -64991,7 +65293,7 @@ Object.freeze({
64991
65293
  capName: "llm",
64992
65294
  capScope: "system",
64993
65295
  addonId: null,
64994
- access: "view"
65296
+ access: "create"
64995
65297
  },
64996
65298
  "llm.listNodeModels": {
64997
65299
  capName: "llm",
@@ -65293,7 +65595,19 @@ Object.freeze({
65293
65595
  addonId: null,
65294
65596
  access: "view"
65295
65597
  },
65296
- "logDestination.query": {
65598
+ "logDestination.cancelRead": {
65599
+ capName: "log-destination",
65600
+ capScope: "system",
65601
+ addonId: null,
65602
+ access: "create"
65603
+ },
65604
+ "logDestination.describeRead": {
65605
+ capName: "log-destination",
65606
+ capScope: "system",
65607
+ addonId: null,
65608
+ access: "view"
65609
+ },
65610
+ "logDestination.read": {
65297
65611
  capName: "log-destination",
65298
65612
  capScope: "system",
65299
65613
  addonId: null,
@@ -69655,12 +69969,6 @@ Object.freeze({
69655
69969
  addonId: null,
69656
69970
  access: "create"
69657
69971
  },
69658
- "userManagement.createScopedToken": {
69659
- capName: "user-management",
69660
- capScope: "system",
69661
- addonId: null,
69662
- access: "create"
69663
- },
69664
69972
  "userManagement.createUser": {
69665
69973
  capName: "user-management",
69666
69974
  capScope: "system",
@@ -69709,12 +70017,6 @@ Object.freeze({
69709
70017
  addonId: null,
69710
70018
  access: "view"
69711
70019
  },
69712
- "userManagement.listScopedTokens": {
69713
- capName: "user-management",
69714
- capScope: "system",
69715
- addonId: null,
69716
- access: "view"
69717
- },
69718
70020
  "userManagement.listUsers": {
69719
70021
  capName: "user-management",
69720
70022
  capScope: "system",
@@ -69769,12 +70071,6 @@ Object.freeze({
69769
70071
  addonId: null,
69770
70072
  access: "delete"
69771
70073
  },
69772
- "userManagement.revokeScopedToken": {
69773
- capName: "user-management",
69774
- capScope: "system",
69775
- addonId: null,
69776
- access: "delete"
69777
- },
69778
70074
  "userManagement.setupTotp": {
69779
70075
  capName: "user-management",
69780
70076
  capScope: "system",
@@ -69805,12 +70101,6 @@ Object.freeze({
69805
70101
  addonId: null,
69806
70102
  access: "view"
69807
70103
  },
69808
- "userManagement.validateScopedToken": {
69809
- capName: "user-management",
69810
- capScope: "system",
69811
- addonId: null,
69812
- access: "view"
69813
- },
69814
70104
  "userManagement.verifyTotp": {
69815
70105
  capName: "user-management",
69816
70106
  capScope: "system",
@@ -71324,6 +71614,11 @@ Object.freeze({
71324
71614
  form: "single",
71325
71615
  optional: false
71326
71616
  }],
71617
+ "logDestination.read": [{
71618
+ name: "deviceId",
71619
+ form: "single",
71620
+ optional: true
71621
+ }],
71327
71622
  "mediaPlayer.getStatus": [{
71328
71623
  name: "deviceId",
71329
71624
  form: "single",