@camstack/addon-provider-homematic 1.2.180 → 1.2.181

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.
package/dist/addon.js CHANGED
@@ -794,7 +794,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
794
794
  return EventCategory;
795
795
  }({});
796
796
  //#endregion
797
- //#region ../types/dist/device-type-BOWLtoOt.mjs
797
+ //#region ../types/dist/device-type-CfHw_quR.mjs
798
798
  /**
799
799
  import { errMsg } from '@camstack/types'
800
800
  * Extract a human-readable message from an unknown error value.
@@ -983,6 +983,9 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
983
983
  DeviceFeature["CoverPositionable"] = "cover-positionable";
984
984
  /** Cover exposes slat-tilt control. Gates the tilt slider UI. */
985
985
  DeviceFeature["CoverTilt"] = "cover-tilt";
986
+ /** Cover has a real stop: `stop` halts the travel in place. Gates the stop
987
+ * control in exporters; a provider whose `stop` is a no-op never declares it. */
988
+ DeviceFeature["CoverStoppable"] = "cover-stoppable";
986
989
  /** Valve exposes intermediate position control (0..100). Gates the
987
990
  * position slider / drag surface UI. */
988
991
  DeviceFeature["ValvePositionable"] = "valve-positionable";
@@ -5848,7 +5851,7 @@ var ZodIssueCode = {
5848
5851
  var ZodFirstPartyTypeKind;
5849
5852
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5850
5853
  //#endregion
5851
- //#region ../types/dist/sleep-B-vp7x15.mjs
5854
+ //#region ../types/dist/sleep-QsoHs66J.mjs
5852
5855
  /**
5853
5856
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5854
5857
  * window to float samples (D455).
@@ -5965,7 +5968,7 @@ function isKeychainStoredField(field) {
5965
5968
  var SECRET_CLEAR = { $secretClear: true };
5966
5969
  /** The `'***'` token D634 redaction writes for non-admins. */
5967
5970
  var LEGACY_DEVICE_REDACTION = "***";
5968
- function isRecord$6(value) {
5971
+ function isRecord$7(value) {
5969
5972
  return typeof value === "object" && value !== null && !Array.isArray(value);
5970
5973
  }
5971
5974
  function makeSecretMarker(ref) {
@@ -5976,12 +5979,12 @@ function makeSecretMarker(ref) {
5976
5979
  }
5977
5980
  /** A stored marker: an object whose `$secret` is a non-empty string. */
5978
5981
  function isSecretMarker(value) {
5979
- if (!isRecord$6(value)) return false;
5982
+ if (!isRecord$7(value)) return false;
5980
5983
  const ref = value["$secret"];
5981
5984
  return typeof ref === "string" && ref.length > 0;
5982
5985
  }
5983
5986
  function isSecretClear(value) {
5984
- return isRecord$6(value) && value["$secretClear"] === true;
5987
+ return isRecord$7(value) && value["$secretClear"] === true;
5985
5988
  }
5986
5989
  /**
5987
5990
  * The UI view of a stored secret field value: a marker becomes "set", inline
@@ -6687,7 +6690,7 @@ var KeychainWriteRefusedError = class extends Error {
6687
6690
  }
6688
6691
  };
6689
6692
  var KEEP = { kind: "keep" };
6690
- function isRecord$5(value) {
6693
+ function isRecord$6(value) {
6691
6694
  return typeof value === "object" && value !== null && !Array.isArray(value);
6692
6695
  }
6693
6696
  function defaultMintId() {
@@ -6700,7 +6703,7 @@ function collectSecretMarkerRefs(value, out = []) {
6700
6703
  return out;
6701
6704
  }
6702
6705
  if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
6703
- else if (isRecord$5(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
6706
+ else if (isRecord$6(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
6704
6707
  return out;
6705
6708
  }
6706
6709
  async function storedValueEquals(secrets, marker, candidate) {
@@ -6755,7 +6758,7 @@ function rowId(row, idKey) {
6755
6758
  return null;
6756
6759
  }
6757
6760
  async function writeArray(ctx, node, incoming, stored, fieldPath) {
6758
- const storedRows = Array.isArray(stored) ? stored.filter(isRecord$5) : [];
6761
+ const storedRows = Array.isArray(stored) ? stored.filter(isRecord$6) : [];
6759
6762
  if (!Array.isArray(incoming)) {
6760
6763
  ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
6761
6764
  return {
@@ -6771,7 +6774,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
6771
6774
  const kept = /* @__PURE__ */ new Set();
6772
6775
  const rows = [];
6773
6776
  for (const row of incoming) {
6774
- if (!isRecord$5(row)) {
6777
+ if (!isRecord$6(row)) {
6775
6778
  rows.push(row);
6776
6779
  continue;
6777
6780
  }
@@ -6796,7 +6799,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
6796
6799
  case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
6797
6800
  case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
6798
6801
  case "object": {
6799
- if (!isRecord$5(incoming)) {
6802
+ if (!isRecord$6(incoming)) {
6800
6803
  if (incoming === void 0) return KEEP;
6801
6804
  ctx.deletes.push(...collectSecretMarkerRefs(stored));
6802
6805
  return {
@@ -6804,7 +6807,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
6804
6807
  value: incoming
6805
6808
  };
6806
6809
  }
6807
- const storedObj = isRecord$5(stored) ? stored : {};
6810
+ const storedObj = isRecord$6(stored) ? stored : {};
6808
6811
  return {
6809
6812
  kind: "value",
6810
6813
  value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
@@ -6927,7 +6930,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
6927
6930
  value: items
6928
6931
  };
6929
6932
  }
6930
- if (isRecord$5(v)) {
6933
+ if (isRecord$6(v)) {
6931
6934
  const out = {};
6932
6935
  for (const [k, child] of Object.entries(v)) {
6933
6936
  const s = substitute(child);
@@ -6959,7 +6962,7 @@ var SecretOverwriteRefusedError = class extends Error {
6959
6962
  this.name = "SecretOverwriteRefusedError";
6960
6963
  }
6961
6964
  };
6962
- function isRecord$4(value) {
6965
+ function isRecord$5(value) {
6963
6966
  return typeof value === "object" && value !== null && !Array.isArray(value);
6964
6967
  }
6965
6968
  function resolvedValue(pass, marker) {
@@ -6988,7 +6991,7 @@ function inArray(pass, incoming, stored) {
6988
6991
  return incoming.map((item, index) => {
6989
6992
  const twin = stored[index];
6990
6993
  if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
6991
- if (isRecord$4(item) && isRecord$4(twin)) return inArrayRow(pass, item, twin);
6994
+ if (isRecord$5(item) && isRecord$5(twin)) return inArrayRow(pass, item, twin);
6992
6995
  if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
6993
6996
  return item;
6994
6997
  });
@@ -6999,7 +7002,7 @@ function inArrayRow(pass, incoming, stored) {
6999
7002
  const twin = stored[key];
7000
7003
  if (isSecretMarker(twin)) {
7001
7004
  if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
7002
- } else if (isRecord$4(value) && isRecord$4(twin)) out[key] = inArrayRow(pass, value, twin);
7005
+ } else if (isRecord$5(value) && isRecord$5(twin)) out[key] = inArrayRow(pass, value, twin);
7003
7006
  else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
7004
7007
  }
7005
7008
  return out;
@@ -7007,7 +7010,7 @@ function inArrayRow(pass, incoming, stored) {
7007
7010
  async function walk(pass, incoming, stored) {
7008
7011
  if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
7009
7012
  if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
7010
- if (!isRecord$4(incoming) || !isRecord$4(stored)) return incoming;
7013
+ if (!isRecord$5(incoming) || !isRecord$5(stored)) return incoming;
7011
7014
  const out = { ...incoming };
7012
7015
  for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
7013
7016
  return out;
@@ -7038,7 +7041,7 @@ async function restoreUnchangedSecrets(input) {
7038
7041
  function isJsonEqual(a, b) {
7039
7042
  if (Object.is(a, b)) return true;
7040
7043
  if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
7041
- if (isRecord$4(a) && isRecord$4(b)) {
7044
+ if (isRecord$5(a) && isRecord$5(b)) {
7042
7045
  const keys = Object.keys(a);
7043
7046
  if (keys.length !== Object.keys(b).length) return false;
7044
7047
  return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
@@ -7062,7 +7065,7 @@ function markerKeysOf(blob, owner) {
7062
7065
  }
7063
7066
  function nodeFromStored(value, owner) {
7064
7067
  if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
7065
- if (!isRecord$4(value)) return null;
7068
+ if (!isRecord$5(value)) return null;
7066
7069
  const children = /* @__PURE__ */ new Map();
7067
7070
  for (const [key, child] of Object.entries(value)) {
7068
7071
  const node = nodeFromStored(child, owner);
@@ -7681,6 +7684,44 @@ var BaseAddon = class {
7681
7684
  return null;
7682
7685
  }
7683
7686
  /**
7687
+ * D986 scoped settings: the form shape of the CLUSTER-wide settings one capability this addon
7688
+ * provides owns, or `null` when it has none. `cap` is a capability name the addon's manifest
7689
+ * declares. Stored as `addon-settings` rows `<addonId>.<field>`. The keys of this schema, of
7690
+ * {@link nodeSettingsSchema} and of {@link deviceDefaultsSchema} are disjoint, and a key never
7691
+ * contains `@` (guard `check-scoped-settings-declared`). SHAPE only: values are read by scope.
7692
+ */
7693
+ async clusterSettingsSchema(_cap) {
7694
+ return null;
7695
+ }
7696
+ /**
7697
+ * D986: the form shape of the settings one capability owns PER NODE, or `null`. Stored as
7698
+ * `addon-settings` rows `<addonId>.<field>@<nodeId>` carrying `nodeId` in the row data, so a
7699
+ * forgotten node's rows go in one central delete.
7700
+ */
7701
+ async nodeSettingsSchema(_cap) {
7702
+ return null;
7703
+ }
7704
+ /**
7705
+ * D986: the form shape of the FLEET DEFAULTS of the per-device settings one capability owns,
7706
+ * or `null`. Stored as `addon-settings` rows `<addonId>.<field>`; a device resolves its value
7707
+ * as device row, then this default, then the schema default (`resolveDeviceSettings`).
7708
+ */
7709
+ async deviceDefaultsSchema(_cap) {
7710
+ return null;
7711
+ }
7712
+ /**
7713
+ * The host's read of the scoped declarations: the schema one capability declares for `scope`,
7714
+ * or `null`. Beside {@link getIntegrationFormSchema}, the same shape: the hook is protected, the
7715
+ * host asks this method.
7716
+ */
7717
+ async getScopedSettingsSchema(scope, cap) {
7718
+ switch (scope) {
7719
+ case "cluster": return this.clusterSettingsSchema(cap);
7720
+ case "node": return this.nodeSettingsSchema(cap);
7721
+ case "device-defaults": return this.deviceDefaultsSchema(cap);
7722
+ }
7723
+ }
7724
+ /**
7684
7725
  * What the create wizard and the integration edit page render for one instance: the addon's
7685
7726
  * per-instance schema when it declares one, else its global schema (what they always showed).
7686
7727
  */
@@ -8474,6 +8515,21 @@ function normalizeAddonInitResult(result) {
8474
8515
  if (Array.isArray(result)) return { providers: result };
8475
8516
  return result;
8476
8517
  }
8518
+ /** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
8519
+ /** The files a kind may live in. `history` is device-history's (D850), never records. */
8520
+ var RECORD_DATABASES = ["settings", "events"];
8521
+ /** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
8522
+ var RECORD_CLASSES = [
8523
+ "config",
8524
+ "ledger",
8525
+ "audit",
8526
+ "mirror",
8527
+ "ephemeral"
8528
+ ];
8529
+ var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
8530
+ var RECORD_MAX_DATA_BYTES = 1024 * 1024;
8531
+ var RECORD_BATCH_MAX = 1e3;
8532
+ var RECORD_QUERY_MAX = 1e3;
8477
8533
  /**
8478
8534
  * The share-view scope kinds a share-link token can carry. The hub mints
8479
8535
  * and validates them (`ShareViewGrantSchema` builds its
@@ -8498,21 +8554,6 @@ var PeerBytesTicketSchema = object({
8498
8554
  */
8499
8555
  declaredBytes: number().int().nonnegative().nullable()
8500
8556
  });
8501
- /** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
8502
- /** The files a kind may live in. `history` is device-history's (D850), never records. */
8503
- var RECORD_DATABASES = ["settings", "events"];
8504
- /** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
8505
- var RECORD_CLASSES = [
8506
- "config",
8507
- "ledger",
8508
- "audit",
8509
- "mirror",
8510
- "ephemeral"
8511
- ];
8512
- var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
8513
- var RECORD_MAX_DATA_BYTES = 1024 * 1024;
8514
- var RECORD_BATCH_MAX = 1e3;
8515
- var RECORD_QUERY_MAX = 1e3;
8516
8557
  function defOf(schema) {
8517
8558
  const zodBag = Reflect.get(schema, "_zod");
8518
8559
  if (typeof zodBag !== "object" || zodBag === null) return {};
@@ -9404,6 +9445,7 @@ var CAP_NAMES = Object.freeze([
9404
9445
  "humidity-sensor",
9405
9446
  "image",
9406
9447
  "image-settings",
9448
+ "integration-instances",
9407
9449
  "integrations",
9408
9450
  "intercom",
9409
9451
  "ir-transmitter",
@@ -11337,7 +11379,7 @@ object({
11337
11379
  params: record(string(), union([string(), number()])).optional()
11338
11380
  });
11339
11381
  //#endregion
11340
- //#region ../types/dist/composition-kKKOdFIG.mjs
11382
+ //#region ../types/dist/composition-Dh3RfMx5.mjs
11341
11383
  /**
11342
11384
  * The ffmpeg build every CamStack node downloads, per platform and arch.
11343
11385
  *
@@ -15593,8 +15635,18 @@ var LogChannelDescriptorSchema = object({
15593
15635
  * the operator narrows to one camera, sees nothing, and concludes the code
15594
15636
  * path was never taken.
15595
15637
  */
15596
- perDevice: boolean()
15597
- });
15638
+ perDevice: boolean(),
15639
+ /**
15640
+ * What the channel is FOR, so the UI can list the channels an addon offers.
15641
+ *
15642
+ * - `diagnostic` (the default): a per-component diagnostic armed from the
15643
+ * Levels page, emitted at its declared level.
15644
+ * - `debug`: a `debug.<channel>` dump watched live for a short window
15645
+ * (`ctx.debug`). Always per-device, and its lines are denied by the log
15646
+ * ring unless somebody is watching that device.
15647
+ */
15648
+ kind: _enum(["diagnostic", "debug"]).default("diagnostic")
15649
+ }).refine((d) => d.kind !== "debug" || d.name.startsWith("debug.") && d.perDevice, { message: "a debug channel is named debug.<channel> and is per-device" });
15598
15650
  /**
15599
15651
  * An armed window over one channel, as the document hands it to a mirror.
15600
15652
  *
@@ -20810,6 +20862,7 @@ var SYSTEM_CAP_VOCABULARY = {
20810
20862
  "load-contribution": system(INTERNAL),
20811
20863
  "local-network": system(NETWORK),
20812
20864
  "log-channels": system(INTERNAL),
20865
+ "integration-instances": system(INTERNAL),
20813
20866
  "log-destination": system(INTERNAL),
20814
20867
  "login-method": system(IDENTITY),
20815
20868
  "mesh-network": system(NETWORK),
@@ -43095,7 +43148,7 @@ var TargetKindCapsSchema = object({
43095
43148
  * the union is large and not meant for runtime validation here; the exported
43096
43149
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
43097
43150
  */
43098
- var ConfigSchemaPassthrough$3 = unknown();
43151
+ var ConfigSchemaPassthrough$4 = unknown();
43099
43152
  var TargetKindSchema = object({
43100
43153
  kind: string(),
43101
43154
  label: string(),
@@ -43132,7 +43185,7 @@ var TargetKindSchema = object({
43132
43185
  * its raster path, which is the safe default for an unknown image.
43133
43186
  */
43134
43187
  iconMediaType: string().optional(),
43135
- configSchema: ConfigSchemaPassthrough$3,
43188
+ configSchema: ConfigSchemaPassthrough$4,
43136
43189
  /**
43137
43190
  * The config keys that decide WHERE this kind's secrets are sent (server,
43138
43191
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -50759,6 +50812,45 @@ var deviceProviderCapability = {
50759
50812
  }
50760
50813
  };
50761
50814
  /**
50815
+ * What the passive listener of `local-network` saw on the wire, before any
50816
+ * provider classified it. Device-manager turns an observation into the hits
50817
+ * of the providers whose declared discovery modes it matches.
50818
+ */
50819
+ var DiscoveryObservationSchema = discriminatedUnion("kind", [object({
50820
+ kind: literal("mdns"),
50821
+ /** Normalised DNS-SD service type, e.g. `_esphomelib._tcp`. */
50822
+ serviceType: string(),
50823
+ instance: string(),
50824
+ host: string(),
50825
+ /** The A record address when the announcement carried one. */
50826
+ address: string().nullable(),
50827
+ port: number().int(),
50828
+ txt: record(string(), string())
50829
+ }), object({
50830
+ kind: literal("ssdp"),
50831
+ /** Sender address of the datagram. */
50832
+ host: string(),
50833
+ port: number().int(),
50834
+ /** `NT` of a NOTIFY, `ST` of a search response. */
50835
+ target: string(),
50836
+ headers: record(string(), string())
50837
+ })]);
50838
+ object({
50839
+ addonId: string(),
50840
+ candidate: DiscoveryCandidateSchema,
50841
+ firstSeenAt: number(),
50842
+ lastSeenAt: number(),
50843
+ dismissed: boolean()
50844
+ });
50845
+ var DiscoveryProposalSchema = object({
50846
+ id: string(),
50847
+ addonId: string(),
50848
+ candidate: DiscoveryCandidateSchema,
50849
+ firstSeenAt: number(),
50850
+ lastSeenAt: number(),
50851
+ dismissed: boolean()
50852
+ });
50853
+ /**
50762
50854
  * Device Manager capability — hub-side singleton that unifies device persistence,
50763
50855
  * live registry access, and all management operations into a single tRPC surface.
50764
50856
  *
@@ -51487,6 +51579,19 @@ method(object({
51487
51579
  }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
51488
51580
  kind: "mutation",
51489
51581
  auth: "admin"
51582
+ }), method(object({}), object({ proposals: array(DiscoveryProposalSchema).readonly() }), { auth: "admin" }), method(object({ id: string() }), object({ dismissed: boolean() }), {
51583
+ kind: "mutation",
51584
+ auth: "admin"
51585
+ }), method(object({ observations: array(DiscoveryObservationSchema).max(512) }), object({ proposed: number().int() }), {
51586
+ kind: "mutation",
51587
+ auth: "admin"
51588
+ }), method(object({}), object({
51589
+ providers: number().int(),
51590
+ proposed: number().int()
51591
+ }), {
51592
+ kind: "mutation",
51593
+ auth: "admin",
51594
+ timeoutMs: 12e4
51490
51595
  }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
51491
51596
  deviceId: number(),
51492
51597
  key: string(),
@@ -54831,6 +54936,78 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
54831
54936
  auth: "admin"
54832
54937
  });
54833
54938
  /**
54939
+ * `integration-instances` - the connection of an addon that holds ONE or SEVERAL
54940
+ * (an account, a relay, a destination) as typed records (D985, D986). The addon's
54941
+ * own function page reads and writes them (Logging for Loki); the Integrations
54942
+ * page lists only the integrations that bring devices (D996).
54943
+ *
54944
+ * A collection of providers: each addon that holds connections registers one and a
54945
+ * caller reaches a provider with the pinned `addonId`.
54946
+ *
54947
+ * Identity: the instance id is immutable and opaque to the caller. A record the
54948
+ * Loki migration made keeps the `integrations` registry id it was created under
54949
+ * (`int_NNNN`); a single instance made by its function page takes the addon id.
54950
+ * `name` is the editable label.
54951
+ *
54952
+ * Secrets: every field the instance kind marks `.meta({ secret: true })` reaches
54953
+ * the form as a `SecretFieldView`, never text (D789). A patch value omitted, `''`
54954
+ * or the redaction token KEEPS the stored secret; `{ $secretClear: true }`
54955
+ * clears it.
54956
+ */
54957
+ var ConfigSchemaPassthrough$3 = custom();
54958
+ var IntegrationInstanceIdSchema = string().min(1);
54959
+ var IntegrationInstanceDescriptionSchema = object({
54960
+ /** `single`: at most one instance can exist (Loki). `multiple`: an account each. */
54961
+ instanceMode: _enum(["single", "multiple"]),
54962
+ /** What the instance is, for the UI (`destination`, `relay`, `account`). */
54963
+ kind: string(),
54964
+ /** True when `testInstance` really probes the remote. */
54965
+ canTest: boolean()
54966
+ });
54967
+ var IntegrationInstanceStatusSchema = object({
54968
+ state: _enum([
54969
+ "ok",
54970
+ "off",
54971
+ "error",
54972
+ "unknown"
54973
+ ]),
54974
+ detail: string().optional()
54975
+ });
54976
+ var IntegrationInstanceSchema = object({
54977
+ id: IntegrationInstanceIdSchema,
54978
+ name: string(),
54979
+ /** The addon's own rule (an URL is present, a client id is present...). */
54980
+ configured: boolean(),
54981
+ /** Values for the instance form; a secret is a `SecretFieldView`, never text. */
54982
+ formValues: record(string(), unknown()),
54983
+ status: IntegrationInstanceStatusSchema.optional()
54984
+ });
54985
+ var IntegrationInstancePatchSchema = object({
54986
+ id: IntegrationInstanceIdSchema,
54987
+ name: string().min(1).optional(),
54988
+ /** Omitted / '' / redaction token keeps a secret; `{ $secretClear: true }` clears it. */
54989
+ values: record(string(), unknown())
54990
+ });
54991
+ method(_void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }), method(object({ id: IntegrationInstanceIdSchema.nullable() }), ConfigSchemaPassthrough$3, { auth: "admin" }), method(_void(), array(IntegrationInstanceSchema).readonly(), { auth: "admin" }), method(object({ id: IntegrationInstanceIdSchema }), IntegrationInstanceSchema.nullable(), { auth: "admin" }), method(object({
54992
+ id: IntegrationInstanceIdSchema,
54993
+ name: string().min(1)
54994
+ }), object({ id: string() }), {
54995
+ kind: "mutation",
54996
+ auth: "admin"
54997
+ }), method(IntegrationInstancePatchSchema, object({ ok: literal(true) }), {
54998
+ kind: "mutation",
54999
+ auth: "admin"
55000
+ }), method(object({ id: IntegrationInstanceIdSchema }), object({ ok: literal(true) }), {
55001
+ kind: "mutation",
55002
+ auth: "admin"
55003
+ }), optionalMethod(object({
55004
+ id: IntegrationInstanceIdSchema.nullable(),
55005
+ values: record(string(), unknown())
55006
+ }), TestConnectionResultSchema$1, {
55007
+ kind: "mutation",
55008
+ auth: "admin"
55009
+ });
55010
+ /**
54834
55011
  * Two-way audio / talk-back cap. Clients open a WebRTC audio-only
54835
55012
  * session (server-initiated offer pattern, identical to the main
54836
55013
  * video WebRTC flow) and the browser captures the mic; the server
@@ -65598,7 +65775,14 @@ var NcMediaPolicySchema = object({
65598
65775
  */
65599
65776
  profile: CamProfileSchema.optional(),
65600
65777
  /** See {@link NcLinkedCameraModeSchema}. */
65601
- linkedCameras: NcLinkedCameraModeSchema.optional()
65778
+ linkedCameras: NcLinkedCameraModeSchema.optional(),
65779
+ /**
65780
+ * Sensor rules only: may this rule wake a SLEEPING battery camera to take
65781
+ * the linked still it attaches (D998)? Absent means yes, an explicit `false`
65782
+ * opts out. Deliberately not a Zod default: a rule that never chose keeps
65783
+ * following the hub's. One bounded wake per event; nothing is attached later.
65784
+ */
65785
+ wakeSleepingCamera: boolean().optional()
65602
65786
  });
65603
65787
  /**
65604
65788
  * Cooldown GRANULARITY over the subject's class — how much a fired
@@ -74155,7 +74339,16 @@ var smokeCapability = {
74155
74339
  * future fields without breaking the existing call sites.
74156
74340
  */
74157
74341
  var EmailAddressSchema = email();
74342
+ /**
74343
+ * Which relay of a multi-relay provider answers (D996). Absent = the provider's first / default
74344
+ * relay, so a caller written before relays existed keeps working unchanged. A provider with one
74345
+ * fixed relay ignores it. This is the integration instance id (`int_NNNN`), NOT the addon id: the
74346
+ * collection pin `addonId` still picks the provider, `instanceId` picks the relay inside it.
74347
+ */
74348
+ var InstanceIdSchema = string().min(1).optional();
74349
+ var RelayPinSchema = object({ instanceId: InstanceIdSchema });
74158
74350
  var SendEmailInputSchema = object({
74351
+ instanceId: InstanceIdSchema,
74159
74352
  to: union([EmailAddressSchema, array(EmailAddressSchema).min(1)]),
74160
74353
  cc: array(EmailAddressSchema).optional(),
74161
74354
  bcc: array(EmailAddressSchema).optional(),
@@ -74191,11 +74384,11 @@ method(SendEmailInputSchema, SendEmailResultSchema, {
74191
74384
  kind: "mutation",
74192
74385
  auth: "admin",
74193
74386
  access: "create"
74194
- }), method(_void(), SmtpStatusSchema, {
74387
+ }), method(RelayPinSchema, SmtpStatusSchema, {
74195
74388
  kind: "mutation",
74196
74389
  auth: "admin",
74197
74390
  access: "view"
74198
- }), method(_void(), SmtpStatusSchema, { auth: "admin" });
74391
+ }), method(RelayPinSchema, SmtpStatusSchema, { auth: "admin" });
74199
74392
  /**
74200
74393
  * A single device snapshot returned as base64 JPEG/PNG.
74201
74394
  *
@@ -74227,10 +74420,12 @@ DeviceType.Camera, method(object({
74227
74420
  * even when the cache is well within the device's
74228
74421
  * `snapshotMaxAgeS` window.
74229
74422
  *
74230
- * **`force` is an OPERATOR signal, not a freshness preference.** On a
74423
+ * **`force` is a demand with a named principal, not a freshness
74424
+ * preference** — an operator button, the scheduled refresh (D847), or a
74425
+ * notification rule that left the camera's wake allowed (D998). On a
74231
74426
  * battery camera it is the one thing that walks past the wrapper's
74232
- * sleep gate and wakes the camera, so a background caller — a poller,
74233
- * an event handler, a thumbnail — must NEVER set it. Every such caller
74427
+ * sleep gate and wakes the camera, so a poller, a thumbnail or a
74428
+ * prestream must NEVER set it. Every such caller
74234
74429
  * gets the cached frame, which on a sleeping battery camera is the
74235
74430
  * correct answer: stale but honest beats woken.
74236
74431
  */
@@ -75800,6 +75995,40 @@ var LoggingSettingsStateSchema = object({
75800
75995
  opsLogRetentionDays: number().int().min(0),
75801
75996
  persisted: boolean()
75802
75997
  });
75998
+ /**
75999
+ * Debug WATCH — a short, per-device window over `debug.<channel>` lines.
76000
+ *
76001
+ * `start` opens (or re-arms) a 10 minute window; `rearm` extends a LIVE one
76002
+ * and never revives a lapsed one; `stop` closes it; `list` only reads. No
76003
+ * chain of re-arms outlives 60 minutes from the first start. The hub holds the
76004
+ * watches in memory and pushes the interest to every node, so a watch lapses
76005
+ * by itself and survives nothing — a restart is a stop.
76006
+ */
76007
+ var DebugWatchInputSchema = object({
76008
+ action: _enum([
76009
+ "list",
76010
+ "start",
76011
+ "rearm",
76012
+ "stop"
76013
+ ]),
76014
+ /** Full channel names, `debug.<channel>`, each declared with `kind: 'debug'`. */
76015
+ channels: array(string().min(1)).readonly().default([]),
76016
+ /** Numeric device ids. Required (non-empty) for `start`. */
76017
+ deviceIds: array(number().int()).readonly().default([])
76018
+ });
76019
+ var DebugWatchStateSchema = object({
76020
+ channel: string(),
76021
+ deviceIds: array(number().int()).readonly(),
76022
+ startedAtMs: number(),
76023
+ untilMs: number(),
76024
+ capAtMs: number()
76025
+ });
76026
+ var DebugWatchResultSchema = object({
76027
+ nowMs: number(),
76028
+ watches: array(DebugWatchStateSchema).readonly(),
76029
+ /** Channels a `rearm` found already lapsed: nothing was revived. */
76030
+ lapsed: array(string()).readonly()
76031
+ });
75803
76032
  method(_void(), SystemInfoSchema), method(_void(), HealthStatusSchema), method(_void(), FeatureManifestSchema), method(_void(), array(NetworkAddressSchema).readonly()), method(_void(), unknown().nullable(), { auth: "admin" }), method(record(string(), unknown()), _null(), {
75804
76033
  kind: "mutation",
75805
76034
  auth: "admin"
@@ -75815,6 +76044,9 @@ method(_void(), SystemInfoSchema), method(_void(), HealthStatusSchema), method(_
75815
76044
  }), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(_void(), array(ReportedLoadContributionSchema).readonly(), { auth: "admin" }), method(_void(), array(ReportedFailureContributionSchema).readonly(), { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
75816
76045
  kind: "mutation",
75817
76046
  auth: "admin"
76047
+ }), method(DebugWatchInputSchema, DebugWatchResultSchema, {
76048
+ kind: "mutation",
76049
+ auth: "admin"
75818
76050
  });
75819
76051
  /**
75820
76052
  * Tamper / case-open detection sensor. Drives Home Assistant
@@ -78972,7 +79204,7 @@ discriminatedUnion("kind", [object({
78972
79204
  kind: literal("pronto"),
78973
79205
  code: string()
78974
79206
  })]);
78975
- DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
79207
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverStoppable, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
78976
79208
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
78977
79209
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
78978
79210
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
@@ -82853,6 +83085,13 @@ Object.freeze({
82853
83085
  access: "view",
82854
83086
  role: "admin"
82855
83087
  },
83088
+ "deviceManager.dismissDiscoveryProposal": {
83089
+ capName: "device-manager",
83090
+ capScope: "system",
83091
+ addonId: null,
83092
+ access: "create",
83093
+ role: "admin"
83094
+ },
82856
83095
  "deviceManager.enable": {
82857
83096
  capName: "device-manager",
82858
83097
  capScope: "system",
@@ -83035,6 +83274,13 @@ Object.freeze({
83035
83274
  access: "view",
83036
83275
  role: "viewer"
83037
83276
  },
83277
+ "deviceManager.listDiscoveryProposals": {
83278
+ capName: "device-manager",
83279
+ capScope: "system",
83280
+ addonId: null,
83281
+ access: "view",
83282
+ role: "admin"
83283
+ },
83038
83284
  "deviceManager.listLocationDescriptions": {
83039
83285
  capName: "device-manager",
83040
83286
  capScope: "system",
@@ -83189,6 +83435,13 @@ Object.freeze({
83189
83435
  access: "create",
83190
83436
  role: "admin"
83191
83437
  },
83438
+ "deviceManager.reportDiscoveryObservations": {
83439
+ capName: "device-manager",
83440
+ capScope: "system",
83441
+ addonId: null,
83442
+ access: "create",
83443
+ role: "admin"
83444
+ },
83192
83445
  "deviceManager.runDeviceAction": {
83193
83446
  capName: "device-manager",
83194
83447
  capScope: "system",
@@ -83196,6 +83449,13 @@ Object.freeze({
83196
83449
  access: "create",
83197
83450
  role: "admin"
83198
83451
  },
83452
+ "deviceManager.runDiscoverySweep": {
83453
+ capName: "device-manager",
83454
+ capScope: "system",
83455
+ addonId: null,
83456
+ access: "create",
83457
+ role: "admin"
83458
+ },
83199
83459
  "deviceManager.setChildLayout": {
83200
83460
  capName: "device-manager",
83201
83461
  capScope: "system",
@@ -84127,6 +84387,62 @@ Object.freeze({
84127
84387
  access: "create",
84128
84388
  role: "admin"
84129
84389
  },
84390
+ "integrationInstances.createInstance": {
84391
+ capName: "integration-instances",
84392
+ capScope: "system",
84393
+ addonId: null,
84394
+ access: "create",
84395
+ role: "admin"
84396
+ },
84397
+ "integrationInstances.deleteInstance": {
84398
+ capName: "integration-instances",
84399
+ capScope: "system",
84400
+ addonId: null,
84401
+ access: "delete",
84402
+ role: "admin"
84403
+ },
84404
+ "integrationInstances.describe": {
84405
+ capName: "integration-instances",
84406
+ capScope: "system",
84407
+ addonId: null,
84408
+ access: "view",
84409
+ role: "admin"
84410
+ },
84411
+ "integrationInstances.getInstance": {
84412
+ capName: "integration-instances",
84413
+ capScope: "system",
84414
+ addonId: null,
84415
+ access: "view",
84416
+ role: "admin"
84417
+ },
84418
+ "integrationInstances.instanceFormSchema": {
84419
+ capName: "integration-instances",
84420
+ capScope: "system",
84421
+ addonId: null,
84422
+ access: "view",
84423
+ role: "admin"
84424
+ },
84425
+ "integrationInstances.listInstances": {
84426
+ capName: "integration-instances",
84427
+ capScope: "system",
84428
+ addonId: null,
84429
+ access: "view",
84430
+ role: "admin"
84431
+ },
84432
+ "integrationInstances.testInstance": {
84433
+ capName: "integration-instances",
84434
+ capScope: "system",
84435
+ addonId: null,
84436
+ access: "create",
84437
+ role: "admin"
84438
+ },
84439
+ "integrationInstances.updateInstance": {
84440
+ capName: "integration-instances",
84441
+ capScope: "system",
84442
+ addonId: null,
84443
+ access: "create",
84444
+ role: "admin"
84445
+ },
84130
84446
  "integrations.create": {
84131
84447
  capName: "integrations",
84132
84448
  capScope: "system",
@@ -89783,6 +90099,13 @@ Object.freeze({
89783
90099
  access: "create",
89784
90100
  role: "viewer"
89785
90101
  },
90102
+ "system.debugWatch": {
90103
+ capName: "system",
90104
+ capScope: "system",
90105
+ addonId: null,
90106
+ access: "create",
90107
+ role: "admin"
90108
+ },
89786
90109
  "system.detectSiteLocation": {
89787
90110
  capName: "system",
89788
90111
  capScope: "system",
@@ -93701,6 +94024,11 @@ Object.freeze({
93701
94024
  form: "single",
93702
94025
  optional: false
93703
94026
  }],
94027
+ "system.debugWatch": [{
94028
+ name: "deviceIds",
94029
+ form: "array",
94030
+ optional: true
94031
+ }],
93704
94032
  "tamper.getStatus": [{
93705
94033
  name: "deviceId",
93706
94034
  form: "single",
@@ -121058,6 +121386,8 @@ var hmActuatorSchema = hmChildSchema.extend({
121058
121386
  * existing pure decoders (`decodeCover` / `decodeLock` / `decodeClimate`).
121059
121387
  */
121060
121388
  var HmActuatorDevice = class extends HmChildDevice {
121389
+ /** A cover's `stop` drives the channel's real STOP (`coverStop`). */
121390
+ features = this.config.values.kind === "cover" ? [DeviceFeature.CoverStoppable] : [];
121061
121391
  kind;
121062
121392
  /** The actuator cap name actually registered (drives decode routing). */
121063
121393
  registeredCap = null;