@camstack/server 1.2.812 → 1.2.814

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 (97) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/api/core/cap-providers.js +50 -343
  3. package/dist/api/trpc/generated-cap-routers.js +9 -0
  4. package/dist/core/addon/addon-registry.service.js +31 -1
  5. package/dist/core/addon/addon-settings-provider.js +7 -1
  6. package/dist/core/addon/instance-lifecycle.js +454 -0
  7. package/dist/core/addon/instance-links.service.js +22 -14
  8. package/dist/core/moleculer/moleculer.service.js +15 -1
  9. package/package.json +10 -10
  10. package/system/dist/{agent-https-a3mE4PW4.js → agent-https-Dwbpz4K6.js} +1 -1
  11. package/system/dist/{agent-https-CyEBY3RB.mjs → agent-https-eMihTWJ4.mjs} +1 -1
  12. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  13. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  14. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  15. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  16. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  17. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  18. package/system/dist/builtins/autotrack/index.js +1 -1
  19. package/system/dist/builtins/autotrack/index.mjs +1 -1
  20. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  21. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  22. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  23. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  24. package/system/dist/builtins/camera-grid/index.js +1 -1
  25. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  26. package/system/dist/builtins/composer/composer.addon.js +3 -3
  27. package/system/dist/builtins/composer/composer.addon.mjs +3 -3
  28. package/system/dist/builtins/console-logging/index.js +1 -1
  29. package/system/dist/builtins/console-logging/index.mjs +1 -1
  30. package/system/dist/builtins/core-blocks/blocks-instances.d.ts +22 -0
  31. package/system/dist/builtins/core-blocks/core-blocks.addon.d.ts +2 -0
  32. package/system/dist/builtins/core-blocks/core-blocks.addon.js +210 -10
  33. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +200 -10
  34. package/system/dist/builtins/core-blocks/hero-layout-service.d.ts +7 -0
  35. package/system/dist/builtins/core-blocks/remote-service.d.ts +3 -0
  36. package/system/dist/builtins/core-blocks/timed-run/timed-run-service.d.ts +7 -0
  37. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  38. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  39. package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
  40. package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  41. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  42. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  43. package/system/dist/builtins/keychain/index.js +4 -4
  44. package/system/dist/builtins/keychain/index.mjs +4 -4
  45. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  46. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  47. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  48. package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  49. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  50. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  51. package/system/dist/builtins/loki-logging/index.js +1 -1
  52. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  53. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  54. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  55. package/system/dist/builtins/platform-probe/index.js +1 -1
  56. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  57. package/system/dist/builtins/record-entries/index.js +1 -1
  58. package/system/dist/builtins/record-entries/index.mjs +1 -1
  59. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  60. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  61. package/system/dist/builtins/snapshot/index.js +1 -1
  62. package/system/dist/builtins/snapshot/index.mjs +1 -1
  63. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  64. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  65. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  66. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  67. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  68. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  69. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  70. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  71. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  72. package/system/dist/builtins/system-config/system-config.addon.mjs +284 -284
  73. package/system/dist/builtins/winston-logging/index.js +1 -1
  74. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  75. package/system/dist/{capture-engine-ByF-6AFH.mjs → capture-engine-CYPDOIF6.mjs} +1 -1
  76. package/system/dist/{capture-engine-BO9mSlY-.js → capture-engine-uxR5sOQN.js} +1 -1
  77. package/system/dist/{composition-sources-AziMFo7T.mjs → composition-sources-CU3p3INI.mjs} +1 -1
  78. package/system/dist/{composition-sources-BMJUPUh2.js → composition-sources-DkvntZci.js} +1 -1
  79. package/system/dist/{constants-CjRlgRlu.js → constants-BP-Txn_J.js} +1 -1
  80. package/system/dist/{constants-CTikgsC_.mjs → constants-DMFJ6Fky.mjs} +1 -1
  81. package/system/dist/{device-ca-Dxl6kVcJ.js → device-ca-D-0zxmFi.js} +1 -1
  82. package/system/dist/{device-ca-CNRlFqFC.mjs → device-ca-tmcd_VBC.mjs} +1 -1
  83. package/system/dist/{dist-CkJnelZr.js → dist-CznnwtQ8.js} +756 -73
  84. package/system/dist/{dist-BPq13Y8j.mjs → dist-DmCVWvtK.mjs} +727 -68
  85. package/system/dist/file-host-worker.js +1 -1
  86. package/system/dist/file-host-worker.mjs +1 -1
  87. package/system/dist/{hub-mdns-ciao-CrjItezp.mjs → hub-mdns-ciao-DbwyiHD5.mjs} +2 -2
  88. package/system/dist/{hub-mdns-ciao-Cx6yJBl9.js → hub-mdns-ciao-FTf16-JR.js} +2 -2
  89. package/system/dist/index.js +8 -8
  90. package/system/dist/index.mjs +8 -8
  91. package/system/dist/{legacy-integration-rows-door-Dxcqwc-w.mjs → legacy-integration-rows-door-CASQgifG.mjs} +1 -1
  92. package/system/dist/{legacy-integration-rows-door-CKM-LxvL.js → legacy-integration-rows-door-gW0xpMJI.js} +1 -1
  93. package/system/dist/{restore-archive-BQWOdGAB.js → restore-archive-B9TEFWRE.js} +1 -1
  94. package/system/dist/{restore-archive-r3zTdLKr.mjs → restore-archive-DlaC_gyl.mjs} +82 -82
  95. package/system/dist/{wal-maintenance-zJ4-ORo6.mjs → wal-maintenance-Cn164tp0.mjs} +0 -0
  96. package/system/dist/{wal-maintenance-CiCgL4Hp.js → wal-maintenance-Da2Rozz6.js} +0 -0
  97. package/system/package.json +5 -1
@@ -803,7 +803,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
803
803
  return EventCategory;
804
804
  }({});
805
805
  //#endregion
806
- //#region ../types/dist/device-type-DxCT0krO.mjs
806
+ //#region ../types/dist/device-type-CbDhVwFP.mjs
807
807
  /**
808
808
  import { errMsg } from '@camstack/types'
809
809
  * Extract a human-readable message from an unknown error value.
@@ -972,6 +972,13 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
972
972
  * (`featuresOfBoundCaps`). Gates the quick-run control in the viewer.
973
973
  */
974
974
  DeviceFeature["TimedRun"] = "timed-run";
975
+ /**
976
+ * Device binds a plain `switch` cap. Derived from the bindings
977
+ * (`featuresOfBoundCaps`) for a composed device, whose switch is bound by the
978
+ * composition and not by a driver: an appliance (a heater behind a smart
979
+ * plug) has no control of its own, so a surface reads this as its on/off.
980
+ */
981
+ DeviceFeature["Switch"] = "switch";
975
982
  /** Light supports rgb-triplet color via `color` cap. */
976
983
  DeviceFeature["LightColorRgb"] = "light-color-rgb";
977
984
  /** Light supports HSV color via `color` cap. */
@@ -1204,7 +1211,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1204
1211
  return DeviceRole;
1205
1212
  }({});
1206
1213
  //#endregion
1207
- //#region ../types/dist/sleep-t7BftoJG.mjs
1214
+ //#region ../types/dist/sleep-CqvzKIq2.mjs
1208
1215
  /**
1209
1216
  * The audio chunk plane's byte format, and the ONE expansion from a coded
1210
1217
  * window to float samples (D455).
@@ -5475,6 +5482,21 @@ function defineRecordKinds(specs) {
5475
5482
  return out;
5476
5483
  }
5477
5484
  /**
5485
+ * Entry kinds (D881): every list of user-created entries (notification
5486
+ * targets, brokers, LLM profiles) is ONE record kind with an id, a name and a
5487
+ * kind-specific body, and the admin UI lists/adds/edits/deletes all of them
5488
+ * through the `record-entries` capability with password fields derived from
5489
+ * the schema (`.meta({ secret: true })`).
5490
+ */
5491
+ /** The body of a plain entry: a name and the fields the kind adds. */
5492
+ function entryBody(shape) {
5493
+ return z.object({
5494
+ name: z.string().min(1),
5495
+ enabled: z.boolean().optional(),
5496
+ ...shape
5497
+ });
5498
+ }
5499
+ /**
5478
5500
  * Declare one entry kind. An entry is configuration: never trimmed by the
5479
5501
  * engine, never aged, belonging to no device.
5480
5502
  */
@@ -13629,7 +13651,7 @@ function sleep(ms) {
13629
13651
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
13630
13652
  }
13631
13653
  //#endregion
13632
- //#region ../types/dist/composition-Bx0JvKUU.mjs
13654
+ //#region ../types/dist/composition-CXCX78IR.mjs
13633
13655
  var AUDIO_ENCODER_BY_CODEC = {
13634
13656
  opus: "libopus",
13635
13657
  aac: "aac",
@@ -51788,6 +51810,90 @@ var controlCapability = {
51788
51810
  */
51789
51811
  history: "none"
51790
51812
  };
51813
+ var IrCodecError = class extends Error {
51814
+ code;
51815
+ constructor(code, message) {
51816
+ super(message);
51817
+ this.name = "IrCodecError";
51818
+ this.code = code;
51819
+ }
51820
+ };
51821
+ /**
51822
+ * A pulse train in signed microseconds: mark (+) first, then space (-), strictly
51823
+ * alternating, no zeros, 2..1024 entries.
51824
+ */
51825
+ var IrTimingsSchema = z.array(z.number().int()).min(2).max(1024).superRefine((timings, ctx) => {
51826
+ timings.forEach((value, index) => {
51827
+ const expectMark = index % 2 === 0;
51828
+ if (value === 0 || value > 0 !== expectMark) ctx.addIssue({
51829
+ code: "custom",
51830
+ message: `timing ${index} must be a non-zero ${expectMark ? "mark (positive)" : "space (negative)"}`,
51831
+ path: [index]
51832
+ });
51833
+ });
51834
+ });
51835
+ /** Per-command transmit options. Every key is optional; a transmitter applies what it can. */
51836
+ var TransmitSettingsSchema = z.object({
51837
+ carrierHz: z.number().int().positive().optional(),
51838
+ dutyCyclePercent: z.number().int().min(1).max(100).optional(),
51839
+ repeat: z.number().int().min(0).max(20).optional(),
51840
+ repeatDelayMs: z.number().int().min(0).optional()
51841
+ });
51842
+ /** One Pronto frequency-word unit, in microseconds, per unit of the word. */
51843
+ var PRONTO_CLOCK_US = .241246;
51844
+ var LEARNED_FORM = 0;
51845
+ /**
51846
+ * Decode a learned (0000 form) Pronto hex string. The intro burst is followed by
51847
+ * the repeat burst once; a different form is refused with `pronto-unsupported-form`.
51848
+ */
51849
+ function decodePronto(code) {
51850
+ const words = code.trim().split(/\s+/).filter((w) => w.length > 0);
51851
+ if (words.length < 4) throw new IrCodecError("pronto-malformed", `Pronto code needs at least 4 words, got ${words.length}`);
51852
+ const values = words.map((w) => /^[0-9a-fA-F]{1,4}$/.test(w) ? parseInt(w, 16) : NaN);
51853
+ if (values.some((v) => Number.isNaN(v))) throw new IrCodecError("pronto-malformed", "Pronto code must be 4-digit hexadecimal words");
51854
+ const [form, freqWord, introCount, repeatCount] = values;
51855
+ if (form === void 0 || freqWord === void 0 || introCount === void 0 || repeatCount === void 0) throw new IrCodecError("pronto-malformed", "Pronto header incomplete");
51856
+ if (form !== LEARNED_FORM) throw new IrCodecError("pronto-unsupported-form", `Pronto form ${words[0] ?? ""} is not supported, only the learned 0000 form`);
51857
+ if (freqWord === 0) throw new IrCodecError("pronto-malformed", "Pronto frequency word is zero");
51858
+ const pairs = introCount + repeatCount;
51859
+ if (pairs === 0 || values.length !== 4 + pairs * 2) throw new IrCodecError("pronto-malformed", `Pronto declares ${pairs} burst pairs but carries ${(values.length - 4) / 2} word pairs`);
51860
+ const unitUs = freqWord * PRONTO_CLOCK_US;
51861
+ const timings = values.slice(4).map((count, index) => {
51862
+ const us = Math.max(1, Math.round(count * unitUs));
51863
+ return index % 2 === 0 ? us : -us;
51864
+ });
51865
+ const checked = IrTimingsSchema.safeParse(timings);
51866
+ if (!checked.success) throw new IrCodecError("invalid-timings", `Pronto decoded to invalid timings: ${checked.error.message}`);
51867
+ return {
51868
+ timings: checked.data,
51869
+ carrierHz: Math.round(1e6 / unitUs)
51870
+ };
51871
+ }
51872
+ /** What a remote command stores: a raw pulse train, or a learned Pronto code. */
51873
+ var IrPayloadSchema = z.discriminatedUnion("kind", [z.object({
51874
+ kind: z.literal("raw"),
51875
+ timings: z.array(z.number().int()),
51876
+ settings: TransmitSettingsSchema.optional()
51877
+ }), z.object({
51878
+ kind: z.literal("pronto"),
51879
+ code: z.string()
51880
+ })]);
51881
+ /** Resolve a payload to what `ir-transmitter.send` takes. Throws `IrCodecError`. */
51882
+ function toTimings(payload) {
51883
+ if (payload.kind === "pronto") {
51884
+ const decoded = decodePronto(payload.code);
51885
+ return {
51886
+ timings: decoded.timings,
51887
+ settings: { carrierHz: decoded.carrierHz }
51888
+ };
51889
+ }
51890
+ const checked = IrTimingsSchema.safeParse(payload.timings);
51891
+ if (!checked.success) throw new IrCodecError("invalid-timings", checked.error.message);
51892
+ return {
51893
+ timings: checked.data,
51894
+ settings: payload.settings ?? {}
51895
+ };
51896
+ }
51791
51897
  /**
51792
51898
  * The role vocabulary of a remote (D963): what a button MEANS, independent of
51793
51899
  * how it is wired. A layout template places buttons by role; a device binds a
@@ -51875,11 +51981,18 @@ var RemoteRoleSchema = z.string().refine(isRemoteRole, { message: "a role is one
51875
51981
  * a voice command or `playMedia` names.
51876
51982
  * - `sequence`: a name and explicit steps — bound roles pressed in order
51877
51983
  * (an input key, a menu macro such as `source, down, down, ok`).
51984
+ * - `ir`: a name and one infrared code of its own (raw timings or a Pronto
51985
+ * string), sent through a named transmitter (planning#464). It presses no
51986
+ * button: a source the remote's layout has no key for.
51878
51987
  *
51879
51988
  * The name and the number resolve to the SAME declared source. A number no
51880
51989
  * `digits` source declares is not a channel: it is refused, never guessed.
51881
51990
  */
51882
- var REMOTE_SOURCE_KINDS = ["digits", "sequence"];
51991
+ var REMOTE_SOURCE_KINDS = [
51992
+ "digits",
51993
+ "sequence",
51994
+ "ir"
51995
+ ];
51883
51996
  z.enum(REMOTE_SOURCE_KINDS);
51884
51997
  var REMOTE_SOURCE_ID_RE = /^[a-z0-9][a-z0-9_-]{0,47}$/;
51885
51998
  var CHANNEL_NUMBER_RE = new RegExp(`^[0-9]{1,6}$`);
@@ -51899,11 +52012,43 @@ var RemoteSequenceSourceSchema = z.object({
51899
52012
  kind: z.literal("sequence"),
51900
52013
  steps: z.array(RemoteRoleSchema).min(1).max(16)
51901
52014
  });
51902
- var RemoteSourceSchema = z.discriminatedUnion("kind", [RemoteDigitsSourceSchema, RemoteSequenceSourceSchema]);
52015
+ var RemoteIrSourceSchema = z.object({
52016
+ ...sourceBase,
52017
+ kind: z.literal("ir"),
52018
+ /** The `ir-transmitter` device the code is sent through. */
52019
+ transmitterId: z.number().int().nonnegative(),
52020
+ /** The code itself; whether a transmitter could send it is `irSourceProblem`. */
52021
+ payload: IrPayloadSchema
52022
+ });
52023
+ var RemoteSourceSchema = z.discriminatedUnion("kind", [
52024
+ RemoteDigitsSourceSchema,
52025
+ RemoteSequenceSourceSchema,
52026
+ RemoteIrSourceSchema
52027
+ ]);
51903
52028
  var REMOTE_STEP_DELAY_MAX_MS = 3e3;
51904
- /** The roles a source presses, in order. A `digits` number is its digit roles. */
52029
+ /**
52030
+ * The roles a source presses, in order. A `digits` number is its digit roles;
52031
+ * an `ir` source presses none — it carries its own code.
52032
+ */
51905
52033
  function remoteSourceSteps(source) {
51906
- return source.kind === "sequence" ? source.steps : Array.from(source.number, (digit) => `digit_${digit}`);
52034
+ switch (source.kind) {
52035
+ case "sequence": return source.steps;
52036
+ case "digits": return Array.from(source.number, (digit) => `digit_${digit}`);
52037
+ case "ir": return [];
52038
+ }
52039
+ }
52040
+ /**
52041
+ * Why an `ir` source's code could not be sent (the codec's own words), or null
52042
+ * when it resolves to a pulse train. The schema refuses on it; the editor shows it.
52043
+ */
52044
+ function irSourceProblem(source) {
52045
+ try {
52046
+ toTimings(source.payload);
52047
+ return null;
52048
+ } catch (err) {
52049
+ if (err instanceof IrCodecError) return err.message;
52050
+ throw err;
52051
+ }
51907
52052
  }
51908
52053
  function same(a, b) {
51909
52054
  return a.trim().toLowerCase() === b.trim().toLowerCase();
@@ -52705,7 +52850,8 @@ var CAP_CUSTOMIZE_CATALOG = {
52705
52850
  kind: "constant",
52706
52851
  path: "offSeconds",
52707
52852
  value: 10,
52708
- when: "add"
52853
+ when: "add",
52854
+ formerValues: [0]
52709
52855
  }, {
52710
52856
  kind: "clock",
52711
52857
  path: "lastFetchedAt",
@@ -62763,8 +62909,9 @@ var heatingValveCapability = {
62763
62909
  *
62764
62910
  * "Heat for 30 minutes", "run the fountain pump for 2 minutes": the device has
62765
62911
  * no timer of its own, so the hub keeps one. `runFor` turns the device on and
62766
- * records a deadline; `cancel` (or the device being switched off by hand)
62767
- * forgets it; at the deadline the hub issues the off once.
62912
+ * records a deadline; `cancel` switches the device off and forgets the deadline,
62913
+ * and the device being switched off by hand just forgets it; at the deadline
62914
+ * the hub issues the off once.
62768
62915
  *
62769
62916
  * The deadline is DURABLE: it is a row in the records store, so a hub restart
62770
62917
  * neither loses a pending off nor leaves the device running past its time. At
@@ -62895,7 +63042,7 @@ var timedRunCapability = {
62895
63042
  kind: "mutation",
62896
63043
  auth: "protected"
62897
63044
  }),
62898
- /** Forget the pending off. The device is left as it is. */
63045
+ /** Stop the run: switch the device off (once) and forget the pending off. Nothing armed: nothing is sent. */
62899
63046
  cancel: method(z.object({ deviceId: z.number().int() }), z.void(), {
62900
63047
  kind: "mutation",
62901
63048
  auth: "protected"
@@ -62977,6 +63124,168 @@ var StateLookSchema = z.object({
62977
63124
  background: HeroBackgroundTokenSchema,
62978
63125
  animation: HeroAnimationSchema
62979
63126
  });
63127
+ var HeroSceneIdSchema = z.enum([
63128
+ "ac",
63129
+ "thermostat",
63130
+ "heater",
63131
+ "fan",
63132
+ "washer",
63133
+ "dryer",
63134
+ "dishwasher",
63135
+ "pet-fountain",
63136
+ "pet-feeder",
63137
+ "vacuum",
63138
+ "lawn-mower",
63139
+ "tv",
63140
+ "speaker",
63141
+ "camera",
63142
+ "light",
63143
+ "cover",
63144
+ "lock",
63145
+ "alarm",
63146
+ "siren",
63147
+ "sensor-sparkline",
63148
+ "contact",
63149
+ "presence",
63150
+ "weather",
63151
+ "plug",
63152
+ "button",
63153
+ "update",
63154
+ "control-dial",
63155
+ "event-stream",
63156
+ "gateway",
63157
+ "generic"
63158
+ ]);
63159
+ var HeroSceneModeSchema = z.enum([
63160
+ "cool",
63161
+ "heat",
63162
+ "dry",
63163
+ "fan",
63164
+ "auto",
63165
+ "playing",
63166
+ "paused",
63167
+ "open",
63168
+ "closed"
63169
+ ]);
63170
+ /** The scene as the model carries it. `null` = the device did not say (never a guess). */
63171
+ var HeroSceneSchema = z.object({
63172
+ id: HeroSceneIdSchema,
63173
+ mode: HeroSceneModeSchema.nullable(),
63174
+ /** 0..1: volume, cover position, cycle progress. */
63175
+ level: z.number().min(0).max(1).nullable()
63176
+ });
63177
+ var HERO_SCENE_BY_TYPE = {
63178
+ [DeviceType.Camera]: "camera",
63179
+ [DeviceType.Hub]: "gateway",
63180
+ [DeviceType.Light]: "light",
63181
+ [DeviceType.Siren]: "siren",
63182
+ [DeviceType.Switch]: "plug",
63183
+ [DeviceType.Sensor]: "sensor-sparkline",
63184
+ [DeviceType.Thermostat]: "thermostat",
63185
+ [DeviceType.Climate]: "ac",
63186
+ [DeviceType.Button]: "button",
63187
+ [DeviceType.EventEmitter]: "event-stream",
63188
+ [DeviceType.Update]: "update",
63189
+ [DeviceType.Generic]: "generic",
63190
+ [DeviceType.Notifier]: "event-stream",
63191
+ [DeviceType.Script]: "event-stream",
63192
+ [DeviceType.Automation]: "event-stream",
63193
+ [DeviceType.Lock]: "lock",
63194
+ [DeviceType.Cover]: "cover",
63195
+ [DeviceType.Valve]: "control-dial",
63196
+ [DeviceType.Humidifier]: "control-dial",
63197
+ [DeviceType.WaterHeater]: "heater",
63198
+ [DeviceType.Fan]: "fan",
63199
+ [DeviceType.MediaPlayer]: "tv",
63200
+ [DeviceType.AlarmPanel]: "alarm",
63201
+ [DeviceType.Control]: "control-dial",
63202
+ [DeviceType.Presence]: "presence",
63203
+ [DeviceType.Weather]: "weather",
63204
+ [DeviceType.Vacuum]: "vacuum",
63205
+ [DeviceType.LawnMower]: "lawn-mower",
63206
+ [DeviceType.Container]: "generic",
63207
+ [DeviceType.Image]: "camera",
63208
+ [DeviceType.PetFeeder]: "pet-feeder",
63209
+ [DeviceType.PetFountain]: "pet-fountain",
63210
+ [DeviceType.Dishwasher]: "dishwasher",
63211
+ [DeviceType.Washer]: "washer",
63212
+ [DeviceType.Heater]: "heater",
63213
+ [DeviceType.Dryer]: "dryer",
63214
+ [DeviceType.Gateway]: "gateway"
63215
+ };
63216
+ /** `inherit` = the type's scene. A role only refines a type. */
63217
+ var HERO_SCENE_BY_ROLE = {
63218
+ [DeviceRole.Siren]: "siren",
63219
+ [DeviceRole.Floodlight]: "light",
63220
+ [DeviceRole.Spotlight]: "light",
63221
+ [DeviceRole.PirSensor]: "presence",
63222
+ [DeviceRole.Chime]: "speaker",
63223
+ [DeviceRole.Autotrack]: "inherit",
63224
+ [DeviceRole.Nightvision]: "inherit",
63225
+ [DeviceRole.PrivacyMask]: "inherit",
63226
+ [DeviceRole.Doorbell]: "inherit",
63227
+ [DeviceRole.CoverBlind]: "inherit",
63228
+ [DeviceRole.CoverShutter]: "inherit",
63229
+ [DeviceRole.CoverAwning]: "inherit",
63230
+ [DeviceRole.CoverCurtain]: "inherit",
63231
+ [DeviceRole.CoverGarage]: "inherit",
63232
+ [DeviceRole.CoverGate]: "inherit",
63233
+ [DeviceRole.CoverDoor]: "inherit",
63234
+ [DeviceRole.CoverWindow]: "inherit",
63235
+ [DeviceRole.BinaryHelper]: "inherit",
63236
+ [DeviceRole.Outlet]: "plug",
63237
+ [DeviceRole.MotionSensor]: "presence",
63238
+ [DeviceRole.ContactSensor]: "contact",
63239
+ [DeviceRole.LeakSensor]: "inherit",
63240
+ [DeviceRole.SmokeSensor]: "alarm",
63241
+ [DeviceRole.COSensor]: "alarm",
63242
+ [DeviceRole.GasSensor]: "alarm",
63243
+ [DeviceRole.TamperSensor]: "inherit",
63244
+ [DeviceRole.VibrationSensor]: "inherit",
63245
+ [DeviceRole.ConnectivitySensor]: "inherit",
63246
+ [DeviceRole.SoundSensor]: "inherit",
63247
+ [DeviceRole.BinarySensor]: "inherit",
63248
+ [DeviceRole.TemperatureSensor]: "sensor-sparkline",
63249
+ [DeviceRole.HumiditySensor]: "sensor-sparkline",
63250
+ [DeviceRole.AmbientLightSensor]: "inherit",
63251
+ [DeviceRole.PressureSensor]: "weather",
63252
+ [DeviceRole.WindSensor]: "weather",
63253
+ [DeviceRole.RainSensor]: "weather",
63254
+ [DeviceRole.UvSensor]: "weather",
63255
+ [DeviceRole.SolarRadiationSensor]: "weather",
63256
+ [DeviceRole.SoilMoistureSensor]: "inherit",
63257
+ [DeviceRole.PowerSensor]: "plug",
63258
+ [DeviceRole.EnergySensor]: "plug",
63259
+ [DeviceRole.VoltageSensor]: "plug",
63260
+ [DeviceRole.CurrentSensor]: "plug",
63261
+ [DeviceRole.AirQualitySensor]: "inherit",
63262
+ [DeviceRole.BatterySensor]: "inherit",
63263
+ [DeviceRole.NumericSensor]: "inherit",
63264
+ [DeviceRole.EnumSensor]: "inherit",
63265
+ [DeviceRole.DateTimeSensor]: "inherit",
63266
+ [DeviceRole.GenericSensor]: "inherit",
63267
+ [DeviceRole.NumericControl]: "control-dial",
63268
+ [DeviceRole.SelectControl]: "control-dial",
63269
+ [DeviceRole.TextControl]: "inherit",
63270
+ [DeviceRole.DateTimeControl]: "inherit",
63271
+ [DeviceRole.MobilePushNotifier]: "inherit",
63272
+ [DeviceRole.MessagingNotifier]: "inherit",
63273
+ [DeviceRole.EmailNotifier]: "inherit",
63274
+ [DeviceRole.GenericNotifier]: "inherit",
63275
+ [DeviceRole.IrTransmitter]: "inherit"
63276
+ };
63277
+ function isDeviceType$2(type) {
63278
+ return Object.values(DeviceType).includes(type);
63279
+ }
63280
+ function isDeviceRole$1(role) {
63281
+ return Object.values(DeviceRole).includes(role);
63282
+ }
63283
+ /** The scene id of a (role, type) pair. Role beats type; a type this build does not know gets the terminal. */
63284
+ function resolveHeroSceneId(role, type) {
63285
+ const byRole = role !== null && isDeviceRole$1(role) ? HERO_SCENE_BY_ROLE[role] : void 0;
63286
+ if (byRole !== void 0 && byRole !== "inherit") return byRole;
63287
+ return isDeviceType$2(type) ? HERO_SCENE_BY_TYPE[type] : "generic";
63288
+ }
62980
63289
  /** A string in both languages, as the cap vocabulary writes it (D920): no `t()` in the model. */
62981
63290
  var HeroTextSchema = z.object({
62982
63291
  en: z.string(),
@@ -63129,6 +63438,32 @@ var HeroStateBackdropSchema = z.object({
63129
63438
  token: z.enum(HERO_BACKGROUNDS),
63130
63439
  animation: z.enum(HERO_ANIMATIONS)
63131
63440
  });
63441
+ var HeroFactSchema = z.object({
63442
+ id: z.enum([
63443
+ "power",
63444
+ "energy",
63445
+ "battery",
63446
+ "link",
63447
+ "phase",
63448
+ "remaining",
63449
+ "volume",
63450
+ "source",
63451
+ "consumables"
63452
+ ]),
63453
+ icon: IconKeySchema.nullable(),
63454
+ text: HeroTextSchema,
63455
+ tone: HeroToneSchema
63456
+ });
63457
+ /** A labelled value beside the scene. */
63458
+ var HeroSideTileSchema = z.object({
63459
+ label: HeroTextSchema,
63460
+ value: HeroTextSchema,
63461
+ tone: HeroToneSchema.optional()
63462
+ });
63463
+ var HeroSideTilesSchema = z.object({
63464
+ left: z.array(HeroSideTileSchema).max(2),
63465
+ right: z.array(HeroSideTileSchema).max(2)
63466
+ });
63132
63467
  var HeroBackgroundSchema = z.discriminatedUnion("kind", [z.object({
63133
63468
  kind: z.literal("artwork"),
63134
63469
  url: z.string(),
@@ -63152,6 +63487,11 @@ var HeroModelSchema = z.object({
63152
63487
  stateAssumed: z.boolean(),
63153
63488
  look: StateLookSchema,
63154
63489
  background: HeroBackgroundSchema,
63490
+ /** Which animated picture the hero (and the list row) draws; its motion is `look.animation`. */
63491
+ scene: HeroSceneSchema,
63492
+ /** The top line's inline facts, in order; never wraps, so a client may cut the tail. */
63493
+ facts: z.array(HeroFactSchema),
63494
+ sideTiles: HeroSideTilesSchema,
63155
63495
  /** The status line under the main icon. */
63156
63496
  title: HeroTextSchema,
63157
63497
  badges: z.array(HeroBadgeSchema),
@@ -63167,6 +63507,93 @@ var HeroModelSchema = z.object({
63167
63507
  provenance: z.array(HeroProvenanceSchema)
63168
63508
  });
63169
63509
  /**
63510
+ * The ROW of a device in a list (D1023 P2): four fixed zones, all taken from
63511
+ * the hero model and nothing else.
63512
+ *
63513
+ * 1. mini-scene the same scene id as the hero, drawn 44x44 with the state look;
63514
+ * 2. name + ONE status line the facts joined by " · " by the client;
63515
+ * 3. the type's primary inline control;
63516
+ * 4. a trailing fact (power, else battery, else consumables).
63517
+ *
63518
+ * Selection rules, all taken from the model:
63519
+ * - ONE control is ever shown: the device's own power; else the FIRST control of
63520
+ * the FIRST row that has any (a later row's control is never promoted). When
63521
+ * the model lists that part in `gated`, the row has no inline control: the
63522
+ * projection never falls through to another control the caller could use.
63523
+ * - the status line is the head (what plays, else the state) plus at most
63524
+ * {@link ROW_STATUS_FACTS_MAX} facts, the trailing fact excluded;
63525
+ * - the trailing fact is the first of power, battery, consumables.
63526
+ *
63527
+ * `projectDeviceRow` is pure and computes nothing: it selects from a
63528
+ * {@link HeroModel}. A row that needed a value the hero lacks would mean the
63529
+ * model is missing it, so the fix goes in the model.
63530
+ */
63531
+ var HeroRowModelSchema = z.object({
63532
+ deviceId: z.number().int(),
63533
+ name: z.string(),
63534
+ type: z.string(),
63535
+ state: HeroStateSchema,
63536
+ stateAssumed: z.boolean(),
63537
+ look: StateLookSchema,
63538
+ scene: HeroSceneSchema,
63539
+ /** Joined by " · ": the state (or what is playing), then the facts. */
63540
+ statusLine: z.array(HeroTextSchema),
63541
+ /** `null` = the type has no inline control, or the caller may not act on it. */
63542
+ primary: HeroControlSchema.nullable(),
63543
+ trailing: HeroFactSchema.nullable()
63544
+ });
63545
+ /** The trailing fact, in order of preference. */
63546
+ var TRAILING_ORDER = [
63547
+ "power",
63548
+ "battery",
63549
+ "consumables"
63550
+ ];
63551
+ function trailingOf(facts) {
63552
+ for (const id of TRAILING_ORDER) {
63553
+ const found = facts.find((f) => f.id === id);
63554
+ if (found !== void 0) return found;
63555
+ }
63556
+ return null;
63557
+ }
63558
+ function primaryOf(model) {
63559
+ const power = model.ownPower;
63560
+ if (power !== null) {
63561
+ if (model.gated.includes("own-power")) return null;
63562
+ return {
63563
+ kind: "toggle",
63564
+ id: "own-power",
63565
+ label: power.turnOn.label,
63566
+ on: power.on,
63567
+ turnOn: power.turnOn,
63568
+ turnOff: power.turnOff
63569
+ };
63570
+ }
63571
+ for (const row of model.rows) {
63572
+ const control = row.controls[0];
63573
+ if (control === void 0) continue;
63574
+ return model.gated.includes(row.id) ? null : control;
63575
+ }
63576
+ return null;
63577
+ }
63578
+ function statusLineOf(model, trailing) {
63579
+ return [model.rows.find((r) => r.id === "now-playing")?.status ?? null ?? model.title, ...model.facts.filter((f) => f !== trailing).map((f) => f.text).slice(0, 3)];
63580
+ }
63581
+ function projectDeviceRow(model) {
63582
+ const trailing = trailingOf(model.facts);
63583
+ return {
63584
+ deviceId: model.deviceId,
63585
+ name: model.name,
63586
+ type: model.type,
63587
+ state: model.state,
63588
+ stateAssumed: model.stateAssumed,
63589
+ look: model.look,
63590
+ scene: model.scene,
63591
+ statusLine: statusLineOf(model, trailing),
63592
+ primary: primaryOf(model),
63593
+ trailing
63594
+ };
63595
+ }
63596
+ /**
63170
63597
  * hero-layout — what a device's hero says (D1023). Read-only: the FIXED
63171
63598
  * layouts live in `@camstack/types` and nothing here stores or edits one.
63172
63599
  * `getHeroModel` builds the pure model from the device's bindings and its
@@ -63182,6 +63609,11 @@ var heroInput = z.object({
63182
63609
  */
63183
63610
  canActuate: z.boolean().optional()
63184
63611
  });
63612
+ var rowModelsInput = z.object({
63613
+ deviceIds: z.array(z.number().int().nonnegative()).max(500),
63614
+ /** As `canActuate` of `getHeroModel`; absent = may. */
63615
+ canActuate: z.boolean().optional()
63616
+ });
63185
63617
  var HeroLayoutRowsSchema = z.object({
63186
63618
  type: z.string(),
63187
63619
  rows: z.array(HeroRowIdSchema)
@@ -63196,6 +63628,16 @@ var heroLayoutCapability = {
63196
63628
  auth: "protected",
63197
63629
  role: "viewer"
63198
63630
  }),
63631
+ /**
63632
+ * The list rows of many devices in ONE call, projected from the same model as
63633
+ * the hero. One entry per requested id, in order. `null` has two meanings, both
63634
+ * "no row": the registry does not know the device, or reading it failed (the
63635
+ * provider logs that, tagged). It is never an empty row.
63636
+ */
63637
+ getRowModels: method(rowModelsInput, z.array(HeroRowModelSchema.nullable()), {
63638
+ auth: "protected",
63639
+ role: "viewer"
63640
+ }),
63199
63641
  getLayout: method(z.object({ deviceType: z.string() }), HeroLayoutRowsSchema, {
63200
63642
  auth: "protected",
63201
63643
  role: "viewer"
@@ -63914,20 +64356,40 @@ var integrationInstancesCapability = {
63914
64356
  instanceFormSchema: method(z.object({
63915
64357
  id: IntegrationInstanceIdSchema.nullable(),
63916
64358
  /** The kind of the create form (`id: null`) of a provider with several. */
63917
- kind: z.string().min(1).optional()
64359
+ kind: z.string().min(1).optional(),
64360
+ /** The wizard mode of the integration type (`getAvailableTypes`); a form may differ per mode. */
64361
+ mode: z.enum([
64362
+ "standalone",
64363
+ "account",
64364
+ "broker"
64365
+ ]).optional(),
64366
+ /** The discovery candidate the wizard was seeded from (`stableId`), if any. */
64367
+ candidateStableId: z.string().min(1).optional()
63918
64368
  }), ConfigSchemaPassthrough$2, { auth: "admin" }),
63919
64369
  listInstances: method(z.void(), z.array(IntegrationInstanceSchema).readonly(), { auth: "admin" }),
63920
64370
  getInstance: method(z.object({ id: IntegrationInstanceIdSchema }), IntegrationInstanceSchema.nullable(), { auth: "admin" }),
63921
64371
  /**
63922
64372
  * Insert the typed record. With `id` it is stored under that id (a duplicate id is refused);
63923
64373
  * without one the PROVIDER mints it and answers it. `kind` picks one of `describe().kinds`.
64374
+ *
64375
+ * An instance of a kind that brings devices (`role: 'devices'`) is an integration: the HUB mints
64376
+ * the id (the `integrations` registry id, which its devices carry), refuses the create when
64377
+ * `testInstance` rejects the values (D1016; a kind with no test passes and says so), writes the
64378
+ * registry row and the record, and removes both when either step fails. An `id` is accepted
64379
+ * only when it names an existing registry row of the addon.
63924
64380
  */
63925
64381
  createInstance: method(z.object({
63926
64382
  id: IntegrationInstanceIdSchema.optional(),
63927
64383
  name: z.string().min(1),
63928
64384
  kind: z.string().min(1).optional(),
63929
64385
  /** Form values written with the record (a link picked in the create dialog). */
63930
- values: z.record(z.string(), z.unknown()).optional()
64386
+ values: z.record(z.string(), z.unknown()).optional(),
64387
+ /**
64388
+ * The discovery candidate (`stableId`) the instance is set up from. Kept on the integration
64389
+ * registry row of an instance that brings devices, so discovery stops offering a candidate
64390
+ * that already has its integration (D984). Ignored by an instance with no registry row.
64391
+ */
64392
+ originStableId: z.string().min(1).optional()
63931
64393
  }), z.object({ id: z.string() }), {
63932
64394
  kind: "mutation",
63933
64395
  auth: "admin"
@@ -63948,7 +64410,11 @@ var integrationInstancesCapability = {
63948
64410
  kind: "mutation",
63949
64411
  auth: "admin"
63950
64412
  }),
63951
- /** Delete the record and its keychain refs together. */
64413
+ /**
64414
+ * Delete the record and its keychain refs together. For an instance that brings devices the hub
64415
+ * also removes the integration's devices (their tombstones, D865), the registry row, and emits
64416
+ * `IntegrationDeleted`; a fixed builtin and an instance a link names are refused first.
64417
+ */
63952
64418
  deleteInstance: method(z.object({ id: IntegrationInstanceIdSchema }), z.object({ ok: z.literal(true) }), {
63953
64419
  kind: "mutation",
63954
64420
  auth: "admin"
@@ -64182,27 +64648,6 @@ var intercomCapability = {
64182
64648
  */
64183
64649
  history: "none"
64184
64650
  };
64185
- /**
64186
- * A pulse train in signed microseconds: mark (+) first, then space (-), strictly
64187
- * alternating, no zeros, 2..1024 entries.
64188
- */
64189
- var IrTimingsSchema = z.array(z.number().int()).min(2).max(1024).superRefine((timings, ctx) => {
64190
- timings.forEach((value, index) => {
64191
- const expectMark = index % 2 === 0;
64192
- if (value === 0 || value > 0 !== expectMark) ctx.addIssue({
64193
- code: "custom",
64194
- message: `timing ${index} must be a non-zero ${expectMark ? "mark (positive)" : "space (negative)"}`,
64195
- path: [index]
64196
- });
64197
- });
64198
- });
64199
- /** Per-command transmit options. Every key is optional; a transmitter applies what it can. */
64200
- var TransmitSettingsSchema = z.object({
64201
- carrierHz: z.number().int().positive().optional(),
64202
- dutyCyclePercent: z.number().int().min(1).max(100).optional(),
64203
- repeat: z.number().int().min(0).max(20).optional(),
64204
- repeatDelayMs: z.number().int().min(0).optional()
64205
- });
64206
64651
  /** The setting keys a transmitter may declare as settable (`getInfo.settable`). */
64207
64652
  var TransmitSettingKeySchema = z.enum([
64208
64653
  "carrierHz",
@@ -82375,7 +82820,8 @@ var powerSourceCustomize = {
82375
82820
  kind: "constant",
82376
82821
  path: "offSeconds",
82377
82822
  value: 10,
82378
- when: "add"
82823
+ when: "add",
82824
+ formerValues: [0]
82379
82825
  }, {
82380
82826
  kind: "clock",
82381
82827
  path: "lastFetchedAt",
@@ -86094,6 +86540,10 @@ function refineSources(config, ctx) {
86094
86540
  if (numbers.has(source.number)) fail(`channel ${source.number} is declared twice`, "number");
86095
86541
  numbers.add(source.number);
86096
86542
  }
86543
+ if (source.kind === "ir") {
86544
+ const problem = irSourceProblem(source);
86545
+ if (problem !== null) fail(problem, "payload");
86546
+ }
86097
86547
  for (const role of remoteSourceSteps(source)) if (isRemoteWidgetRole(role)) fail(`"${source.name}" presses ${role}, a layout widget, not a command`, "steps");
86098
86548
  else if (config.bindings[role] === void 0) fail(`"${source.name}" presses ${role}, which is not bound`, "steps");
86099
86549
  });
@@ -86115,6 +86565,14 @@ function refineSources(config, ctx) {
86115
86565
  }
86116
86566
  });
86117
86567
  }
86568
+ /** A stored source that was left out of a read, and why (the UI shows it). */
86569
+ var RemoteRefusedSourceSchema = z.object({
86570
+ /** Position in the stored list. */
86571
+ index: z.number().int().nonnegative(),
86572
+ id: z.string().nullable(),
86573
+ name: z.string().nullable(),
86574
+ reason: z.string()
86575
+ });
86118
86576
  var RemoteConfigSchema = z.object({
86119
86577
  layoutTemplateId: z.string().min(1).nullable(),
86120
86578
  /**
@@ -86132,7 +86590,13 @@ var RemoteConfigSchema = z.object({
86132
86590
  sources: z.array(RemoteSourceSchema).max(200).default([]),
86133
86591
  /** The pause between two steps of a source: the television's receiver, not a repeat. */
86134
86592
  stepDelayMs: z.number().int().min(100).max(REMOTE_STEP_DELAY_MAX_MS).default(500),
86135
- power: z.object({ mode: RemotePowerModeSchema })
86593
+ power: z.object({ mode: RemotePowerModeSchema }),
86594
+ /**
86595
+ * READ-ONLY: sources a stored configuration carries that no longer parse,
86596
+ * left out of `sources` with the reason (`readStoredRemoteConfig`). Never
86597
+ * stored: the store strips it on write.
86598
+ */
86599
+ refusedSources: z.array(RemoteRefusedSourceSchema).optional()
86136
86600
  }).superRefine((config, ctx) => {
86137
86601
  const roles = Object.keys(config.bindings);
86138
86602
  if (roles.length > 200) ctx.addIssue({
@@ -86173,6 +86637,60 @@ var RemoteConfigSchema = z.object({
86173
86637
  }
86174
86638
  refineSources(config, ctx);
86175
86639
  });
86640
+ var StoredSourcesShapeSchema = z.looseObject({ sources: z.array(z.unknown()) });
86641
+ var SourceIdentitySchema = z.object({
86642
+ id: z.string(),
86643
+ name: z.string()
86644
+ }).partial();
86645
+ /**
86646
+ * Read a STORED configuration. A single source that no longer parses (a code
86647
+ * the transmitter could not send, a malformed entry) must not make the whole
86648
+ * remote unreadable: it is left out and named in `refusedSources`, and the other
86649
+ * sources and the bindings load. Writing stays strict (`RemoteConfigSchema`).
86650
+ */
86651
+ function readStoredRemoteConfig(raw) {
86652
+ const shape = StoredSourcesShapeSchema.safeParse(raw);
86653
+ if (!shape.success) return finishRead(RemoteConfigSchema.safeParse(raw));
86654
+ const kept = [];
86655
+ const refused = [];
86656
+ shape.data.sources.forEach((candidate, index) => {
86657
+ const parsed = RemoteSourceSchema.safeParse(candidate);
86658
+ const problem = parsed.success && parsed.data.kind === "ir" ? irSourceProblem(parsed.data) : null;
86659
+ if (parsed.success && problem === null) {
86660
+ kept.push(candidate);
86661
+ return;
86662
+ }
86663
+ const identity = SourceIdentitySchema.safeParse(candidate);
86664
+ const reason = problem ?? parsed.error?.issues[0]?.message ?? "not a source";
86665
+ refused.push({
86666
+ index,
86667
+ id: identity.success ? identity.data.id ?? null : null,
86668
+ name: identity.success ? identity.data.name ?? null : null,
86669
+ reason
86670
+ });
86671
+ });
86672
+ const read = finishRead(RemoteConfigSchema.safeParse({
86673
+ ...shape.data,
86674
+ sources: kept
86675
+ }));
86676
+ if (!read.success || refused.length === 0) return read;
86677
+ return {
86678
+ success: true,
86679
+ data: {
86680
+ ...read.data,
86681
+ refusedSources: refused
86682
+ }
86683
+ };
86684
+ }
86685
+ function finishRead(parsed) {
86686
+ return parsed.success ? {
86687
+ success: true,
86688
+ data: parsed.data
86689
+ } : {
86690
+ success: false,
86691
+ issues: parsed.error.issues.length
86692
+ };
86693
+ }
86176
86694
  var EMPTY_REMOTE_CONFIG = {
86177
86695
  layoutTemplateId: null,
86178
86696
  defaultTransmitterId: null,
@@ -94310,14 +94828,6 @@ var BUILTIN_REMOTE_COMPONENTS = [
94310
94828
  buttons: []
94311
94829
  }
94312
94830
  ];
94313
- z.discriminatedUnion("kind", [z.object({
94314
- kind: z.literal("raw"),
94315
- timings: z.array(z.number().int()),
94316
- settings: TransmitSettingsSchema.optional()
94317
- }), z.object({
94318
- kind: z.literal("pronto"),
94319
- code: z.string()
94320
- })]);
94321
94831
  /**
94322
94832
  * Propose a running threshold from a device's own power history (planning#405).
94323
94833
  *
@@ -96682,6 +97192,21 @@ function legacyAutoLinkIds(params) {
96682
97192
  /** Marker written to a declared integration's `info`. */
96683
97193
  var DECLARED_INTEGRATION_FIXED_KEY = "fixed";
96684
97194
  /**
97195
+ * Give a declared integration its instance record, ONCE. The record is read first and left
97196
+ * exactly as it is when it exists (an operator's rename, a field the addon later adds): a seed
97197
+ * never overwrites. A read that fails throws and writes nothing (D49) — the next pass retries.
97198
+ * True when the record was written by this call.
97199
+ */
97200
+ async function seedInstanceOnce(instances, seed) {
97201
+ const existing = await instances.getInstance({ id: seed.id });
97202
+ if (existing !== null && existing !== void 0) return false;
97203
+ await instances.createInstance({
97204
+ id: seed.id,
97205
+ name: seed.name
97206
+ });
97207
+ return true;
97208
+ }
97209
+ /**
96685
97210
  * Strip the `<node>/<addon>` suffix a forked child carries.
96686
97211
  *
96687
97212
  * Comparing `ctx.kernel.localNodeId` raw skipped EVERY node — including the one
@@ -96729,7 +97254,13 @@ var DeclaredDevices = class {
96729
97254
  };
96730
97255
  }
96731
97256
  }
96732
- const integrationId = spec.integrationId ?? await this.ensureIntegration(spec.integrationName);
97257
+ let integrationId;
97258
+ if (spec.integrationId !== void 0) integrationId = spec.integrationId;
97259
+ else {
97260
+ const own = await this.ensureIntegration(spec.integrationName);
97261
+ integrationId = own.id;
97262
+ await this.seedInstance(own);
97263
+ }
96733
97264
  const index = await this.readIndex();
96734
97265
  const live = await this.readLiveByStableId();
96735
97266
  const outcomes = [];
@@ -96737,10 +97268,11 @@ var DeclaredDevices = class {
96737
97268
  const outcome = await this.applyDeclaration(declaration, integrationId, index, live);
96738
97269
  if (outcome !== null) outcomes.push(outcome);
96739
97270
  }
97271
+ const removed = await this.sweepWithdrawn(spec.devices, integrationId, index);
96740
97272
  return {
96741
97273
  integrationId,
96742
97274
  devices: outcomes,
96743
- removed: await this.sweepWithdrawn(spec.devices, integrationId, index),
97275
+ removed,
96744
97276
  owned: true
96745
97277
  };
96746
97278
  }
@@ -96764,7 +97296,10 @@ var DeclaredDevices = class {
96764
97296
  integrationId: created.id,
96765
97297
  name: integrationName
96766
97298
  } });
96767
- return created.id;
97299
+ return {
97300
+ id: created.id,
97301
+ name: integrationName
97302
+ };
96768
97303
  }
96769
97304
  if (existing.info?.["fixed"] !== true) {
96770
97305
  await this.ports.updateIntegration({
@@ -96773,7 +97308,26 @@ var DeclaredDevices = class {
96773
97308
  });
96774
97309
  this.ports.logger.info("re-asserted `fixed` on a declared integration", { meta: { integrationId: existing.id } });
96775
97310
  }
96776
- return existing.id;
97311
+ return {
97312
+ id: existing.id,
97313
+ name: existing.name ?? integrationName
97314
+ };
97315
+ }
97316
+ /** Seed the instance record of an integration this declarer owns; best-effort, retried next pass. */
97317
+ async seedInstance(integration) {
97318
+ const { seedInstance } = this.ports;
97319
+ if (seedInstance === void 0) return;
97320
+ try {
97321
+ await seedInstance({
97322
+ id: integration.id,
97323
+ name: integration.name
97324
+ });
97325
+ } catch (err) {
97326
+ this.ports.logger.warn("could not seed the instance record of a declared integration", {
97327
+ tags: { integrationId: integration.id },
97328
+ meta: { error: errMsg(err) }
97329
+ });
97330
+ }
96777
97331
  }
96778
97332
  async readIndex() {
96779
97333
  const rows = await this.ports.listOwnDevices();
@@ -97130,6 +97684,18 @@ function reading(source, state, assumed = false) {
97130
97684
  assumed
97131
97685
  };
97132
97686
  }
97687
+ function fact(id, icon, text, tone = "muted") {
97688
+ return {
97689
+ id,
97690
+ icon,
97691
+ text,
97692
+ tone
97693
+ };
97694
+ }
97695
+ function minutesLeft(seconds) {
97696
+ const m = Math.ceil(seconds / 60);
97697
+ return t(`${m} min left`, `${m} min rimanenti`);
97698
+ }
97133
97699
  function deviceTypeOf(type) {
97134
97700
  return Object.values(DeviceType).find((t) => t === type);
97135
97701
  }
@@ -97179,7 +97745,8 @@ var runningStateContribution = contribution("running-state", RunningStateStatusS
97179
97745
  detail
97180
97746
  }
97181
97747
  },
97182
- rows: [row]
97748
+ rows: [row],
97749
+ ...phase !== null && running === true ? { facts: [fact("phase", "activity", t(phase, phase), "primary")] } : {}
97183
97750
  };
97184
97751
  });
97185
97752
  var powerMeterContribution = contribution("power-meter", PowerMeterStatusSchema, (slice) => {
@@ -97200,14 +97767,29 @@ var powerMeterContribution = contribution("power-meter", PowerMeterStatusSchema,
97200
97767
  value: slice.current,
97201
97768
  unit: "A"
97202
97769
  });
97203
- return { consumption: {
97204
- priority: 2,
97205
- slot: {
97206
- kind: "power",
97207
- watts: slice.power,
97208
- detail
97770
+ const watts = Math.round(slice.power);
97771
+ const text = t(`${watts} W`, `${watts} W`);
97772
+ return {
97773
+ consumption: {
97774
+ priority: 2,
97775
+ slot: {
97776
+ kind: "power",
97777
+ watts: slice.power,
97778
+ detail
97779
+ }
97780
+ },
97781
+ facts: [fact("power", "zap", text, watts > 0 ? "primary" : "muted")],
97782
+ tiles: {
97783
+ right: [{
97784
+ label: t("Power", "Potenza"),
97785
+ value: text
97786
+ }],
97787
+ ...slice.energy === void 0 ? {} : { left: [{
97788
+ label: t("Energy", "Energia"),
97789
+ value: t(`${slice.energy} kWh`, `${slice.energy} kWh`)
97790
+ }] }
97209
97791
  }
97210
- } };
97792
+ };
97211
97793
  });
97212
97794
  function batteryTone(level) {
97213
97795
  if (level === null) return "muted";
@@ -97216,24 +97798,39 @@ function batteryTone(level) {
97216
97798
  }
97217
97799
  var batteryContribution = contribution("battery", BatteryStatusSchema, (slice) => {
97218
97800
  const level = slice?.level ?? null;
97219
- return { badges: [{
97801
+ const badge = {
97220
97802
  id: "battery",
97221
97803
  icon: "battery",
97222
97804
  tone: batteryTone(level),
97223
97805
  value: level,
97224
97806
  label: level === null ? t("Battery", "Batteria") : t(`Battery ${level}%`, `Batteria ${level}%`)
97225
- }] };
97807
+ };
97808
+ return {
97809
+ badges: [badge],
97810
+ ...level === null ? {} : {
97811
+ facts: [fact("battery", "battery", badge.label, badge.tone)],
97812
+ tiles: { left: [{
97813
+ label: t("Battery", "Batteria"),
97814
+ value: t(`${level}%`, `${level}%`),
97815
+ tone: badge.tone
97816
+ }] }
97817
+ }
97818
+ };
97226
97819
  });
97227
97820
  var networkLinkContribution = contribution("network-link", NetworkLinkStatusSchema, (slice) => {
97228
97821
  const signal = slice?.signal ?? null;
97229
97822
  const known = slice !== void 0 && slice.type !== "unknown";
97230
- return { badges: [{
97823
+ const badge = {
97231
97824
  id: "network-link",
97232
97825
  icon: "wifi",
97233
97826
  tone: !known ? "muted" : signal !== null && signal < 30 ? "warning" : "success",
97234
97827
  value: signal,
97235
97828
  label: known ? t(slice.type, slice.type) : t("Link unknown", "Collegamento sconosciuto")
97236
- }] };
97829
+ };
97830
+ return {
97831
+ badges: [badge],
97832
+ ...known ? { facts: [fact("link", "wifi", badge.label, badge.tone)] } : {}
97833
+ };
97237
97834
  });
97238
97835
  var contactContribution = contribution("contact", ContactStatusSchema, (slice) => {
97239
97836
  const row = {
@@ -97244,7 +97841,8 @@ var contactContribution = contribution("contact", ContactStatusSchema, (slice) =
97244
97841
  };
97245
97842
  return {
97246
97843
  reading: reading("contact", slice === void 0 ? "unknown" : slice.entryOpen ? "on" : "off"),
97247
- rows: [row]
97844
+ rows: [row],
97845
+ ...slice === void 0 ? {} : { scene: { mode: slice.entryOpen ? "open" : "closed" } }
97248
97846
  };
97249
97847
  });
97250
97848
  var motionTriggerContribution = contribution("motion-trigger", MotionTriggerStatusSchema, (slice) => {
@@ -97323,10 +97921,14 @@ var consumablesContribution = contribution("consumables", ConsumablesStatusSchem
97323
97921
  level: item.level,
97324
97922
  needsAttention: item.status !== null && ATTENTION_STATUSES.includes(item.status)
97325
97923
  }));
97326
- return { consumables: {
97327
- items,
97328
- attention: items.filter((i) => i.needsAttention).length
97329
- } };
97924
+ const attention = items.filter((i) => i.needsAttention).length;
97925
+ return {
97926
+ consumables: {
97927
+ items,
97928
+ attention
97929
+ },
97930
+ ...attention === 0 ? {} : { facts: [fact("consumables", null, t(`${attention} to check`, `${attention} da controllare`), "warning")] }
97931
+ };
97330
97932
  });
97331
97933
  var dishwasherContribution = contribution("dishwasher", DishwasherStatusSchema, (slice) => {
97332
97934
  const state = slice === void 0 || slice.state === "unavailable" ? "unknown" : slice.state === "running" ? "running" : slice.state === "error" ? "alert" : "idle";
@@ -97350,9 +97952,17 @@ var dishwasherContribution = contribution("dishwasher", DishwasherStatusSchema,
97350
97952
  turnOff: action("appliance-power.off", t("Standby", "Standby"), "power-off", "dishwasher", "setPower", { on: false })
97351
97953
  }]
97352
97954
  });
97955
+ const remaining = slice?.remaining ?? null;
97353
97956
  return {
97354
97957
  reading: reading("dishwasher", state),
97355
- rows
97958
+ rows,
97959
+ ...remaining === null ? {} : {
97960
+ facts: [fact("remaining", "timer", minutesLeft(remaining), "primary")],
97961
+ tiles: { right: [{
97962
+ label: t("Left", "Rimane"),
97963
+ value: minutesLeft(remaining)
97964
+ }] }
97965
+ }
97356
97966
  };
97357
97967
  });
97358
97968
  var has$1 = (ctx, f) => ctx.features.includes(f);
@@ -97460,8 +98070,23 @@ var HERO_CAP_CONTRIBUTIONS = [
97460
98070
  }] : []
97461
98071
  });
97462
98072
  }
98073
+ const volumeNow = view.volumeKnown ? slice?.volumeLevel ?? null : null;
98074
+ const sourceNow = view.source === null || view.source.current === "" ? null : view.source.current;
98075
+ const mode = view.running === "playing" ? "playing" : view.running === "paused" ? "paused" : null;
98076
+ const facts = [];
98077
+ if (sourceNow !== null) facts.push(fact("source", "radio", t(sourceNow, sourceNow)));
98078
+ if (volumeNow !== null) facts.push(fact("volume", "volume-2", t(`${volumeNow}%`, `${volumeNow}%`)));
97463
98079
  return {
97464
98080
  reading: mediaReading(view),
98081
+ facts,
98082
+ ...volumeNow === null ? {} : { tiles: { right: [{
98083
+ label: t("Volume", "Volume"),
98084
+ value: t(`${volumeNow}%`, `${volumeNow}%`)
98085
+ }] } },
98086
+ scene: {
98087
+ ...mode === null ? {} : { mode },
98088
+ ...volumeNow === null ? {} : { level: volumeNow / 100 }
98089
+ },
97465
98090
  ...view.canSwitchPower ? { ownPower: {
97466
98091
  source: "media-player",
97467
98092
  on: view.power === "unknown" ? null : view.power === "on",
@@ -97955,6 +98580,9 @@ function provenanceOf(cap, fragment) {
97955
98580
  if (fragment.powerSupply !== void 0) ids.push("power-supply");
97956
98581
  if (fragment.consumption !== void 0) ids.push("consumption");
97957
98582
  if (fragment.consumables !== void 0) ids.push("consumables");
98583
+ if (fragment.facts !== void 0 && fragment.facts.length > 0) ids.push("facts");
98584
+ if (fragment.tiles !== void 0) ids.push("side-tiles");
98585
+ if (fragment.scene !== void 0) ids.push("scene");
97958
98586
  if (fragment.remote !== void 0) ids.push("remote");
97959
98587
  for (const badge of fragment.badges ?? []) ids.push(badge.id);
97960
98588
  for (const row of fragment.rows ?? []) ids.push(row.id);
@@ -97971,6 +98599,17 @@ function consumptionOf(fragments) {
97971
98599
  }
97972
98600
  return best === null ? null : best.slot;
97973
98601
  }
98602
+ function tilesOf(fragments, side) {
98603
+ return fragments.flatMap((f) => f.tiles?.[side] ?? []).slice(0, 2);
98604
+ }
98605
+ function sceneOf(role, type, fragments) {
98606
+ const parts = fragments.flatMap((f) => f.scene === void 0 ? [] : [f.scene]);
98607
+ return {
98608
+ id: resolveHeroSceneId(role, type),
98609
+ mode: parts.find((p) => p.mode !== void 0)?.mode ?? null,
98610
+ level: parts.find((p) => p.level !== void 0)?.level ?? null
98611
+ };
98612
+ }
97974
98613
  function buildHeroModel(input) {
97975
98614
  const { device } = input;
97976
98615
  const ctx = {
@@ -98011,6 +98650,11 @@ function buildHeroModel(input) {
98011
98650
  const powerSupply = fragments.find((f) => f.powerSupply !== void 0)?.powerSupply ?? null;
98012
98651
  const remote = fragments.find((f) => f.remote !== void 0)?.remote ?? null;
98013
98652
  const badges = fragments.flatMap((f) => f.badges ?? []);
98653
+ const facts = fragments.flatMap((f) => f.facts ?? []);
98654
+ const sideTiles = {
98655
+ left: tilesOf(fragments, "left"),
98656
+ right: tilesOf(fragments, "right")
98657
+ };
98014
98658
  const gated = [];
98015
98659
  if (!input.access.canActuate) {
98016
98660
  if (ownPower !== null) gated.push("own-power");
@@ -98028,6 +98672,9 @@ function buildHeroModel(input) {
98028
98672
  stateAssumed: assumed,
98029
98673
  look,
98030
98674
  background,
98675
+ scene: sceneOf(device.role, device.type, fragments),
98676
+ facts,
98677
+ sideTiles,
98031
98678
  title: STATE_TEXT[state],
98032
98679
  badges,
98033
98680
  remote,
@@ -101556,6 +102203,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
101556
102203
  access: "view",
101557
102204
  role: "viewer"
101558
102205
  },
102206
+ "heroLayout.getRowModels": {
102207
+ capName: "hero-layout",
102208
+ capScope: "system",
102209
+ addonId: null,
102210
+ access: "view",
102211
+ role: "viewer"
102212
+ },
101559
102213
  "humidifier.getStatus": {
101560
102214
  capName: "humidifier",
101561
102215
  capScope: "device",
@@ -109607,6 +110261,11 @@ Object.freeze({
109607
110261
  form: "single",
109608
110262
  optional: false
109609
110263
  }],
110264
+ "heroLayout.getRowModels": [{
110265
+ name: "deviceIds",
110266
+ form: "array",
110267
+ optional: false
110268
+ }],
109610
110269
  "humidifier.getStatus": [{
109611
110270
  name: "deviceId",
109612
110271
  form: "single",
@@ -113715,4 +114374,4 @@ z.object({
113715
114374
  commands: z.record(z.string(), z.unknown())
113716
114375
  });
113717
114376
  //#endregion
113718
- export { EMPTY_AUTOMATION_STATE as $, timedRunLimitOf as $a, procedureAuthKey as $i, coreBlockSourceKind as $n, DATAPLANE_SECRET_HEADER as $o, isCredentialTokenPayload as $r, emitReadiness as $s, ServerNameSchema as $t, ControlStatusSchema as A, scoreRuntimes as Aa, resolveSecretMarkers as Ac, motionCapability as Ai, buildDeviceSignatureMessage as An, compositionItemFieldPath as Ao, extractNestedAddonId as Ar, UnknownRecordKindError as As, PET_FOUNTAIN_WATER_KEY as At, DEVICE_ENROLLMENT_TTL_MS as B, stableIdMapOf as Ba, vocabActionIdFor as Bc, orderMigrations as Bi, checkTemplatePayload as Bn, isForwardInputRef as Bo, gbToBytes as Br, collectSecretConfigKeys as Bs, RECORDING_SOURCE_CAMSTACK_ADDON as Bt, CORE_BLOCKS_ADDON_ID as C, resolveStepArgs as Ca, normalizeSecretOwner as Cc, mediaPlayerFeaturesOfRoles as Ci, backupCapability as Cn, HelperMemberSchema as Co, enumerateItemArrayFields as Cr, RecordTooLargeError as Cs, MIGRATION_API_V1_METHODS as Ct, CatalogFileSchema as D, schedulersCapability as Da, readinessKey as Dc, migrationsCapability as Di, buildActionSteps as Dn, composedDeviceRef as Do, evictionPolicyOfLocation as Dr, StoredRecordKindDeclarationSchema as Ds, MigrationLedgerEntrySchema as Dt, CalendarPreferencesSchema as E, runtimeStatePolicyFor as Ea, parseSecretRef as Ec, metricsProviderCapability as Ei, brightnessCapability as En, cloneStatefulExpressionMemory as Eo, evaluateWhenTree as Er, SECRET_CLEAR as Es, MediaPlayerStatusSchema as Et, DATABASE_SNAPSHOT_TIMEOUT_MS as F, shortHostname as Fa, sleep as Fc, normalizeStepTargets as Fi, canonicalIconKey as Fn, evaluateDerivative as Fo, filesystemBrowseCapability as Fr, asString$1 as Fs, PowerSourceInfoSchema as Ft, DEVICE_SAN_USER_PREFIX as G, storageProviderCapability as Ga, errMsg as Gc, petFountainWaterItem as Gi, compileScalarOverride as Gn, planResetTier as Go, integrationInstancesCapability as Gr, commandOrigin as Gs, RemoteConfigSchema as Gt, DEVICE_ID_FIELD as H, storageCapability as Ha, DeviceFeature as Hc, parseColorInput as Hi, collectWhenMirrorSources as Hn, nextLocalMidnight as Ho, groupCommandsCapability as Hr, collectSecretMarkerRefs as Hs, ROOT_BUCKET_KEY as Ht, DATA_STORE_DATABASES as I, siteFor as Ia, toNodeId as Ic, normalizeUnit as Ii, capUnitResolver as In, evaluateStatistic as Io, findChannelSource as Ir, assertTransactScope as Is, PreferenceDeviceIdSchema as It, DeclaredDevices as J, supportedRuntimes as Ja, platformProbeCapability as Ji, compositionSourceRefs as Jn, toExpressionValue as Jo, isAlertEpisodeOpen as Jr, defineAddonMigrations as Js, STORAGE_LOCATION_MODES as Jt, DEVICE_TOMBSTONE_RETENTION_MS as K, streamCatalogCapability as Ka, featuresOfBoundCaps as Kc, pickAppLinkHub as Ki, composerCapability as Kn, planStatisticTier as Ko, internalActionId as Kr, createEvent as Ks, RunningStateStatusSchema as Kt, DAY_NAMES as L, siteZoneKey as La, toSecretFieldView as Lc, objectInputDeclaresAddonId as Li, catalogueIssues as Ln, helperMembers as Lo, foldSnapshotByFunction as Lr, assertValidDeclaration as Ls, PreferenceNamespaceSchema as Lt, CredentialTokenClaimsSchema as M, sharedActuatorFeatures as Ma, secretTreeFromPaths as Mc, normalizeActionUnits as Mi, buildStreamParamsConfigSchema as Mn, compositionSourceKey as Mo, fanOutTargets as Mr, actionEffect as Ms, PROPOSAL_MIN_SPAN_MS as Mt, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as N, sharedActuatorMethods as Na, secretTreeFromSchema as Nc, normalizeCapStep as Ni, calendarsCapability as Nn, createStatefulExpressionMemory as No, fanPresetsCapability as Nr, asJsonObject as Ns, PackageRequiresSchema as Nt, ConditionMirror as O, scopesAllowAddon as Oa, recordSecretRef as Oc, modeForSwitch as Oi, buildCapabilityLookup as On, composedDeviceStableId as Oo, expandContainer as Or, TransactRefusedError as Os, MigrationMetaSchema as Ot, DATABASE_SNAPSHOT_SUFFIX as P, sharedColorModes as Pa, secretViewsOf as Pc, normalizeCoreBlockWrite as Pi, cameraGridLayoutCapability as Pn, disarmRoseMemory as Po, featureForwards as Pr, asNumber as Ps, PetFountainStatusSchema as Pt, DiscoveryProposalBodySchema as Q, timedRunCapability as Qa, problemsBlockSave as Qi, coreBlockIdFromAddonId as Qn, CALLER_STAMPED_CAPABILITIES as Qo, isCollectionArrayMethod as Qr, emitDownForOwnedCaps as Qs, ScopedTokenSchema as Qt, DEFAULT_HOLD_OVERRIDE as R, snapshotCapability as Ra, transformSecretWrite as Rc, objectInputDeclaresRequiredDeviceId as Ri, checkDeviceAlias as Rn, historyRetentionFromSettings as Ro, formatDeviceRevoker as Rr, auditedFields as Rs, PreferenceValueSchema as Rt, COMPOSER_RUNNER_ID as S, resolveRunnerId as Sa, normalizeNodeId as Sc, mediaPlayerCapability as Si, authProviderCapability as Sn, HOUR_MS as So, enumerateInferenceDevices as Sr, RecordNotFoundError as Ss, METHOD_ACCESS_MAP as St, CREDENTIAL_TOKEN_AUDIENCE as T, runSteps as Ta, parseJsonUnknown as Tc, methodRefusal as Ti, batteryCapability as Tn, buildFfmpegArgs as To, evaluateCompositionField as Tr, RevConflictError as Ts, MOTION_CLOSE_AFTER_MS as Tt, DEVICE_NONCE_TTL_MS as U, storageMigrationCapability as Ua, DeviceRole as Uc, parseStreamParamsFormPatch as Ui, colorCapability as Un, openReset as Uo, groupTemplate as Ur, collectZodSecretPaths as Us, RecordingStatusSchema as Ut, DEVICE_HISTORY_ENERGY_KEY as V, storageAdminCapability as Va, withoutCallerStamp as Vc, parseAcceleratorFactsJson as Vi, climateControlCapability as Vn, isHistoryHelper as Vo, generateDeviceAlias as Vr, collectSecretLeaves as Vs, REMOTE_MEDIA_COMMANDS as Vt, DEVICE_SAN_CREDENTIAL_PREFIX as W, storageOccupancyCapability as Wa, DeviceType as Wc, petFountainCapability as Wi, compareVersions as Wn, openStatistic as Wo, heroLayoutCapability as Wr, commandEffect as Ws, RemoteAssumedStateSchema as Wt, DeviceStatusSchema as X, switchStateOfMode as Xa, powerSourceLinkOfComposition as Xi, coreBlockAddonId as Xn, BaseAddon as Xo, isAppLinkBase as Xr, defineEntryKind as Xs, SchedulerError as Xt, DeviceRunSchema as Y, switchCapability as Ya, powerSourceCapability as Yi, consumablesCapability as Yn, wattMillisecondsToKwh as Yo, isAlertEpisodeSeverity as Yr, defineCustomActions as Ys, STREAM_PROFILE_META as Yt, DeviceTombstoneSchema as Z, templateCapability as Za, preconditionOf as Zi, coreBlockComposition as Zn, BatchTooLargeError as Zo, isArrayOutputSchema as Zr, defineRecordKinds as Zs, SchedulerSchema as Zt, CAMERA_SWITCH_ORDER as _, resolveLocationMode as _a, isSecretRefOwnedBy as _c, logDestinationCapability as _i, alertEpisodeId as _n, CompositionSchema as _o, deviceRemovalHookCapability as _r, RUNTIME_DEFAULTS as _s, KEYCHAIN_RESET_TRIGGER_ACTOR as _t, AGENT_MDNS_SERVICE_TYPE as a, reducePoints as aa, hydrateSchema as ac, isVoidInput as ai, SwitchStatusSchema as an, validateComposition as ao, databaseSnapshotCapability as ar, ForeignSecretMarkerError as as, FanDirectionSchema as at, CATALOG_LANGS as b, resolveNotificationTapAddress as ba, nodeIdOfScopedKey as bc, mayReadLocation as bi, appendTrace as bn, HISTORY_FAST_MS as bo, deviceStatusCapability as br, RecordIntegrationInstances as bs, LOG_LEVEL_RANK as bt, ActionError as c, remoteSourceSteps as ca, isDeviceConfigCap as cc, keychainCapability as ci, UNATTRIBUTED_BUCKET_KEY as cn, valveCapability as co, decodeVectorBase64 as cr, NoCallerError as cs, FieldClaimSchema as ct, ActionVariableSchema as d, resolveAppConnections as da, isKeychainStoredField as dc, lifecycleJobSchema as di, actionWaitTotalMs as dn, vectorStoreCapability as do, describeComposableCaps as dr, RECORD_BATCH_MAX_BYTES as ds, HISTORY_ITEM_CATALOG as dt, processTimeZoneOr as ea, expandCapMethods as ec, isDefaultAppConnectionEndpoint as ei, SsoBridgeClaimsSchema as en, timedRunMaxIn as eo, coreBlocksCapability as er, DEVICE_SETTINGS_CONTRIBUTION_METHODS as es, EMPTY_REMOTE_ASSUMED_STATE as et, AlertSchema as f, resolveBucketMs as fa, isReadingQuantity as fc, localDateOf as fi, actionsCapability as fn, weekdayOfLocalDate as fo, describeUnmet as fr, RECORD_DELETE_BATCH as fs, HUB_MDNS_SERVICE_TYPE as ft, BatteryStatusSchema as g, resolveHubAddressRoles as ga, isSecretMarkerLike as gc, lockDoorLinkOfComposition as gi, addonWidgetsCapability as gn, COMPOSER_ADDON_ID as go, deviceManagerCapability as gr, REMOVE_LEAF as gs, INTERNAL_ACTION_PREFIX as gt, BaseDevice as h, resolveHeroLayout as ha, isSecretMarker as hc, lockControlCapability as hi, addonSettingsCapability as hn, zoneOnlySite as ho, deviceHistoryCapability as hr, REDACTED_SECRET as hs, IDLE_ACTION_STATUS as ht, ACTUATOR_TEMPLATE_IDS as i, recordsCapability as ia, historyUnitFor as ic, isSameAddonId as ii, StorageMigrationJobSchema as in, userManagementCapability as io, dataStoreProviderCapability as ir, FilterRequiredError as is, FanControlStatusSchema as it, CoreBlockSchema as j, settingsStoreCapability as ja, scopeKey as jc, nextOccurrence as ji, buildHeroModel as jn, compositionSliceKey as jo, fanControlCapability as jr, WELL_KNOWN_TAB_MAP as js, PREFERENCES_MAX_VALUE_BYTES as jt, ConsumableItemSchema as k, scopesAllowDeviceCap as ka, resolveCapMount as kc, modeMayWrite as ki, buildDeviceEnrollmentLink as kn, compositionFeatureEnabled as ko, expressionContainsBuiltinCall as kr, UnindexedFilterError as ks, NetworkTunnelStartedDataSchema as kt, ActionStepSchema as l, replacedFieldKeys as la, isEvent as lc, legacyAutoLinkIds as li, UserRecordSchema as ln, vectorDimFromBase64 as lo, defineExtensionSlotProvider as lr, PlaintextSecretError as ls, GroupCommandResultSchema as lt, BUILTIN_REMOTE_COMPONENTS as m, resolveCoreBlockFiles as ma, isSecretFieldView as mc, locationIconKey as mi, addonPagesCapability as mn, withLocationMode as mo, deviceExtensionCapability as mr, RECORD_SWEEP_INTERVAL_MS as ms, HvacModeSchema as mt, ACTION_TARGET_INVALIDATION_EVENTS as n, ptzAutotrackCapability as na, getDebugInterest as nc, isLocationEnabled as ni, StorageLocationModeSchema as nn, timedRunSeconds as no, createDeviceExtensionProvider as nr, DeclarationRefusedError as ns, FAN_CAPTURE_FIELDS as nt, AGENT_MDNS_TXT_KEYS as o, remoteCapability as oa, isCommand as oc, kebabToCamel as oi, TemplateKindSchema as on, validateCustomAddress as oo, declarationOwnerNodeId as or, HISTORY_DEFAULT_MIN_INTERVAL_MS as os, FanPresetSchema as ot, AutomationStateDocSchema as p, resolveCoreBlockEntry as pa, isSecretClear as pc, localNetworkCapability as pi, addonIdOfActionId as pn, withDefaultRunning as po, deviceCredentialsCapability as pr, RECORD_SECRET_COLLECTION_PREFIX as ps, HUB_MDNS_TXT_KEYS as pt, DataStoreDatabaseSchema as q, streamQualityLabel as qa, EventCategory as qc, planComposition as qi, compositionFieldKey as qn, statisticCadenceMs as qo, interpolate as qr, customAction as qs, STORAGE_ACCESS_FALLBACK as qt, ACTUATOR_METHODS as r, recordEntriesCapability as ra, historyItemFieldPath as rc, isObjectInput as ri, StorageLocationTypeSchema as rn, unmetRequirements as ro, customKeyOfRole as rr, DeviceTransitionSchema as rs, FIRST_LEVEL_MACRO_CLASSES as rt, ALL_CAPABILITY_DEFINITIONS as s, remoteLayoutComponentsCapability as sa, isDebugChannelName as sc, keychainAdminCapability as si, TokenScopeSchema as sn, validateSchedulerInput as so, declaredSeriesKind as sr, InvalidRecordError as ss, FieldClaimModeSchema as st, ACTION_RUN_MAX_MS as t, proposeRunningThreshold as ta, formatSecretScope as tc, isInternalActionId as ti, StorageCleanupJobSchema as tn, timedRunQuickRun as to, coverCapability as tr, DEVICE_STATUS_METHOD as ts, EMPTY_REMOTE_CONFIG as tt, ActionTargetResolver as u, resolveActionVariables as ua, isInstanceEnabled as uc, legacyModeOf as ui, actionSourceCapability as un, vectorIndexDimConflictError as uo, deriveBatteryPresence as ur, RECORD_BATCH_MAX as us, HISTORY_CATALOG as ut, CAMSTACK_APP_LINK_ORIGIN as v, resolveMethodAuth as va, makeSecretMarker as vc, logLevelAtMost as vi, alertEpisodePayload as vn, DAY_MS as vo, deviceRunsCapability as vr, ReadinessRegistry as vs, KeychainAuditEntrySchema as vt, CORE_BLOCK_ADDON_PREFIX as w, runFanOut as wa, parseJsonObject as wc, memoizePinnedFfmpeg as wi, bareAddonId as wn, MINUTE_MS as wo, enumerateSchemaFields as wr, RecordUniqueViolationError as ws, MINUTES_PER_DAY as wt, COMPOSED_ITEM_FIXED_FIELDS as x, resolveRemoteSource as xa, nodePin as xc, mayWriteToLocation as xi, armRemovalReconcile as xn, HISTORY_SLOW_MS as xo, deviceTransitionsCapability as xr, RecordKindDeclarationSchema as xs, LegacyStorageLocationDefaultSchema as xt, CAP_NAMES_WITH_STATUS as y, resolveMutate as ya, mapSecretLeaves as yc, looseSchema as yi, alertsCapability as yn, DEFAULT_HISTORY_RETENTION as yo, deviceStateCapability as yr, ReadinessTimeoutError as ys, KeychainResetRecordSchema as yt, DERIVED_CAMERA_SILENCED_CAP_NAMES as z, splitTranslationRef as za, userError as zc, occurrenceOn as zi, checkRoleAddress as zn, integrateReading as zo, formatMinutes as zr, buildSecretRef as zs, QuantityUnitError as zt };
114377
+ export { EMPTY_AUTOMATION_STATE as $, templateCapability as $a, processTimeZoneOr as $i, coreBlocksCapability as $n, BaseAddon as $o, isDefaultAppConnectionEndpoint as $r, defineEntryKind as $s, SsoBridgeClaimsSchema as $t, ControlStatusSchema as A, scopesAllowDeviceCap as Aa, parseSecretRef as Ac, nextOccurrence as Ai, buildHeroModel as An, composedDeviceRef as Ao, fanControlCapability as Ar, StoredRecordKindDeclarationSchema as As, PET_FOUNTAIN_WATER_KEY as At, DEVICE_ENROLLMENT_TTL_MS as B, snapshotCapability as Ba, toNodeId as Bc, parseAcceleratorFactsJson as Bi, climateControlCapability as Bn, helperMembers as Bo, generateDeviceAlias as Br, assertValidDeclaration as Bs, RECORDING_SOURCE_CAMSTACK_ADDON as Bt, CORE_BLOCKS_ADDON_ID as C, resolveRunnerId as Ca, mapSecretLeaves as Cc, memoizePinnedFfmpeg as Ci, bareAddonId as Cn, HISTORY_FAST_MS as Co, enumerateSchemaFields as Cr, RecordIntegrationInstances as Cs, MIGRATION_API_V1_METHODS as Ct, CatalogFileSchema as D, runtimeStatePolicyFor as Da, normalizeSecretOwner as Dc, modeForSwitch as Di, buildCapabilityLookup as Dn, MINUTE_MS as Do, expandContainer as Dr, RecordUniqueViolationError as Ds, MigrationLedgerEntrySchema as Dt, CalendarPreferencesSchema as E, runSteps as Ea, normalizeNodeId as Ec, migrationsCapability as Ei, buildActionSteps as En, HelperMemberSchema as Eo, evictionPolicyOfLocation as Er, RecordTooLargeError as Es, MediaPlayerStatusSchema as Et, DATABASE_SNAPSHOT_TIMEOUT_MS as F, sharedActuatorMethods as Fa, scopeKey as Fc, normalizeUnit as Fi, capUnitResolver as Fn, compositionSourceKey as Fo, findChannelSource as Fr, actionEffect as Fs, PowerSourceInfoSchema as Ft, DEVICE_SAN_USER_PREFIX as G, storageMigrationCapability as Ga, withoutCallerStamp as Gc, pickAppLinkHub as Gi, composerCapability as Gn, nextLocalMidnight as Go, internalActionId as Gr, collectSecretMarkerRefs as Gs, RunningStateStatusSchema as Gt, DEVICE_ID_FIELD as H, stableIdMapOf as Ha, transformSecretWrite as Hc, parseStreamParamsFormPatch as Hi, colorCapability as Hn, integrateReading as Ho, groupTemplate as Hr, buildSecretRef as Hs, ROOT_BUCKET_KEY as Ht, DATA_STORE_DATABASES as I, sharedColorModes as Ia, secretTreeFromPaths as Ic, objectInputDeclaresAddonId as Ii, catalogueIssues as In, createStatefulExpressionMemory as Io, foldSnapshotByFunction as Ir, asJsonObject as Is, PreferenceDeviceIdSchema as It, DeclaredDevices as J, streamCatalogCapability as Ja, DeviceType as Jc, powerSourceCapability as Ji, consumablesCapability as Jn, planResetTier as Jo, isAlertEpisodeSeverity as Jr, commandOrigin as Js, STREAM_PROFILE_META as Jt, DEVICE_TOMBSTONE_RETENTION_MS as K, storageOccupancyCapability as Ka, DeviceFeature as Kc, planComposition as Ki, compositionFieldKey as Kn, openReset as Ko, interpolate as Kr, collectZodSecretPaths as Ks, STORAGE_ACCESS_FALLBACK as Kt, DAY_NAMES as L, shortHostname as La, secretTreeFromSchema as Lc, objectInputDeclaresRequiredDeviceId as Li, checkDeviceAlias as Ln, disarmRoseMemory as Lo, formatDeviceRevoker as Lr, asNumber as Ls, PreferenceNamespaceSchema as Lt, CredentialTokenClaimsSchema as M, seedInstanceOnce as Ma, recordSecretRef as Mc, normalizeCapStep as Mi, calendarsCapability as Mn, compositionFeatureEnabled as Mo, fanPresetsCapability as Mr, UnindexedFilterError as Ms, PROPOSAL_MIN_SPAN_MS as Mt, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as N, settingsStoreCapability as Na, resolveCapMount as Nc, normalizeCoreBlockWrite as Ni, cameraGridLayoutCapability as Nn, compositionItemFieldPath as No, featureForwards as Nr, UnknownRecordKindError as Ns, PackageRequiresSchema as Nt, ConditionMirror as O, schedulersCapability as Oa, parseJsonObject as Oc, modeMayWrite as Oi, buildDeviceEnrollmentLink as On, buildFfmpegArgs as Oo, expressionContainsBuiltinCall as Or, RevConflictError as Os, MigrationMetaSchema as Ot, DATABASE_SNAPSHOT_SUFFIX as P, sharedActuatorFeatures as Pa, resolveSecretMarkers as Pc, normalizeStepTargets as Pi, canonicalIconKey as Pn, compositionSliceKey as Po, filesystemBrowseCapability as Pr, WELL_KNOWN_TAB_MAP as Ps, PetFountainStatusSchema as Pt, DiscoveryProposalBodySchema as Q, switchStateOfMode as Qa, procedureAuthKey as Qi, coreBlockSourceKind as Qn, wattMillisecondsToKwh as Qo, isCredentialTokenPayload as Qr, defineCustomActions as Qs, ServerNameSchema as Qt, DEFAULT_HOLD_OVERRIDE as R, siteFor as Ra, secretViewsOf as Rc, occurrenceOn as Ri, checkRoleAddress as Rn, evaluateDerivative as Ro, formatMinutes as Rr, asString$1 as Rs, PreferenceValueSchema as Rt, COMPOSER_RUNNER_ID as S, resolveRemoteSource as Sa, makeSecretMarker as Sc, mediaPlayerFeaturesOfRoles as Si, backupCapability as Sn, DEFAULT_HISTORY_RETENTION as So, enumerateItemArrayFields as Sr, ReadinessTimeoutError as Ss, METHOD_ACCESS_MAP as St, CREDENTIAL_TOKEN_AUDIENCE as T, runFanOut as Ta, nodePin as Tc, metricsProviderCapability as Ti, brightnessCapability as Tn, HOUR_MS as To, evaluateWhenTree as Tr, RecordNotFoundError as Ts, MOTION_CLOSE_AFTER_MS as Tt, DEVICE_NONCE_TTL_MS as U, storageAdminCapability as Ua, userError as Uc, petFountainCapability as Ui, compareVersions as Un, isForwardInputRef as Uo, heroLayoutCapability as Ur, collectSecretConfigKeys as Us, RecordingStatusSchema as Ut, DEVICE_HISTORY_ENERGY_KEY as V, splitTranslationRef as Va, toSecretFieldView as Vc, parseColorInput as Vi, collectWhenMirrorSources as Vn, historyRetentionFromSettings as Vo, groupCommandsCapability as Vr, auditedFields as Vs, REMOTE_MEDIA_COMMANDS as Vt, DEVICE_SAN_CREDENTIAL_PREFIX as W, storageCapability as Wa, vocabActionIdFor as Wc, petFountainWaterItem as Wi, compileScalarOverride as Wn, isHistoryHelper as Wo, integrationInstancesCapability as Wr, collectSecretLeaves as Ws, RemoteAssumedStateSchema as Wt, DeviceStatusSchema as X, supportedRuntimes as Xa, featuresOfBoundCaps as Xc, preconditionOf as Xi, coreBlockComposition as Xn, statisticCadenceMs as Xo, isArrayOutputSchema as Xr, customAction as Xs, SchedulerSchema as Xt, DeviceRunSchema as Y, streamQualityLabel as Ya, errMsg as Yc, powerSourceLinkOfComposition as Yi, coreBlockAddonId as Yn, planStatisticTier as Yo, isAppLinkBase as Yr, createEvent as Ys, SchedulerError as Yt, DeviceTombstoneSchema as Z, switchCapability as Za, EventCategory as Zc, problemsBlockSave as Zi, coreBlockIdFromAddonId as Zn, toExpressionValue as Zo, isCollectionArrayMethod as Zr, defineAddonMigrations as Zs, ScopedTokenSchema as Zt, CAMERA_SWITCH_ORDER as _, resolveHubAddressRoles as _a, isSecretClear as _c, logLevelAtMost as _i, alertEpisodePayload as _n, withLocationMode as _o, deviceRunsCapability as _r, RECORD_SWEEP_INTERVAL_MS as _s, KEYCHAIN_RESET_TRIGGER_ACTOR as _t, AGENT_MDNS_SERVICE_TYPE as a, recordsCapability as aa, formatSecretScope as ac, kebabToCamel as ai, TemplateKindSchema as an, toTimings as ao, declarationOwnerNodeId as ar, DeclarationRefusedError as as, FanDirectionSchema as at, CATALOG_LANGS as b, resolveMutate as ba, isSecretMarkerLike as bc, mayWriteToLocation as bi, armRemovalReconcile as bn, CompositionSchema as bo, deviceTransitionsCapability as br, RUNTIME_DEFAULTS as bs, LOG_LEVEL_RANK as bt, ActionError as c, remoteLayoutComponentsCapability as ca, historyUnitFor as cc, legacyAutoLinkIds as ci, UserRecordSchema as cn, validateComposition as co, defineExtensionSlotProvider as cr, ForeignSecretMarkerError as cs, FieldClaimSchema as ct, ActionVariableSchema as d, resolveActionVariables as da, isDebugChannelName as dc, localDateOf as di, actionsCapability as dn, valveCapability as do, describeUnmet as dr, NoCallerError as ds, HISTORY_ITEM_CATALOG as dt, projectDeviceRow as ea, defineRecordKinds as ec, isInternalActionId as ei, StorageCleanupJobSchema as en, timedRunCapability as eo, coverCapability as er, BatchTooLargeError as es, EMPTY_REMOTE_ASSUMED_STATE as et, AlertSchema as f, resolveAppConnections as fa, isDeviceConfigCap as fc, localNetworkCapability as fi, addonIdOfActionId as fn, vectorDimFromBase64 as fo, deviceCredentialsCapability as fr, PlaintextSecretError as fs, HUB_MDNS_SERVICE_TYPE as ft, BatteryStatusSchema as g, resolveHeroLayout as ga, isReadingQuantity as gc, logDestinationCapability as gi, alertEpisodeId as gn, withDefaultRunning as go, deviceRemovalHookCapability as gr, RECORD_SECRET_COLLECTION_PREFIX as gs, INTERNAL_ACTION_PREFIX as gt, BaseDevice as h, resolveCoreBlockFiles as ha, isKeychainStoredField as hc, lockDoorLinkOfComposition as hi, addonWidgetsCapability as hn, weekdayOfLocalDate as ho, deviceManagerCapability as hr, RECORD_DELETE_BATCH as hs, IDLE_ACTION_STATUS as ht, ACTUATOR_TEMPLATE_IDS as i, recordEntriesCapability as ia, expandCapMethods as ic, isVoidInput as ii, SwitchStatusSchema as in, timedRunSeconds as io, databaseSnapshotCapability as ir, DEVICE_STATUS_METHOD as is, FanControlStatusSchema as it, CoreBlockSchema as j, scoreRuntimes as ja, readinessKey as jc, normalizeActionUnits as ji, buildStreamParamsConfigSchema as jn, composedDeviceStableId as jo, fanOutTargets as jr, TransactRefusedError as js, PREFERENCES_MAX_VALUE_BYTES as jt, ConsumableItemSchema as k, scopesAllowAddon as ka, parseJsonUnknown as kc, motionCapability as ki, buildDeviceSignatureMessage as kn, cloneStatefulExpressionMemory as ko, extractNestedAddonId as kr, SECRET_CLEAR as ks, NetworkTunnelStartedDataSchema as kt, ActionStepSchema as l, remoteSourceSteps as la, hydrateSchema as lc, legacyModeOf as li, actionSourceCapability as ln, validateCustomAddress as lo, deriveBatteryPresence as lr, HISTORY_DEFAULT_MIN_INTERVAL_MS as ls, GroupCommandResultSchema as lt, BUILTIN_REMOTE_COMPONENTS as m, resolveCoreBlockEntry as ma, isInstanceEnabled as mc, lockControlCapability as mi, addonSettingsCapability as mn, vectorStoreCapability as mo, deviceHistoryCapability as mr, RECORD_BATCH_MAX_BYTES as ms, HvacModeSchema as mt, ACTION_TARGET_INVALIDATION_EVENTS as n, ptzAutotrackCapability as na, emitReadiness as nc, isObjectInput as ni, StorageLocationTypeSchema as nn, timedRunMaxIn as no, customKeyOfRole as nr, DATAPLANE_SECRET_HEADER as ns, FAN_CAPTURE_FIELDS as nt, AGENT_MDNS_TXT_KEYS as o, reducePoints as oa, getDebugInterest as oc, keychainAdminCapability as oi, TokenScopeSchema as on, unmetRequirements as oo, declaredSeriesKind as or, DeviceTransitionSchema as os, FanPresetSchema as ot, AutomationStateDocSchema as p, resolveBucketMs as pa, isEvent as pc, locationIconKey as pi, addonPagesCapability as pn, vectorIndexDimConflictError as po, deviceExtensionCapability as pr, RECORD_BATCH_MAX as ps, HUB_MDNS_TXT_KEYS as pt, DataStoreDatabaseSchema as q, storageProviderCapability as qa, DeviceRole as qc, platformProbeCapability as qi, compositionSourceRefs as qn, openStatistic as qo, isAlertEpisodeOpen as qr, commandEffect as qs, STORAGE_LOCATION_MODES as qt, ACTUATOR_METHODS as r, readStoredRemoteConfig as ra, entryBody as rc, isSameAddonId as ri, StorageMigrationJobSchema as rn, timedRunQuickRun as ro, dataStoreProviderCapability as rr, DEVICE_SETTINGS_CONTRIBUTION_METHODS as rs, FIRST_LEVEL_MACRO_CLASSES as rt, ALL_CAPABILITY_DEFINITIONS as s, remoteCapability as sa, historyItemFieldPath as sc, keychainCapability as si, UNATTRIBUTED_BUCKET_KEY as sn, userManagementCapability as so, decodeVectorBase64 as sr, FilterRequiredError as ss, FieldClaimModeSchema as st, ACTION_RUN_MAX_MS as t, proposeRunningThreshold as ta, emitDownForOwnedCaps as tc, isLocationEnabled as ti, StorageLocationModeSchema as tn, timedRunLimitOf as to, createDeviceExtensionProvider as tr, CALLER_STAMPED_CAPABILITIES as ts, EMPTY_REMOTE_CONFIG as tt, ActionTargetResolver as u, replacedFieldKeys as ua, isCommand as uc, lifecycleJobSchema as ui, actionWaitTotalMs as un, validateSchedulerInput as uo, describeComposableCaps as ur, InvalidRecordError as us, HISTORY_CATALOG as ut, CAMSTACK_APP_LINK_ORIGIN as v, resolveLocationMode as va, isSecretFieldView as vc, looseSchema as vi, alertsCapability as vn, zoneOnlySite as vo, deviceStateCapability as vr, REDACTED_SECRET as vs, KeychainAuditEntrySchema as vt, CORE_BLOCK_ADDON_PREFIX as w, resolveStepArgs as wa, nodeIdOfScopedKey as wc, methodRefusal as wi, batteryCapability as wn, HISTORY_SLOW_MS as wo, evaluateCompositionField as wr, RecordKindDeclarationSchema as ws, MINUTES_PER_DAY as wt, COMPOSED_ITEM_FIXED_FIELDS as x, resolveNotificationTapAddress as xa, isSecretRefOwnedBy as xc, mediaPlayerCapability as xi, authProviderCapability as xn, DAY_MS as xo, enumerateInferenceDevices as xr, ReadinessRegistry as xs, LegacyStorageLocationDefaultSchema as xt, CAP_NAMES_WITH_STATUS as y, resolveMethodAuth as ya, isSecretMarker as yc, mayReadLocation as yi, appendTrace as yn, COMPOSER_ADDON_ID as yo, deviceStatusCapability as yr, REMOVE_LEAF as ys, KeychainResetRecordSchema as yt, DERIVED_CAMERA_SILENCED_CAP_NAMES as z, siteZoneKey as za, sleep as zc, orderMigrations as zi, checkTemplatePayload as zn, evaluateStatistic as zo, gbToBytes as zr, assertTransactScope as zs, QuantityUnitError as zt };