@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.
@@ -808,7 +808,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
808
808
  return EventCategory;
809
809
  }({});
810
810
  //#endregion
811
- //#region ../types/dist/device-type-D1fH5kaC.mjs
811
+ //#region ../types/dist/device-type-DxCT0krO.mjs
812
812
  /**
813
813
  import { errMsg } from '@camstack/types'
814
814
  * Extract a human-readable message from an unknown error value.
@@ -970,6 +970,13 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
970
970
  * filters that want "all devices with on-motion behaviour".
971
971
  */
972
972
  DeviceFeature["MotionTrigger"] = "motion-trigger";
973
+ /**
974
+ * Device can be run for a chosen time and then stopped. Mirrors the
975
+ * `timed-run` wrapper cap — the cap is bound by the core-blocks addon, not by
976
+ * a driver, so the flag is derived from the device's bindings
977
+ * (`featuresOfBoundCaps`). Gates the quick-run control in the viewer.
978
+ */
979
+ DeviceFeature["TimedRun"] = "timed-run";
973
980
  /** Light supports rgb-triplet color via `color` cap. */
974
981
  DeviceFeature["LightColorRgb"] = "light-color-rgb";
975
982
  /** Light supports HSV color via `color` cap. */
@@ -6004,7 +6011,7 @@ var ZodIssueCode = {
6004
6011
  var ZodFirstPartyTypeKind;
6005
6012
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6006
6013
  //#endregion
6007
- //#region ../types/dist/sleep-CQP-REJp.mjs
6014
+ //#region ../types/dist/sleep-7El4r5Bl.mjs
6008
6015
  /**
6009
6016
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6010
6017
  * window to float samples (D455).
@@ -8373,7 +8380,7 @@ function boundOf(list) {
8373
8380
  * Base class for CamStack addons. Eliminates settings boilerplate:
8374
8381
  *
8375
8382
  * - Typed `config` property with automatic resolution from store + defaults
8376
- * - `getGlobalSettings()` / `updateGlobalSettings()` auto-implemented
8383
+ * - the scoped settings API (`clusterSettings` / `nodeSettings` / `deviceDefaults`) auto-implemented
8377
8384
  * - `getAddonSettings()` / `updateAddonSettings()` auto-implemented
8378
8385
  * - `getDeviceSettings()` / `updateDeviceSettings()` auto-implemented
8379
8386
  * - `ctx` accessor for the AddonContext (no manual `this.ctxRef` storage)
@@ -8383,7 +8390,7 @@ function boundOf(list) {
8383
8390
  * Subclasses override:
8384
8391
  * - `onInitialize()` — addon-specific init logic, return ProviderRegistration[]
8385
8392
  * - `onShutdown()` — cleanup
8386
- * - `globalSettingsSchema()` / `deviceSettingsSchema()` — UI schemas
8393
+ * - `clusterSettingsSchema()` / `nodeSettingsSchema()` / `deviceSettingsSchema()` — UI schemas
8387
8394
  *
8388
8395
  * @example
8389
8396
  * ```ts
@@ -8397,7 +8404,7 @@ function boundOf(list) {
8397
8404
  * super({ maxRetries: 3, endpoint: 'http://localhost' })
8398
8405
  * }
8399
8406
  *
8400
- * protected globalSettingsSchema() {
8407
+ * protected clusterSettingsSchema() {
8401
8408
  * return this.schema({
8402
8409
  * sections: [{
8403
8410
  * id: 'main', title: 'Settings',
@@ -8440,7 +8447,7 @@ var BaseAddon = class {
8440
8447
  defaults;
8441
8448
  /**
8442
8449
  * Hidden-state paths that hold secrets (D787) — values the addon writes
8443
- * itself (`updateGlobalSettings`, `state()`) that no form field declares.
8450
+ * itself (`state()`, the scoped writers) that no form field declares.
8444
8451
  * Stored in the keychain exactly like a `password` field. Syntax:
8445
8452
  * `'snapshotSigningKey'`, `'identity.pincode'`, `'tokens[userId].accessToken'`
8446
8453
  * (`key[<id field>]` addresses array items by id, never by index).
@@ -8450,7 +8457,7 @@ var BaseAddon = class {
8450
8457
  /**
8451
8458
  * D986 M4: the scoped schemas this addon declared, resolved once per capability
8452
8459
  * (`loadScopedSchemas`) so the sync readers (`perNodeKeys`, the secret tree, the restart check)
8453
- * see them. Empty until loaded: the readers then fall back to {@link globalSettingsSchema}.
8460
+ * see them. Empty until loaded.
8454
8461
  */
8455
8462
  _scopedByCap = /* @__PURE__ */ new Map();
8456
8463
  _nodeKeysByCap = /* @__PURE__ */ new Map();
@@ -8636,7 +8643,7 @@ var BaseAddon = class {
8636
8643
  /** Addon-specific cleanup. Override if needed. */
8637
8644
  async onShutdown() {}
8638
8645
  /**
8639
- * Called after config is resolved during updateGlobalSettings/updateAddonSettings.
8646
+ * Called after config is resolved during a settings write.
8640
8647
  * Override to react to config changes (e.g. restart a sampler, reconnect a service).
8641
8648
  * Not called during initialize() — use onInitialize() for initial setup.
8642
8649
  */
@@ -8665,82 +8672,12 @@ var BaseAddon = class {
8665
8672
  scopedSettingsCapabilities() {
8666
8673
  return [];
8667
8674
  }
8668
- /** Override to provide global-level settings UI schema. */
8669
- globalSettingsSchema(_cap) {
8670
- return null;
8671
- }
8672
8675
  /** Override to provide device-level settings UI schema. */
8673
8676
  deviceSettingsSchema() {
8674
8677
  return null;
8675
8678
  }
8676
8679
  /**
8677
- * INTEGRATION-LEVEL SETTINGS — declare which of this addon's global sections
8678
- * ARE the configuration of its integration.
8679
- *
8680
- * Return the `ConfigSection.id`s, from {@link globalSettingsSchema}, that an
8681
- * operator should find on the addon's integration page (System →
8682
- * Integrations → <name>) rather than only in the cluster-wide list of every
8683
- * addon. Empty (the default) means the addon has no integration-level
8684
- * settings and no such surface is offered — this is opt-in, because whether
8685
- * an addon's configuration IS its integration's configuration depends on the
8686
- * nature of the integration.
8687
- *
8688
- * WHAT THIS IS NOT. It is not a scope. The selected sections keep living in
8689
- * the ONE global schema, in the ONE addon store, written by the ONE
8690
- * `updateGlobalSettings` path. There is deliberately no
8691
- * `updateIntegrationSettings`: a second write path is how a surface acquires
8692
- * a second store key, and this repo has shipped that twice (`btmPath@hub`,
8693
- * D266). Selecting sections cannot introduce a key that selecting cannot.
8694
- *
8695
- * WHY IT IS A LIST OF SECTION IDS AND NOT A MARKER ON THE SECTION.
8696
- * `ConfigFieldBase` used to carry `scope?: 'device' | 'global'` and it was
8697
- * removed with the reason recorded at
8698
- * `packages/types/src/interfaces/config-ui.ts:249` — *"a field's scope is
8699
- * determined by WHICH schema it lives in, not by a field-level marker."* A
8700
- * marker sprinkled across sections also has to borrow a field that already
8701
- * means something else; borrowing `section.tab` put the literal word
8702
- * "integration" into an operator-facing tab bar, because `tab` means "how to
8703
- * GROUP this visually" and cannot also mean "where this lives" (D269
8704
- * supersedes D268). One declaration, in one place, next to the schema whose
8705
- * ids it names.
8706
- */
8707
- integrationSettingSections() {
8708
- return [];
8709
- }
8710
- async getGlobalSettings(overlay, cap, nodeId) {
8711
- await this.loadScopedSchemas(cap);
8712
- const schema = this.globalSettingsSchema(cap) ?? this.scopedFormSchema(cap);
8713
- if (!schema) return { sections: [] };
8714
- const projected = await this.readRawProjectedStore(nodeId, cap);
8715
- return hydrateSchema(schema, overlay ? await this.overlayKeepingMarkers(projected, overlay) : projected, { inlineSecretsAsViews: true });
8716
- }
8717
- /**
8718
- * The integration-level view of this addon's settings: exactly the sections
8719
- * named by {@link integrationSettingSections}, hydrated from the SAME store
8720
- * `getGlobalSettings` reads, and narrowed to cluster-scoped fields.
8721
- *
8722
- * Returns `null` when the addon declared nothing — an addon that opts out has
8723
- * no integration settings surface at all, rather than an empty one that reads
8724
- * as a failed load.
8725
- *
8726
- * Three properties hold BY CONSTRUCTION, which is why they are here in core
8727
- * and not in whichever UI happens to render this:
8728
- *
8729
- * 1. **One key.** The payload is a SUBSET of the global schema, so a field
8730
- * shown here is the same field, with the same bare key, that the addon's
8731
- * own page shows. There is no integration-specific writer — callers save
8732
- * through `updateGlobalSettings` — so a second store key is unreachable,
8733
- * not merely discouraged.
8734
- * 2. **No node scope.** `perNode: true` fields are DROPPED. Their store key
8735
- * is `<key>@<nodeId>` and an integration is not a node; whichever node
8736
- * such a field silently picked would be a wrong answer for the operator
8737
- * who opened the page (D266).
8738
- * 3. **No silent typo.** A declared id that names no section throws. The
8739
- * alternative — skip it — turns a rename into a surface that quietly
8740
- * empties, which looks exactly like an addon with nothing to configure.
8741
- */
8742
- /**
8743
- * The form schema of ONE integration instance, or `null` to use {@link globalSettingsSchema}.
8680
+ * The form schema of ONE integration instance, or `null` to use the scoped form.
8744
8681
  *
8745
8682
  * Override it only when an `instanceMode: multiple` addon's instances differ: an NVR integration
8746
8683
  * needs its connection fields, the default integration the addon's own sections. It is the
@@ -8913,6 +8850,19 @@ var BaseAddon = class {
8913
8850
  const overlay = await this.scopedSettingsOverlay(scope, cap, nodeId);
8914
8851
  return hydrateSchema(schema, overlay ? await this.overlayKeepingMarkers(stored, overlay) : stored, { inlineSecretsAsViews: true });
8915
8852
  }
8853
+ /**
8854
+ * The scoped schemas this addon serves: one entry per loaded (capability, scope), capabilities
8855
+ * in declaration order, scopes in {@link SCOPED_SETTINGS_SCOPES} order. `[]` when it declares
8856
+ * nothing.
8857
+ */
8858
+ async listScopedSettings() {
8859
+ await this.loadScopedSchemas();
8860
+ return [...this._scopedByCap].flatMap(([cap, entries]) => entries.map((entry) => ({
8861
+ cap,
8862
+ scope: entry.scope,
8863
+ sectionIds: entry.schema.sections.map((section) => section.id)
8864
+ })));
8865
+ }
8916
8866
  /** The OPERATOR's write of declared keys of one scope (D787 secret semantics). */
8917
8867
  async updateScopedSettings(scope, cap, patch, nodeId) {
8918
8868
  this._operatorWriteDepth++;
@@ -8938,32 +8888,15 @@ var BaseAddon = class {
8938
8888
  */
8939
8889
  async getIntegrationFormSchema(instance, nodeId) {
8940
8890
  const scoped = await this.integrationFormSchema(instance);
8941
- if (scoped === null) return this.getGlobalSettings(void 0, void 0, nodeId);
8891
+ if (scoped === null) return this.scopedForm(nodeId);
8942
8892
  return hydrateSchema(scoped, {}, { inlineSecretsAsViews: true });
8943
8893
  }
8944
- async getIntegrationSettings(nodeId) {
8945
- const declared = this.integrationSettingSections();
8946
- if (declared.length === 0) return null;
8947
- const schema = this.globalSettingsSchema();
8948
- if (!schema) throw new Error(`${this.constructor.name}: integrationSettingSections() names [${declared.join(", ")}] but globalSettingsSchema() returns null.`);
8949
- const byId = new Map(schema.sections.map((section) => [section.id, section]));
8950
- const sections = [];
8951
- for (const id of declared) {
8952
- const section = byId.get(id);
8953
- if (!section) throw new Error(`${this.constructor.name}: integrationSettingSections() names unknown section "${id}". Known sections: [${[...byId.keys()].join(", ")}].`);
8954
- const fields = dropPerNodeFields(section.fields);
8955
- if (fields.length === 0) continue;
8956
- sections.push({
8957
- ...section,
8958
- fields
8959
- });
8960
- }
8961
- if (sections.length === 0) return null;
8962
- const projected = await this.readRawProjectedStore(nodeId);
8963
- return hydrateSchema({
8964
- ...schema,
8965
- sections
8966
- }, projected, { inlineSecretsAsViews: true });
8894
+ /** The form of the scoped schemas this addon declared, hydrated from its store. */
8895
+ async scopedForm(nodeId) {
8896
+ await this.loadScopedSchemas();
8897
+ const schema = this.scopedFormSchema();
8898
+ if (!schema) return { sections: [] };
8899
+ return hydrateSchema(schema, await this.readRawProjectedStore(nodeId), { inlineSecretsAsViews: true });
8967
8900
  }
8968
8901
  /**
8969
8902
  * The raw addon store PROJECTED onto the target node's bare per-node keys:
@@ -8972,8 +8905,8 @@ var BaseAddon = class {
8972
8905
  * bare fallback), all `@`-scoped and stray bare per-node keys are dropped.
8973
8906
  * A no-op passthrough when the schema declares no `perNode` field.
8974
8907
  *
8975
- * This is the sanctioned way for a `getGlobalSettings` OVERRIDE that needs
8976
- * the store for custom option logic (option narrowing, value snapping) to
8908
+ * This is the sanctioned way for an addon that needs
8909
+ * the store for custom logic (option narrowing, value snapping) to
8977
8910
  * read it per-node — never `ctx.settings.readAddonStore()` directly.
8978
8911
  * `nodeId` omitted ⇒ the local node (node-blind injection from ctx).
8979
8912
  *
@@ -9025,7 +8958,7 @@ var BaseAddon = class {
9025
8958
  }
9026
8959
  /**
9027
8960
  * Whether ONE global key of this addon's store was written, read three-way
9028
- * (D651). For a question a hydrated view cannot answer: `getGlobalSettings`
8961
+ * (D651). For a question a hydrated view cannot answer: a hydrated form
9029
8962
  * reports `value ?? default`, so "the operator chose the default" and "nobody
9030
8963
  * chose" look the same, and a failed read looks like both. A `perNode` key is
9031
8964
  * not supported here: its stored name is scoped.
@@ -9059,7 +8992,7 @@ var BaseAddon = class {
9059
8992
  }
9060
8993
  /**
9061
8994
  * The OPERATOR's write — a settings form or an admin API call, dispatched by
9062
- * the kernel. Identical to {@link updateGlobalSettings}, except that a secret
8995
+ * the kernel. The one in-process write of the addon blob that is not a scoped write; a secret
9063
8996
  * the operator sends is stored as sent even when it equals a pre-keychain
9064
8997
  * inline value: the operator re-entering a password is a change, an addon
9065
8998
  * writing back what it read is not (D787).
@@ -9072,9 +9005,6 @@ var BaseAddon = class {
9072
9005
  this._operatorWriteDepth--;
9073
9006
  }
9074
9007
  }
9075
- async updateGlobalSettings(patch, nodeId) {
9076
- await this.applyGlobalPatch(patch, nodeId);
9077
- }
9078
9008
  /**
9079
9009
  * REMOVE stored secrets — their keychain values and their markers (D787).
9080
9010
  *
@@ -9117,8 +9047,7 @@ var BaseAddon = class {
9117
9047
  await this.resolveConfig();
9118
9048
  await this.onConfigChanged();
9119
9049
  this.emitLifecycle(EventCategory.AddonUpdated, { level: "global" });
9120
- const legacy = this.globalSettingsSchema();
9121
- this.maybeAutoRestart(Object.keys(barePatch), [...legacy === null ? [] : [legacy], ...this.loadedScopedSchemas().map((entry) => entry.schema)]);
9050
+ this.maybeAutoRestart(Object.keys(barePatch), this.loadedScopedSchemas().map((entry) => entry.schema));
9122
9051
  return true;
9123
9052
  }
9124
9053
  /**
@@ -9156,10 +9085,7 @@ var BaseAddon = class {
9156
9085
  this._nodeKeysByCap = /* @__PURE__ */ new Map();
9157
9086
  this._addonSecretTree = null;
9158
9087
  }
9159
- /**
9160
- * The form the settings API serves while an addon declares no {@link globalSettingsSchema}: the
9161
- * sections of its scoped schemas, so dropping the old hook does not blank the form.
9162
- */
9088
+ /** The form of an addon's scoped schemas: their sections, each shown once. */
9163
9089
  scopedFormSchema(cap) {
9164
9090
  const byId = /* @__PURE__ */ new Map();
9165
9091
  for (const entry of this.loadedScopedSchemas(cap)) for (const section of entry.schema.sections) if (!byId.has(section.id)) byId.set(section.id, section);
@@ -9171,8 +9097,7 @@ var BaseAddon = class {
9171
9097
  return [...this._scopedByCap.values()].flat();
9172
9098
  }
9173
9099
  /**
9174
- * The field keys that are stored per node: every field of a {@link nodeSettingsSchema}, plus
9175
- * the fields the legacy {@link globalSettingsSchema} still marks `perNode: true`. Derived once
9100
+ * The field keys that are stored per node: every field of a {@link nodeSettingsSchema}. Derived once
9176
9101
  * per `cap` argument and memoized (schemas are static declarations). Empty set ⇒ every
9177
9102
  * per-node code path is bypassed and the settings API behaves like the node-agnostic one.
9178
9103
  * Call {@link loadScopedSchemas} first (the async seams do).
@@ -9181,8 +9106,7 @@ var BaseAddon = class {
9181
9106
  const cacheKey = cap ?? "";
9182
9107
  const cached = this._nodeKeysByCap.get(cacheKey);
9183
9108
  if (cached) return cached;
9184
- const legacy = this.globalSettingsSchema(cap);
9185
- const keys = new Set(legacy ? legacy.sections.flatMap((section) => collectPerNodeFieldKeys(section.fields)) : []);
9109
+ const keys = /* @__PURE__ */ new Set();
9186
9110
  for (const { scope, schema } of this.loadedScopedSchemas(cap)) {
9187
9111
  if (scope !== "node") continue;
9188
9112
  for (const section of schema.sections) for (const key of collectValueFieldKeys(section.fields)) keys.add(key);
@@ -9400,8 +9324,6 @@ var BaseAddon = class {
9400
9324
  }
9401
9325
  declaredKeySet() {
9402
9326
  const keys = new Set(Object.keys(this.defaults));
9403
- const schema = this.globalSettingsSchema();
9404
- if (schema) for (const section of schema.sections) for (const key of collectFieldKeys(section.fields)) keys.add(key);
9405
9327
  for (const { schema: scoped } of this.loadedScopedSchemas()) for (const section of scoped.sections) for (const key of collectFieldKeys(section.fields)) keys.add(key);
9406
9328
  for (const key of this._declaredStateKeys) keys.add(key);
9407
9329
  for (const path of this.secretStatePaths) {
@@ -9499,7 +9421,7 @@ var BaseAddon = class {
9499
9421
  /** The addon store's secret tree: schema fields by TYPE, plus `secretStatePaths`. */
9500
9422
  addonSecretTree() {
9501
9423
  if (this._addonSecretTree === null) {
9502
- const tree = new Map(secretTreeFromSchema(this.globalSettingsSchema()));
9424
+ const tree = /* @__PURE__ */ new Map();
9503
9425
  for (const { schema } of this.loadedScopedSchemas()) for (const [key, node] of secretTreeFromSchema(schema)) tree.set(key, node);
9504
9426
  this._addonSecretTree = mergeSecretStatePaths(tree, this.secretStatePaths);
9505
9427
  }
@@ -9711,47 +9633,6 @@ function classifyStoreError(err) {
9711
9633
  if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
9712
9634
  return "permanent";
9713
9635
  }
9714
- /**
9715
- * Collect the keys of every field marked `perNode: true`, recursing into
9716
- * layout containers (`group` fields and `sub-tabs` tabs) the same way
9717
- * `hydrateSchema` does. Valueless structural fields (separator/info/…)
9718
- * don't declare `perNode` and are excluded by the `in` narrowing.
9719
- */
9720
- /**
9721
- * The same fields with every `perNode: true` one removed, recursing into layout
9722
- * containers exactly as {@link collectPerNodeFieldKeys} does. A container left
9723
- * with no child is dropped rather than rendered empty.
9724
- *
9725
- * Used by `getIntegrationSettings`: an integration is not a node, so a field
9726
- * whose store key is `<key>@<nodeId>` has no node to belong to there.
9727
- */
9728
- function dropPerNodeFields(fields) {
9729
- const kept = [];
9730
- for (const field of fields) {
9731
- if (field.type === "group") {
9732
- const inner = dropPerNodeFields(field.fields);
9733
- if (inner.length > 0) kept.push({
9734
- ...field,
9735
- fields: inner
9736
- });
9737
- continue;
9738
- }
9739
- if (field.type === "sub-tabs") {
9740
- const tabs = field.tabs.map((tab) => ({
9741
- ...tab,
9742
- fields: dropPerNodeFields(tab.fields)
9743
- })).filter((tab) => tab.fields.length > 0);
9744
- if (tabs.length > 0) kept.push({
9745
- ...field,
9746
- tabs
9747
- });
9748
- continue;
9749
- }
9750
- if ("perNode" in field && field.perNode === true) continue;
9751
- kept.push(field);
9752
- }
9753
- return kept;
9754
- }
9755
9636
  /** The keys of the value-holding fields, recursing into layout containers. */
9756
9637
  function collectValueFieldKeys(fields) {
9757
9638
  const collected = [];
@@ -9784,21 +9665,6 @@ function collectFieldKeys(fields) {
9784
9665
  }
9785
9666
  return collected;
9786
9667
  }
9787
- function collectPerNodeFieldKeys(fields) {
9788
- const collected = [];
9789
- for (const field of fields) {
9790
- if (field.type === "group") {
9791
- collected.push(...collectPerNodeFieldKeys(field.fields));
9792
- continue;
9793
- }
9794
- if (field.type === "sub-tabs") {
9795
- for (const tab of field.tabs) collected.push(...collectPerNodeFieldKeys(tab.fields));
9796
- continue;
9797
- }
9798
- if ("perNode" in field && field.perNode === true) collected.push(field.key);
9799
- }
9800
- return collected;
9801
- }
9802
9668
  /**
9803
9669
  * Normalize an `ICamstackAddon.initialize()` return value into the
9804
9670
  * `AddonInitResult` envelope. Arrays are wrapped into `{ providers }`;
@@ -12562,13 +12428,25 @@ Object.freeze({
12562
12428
  "path": "temperature",
12563
12429
  "valueType": "number"
12564
12430
  }],
12565
- "timed-run": [{
12566
- "path": "activeUntil",
12567
- "valueType": "number"
12568
- }, {
12569
- "path": "requestedBy",
12570
- "valueType": "string"
12571
- }],
12431
+ "timed-run": [
12432
+ {
12433
+ "path": "activeUntil",
12434
+ "valueType": "number"
12435
+ },
12436
+ {
12437
+ "path": "requestedBy",
12438
+ "valueType": "string"
12439
+ },
12440
+ {
12441
+ "path": "quickRun.duration",
12442
+ "valueType": "number"
12443
+ },
12444
+ {
12445
+ "path": "quickRun.unit",
12446
+ "valueType": "enum",
12447
+ "enumValues": ["s", "min"]
12448
+ }
12449
+ ],
12572
12450
  "update": [
12573
12451
  {
12574
12452
  "path": "currentVersion",
@@ -12792,7 +12670,7 @@ object({
12792
12670
  params: record(string(), union([string(), number()])).optional()
12793
12671
  });
12794
12672
  //#endregion
12795
- //#region ../types/dist/composition-BmBHuDTQ.mjs
12673
+ //#region ../types/dist/composition-Bx0JvKUU.mjs
12796
12674
  /**
12797
12675
  * The ffmpeg build every CamStack node downloads, per platform and arch.
12798
12676
  *
@@ -13954,6 +13832,387 @@ var NodeColorIdSchema = _enum([
13954
13832
  "node-h"
13955
13833
  ]);
13956
13834
  //#endregion
13835
+ //#region ../types/dist/convert-BAzH15HU.mjs
13836
+ /**
13837
+ * Frozen unit → spec table. `•` in the doc marks each dimension's canonical
13838
+ * unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
13839
+ * `factor = 5/9`, `offset = -160/9` (kept as exact expressions, not rounded
13840
+ * decimals). K derives from `°C = K − 273.15`.
13841
+ */
13842
+ var UNIT_TABLE = {
13843
+ "°C": {
13844
+ dimension: "temperature",
13845
+ factor: 1,
13846
+ offset: 0
13847
+ },
13848
+ "°F": {
13849
+ dimension: "temperature",
13850
+ factor: 5 / 9,
13851
+ offset: -160 / 9
13852
+ },
13853
+ K: {
13854
+ dimension: "temperature",
13855
+ factor: 1,
13856
+ offset: -273.15
13857
+ },
13858
+ hPa: {
13859
+ dimension: "pressure",
13860
+ factor: 1,
13861
+ offset: 0
13862
+ },
13863
+ kPa: {
13864
+ dimension: "pressure",
13865
+ factor: 10,
13866
+ offset: 0
13867
+ },
13868
+ Pa: {
13869
+ dimension: "pressure",
13870
+ factor: .01,
13871
+ offset: 0
13872
+ },
13873
+ mbar: {
13874
+ dimension: "pressure",
13875
+ factor: 1,
13876
+ offset: 0
13877
+ },
13878
+ bar: {
13879
+ dimension: "pressure",
13880
+ factor: 1e3,
13881
+ offset: 0
13882
+ },
13883
+ inHg: {
13884
+ dimension: "pressure",
13885
+ factor: 33.8639,
13886
+ offset: 0
13887
+ },
13888
+ mmHg: {
13889
+ dimension: "pressure",
13890
+ factor: 1.33322,
13891
+ offset: 0
13892
+ },
13893
+ psi: {
13894
+ dimension: "pressure",
13895
+ factor: 68.9476,
13896
+ offset: 0
13897
+ },
13898
+ "m/s": {
13899
+ dimension: "speed",
13900
+ factor: 1,
13901
+ offset: 0
13902
+ },
13903
+ "km/h": {
13904
+ dimension: "speed",
13905
+ factor: 1 / 3.6,
13906
+ offset: 0
13907
+ },
13908
+ mph: {
13909
+ dimension: "speed",
13910
+ factor: .44704,
13911
+ offset: 0
13912
+ },
13913
+ kn: {
13914
+ dimension: "speed",
13915
+ factor: .514444,
13916
+ offset: 0
13917
+ },
13918
+ "mm/h": {
13919
+ dimension: "precipitation-rate",
13920
+ factor: 1,
13921
+ offset: 0
13922
+ },
13923
+ "in/h": {
13924
+ dimension: "precipitation-rate",
13925
+ factor: 25.4,
13926
+ offset: 0
13927
+ },
13928
+ m: {
13929
+ dimension: "length",
13930
+ factor: 1,
13931
+ offset: 0
13932
+ },
13933
+ mm: {
13934
+ dimension: "length",
13935
+ factor: .001,
13936
+ offset: 0
13937
+ },
13938
+ cm: {
13939
+ dimension: "length",
13940
+ factor: .01,
13941
+ offset: 0
13942
+ },
13943
+ km: {
13944
+ dimension: "length",
13945
+ factor: 1e3,
13946
+ offset: 0
13947
+ },
13948
+ in: {
13949
+ dimension: "length",
13950
+ factor: .0254,
13951
+ offset: 0
13952
+ },
13953
+ ft: {
13954
+ dimension: "length",
13955
+ factor: .3048,
13956
+ offset: 0
13957
+ },
13958
+ mi: {
13959
+ dimension: "length",
13960
+ factor: 1609.344,
13961
+ offset: 0
13962
+ },
13963
+ "m²": {
13964
+ dimension: "area",
13965
+ factor: 1,
13966
+ offset: 0
13967
+ },
13968
+ lx: {
13969
+ dimension: "illuminance",
13970
+ factor: 1,
13971
+ offset: 0
13972
+ },
13973
+ "W/m²": {
13974
+ dimension: "irradiance",
13975
+ factor: 1,
13976
+ offset: 0
13977
+ },
13978
+ W: {
13979
+ dimension: "power",
13980
+ factor: 1,
13981
+ offset: 0
13982
+ },
13983
+ kW: {
13984
+ dimension: "power",
13985
+ factor: 1e3,
13986
+ offset: 0
13987
+ },
13988
+ VA: {
13989
+ dimension: "apparent-power",
13990
+ factor: 1,
13991
+ offset: 0
13992
+ },
13993
+ Wh: {
13994
+ dimension: "energy",
13995
+ factor: 1,
13996
+ offset: 0
13997
+ },
13998
+ kWh: {
13999
+ dimension: "energy",
14000
+ factor: 1e3,
14001
+ offset: 0
14002
+ },
14003
+ MWh: {
14004
+ dimension: "energy",
14005
+ factor: 1e6,
14006
+ offset: 0
14007
+ },
14008
+ V: {
14009
+ dimension: "voltage",
14010
+ factor: 1,
14011
+ offset: 0
14012
+ },
14013
+ mV: {
14014
+ dimension: "voltage",
14015
+ factor: .001,
14016
+ offset: 0
14017
+ },
14018
+ A: {
14019
+ dimension: "current",
14020
+ factor: 1,
14021
+ offset: 0
14022
+ },
14023
+ mA: {
14024
+ dimension: "current",
14025
+ factor: .001,
14026
+ offset: 0
14027
+ },
14028
+ ppm: {
14029
+ dimension: "concentration-volume",
14030
+ factor: 1,
14031
+ offset: 0
14032
+ },
14033
+ ppb: {
14034
+ dimension: "concentration-volume",
14035
+ factor: .001,
14036
+ offset: 0
14037
+ },
14038
+ "µg/m³": {
14039
+ dimension: "concentration-mass",
14040
+ factor: 1,
14041
+ offset: 0
14042
+ },
14043
+ "mg/m³": {
14044
+ dimension: "concentration-mass",
14045
+ factor: 1e3,
14046
+ offset: 0
14047
+ },
14048
+ kg: {
14049
+ dimension: "mass",
14050
+ factor: 1,
14051
+ offset: 0
14052
+ },
14053
+ g: {
14054
+ dimension: "mass",
14055
+ factor: .001,
14056
+ offset: 0
14057
+ },
14058
+ lb: {
14059
+ dimension: "mass",
14060
+ factor: .453592,
14061
+ offset: 0
14062
+ },
14063
+ oz: {
14064
+ dimension: "mass",
14065
+ factor: .0283495,
14066
+ offset: 0
14067
+ },
14068
+ "%": {
14069
+ dimension: "percentage",
14070
+ factor: 1,
14071
+ offset: 0
14072
+ },
14073
+ L: {
14074
+ dimension: "volume",
14075
+ factor: 1,
14076
+ offset: 0
14077
+ },
14078
+ mL: {
14079
+ dimension: "volume",
14080
+ factor: .001,
14081
+ offset: 0
14082
+ },
14083
+ gal: {
14084
+ dimension: "volume",
14085
+ factor: 3.785411784,
14086
+ offset: 0
14087
+ },
14088
+ s: {
14089
+ dimension: "duration",
14090
+ factor: 1,
14091
+ offset: 0
14092
+ },
14093
+ ms: {
14094
+ dimension: "duration",
14095
+ factor: .001,
14096
+ offset: 0
14097
+ },
14098
+ min: {
14099
+ dimension: "duration",
14100
+ factor: 60,
14101
+ offset: 0
14102
+ },
14103
+ h: {
14104
+ dimension: "duration",
14105
+ factor: 3600,
14106
+ offset: 0
14107
+ },
14108
+ d: {
14109
+ dimension: "duration",
14110
+ factor: 86400,
14111
+ offset: 0
14112
+ },
14113
+ B: {
14114
+ dimension: "information",
14115
+ factor: 1,
14116
+ offset: 0
14117
+ },
14118
+ KiB: {
14119
+ dimension: "information",
14120
+ factor: 1024,
14121
+ offset: 0
14122
+ },
14123
+ MiB: {
14124
+ dimension: "information",
14125
+ factor: 1024 ** 2,
14126
+ offset: 0
14127
+ },
14128
+ GiB: {
14129
+ dimension: "information",
14130
+ factor: 1024 ** 3,
14131
+ offset: 0
14132
+ },
14133
+ TiB: {
14134
+ dimension: "information",
14135
+ factor: 1024 ** 4,
14136
+ offset: 0
14137
+ },
14138
+ kB: {
14139
+ dimension: "information",
14140
+ factor: 1e3,
14141
+ offset: 0
14142
+ },
14143
+ MB: {
14144
+ dimension: "information",
14145
+ factor: 1e6,
14146
+ offset: 0
14147
+ },
14148
+ GB: {
14149
+ dimension: "information",
14150
+ factor: 1e9,
14151
+ offset: 0
14152
+ },
14153
+ "°": {
14154
+ dimension: "angle",
14155
+ factor: 1,
14156
+ offset: 0
14157
+ },
14158
+ dBFS: {
14159
+ dimension: "sound-level",
14160
+ factor: 1,
14161
+ offset: 0
14162
+ },
14163
+ dBm: {
14164
+ dimension: "signal-level",
14165
+ factor: 1,
14166
+ offset: 0
14167
+ },
14168
+ mired: {
14169
+ dimension: "colour-temperature",
14170
+ factor: 1,
14171
+ offset: 0
14172
+ },
14173
+ kbps: {
14174
+ dimension: "bitrate",
14175
+ factor: 1,
14176
+ offset: 0
14177
+ },
14178
+ Mbps: {
14179
+ dimension: "bitrate",
14180
+ factor: 1e3,
14181
+ offset: 0
14182
+ },
14183
+ fps: {
14184
+ dimension: "rate",
14185
+ factor: 1,
14186
+ offset: 0
14187
+ }
14188
+ };
14189
+ /** Resolve a unit's `UnitSpec`, or `undefined` when the spelling is unknown. */
14190
+ function specFor(unit) {
14191
+ return Object.hasOwn(UNIT_TABLE, unit) ? UNIT_TABLE[unit] : void 0;
14192
+ }
14193
+ /** Value in `spec`'s unit → its dimension's canonical unit. */
14194
+ function toCanonical(value, spec) {
14195
+ return value * spec.factor + spec.offset;
14196
+ }
14197
+ /** Canonical-unit value → the unit described by `spec`. */
14198
+ function fromCanonical(canonical, spec) {
14199
+ return (canonical - spec.offset) / spec.factor;
14200
+ }
14201
+ /**
14202
+ * Graceful variant for the render path: returns the converted value, or
14203
+ * `undefined` when the conversion is refused (unknown unit / cross-dimension).
14204
+ * Never throws — a render caller falls back to the raw value + source unit.
14205
+ */
14206
+ function tryConvertUnit(value, from, to) {
14207
+ if (from === to) return value;
14208
+ const fromSpec = specFor(from);
14209
+ if (!fromSpec) return void 0;
14210
+ const toSpec = specFor(to);
14211
+ if (!toSpec) return void 0;
14212
+ if (fromSpec.dimension !== toSpec.dimension) return void 0;
14213
+ return fromCanonical(toCanonical(value, fromSpec), toSpec);
14214
+ }
14215
+ //#endregion
13957
14216
  //#region ../types/dist/index.mjs
13958
14217
  var SMTP_INBOUND_DEFAULT_PORT = 2525;
13959
14218
  var SMTP_INBOUND_DEFAULT_DOMAIN = "camstack.local";
@@ -43115,6 +43374,7 @@ var ExpressionBindingSourceSchema = union([
43115
43374
  object({
43116
43375
  kind: literal("global"),
43117
43376
  sourceStableId: string(),
43377
+ addonId: string().optional(),
43118
43378
  cap: string(),
43119
43379
  fieldPath: string()
43120
43380
  })
@@ -43181,385 +43441,6 @@ var SourceInfoSchema = object({
43181
43441
  raw: record(string(), unknown()).optional()
43182
43442
  });
43183
43443
  /**
43184
- * Frozen unit → spec table. `•` in the doc marks each dimension's canonical
43185
- * unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
43186
- * `factor = 5/9`, `offset = -160/9` (kept as exact expressions, not rounded
43187
- * decimals). K derives from `°C = K − 273.15`.
43188
- */
43189
- var UNIT_TABLE = {
43190
- "°C": {
43191
- dimension: "temperature",
43192
- factor: 1,
43193
- offset: 0
43194
- },
43195
- "°F": {
43196
- dimension: "temperature",
43197
- factor: 5 / 9,
43198
- offset: -160 / 9
43199
- },
43200
- K: {
43201
- dimension: "temperature",
43202
- factor: 1,
43203
- offset: -273.15
43204
- },
43205
- hPa: {
43206
- dimension: "pressure",
43207
- factor: 1,
43208
- offset: 0
43209
- },
43210
- kPa: {
43211
- dimension: "pressure",
43212
- factor: 10,
43213
- offset: 0
43214
- },
43215
- Pa: {
43216
- dimension: "pressure",
43217
- factor: .01,
43218
- offset: 0
43219
- },
43220
- mbar: {
43221
- dimension: "pressure",
43222
- factor: 1,
43223
- offset: 0
43224
- },
43225
- bar: {
43226
- dimension: "pressure",
43227
- factor: 1e3,
43228
- offset: 0
43229
- },
43230
- inHg: {
43231
- dimension: "pressure",
43232
- factor: 33.8639,
43233
- offset: 0
43234
- },
43235
- mmHg: {
43236
- dimension: "pressure",
43237
- factor: 1.33322,
43238
- offset: 0
43239
- },
43240
- psi: {
43241
- dimension: "pressure",
43242
- factor: 68.9476,
43243
- offset: 0
43244
- },
43245
- "m/s": {
43246
- dimension: "speed",
43247
- factor: 1,
43248
- offset: 0
43249
- },
43250
- "km/h": {
43251
- dimension: "speed",
43252
- factor: 1 / 3.6,
43253
- offset: 0
43254
- },
43255
- mph: {
43256
- dimension: "speed",
43257
- factor: .44704,
43258
- offset: 0
43259
- },
43260
- kn: {
43261
- dimension: "speed",
43262
- factor: .514444,
43263
- offset: 0
43264
- },
43265
- "mm/h": {
43266
- dimension: "precipitation-rate",
43267
- factor: 1,
43268
- offset: 0
43269
- },
43270
- "in/h": {
43271
- dimension: "precipitation-rate",
43272
- factor: 25.4,
43273
- offset: 0
43274
- },
43275
- m: {
43276
- dimension: "length",
43277
- factor: 1,
43278
- offset: 0
43279
- },
43280
- mm: {
43281
- dimension: "length",
43282
- factor: .001,
43283
- offset: 0
43284
- },
43285
- cm: {
43286
- dimension: "length",
43287
- factor: .01,
43288
- offset: 0
43289
- },
43290
- km: {
43291
- dimension: "length",
43292
- factor: 1e3,
43293
- offset: 0
43294
- },
43295
- in: {
43296
- dimension: "length",
43297
- factor: .0254,
43298
- offset: 0
43299
- },
43300
- ft: {
43301
- dimension: "length",
43302
- factor: .3048,
43303
- offset: 0
43304
- },
43305
- mi: {
43306
- dimension: "length",
43307
- factor: 1609.344,
43308
- offset: 0
43309
- },
43310
- "m²": {
43311
- dimension: "area",
43312
- factor: 1,
43313
- offset: 0
43314
- },
43315
- lx: {
43316
- dimension: "illuminance",
43317
- factor: 1,
43318
- offset: 0
43319
- },
43320
- "W/m²": {
43321
- dimension: "irradiance",
43322
- factor: 1,
43323
- offset: 0
43324
- },
43325
- W: {
43326
- dimension: "power",
43327
- factor: 1,
43328
- offset: 0
43329
- },
43330
- kW: {
43331
- dimension: "power",
43332
- factor: 1e3,
43333
- offset: 0
43334
- },
43335
- VA: {
43336
- dimension: "apparent-power",
43337
- factor: 1,
43338
- offset: 0
43339
- },
43340
- Wh: {
43341
- dimension: "energy",
43342
- factor: 1,
43343
- offset: 0
43344
- },
43345
- kWh: {
43346
- dimension: "energy",
43347
- factor: 1e3,
43348
- offset: 0
43349
- },
43350
- MWh: {
43351
- dimension: "energy",
43352
- factor: 1e6,
43353
- offset: 0
43354
- },
43355
- V: {
43356
- dimension: "voltage",
43357
- factor: 1,
43358
- offset: 0
43359
- },
43360
- mV: {
43361
- dimension: "voltage",
43362
- factor: .001,
43363
- offset: 0
43364
- },
43365
- A: {
43366
- dimension: "current",
43367
- factor: 1,
43368
- offset: 0
43369
- },
43370
- mA: {
43371
- dimension: "current",
43372
- factor: .001,
43373
- offset: 0
43374
- },
43375
- ppm: {
43376
- dimension: "concentration-volume",
43377
- factor: 1,
43378
- offset: 0
43379
- },
43380
- ppb: {
43381
- dimension: "concentration-volume",
43382
- factor: .001,
43383
- offset: 0
43384
- },
43385
- "µg/m³": {
43386
- dimension: "concentration-mass",
43387
- factor: 1,
43388
- offset: 0
43389
- },
43390
- "mg/m³": {
43391
- dimension: "concentration-mass",
43392
- factor: 1e3,
43393
- offset: 0
43394
- },
43395
- kg: {
43396
- dimension: "mass",
43397
- factor: 1,
43398
- offset: 0
43399
- },
43400
- g: {
43401
- dimension: "mass",
43402
- factor: .001,
43403
- offset: 0
43404
- },
43405
- lb: {
43406
- dimension: "mass",
43407
- factor: .453592,
43408
- offset: 0
43409
- },
43410
- oz: {
43411
- dimension: "mass",
43412
- factor: .0283495,
43413
- offset: 0
43414
- },
43415
- "%": {
43416
- dimension: "percentage",
43417
- factor: 1,
43418
- offset: 0
43419
- },
43420
- L: {
43421
- dimension: "volume",
43422
- factor: 1,
43423
- offset: 0
43424
- },
43425
- mL: {
43426
- dimension: "volume",
43427
- factor: .001,
43428
- offset: 0
43429
- },
43430
- gal: {
43431
- dimension: "volume",
43432
- factor: 3.785411784,
43433
- offset: 0
43434
- },
43435
- s: {
43436
- dimension: "duration",
43437
- factor: 1,
43438
- offset: 0
43439
- },
43440
- ms: {
43441
- dimension: "duration",
43442
- factor: .001,
43443
- offset: 0
43444
- },
43445
- min: {
43446
- dimension: "duration",
43447
- factor: 60,
43448
- offset: 0
43449
- },
43450
- h: {
43451
- dimension: "duration",
43452
- factor: 3600,
43453
- offset: 0
43454
- },
43455
- d: {
43456
- dimension: "duration",
43457
- factor: 86400,
43458
- offset: 0
43459
- },
43460
- B: {
43461
- dimension: "information",
43462
- factor: 1,
43463
- offset: 0
43464
- },
43465
- KiB: {
43466
- dimension: "information",
43467
- factor: 1024,
43468
- offset: 0
43469
- },
43470
- MiB: {
43471
- dimension: "information",
43472
- factor: 1024 ** 2,
43473
- offset: 0
43474
- },
43475
- GiB: {
43476
- dimension: "information",
43477
- factor: 1024 ** 3,
43478
- offset: 0
43479
- },
43480
- TiB: {
43481
- dimension: "information",
43482
- factor: 1024 ** 4,
43483
- offset: 0
43484
- },
43485
- kB: {
43486
- dimension: "information",
43487
- factor: 1e3,
43488
- offset: 0
43489
- },
43490
- MB: {
43491
- dimension: "information",
43492
- factor: 1e6,
43493
- offset: 0
43494
- },
43495
- GB: {
43496
- dimension: "information",
43497
- factor: 1e9,
43498
- offset: 0
43499
- },
43500
- "°": {
43501
- dimension: "angle",
43502
- factor: 1,
43503
- offset: 0
43504
- },
43505
- dBFS: {
43506
- dimension: "sound-level",
43507
- factor: 1,
43508
- offset: 0
43509
- },
43510
- dBm: {
43511
- dimension: "signal-level",
43512
- factor: 1,
43513
- offset: 0
43514
- },
43515
- mired: {
43516
- dimension: "colour-temperature",
43517
- factor: 1,
43518
- offset: 0
43519
- },
43520
- kbps: {
43521
- dimension: "bitrate",
43522
- factor: 1,
43523
- offset: 0
43524
- },
43525
- Mbps: {
43526
- dimension: "bitrate",
43527
- factor: 1e3,
43528
- offset: 0
43529
- },
43530
- fps: {
43531
- dimension: "rate",
43532
- factor: 1,
43533
- offset: 0
43534
- }
43535
- };
43536
- /** Resolve a unit's `UnitSpec`, or `undefined` when the spelling is unknown. */
43537
- function specFor(unit) {
43538
- return Object.hasOwn(UNIT_TABLE, unit) ? UNIT_TABLE[unit] : void 0;
43539
- }
43540
- /** Value in `spec`'s unit → its dimension's canonical unit. */
43541
- function toCanonical(value, spec) {
43542
- return value * spec.factor + spec.offset;
43543
- }
43544
- /** Canonical-unit value → the unit described by `spec`. */
43545
- function fromCanonical(canonical, spec) {
43546
- return (canonical - spec.offset) / spec.factor;
43547
- }
43548
- /**
43549
- * Graceful variant for the render path: returns the converted value, or
43550
- * `undefined` when the conversion is refused (unknown unit / cross-dimension).
43551
- * Never throws — a render caller falls back to the raw value + source unit.
43552
- */
43553
- function tryConvertUnit(value, from, to) {
43554
- if (from === to) return value;
43555
- const fromSpec = specFor(from);
43556
- if (!fromSpec) return void 0;
43557
- const toSpec = specFor(to);
43558
- if (!toSpec) return void 0;
43559
- if (fromSpec.dimension !== toSpec.dimension) return void 0;
43560
- return fromCanonical(toCanonical(value, fromSpec), toSpec);
43561
- }
43562
- /**
43563
43444
  * A number a person types for a physical quantity — the input side of the
43564
43445
  * value + unit contract (D972).
43565
43446
  *
@@ -45340,26 +45221,23 @@ var SettingsSchemaWithValuesSchema = object({
45340
45221
  var SettingsPatchSchema = record(string(), unknown());
45341
45222
  /** The scope of a scoped-settings call (D986): where the capability declared the values. */
45342
45223
  var ScopedSettingsScopeSchema = _enum(SCOPED_SETTINGS_SCOPES);
45224
+ /** One scoped schema an addon serves: its capability, scope and section ids. */
45225
+ var ScopedSettingsDeclarationSchema = object({
45226
+ cap: string(),
45227
+ scope: ScopedSettingsScopeSchema,
45228
+ sectionIds: array(string())
45229
+ });
45343
45230
  /** Standard success response for update operations. */
45344
45231
  var SettingsUpdateResultSchema = object({ success: literal(true) });
45345
45232
  method(object({
45346
- addonId: string(),
45347
- nodeId: string().optional(),
45348
- overlay: record(string(), unknown()).optional(),
45349
- cap: string().optional()
45350
- }), SettingsSchemaWithValuesSchema.nullable()), method(object({
45351
- addonId: string(),
45352
- nodeId: string().optional(),
45353
- patch: SettingsPatchSchema
45354
- }), SettingsUpdateResultSchema, {
45355
- kind: "mutation",
45356
- auth: "admin"
45357
- }), method(object({
45358
45233
  addonId: string(),
45359
45234
  cap: string(),
45360
45235
  scope: ScopedSettingsScopeSchema,
45361
45236
  nodeId: string().optional()
45362
45237
  }), SettingsSchemaWithValuesSchema.nullable()), method(object({
45238
+ addonId: string(),
45239
+ nodeId: string().optional()
45240
+ }), array(ScopedSettingsDeclarationSchema).nullable()), method(object({
45363
45241
  addonId: string(),
45364
45242
  cap: string(),
45365
45243
  scope: ScopedSettingsScopeSchema,
@@ -45374,9 +45252,6 @@ method(object({
45374
45252
  scope: ScopedSettingsScopeSchema,
45375
45253
  nodeId: string().optional()
45376
45254
  }), record(string(), unknown()).nullable()), method(object({
45377
- addonId: string(),
45378
- nodeId: string().optional()
45379
- }), SettingsSchemaWithValuesSchema.nullable()), method(object({
45380
45255
  addonId: string(),
45381
45256
  nodeId: string().optional(),
45382
45257
  instance: IntegrationInstanceRefSchema
@@ -46716,7 +46591,7 @@ var BackupDestinationInfoSchema = object({
46716
46591
  id: string(),
46717
46592
  /**
46718
46593
  * Manifest id of the owning addon. The Settings button on the
46719
- * destination card opens that addon's `globalSettingsSchema` panel.
46594
+ * destination card opens that addon's scoped settings panel.
46720
46595
  */
46721
46596
  addonId: string(),
46722
46597
  /** Operator-toggled enable flag from the destination-policy table. */
@@ -51231,6 +51106,7 @@ var deviceExportCapability = {
51231
51106
  })
51232
51107
  }
51233
51108
  };
51109
+ var DeviceAliasSchema = string().max(64).regex(/^[a-z][a-z0-9_]*$/);
51234
51110
  /**
51235
51111
  * A SITE ZONE — a named part of the property that several locations belong to.
51236
51112
  *
@@ -51624,6 +51500,12 @@ var DeviceInfoSchema = object({
51624
51500
  addonId: string(),
51625
51501
  type: _enum(DeviceType),
51626
51502
  name: string(),
51503
+ /** The name a value template uses for this device (`{{ stufa_veranda.temperature }}`),
51504
+ * entity_id style. Generated once from the name at first registration, unique
51505
+ * cluster-wide, editable through `setAlias`, NOT changed by a rename (D1021).
51506
+ * Optional: a record produced by an older build omits it until the boot
51507
+ * backfill has run. */
51508
+ alias: DeviceAliasSchema.optional(),
51627
51509
  /** Operator-organisational location label. `null` when unset. */
51628
51510
  location: string().nullable(),
51629
51511
  /** Soft-disabled flag. */
@@ -51943,6 +51825,25 @@ method(object({
51943
51825
  }), _void(), {
51944
51826
  kind: "mutation",
51945
51827
  auth: "admin"
51828
+ }), method(object({
51829
+ deviceId: number(),
51830
+ alias: string()
51831
+ }), discriminatedUnion("ok", [object({
51832
+ ok: literal(true),
51833
+ alias: DeviceAliasSchema
51834
+ }), object({
51835
+ ok: literal(false),
51836
+ reason: _enum([
51837
+ "empty",
51838
+ "too-long",
51839
+ "grammar",
51840
+ "reserved",
51841
+ "taken"
51842
+ ]),
51843
+ takenBy: number().optional()
51844
+ })]), {
51845
+ kind: "mutation",
51846
+ auth: "admin"
51946
51847
  }), method(object({
51947
51848
  deviceId: number(),
51948
51849
  location: string().nullable()
@@ -64682,6 +64583,11 @@ var NcScheduleSchema = object({
64682
64583
  * as a STATE SUMMARY at the end of each window of `schedule`.
64683
64584
  */
64684
64585
  var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
64586
+ _enum([
64587
+ "activation",
64588
+ "deactivation",
64589
+ "schedule"
64590
+ ]);
64685
64591
  /**
64686
64592
  * How a summary window is SENT (D698): `rule` (absent) = ONE notification with
64687
64593
  * every section; `section` = one notification per section with something to
@@ -64698,11 +64604,26 @@ var NcStateSummarySplitSchema = _enum(["rule", "section"]);
64698
64604
  * midnight crossing); the send time is each window's END. Refused on the
64699
64605
  * `alarm` family, which stays instant (`systemEventDeliveryProblems`).
64700
64606
  */
64701
- var NcSystemEventDeliverySchema = discriminatedUnion("mode", [object({ mode: literal("instant") }), object({
64702
- mode: literal("summary"),
64703
- schedule: NcScheduleSchema,
64704
- split: NcStateSummarySplitSchema.optional()
64705
- })]);
64607
+ var NcSystemEventDeliverySchema = discriminatedUnion("mode", [
64608
+ object({ mode: literal("instant") }),
64609
+ object({
64610
+ mode: literal("summary"),
64611
+ schedule: NcScheduleSchema,
64612
+ split: NcStateSummarySplitSchema.optional()
64613
+ }),
64614
+ object({
64615
+ mode: literal("modes"),
64616
+ /** The bad edge, and every kind that has a single edge. */
64617
+ onActivation: boolean(),
64618
+ /** The recovery edges of the classes of the selected kinds (derived, never stored per kind). */
64619
+ onDeactivation: boolean(),
64620
+ /** A state summary at the end of each window; absent = no summary. */
64621
+ onSchedule: object({
64622
+ schedule: NcScheduleSchema,
64623
+ grouping: NcStateSummarySplitSchema
64624
+ }).optional()
64625
+ })
64626
+ ]);
64706
64627
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
64707
64628
  var NcPlateMatcherSchema = object({
64708
64629
  /**
@@ -74478,7 +74399,7 @@ var TerminalInstanceInfoSchema = object({
74478
74399
  /**
74479
74400
  * False while the node the instance is bound to is not in the cluster
74480
74401
  * topology (forgotten, renamed, re-paired). The instance is kept; the
74481
- * operator re-points it with `updateInstance({ targetNodeId })`.
74402
+ * operator re-points it on the Terminal page.
74482
74403
  */
74483
74404
  nodeInCluster: boolean(),
74484
74405
  profileId: string(),
@@ -74516,41 +74437,7 @@ var TerminalOutputBatchSchema = object({
74516
74437
  snapshot: string().optional(),
74517
74438
  events: array(TerminalOutputEventSchema).readonly()
74518
74439
  });
74519
- method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
74520
- targetNodeId: string().min(1),
74521
- profileId: string().min(1),
74522
- name: string().trim().min(1).max(160).optional(),
74523
- executable: string().max(1024).optional(),
74524
- args: array(string().max(2048)).max(64).optional(),
74525
- cwd: string().max(1024).optional(),
74526
- environment: array(string().max(4096)).max(64).optional(),
74527
- profileSettings: ProfileSettingsBagSchema.optional()
74528
- }), TerminalInstanceInfoSchema, {
74529
- kind: "mutation",
74530
- auth: "admin"
74531
- }), method(object({
74532
- instanceId: string().min(1),
74533
- /** Re-point the instance to another node; the profile must exist there. */
74534
- targetNodeId: string().min(1).max(256).optional(),
74535
- name: string().trim().min(1).max(160).optional(),
74536
- executable: string().max(1024).optional(),
74537
- args: array(string().max(2048)).max(64).optional(),
74538
- cwd: string().max(1024).optional(),
74539
- environment: array(string().max(4096)).max(64).optional(),
74540
- profileSettings: ProfileSettingsBagSchema.optional()
74541
- }), TerminalInstanceInfoSchema, {
74542
- kind: "mutation",
74543
- auth: "admin"
74544
- }), method(object({ instanceId: string().min(1) }), _void(), {
74545
- kind: "mutation",
74546
- auth: "admin"
74547
- }), method(object({
74548
- instanceId: string().min(1),
74549
- enabled: boolean()
74550
- }), TerminalInstanceInfoSchema, {
74551
- kind: "mutation",
74552
- auth: "admin"
74553
- }), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
74440
+ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
74554
74441
  stableId: string().min(1),
74555
74442
  name: string().trim().min(1).max(160).optional()
74556
74443
  }), TerminalInstanceInfoSchema, {
@@ -74619,6 +74506,11 @@ var TimedRunUnitSchema = _enum(["s", "min"]);
74619
74506
  _enum(["switch", "pet-fountain"]);
74620
74507
  DeviceType.Heater, DeviceType.PetFountain;
74621
74508
  DeviceType.Heater, DeviceType.PetFountain;
74509
+ /** One duration, as the one-tap run asks for it. */
74510
+ var TimedRunQuickRunSchema = object({
74511
+ duration: number().positive().finite(),
74512
+ unit: TimedRunUnitSchema
74513
+ });
74622
74514
  /** Why a request was not carried out. Typed, so a caller can say it in words. */
74623
74515
  var TimedRunRefusalSchema = _enum([
74624
74516
  "unsupported-device",
@@ -74639,9 +74531,30 @@ object({
74639
74531
  activeUntil: number().nullable(),
74640
74532
  /** Who asked for the run (a user id or an addon id); `null` when nothing is armed or it did not say. */
74641
74533
  requestedBy: string().nullable(),
74534
+ /**
74535
+ * The one-tap run of THIS device: what a "Run" button on any surface starts. `null` when
74536
+ * the device is gone or its type has no timed run; a status from before this field
74537
+ * existed has none, and a surface falls back to the type's default.
74538
+ */
74539
+ quickRun: TimedRunQuickRunSchema.nullable(),
74642
74540
  lastFetchedAt: number()
74643
74541
  });
74644
- method(object({
74542
+ /** What the settings form needs: the unit, the bounds and the type's default. */
74543
+ var TimedRunOptionsSchema = object({
74544
+ unit: TimedRunUnitSchema,
74545
+ /** The longest run, in `unit`. */
74546
+ maxDuration: number(),
74547
+ defaultDuration: number()
74548
+ });
74549
+ /** The one-tap run duration, in the type's unit; `null` returns to the type's default. */
74550
+ var TimedRunSettingsPatchSchema = object({ quickRunDuration: number().positive().finite().nullable().optional() });
74551
+ method(object({ deviceId: number().int() }), TimedRunOptionsSchema), method(object({
74552
+ deviceId: number().int(),
74553
+ settings: TimedRunSettingsPatchSchema
74554
+ }), _void(), {
74555
+ kind: "mutation",
74556
+ auth: "admin"
74557
+ }), method(object({
74645
74558
  deviceId: number().int(),
74646
74559
  duration: number().positive().finite(),
74647
74560
  unit: TimedRunUnitSchema
@@ -77347,13 +77260,6 @@ Object.freeze({
77347
77260
  access: "view",
77348
77261
  role: "admin"
77349
77262
  },
77350
- "addonSettings.getGlobalSettings": {
77351
- capName: "addon-settings",
77352
- capScope: "system",
77353
- addonId: null,
77354
- access: "view",
77355
- role: "admin"
77356
- },
77357
77263
  "addonSettings.getIntegrationFormSchema": {
77358
77264
  capName: "addon-settings",
77359
77265
  capScope: "system",
@@ -77361,14 +77267,14 @@ Object.freeze({
77361
77267
  access: "view",
77362
77268
  role: "admin"
77363
77269
  },
77364
- "addonSettings.getIntegrationSettings": {
77270
+ "addonSettings.getScopedSettings": {
77365
77271
  capName: "addon-settings",
77366
77272
  capScope: "system",
77367
77273
  addonId: null,
77368
77274
  access: "view",
77369
77275
  role: "admin"
77370
77276
  },
77371
- "addonSettings.getScopedSettings": {
77277
+ "addonSettings.listScopedSettings": {
77372
77278
  capName: "addon-settings",
77373
77279
  capScope: "system",
77374
77280
  addonId: null,
@@ -77396,13 +77302,6 @@ Object.freeze({
77396
77302
  access: "create",
77397
77303
  role: "admin"
77398
77304
  },
77399
- "addonSettings.updateGlobalSettings": {
77400
- capName: "addon-settings",
77401
- capScope: "system",
77402
- addonId: null,
77403
- access: "create",
77404
- role: "admin"
77405
- },
77406
77305
  "addonSettings.updateScopedSettings": {
77407
77306
  capName: "addon-settings",
77408
77307
  capScope: "system",
@@ -79573,6 +79472,13 @@ Object.freeze({
79573
79472
  access: "create",
79574
79473
  role: "admin"
79575
79474
  },
79475
+ "deviceManager.setAlias": {
79476
+ capName: "device-manager",
79477
+ capScope: "system",
79478
+ addonId: null,
79479
+ access: "create",
79480
+ role: "admin"
79481
+ },
79576
79482
  "deviceManager.setChildLayout": {
79577
79483
  capName: "device-manager",
79578
79484
  capScope: "system",
@@ -86300,27 +86206,6 @@ Object.freeze({
86300
86206
  access: "create",
86301
86207
  role: "admin"
86302
86208
  },
86303
- "terminalSession.createInstance": {
86304
- capName: "terminal-session",
86305
- capScope: "system",
86306
- addonId: null,
86307
- access: "create",
86308
- role: "admin"
86309
- },
86310
- "terminalSession.deleteInstance": {
86311
- capName: "terminal-session",
86312
- capScope: "system",
86313
- addonId: null,
86314
- access: "delete",
86315
- role: "admin"
86316
- },
86317
- "terminalSession.listInstances": {
86318
- capName: "terminal-session",
86319
- capScope: "system",
86320
- addonId: null,
86321
- access: "view",
86322
- role: "admin"
86323
- },
86324
86209
  "terminalSession.listLegacyCameras": {
86325
86210
  capName: "terminal-session",
86326
86211
  capScope: "system",
@@ -86363,20 +86248,6 @@ Object.freeze({
86363
86248
  access: "create",
86364
86249
  role: "admin"
86365
86250
  },
86366
- "terminalSession.setInstanceEnabled": {
86367
- capName: "terminal-session",
86368
- capScope: "system",
86369
- addonId: null,
86370
- access: "create",
86371
- role: "admin"
86372
- },
86373
- "terminalSession.updateInstance": {
86374
- capName: "terminal-session",
86375
- capScope: "system",
86376
- addonId: null,
86377
- access: "create",
86378
- role: "admin"
86379
- },
86380
86251
  "terminalSession.writeInput": {
86381
86252
  capName: "terminal-session",
86382
86253
  capScope: "system",
@@ -86391,6 +86262,13 @@ Object.freeze({
86391
86262
  access: "create",
86392
86263
  role: "viewer"
86393
86264
  },
86265
+ "timedRun.getOptions": {
86266
+ capName: "timed-run",
86267
+ capScope: "device",
86268
+ addonId: null,
86269
+ access: "view",
86270
+ role: "viewer"
86271
+ },
86394
86272
  "timedRun.getStatus": {
86395
86273
  capName: "timed-run",
86396
86274
  capScope: "device",
@@ -86405,6 +86283,13 @@ Object.freeze({
86405
86283
  access: "create",
86406
86284
  role: "viewer"
86407
86285
  },
86286
+ "timedRun.setSettings": {
86287
+ capName: "timed-run",
86288
+ capScope: "device",
86289
+ addonId: null,
86290
+ access: "create",
86291
+ role: "admin"
86292
+ },
86408
86293
  "toast.onToast": {
86409
86294
  capName: "toast",
86410
86295
  capScope: "system",
@@ -87360,6 +87245,7 @@ function applianceExport(ecosystem, deviceType) {
87360
87245
  if (!isPlugApplianceType(deviceType)) return null;
87361
87246
  return APPLIANCE_EXPORT[ecosystem][deviceType];
87362
87247
  }
87248
+ string().min(1).max(4096);
87363
87249
  Object.freeze({
87364
87250
  "accessories.getStatus": [{
87365
87251
  name: "deviceId",
@@ -88043,6 +87929,11 @@ Object.freeze({
88043
87929
  form: "single",
88044
87930
  optional: false
88045
87931
  }],
87932
+ "deviceManager.setAlias": [{
87933
+ name: "deviceId",
87934
+ form: "single",
87935
+ optional: false
87936
+ }],
88046
87937
  "deviceManager.setChildLayout": [{
88047
87938
  name: "deviceId",
88048
87939
  form: "single",
@@ -90107,6 +89998,11 @@ Object.freeze({
90107
89998
  form: "single",
90108
89999
  optional: false
90109
90000
  }],
90001
+ "timedRun.getOptions": [{
90002
+ name: "deviceId",
90003
+ form: "single",
90004
+ optional: false
90005
+ }],
90110
90006
  "timedRun.getStatus": [{
90111
90007
  name: "deviceId",
90112
90008
  form: "single",
@@ -90117,6 +90013,11 @@ Object.freeze({
90117
90013
  form: "single",
90118
90014
  optional: false
90119
90015
  }],
90016
+ "timedRun.setSettings": [{
90017
+ name: "deviceId",
90018
+ form: "single",
90019
+ optional: false
90020
+ }],
90120
90021
  "update.getStatus": [{
90121
90022
  name: "deviceId",
90122
90023
  form: "single",
@@ -90979,6 +90880,7 @@ var STATE_SUMMARY_VARS = [
90979
90880
  [...RULE_TEXT],
90980
90881
  [...RULE_TEXT],
90981
90882
  [...RULE_TEXT],
90883
+ [...RULE_TEXT],
90982
90884
  [...RULE_BODY_ONLY],
90983
90885
  [...RULE_TEXT],
90984
90886
  ([...RULE_TEXT], [...DEVICE_EVENTS]),