@camstack/addon-provider-dreame 0.2.137 → 0.2.139

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.
Files changed (3) hide show
  1. package/dist/addon.js +534 -142
  2. package/dist/addon.mjs +534 -142
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -5456,7 +5456,7 @@ var ZodIssueCode$1 = {
5456
5456
  var ZodFirstPartyTypeKind$1;
5457
5457
  ZodFirstPartyTypeKind$1 || (ZodFirstPartyTypeKind$1 = {});
5458
5458
  //#endregion
5459
- //#region ../types/dist/sleep-BxjU_fJM.mjs
5459
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5460
5460
  /**
5461
5461
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5462
5462
  * window to float samples (D455).
@@ -7839,9 +7839,9 @@ function normalizeAddonInitResult(result) {
7839
7839
  return result;
7840
7840
  }
7841
7841
  /**
7842
- * The share-view scope kinds a `csv_*` share token can carry. The hub mints
7843
- * and validates them (`share-token.service.ts` builds its enum from this
7844
- * list); a data plane names the kinds it ACCEPTS in `share`.
7842
+ * The share-view scope kinds a share-link token can carry. The hub mints
7843
+ * and validates them (`ShareViewGrantSchema` builds its
7844
+ * enum from this list); a data plane names the kinds it ACCEPTS in `share`.
7845
7845
  */
7846
7846
  var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
7847
7847
  /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
@@ -12545,7 +12545,7 @@ var ConvertResultSchema = object({
12545
12545
  * `super_admin` — collapsed onto the single boolean because every
12546
12546
  * non-admin caller is governed by the same scope-check rules; the
12547
12547
  * distinction was only ever used to route role-specific procedures
12548
- * which we no longer have. CLI / webhook integrations are `cst_*` tokens
12548
+ * which we no longer have. CLI / webhook integrations are tokens (`auth.mintToken`)
12549
12549
  * with `isAdmin: false` + an explicit scope list.
12550
12550
  */
12551
12551
  /** Per-method access flavour. Materialised on every cap method via codegen. */
@@ -12734,10 +12734,12 @@ var AddonRoutesScopeSchema = object({
12734
12734
  type: literal("addon-routes"),
12735
12735
  access: array(MethodAccessSchema).min(1)
12736
12736
  });
12737
+ var PreferencesSelfScopeSchema = object({ type: literal("preferences-self") });
12737
12738
  var CredentialScopeSchema = union([
12738
12739
  literal("*"),
12739
12740
  ShareViewScopeSchema,
12740
12741
  AddonRoutesScopeSchema,
12742
+ PreferencesSelfScopeSchema,
12741
12743
  TokenScopeSchema
12742
12744
  ]);
12743
12745
  object({
@@ -12746,6 +12748,55 @@ object({
12746
12748
  jti: string().min(16),
12747
12749
  scopes: array(CredentialScopeSchema).min(1)
12748
12750
  });
12751
+ var PreferenceNamespaceSchema = string().regex(/^[a-z][a-z0-9.-]{0,63}$/);
12752
+ /** A namespace's value: a JSON object, opaque to the hub. */
12753
+ var PreferenceValueSchema = record(string(), unknown());
12754
+ var PreferenceDeviceIdSchema = string().min(1).max(64);
12755
+ /** A stored row, as the owner reads it. */
12756
+ var PreferenceRowSchema = object({
12757
+ namespace: PreferenceNamespaceSchema,
12758
+ value: PreferenceValueSchema,
12759
+ /** Starts at 1, +1 on every write of this namespace. A delete ends the row and its count. */
12760
+ revision: number().int().positive(),
12761
+ updatedAt: number().int(),
12762
+ /** The client id the last writer sent; `null` when it sent none. */
12763
+ updatedByDevice: PreferenceDeviceIdSchema.nullable()
12764
+ });
12765
+ object({
12766
+ /** Absent: every namespace the caller holds. */
12767
+ namespaces: array(PreferenceNamespaceSchema).max(32).optional() });
12768
+ object({ rows: array(PreferenceRowSchema) });
12769
+ object({
12770
+ namespace: PreferenceNamespaceSchema,
12771
+ value: PreferenceValueSchema,
12772
+ /**
12773
+ * The revision the edit was based on. Absent: last write wins. `0`: the
12774
+ * namespace must not exist yet. Any other value that is not the current
12775
+ * revision answers `conflict` and writes nothing.
12776
+ */
12777
+ baseRevision: number().int().nonnegative().optional(),
12778
+ deviceId: PreferenceDeviceIdSchema.optional()
12779
+ });
12780
+ discriminatedUnion("status", [object({
12781
+ status: literal("saved"),
12782
+ row: PreferenceRowSchema
12783
+ }), object({
12784
+ status: literal("conflict"),
12785
+ current: PreferenceRowSchema.nullable()
12786
+ })]);
12787
+ object({ namespace: PreferenceNamespaceSchema });
12788
+ object({
12789
+ /** `false` when the namespace did not exist. */
12790
+ deleted: boolean() });
12791
+ object({
12792
+ /** The revision the client holds per namespace; a namespace it does not list is new to it. */
12793
+ revisionByNamespace: record(PreferenceNamespaceSchema, number().int().nonnegative()).refine((map) => Object.keys(map).length <= 32, { message: `at most 32 namespaces` }) });
12794
+ object({
12795
+ /** Every row whose revision differs from the client's, and every row it did not list. */
12796
+ rows: array(PreferenceRowSchema),
12797
+ /** Namespaces the client listed that no longer exist. */
12798
+ deleted: array(PreferenceNamespaceSchema)
12799
+ });
12749
12800
  _enum(["new-session", "step-up"]);
12750
12801
  /** The languages the hub's app landing pages are written in (D858). */
12751
12802
  var AppPageLangSchema = _enum(["en", "it"]);
@@ -16999,7 +17050,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
16999
17050
  kind: literal("node"),
17000
17051
  nodeId: string().min(1)
17001
17052
  })]);
17053
+ /**
17054
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
17055
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
17056
+ * meaning); a rollup keeps the time spent in each state (`states`).
17057
+ */
17002
17058
  var DeviceHistoryKindSchema = _enum([
17059
+ "gauge",
17060
+ "counter",
17061
+ "boolean",
17062
+ "enum"
17063
+ ]);
17064
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
17065
+ var DeviceHistoryProducerKindSchema = _enum([
17003
17066
  "gauge",
17004
17067
  "counter",
17005
17068
  "boolean"
@@ -17036,7 +17099,13 @@ var SeriesInfoSchema = object({
17036
17099
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
17037
17100
  unit: string().nullable(),
17038
17101
  displayName: string(),
17039
- source: _enum(["cap", "addon"]),
17102
+ source: _enum([
17103
+ "cap",
17104
+ "addon",
17105
+ "derived"
17106
+ ]),
17107
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
17108
+ values: array(string()).readonly().nullable(),
17040
17109
  firstTs: number(),
17041
17110
  lastTs: number()
17042
17111
  });
@@ -17050,17 +17119,31 @@ var QueryPointSchema = object({
17050
17119
  twMean: number().nullable(),
17051
17120
  min: number(),
17052
17121
  max: number(),
17053
- /** `null` is unknown, never zero (D393). */
17054
- last: number().nullable()
17122
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
17123
+ last: number().nullable(),
17124
+ /**
17125
+ * The increase over the point: a `counter`'s growth since the previous point
17126
+ * or bucket (a drop is a reset, counted from zero), and for
17127
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
17128
+ * every other kind, and when it cannot be known.
17129
+ */
17130
+ delta: number().nullable(),
17131
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
17132
+ state: string().nullable(),
17133
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
17134
+ states: record(string(), number()).nullable()
17055
17135
  });
17056
17136
  var QuerySeriesSchema = object({
17057
17137
  scope: string(),
17058
17138
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
17059
17139
  before: object({
17060
17140
  t: number(),
17061
- value: number().nullable()
17141
+ value: number().nullable(),
17142
+ state: string().nullable()
17062
17143
  }).nullable(),
17063
- points: array(QueryPointSchema).readonly()
17144
+ points: array(QueryPointSchema).readonly(),
17145
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
17146
+ derivedFrom: string().nullable()
17064
17147
  });
17065
17148
  /** The window part of a query, shared by the device and node forms. */
17066
17149
  var QueryWindowShape = {
@@ -17076,6 +17159,23 @@ var QueryResultSchema = object({
17076
17159
  series: array(QuerySeriesSchema).readonly(),
17077
17160
  truncated: boolean()
17078
17161
  });
17162
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
17163
+ var QueryManyItemSchema = union([object({
17164
+ deviceId: number().int(),
17165
+ key: string(),
17166
+ scope: string().optional()
17167
+ }), object({
17168
+ forNodeId: string().min(1),
17169
+ key: string(),
17170
+ scope: string().optional()
17171
+ })]);
17172
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
17173
+ ok: literal(true),
17174
+ result: QueryResultSchema
17175
+ }), object({
17176
+ ok: literal(false),
17177
+ error: string()
17178
+ })]);
17079
17179
  var TierStatusSchema = object({
17080
17180
  tier: DeviceHistoryResolutionSchema,
17081
17181
  /** `null` until the first background count answered. */
@@ -17131,16 +17231,22 @@ var DeviceHistoryStatusSchema = object({
17131
17231
  lastRefreshAt: number().nullable()
17132
17232
  })
17133
17233
  });
17134
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17234
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17135
17235
  deviceId: number().int(),
17136
17236
  ...QueryWindowShape
17137
17237
  }), QueryResultSchema), method(object({
17138
- nodeId: string().min(1),
17238
+ forNodeId: string().min(1),
17139
17239
  ...QueryWindowShape
17140
17240
  }), QueryResultSchema, { auth: "admin" }), method(object({
17241
+ items: array(QueryManyItemSchema).min(1).max(24),
17242
+ from: QueryWindowShape.from,
17243
+ to: QueryWindowShape.to,
17244
+ resolution: QueryWindowShape.resolution,
17245
+ maxPoints: QueryWindowShape.maxPoints
17246
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
17141
17247
  name: string().regex(/^[a-z0-9-]+$/),
17142
17248
  subjectKind: _enum(["device", "node"]),
17143
- kind: DeviceHistoryKindSchema,
17249
+ kind: DeviceHistoryProducerKindSchema,
17144
17250
  unit: string().optional(),
17145
17251
  displayName: string().min(1),
17146
17252
  ingest: _enum(["points", "buckets"])
@@ -39951,38 +40057,37 @@ method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
39951
40057
  auth: "admin",
39952
40058
  timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
39953
40059
  });
40060
+ var LlmProfileKindSchema = string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "a kind id is lower-case letters, digits and dashes");
40061
+ /** What a model (or, by default, every model of a kind) can do. */
40062
+ var LlmModelFeaturesSchema = object({
40063
+ vision: boolean(),
40064
+ tools: boolean(),
40065
+ streaming: boolean()
40066
+ });
40067
+ /** One model a provider offers. `features` overrides the kind's defaults, per field. */
40068
+ var LlmModelInfoSchema = object({
40069
+ id: string(),
40070
+ label: string().optional(),
40071
+ contextLength: number().int().positive().optional(),
40072
+ features: LlmModelFeaturesSchema.partial().optional()
40073
+ });
39954
40074
  /**
39955
- * `llm` — consumer-facing LLM surface (spec §1-§3). Collection-mode: array
39956
- * methods concat-fan across providers; single-row methods route to ONE
39957
- * provider by the `addonId` in the call input (the notification-output
39958
- * posture, notification-output.cap.ts:215-250). Provided by `addon-ai`
39959
- * (hub-placed); the cap stays open for future providers.
39960
- *
39961
- * Profiles are ROWS (data), not addons: one row = one usable model endpoint.
39962
- * `apiKey` is a password field — providers REDACT it on read and merge on
39963
- * write; a stored key NEVER round-trips to a client.
40075
+ * The provider-specific part of a profile, validated by the provider that owns
40076
+ * the kind (`upsertProfile` refuses what it does not accept). A field its
40077
+ * `connectionSchema` declares `type: 'password'` is a secret: it is held in the
40078
+ * keychain, never in the row, and reads back as the redaction marker.
39964
40079
  */
39965
- var LlmProfileKindSchema = _enum([
39966
- "openai-compatible",
39967
- "openai",
39968
- "anthropic",
39969
- "google",
39970
- "managed-local",
39971
- "apple-foundation"
39972
- ]);
40080
+ var LlmProviderConfigSchema = record(string(), unknown());
39973
40081
  var LlmProfileSchema = object({
39974
40082
  id: string(),
39975
40083
  name: string(),
40084
+ /** The provider-declared kind (`LlmProfileKindDescriptor.kind`). */
39976
40085
  kind: LlmProfileKindSchema,
39977
40086
  /** Stamped by the provider — keeps the fanned catalog routable. */
39978
40087
  addonId: string(),
39979
40088
  enabled: boolean(),
39980
40089
  /** Vendor model id, or the managed runtime's loaded model. */
39981
40090
  model: string(),
39982
- /** Required for openai-compatible; override for cloud kinds. */
39983
- baseUrl: string().optional(),
39984
- /** ConfigUISchema type:'password' — never round-trips (spec §5). */
39985
- apiKey: string().optional(),
39986
40091
  /** Vision on/off. A vision call against a `false` profile is REFUSED, never
39987
40092
  * degraded to text — that shipped once and produced a confident answer to a
39988
40093
  * question about a picture nobody sent. */
@@ -39990,15 +40095,11 @@ var LlmProfileSchema = object({
39990
40095
  temperature: number().min(0).max(2).optional(),
39991
40096
  /** Nucleus sampling. Every wire we speak has it. */
39992
40097
  topP: number().min(0).max(1).optional(),
39993
- /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
39994
- * wire does, and the client drops it there (measured: the request body gets
39995
- * `top_p` and no `top_k`). The profile editor hides the field wherever it
39996
- * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
40098
+ /** Top-k sampling. Carried only by the wires that have it — a kind offers the
40099
+ * field in its editor only when its descriptor lists it in `profileFields`. */
39997
40100
  topK: number().int().positive().optional(),
39998
40101
  maxTokens: number().int().positive().optional(),
39999
- /** Prompt context window. Advisory for cloud kinds (they enforce their own);
40000
- * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
40001
- * the model with, so it is the one field that changes a PROCESS. */
40102
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own). */
40002
40103
  contextLength: number().int().positive().optional(),
40003
40104
  /** Default system prompt. A caller's `system` REPLACES it (never appends —
40004
40105
  * two system prompts fighting is worse than either alone). */
@@ -40024,16 +40125,37 @@ var LlmProfileSchema = object({
40024
40125
  * library; the REGISTRY of callable tools is ours and is empty in v1, so a
40025
40126
  * `true` here buys the wiring, not behaviour, until tools are registered. */
40026
40127
  toolsEnabled: boolean().default(false),
40027
- extraHeaders: record(string(), string()).optional(),
40028
- /** kind === 'managed-local' only (spec §4). */
40029
- runtime: ManagedRuntimeConfigSchema.optional(),
40030
- /**
40031
- * kind === 'apple-foundation' only: WHERE it runs — the only thing there is
40032
- * to configure (no key, no URL, no download; `model` is `apple-system`).
40033
- * `supportsVision` on such a row is stamped by the provider from the node's
40034
- * reported `imageInput`, never taken from the operator (D62).
40035
- */
40036
- appleFoundation: object({ nodeId: string() }).optional()
40128
+ /** Everything the kind's provider owns (endpoint, key, node, runtime…). */
40129
+ providerConfig: LlmProviderConfigSchema.default({})
40130
+ });
40131
+ /**
40132
+ * The common profile fields a kind's editor offers. The editor owns how each
40133
+ * one is drawn; the provider says which of them mean something on its wire.
40134
+ */
40135
+ var LlmProfileFieldSchema = _enum([
40136
+ "temperature",
40137
+ "topP",
40138
+ "topK",
40139
+ "maxTokens",
40140
+ "contextLength",
40141
+ "systemPrompt",
40142
+ "timeoutMs",
40143
+ "connectTimeoutMs",
40144
+ "firstTokenTimeoutMs",
40145
+ "idleTimeoutMs",
40146
+ "retry",
40147
+ "toolsEnabled"
40148
+ ]);
40149
+ /**
40150
+ * A provider-drawn part of the editor, by a generic widget id the admin UI
40151
+ * registers (`ai/apple-node`). `placement: 'model'` replaces the generic model
40152
+ * picker: that widget owns the model choice.
40153
+ */
40154
+ var LlmProviderWidgetSchema = object({
40155
+ id: string(),
40156
+ placement: _enum(["connection", "model"]),
40157
+ /** `providerConfig` keys this widget must fill before the profile can be saved. */
40158
+ requires: array(string()).optional()
40037
40159
  });
40038
40160
  /** ConfigUISchema tree passed through untyped on the wire (the
40039
40161
  * notification-output `ConfigSchemaPassthrough` precedent at
@@ -40042,11 +40164,56 @@ var ConfigSchemaPassthrough$3 = unknown();
40042
40164
  var LlmProfileKindDescriptorSchema = object({
40043
40165
  kind: LlmProfileKindSchema,
40044
40166
  label: string(),
40167
+ /** A generic icon name (`cloud`, `plug`, `cpu`) — never a glyph or a logo. */
40045
40168
  icon: string(),
40046
40169
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
40047
40170
  addonId: string(),
40048
- configSchema: ConfigSchemaPassthrough$3
40171
+ /** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
40172
+ connectionSchema: ConfigSchemaPassthrough$3,
40173
+ /** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
40174
+ advancedSchema: ConfigSchemaPassthrough$3.optional(),
40175
+ /** The kind's defaults; a model from `listModels` may override any of them. */
40176
+ features: LlmModelFeaturesSchema,
40177
+ /** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
40178
+ visionEditable: boolean(),
40179
+ /** Where the model list comes from: `listModels`, `staticModels`, or nowhere. */
40180
+ modelCatalog: _enum([
40181
+ "fetch",
40182
+ "static",
40183
+ "none"
40184
+ ]),
40185
+ staticModels: array(LlmModelInfoSchema).optional(),
40186
+ /** The common fields that mean something on this kind's wire. */
40187
+ profileFields: array(LlmProfileFieldSchema),
40188
+ providerWidgets: array(LlmProviderWidgetSchema).optional()
40189
+ });
40190
+ /**
40191
+ * `listModels` input. `connection` is an UNSAVED draft of `providerConfig`
40192
+ * (the editor's form); with `profileId` too, a secret the draft leaves
40193
+ * untouched (absent or the redaction marker) is resolved server-side from the
40194
+ * stored profile — the browser never receives it.
40195
+ */
40196
+ var LlmListModelsInputSchema = object({
40197
+ addonId: string(),
40198
+ kind: LlmProfileKindSchema,
40199
+ profileId: string().optional(),
40200
+ connection: LlmProviderConfigSchema.optional()
40049
40201
  });
40202
+ var LlmListModelsErrorCodeSchema = _enum([
40203
+ "auth",
40204
+ "network",
40205
+ "unsupported",
40206
+ "invalid"
40207
+ ]);
40208
+ /** A RESULT, never a throw: "wrong key" is an answer the editor renders inline. */
40209
+ var LlmListModelsResultSchema = discriminatedUnion("ok", [object({
40210
+ ok: literal(true),
40211
+ models: array(LlmModelInfoSchema)
40212
+ }), object({
40213
+ ok: literal(false),
40214
+ code: LlmListModelsErrorCodeSchema,
40215
+ message: string()
40216
+ })]);
40050
40217
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
40051
40218
  var LlmDefaultSchema = object({
40052
40219
  selector: LlmDefaultSelectorSchema,
@@ -40146,7 +40313,10 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
40146
40313
  kind: "mutation",
40147
40314
  auth: "admin",
40148
40315
  timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
40149
- }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
40316
+ }), method(LlmListModelsInputSchema, LlmListModelsResultSchema, {
40317
+ kind: "mutation",
40318
+ auth: "admin"
40319
+ }), method(object({}), array(LlmDefaultSchema)), method(object({
40150
40320
  selector: LlmDefaultSelectorSchema,
40151
40321
  profileId: string().nullable()
40152
40322
  }), _void(), {
@@ -40314,14 +40484,106 @@ var LogEntrySchema = object({
40314
40484
  meta: record(string(), unknown()).optional(),
40315
40485
  tags: record(string(), string()).optional()
40316
40486
  });
40317
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
40318
- scope: array(string()).optional(),
40487
+ /**
40488
+ * A history READ against one destination (D898).
40489
+ *
40490
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
40491
+ * browser applied after the limit is what made a rare device's lines
40492
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
40493
+ * minted (opaque to everyone else): a file position for the rotated files, a
40494
+ * nanosecond timestamp for Loki.
40495
+ *
40496
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
40497
+ * store answers `done: false` with the cursor it reached and the bytes it
40498
+ * scanned, and the caller decides whether to go on. That is what makes a long
40499
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
40500
+ * flight, and not asking for the next slice ends the scan.
40501
+ */
40502
+ var LogReadQuerySchema = object({
40503
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
40504
+ requestId: string().min(1).max(64).optional(),
40505
+ /** The device the line is about (`tags.deviceId`, numeric). */
40506
+ deviceId: number().int().optional(),
40507
+ /**
40508
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
40509
+ * match. Not `addonId`: a cap router reads that name as "which provider".
40510
+ */
40511
+ fromAddonId: string().min(1).max(200).optional(),
40512
+ /**
40513
+ * The emitting node: matches the agent that emitted the line, the node
40514
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
40515
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
40516
+ * name as "which node's provider".
40517
+ */
40518
+ fromNodeId: string().min(1).max(200).optional(),
40519
+ /** Any other tag, exact match (AND). */
40520
+ tags: record(string(), union([string(), number()])).optional(),
40521
+ /** Severity FLOOR: this level and above. */
40319
40522
  level: LogLevelSchema.optional(),
40320
- since: date().optional(),
40321
- until: date().optional(),
40322
- limit: number().optional(),
40323
- tags: record(string(), string()).optional()
40324
- }), array(LogEntrySchema).readonly());
40523
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
40524
+ text: string().min(1).max(200).optional(),
40525
+ /** Epoch ms, inclusive. */
40526
+ since: number().optional(),
40527
+ /** Epoch ms, inclusive. */
40528
+ until: number().optional(),
40529
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
40530
+ before: string().min(1).max(1024).optional(),
40531
+ /** Newer than this cursor (exclusive). */
40532
+ after: string().min(1).max(1024).optional(),
40533
+ limit: number().int().min(1).max(1e3).optional(),
40534
+ /** Wall-clock bound of this slice. The provider caps it. */
40535
+ budgetMs: number().int().min(50).max(1e4).optional()
40536
+ });
40537
+ var LogReadResultSchema = object({
40538
+ /** Newest first. */
40539
+ entries: array(object({
40540
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
40541
+ id: string().optional(),
40542
+ /** Epoch ms. */
40543
+ timestamp: number(),
40544
+ level: LogLevelSchema,
40545
+ scope: string().optional(),
40546
+ message: string(),
40547
+ tags: record(string(), union([string(), number()])).optional(),
40548
+ meta: record(string(), unknown()).optional()
40549
+ })),
40550
+ /** Pass as `before` for the next older page; null when nothing older exists. */
40551
+ nextBefore: string().nullable(),
40552
+ /** Pass as `after` to read what arrived since; null when unknown. */
40553
+ nextAfter: string().nullable(),
40554
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
40555
+ scannedBytes: number().int().nonnegative(),
40556
+ /**
40557
+ * True when the scan in this direction reached the end of the store.
40558
+ * False with fewer than `limit` entries means the budget ran out first —
40559
+ * call again with `nextBefore` to go on.
40560
+ */
40561
+ done: boolean(),
40562
+ /** True when `cancelRead` ended this slice early. */
40563
+ cancelled: boolean().optional()
40564
+ });
40565
+ var LogReadCapabilitiesSchema = object({
40566
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
40567
+ readable: boolean(),
40568
+ /** Why not, when `readable` is false — rendered next to the source. */
40569
+ reason: string().nullable(),
40570
+ /** Filters the provider applies itself. A false one is applied by nobody. */
40571
+ filters: object({
40572
+ deviceId: boolean(),
40573
+ addonId: boolean(),
40574
+ nodeId: boolean(),
40575
+ tags: boolean(),
40576
+ level: boolean(),
40577
+ text: boolean(),
40578
+ timeRange: boolean()
40579
+ }),
40580
+ /** How far back the store reaches, when the provider knows (days). */
40581
+ retentionDays: number().nullable()
40582
+ });
40583
+ 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() }), {
40584
+ kind: "mutation",
40585
+ auth: "admin"
40586
+ });
40325
40587
  /**
40326
40588
  * `login-method` — collection cap through which auth addons contribute
40327
40589
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -42039,9 +42301,11 @@ var alarmPanelCapability = {
42039
42301
  */
42040
42302
  durability: "restored",
42041
42303
  /**
42042
- * History (D850): none — enum state; arm/disarm history belongs in the events ledger.
42304
+ * History (D850): the panel's lifecycle state as an `enum` series —
42305
+ * change-only, no floor, so an `arming -> pending -> triggered` sequence of a
42306
+ * few seconds keeps every step. Who armed it stays in the events ledger.
42043
42307
  */
42044
- history: "none",
42308
+ history: { fields: { state: { kind: "enum" } } },
42045
42309
  /** Clock fields: written, but excluded from the compare that decides
42046
42310
  * whether persisting is worth a SQLite commit. */
42047
42311
  volatileStateFields: ["lastChangedAt"]
@@ -42919,6 +43183,33 @@ var NcRuleTargetSchema = object({
42919
43183
  params: record(string(), unknown()).optional()
42920
43184
  });
42921
43185
  /**
43186
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
43187
+ *
43188
+ * Every mode starts from the same CLEAN source frame of the trigger moment
43189
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
43190
+ * to the zone that fired the rule) and renders it once at send time:
43191
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
43192
+ * colour and every OTHER track visible at that instant outlined thin, each
43193
+ * labelled with class and confidence ("dog 87%").
43194
+ * - `crop` — the subject cut out of that frame around its box at that instant.
43195
+ * - `clean` — the whole scene with nothing drawn on it.
43196
+ * - `none` — no picture.
43197
+ *
43198
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
43199
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
43200
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
43201
+ * ship a crop on one event and a boxed scene on the next depending on which
43202
+ * stored kind had landed.
43203
+ */
43204
+ var NcMediaImageSchema = _enum([
43205
+ "scene-boxes",
43206
+ "crop",
43207
+ "clean",
43208
+ "none"
43209
+ ]);
43210
+ /**
43211
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43212
+ *
42922
43213
  * Media attachment policy (P1 still-image subset).
42923
43214
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
42924
43215
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -42932,6 +43223,8 @@ var NcRuleTargetSchema = object({
42932
43223
  * - `none` — no attachment.
42933
43224
  */
42934
43225
  /**
43226
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43227
+ *
42935
43228
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
42936
43229
  * conflate it with the selection strategy and betray the request: asking for
42937
43230
  * the clean scene frame on an object-event owner used to start at
@@ -42960,16 +43253,29 @@ var NcMediaFrameSchema = _enum([
42960
43253
  */
42961
43254
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
42962
43255
  var NcMediaPolicySchema = object({
43256
+ /**
43257
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
43258
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
43259
+ * triple below, at load and at every write, and the store keeps only this.
43260
+ */
43261
+ image: NcMediaImageSchema.optional(),
43262
+ /**
43263
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
43264
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
43265
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
43266
+ * Replaces `zoneCrop`.
43267
+ */
43268
+ showTriggerZone: boolean().optional(),
43269
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42963
43270
  attach: _enum([
42964
43271
  "best",
42965
43272
  "best-matching",
42966
43273
  "keyFrame",
42967
43274
  "none"
42968
- ]).default("best"),
42969
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
43275
+ ]).optional(),
43276
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42970
43277
  frame: NcMediaFrameSchema.optional(),
42971
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
42972
- * "show me the ZONE", not the whole scene or the subject crop. */
43278
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
42973
43279
  zoneCrop: boolean().optional(),
42974
43280
  /**
42975
43281
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -43141,7 +43447,9 @@ var NcRuleInputSchema = object({
43141
43447
  * targets.
43142
43448
  */
43143
43449
  targetUsers: array(string()).optional(),
43144
- media: NcMediaPolicySchema.default({ attach: "best" }),
43450
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
43451
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
43452
+ media: NcMediaPolicySchema.default({}),
43145
43453
  throttle: NcThrottleSchema.default({
43146
43454
  cooldownSec: 60,
43147
43455
  scope: "rule-device"
@@ -44078,13 +44386,37 @@ var NcAlarmModeOpeningsSchema = object({
44078
44386
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
44079
44387
  unknown: array(number().int())
44080
44388
  });
44389
+ /**
44390
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
44391
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
44392
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
44393
+ * never looks fully armed (D62: off must never look like broken).
44394
+ */
44395
+ var NcAlarmInputBypassViewSchema = object({
44396
+ ruleId: string(),
44397
+ /** The rule's current name (its frozen name when the rule is gone). */
44398
+ ruleName: string(),
44399
+ /** The input: the sensor of the match, else its camera. */
44400
+ deviceId: number().int(),
44401
+ /** The input's current name. */
44402
+ name: string(),
44403
+ /** When it was bypassed (ms epoch). */
44404
+ since: number(),
44405
+ /** Triggers from this input dropped since. */
44406
+ dropped: number().int().min(0)
44407
+ });
44081
44408
  var NcAlarmLiveSchema = object({
44082
44409
  state: AlarmStateSchema,
44083
44410
  /** The mode being armed into (exit delay) or held; null when disarmed. */
44084
44411
  targetMode: AlarmArmModeSchema.nullable(),
44085
44412
  availableModes: array(AlarmArmModeSchema),
44086
44413
  openings: array(NcAlarmModeOpeningsSchema),
44087
- exclusions: array(NcAlarmExclusionViewSchema)
44414
+ exclusions: array(NcAlarmExclusionViewSchema),
44415
+ /**
44416
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
44417
+ * Defaulted so an older hub answer still parses (as "none known").
44418
+ */
44419
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
44088
44420
  });
44089
44421
  var NcAlarmConfigSchema = object({
44090
44422
  /**
@@ -54828,9 +55160,11 @@ var connectivityCapability = {
54828
55160
  */
54829
55161
  durability: "restored",
54830
55162
  /**
54831
- * History (D850): none — duplicates device-status.online (one authority for availability).
55163
+ * History (D850): `connected` as a boolean series — change-only, no floor. It
55164
+ * is the upstream entity's own link (a HA connectivity sensor), not the
55165
+ * device's reachability, which stays `device-status.online`.
54832
55166
  */
54833
- history: "none",
55167
+ history: { fields: { connected: { kind: "boolean" } } },
54834
55168
  /** Clock fields: written, but excluded from the compare that decides
54835
55169
  * whether persisting is worth a SQLite commit. */
54836
55170
  volatileStateFields: ["lastChangedAt"]
@@ -55654,11 +55988,22 @@ var dishwasherCapability = {
55654
55988
  },
55655
55989
  runtimeState: DishwasherStatusSchema,
55656
55990
  durability: "session",
55657
- history: { fields: { progressPercent: {
55658
- kind: "gauge",
55659
- unit: "%",
55660
- deadband: 2
55661
- } } }
55991
+ history: { fields: {
55992
+ progressPercent: {
55993
+ kind: "gauge",
55994
+ unit: "%",
55995
+ deadband: 2
55996
+ },
55997
+ state: { kind: "enum" },
55998
+ operationState: { kind: "enum" },
55999
+ remainingSeconds: {
56000
+ kind: "gauge",
56001
+ unit: "s",
56002
+ minIntervalMs: 6e4
56003
+ },
56004
+ doorOpen: { kind: "boolean" },
56005
+ powerOn: { kind: "boolean" }
56006
+ } }
55662
56007
  };
55663
56008
  var DoorbellStatusSchema = object({
55664
56009
  /** Ms epoch of the last press. null = never observed since this provider started. */
@@ -55775,9 +56120,15 @@ var enumSensorCapability = {
55775
56120
  */
55776
56121
  durability: "restored",
55777
56122
  /**
55778
- * History (D850): none — text/enum state has no history (non-goal).
56123
+ * History (D850): the value as an `enum` series (an appliance's program or
56124
+ * operation state, an HVAC action). The option set is per device, so the
56125
+ * value list is LEARNED as values are first seen (bounded). A sensor with a
56126
+ * `format` carries a timestamp, not a state, and is not recorded.
55779
56127
  */
55780
- history: "none",
56128
+ history: { fields: { value: {
56129
+ kind: "enum",
56130
+ skipWhenSet: "format"
56131
+ } } },
55781
56132
  /** Clock fields: written, but excluded from the compare that decides
55782
56133
  * whether persisting is worth a SQLite commit. */
55783
56134
  volatileStateFields: ["lastFetchedAt"]
@@ -57751,9 +58102,10 @@ var lockControlCapability = {
57751
58102
  */
57752
58103
  durability: "restored",
57753
58104
  /**
57754
- * History (D850): none — enum state; lock events belong in the events ledger.
58105
+ * History (D850): the lock's state as an `enum` series — change-only, no
58106
+ * floor: a jam or an unlock lasting seconds is the edge an operator looks for.
57755
58107
  */
57756
- history: "none",
58108
+ history: { fields: { state: { kind: "enum" } } },
57757
58109
  /** Clock fields: written, but excluded from the compare that decides
57758
58110
  * whether persisting is worth a SQLite commit. */
57759
58111
  volatileStateFields: ["lastChangedAt"]
@@ -57927,9 +58279,18 @@ var mediaPlayerCapability = {
57927
58279
  */
57928
58280
  durability: "session",
57929
58281
  /**
57930
- * History (D850): none — `positionMs` moves continuously while playing; volume is transient.
58282
+ * History (D850): volume (a level an operator or an automation sets; the
58283
+ * default 10 s floor folds a slider drag into its end value) and mute.
58284
+ * `positionMs` is not recorded: it moves continuously while playing.
57931
58285
  */
57932
- history: "none"
58286
+ history: { fields: {
58287
+ volumeLevel: {
58288
+ kind: "gauge",
58289
+ unit: "%",
58290
+ deadband: 1
58291
+ },
58292
+ isMuted: { kind: "boolean" }
58293
+ } }
57933
58294
  };
57934
58295
  /**
57935
58296
  * mesh-network — collection cap for mesh-VPN providers.
@@ -63370,9 +63731,29 @@ var streamParamsCapability = {
63370
63731
  */
63371
63732
  durability: "restored",
63372
63733
  /**
63373
- * History (D850): none — encoder configuration.
63734
+ * History (D850): the configured bitrate and frame rate of the main and sub
63735
+ * profiles. Configuration, so change-only on the default floor: a point is an
63736
+ * operator's (or a tuner's) edit, which is exactly what a chart of a stream's
63737
+ * quality over time must show.
63374
63738
  */
63375
- history: "none",
63739
+ history: { fields: {
63740
+ "main.bitrate": {
63741
+ kind: "gauge",
63742
+ unit: "kbps"
63743
+ },
63744
+ "main.framerate": {
63745
+ kind: "gauge",
63746
+ unit: "fps"
63747
+ },
63748
+ "sub.bitrate": {
63749
+ kind: "gauge",
63750
+ unit: "kbps"
63751
+ },
63752
+ "sub.framerate": {
63753
+ kind: "gauge",
63754
+ unit: "fps"
63755
+ }
63756
+ } },
63376
63757
  /** Clock fields: written, but excluded from the compare that decides
63377
63758
  * whether persisting is worth a SQLite commit. */
63378
63759
  volatileStateFields: ["lastFetchedAt"]
@@ -64207,26 +64588,6 @@ var ApiKeySummarySchema = object({
64207
64588
  createdAt: number(),
64208
64589
  lastUsedAt: number().optional()
64209
64590
  });
64210
- var ScopedTokenSummarySchema = object({
64211
- id: string(),
64212
- userId: string(),
64213
- name: string(),
64214
- tokenPrefix: string(),
64215
- scopes: array(TokenScopeSchema),
64216
- expiresAt: number().nullish(),
64217
- lastUsedAt: number().nullish(),
64218
- createdAt: number()
64219
- });
64220
- var CreateScopedTokenInputSchema = object({
64221
- userId: string(),
64222
- name: string(),
64223
- scopes: array(TokenScopeSchema),
64224
- expiresAt: number().optional()
64225
- });
64226
- var CreateScopedTokenResultSchema = object({
64227
- token: string(),
64228
- record: ScopedTokenSummarySchema
64229
- });
64230
64591
  var OauthSessionSummarySchema = object({
64231
64592
  id: string(),
64232
64593
  userId: string(),
@@ -64248,11 +64609,11 @@ var TotpStatusSchema = object({
64248
64609
  confirmedAt: number().nullable()
64249
64610
  });
64250
64611
  /**
64251
- * user-management — singleton capability for user accounts, API keys,
64252
- * and scoped tokens.
64612
+ * user-management — singleton capability for user accounts and the
64613
+ * legacy API-key rows.
64253
64614
  *
64254
64615
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
64255
- * — the subset check on `setUserScopes` / `createScopedToken` is moot
64616
+ * — the subset check on `setUserScopes` is moot
64256
64617
  * because non-admins never reach these. If/when we open non-admin
64257
64618
  * delegation, structural caller-scope subset check goes inside the
64258
64619
  * provider.
@@ -64309,15 +64670,7 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
64309
64670
  kind: "mutation",
64310
64671
  auth: "admin",
64311
64672
  access: "delete"
64312
- }), method(CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, {
64313
- kind: "mutation",
64314
- auth: "admin",
64315
- access: "create"
64316
- }), method(object({ id: string() }), object({ success: literal(true) }), {
64317
- kind: "mutation",
64318
- auth: "admin",
64319
- access: "delete"
64320
- }), method(object({ token: string() }), ScopedTokenSummarySchema.nullable(), { access: "view" }), method(object({ userId: string() }), array(ScopedTokenSummarySchema), { auth: "admin" }), method(object({ userId: string() }), TotpSetupResultSchema, {
64673
+ }), method(object({ userId: string() }), TotpSetupResultSchema, {
64321
64674
  kind: "mutation",
64322
64675
  auth: "admin",
64323
64676
  access: "create"
@@ -66578,6 +66931,15 @@ var BaseDevice$1 = class {
66578
66931
  * Drivers can use the `getProbeFlags()` helper to read the flag bag
66579
66932
  * with a typed cast.
66580
66933
  *
66934
+ * Answer what you KNOW. A plain array is read as the complete list only
66935
+ * while this device is `online` and probed; return
66936
+ * `accessoryChildrenUnknown(reason)` whenever you cannot know the list right
66937
+ * now (no credentials, parent not connected, a failed or partial read) —
66938
+ * the kernel then deletes nothing. Return `accessoryChildrenComplete(list)`
66939
+ * to say "connected, and this is the complete list" explicitly. A shrink is
66940
+ * deleted only after a second agreeing complete read on a later probe (D49;
66941
+ * `packages/system/src/kernel/moleculer/accessory-prune-gate.ts`).
66942
+ *
66581
66943
  * Default: no children.
66582
66944
  */
66583
66945
  getAccessoryChildren() {
@@ -66601,6 +66963,22 @@ var BaseDevice$1 = class {
66601
66963
  return (this.runtimeState.getCapState("feature-probe")?.lastProbedAt ?? 0) > 0;
66602
66964
  }
66603
66965
  };
66966
+ function accessoryChildrenUnknown(reason, known) {
66967
+ return known === void 0 ? {
66968
+ kind: "unknown",
66969
+ reason
66970
+ } : {
66971
+ kind: "unknown",
66972
+ reason,
66973
+ known
66974
+ };
66975
+ }
66976
+ function accessoryChildrenComplete(children) {
66977
+ return {
66978
+ kind: "complete",
66979
+ children
66980
+ };
66981
+ }
66604
66982
  /**
66605
66983
  * Delays before retry rounds 1..N — the round count IS the bound.
66606
66984
  * 10 s catches "the hub was busy for a moment"; the full schedule
@@ -70407,7 +70785,7 @@ Object.freeze({
70407
70785
  capName: "llm",
70408
70786
  capScope: "system",
70409
70787
  addonId: null,
70410
- access: "view"
70788
+ access: "create"
70411
70789
  },
70412
70790
  "llm.listNodeModels": {
70413
70791
  capName: "llm",
@@ -70709,7 +71087,19 @@ Object.freeze({
70709
71087
  addonId: null,
70710
71088
  access: "view"
70711
71089
  },
70712
- "logDestination.query": {
71090
+ "logDestination.cancelRead": {
71091
+ capName: "log-destination",
71092
+ capScope: "system",
71093
+ addonId: null,
71094
+ access: "create"
71095
+ },
71096
+ "logDestination.describeRead": {
71097
+ capName: "log-destination",
71098
+ capScope: "system",
71099
+ addonId: null,
71100
+ access: "view"
71101
+ },
71102
+ "logDestination.read": {
70713
71103
  capName: "log-destination",
70714
71104
  capScope: "system",
70715
71105
  addonId: null,
@@ -75071,12 +75461,6 @@ Object.freeze({
75071
75461
  addonId: null,
75072
75462
  access: "create"
75073
75463
  },
75074
- "userManagement.createScopedToken": {
75075
- capName: "user-management",
75076
- capScope: "system",
75077
- addonId: null,
75078
- access: "create"
75079
- },
75080
75464
  "userManagement.createUser": {
75081
75465
  capName: "user-management",
75082
75466
  capScope: "system",
@@ -75125,12 +75509,6 @@ Object.freeze({
75125
75509
  addonId: null,
75126
75510
  access: "view"
75127
75511
  },
75128
- "userManagement.listScopedTokens": {
75129
- capName: "user-management",
75130
- capScope: "system",
75131
- addonId: null,
75132
- access: "view"
75133
- },
75134
75512
  "userManagement.listUsers": {
75135
75513
  capName: "user-management",
75136
75514
  capScope: "system",
@@ -75185,12 +75563,6 @@ Object.freeze({
75185
75563
  addonId: null,
75186
75564
  access: "delete"
75187
75565
  },
75188
- "userManagement.revokeScopedToken": {
75189
- capName: "user-management",
75190
- capScope: "system",
75191
- addonId: null,
75192
- access: "delete"
75193
- },
75194
75566
  "userManagement.setupTotp": {
75195
75567
  capName: "user-management",
75196
75568
  capScope: "system",
@@ -75221,12 +75593,6 @@ Object.freeze({
75221
75593
  addonId: null,
75222
75594
  access: "view"
75223
75595
  },
75224
- "userManagement.validateScopedToken": {
75225
- capName: "user-management",
75226
- capScope: "system",
75227
- addonId: null,
75228
- access: "view"
75229
- },
75230
75596
  "userManagement.verifyTotp": {
75231
75597
  capName: "user-management",
75232
75598
  capScope: "system",
@@ -76740,6 +77106,11 @@ Object.freeze({
76740
77106
  form: "single",
76741
77107
  optional: false
76742
77108
  }],
77109
+ "logDestination.read": [{
77110
+ name: "deviceId",
77111
+ form: "single",
77112
+ optional: true
77113
+ }],
76743
77114
  "mediaPlayer.getStatus": [{
76744
77115
  name: "deviceId",
76745
77116
  form: "single",
@@ -134146,7 +134517,7 @@ var DreameChildDevice = class extends BaseDevice$1 {
134146
134517
  this.dreameDeviceId = persisted.dreameDeviceId;
134147
134518
  this.brokerId = persisted.brokerId;
134148
134519
  this.model = persisted.model;
134149
- this.online = true;
134520
+ this.online = dreameFacades.getDevice(this.brokerId, this.dreameDeviceId) !== null;
134150
134521
  this.updateSourceInfo({
134151
134522
  id: this.dreameDeviceId,
134152
134523
  system: "dreame"
@@ -183793,7 +184164,28 @@ var DreameContainerDevice = class extends BaseDevice$1 {
183793
184164
  system: "dreame"
183794
184165
  });
183795
184166
  }
184167
+ /**
184168
+ * The child list is known only while the cloud device is REACHABLE: every
184169
+ * presence-filtered child is derived from the live handle. Without it (no
184170
+ * credentials, cloud down, before the first connect) the answer is UNKNOWN —
184171
+ * the kernel then deletes nothing (D49; it deleted 97 accessories when this
184172
+ * answered only the core child) — and only the core child is named to spawn.
184173
+ */
183796
184174
  getAccessoryChildren() {
184175
+ const specs = this.buildChildSpecs();
184176
+ if (dreameFacades.getDevice(this.brokerId, this.dreameDeviceId) === null) {
184177
+ this.ctx.logger.info("DreameContainerDevice: cloud device not reachable; child list unknown", {
184178
+ tags: { deviceId: this.id },
184179
+ meta: {
184180
+ dreameDeviceId: this.dreameDeviceId,
184181
+ integrationId: this.brokerId
184182
+ }
184183
+ });
184184
+ return accessoryChildrenUnknown("dreame cloud device not reachable", specs.slice(0, 1));
184185
+ }
184186
+ return accessoryChildrenComplete(specs);
184187
+ }
184188
+ buildChildSpecs() {
183797
184189
  const kind = classifyDreameModel(this.model);
183798
184190
  if (kind === "unsupported") {
183799
184191
  this.ctx.logger.warn("DreameContainerDevice: unsupported model; no children", {