@camstack/types 1.2.533 → 1.2.535

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 (56) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/addon/base-addon.d.ts +1 -20
  3. package/dist/addon/notification-targets.d.ts +34 -9
  4. package/dist/addon.js +2 -2
  5. package/dist/addon.mjs +2 -2
  6. package/dist/capabilities/addon-settings.cap.d.ts +0 -41
  7. package/dist/capabilities/capability-definition.d.ts +26 -2
  8. package/dist/capabilities/heat-pump-control.cap.d.ts +83 -0
  9. package/dist/capabilities/heat-pump-status.cap.d.ts +517 -0
  10. package/dist/capabilities/hero-layout.cap.d.ts +46 -0
  11. package/dist/capabilities/index.d.ts +5 -1
  12. package/dist/capabilities/integration-instances.cap.d.ts +22 -7
  13. package/dist/capabilities/integrations.cap.d.ts +13 -0
  14. package/dist/capabilities/smtp-provider.cap.d.ts +2 -10
  15. package/dist/client.js +24 -7
  16. package/dist/client.mjs +24 -7
  17. package/dist/{composition-BjHGoicU.js → composition-BxalDSTt.js} +1 -1
  18. package/dist/{composition-CXCX78IR.mjs → composition-C6TZGqUb.mjs} +1 -1
  19. package/dist/device/cap-vocabulary/entries/heat-pump.d.ts +4 -0
  20. package/dist/device/device-type.d.ts +5 -1
  21. package/dist/device/hero/build-hero-model.d.ts +2 -0
  22. package/dist/device/hero/climate-view.d.ts +4 -0
  23. package/dist/device/hero/hero-contributions-heat-pump.d.ts +2 -0
  24. package/dist/device/hero/hero-fragment.d.ts +4 -0
  25. package/dist/device/hero/hero-layout.d.ts +1 -0
  26. package/dist/device/hero/hero-look.d.ts +6 -0
  27. package/dist/device/hero/hero-model.d.ts +80 -1
  28. package/dist/device/hero/hero-row.d.ts +5 -0
  29. package/dist/device/hero/hero-scene.d.ts +4 -1
  30. package/dist/device/hero/index.d.ts +1 -1
  31. package/dist/{device-type-BaYa0UGS.js → device-type-BfvqqzRp.js} +4 -0
  32. package/dist/{device-type-CbDhVwFP.mjs → device-type-DTTZKB2I.mjs} +4 -0
  33. package/dist/generated/addon-api.d.ts +122 -17
  34. package/dist/generated/addon-cap-facts.d.ts +1 -1
  35. package/dist/generated/cap-status-types.d.ts +3 -1
  36. package/dist/generated/capability-router-map.d.ts +8 -2
  37. package/dist/generated/customize-catalog.d.ts +1 -1
  38. package/dist/generated/device-local-state.d.ts +3 -0
  39. package/dist/generated/device-proxy.d.ts +5 -0
  40. package/dist/generated/device-scoped-caps.d.ts +1 -1
  41. package/dist/generated/history-catalog.d.ts +2 -2
  42. package/dist/generated/method-access-map.d.ts +1 -1
  43. package/dist/generated/method-device-selectors.d.ts +1 -1
  44. package/dist/generated/runtime-state-durability.d.ts +1 -1
  45. package/dist/generated/system-proxy.d.ts +1 -1
  46. package/dist/i18n/camstack-error.d.ts +8 -0
  47. package/dist/index.d.ts +1 -3
  48. package/dist/index.js +1580 -208
  49. package/dist/index.mjs +1560 -208
  50. package/dist/interfaces/addon.d.ts +0 -6
  51. package/dist/node.js +2 -2
  52. package/dist/node.mjs +2 -2
  53. package/dist/{sleep-ComzlWyT.js → sleep-CCAQ_PEp.js} +278 -99
  54. package/dist/{sleep-CS5Xp1iQ.mjs → sleep-DnVqHJc4.mjs} +267 -100
  55. package/package.json +1 -1
  56. package/dist/addon/integration-instance-ref.d.ts +0 -21
@@ -1,5 +1,4 @@
1
1
  import type { z } from 'zod';
2
- import type { IntegrationInstanceRef } from '../addon/integration-instance-ref.js';
3
2
  import type { PackageRequires } from '../addon/package-requires.js';
4
3
  import type { ScopedSettingsDeclaration, ScopedSettingsScope } from '../addon/scoped-settings.js';
5
4
  import type { CapabilityDefinition, InferProvider } from '../capabilities/capability-definition.js';
@@ -899,11 +898,6 @@ export interface ICamstackAddon {
899
898
  */
900
899
  onHubReachable?(): Promise<void> | void;
901
900
  shutdown(): Promise<void>;
902
- /**
903
- * The form of ONE integration instance (create wizard or edit page): the addon's per-instance
904
- * schema when it declares one, else its global schema. See `BaseAddon.getIntegrationFormSchema`.
905
- */
906
- getIntegrationFormSchema?(instance: IntegrationInstanceRef, nodeId?: string): Promise<ConfigUISchemaWithValues | null>;
907
901
  /**
908
902
  * D986: the schema one capability this addon provides declares for a settings scope
909
903
  * (`cluster`, `node`, `device-defaults`), or `null`. See `BaseAddon.getScopedSettingsSchema`.
package/dist/node.js CHANGED
@@ -21,8 +21,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  enumerable: true
22
22
  }) : target, mod));
23
23
  //#endregion
24
- const require_device_type = require("./device-type-BaYa0UGS.js");
25
- const require_composition = require("./composition-BjHGoicU.js");
24
+ const require_device_type = require("./device-type-BfvqqzRp.js");
25
+ const require_composition = require("./composition-BxalDSTt.js");
26
26
  let node_crypto = require("node:crypto");
27
27
  let node_fs = require("node:fs");
28
28
  node_fs = __toESM(node_fs);
package/dist/node.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { o as errMsg } from "./device-type-CbDhVwFP.mjs";
2
- import { Fn as getFfmpegArtifact, In as getFfmpegDownloadUrl, Ln as canonicalHash, Mn as chooseFfmpegBinary, Nn as ffmpegBinaryName, Pn as FFMPEG_RELEASE, R as compositionSourceKey, Rn as Fmp4BoxSplitter, Un as buildFfmpegArgs, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, jn as FFMPEG_PATH_ENV, qn as isSoftwareDecode } from "./composition-CXCX78IR.mjs";
1
+ import { o as errMsg } from "./device-type-DTTZKB2I.mjs";
2
+ import { Fn as getFfmpegArtifact, In as getFfmpegDownloadUrl, Ln as canonicalHash, Mn as chooseFfmpegBinary, Nn as ffmpegBinaryName, Pn as FFMPEG_RELEASE, R as compositionSourceKey, Rn as Fmp4BoxSplitter, Un as buildFfmpegArgs, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, jn as FFMPEG_PATH_ENV, qn as isSoftwareDecode } from "./composition-C6TZGqUb.mjs";
3
3
  import { createHash, createHmac, randomUUID, timingSafeEqual } from "node:crypto";
4
4
  import * as fs from "node:fs";
5
5
  import { chmodSync, copyFileSync, createWriteStream, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
@@ -1,5 +1,5 @@
1
1
  const require_event_category = require("./event-category-BC4RRerT.js");
2
- const require_device_type = require("./device-type-BaYa0UGS.js");
2
+ const require_device_type = require("./device-type-BfvqqzRp.js");
3
3
  let zod = require("zod");
4
4
  //#region src/audio/audio-chunk-format.ts
5
5
  /**
@@ -3309,16 +3309,6 @@ var BaseAddon = class {
3309
3309
  return null;
3310
3310
  }
3311
3311
  /**
3312
- * The form schema of ONE integration instance, or `null` to use the scoped form.
3313
- *
3314
- * Override it only when an `instanceMode: multiple` addon's instances differ: an NVR integration
3315
- * needs its connection fields, the default integration the addon's own sections. It is the
3316
- * SHAPE of the form only — the values live on the instance record.
3317
- */
3318
- async integrationFormSchema(_instance) {
3319
- return null;
3320
- }
3321
- /**
3322
3312
  * D986 scoped settings: the form shape of the CLUSTER-wide settings one capability this addon
3323
3313
  * provides owns, or `null` when it has none. `cap` is a capability name the addon's manifest
3324
3314
  * declares. Stored as `addon-settings` rows `<addonId>.<field>`. The keys of this schema, of
@@ -3346,8 +3336,7 @@ var BaseAddon = class {
3346
3336
  }
3347
3337
  /**
3348
3338
  * The host's read of the scoped declarations: the schema one capability declares for `scope`,
3349
- * or `null`. Beside {@link getIntegrationFormSchema}, the same shape: the hook is protected, the
3350
- * host asks this method.
3339
+ * or `null`. The hook is protected, the host asks this method.
3351
3340
  */
3352
3341
  async getScopedSettingsSchema(scope, cap) {
3353
3342
  switch (scope) {
@@ -3515,22 +3504,6 @@ var BaseAddon = class {
3515
3504
  return Object.fromEntries([...collectHydratedFieldValues(form)].filter(([, value]) => value !== void 0));
3516
3505
  }
3517
3506
  /**
3518
- * What the create wizard and the integration edit page render for one instance: the addon's
3519
- * per-instance schema when it declares one, else its global schema (what they always showed).
3520
- */
3521
- async getIntegrationFormSchema(instance, nodeId) {
3522
- const scoped = await this.integrationFormSchema(instance);
3523
- if (scoped === null) return this.scopedForm(nodeId);
3524
- return hydrateSchema(scoped, {}, { inlineSecretsAsViews: true });
3525
- }
3526
- /** The form of the scoped schemas this addon declared, hydrated from its store. */
3527
- async scopedForm(nodeId) {
3528
- await this.loadScopedSchemas();
3529
- const schema = this.scopedFormSchema();
3530
- if (!schema) return { sections: [] };
3531
- return hydrateSchema(schema, await this.readRawProjectedStore(nodeId), { inlineSecretsAsViews: true });
3532
- }
3533
- /**
3534
3507
  * The raw addon store PROJECTED onto the target node's bare per-node keys:
3535
3508
  * every `perNode: true` field carries THAT node's scoped value on its bare
3536
3509
  * key (absent scoped key ⇒ key absent, so the schema `default` wins — no
@@ -3717,12 +3690,6 @@ var BaseAddon = class {
3717
3690
  this._nodeKeysByCap = /* @__PURE__ */ new Map();
3718
3691
  this._addonSecretTree = null;
3719
3692
  }
3720
- /** The form of an addon's scoped schemas: their sections, each shown once. */
3721
- scopedFormSchema(cap) {
3722
- const byId = /* @__PURE__ */ new Map();
3723
- for (const entry of this.loadedScopedSchemas(cap)) for (const section of entry.schema.sections) if (!byId.has(section.id)) byId.set(section.id, section);
3724
- return byId.size === 0 ? null : { sections: [...byId.values()] };
3725
- }
3726
3693
  /** Every loaded scoped schema of `cap`, or of every loaded capability. */
3727
3694
  loadedScopedSchemas(cap) {
3728
3695
  if (cap !== void 0) return this._scopedByCap.get(cap) ?? [];
@@ -4312,6 +4279,70 @@ function normalizeAddonInitResult(result) {
4312
4279
  if (Array.isArray(result)) return { providers: result };
4313
4280
  return result;
4314
4281
  }
4282
+ //#endregion
4283
+ //#region src/i18n/camstack-error.ts
4284
+ /**
4285
+ * A user-facing error with a STABLE code (D863).
4286
+ *
4287
+ * `message` is always the English text, so every consumer that knows nothing
4288
+ * of codes (old clients, logs, the mesh) behaves exactly as before. The hub's
4289
+ * tRPC error formatter reads `code` + `params` and, when the request language
4290
+ * has a text for `server:<code>`, replaces the response `message`; the code
4291
+ * stays in the payload (`data.i18n`).
4292
+ */
4293
+ /** Dotted lower-case code, e.g. `auth.invalid-credentials`. It is the key in the `server` catalog. */
4294
+ var ErrorCodeSchema = zod.z.string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/);
4295
+ /** What travels in the error payload next to the message. */
4296
+ var ErrorI18nPayloadSchema = zod.z.object({
4297
+ code: ErrorCodeSchema,
4298
+ params: zod.z.record(zod.z.string(), zod.z.union([zod.z.string(), zod.z.number()])).optional()
4299
+ });
4300
+ var CamstackError = class extends Error {
4301
+ i18nCode;
4302
+ i18nParams;
4303
+ constructor(code, params, englishMessage) {
4304
+ super(englishMessage);
4305
+ this.name = "CamstackError";
4306
+ this.i18nCode = code;
4307
+ this.i18nParams = params;
4308
+ }
4309
+ };
4310
+ /** `throw userError('device.not-found', { id }, 'Device 12 not found')` */
4311
+ function userError(code, params, englishFallback) {
4312
+ return new CamstackError(code, params, englishFallback);
4313
+ }
4314
+ /**
4315
+ * Finds a code on `err` or anywhere down its `.cause` chain. Duck-typed on
4316
+ * the field so it survives a module boundary (self-contained addons).
4317
+ */
4318
+ function readErrorI18n(err) {
4319
+ let current = err;
4320
+ for (let depth = 0; depth < 8; depth++) {
4321
+ if (typeof current !== "object" || current === null) return null;
4322
+ const code = Reflect.get(current, "i18nCode");
4323
+ if (typeof code === "string") {
4324
+ const parsed = ErrorI18nPayloadSchema.safeParse({
4325
+ code,
4326
+ params: Reflect.get(current, "i18nParams")
4327
+ });
4328
+ return parsed.success ? parsed.data : null;
4329
+ }
4330
+ const cause = Reflect.get(current, "cause");
4331
+ if (cause === current) return null;
4332
+ current = cause;
4333
+ }
4334
+ return null;
4335
+ }
4336
+ /**
4337
+ * A provider that refuses a caller throws an Error whose message starts with this prefix. The
4338
+ * class does not survive the UDS hop to a forked addon, the message does, so the hub's tRPC
4339
+ * error formatter answers FORBIDDEN (403) for it instead of a 500.
4340
+ */
4341
+ var FORBIDDEN_MESSAGE_PREFIX = "forbidden: ";
4342
+ /** `throw forbiddenError('target not owned: tg-1')` */
4343
+ function forbiddenError(reason) {
4344
+ return /* @__PURE__ */ new Error(`${FORBIDDEN_MESSAGE_PREFIX}${reason}`);
4345
+ }
4315
4346
  zod.z.object({
4316
4347
  field: zod.z.string().min(1),
4317
4348
  on: zod.z.literal("advance")
@@ -4509,12 +4540,6 @@ function systemMethod(input, output, options) {
4509
4540
  systemOnly: true
4510
4541
  };
4511
4542
  }
4512
- /**
4513
- * A method a SOURCE of a collection cap may legitimately not serve — OPTIONAL
4514
- * on `InferProvider`. The `providerOptional: true` literal is what
4515
- * `InferProvider` keys on; see {@link CapabilityMethodSchema.providerOptional}
4516
- * for when this is the honest answer and when it is a soft stub.
4517
- */
4518
4543
  function optionalMethod(input, output, options) {
4519
4544
  return {
4520
4545
  ...method(input, output, options),
@@ -7818,7 +7843,7 @@ function t(en, it) {
7818
7843
  * Things an operator switches, opens, sets or arms: lights, plugs, sirens,
7819
7844
  * covers, valves, locks, climate, fans, alarm panels.
7820
7845
  */
7821
- var ON = t("On", "Acceso");
7846
+ var ON$1 = t("On", "Acceso");
7822
7847
  var PERCENT = t("Percentage", "Percentuale");
7823
7848
  var OPEN_CLOSE_STATES = [
7824
7849
  {
@@ -7878,7 +7903,7 @@ var ACTUATOR_CAP_VOCABULARY = {
7878
7903
  state: [{
7879
7904
  kind: "boolean",
7880
7905
  field: "on",
7881
- label: ON,
7906
+ label: ON$1,
7882
7907
  whenTrue: t("When {device} turns on", "Quando {device} si accende"),
7883
7908
  whenFalse: t("When {device} turns off", "Quando {device} si spegne"),
7884
7909
  icon: "power"
@@ -9044,7 +9069,7 @@ var ACTUATOR_CAP_VOCABULARY = {
9044
9069
  state: [{
9045
9070
  kind: "boolean",
9046
9071
  field: "on",
9047
- label: ON,
9072
+ label: ON$1,
9048
9073
  whenTrue: t("When {device} turns on", "Quando {device} si accende"),
9049
9074
  whenFalse: t("When {device} turns off", "Quando {device} si spegne"),
9050
9075
  icon: "power"
@@ -11460,6 +11485,135 @@ var CAMERA_CAP_VOCABULARY = {
11460
11485
  }
11461
11486
  };
11462
11487
  //#endregion
11488
+ //#region src/device/cap-vocabulary/entries/heat-pump.ts
11489
+ /**
11490
+ * The heat pump (D1026): its system modes are phrased for automations, each with the
11491
+ * values the gateway really accepts; the per-circuit parameters need a circuit and are
11492
+ * set from the device page.
11493
+ */
11494
+ var OFF = {
11495
+ value: "off",
11496
+ label: t("Off", "Off")
11497
+ };
11498
+ var AUTO = {
11499
+ value: "auto",
11500
+ label: t("Auto", "Auto")
11501
+ };
11502
+ var ON = {
11503
+ value: "on",
11504
+ label: t("On", "On")
11505
+ };
11506
+ var MANUAL = {
11507
+ value: "manual",
11508
+ label: t("Manual", "Manuale")
11509
+ };
11510
+ var HOLIDAY_PROGRAMMES = [OFF, ...[
11511
+ 1,
11512
+ 2,
11513
+ 3,
11514
+ 4,
11515
+ 5,
11516
+ 6,
11517
+ 7,
11518
+ 8
11519
+ ].map((n) => ({
11520
+ value: `hm${n}`,
11521
+ label: t(`Programme ${n}`, `Programma ${n}`)
11522
+ }))];
11523
+ var PER_CIRCUIT = "Needs a circuit: set from the device page, not offered to automations";
11524
+ var HEAT_PUMP_CAP_VOCABULARY = {
11525
+ "heat-pump-status": {
11526
+ scope: "device",
11527
+ noun: t("Heat pump", "Pompa di calore")
11528
+ },
11529
+ "heat-pump-control": {
11530
+ scope: "device",
11531
+ noun: t("Heat pump settings", "Impostazioni pompa di calore"),
11532
+ actions: [
11533
+ {
11534
+ id: "heatPump.silent",
11535
+ method: "setSilentMode",
11536
+ label: t("Set silent mode", "Imposta la modalità silenziosa"),
11537
+ phrase: t("Set silent mode of {device} to {mode}", "Imposta la modalità silenziosa di {device} su {mode}"),
11538
+ icon: "volume-x",
11539
+ openArgs: [{
11540
+ key: "mode",
11541
+ label: t("Silent mode", "Modalità silenziosa"),
11542
+ offer: {
11543
+ kind: "enum",
11544
+ values: [
11545
+ OFF,
11546
+ AUTO,
11547
+ ON
11548
+ ]
11549
+ }
11550
+ }]
11551
+ },
11552
+ {
11553
+ id: "heatPump.away",
11554
+ method: "setAwayMode",
11555
+ label: t("Set away mode", "Imposta la modalità assente"),
11556
+ phrase: t("Set away mode of {device} to {mode}", "Imposta la modalità assente di {device} su {mode}"),
11557
+ icon: "plane",
11558
+ openArgs: [{
11559
+ key: "mode",
11560
+ label: t("Away mode", "Modalità assente"),
11561
+ offer: {
11562
+ kind: "enum",
11563
+ values: [OFF, ON]
11564
+ }
11565
+ }]
11566
+ },
11567
+ {
11568
+ id: "heatPump.additionalHeater",
11569
+ method: "setAdditionalHeaterMode",
11570
+ label: t("Set additional heater", "Imposta il riscaldatore aggiuntivo"),
11571
+ phrase: t("Set the additional heater of {device} to {mode}", "Imposta il riscaldatore aggiuntivo di {device} su {mode}"),
11572
+ icon: "flame",
11573
+ openArgs: [{
11574
+ key: "mode",
11575
+ label: t("Additional heater", "Riscaldatore aggiuntivo"),
11576
+ offer: {
11577
+ kind: "enum",
11578
+ values: [
11579
+ OFF,
11580
+ MANUAL,
11581
+ AUTO
11582
+ ]
11583
+ }
11584
+ }]
11585
+ },
11586
+ {
11587
+ id: "heatPump.holiday",
11588
+ method: "setHolidayMode",
11589
+ label: t("Set holiday mode", "Imposta la modalità vacanza"),
11590
+ phrase: t("Set holiday mode of {device} to {mode}", "Imposta la modalità vacanza di {device} su {mode}"),
11591
+ icon: "tree-palm",
11592
+ openArgs: [{
11593
+ key: "mode",
11594
+ label: t("Holiday programme", "Programma vacanza"),
11595
+ offer: {
11596
+ kind: "enum",
11597
+ values: HOLIDAY_PROGRAMMES
11598
+ }
11599
+ }]
11600
+ }
11601
+ ],
11602
+ notOperatorFacing: {
11603
+ setCircuitOperationMode: PER_CIRCUIT,
11604
+ setCircuitHeatCoolMode: PER_CIRCUIT,
11605
+ setCircuitSummerWinter: PER_CIRCUIT,
11606
+ setCircuitComfortSetpoint: PER_CIRCUIT,
11607
+ setCircuitEcoSetpoint: PER_CIRCUIT,
11608
+ setCircuitMaxFlowTemp: PER_CIRCUIT,
11609
+ setDhwOperationMode: PER_CIRCUIT,
11610
+ setDhwTemperatureLevel: PER_CIRCUIT,
11611
+ setDhwChargeDuration: PER_CIRCUIT,
11612
+ startExtraHotWater: PER_CIRCUIT
11613
+ }
11614
+ }
11615
+ };
11616
+ //#endregion
11463
11617
  //#region src/device/cap-vocabulary/entries/sensors.ts
11464
11618
  /**
11465
11619
  * Things an operator WATCHES: contacts, motion, leaks, smoke, measurements,
@@ -12198,6 +12352,7 @@ var CAP_VOCABULARY = {
12198
12352
  ...ACTUATOR_CAP_VOCABULARY,
12199
12353
  ...APPLIANCE_CAP_VOCABULARY,
12200
12354
  ...CAMERA_CAP_VOCABULARY,
12355
+ ...HEAT_PUMP_CAP_VOCABULARY,
12201
12356
  ...SENSOR_CAP_VOCABULARY,
12202
12357
  ...SYSTEM_CAP_VOCABULARY
12203
12358
  };
@@ -12853,6 +13008,8 @@ var CAP_NAMES = Object.freeze([
12853
13008
  "group-active",
12854
13009
  "group-commands",
12855
13010
  "group-status",
13011
+ "heat-pump-control",
13012
+ "heat-pump-status",
12856
13013
  "heating-valve",
12857
13014
  "hero-layout",
12858
13015
  "humidifier",
@@ -13719,6 +13876,48 @@ var CAP_STATE_LEAVES = Object.freeze({
13719
13876
  "valueType": "number"
13720
13877
  }
13721
13878
  ],
13879
+ "heat-pump-status": [
13880
+ {
13881
+ "path": "power.thermalW",
13882
+ "valueType": "number"
13883
+ },
13884
+ {
13885
+ "path": "power.electricalW",
13886
+ "valueType": "number"
13887
+ },
13888
+ {
13889
+ "path": "power.compressorPct",
13890
+ "valueType": "number"
13891
+ },
13892
+ {
13893
+ "path": "temperatures.supply",
13894
+ "valueType": "number"
13895
+ },
13896
+ {
13897
+ "path": "temperatures.return",
13898
+ "valueType": "number"
13899
+ },
13900
+ {
13901
+ "path": "temperatures.outdoor",
13902
+ "valueType": "number"
13903
+ },
13904
+ {
13905
+ "path": "energy.thermalKwh",
13906
+ "valueType": "number"
13907
+ },
13908
+ {
13909
+ "path": "energy.electricalKwh",
13910
+ "valueType": "number"
13911
+ },
13912
+ {
13913
+ "path": "waterPressureBar",
13914
+ "valueType": "number"
13915
+ },
13916
+ {
13917
+ "path": "starts",
13918
+ "valueType": "number"
13919
+ }
13920
+ ],
13722
13921
  "heating-valve": [{
13723
13922
  "path": "position",
13724
13923
  "valueType": "number"
@@ -15491,6 +15690,23 @@ function createDeviceProxy(api, binding, opts) {
15491
15690
  const groupCommandsInterface = { getStatus: (input) => dispatch("group-commands", "groupCommands", "getStatus", "query", input) };
15492
15691
  const groupStatusInterface = { getStatus: (input) => dispatch("group-status", "groupStatus", "getStatus", "query", input) };
15493
15692
  const heatingValveInterface = { getStatus: (input) => dispatch("heating-valve", "heatingValve", "getStatus", "query", input) };
15693
+ const heatPumpControlInterface = {
15694
+ setSilentMode: (input) => dispatch("heat-pump-control", "heatPumpControl", "setSilentMode", "mutation", input),
15695
+ setAwayMode: (input) => dispatch("heat-pump-control", "heatPumpControl", "setAwayMode", "mutation", input),
15696
+ setAdditionalHeaterMode: (input) => dispatch("heat-pump-control", "heatPumpControl", "setAdditionalHeaterMode", "mutation", input),
15697
+ setHolidayMode: (input) => dispatch("heat-pump-control", "heatPumpControl", "setHolidayMode", "mutation", input),
15698
+ setCircuitOperationMode: (input) => dispatch("heat-pump-control", "heatPumpControl", "setCircuitOperationMode", "mutation", input),
15699
+ setCircuitHeatCoolMode: (input) => dispatch("heat-pump-control", "heatPumpControl", "setCircuitHeatCoolMode", "mutation", input),
15700
+ setCircuitSummerWinter: (input) => dispatch("heat-pump-control", "heatPumpControl", "setCircuitSummerWinter", "mutation", input),
15701
+ setCircuitComfortSetpoint: (input) => dispatch("heat-pump-control", "heatPumpControl", "setCircuitComfortSetpoint", "mutation", input),
15702
+ setCircuitEcoSetpoint: (input) => dispatch("heat-pump-control", "heatPumpControl", "setCircuitEcoSetpoint", "mutation", input),
15703
+ setCircuitMaxFlowTemp: (input) => dispatch("heat-pump-control", "heatPumpControl", "setCircuitMaxFlowTemp", "mutation", input),
15704
+ setDhwOperationMode: (input) => dispatch("heat-pump-control", "heatPumpControl", "setDhwOperationMode", "mutation", input),
15705
+ setDhwTemperatureLevel: (input) => dispatch("heat-pump-control", "heatPumpControl", "setDhwTemperatureLevel", "mutation", input),
15706
+ setDhwChargeDuration: (input) => dispatch("heat-pump-control", "heatPumpControl", "setDhwChargeDuration", "mutation", input),
15707
+ startExtraHotWater: (input) => dispatch("heat-pump-control", "heatPumpControl", "startExtraHotWater", "mutation", input)
15708
+ };
15709
+ const heatPumpStatusInterface = { getStatus: (input) => dispatch("heat-pump-status", "heatPumpStatus", "getStatus", "query", input) };
15494
15710
  const humidifierInterface = {
15495
15711
  setOn: (input) => dispatch("humidifier", "humidifier", "setOn", "mutation", input),
15496
15712
  setTargetHumidity: (input) => dispatch("humidifier", "humidifier", "setTargetHumidity", "mutation", input),
@@ -16092,6 +16308,7 @@ function createDeviceProxy(api, binding, opts) {
16092
16308
  groupCommands: createSliceHandle(stateSource, binding.deviceId, "group-commands"),
16093
16309
  groupStatus: createSliceHandle(stateSource, binding.deviceId, "group-status"),
16094
16310
  heatingValve: createSliceHandle(stateSource, binding.deviceId, "heating-valve"),
16311
+ heatPumpStatus: createSliceHandle(stateSource, binding.deviceId, "heat-pump-status"),
16095
16312
  humidifier: createSliceHandle(stateSource, binding.deviceId, "humidifier"),
16096
16313
  humiditySensor: createSliceHandle(stateSource, binding.deviceId, "humidity-sensor"),
16097
16314
  image: createSliceHandle(stateSource, binding.deviceId, "image"),
@@ -16186,6 +16403,8 @@ function createDeviceProxy(api, binding, opts) {
16186
16403
  ...bound("group-commands") ? { groupCommands: groupCommandsInterface } : {},
16187
16404
  ...bound("group-status") ? { groupStatus: groupStatusInterface } : {},
16188
16405
  ...bound("heating-valve") ? { heatingValve: heatingValveInterface } : {},
16406
+ ...bound("heat-pump-control") ? { heatPumpControl: heatPumpControlInterface } : {},
16407
+ ...bound("heat-pump-status") ? { heatPumpStatus: heatPumpStatusInterface } : {},
16189
16408
  ...bound("humidifier") ? { humidifier: humidifierInterface } : {},
16190
16409
  ...bound("humidity-sensor") ? { humiditySensor: humiditySensorInterface } : {},
16191
16410
  ...bound("image") ? { image: imageInterface } : {},
@@ -16275,7 +16494,7 @@ function createDeviceProxy(api, binding, opts) {
16275
16494
  * can answer "may a rule actuate this?" without importing the schema barrel
16276
16495
  * (~144MB RSS per runner, D28).
16277
16496
  *
16278
- * Coverage: 103 device-scoped capabilities.
16497
+ * Coverage: 105 device-scoped capabilities.
16279
16498
  */
16280
16499
  var DEVICE_SCOPED_CAPS = new Set([
16281
16500
  "accessories",
@@ -16322,6 +16541,8 @@ var DEVICE_SCOPED_CAPS = new Set([
16322
16541
  "group-active",
16323
16542
  "group-commands",
16324
16543
  "group-status",
16544
+ "heat-pump-control",
16545
+ "heat-pump-status",
16325
16546
  "heating-valve",
16326
16547
  "humidifier",
16327
16548
  "humidity-sensor",
@@ -16395,60 +16616,6 @@ function isDeviceScopedCap(capName) {
16395
16616
  return DEVICE_SCOPED_CAPS.has(capName);
16396
16617
  }
16397
16618
  //#endregion
16398
- //#region src/i18n/camstack-error.ts
16399
- /**
16400
- * A user-facing error with a STABLE code (D863).
16401
- *
16402
- * `message` is always the English text, so every consumer that knows nothing
16403
- * of codes (old clients, logs, the mesh) behaves exactly as before. The hub's
16404
- * tRPC error formatter reads `code` + `params` and, when the request language
16405
- * has a text for `server:<code>`, replaces the response `message`; the code
16406
- * stays in the payload (`data.i18n`).
16407
- */
16408
- /** Dotted lower-case code, e.g. `auth.invalid-credentials`. It is the key in the `server` catalog. */
16409
- var ErrorCodeSchema = zod.z.string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/);
16410
- /** What travels in the error payload next to the message. */
16411
- var ErrorI18nPayloadSchema = zod.z.object({
16412
- code: ErrorCodeSchema,
16413
- params: zod.z.record(zod.z.string(), zod.z.union([zod.z.string(), zod.z.number()])).optional()
16414
- });
16415
- var CamstackError = class extends Error {
16416
- i18nCode;
16417
- i18nParams;
16418
- constructor(code, params, englishMessage) {
16419
- super(englishMessage);
16420
- this.name = "CamstackError";
16421
- this.i18nCode = code;
16422
- this.i18nParams = params;
16423
- }
16424
- };
16425
- /** `throw userError('device.not-found', { id }, 'Device 12 not found')` */
16426
- function userError(code, params, englishFallback) {
16427
- return new CamstackError(code, params, englishFallback);
16428
- }
16429
- /**
16430
- * Finds a code on `err` or anywhere down its `.cause` chain. Duck-typed on
16431
- * the field so it survives a module boundary (self-contained addons).
16432
- */
16433
- function readErrorI18n(err) {
16434
- let current = err;
16435
- for (let depth = 0; depth < 8; depth++) {
16436
- if (typeof current !== "object" || current === null) return null;
16437
- const code = Reflect.get(current, "i18nCode");
16438
- if (typeof code === "string") {
16439
- const parsed = ErrorI18nPayloadSchema.safeParse({
16440
- code,
16441
- params: Reflect.get(current, "i18nParams")
16442
- });
16443
- return parsed.success ? parsed.data : null;
16444
- }
16445
- const cause = Reflect.get(current, "cause");
16446
- if (cause === current) return null;
16447
- current = cause;
16448
- }
16449
- return null;
16450
- }
16451
- //#endregion
16452
16619
  //#region src/util/boot-recovery-backoff.ts
16453
16620
  /**
16454
16621
  * The ONE retry schedule for work that can fail simply because the node was
@@ -16980,6 +17147,12 @@ Object.defineProperty(exports, "ErrorI18nPayloadSchema", {
16980
17147
  return ErrorI18nPayloadSchema;
16981
17148
  }
16982
17149
  });
17150
+ Object.defineProperty(exports, "FORBIDDEN_MESSAGE_PREFIX", {
17151
+ enumerable: true,
17152
+ get: function() {
17153
+ return FORBIDDEN_MESSAGE_PREFIX;
17154
+ }
17155
+ });
16983
17156
  Object.defineProperty(exports, "FilterRequiredError", {
16984
17157
  enumerable: true,
16985
17158
  get: function() {
@@ -17838,6 +18011,12 @@ Object.defineProperty(exports, "findVocabAction", {
17838
18011
  return findVocabAction;
17839
18012
  }
17840
18013
  });
18014
+ Object.defineProperty(exports, "forbiddenError", {
18015
+ enumerable: true,
18016
+ get: function() {
18017
+ return forbiddenError;
18018
+ }
18019
+ });
17841
18020
  Object.defineProperty(exports, "forgetKnownSecret", {
17842
18021
  enumerable: true,
17843
18022
  get: function() {