@camstack/addon-export-alexa 1.2.188 → 1.2.189

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.
@@ -837,7 +837,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
837
837
  return EventCategory;
838
838
  }({});
839
839
  //#endregion
840
- //#region ../types/dist/device-type-D1fH5kaC.mjs
840
+ //#region ../types/dist/device-type-DxCT0krO.mjs
841
841
  /**
842
842
  import { errMsg } from '@camstack/types'
843
843
  * Extract a human-readable message from an unknown error value.
@@ -999,6 +999,13 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
999
999
  * filters that want "all devices with on-motion behaviour".
1000
1000
  */
1001
1001
  DeviceFeature["MotionTrigger"] = "motion-trigger";
1002
+ /**
1003
+ * Device can be run for a chosen time and then stopped. Mirrors the
1004
+ * `timed-run` wrapper cap — the cap is bound by the core-blocks addon, not by
1005
+ * a driver, so the flag is derived from the device's bindings
1006
+ * (`featuresOfBoundCaps`). Gates the quick-run control in the viewer.
1007
+ */
1008
+ DeviceFeature["TimedRun"] = "timed-run";
1002
1009
  /** Light supports rgb-triplet color via `color` cap. */
1003
1010
  DeviceFeature["LightColorRgb"] = "light-color-rgb";
1004
1011
  /** Light supports HSV color via `color` cap. */
@@ -6033,7 +6040,7 @@ var ZodIssueCode = {
6033
6040
  var ZodFirstPartyTypeKind;
6034
6041
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6035
6042
  //#endregion
6036
- //#region ../types/dist/sleep-CQP-REJp.mjs
6043
+ //#region ../types/dist/sleep-7El4r5Bl.mjs
6037
6044
  /**
6038
6045
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6039
6046
  * window to float samples (D455).
@@ -8402,7 +8409,7 @@ function boundOf(list) {
8402
8409
  * Base class for CamStack addons. Eliminates settings boilerplate:
8403
8410
  *
8404
8411
  * - Typed `config` property with automatic resolution from store + defaults
8405
- * - `getGlobalSettings()` / `updateGlobalSettings()` auto-implemented
8412
+ * - the scoped settings API (`clusterSettings` / `nodeSettings` / `deviceDefaults`) auto-implemented
8406
8413
  * - `getAddonSettings()` / `updateAddonSettings()` auto-implemented
8407
8414
  * - `getDeviceSettings()` / `updateDeviceSettings()` auto-implemented
8408
8415
  * - `ctx` accessor for the AddonContext (no manual `this.ctxRef` storage)
@@ -8412,7 +8419,7 @@ function boundOf(list) {
8412
8419
  * Subclasses override:
8413
8420
  * - `onInitialize()` — addon-specific init logic, return ProviderRegistration[]
8414
8421
  * - `onShutdown()` — cleanup
8415
- * - `globalSettingsSchema()` / `deviceSettingsSchema()` — UI schemas
8422
+ * - `clusterSettingsSchema()` / `nodeSettingsSchema()` / `deviceSettingsSchema()` — UI schemas
8416
8423
  *
8417
8424
  * @example
8418
8425
  * ```ts
@@ -8426,7 +8433,7 @@ function boundOf(list) {
8426
8433
  * super({ maxRetries: 3, endpoint: 'http://localhost' })
8427
8434
  * }
8428
8435
  *
8429
- * protected globalSettingsSchema() {
8436
+ * protected clusterSettingsSchema() {
8430
8437
  * return this.schema({
8431
8438
  * sections: [{
8432
8439
  * id: 'main', title: 'Settings',
@@ -8469,7 +8476,7 @@ var BaseAddon = class {
8469
8476
  defaults;
8470
8477
  /**
8471
8478
  * Hidden-state paths that hold secrets (D787) — values the addon writes
8472
- * itself (`updateGlobalSettings`, `state()`) that no form field declares.
8479
+ * itself (`state()`, the scoped writers) that no form field declares.
8473
8480
  * Stored in the keychain exactly like a `password` field. Syntax:
8474
8481
  * `'snapshotSigningKey'`, `'identity.pincode'`, `'tokens[userId].accessToken'`
8475
8482
  * (`key[<id field>]` addresses array items by id, never by index).
@@ -8479,7 +8486,7 @@ var BaseAddon = class {
8479
8486
  /**
8480
8487
  * D986 M4: the scoped schemas this addon declared, resolved once per capability
8481
8488
  * (`loadScopedSchemas`) so the sync readers (`perNodeKeys`, the secret tree, the restart check)
8482
- * see them. Empty until loaded: the readers then fall back to {@link globalSettingsSchema}.
8489
+ * see them. Empty until loaded.
8483
8490
  */
8484
8491
  _scopedByCap = /* @__PURE__ */ new Map();
8485
8492
  _nodeKeysByCap = /* @__PURE__ */ new Map();
@@ -8665,7 +8672,7 @@ var BaseAddon = class {
8665
8672
  /** Addon-specific cleanup. Override if needed. */
8666
8673
  async onShutdown() {}
8667
8674
  /**
8668
- * Called after config is resolved during updateGlobalSettings/updateAddonSettings.
8675
+ * Called after config is resolved during a settings write.
8669
8676
  * Override to react to config changes (e.g. restart a sampler, reconnect a service).
8670
8677
  * Not called during initialize() — use onInitialize() for initial setup.
8671
8678
  */
@@ -8694,82 +8701,12 @@ var BaseAddon = class {
8694
8701
  scopedSettingsCapabilities() {
8695
8702
  return [];
8696
8703
  }
8697
- /** Override to provide global-level settings UI schema. */
8698
- globalSettingsSchema(_cap) {
8699
- return null;
8700
- }
8701
8704
  /** Override to provide device-level settings UI schema. */
8702
8705
  deviceSettingsSchema() {
8703
8706
  return null;
8704
8707
  }
8705
8708
  /**
8706
- * INTEGRATION-LEVEL SETTINGS — declare which of this addon's global sections
8707
- * ARE the configuration of its integration.
8708
- *
8709
- * Return the `ConfigSection.id`s, from {@link globalSettingsSchema}, that an
8710
- * operator should find on the addon's integration page (System →
8711
- * Integrations → <name>) rather than only in the cluster-wide list of every
8712
- * addon. Empty (the default) means the addon has no integration-level
8713
- * settings and no such surface is offered — this is opt-in, because whether
8714
- * an addon's configuration IS its integration's configuration depends on the
8715
- * nature of the integration.
8716
- *
8717
- * WHAT THIS IS NOT. It is not a scope. The selected sections keep living in
8718
- * the ONE global schema, in the ONE addon store, written by the ONE
8719
- * `updateGlobalSettings` path. There is deliberately no
8720
- * `updateIntegrationSettings`: a second write path is how a surface acquires
8721
- * a second store key, and this repo has shipped that twice (`btmPath@hub`,
8722
- * D266). Selecting sections cannot introduce a key that selecting cannot.
8723
- *
8724
- * WHY IT IS A LIST OF SECTION IDS AND NOT A MARKER ON THE SECTION.
8725
- * `ConfigFieldBase` used to carry `scope?: 'device' | 'global'` and it was
8726
- * removed with the reason recorded at
8727
- * `packages/types/src/interfaces/config-ui.ts:249` — *"a field's scope is
8728
- * determined by WHICH schema it lives in, not by a field-level marker."* A
8729
- * marker sprinkled across sections also has to borrow a field that already
8730
- * means something else; borrowing `section.tab` put the literal word
8731
- * "integration" into an operator-facing tab bar, because `tab` means "how to
8732
- * GROUP this visually" and cannot also mean "where this lives" (D269
8733
- * supersedes D268). One declaration, in one place, next to the schema whose
8734
- * ids it names.
8735
- */
8736
- integrationSettingSections() {
8737
- return [];
8738
- }
8739
- async getGlobalSettings(overlay, cap, nodeId) {
8740
- await this.loadScopedSchemas(cap);
8741
- const schema = this.globalSettingsSchema(cap) ?? this.scopedFormSchema(cap);
8742
- if (!schema) return { sections: [] };
8743
- const projected = await this.readRawProjectedStore(nodeId, cap);
8744
- return hydrateSchema(schema, overlay ? await this.overlayKeepingMarkers(projected, overlay) : projected, { inlineSecretsAsViews: true });
8745
- }
8746
- /**
8747
- * The integration-level view of this addon's settings: exactly the sections
8748
- * named by {@link integrationSettingSections}, hydrated from the SAME store
8749
- * `getGlobalSettings` reads, and narrowed to cluster-scoped fields.
8750
- *
8751
- * Returns `null` when the addon declared nothing — an addon that opts out has
8752
- * no integration settings surface at all, rather than an empty one that reads
8753
- * as a failed load.
8754
- *
8755
- * Three properties hold BY CONSTRUCTION, which is why they are here in core
8756
- * and not in whichever UI happens to render this:
8757
- *
8758
- * 1. **One key.** The payload is a SUBSET of the global schema, so a field
8759
- * shown here is the same field, with the same bare key, that the addon's
8760
- * own page shows. There is no integration-specific writer — callers save
8761
- * through `updateGlobalSettings` — so a second store key is unreachable,
8762
- * not merely discouraged.
8763
- * 2. **No node scope.** `perNode: true` fields are DROPPED. Their store key
8764
- * is `<key>@<nodeId>` and an integration is not a node; whichever node
8765
- * such a field silently picked would be a wrong answer for the operator
8766
- * who opened the page (D266).
8767
- * 3. **No silent typo.** A declared id that names no section throws. The
8768
- * alternative — skip it — turns a rename into a surface that quietly
8769
- * empties, which looks exactly like an addon with nothing to configure.
8770
- */
8771
- /**
8772
- * The form schema of ONE integration instance, or `null` to use {@link globalSettingsSchema}.
8709
+ * The form schema of ONE integration instance, or `null` to use the scoped form.
8773
8710
  *
8774
8711
  * Override it only when an `instanceMode: multiple` addon's instances differ: an NVR integration
8775
8712
  * needs its connection fields, the default integration the addon's own sections. It is the
@@ -8942,6 +8879,19 @@ var BaseAddon = class {
8942
8879
  const overlay = await this.scopedSettingsOverlay(scope, cap, nodeId);
8943
8880
  return hydrateSchema(schema, overlay ? await this.overlayKeepingMarkers(stored, overlay) : stored, { inlineSecretsAsViews: true });
8944
8881
  }
8882
+ /**
8883
+ * The scoped schemas this addon serves: one entry per loaded (capability, scope), capabilities
8884
+ * in declaration order, scopes in {@link SCOPED_SETTINGS_SCOPES} order. `[]` when it declares
8885
+ * nothing.
8886
+ */
8887
+ async listScopedSettings() {
8888
+ await this.loadScopedSchemas();
8889
+ return [...this._scopedByCap].flatMap(([cap, entries]) => entries.map((entry) => ({
8890
+ cap,
8891
+ scope: entry.scope,
8892
+ sectionIds: entry.schema.sections.map((section) => section.id)
8893
+ })));
8894
+ }
8945
8895
  /** The OPERATOR's write of declared keys of one scope (D787 secret semantics). */
8946
8896
  async updateScopedSettings(scope, cap, patch, nodeId) {
8947
8897
  this._operatorWriteDepth++;
@@ -8967,32 +8917,15 @@ var BaseAddon = class {
8967
8917
  */
8968
8918
  async getIntegrationFormSchema(instance, nodeId) {
8969
8919
  const scoped = await this.integrationFormSchema(instance);
8970
- if (scoped === null) return this.getGlobalSettings(void 0, void 0, nodeId);
8920
+ if (scoped === null) return this.scopedForm(nodeId);
8971
8921
  return hydrateSchema(scoped, {}, { inlineSecretsAsViews: true });
8972
8922
  }
8973
- async getIntegrationSettings(nodeId) {
8974
- const declared = this.integrationSettingSections();
8975
- if (declared.length === 0) return null;
8976
- const schema = this.globalSettingsSchema();
8977
- if (!schema) throw new Error(`${this.constructor.name}: integrationSettingSections() names [${declared.join(", ")}] but globalSettingsSchema() returns null.`);
8978
- const byId = new Map(schema.sections.map((section) => [section.id, section]));
8979
- const sections = [];
8980
- for (const id of declared) {
8981
- const section = byId.get(id);
8982
- if (!section) throw new Error(`${this.constructor.name}: integrationSettingSections() names unknown section "${id}". Known sections: [${[...byId.keys()].join(", ")}].`);
8983
- const fields = dropPerNodeFields(section.fields);
8984
- if (fields.length === 0) continue;
8985
- sections.push({
8986
- ...section,
8987
- fields
8988
- });
8989
- }
8990
- if (sections.length === 0) return null;
8991
- const projected = await this.readRawProjectedStore(nodeId);
8992
- return hydrateSchema({
8993
- ...schema,
8994
- sections
8995
- }, projected, { inlineSecretsAsViews: true });
8923
+ /** The form of the scoped schemas this addon declared, hydrated from its store. */
8924
+ async scopedForm(nodeId) {
8925
+ await this.loadScopedSchemas();
8926
+ const schema = this.scopedFormSchema();
8927
+ if (!schema) return { sections: [] };
8928
+ return hydrateSchema(schema, await this.readRawProjectedStore(nodeId), { inlineSecretsAsViews: true });
8996
8929
  }
8997
8930
  /**
8998
8931
  * The raw addon store PROJECTED onto the target node's bare per-node keys:
@@ -9001,8 +8934,8 @@ var BaseAddon = class {
9001
8934
  * bare fallback), all `@`-scoped and stray bare per-node keys are dropped.
9002
8935
  * A no-op passthrough when the schema declares no `perNode` field.
9003
8936
  *
9004
- * This is the sanctioned way for a `getGlobalSettings` OVERRIDE that needs
9005
- * the store for custom option logic (option narrowing, value snapping) to
8937
+ * This is the sanctioned way for an addon that needs
8938
+ * the store for custom logic (option narrowing, value snapping) to
9006
8939
  * read it per-node — never `ctx.settings.readAddonStore()` directly.
9007
8940
  * `nodeId` omitted ⇒ the local node (node-blind injection from ctx).
9008
8941
  *
@@ -9054,7 +8987,7 @@ var BaseAddon = class {
9054
8987
  }
9055
8988
  /**
9056
8989
  * Whether ONE global key of this addon's store was written, read three-way
9057
- * (D651). For a question a hydrated view cannot answer: `getGlobalSettings`
8990
+ * (D651). For a question a hydrated view cannot answer: a hydrated form
9058
8991
  * reports `value ?? default`, so "the operator chose the default" and "nobody
9059
8992
  * chose" look the same, and a failed read looks like both. A `perNode` key is
9060
8993
  * not supported here: its stored name is scoped.
@@ -9088,7 +9021,7 @@ var BaseAddon = class {
9088
9021
  }
9089
9022
  /**
9090
9023
  * The OPERATOR's write — a settings form or an admin API call, dispatched by
9091
- * the kernel. Identical to {@link updateGlobalSettings}, except that a secret
9024
+ * the kernel. The one in-process write of the addon blob that is not a scoped write; a secret
9092
9025
  * the operator sends is stored as sent even when it equals a pre-keychain
9093
9026
  * inline value: the operator re-entering a password is a change, an addon
9094
9027
  * writing back what it read is not (D787).
@@ -9101,9 +9034,6 @@ var BaseAddon = class {
9101
9034
  this._operatorWriteDepth--;
9102
9035
  }
9103
9036
  }
9104
- async updateGlobalSettings(patch, nodeId) {
9105
- await this.applyGlobalPatch(patch, nodeId);
9106
- }
9107
9037
  /**
9108
9038
  * REMOVE stored secrets — their keychain values and their markers (D787).
9109
9039
  *
@@ -9146,8 +9076,7 @@ var BaseAddon = class {
9146
9076
  await this.resolveConfig();
9147
9077
  await this.onConfigChanged();
9148
9078
  this.emitLifecycle(EventCategory.AddonUpdated, { level: "global" });
9149
- const legacy = this.globalSettingsSchema();
9150
- this.maybeAutoRestart(Object.keys(barePatch), [...legacy === null ? [] : [legacy], ...this.loadedScopedSchemas().map((entry) => entry.schema)]);
9079
+ this.maybeAutoRestart(Object.keys(barePatch), this.loadedScopedSchemas().map((entry) => entry.schema));
9151
9080
  return true;
9152
9081
  }
9153
9082
  /**
@@ -9185,10 +9114,7 @@ var BaseAddon = class {
9185
9114
  this._nodeKeysByCap = /* @__PURE__ */ new Map();
9186
9115
  this._addonSecretTree = null;
9187
9116
  }
9188
- /**
9189
- * The form the settings API serves while an addon declares no {@link globalSettingsSchema}: the
9190
- * sections of its scoped schemas, so dropping the old hook does not blank the form.
9191
- */
9117
+ /** The form of an addon's scoped schemas: their sections, each shown once. */
9192
9118
  scopedFormSchema(cap) {
9193
9119
  const byId = /* @__PURE__ */ new Map();
9194
9120
  for (const entry of this.loadedScopedSchemas(cap)) for (const section of entry.schema.sections) if (!byId.has(section.id)) byId.set(section.id, section);
@@ -9200,8 +9126,7 @@ var BaseAddon = class {
9200
9126
  return [...this._scopedByCap.values()].flat();
9201
9127
  }
9202
9128
  /**
9203
- * The field keys that are stored per node: every field of a {@link nodeSettingsSchema}, plus
9204
- * the fields the legacy {@link globalSettingsSchema} still marks `perNode: true`. Derived once
9129
+ * The field keys that are stored per node: every field of a {@link nodeSettingsSchema}. Derived once
9205
9130
  * per `cap` argument and memoized (schemas are static declarations). Empty set ⇒ every
9206
9131
  * per-node code path is bypassed and the settings API behaves like the node-agnostic one.
9207
9132
  * Call {@link loadScopedSchemas} first (the async seams do).
@@ -9210,8 +9135,7 @@ var BaseAddon = class {
9210
9135
  const cacheKey = cap ?? "";
9211
9136
  const cached = this._nodeKeysByCap.get(cacheKey);
9212
9137
  if (cached) return cached;
9213
- const legacy = this.globalSettingsSchema(cap);
9214
- const keys = new Set(legacy ? legacy.sections.flatMap((section) => collectPerNodeFieldKeys(section.fields)) : []);
9138
+ const keys = /* @__PURE__ */ new Set();
9215
9139
  for (const { scope, schema } of this.loadedScopedSchemas(cap)) {
9216
9140
  if (scope !== "node") continue;
9217
9141
  for (const section of schema.sections) for (const key of collectValueFieldKeys(section.fields)) keys.add(key);
@@ -9429,8 +9353,6 @@ var BaseAddon = class {
9429
9353
  }
9430
9354
  declaredKeySet() {
9431
9355
  const keys = new Set(Object.keys(this.defaults));
9432
- const schema = this.globalSettingsSchema();
9433
- if (schema) for (const section of schema.sections) for (const key of collectFieldKeys(section.fields)) keys.add(key);
9434
9356
  for (const { schema: scoped } of this.loadedScopedSchemas()) for (const section of scoped.sections) for (const key of collectFieldKeys(section.fields)) keys.add(key);
9435
9357
  for (const key of this._declaredStateKeys) keys.add(key);
9436
9358
  for (const path of this.secretStatePaths) {
@@ -9528,7 +9450,7 @@ var BaseAddon = class {
9528
9450
  /** The addon store's secret tree: schema fields by TYPE, plus `secretStatePaths`. */
9529
9451
  addonSecretTree() {
9530
9452
  if (this._addonSecretTree === null) {
9531
- const tree = new Map(secretTreeFromSchema(this.globalSettingsSchema()));
9453
+ const tree = /* @__PURE__ */ new Map();
9532
9454
  for (const { schema } of this.loadedScopedSchemas()) for (const [key, node] of secretTreeFromSchema(schema)) tree.set(key, node);
9533
9455
  this._addonSecretTree = mergeSecretStatePaths(tree, this.secretStatePaths);
9534
9456
  }
@@ -9740,47 +9662,6 @@ function classifyStoreError(err) {
9740
9662
  if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
9741
9663
  return "permanent";
9742
9664
  }
9743
- /**
9744
- * Collect the keys of every field marked `perNode: true`, recursing into
9745
- * layout containers (`group` fields and `sub-tabs` tabs) the same way
9746
- * `hydrateSchema` does. Valueless structural fields (separator/info/…)
9747
- * don't declare `perNode` and are excluded by the `in` narrowing.
9748
- */
9749
- /**
9750
- * The same fields with every `perNode: true` one removed, recursing into layout
9751
- * containers exactly as {@link collectPerNodeFieldKeys} does. A container left
9752
- * with no child is dropped rather than rendered empty.
9753
- *
9754
- * Used by `getIntegrationSettings`: an integration is not a node, so a field
9755
- * whose store key is `<key>@<nodeId>` has no node to belong to there.
9756
- */
9757
- function dropPerNodeFields(fields) {
9758
- const kept = [];
9759
- for (const field of fields) {
9760
- if (field.type === "group") {
9761
- const inner = dropPerNodeFields(field.fields);
9762
- if (inner.length > 0) kept.push({
9763
- ...field,
9764
- fields: inner
9765
- });
9766
- continue;
9767
- }
9768
- if (field.type === "sub-tabs") {
9769
- const tabs = field.tabs.map((tab) => ({
9770
- ...tab,
9771
- fields: dropPerNodeFields(tab.fields)
9772
- })).filter((tab) => tab.fields.length > 0);
9773
- if (tabs.length > 0) kept.push({
9774
- ...field,
9775
- tabs
9776
- });
9777
- continue;
9778
- }
9779
- if ("perNode" in field && field.perNode === true) continue;
9780
- kept.push(field);
9781
- }
9782
- return kept;
9783
- }
9784
9665
  /** The keys of the value-holding fields, recursing into layout containers. */
9785
9666
  function collectValueFieldKeys(fields) {
9786
9667
  const collected = [];
@@ -9813,21 +9694,6 @@ function collectFieldKeys(fields) {
9813
9694
  }
9814
9695
  return collected;
9815
9696
  }
9816
- function collectPerNodeFieldKeys(fields) {
9817
- const collected = [];
9818
- for (const field of fields) {
9819
- if (field.type === "group") {
9820
- collected.push(...collectPerNodeFieldKeys(field.fields));
9821
- continue;
9822
- }
9823
- if (field.type === "sub-tabs") {
9824
- for (const tab of field.tabs) collected.push(...collectPerNodeFieldKeys(tab.fields));
9825
- continue;
9826
- }
9827
- if ("perNode" in field && field.perNode === true) collected.push(field.key);
9828
- }
9829
- return collected;
9830
- }
9831
9697
  /**
9832
9698
  * Normalize an `ICamstackAddon.initialize()` return value into the
9833
9699
  * `AddonInitResult` envelope. Arrays are wrapped into `{ providers }`;
@@ -12591,13 +12457,25 @@ Object.freeze({
12591
12457
  "path": "temperature",
12592
12458
  "valueType": "number"
12593
12459
  }],
12594
- "timed-run": [{
12595
- "path": "activeUntil",
12596
- "valueType": "number"
12597
- }, {
12598
- "path": "requestedBy",
12599
- "valueType": "string"
12600
- }],
12460
+ "timed-run": [
12461
+ {
12462
+ "path": "activeUntil",
12463
+ "valueType": "number"
12464
+ },
12465
+ {
12466
+ "path": "requestedBy",
12467
+ "valueType": "string"
12468
+ },
12469
+ {
12470
+ "path": "quickRun.duration",
12471
+ "valueType": "number"
12472
+ },
12473
+ {
12474
+ "path": "quickRun.unit",
12475
+ "valueType": "enum",
12476
+ "enumValues": ["s", "min"]
12477
+ }
12478
+ ],
12601
12479
  "update": [
12602
12480
  {
12603
12481
  "path": "currentVersion",
@@ -12821,7 +12699,7 @@ object({
12821
12699
  params: record(string(), union([string(), number()])).optional()
12822
12700
  });
12823
12701
  //#endregion
12824
- //#region ../types/dist/composition-BmBHuDTQ.mjs
12702
+ //#region ../types/dist/composition-Bx0JvKUU.mjs
12825
12703
  /**
12826
12704
  * The ffmpeg build every CamStack node downloads, per platform and arch.
12827
12705
  *
@@ -13983,6 +13861,387 @@ var NodeColorIdSchema = _enum([
13983
13861
  "node-h"
13984
13862
  ]);
13985
13863
  //#endregion
13864
+ //#region ../types/dist/convert-BAzH15HU.mjs
13865
+ /**
13866
+ * Frozen unit → spec table. `•` in the doc marks each dimension's canonical
13867
+ * unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
13868
+ * `factor = 5/9`, `offset = -160/9` (kept as exact expressions, not rounded
13869
+ * decimals). K derives from `°C = K − 273.15`.
13870
+ */
13871
+ var UNIT_TABLE = {
13872
+ "°C": {
13873
+ dimension: "temperature",
13874
+ factor: 1,
13875
+ offset: 0
13876
+ },
13877
+ "°F": {
13878
+ dimension: "temperature",
13879
+ factor: 5 / 9,
13880
+ offset: -160 / 9
13881
+ },
13882
+ K: {
13883
+ dimension: "temperature",
13884
+ factor: 1,
13885
+ offset: -273.15
13886
+ },
13887
+ hPa: {
13888
+ dimension: "pressure",
13889
+ factor: 1,
13890
+ offset: 0
13891
+ },
13892
+ kPa: {
13893
+ dimension: "pressure",
13894
+ factor: 10,
13895
+ offset: 0
13896
+ },
13897
+ Pa: {
13898
+ dimension: "pressure",
13899
+ factor: .01,
13900
+ offset: 0
13901
+ },
13902
+ mbar: {
13903
+ dimension: "pressure",
13904
+ factor: 1,
13905
+ offset: 0
13906
+ },
13907
+ bar: {
13908
+ dimension: "pressure",
13909
+ factor: 1e3,
13910
+ offset: 0
13911
+ },
13912
+ inHg: {
13913
+ dimension: "pressure",
13914
+ factor: 33.8639,
13915
+ offset: 0
13916
+ },
13917
+ mmHg: {
13918
+ dimension: "pressure",
13919
+ factor: 1.33322,
13920
+ offset: 0
13921
+ },
13922
+ psi: {
13923
+ dimension: "pressure",
13924
+ factor: 68.9476,
13925
+ offset: 0
13926
+ },
13927
+ "m/s": {
13928
+ dimension: "speed",
13929
+ factor: 1,
13930
+ offset: 0
13931
+ },
13932
+ "km/h": {
13933
+ dimension: "speed",
13934
+ factor: 1 / 3.6,
13935
+ offset: 0
13936
+ },
13937
+ mph: {
13938
+ dimension: "speed",
13939
+ factor: .44704,
13940
+ offset: 0
13941
+ },
13942
+ kn: {
13943
+ dimension: "speed",
13944
+ factor: .514444,
13945
+ offset: 0
13946
+ },
13947
+ "mm/h": {
13948
+ dimension: "precipitation-rate",
13949
+ factor: 1,
13950
+ offset: 0
13951
+ },
13952
+ "in/h": {
13953
+ dimension: "precipitation-rate",
13954
+ factor: 25.4,
13955
+ offset: 0
13956
+ },
13957
+ m: {
13958
+ dimension: "length",
13959
+ factor: 1,
13960
+ offset: 0
13961
+ },
13962
+ mm: {
13963
+ dimension: "length",
13964
+ factor: .001,
13965
+ offset: 0
13966
+ },
13967
+ cm: {
13968
+ dimension: "length",
13969
+ factor: .01,
13970
+ offset: 0
13971
+ },
13972
+ km: {
13973
+ dimension: "length",
13974
+ factor: 1e3,
13975
+ offset: 0
13976
+ },
13977
+ in: {
13978
+ dimension: "length",
13979
+ factor: .0254,
13980
+ offset: 0
13981
+ },
13982
+ ft: {
13983
+ dimension: "length",
13984
+ factor: .3048,
13985
+ offset: 0
13986
+ },
13987
+ mi: {
13988
+ dimension: "length",
13989
+ factor: 1609.344,
13990
+ offset: 0
13991
+ },
13992
+ "m²": {
13993
+ dimension: "area",
13994
+ factor: 1,
13995
+ offset: 0
13996
+ },
13997
+ lx: {
13998
+ dimension: "illuminance",
13999
+ factor: 1,
14000
+ offset: 0
14001
+ },
14002
+ "W/m²": {
14003
+ dimension: "irradiance",
14004
+ factor: 1,
14005
+ offset: 0
14006
+ },
14007
+ W: {
14008
+ dimension: "power",
14009
+ factor: 1,
14010
+ offset: 0
14011
+ },
14012
+ kW: {
14013
+ dimension: "power",
14014
+ factor: 1e3,
14015
+ offset: 0
14016
+ },
14017
+ VA: {
14018
+ dimension: "apparent-power",
14019
+ factor: 1,
14020
+ offset: 0
14021
+ },
14022
+ Wh: {
14023
+ dimension: "energy",
14024
+ factor: 1,
14025
+ offset: 0
14026
+ },
14027
+ kWh: {
14028
+ dimension: "energy",
14029
+ factor: 1e3,
14030
+ offset: 0
14031
+ },
14032
+ MWh: {
14033
+ dimension: "energy",
14034
+ factor: 1e6,
14035
+ offset: 0
14036
+ },
14037
+ V: {
14038
+ dimension: "voltage",
14039
+ factor: 1,
14040
+ offset: 0
14041
+ },
14042
+ mV: {
14043
+ dimension: "voltage",
14044
+ factor: .001,
14045
+ offset: 0
14046
+ },
14047
+ A: {
14048
+ dimension: "current",
14049
+ factor: 1,
14050
+ offset: 0
14051
+ },
14052
+ mA: {
14053
+ dimension: "current",
14054
+ factor: .001,
14055
+ offset: 0
14056
+ },
14057
+ ppm: {
14058
+ dimension: "concentration-volume",
14059
+ factor: 1,
14060
+ offset: 0
14061
+ },
14062
+ ppb: {
14063
+ dimension: "concentration-volume",
14064
+ factor: .001,
14065
+ offset: 0
14066
+ },
14067
+ "µg/m³": {
14068
+ dimension: "concentration-mass",
14069
+ factor: 1,
14070
+ offset: 0
14071
+ },
14072
+ "mg/m³": {
14073
+ dimension: "concentration-mass",
14074
+ factor: 1e3,
14075
+ offset: 0
14076
+ },
14077
+ kg: {
14078
+ dimension: "mass",
14079
+ factor: 1,
14080
+ offset: 0
14081
+ },
14082
+ g: {
14083
+ dimension: "mass",
14084
+ factor: .001,
14085
+ offset: 0
14086
+ },
14087
+ lb: {
14088
+ dimension: "mass",
14089
+ factor: .453592,
14090
+ offset: 0
14091
+ },
14092
+ oz: {
14093
+ dimension: "mass",
14094
+ factor: .0283495,
14095
+ offset: 0
14096
+ },
14097
+ "%": {
14098
+ dimension: "percentage",
14099
+ factor: 1,
14100
+ offset: 0
14101
+ },
14102
+ L: {
14103
+ dimension: "volume",
14104
+ factor: 1,
14105
+ offset: 0
14106
+ },
14107
+ mL: {
14108
+ dimension: "volume",
14109
+ factor: .001,
14110
+ offset: 0
14111
+ },
14112
+ gal: {
14113
+ dimension: "volume",
14114
+ factor: 3.785411784,
14115
+ offset: 0
14116
+ },
14117
+ s: {
14118
+ dimension: "duration",
14119
+ factor: 1,
14120
+ offset: 0
14121
+ },
14122
+ ms: {
14123
+ dimension: "duration",
14124
+ factor: .001,
14125
+ offset: 0
14126
+ },
14127
+ min: {
14128
+ dimension: "duration",
14129
+ factor: 60,
14130
+ offset: 0
14131
+ },
14132
+ h: {
14133
+ dimension: "duration",
14134
+ factor: 3600,
14135
+ offset: 0
14136
+ },
14137
+ d: {
14138
+ dimension: "duration",
14139
+ factor: 86400,
14140
+ offset: 0
14141
+ },
14142
+ B: {
14143
+ dimension: "information",
14144
+ factor: 1,
14145
+ offset: 0
14146
+ },
14147
+ KiB: {
14148
+ dimension: "information",
14149
+ factor: 1024,
14150
+ offset: 0
14151
+ },
14152
+ MiB: {
14153
+ dimension: "information",
14154
+ factor: 1024 ** 2,
14155
+ offset: 0
14156
+ },
14157
+ GiB: {
14158
+ dimension: "information",
14159
+ factor: 1024 ** 3,
14160
+ offset: 0
14161
+ },
14162
+ TiB: {
14163
+ dimension: "information",
14164
+ factor: 1024 ** 4,
14165
+ offset: 0
14166
+ },
14167
+ kB: {
14168
+ dimension: "information",
14169
+ factor: 1e3,
14170
+ offset: 0
14171
+ },
14172
+ MB: {
14173
+ dimension: "information",
14174
+ factor: 1e6,
14175
+ offset: 0
14176
+ },
14177
+ GB: {
14178
+ dimension: "information",
14179
+ factor: 1e9,
14180
+ offset: 0
14181
+ },
14182
+ "°": {
14183
+ dimension: "angle",
14184
+ factor: 1,
14185
+ offset: 0
14186
+ },
14187
+ dBFS: {
14188
+ dimension: "sound-level",
14189
+ factor: 1,
14190
+ offset: 0
14191
+ },
14192
+ dBm: {
14193
+ dimension: "signal-level",
14194
+ factor: 1,
14195
+ offset: 0
14196
+ },
14197
+ mired: {
14198
+ dimension: "colour-temperature",
14199
+ factor: 1,
14200
+ offset: 0
14201
+ },
14202
+ kbps: {
14203
+ dimension: "bitrate",
14204
+ factor: 1,
14205
+ offset: 0
14206
+ },
14207
+ Mbps: {
14208
+ dimension: "bitrate",
14209
+ factor: 1e3,
14210
+ offset: 0
14211
+ },
14212
+ fps: {
14213
+ dimension: "rate",
14214
+ factor: 1,
14215
+ offset: 0
14216
+ }
14217
+ };
14218
+ /** Resolve a unit's `UnitSpec`, or `undefined` when the spelling is unknown. */
14219
+ function specFor(unit) {
14220
+ return Object.hasOwn(UNIT_TABLE, unit) ? UNIT_TABLE[unit] : void 0;
14221
+ }
14222
+ /** Value in `spec`'s unit → its dimension's canonical unit. */
14223
+ function toCanonical(value, spec) {
14224
+ return value * spec.factor + spec.offset;
14225
+ }
14226
+ /** Canonical-unit value → the unit described by `spec`. */
14227
+ function fromCanonical(canonical, spec) {
14228
+ return (canonical - spec.offset) / spec.factor;
14229
+ }
14230
+ /**
14231
+ * Graceful variant for the render path: returns the converted value, or
14232
+ * `undefined` when the conversion is refused (unknown unit / cross-dimension).
14233
+ * Never throws — a render caller falls back to the raw value + source unit.
14234
+ */
14235
+ function tryConvertUnit(value, from, to) {
14236
+ if (from === to) return value;
14237
+ const fromSpec = specFor(from);
14238
+ if (!fromSpec) return void 0;
14239
+ const toSpec = specFor(to);
14240
+ if (!toSpec) return void 0;
14241
+ if (fromSpec.dimension !== toSpec.dimension) return void 0;
14242
+ return fromCanonical(toCanonical(value, fromSpec), toSpec);
14243
+ }
14244
+ //#endregion
13986
14245
  //#region ../types/dist/index.mjs
13987
14246
  var SMTP_INBOUND_DEFAULT_PORT = 2525;
13988
14247
  var SMTP_INBOUND_DEFAULT_DOMAIN = "camstack.local";
@@ -43144,6 +43403,7 @@ var ExpressionBindingSourceSchema = union([
43144
43403
  object({
43145
43404
  kind: literal("global"),
43146
43405
  sourceStableId: string(),
43406
+ addonId: string().optional(),
43147
43407
  cap: string(),
43148
43408
  fieldPath: string()
43149
43409
  })
@@ -43210,385 +43470,6 @@ var SourceInfoSchema = object({
43210
43470
  raw: record(string(), unknown()).optional()
43211
43471
  });
43212
43472
  /**
43213
- * Frozen unit → spec table. `•` in the doc marks each dimension's canonical
43214
- * unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
43215
- * `factor = 5/9`, `offset = -160/9` (kept as exact expressions, not rounded
43216
- * decimals). K derives from `°C = K − 273.15`.
43217
- */
43218
- var UNIT_TABLE = {
43219
- "°C": {
43220
- dimension: "temperature",
43221
- factor: 1,
43222
- offset: 0
43223
- },
43224
- "°F": {
43225
- dimension: "temperature",
43226
- factor: 5 / 9,
43227
- offset: -160 / 9
43228
- },
43229
- K: {
43230
- dimension: "temperature",
43231
- factor: 1,
43232
- offset: -273.15
43233
- },
43234
- hPa: {
43235
- dimension: "pressure",
43236
- factor: 1,
43237
- offset: 0
43238
- },
43239
- kPa: {
43240
- dimension: "pressure",
43241
- factor: 10,
43242
- offset: 0
43243
- },
43244
- Pa: {
43245
- dimension: "pressure",
43246
- factor: .01,
43247
- offset: 0
43248
- },
43249
- mbar: {
43250
- dimension: "pressure",
43251
- factor: 1,
43252
- offset: 0
43253
- },
43254
- bar: {
43255
- dimension: "pressure",
43256
- factor: 1e3,
43257
- offset: 0
43258
- },
43259
- inHg: {
43260
- dimension: "pressure",
43261
- factor: 33.8639,
43262
- offset: 0
43263
- },
43264
- mmHg: {
43265
- dimension: "pressure",
43266
- factor: 1.33322,
43267
- offset: 0
43268
- },
43269
- psi: {
43270
- dimension: "pressure",
43271
- factor: 68.9476,
43272
- offset: 0
43273
- },
43274
- "m/s": {
43275
- dimension: "speed",
43276
- factor: 1,
43277
- offset: 0
43278
- },
43279
- "km/h": {
43280
- dimension: "speed",
43281
- factor: 1 / 3.6,
43282
- offset: 0
43283
- },
43284
- mph: {
43285
- dimension: "speed",
43286
- factor: .44704,
43287
- offset: 0
43288
- },
43289
- kn: {
43290
- dimension: "speed",
43291
- factor: .514444,
43292
- offset: 0
43293
- },
43294
- "mm/h": {
43295
- dimension: "precipitation-rate",
43296
- factor: 1,
43297
- offset: 0
43298
- },
43299
- "in/h": {
43300
- dimension: "precipitation-rate",
43301
- factor: 25.4,
43302
- offset: 0
43303
- },
43304
- m: {
43305
- dimension: "length",
43306
- factor: 1,
43307
- offset: 0
43308
- },
43309
- mm: {
43310
- dimension: "length",
43311
- factor: .001,
43312
- offset: 0
43313
- },
43314
- cm: {
43315
- dimension: "length",
43316
- factor: .01,
43317
- offset: 0
43318
- },
43319
- km: {
43320
- dimension: "length",
43321
- factor: 1e3,
43322
- offset: 0
43323
- },
43324
- in: {
43325
- dimension: "length",
43326
- factor: .0254,
43327
- offset: 0
43328
- },
43329
- ft: {
43330
- dimension: "length",
43331
- factor: .3048,
43332
- offset: 0
43333
- },
43334
- mi: {
43335
- dimension: "length",
43336
- factor: 1609.344,
43337
- offset: 0
43338
- },
43339
- "m²": {
43340
- dimension: "area",
43341
- factor: 1,
43342
- offset: 0
43343
- },
43344
- lx: {
43345
- dimension: "illuminance",
43346
- factor: 1,
43347
- offset: 0
43348
- },
43349
- "W/m²": {
43350
- dimension: "irradiance",
43351
- factor: 1,
43352
- offset: 0
43353
- },
43354
- W: {
43355
- dimension: "power",
43356
- factor: 1,
43357
- offset: 0
43358
- },
43359
- kW: {
43360
- dimension: "power",
43361
- factor: 1e3,
43362
- offset: 0
43363
- },
43364
- VA: {
43365
- dimension: "apparent-power",
43366
- factor: 1,
43367
- offset: 0
43368
- },
43369
- Wh: {
43370
- dimension: "energy",
43371
- factor: 1,
43372
- offset: 0
43373
- },
43374
- kWh: {
43375
- dimension: "energy",
43376
- factor: 1e3,
43377
- offset: 0
43378
- },
43379
- MWh: {
43380
- dimension: "energy",
43381
- factor: 1e6,
43382
- offset: 0
43383
- },
43384
- V: {
43385
- dimension: "voltage",
43386
- factor: 1,
43387
- offset: 0
43388
- },
43389
- mV: {
43390
- dimension: "voltage",
43391
- factor: .001,
43392
- offset: 0
43393
- },
43394
- A: {
43395
- dimension: "current",
43396
- factor: 1,
43397
- offset: 0
43398
- },
43399
- mA: {
43400
- dimension: "current",
43401
- factor: .001,
43402
- offset: 0
43403
- },
43404
- ppm: {
43405
- dimension: "concentration-volume",
43406
- factor: 1,
43407
- offset: 0
43408
- },
43409
- ppb: {
43410
- dimension: "concentration-volume",
43411
- factor: .001,
43412
- offset: 0
43413
- },
43414
- "µg/m³": {
43415
- dimension: "concentration-mass",
43416
- factor: 1,
43417
- offset: 0
43418
- },
43419
- "mg/m³": {
43420
- dimension: "concentration-mass",
43421
- factor: 1e3,
43422
- offset: 0
43423
- },
43424
- kg: {
43425
- dimension: "mass",
43426
- factor: 1,
43427
- offset: 0
43428
- },
43429
- g: {
43430
- dimension: "mass",
43431
- factor: .001,
43432
- offset: 0
43433
- },
43434
- lb: {
43435
- dimension: "mass",
43436
- factor: .453592,
43437
- offset: 0
43438
- },
43439
- oz: {
43440
- dimension: "mass",
43441
- factor: .0283495,
43442
- offset: 0
43443
- },
43444
- "%": {
43445
- dimension: "percentage",
43446
- factor: 1,
43447
- offset: 0
43448
- },
43449
- L: {
43450
- dimension: "volume",
43451
- factor: 1,
43452
- offset: 0
43453
- },
43454
- mL: {
43455
- dimension: "volume",
43456
- factor: .001,
43457
- offset: 0
43458
- },
43459
- gal: {
43460
- dimension: "volume",
43461
- factor: 3.785411784,
43462
- offset: 0
43463
- },
43464
- s: {
43465
- dimension: "duration",
43466
- factor: 1,
43467
- offset: 0
43468
- },
43469
- ms: {
43470
- dimension: "duration",
43471
- factor: .001,
43472
- offset: 0
43473
- },
43474
- min: {
43475
- dimension: "duration",
43476
- factor: 60,
43477
- offset: 0
43478
- },
43479
- h: {
43480
- dimension: "duration",
43481
- factor: 3600,
43482
- offset: 0
43483
- },
43484
- d: {
43485
- dimension: "duration",
43486
- factor: 86400,
43487
- offset: 0
43488
- },
43489
- B: {
43490
- dimension: "information",
43491
- factor: 1,
43492
- offset: 0
43493
- },
43494
- KiB: {
43495
- dimension: "information",
43496
- factor: 1024,
43497
- offset: 0
43498
- },
43499
- MiB: {
43500
- dimension: "information",
43501
- factor: 1024 ** 2,
43502
- offset: 0
43503
- },
43504
- GiB: {
43505
- dimension: "information",
43506
- factor: 1024 ** 3,
43507
- offset: 0
43508
- },
43509
- TiB: {
43510
- dimension: "information",
43511
- factor: 1024 ** 4,
43512
- offset: 0
43513
- },
43514
- kB: {
43515
- dimension: "information",
43516
- factor: 1e3,
43517
- offset: 0
43518
- },
43519
- MB: {
43520
- dimension: "information",
43521
- factor: 1e6,
43522
- offset: 0
43523
- },
43524
- GB: {
43525
- dimension: "information",
43526
- factor: 1e9,
43527
- offset: 0
43528
- },
43529
- "°": {
43530
- dimension: "angle",
43531
- factor: 1,
43532
- offset: 0
43533
- },
43534
- dBFS: {
43535
- dimension: "sound-level",
43536
- factor: 1,
43537
- offset: 0
43538
- },
43539
- dBm: {
43540
- dimension: "signal-level",
43541
- factor: 1,
43542
- offset: 0
43543
- },
43544
- mired: {
43545
- dimension: "colour-temperature",
43546
- factor: 1,
43547
- offset: 0
43548
- },
43549
- kbps: {
43550
- dimension: "bitrate",
43551
- factor: 1,
43552
- offset: 0
43553
- },
43554
- Mbps: {
43555
- dimension: "bitrate",
43556
- factor: 1e3,
43557
- offset: 0
43558
- },
43559
- fps: {
43560
- dimension: "rate",
43561
- factor: 1,
43562
- offset: 0
43563
- }
43564
- };
43565
- /** Resolve a unit's `UnitSpec`, or `undefined` when the spelling is unknown. */
43566
- function specFor(unit) {
43567
- return Object.hasOwn(UNIT_TABLE, unit) ? UNIT_TABLE[unit] : void 0;
43568
- }
43569
- /** Value in `spec`'s unit → its dimension's canonical unit. */
43570
- function toCanonical(value, spec) {
43571
- return value * spec.factor + spec.offset;
43572
- }
43573
- /** Canonical-unit value → the unit described by `spec`. */
43574
- function fromCanonical(canonical, spec) {
43575
- return (canonical - spec.offset) / spec.factor;
43576
- }
43577
- /**
43578
- * Graceful variant for the render path: returns the converted value, or
43579
- * `undefined` when the conversion is refused (unknown unit / cross-dimension).
43580
- * Never throws — a render caller falls back to the raw value + source unit.
43581
- */
43582
- function tryConvertUnit(value, from, to) {
43583
- if (from === to) return value;
43584
- const fromSpec = specFor(from);
43585
- if (!fromSpec) return void 0;
43586
- const toSpec = specFor(to);
43587
- if (!toSpec) return void 0;
43588
- if (fromSpec.dimension !== toSpec.dimension) return void 0;
43589
- return fromCanonical(toCanonical(value, fromSpec), toSpec);
43590
- }
43591
- /**
43592
43473
  * A number a person types for a physical quantity — the input side of the
43593
43474
  * value + unit contract (D972).
43594
43475
  *
@@ -45369,26 +45250,23 @@ var SettingsSchemaWithValuesSchema = object({
45369
45250
  var SettingsPatchSchema = record(string(), unknown());
45370
45251
  /** The scope of a scoped-settings call (D986): where the capability declared the values. */
45371
45252
  var ScopedSettingsScopeSchema = _enum(SCOPED_SETTINGS_SCOPES);
45253
+ /** One scoped schema an addon serves: its capability, scope and section ids. */
45254
+ var ScopedSettingsDeclarationSchema = object({
45255
+ cap: string(),
45256
+ scope: ScopedSettingsScopeSchema,
45257
+ sectionIds: array(string())
45258
+ });
45372
45259
  /** Standard success response for update operations. */
45373
45260
  var SettingsUpdateResultSchema = object({ success: literal(true) });
45374
45261
  method(object({
45375
- addonId: string(),
45376
- nodeId: string().optional(),
45377
- overlay: record(string(), unknown()).optional(),
45378
- cap: string().optional()
45379
- }), SettingsSchemaWithValuesSchema.nullable()), method(object({
45380
- addonId: string(),
45381
- nodeId: string().optional(),
45382
- patch: SettingsPatchSchema
45383
- }), SettingsUpdateResultSchema, {
45384
- kind: "mutation",
45385
- auth: "admin"
45386
- }), method(object({
45387
45262
  addonId: string(),
45388
45263
  cap: string(),
45389
45264
  scope: ScopedSettingsScopeSchema,
45390
45265
  nodeId: string().optional()
45391
45266
  }), SettingsSchemaWithValuesSchema.nullable()), method(object({
45267
+ addonId: string(),
45268
+ nodeId: string().optional()
45269
+ }), array(ScopedSettingsDeclarationSchema).nullable()), method(object({
45392
45270
  addonId: string(),
45393
45271
  cap: string(),
45394
45272
  scope: ScopedSettingsScopeSchema,
@@ -45403,9 +45281,6 @@ method(object({
45403
45281
  scope: ScopedSettingsScopeSchema,
45404
45282
  nodeId: string().optional()
45405
45283
  }), record(string(), unknown()).nullable()), method(object({
45406
- addonId: string(),
45407
- nodeId: string().optional()
45408
- }), SettingsSchemaWithValuesSchema.nullable()), method(object({
45409
45284
  addonId: string(),
45410
45285
  nodeId: string().optional(),
45411
45286
  instance: IntegrationInstanceRefSchema
@@ -46745,7 +46620,7 @@ var BackupDestinationInfoSchema = object({
46745
46620
  id: string(),
46746
46621
  /**
46747
46622
  * Manifest id of the owning addon. The Settings button on the
46748
- * destination card opens that addon's `globalSettingsSchema` panel.
46623
+ * destination card opens that addon's scoped settings panel.
46749
46624
  */
46750
46625
  addonId: string(),
46751
46626
  /** Operator-toggled enable flag from the destination-policy table. */
@@ -51260,6 +51135,7 @@ var deviceExportCapability = {
51260
51135
  })
51261
51136
  }
51262
51137
  };
51138
+ var DeviceAliasSchema = string().max(64).regex(/^[a-z][a-z0-9_]*$/);
51263
51139
  /**
51264
51140
  * A SITE ZONE — a named part of the property that several locations belong to.
51265
51141
  *
@@ -51653,6 +51529,12 @@ var DeviceInfoSchema = object({
51653
51529
  addonId: string(),
51654
51530
  type: _enum(DeviceType),
51655
51531
  name: string(),
51532
+ /** The name a value template uses for this device (`{{ stufa_veranda.temperature }}`),
51533
+ * entity_id style. Generated once from the name at first registration, unique
51534
+ * cluster-wide, editable through `setAlias`, NOT changed by a rename (D1021).
51535
+ * Optional: a record produced by an older build omits it until the boot
51536
+ * backfill has run. */
51537
+ alias: DeviceAliasSchema.optional(),
51656
51538
  /** Operator-organisational location label. `null` when unset. */
51657
51539
  location: string().nullable(),
51658
51540
  /** Soft-disabled flag. */
@@ -51972,6 +51854,25 @@ method(object({
51972
51854
  }), _void(), {
51973
51855
  kind: "mutation",
51974
51856
  auth: "admin"
51857
+ }), method(object({
51858
+ deviceId: number(),
51859
+ alias: string()
51860
+ }), discriminatedUnion("ok", [object({
51861
+ ok: literal(true),
51862
+ alias: DeviceAliasSchema
51863
+ }), object({
51864
+ ok: literal(false),
51865
+ reason: _enum([
51866
+ "empty",
51867
+ "too-long",
51868
+ "grammar",
51869
+ "reserved",
51870
+ "taken"
51871
+ ]),
51872
+ takenBy: number().optional()
51873
+ })]), {
51874
+ kind: "mutation",
51875
+ auth: "admin"
51975
51876
  }), method(object({
51976
51877
  deviceId: number(),
51977
51878
  location: string().nullable()
@@ -64711,6 +64612,11 @@ var NcScheduleSchema = object({
64711
64612
  * as a STATE SUMMARY at the end of each window of `schedule`.
64712
64613
  */
64713
64614
  var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
64615
+ _enum([
64616
+ "activation",
64617
+ "deactivation",
64618
+ "schedule"
64619
+ ]);
64714
64620
  /**
64715
64621
  * How a summary window is SENT (D698): `rule` (absent) = ONE notification with
64716
64622
  * every section; `section` = one notification per section with something to
@@ -64727,11 +64633,26 @@ var NcStateSummarySplitSchema = _enum(["rule", "section"]);
64727
64633
  * midnight crossing); the send time is each window's END. Refused on the
64728
64634
  * `alarm` family, which stays instant (`systemEventDeliveryProblems`).
64729
64635
  */
64730
- var NcSystemEventDeliverySchema = discriminatedUnion("mode", [object({ mode: literal("instant") }), object({
64731
- mode: literal("summary"),
64732
- schedule: NcScheduleSchema,
64733
- split: NcStateSummarySplitSchema.optional()
64734
- })]);
64636
+ var NcSystemEventDeliverySchema = discriminatedUnion("mode", [
64637
+ object({ mode: literal("instant") }),
64638
+ object({
64639
+ mode: literal("summary"),
64640
+ schedule: NcScheduleSchema,
64641
+ split: NcStateSummarySplitSchema.optional()
64642
+ }),
64643
+ object({
64644
+ mode: literal("modes"),
64645
+ /** The bad edge, and every kind that has a single edge. */
64646
+ onActivation: boolean(),
64647
+ /** The recovery edges of the classes of the selected kinds (derived, never stored per kind). */
64648
+ onDeactivation: boolean(),
64649
+ /** A state summary at the end of each window; absent = no summary. */
64650
+ onSchedule: object({
64651
+ schedule: NcScheduleSchema,
64652
+ grouping: NcStateSummarySplitSchema
64653
+ }).optional()
64654
+ })
64655
+ ]);
64735
64656
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
64736
64657
  var NcPlateMatcherSchema = object({
64737
64658
  /**
@@ -74507,7 +74428,7 @@ var TerminalInstanceInfoSchema = object({
74507
74428
  /**
74508
74429
  * False while the node the instance is bound to is not in the cluster
74509
74430
  * topology (forgotten, renamed, re-paired). The instance is kept; the
74510
- * operator re-points it with `updateInstance({ targetNodeId })`.
74431
+ * operator re-points it on the Terminal page.
74511
74432
  */
74512
74433
  nodeInCluster: boolean(),
74513
74434
  profileId: string(),
@@ -74545,41 +74466,7 @@ var TerminalOutputBatchSchema = object({
74545
74466
  snapshot: string().optional(),
74546
74467
  events: array(TerminalOutputEventSchema).readonly()
74547
74468
  });
74548
- method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
74549
- targetNodeId: string().min(1),
74550
- profileId: string().min(1),
74551
- name: string().trim().min(1).max(160).optional(),
74552
- executable: string().max(1024).optional(),
74553
- args: array(string().max(2048)).max(64).optional(),
74554
- cwd: string().max(1024).optional(),
74555
- environment: array(string().max(4096)).max(64).optional(),
74556
- profileSettings: ProfileSettingsBagSchema.optional()
74557
- }), TerminalInstanceInfoSchema, {
74558
- kind: "mutation",
74559
- auth: "admin"
74560
- }), method(object({
74561
- instanceId: string().min(1),
74562
- /** Re-point the instance to another node; the profile must exist there. */
74563
- targetNodeId: string().min(1).max(256).optional(),
74564
- name: string().trim().min(1).max(160).optional(),
74565
- executable: string().max(1024).optional(),
74566
- args: array(string().max(2048)).max(64).optional(),
74567
- cwd: string().max(1024).optional(),
74568
- environment: array(string().max(4096)).max(64).optional(),
74569
- profileSettings: ProfileSettingsBagSchema.optional()
74570
- }), TerminalInstanceInfoSchema, {
74571
- kind: "mutation",
74572
- auth: "admin"
74573
- }), method(object({ instanceId: string().min(1) }), _void(), {
74574
- kind: "mutation",
74575
- auth: "admin"
74576
- }), method(object({
74577
- instanceId: string().min(1),
74578
- enabled: boolean()
74579
- }), TerminalInstanceInfoSchema, {
74580
- kind: "mutation",
74581
- auth: "admin"
74582
- }), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
74469
+ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
74583
74470
  stableId: string().min(1),
74584
74471
  name: string().trim().min(1).max(160).optional()
74585
74472
  }), TerminalInstanceInfoSchema, {
@@ -74648,6 +74535,11 @@ var TimedRunUnitSchema = _enum(["s", "min"]);
74648
74535
  _enum(["switch", "pet-fountain"]);
74649
74536
  DeviceType.Heater, DeviceType.PetFountain;
74650
74537
  DeviceType.Heater, DeviceType.PetFountain;
74538
+ /** One duration, as the one-tap run asks for it. */
74539
+ var TimedRunQuickRunSchema = object({
74540
+ duration: number().positive().finite(),
74541
+ unit: TimedRunUnitSchema
74542
+ });
74651
74543
  /** Why a request was not carried out. Typed, so a caller can say it in words. */
74652
74544
  var TimedRunRefusalSchema = _enum([
74653
74545
  "unsupported-device",
@@ -74668,9 +74560,30 @@ object({
74668
74560
  activeUntil: number().nullable(),
74669
74561
  /** Who asked for the run (a user id or an addon id); `null` when nothing is armed or it did not say. */
74670
74562
  requestedBy: string().nullable(),
74563
+ /**
74564
+ * The one-tap run of THIS device: what a "Run" button on any surface starts. `null` when
74565
+ * the device is gone or its type has no timed run; a status from before this field
74566
+ * existed has none, and a surface falls back to the type's default.
74567
+ */
74568
+ quickRun: TimedRunQuickRunSchema.nullable(),
74671
74569
  lastFetchedAt: number()
74672
74570
  });
74673
- method(object({
74571
+ /** What the settings form needs: the unit, the bounds and the type's default. */
74572
+ var TimedRunOptionsSchema = object({
74573
+ unit: TimedRunUnitSchema,
74574
+ /** The longest run, in `unit`. */
74575
+ maxDuration: number(),
74576
+ defaultDuration: number()
74577
+ });
74578
+ /** The one-tap run duration, in the type's unit; `null` returns to the type's default. */
74579
+ var TimedRunSettingsPatchSchema = object({ quickRunDuration: number().positive().finite().nullable().optional() });
74580
+ method(object({ deviceId: number().int() }), TimedRunOptionsSchema), method(object({
74581
+ deviceId: number().int(),
74582
+ settings: TimedRunSettingsPatchSchema
74583
+ }), _void(), {
74584
+ kind: "mutation",
74585
+ auth: "admin"
74586
+ }), method(object({
74674
74587
  deviceId: number().int(),
74675
74588
  duration: number().positive().finite(),
74676
74589
  unit: TimedRunUnitSchema
@@ -77376,13 +77289,6 @@ Object.freeze({
77376
77289
  access: "view",
77377
77290
  role: "admin"
77378
77291
  },
77379
- "addonSettings.getGlobalSettings": {
77380
- capName: "addon-settings",
77381
- capScope: "system",
77382
- addonId: null,
77383
- access: "view",
77384
- role: "admin"
77385
- },
77386
77292
  "addonSettings.getIntegrationFormSchema": {
77387
77293
  capName: "addon-settings",
77388
77294
  capScope: "system",
@@ -77390,14 +77296,14 @@ Object.freeze({
77390
77296
  access: "view",
77391
77297
  role: "admin"
77392
77298
  },
77393
- "addonSettings.getIntegrationSettings": {
77299
+ "addonSettings.getScopedSettings": {
77394
77300
  capName: "addon-settings",
77395
77301
  capScope: "system",
77396
77302
  addonId: null,
77397
77303
  access: "view",
77398
77304
  role: "admin"
77399
77305
  },
77400
- "addonSettings.getScopedSettings": {
77306
+ "addonSettings.listScopedSettings": {
77401
77307
  capName: "addon-settings",
77402
77308
  capScope: "system",
77403
77309
  addonId: null,
@@ -77425,13 +77331,6 @@ Object.freeze({
77425
77331
  access: "create",
77426
77332
  role: "admin"
77427
77333
  },
77428
- "addonSettings.updateGlobalSettings": {
77429
- capName: "addon-settings",
77430
- capScope: "system",
77431
- addonId: null,
77432
- access: "create",
77433
- role: "admin"
77434
- },
77435
77334
  "addonSettings.updateScopedSettings": {
77436
77335
  capName: "addon-settings",
77437
77336
  capScope: "system",
@@ -79602,6 +79501,13 @@ Object.freeze({
79602
79501
  access: "create",
79603
79502
  role: "admin"
79604
79503
  },
79504
+ "deviceManager.setAlias": {
79505
+ capName: "device-manager",
79506
+ capScope: "system",
79507
+ addonId: null,
79508
+ access: "create",
79509
+ role: "admin"
79510
+ },
79605
79511
  "deviceManager.setChildLayout": {
79606
79512
  capName: "device-manager",
79607
79513
  capScope: "system",
@@ -86329,27 +86235,6 @@ Object.freeze({
86329
86235
  access: "create",
86330
86236
  role: "admin"
86331
86237
  },
86332
- "terminalSession.createInstance": {
86333
- capName: "terminal-session",
86334
- capScope: "system",
86335
- addonId: null,
86336
- access: "create",
86337
- role: "admin"
86338
- },
86339
- "terminalSession.deleteInstance": {
86340
- capName: "terminal-session",
86341
- capScope: "system",
86342
- addonId: null,
86343
- access: "delete",
86344
- role: "admin"
86345
- },
86346
- "terminalSession.listInstances": {
86347
- capName: "terminal-session",
86348
- capScope: "system",
86349
- addonId: null,
86350
- access: "view",
86351
- role: "admin"
86352
- },
86353
86238
  "terminalSession.listLegacyCameras": {
86354
86239
  capName: "terminal-session",
86355
86240
  capScope: "system",
@@ -86392,20 +86277,6 @@ Object.freeze({
86392
86277
  access: "create",
86393
86278
  role: "admin"
86394
86279
  },
86395
- "terminalSession.setInstanceEnabled": {
86396
- capName: "terminal-session",
86397
- capScope: "system",
86398
- addonId: null,
86399
- access: "create",
86400
- role: "admin"
86401
- },
86402
- "terminalSession.updateInstance": {
86403
- capName: "terminal-session",
86404
- capScope: "system",
86405
- addonId: null,
86406
- access: "create",
86407
- role: "admin"
86408
- },
86409
86280
  "terminalSession.writeInput": {
86410
86281
  capName: "terminal-session",
86411
86282
  capScope: "system",
@@ -86420,6 +86291,13 @@ Object.freeze({
86420
86291
  access: "create",
86421
86292
  role: "viewer"
86422
86293
  },
86294
+ "timedRun.getOptions": {
86295
+ capName: "timed-run",
86296
+ capScope: "device",
86297
+ addonId: null,
86298
+ access: "view",
86299
+ role: "viewer"
86300
+ },
86423
86301
  "timedRun.getStatus": {
86424
86302
  capName: "timed-run",
86425
86303
  capScope: "device",
@@ -86434,6 +86312,13 @@ Object.freeze({
86434
86312
  access: "create",
86435
86313
  role: "viewer"
86436
86314
  },
86315
+ "timedRun.setSettings": {
86316
+ capName: "timed-run",
86317
+ capScope: "device",
86318
+ addonId: null,
86319
+ access: "create",
86320
+ role: "admin"
86321
+ },
86437
86322
  "toast.onToast": {
86438
86323
  capName: "toast",
86439
86324
  capScope: "system",
@@ -87389,6 +87274,7 @@ function applianceExport(ecosystem, deviceType) {
87389
87274
  if (!isPlugApplianceType(deviceType)) return null;
87390
87275
  return APPLIANCE_EXPORT[ecosystem][deviceType];
87391
87276
  }
87277
+ string().min(1).max(4096);
87392
87278
  Object.freeze({
87393
87279
  "accessories.getStatus": [{
87394
87280
  name: "deviceId",
@@ -88072,6 +87958,11 @@ Object.freeze({
88072
87958
  form: "single",
88073
87959
  optional: false
88074
87960
  }],
87961
+ "deviceManager.setAlias": [{
87962
+ name: "deviceId",
87963
+ form: "single",
87964
+ optional: false
87965
+ }],
88075
87966
  "deviceManager.setChildLayout": [{
88076
87967
  name: "deviceId",
88077
87968
  form: "single",
@@ -90136,6 +90027,11 @@ Object.freeze({
90136
90027
  form: "single",
90137
90028
  optional: false
90138
90029
  }],
90030
+ "timedRun.getOptions": [{
90031
+ name: "deviceId",
90032
+ form: "single",
90033
+ optional: false
90034
+ }],
90139
90035
  "timedRun.getStatus": [{
90140
90036
  name: "deviceId",
90141
90037
  form: "single",
@@ -90146,6 +90042,11 @@ Object.freeze({
90146
90042
  form: "single",
90147
90043
  optional: false
90148
90044
  }],
90045
+ "timedRun.setSettings": [{
90046
+ name: "deviceId",
90047
+ form: "single",
90048
+ optional: false
90049
+ }],
90149
90050
  "update.getStatus": [{
90150
90051
  name: "deviceId",
90151
90052
  form: "single",
@@ -91008,6 +90909,7 @@ var STATE_SUMMARY_VARS = [
91008
90909
  [...RULE_TEXT],
91009
90910
  [...RULE_TEXT],
91010
90911
  [...RULE_TEXT],
90912
+ [...RULE_TEXT],
91011
90913
  [...RULE_BODY_ONLY],
91012
90914
  [...RULE_TEXT],
91013
90915
  ([...RULE_TEXT], [...DEVICE_EVENTS]),