@camstack/types 1.2.275 → 1.2.276

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -9789,6 +9789,935 @@ var CompositionBlockStateSchema = z.object({
9789
9789
  fields: z.array(CompositionFieldStateSchema)
9790
9790
  });
9791
9791
  //#endregion
9792
+ //#region src/composition/plan-result.ts
9793
+ function problem(code, path, message) {
9794
+ return {
9795
+ code,
9796
+ path,
9797
+ message
9798
+ };
9799
+ }
9800
+ function refused(...problems) {
9801
+ return {
9802
+ problems,
9803
+ fields: [],
9804
+ features: [],
9805
+ events: []
9806
+ };
9807
+ }
9808
+ /** Where a planned field sits in the composition: `features[N].fields.<path>` or `features[N].items.<key>.fields.<path>`. */
9809
+ function compositionFieldAt(field) {
9810
+ const inner = field.item === void 0 ? "fields" : `items.${field.item.key}.fields`;
9811
+ return `features[${field.featureIndex}].${inner}.${field.path}`;
9812
+ }
9813
+ //#endregion
9814
+ //#region src/composition/expression-kinds.ts
9815
+ var NUMBER = {
9816
+ kind: "fixed",
9817
+ result: ["number"]
9818
+ };
9819
+ var BOOLEAN = {
9820
+ kind: "fixed",
9821
+ result: ["boolean"]
9822
+ };
9823
+ /** One rule per builtin. `expression-kinds.spec.ts` fails for a builtin missing here. */
9824
+ var BUILTIN_RESULT_KINDS = Object.freeze({
9825
+ min: NUMBER,
9826
+ max: NUMBER,
9827
+ abs: NUMBER,
9828
+ floor: NUMBER,
9829
+ ceil: NUMBER,
9830
+ sqrt: NUMBER,
9831
+ round: NUMBER,
9832
+ pow: NUMBER,
9833
+ clamp: NUMBER,
9834
+ avg: NUMBER,
9835
+ sum: NUMBER,
9836
+ age: NUMBER,
9837
+ convert: NUMBER,
9838
+ coalesce: { kind: "coalesce" },
9839
+ any: BOOLEAN,
9840
+ all: BOOLEAN,
9841
+ within: BOOLEAN,
9842
+ latest: {
9843
+ kind: "fixed",
9844
+ result: ["number", "null"]
9845
+ },
9846
+ number: {
9847
+ kind: "fixed",
9848
+ result: ["number", "null"]
9849
+ },
9850
+ rose: {
9851
+ kind: "fixed",
9852
+ result: ["number", "null"]
9853
+ },
9854
+ count: NUMBER
9855
+ });
9856
+ var KindInferenceError = class extends Error {};
9857
+ function kindOfValue(value) {
9858
+ if (value === null) return "null";
9859
+ if (typeof value === "number") return "number";
9860
+ if (typeof value === "string") return "string";
9861
+ return "boolean";
9862
+ }
9863
+ function only(kind) {
9864
+ return new Set([kind]);
9865
+ }
9866
+ function union(...sets) {
9867
+ return new Set(sets.flatMap((s) => [...s]));
9868
+ }
9869
+ function withoutNull(set) {
9870
+ return new Set([...set].filter((k) => k !== "null"));
9871
+ }
9872
+ function binaryKinds(op, left, right) {
9873
+ if (op === "+") {
9874
+ const all = [...left, ...right];
9875
+ if (all.every((k) => k === "string")) return only("string");
9876
+ if (all.every((k) => k === "number")) return only("number");
9877
+ return new Set(["number", "string"]);
9878
+ }
9879
+ if (op === "-" || op === "*" || op === "/" || op === "%") return only("number");
9880
+ return only("boolean");
9881
+ }
9882
+ /** "exactly N" / "at least N" / "N–M", for an arity refusal that says what IS allowed. */
9883
+ function arityRange(builtin) {
9884
+ if (builtin.minArgs === builtin.maxArgs) return `exactly ${builtin.minArgs}`;
9885
+ if (builtin.maxArgs === Number.POSITIVE_INFINITY) return `at least ${builtin.minArgs}`;
9886
+ return `${builtin.minArgs}–${builtin.maxArgs}`;
9887
+ }
9888
+ function callKinds(callee, args) {
9889
+ const builtin = EXPRESSION_BUILTINS[callee];
9890
+ if (builtin !== void 0 && (args.length < builtin.minArgs || args.length > builtin.maxArgs)) throw new KindInferenceError(`${callee}: wrong number of arguments (${args.length}); expected ${arityRange(builtin)}`);
9891
+ const rule = BUILTIN_RESULT_KINDS[callee];
9892
+ if (rule === void 0) throw new KindInferenceError(`no result-kind rule for builtin '${callee}'`);
9893
+ if (rule.kind === "fixed") return new Set(rule.result);
9894
+ const nonNull = union(...args.map(withoutNull));
9895
+ return args.every((a) => a.has("null")) ? union(nonNull, only("null")) : nonNull;
9896
+ }
9897
+ function kindsOf(node, bindings) {
9898
+ switch (node.kind) {
9899
+ case "literal": return only(kindOfValue(node.value));
9900
+ case "identifier": {
9901
+ if (node.name === "now") return only("number");
9902
+ const bound = bindings.get(node.name);
9903
+ if (bound === void 0) throw new KindInferenceError(`unbound identifier '${node.name}'`);
9904
+ return bound;
9905
+ }
9906
+ case "unary": return only(node.op === "!" ? "boolean" : "number");
9907
+ case "binary": return binaryKinds(node.op, kindsOf(node.left, bindings), kindsOf(node.right, bindings));
9908
+ case "logical": return union(kindsOf(node.left, bindings), kindsOf(node.right, bindings));
9909
+ case "conditional": return union(kindsOf(node.consequent, bindings), kindsOf(node.alternate, bindings));
9910
+ case "call": return callKinds(node.callee, node.args.map((a) => kindsOf(a, bindings)));
9911
+ }
9912
+ }
9913
+ function nodeContainsCall(node, callee) {
9914
+ switch (node.kind) {
9915
+ case "literal":
9916
+ case "identifier": return false;
9917
+ case "unary": return nodeContainsCall(node.operand, callee);
9918
+ case "binary":
9919
+ case "logical": return nodeContainsCall(node.left, callee) || nodeContainsCall(node.right, callee);
9920
+ case "conditional": return nodeContainsCall(node.test, callee) || nodeContainsCall(node.consequent, callee) || nodeContainsCall(node.alternate, callee);
9921
+ case "call": return node.callee === callee || node.args.some((arg) => nodeContainsCall(arg, callee));
9922
+ }
9923
+ }
9924
+ function expressionContainsBuiltinCall(expr, callee) {
9925
+ const compiled = compileExpressionSafe(expr);
9926
+ return compiled.ok && nodeContainsCall(compiled.parsed.ast, callee);
9927
+ }
9928
+ function inferExpressionKinds(input) {
9929
+ const compiled = compileExpressionSafe(input.expr);
9930
+ if (!compiled.ok) return {
9931
+ ok: false,
9932
+ error: compiled.error
9933
+ };
9934
+ try {
9935
+ return {
9936
+ ok: true,
9937
+ kinds: kindsOf(compiled.parsed.ast, input.bindingKinds)
9938
+ };
9939
+ } catch (err) {
9940
+ if (err instanceof KindInferenceError) return {
9941
+ ok: false,
9942
+ error: err.message
9943
+ };
9944
+ throw err;
9945
+ }
9946
+ }
9947
+ //#endregion
9948
+ //#region src/composition/field-kinds.ts
9949
+ /**
9950
+ * The kind half of planning a composition field (D659): which kinds a source
9951
+ * can produce, whether they fit a target field, and the field's role.
9952
+ * Shared by the top-level planner (`validate-composition.ts`) and the item
9953
+ * planner (`composition-items.ts`). Internal to the composition module — NOT
9954
+ * in the barrel: these are planner internals, not a published contract.
9955
+ */
9956
+ function readKinds(read, lookupCap) {
9957
+ const def = lookupCap(read.cap);
9958
+ const schema = def?.runtimeState ?? def?.status?.schema;
9959
+ if (def === null || schema === void 0) return {
9960
+ ok: false,
9961
+ code: "source-field-unknown",
9962
+ message: `no capability \`${read.cap}\` with state to read`
9963
+ };
9964
+ const field = describeStateField(schema, read.fieldPath);
9965
+ if (field === null) return {
9966
+ ok: false,
9967
+ code: "source-field-unknown",
9968
+ message: `\`${read.cap}\` has no field \`${read.fieldPath}\``
9969
+ };
9970
+ const base = field.kind === "enum" ? "string" : field.kind;
9971
+ return {
9972
+ ok: true,
9973
+ kinds: new Set(field.nullable ? [base, "null"] : [base])
9974
+ };
9975
+ }
9976
+ function sourceKinds(source, lookupCap) {
9977
+ if (source.kind === "from") return readKinds(source, lookupCap);
9978
+ if (source.kind === "code") return {
9979
+ ok: false,
9980
+ code: "reserved-variant",
9981
+ message: "code fields arrive in slice 4"
9982
+ };
9983
+ const bindingKinds = /* @__PURE__ */ new Map();
9984
+ for (const [name, binding] of Object.entries(source.bindings)) {
9985
+ if (binding.kind === "literal") {
9986
+ bindingKinds.set(name, new Set([kindOfValue(binding.value)]));
9987
+ continue;
9988
+ }
9989
+ const kinds = readKinds(binding, lookupCap);
9990
+ if (!kinds.ok) return {
9991
+ ...kinds,
9992
+ message: `binding \`${name}\`: ${kinds.message}`
9993
+ };
9994
+ bindingKinds.set(name, kinds.kinds);
9995
+ }
9996
+ const inferred = inferExpressionKinds({
9997
+ expr: source.expr,
9998
+ bindingKinds
9999
+ });
10000
+ return inferred.ok ? {
10001
+ ok: true,
10002
+ kinds: inferred.kinds
10003
+ } : {
10004
+ ok: false,
10005
+ code: "expression-invalid",
10006
+ message: inferred.error
10007
+ };
10008
+ }
10009
+ function compatibility(cap, target, kinds, at) {
10010
+ const allowed = target.kind === "enum" ? "string" : target.kind;
10011
+ const offending = [...kinds].filter((k) => k !== "null" && k !== allowed);
10012
+ const problems = [];
10013
+ if (offending.length > 0) problems.push(problem("kind-mismatch", at, `\`${cap}.${target.path}\` is a ${target.kind}; this source can produce ${offending.join(" or ")}`));
10014
+ if (kinds.has("null") && !target.nullable) problems.push(problem("may-be-null", at, `\`${cap}.${target.path}\` cannot be null and this source can produce null — wrap it in coalesce(…) or pick a non-null source`));
10015
+ return problems;
10016
+ }
10017
+ /**
10018
+ * A string a source produces WITHOUT reading any device — a field-level
10019
+ * `expression` source whose compiled AST is a bare string literal (`"red"`,
10020
+ * never `a` or `a + "x"`). Anything else that can only produce `'string'` at
10021
+ * the kind level (a `from` read of an enum-typed source field, a computed
10022
+ * expression) is NOT checked against the target's `enumValues` here: the
10023
+ * kind inference already collapsed it to the coarse `'string'` kind, losing
10024
+ * whichever enum it actually came from, so membership can only be judged at
10025
+ * write time against the runtime-state schema. Known limitation — see the
10026
+ * fix report for Task 6 round 1.
10027
+ */
10028
+ function literalStringValue(source) {
10029
+ if (source.kind !== "expression") return null;
10030
+ const compiled = compileExpressionSafe(source.expr);
10031
+ if (!compiled.ok) return null;
10032
+ const ast = compiled.parsed.ast;
10033
+ return ast.kind === "literal" && typeof ast.value === "string" ? ast.value : null;
10034
+ }
10035
+ /**
10036
+ * An enum target whose source is a save-time-KNOWN string literal outside its
10037
+ * `enumValues` is refused now rather than left to fail the write later. A
10038
+ * dynamic source (a `from` read, a non-literal expression) is left to
10039
+ * runtime — see {@link literalStringValue}.
10040
+ */
10041
+ function enumLiteralProblem(cap, target, source, at) {
10042
+ if (target.kind !== "enum" || target.enumValues === void 0) return null;
10043
+ const value = literalStringValue(source);
10044
+ if (value === null || target.enumValues.includes(value)) return null;
10045
+ const allowed = target.enumValues.map((v) => `\`${v}\``).join(", ");
10046
+ return problem("kind-mismatch", at, `\`${cap}.${target.path}\` accepts only ${allowed}; this source is the literal \`${value}\``);
10047
+ }
10048
+ function roleOf(source) {
10049
+ if (source.kind !== "expression") return "derived";
10050
+ if (expressionContainsBuiltinCall(source.expr, "count")) return "accumulator";
10051
+ if (fieldReads(source).length > 0) return "derived";
10052
+ const compiled = compileExpressionSafe(source.expr);
10053
+ return compiled.ok && compiled.parsed.identifiers.has("now") ? "clock" : "constant";
10054
+ }
10055
+ /**
10056
+ * How a planned field says "unavailable", per feature mode and AFTER `roleOf`
10057
+ * (D393, D663 rulings S1 + S1b). The composer cannot take a device it does not
10058
+ * own offline, and D393 forbids a stale number, so on an existing target a
10059
+ * field that READS a source never gets `offline`.
10060
+ */
10061
+ function unavailableFor(tf, role, mode, cap, at) {
10062
+ if (mode === "replace" && (role === "derived" || role === "accumulator")) return {
10063
+ ok: true,
10064
+ unavailable: "release"
10065
+ };
10066
+ if (mode === "new" || role !== "derived") return {
10067
+ ok: true,
10068
+ unavailable: tf.nullable ? "null" : "offline"
10069
+ };
10070
+ if (tf.nullable) return {
10071
+ ok: true,
10072
+ unavailable: "null"
10073
+ };
10074
+ if (tf.enumValues?.includes("unknown") === true) return {
10075
+ ok: true,
10076
+ unavailable: "unknown"
10077
+ };
10078
+ return {
10079
+ ok: false,
10080
+ problem: problem("not-replaceable", at, `\`${cap}.${tf.path}\` reads a source but can say neither null nor 'unknown', and an ADDED capability has no native reading to fall back to (D393, D663)`)
10081
+ };
10082
+ }
10083
+ //#endregion
10084
+ //#region src/composition/composition-items.ts
10085
+ /** Item fields the composer writes itself, with the value it writes. */
10086
+ var COMPOSED_ITEM_FIXED_FIELDS = { resettable: false };
10087
+ function reservedItemFields(itemArray) {
10088
+ return new Set([
10089
+ itemArray.keyField,
10090
+ ...itemArray.labelField === void 0 ? [] : [itemArray.labelField],
10091
+ ...Object.keys(COMPOSED_ITEM_FIXED_FIELDS)
10092
+ ]);
10093
+ }
10094
+ /** A required leaf under an optional parent is required only once something writes that parent. */
10095
+ function leafRequired(itemArray, path, written) {
10096
+ const described = describeStateField(itemArray.itemSchema, path);
10097
+ if (described === null || !described.required) return false;
10098
+ return optionalAncestors(itemArray.itemSchema, path).every((parent) => written.some((w) => w.startsWith(`${parent}.`)));
10099
+ }
10100
+ function missingLeaves({ capName, itemArray, reserved }, item, at) {
10101
+ const written = Object.keys(item.fields);
10102
+ return enumerateSchemaFields(itemArray.itemSchema).flatMap((leaf) => {
10103
+ if (reserved.has(leaf.path) || leaf.path in item.fields) return [];
10104
+ if (!leafRequired(itemArray, leaf.path, written)) return [];
10105
+ const described = describeStateField(itemArray.itemSchema, leaf.path);
10106
+ if (described === null || described.nullable) return [];
10107
+ return [problem("missing-field", `${at}.fields.${leaf.path}`, `\`${capName}.${itemArray.path}[].${leaf.path}\` is required and has no source`)];
10108
+ });
10109
+ }
10110
+ function planItemField(ctx, leaf) {
10111
+ const { capName, itemArray, featureIndex, lookupCap } = ctx;
10112
+ const { key, label, path, source } = leaf;
10113
+ const at = `features[${featureIndex}].items.${key}.fields.${path}`;
10114
+ if (ctx.reserved.has(path)) return refused(problem("item-field-reserved", at, `\`${capName}.${itemArray.path}[].${path}\` is set by the composer itself — it takes no source`));
10115
+ const tf = describeStateField(itemArray.itemSchema, path);
10116
+ if (tf === null) return refused(problem("unknown-field", at, `a \`${capName}\` item has no field \`${path}\``));
10117
+ const kinds = sourceKinds(source, lookupCap);
10118
+ if (!kinds.ok) return refused(problem(kinds.code, at, kinds.message));
10119
+ const role = roleOf(source);
10120
+ const unavailable = unavailableFor(tf, role, ctx.mode, capName, at);
10121
+ if (!unavailable.ok) return refused(unavailable.problem);
10122
+ const plan = {
10123
+ cap: capName,
10124
+ path,
10125
+ item: {
10126
+ arrayPath: itemArray.path,
10127
+ key,
10128
+ label
10129
+ },
10130
+ featureIndex,
10131
+ kind: tf.kind,
10132
+ nullable: tf.nullable,
10133
+ required: tf.required,
10134
+ unavailable: unavailable.unavailable,
10135
+ role,
10136
+ source,
10137
+ reads: [...fieldReads(source)]
10138
+ };
10139
+ const enumProblem = enumLiteralProblem(capName, tf, source, at);
10140
+ return {
10141
+ problems: [...compatibility(capName, tf, kinds.kinds, at), ...enumProblem === null ? [] : [enumProblem]],
10142
+ fields: [plan],
10143
+ features: [],
10144
+ events: []
10145
+ };
10146
+ }
10147
+ function planItems(def, feature, featureIndex, lookupCap, mode = "new") {
10148
+ const at = `features[${featureIndex}].items`;
10149
+ const itemArray = def.status?.itemArray;
10150
+ if (itemArray === void 0) return refused(problem("not-item-array", at, `\`${def.name}\` has no item array — it takes no \`items\``));
10151
+ if (itemArray.path !== "items") return refused(problem("not-item-array", at, `\`${def.name}\`'s item array is at \`${itemArray.path}\`, not \`${COMPOSITION_ITEM_ARRAY_PATH}\` — not composable yet`));
10152
+ const ctx = {
10153
+ capName: def.name,
10154
+ itemArray,
10155
+ reserved: reservedItemFields(itemArray),
10156
+ featureIndex,
10157
+ lookupCap,
10158
+ mode
10159
+ };
10160
+ const results = Object.entries(feature.items ?? {}).flatMap(([key, item]) => [{
10161
+ problems: missingLeaves(ctx, item, `${at}.${key}`),
10162
+ fields: [],
10163
+ features: [],
10164
+ events: []
10165
+ }, ...Object.entries(item.fields).map(([path, source]) => planItemField(ctx, {
10166
+ key,
10167
+ label: item.label,
10168
+ path,
10169
+ source
10170
+ }))]);
10171
+ return {
10172
+ problems: results.flatMap((r) => r.problems),
10173
+ fields: results.flatMap((r) => r.fields),
10174
+ features: [],
10175
+ events: []
10176
+ };
10177
+ }
10178
+ //#endregion
10179
+ //#region src/composition/composition-graph.ts
10180
+ /**
10181
+ * The field graph across every composition, and the cycles in it (D659).
10182
+ *
10183
+ * A node is ONE field of ONE device (`<addon>/<stableId>#<cap>.<field>`); an
10184
+ * edge points from a composed field to each field it reads. A cycle, direct or
10185
+ * through another composition, is refused at save by name (spec §2).
10186
+ *
10187
+ * The graph is built for ONE save: the CANDIDATE composition (the one being
10188
+ * validated) plus every STORED composition. The candidate replaces its own old
10189
+ * version, identified BY BLOCK ID wherever it sits in `stored` — whether a save
10190
+ * introduces or removes a cycle must never depend on array order. A DIFFERENT
10191
+ * block targeting the candidate's device is refused by name: one composition
10192
+ * per device (D663). Two different stored peers that (wrongly) target the same
10193
+ * device are corrupted state, not a cycle to resolve by picking one silently;
10194
+ * that is refused by name too (D391).
10195
+ *
10196
+ * A customization of an EXISTING device reads that device's NATIVE value for a
10197
+ * field it replaces or does not write ("Invert state" reads the `on` it
10198
+ * replaces): such a self-read is no edge, so it is never a cycle (D663).
10199
+ * Another composition reading that field reads the customizer's output.
10200
+ *
10201
+ * `findCompositionCycles` reports at least one cycle per cycle-SET (the DFS
10202
+ * marks a node `done` after its first expansion) — not every elementary cycle
10203
+ * through a shared node, so the path it names may AVOID the candidate while
10204
+ * one through it goes unreported. What a save refuses is therefore decided per
10205
+ * strongly connected component (`findCandidateCycles`, C-1). A dotted
10206
+ * `fieldPath` is matched only as an exact string: a write to `state.value` and
10207
+ * a read of `state` would not connect (no nested field writes exist yet).
10208
+ *
10209
+ * An item leaf is its own node, `…#consumables.items[desiccant].status`
10210
+ * (`featureFieldEntries`), so two items sharing an inner path never merge. No
10211
+ * READ can name an array element (`describeStateField` never describes one),
10212
+ * so an item node is write-only: its edges to sources are what the check needs.
10213
+ */
10214
+ /** Two blocks' compositions target the same device — refused by name, never silently resolved. */
10215
+ var CompositionGraphError = class extends Error {};
10216
+ /** `"cap.field"` of every field a peer writes — the same spelling as `compositionFieldKey`. */
10217
+ function writtenFields(peer) {
10218
+ return new Set(peer.composition.features.flatMap((feature) => !compositionFeatureEnabled(feature) || feature.kind !== "fields" ? [] : featureFieldEntries(feature).map(({ fieldPath }) => `${feature.cap}.${fieldPath}`)));
10219
+ }
10220
+ /** A read of the peer's OWN device is an edge only when it reads the peer's own output (rule 5, D663). */
10221
+ function readsComposedValue(peer, written, read) {
10222
+ if (compositionSourceKey(read.source) !== compositionSourceKey(peer.target)) return true;
10223
+ const field = `${read.cap}.${read.fieldPath}`;
10224
+ return written.has(field) && peer.replaced?.has(field) !== true;
10225
+ }
10226
+ function peerEdges(peer) {
10227
+ const written = writtenFields(peer);
10228
+ return peer.composition.features.flatMap((feature) => !compositionFeatureEnabled(feature) || feature.kind !== "fields" ? [] : featureFieldEntries(feature).map(({ fieldPath, source }) => [compositionReadKey({
10229
+ source: peer.target,
10230
+ cap: feature.cap,
10231
+ fieldPath
10232
+ }), fieldReads(source).filter((read) => readsComposedValue(peer, written, read)).map(compositionReadKey)]));
10233
+ }
10234
+ /**
10235
+ * Every peer that actually takes part in the graph: each stored peer minus the
10236
+ * candidate's own old version (same block id — the drop happens before any
10237
+ * edge is built, so its old edges never enter the map), plus the candidate
10238
+ * itself, exactly once. Throws {@link CompositionGraphError} when a DIFFERENT
10239
+ * block targets the candidate's device, or two stored peers share a device.
10240
+ */
10241
+ function resolvedPeers(candidate, stored) {
10242
+ const candidateKey = compositionSourceKey(candidate.target);
10243
+ const survivors = /* @__PURE__ */ new Map();
10244
+ for (const peer of stored) {
10245
+ if (peer.blockId === candidate.blockId) continue;
10246
+ const key = compositionSourceKey(peer.target);
10247
+ if (key === candidateKey) throw new CompositionGraphError(`block \`${peer.blockId}\` and block \`${candidate.blockId}\` both target device \`${key}\` — one composition per device; delete or edit the existing one`);
10248
+ const clash = survivors.get(key);
10249
+ if (clash !== void 0) throw new CompositionGraphError(`two stored compositions (\`${clash.blockId}\`, \`${peer.blockId}\`) both target device \`${key}\` — refusing to build the field graph`);
10250
+ survivors.set(key, peer);
10251
+ }
10252
+ return [...survivors.values(), candidate];
10253
+ }
10254
+ function compositionEdges(candidate, stored) {
10255
+ const edges = resolvedPeers(candidate, stored).flatMap(peerEdges);
10256
+ return new Map(edges);
10257
+ }
10258
+ function findCompositionCycles(candidate, stored) {
10259
+ const edges = compositionEdges(candidate, stored);
10260
+ const marks = /* @__PURE__ */ new Map();
10261
+ const found = /* @__PURE__ */ new Map();
10262
+ const visit = (node, stack) => {
10263
+ const mark = marks.get(node);
10264
+ if (mark === "done") return;
10265
+ if (mark === "visiting") {
10266
+ const path = [...stack.slice(stack.indexOf(node)), node];
10267
+ const id = [...new Set(path)].toSorted().join("|");
10268
+ if (!found.has(id)) found.set(id, { path });
10269
+ return;
10270
+ }
10271
+ marks.set(node, "visiting");
10272
+ for (const next of edges.get(node) ?? []) visit(next, [...stack, node]);
10273
+ marks.set(node, "done");
10274
+ };
10275
+ for (const node of edges.keys()) visit(node, []);
10276
+ return [...found.values()];
10277
+ }
10278
+ /** Tarjan's strongly connected components over every node of the graph (sources included). */
10279
+ function stronglyConnected(edges) {
10280
+ const index = /* @__PURE__ */ new Map();
10281
+ const low = /* @__PURE__ */ new Map();
10282
+ const onStack = /* @__PURE__ */ new Set();
10283
+ const stack = [];
10284
+ const components = [];
10285
+ const connect = (node) => {
10286
+ index.set(node, index.size);
10287
+ low.set(node, index.get(node) ?? 0);
10288
+ stack.push(node);
10289
+ onStack.add(node);
10290
+ for (const next of edges.get(node) ?? []) if (!index.has(next)) {
10291
+ connect(next);
10292
+ low.set(node, Math.min(low.get(node) ?? 0, low.get(next) ?? 0));
10293
+ } else if (onStack.has(next)) low.set(node, Math.min(low.get(node) ?? 0, index.get(next) ?? 0));
10294
+ if (low.get(node) !== index.get(node)) return;
10295
+ const component = [];
10296
+ for (let member = stack.pop(); member !== void 0; member = stack.pop()) {
10297
+ onStack.delete(member);
10298
+ component.push(member);
10299
+ if (member === node) break;
10300
+ }
10301
+ components.push(component);
10302
+ };
10303
+ for (const node of edges.keys()) if (!index.has(node)) connect(node);
10304
+ return components;
10305
+ }
10306
+ /** The shortest walk from `start` back to itself inside `component` (one exists: the component has a cycle). */
10307
+ function cycleThrough(start, component, edges) {
10308
+ const parent = /* @__PURE__ */ new Map();
10309
+ const queue = [start];
10310
+ for (let head = 0; head < queue.length; head += 1) {
10311
+ const node = queue[head];
10312
+ if (node === void 0) break;
10313
+ for (const next of edges.get(node) ?? []) {
10314
+ if (next === start) {
10315
+ const chain = [];
10316
+ for (let at = node; at !== void 0 && at !== start; at = parent.get(at)) chain.push(at);
10317
+ return [
10318
+ start,
10319
+ ...chain.reverse(),
10320
+ start
10321
+ ];
10322
+ }
10323
+ if (!component.has(next) || parent.has(next)) continue;
10324
+ parent.set(next, node);
10325
+ queue.push(next);
10326
+ }
10327
+ }
10328
+ return [start, start];
10329
+ }
10330
+ /**
10331
+ * The cycles THIS save closes, decided per strongly connected component — never
10332
+ * per reported DFS path, which names one back-edge per revisit and can report a
10333
+ * component's cycle by a path that avoids the candidate while the one through it
10334
+ * goes unreported. A component refuses when it holds a candidate node and a
10335
+ * cycle (more than one node, or a self-loop). Components without a candidate
10336
+ * node are not this save's cycles.
10337
+ */
10338
+ function findCandidateCycles(candidate, stored) {
10339
+ const edges = compositionEdges(candidate, stored);
10340
+ const prefix = `${compositionSourceKey(candidate.target)}#`;
10341
+ return stronglyConnected(edges).flatMap((members) => {
10342
+ const start = members.find((n) => n.startsWith(prefix));
10343
+ if (start === void 0) return [];
10344
+ const component = new Set(members);
10345
+ const selfLoop = members.length === 1 && (edges.get(start) ?? []).includes(start);
10346
+ if (members.length === 1 && !selfLoop) return [];
10347
+ return [{
10348
+ path: cycleThrough(start, component, edges),
10349
+ component
10350
+ }];
10351
+ });
10352
+ }
10353
+ //#endregion
10354
+ //#region src/composition/validate-composition.ts
10355
+ function buildCapabilityLookup(defs) {
10356
+ const byName = new Map(defs.map((d) => [d.name, d]));
10357
+ return (capName) => byName.get(capName) ?? null;
10358
+ }
10359
+ /** Caps every `BaseDevice` registers on itself; a second registration throws. */
10360
+ var BASE_DEVICE_CAPS = new Set(["device-status", "feature-probe"]);
10361
+ var PENDING_SELF = {
10362
+ addonId: COMPOSER_ADDON_ID,
10363
+ stableId: `${COMPOSED_DEVICE_STABLE_ID_PREFIX}(unsaved)`
10364
+ };
10365
+ /** The candidate's block id before its first save. Stored block ids are `randomUUID()`, so none can carry it. */
10366
+ var PENDING_BLOCK_ID = "(unsaved)";
10367
+ function composableCap(feature, at, lookupCap) {
10368
+ const def = lookupCap(feature.cap);
10369
+ if (def === null) return problem("unknown-capability", `${at}.cap`, `no capability is named \`${feature.cap}\``);
10370
+ if (BASE_DEVICE_CAPS.has(def.name)) return problem("not-composable", `${at}.cap`, `\`${def.name}\` is registered by every device itself — it cannot be composed`);
10371
+ const state = def.runtimeState;
10372
+ if (def.scope !== "device" || state === void 0) return problem("not-composable", `${at}.cap`, `\`${def.name}\` has no per-device state to compose`);
10373
+ return {
10374
+ def,
10375
+ state,
10376
+ fields: describeTopLevelStateFields(state)
10377
+ };
10378
+ }
10379
+ /**
10380
+ * A capability BUILT by the composition (a new device, or one ADDED to an
10381
+ * existing device) must fit the device type, serve no command, and have every
10382
+ * required field. A REPLACE needs none of it: the cap is bound (a fact), the
10383
+ * native keeps serving its methods, and only the named fields are owned (D663).
10384
+ */
10385
+ function builtCapProblems({ def, state, fields: targetFields }, feature, at, deviceType) {
10386
+ const problems = [];
10387
+ if (def.deviceTypes !== void 0 && !def.deviceTypes.includes(deviceType)) problems.push(problem("wrong-device-type", `${at}.cap`, `\`${def.name}\` is not offered on a \`${deviceType}\` device (it allows ${def.deviceTypes.join(", ")})`));
10388
+ const served = Object.entries(def.methods).filter(([name, m]) => m.systemOnly !== true && def.composedMethods?.[name] === void 0).map(([name]) => `\`${name}\``);
10389
+ if (served.length > 0) problems.push(problem("has-commands", `${at}.cap`, `\`${def.name}\` has ${served.join(", ")}, which a composed device cannot serve until commands arrive (slice 3)`));
10390
+ const itemArrayPath = feature.items === void 0 ? null : def.status?.itemArray?.path ?? null;
10391
+ for (const key of requiredTopLevelKeys(state)) {
10392
+ if (key === itemArrayPath) continue;
10393
+ if (!targetFields.has(key)) problems.push(problem("not-composable", `${at}.fields`, `\`${def.name}.${key}\` is not a scalar — nested fields arrive in a later slice`));
10394
+ else if (!(key in feature.fields)) problems.push(problem("missing-field", `${at}.fields.${key}`, `\`${def.name}.${key}\` is required and has no source`));
10395
+ }
10396
+ return problems;
10397
+ }
10398
+ function planTopLevelField({ def, fields }, field, mode, lookupCap) {
10399
+ const { featureIndex, path, source } = field;
10400
+ const fieldAt = `features[${featureIndex}].fields.${path}`;
10401
+ if (path.includes(".")) return refused(problem("nested-field", fieldAt, `\`${path}\` is nested — nested fields arrive in a later slice`));
10402
+ const tf = fields.get(path);
10403
+ if (tf === void 0) return refused(problem("unknown-field", fieldAt, `\`${def.name}\` has no field \`${path}\``));
10404
+ const kinds = sourceKinds(source, lookupCap);
10405
+ if (!kinds.ok) return refused(problem(kinds.code, fieldAt, kinds.message));
10406
+ const role = roleOf(source);
10407
+ const unavailable = unavailableFor(tf, role, mode, def.name, fieldAt);
10408
+ if (!unavailable.ok) return refused(unavailable.problem);
10409
+ const plan = {
10410
+ cap: def.name,
10411
+ path,
10412
+ featureIndex,
10413
+ kind: tf.kind,
10414
+ nullable: tf.nullable,
10415
+ required: tf.required,
10416
+ unavailable: unavailable.unavailable,
10417
+ role,
10418
+ source,
10419
+ reads: [...fieldReads(source)]
10420
+ };
10421
+ const enumProblem = enumLiteralProblem(def.name, tf, source, fieldAt);
10422
+ return {
10423
+ problems: [...compatibility(def.name, tf, kinds.kinds, fieldAt), ...enumProblem === null ? [] : [enumProblem]],
10424
+ fields: [plan],
10425
+ features: [],
10426
+ events: []
10427
+ };
10428
+ }
10429
+ function planFeature(feature, featureIndex, target, lookupCap) {
10430
+ const at = `features[${featureIndex}]`;
10431
+ const cap = composableCap(feature, at, lookupCap);
10432
+ if ("code" in cap) return refused(cap);
10433
+ const capProblems = target.mode === "replace" ? [] : [...builtCapProblems(cap, feature, at, target.deviceType)];
10434
+ if (feature.commands !== void 0 && Object.keys(feature.commands).length > 0) capProblems.push(problem("reserved-variant", `${at}.commands`, "commands (`forward`) arrive in slice 3"));
10435
+ const perField = Object.entries(feature.fields).map(([path, source]) => planTopLevelField(cap, {
10436
+ featureIndex,
10437
+ path,
10438
+ source
10439
+ }, target.mode, lookupCap));
10440
+ const items = feature.items === void 0 ? [] : [planItems(cap.def, feature, featureIndex, lookupCap, target.mode)];
10441
+ const all = [...perField, ...items];
10442
+ const fields = all.flatMap((result) => result.fields);
10443
+ const featurePlan = {
10444
+ featureIndex,
10445
+ cap: cap.def.name,
10446
+ mode: target.mode
10447
+ };
10448
+ const eventPlan = planCompositionEvents(cap.def, featurePlan, fields);
10449
+ return {
10450
+ problems: [
10451
+ ...capProblems,
10452
+ ...all.flatMap((r) => r.problems),
10453
+ ...eventPlan.problems
10454
+ ],
10455
+ fields,
10456
+ features: [featurePlan],
10457
+ events: eventPlan.events
10458
+ };
10459
+ }
10460
+ /** A cap the device serves itself; one the composer grafted (an earlier ADD) is not native. */
10461
+ function isNativeCap(target, cap) {
10462
+ const owner = target.nativeCaps.get(cap);
10463
+ return owner !== void 0 && owner !== "composer";
10464
+ }
10465
+ /** The target read, or the refusal that replaces the whole plan when it could not be (D391). */
10466
+ function planTargetOf(composition, target) {
10467
+ if (composition.target.kind === "new") return {
10468
+ kind: "new",
10469
+ type: composition.target.type
10470
+ };
10471
+ const key = compositionSourceKey(composition.target.device);
10472
+ if (target === void 0) return problem("target-unreadable", "target", `target device \`${key}\` was not read — the save is refused rather than stored unchecked`);
10473
+ if (target.kind === "absent") return problem("target-missing", "target", `target device \`${key}\` does not exist`);
10474
+ if (target.kind === "unreadable") return problem("target-unreadable", "target", `could not read target device \`${key}\` (${target.error}) — the save is refused rather than stored unchecked`);
10475
+ return {
10476
+ kind: "existing",
10477
+ found: target
10478
+ };
10479
+ }
10480
+ function featureTargetOf(target, cap) {
10481
+ if (target.kind === "new") return {
10482
+ mode: "new",
10483
+ deviceType: target.type
10484
+ };
10485
+ return {
10486
+ mode: isNativeCap(target.found, cap) ? "replace" : "add",
10487
+ deviceType: target.found.type
10488
+ };
10489
+ }
10490
+ /**
10491
+ * The static plan. `target` describes an EXISTING target device (one read);
10492
+ * it is ignored for a new one. On an existing target each feature REPLACES a
10493
+ * cap the device has natively, else ADDS it (D663).
10494
+ */
10495
+ function planComposition(composition, lookupCap, target) {
10496
+ const planTarget = planTargetOf(composition, target);
10497
+ if ("code" in planTarget) return refused(planTarget);
10498
+ const results = composition.features.map((feature, index) => {
10499
+ const result = feature.kind === "passthrough" ? refused(problem("reserved-variant", `features[${index}]`, `whole-capability passthrough of \`${feature.cap}\` arrives in slice 3`)) : planFeature(feature, index, featureTargetOf(planTarget, feature.cap), lookupCap);
10500
+ return compositionFeatureEnabled(feature) ? result : {
10501
+ problems: result.problems,
10502
+ fields: [],
10503
+ features: [],
10504
+ events: []
10505
+ };
10506
+ });
10507
+ return {
10508
+ problems: results.flatMap((r) => r.problems),
10509
+ fields: results.flatMap((r) => r.fields),
10510
+ features: results.flatMap((r) => r.features),
10511
+ events: results.flatMap((r) => r.events)
10512
+ };
10513
+ }
10514
+ function compositionSourceRefs(composition) {
10515
+ const refs = composition.features.flatMap((f) => compositionFeatureEnabled(f) && f.kind === "fields" ? featureSources(f).flatMap(fieldReads).map((r) => r.source) : []);
10516
+ return [...new Map(refs.map((r) => [compositionSourceKey(r), r])).values()];
10517
+ }
10518
+ /**
10519
+ * The candidate's device: the existing target itself, else `self`, else a
10520
+ * placeholder that cannot collide with a stored target. An existing target is
10521
+ * known even on create, so a second customization of it is refused on create too.
10522
+ */
10523
+ function candidateSelf(composition, ctx, plan) {
10524
+ return {
10525
+ ref: composition.target.kind === "existing" ? composition.target.device : ctx.self ?? PENDING_SELF,
10526
+ native: composition.target.kind === "existing" && ctx.target?.kind === "found" ? ctx.target : null,
10527
+ replaced: replacedFieldKeys(plan)
10528
+ };
10529
+ }
10530
+ /**
10531
+ * `compositionFieldKey` of every field a REPLACE feature of `plan` owns — the
10532
+ * candidate's own, and a stored peer's `CompositionPeer.replaced` (D663): one
10533
+ * derivation, so the graph reads both the same way.
10534
+ */
10535
+ function replacedFieldKeys(plan) {
10536
+ const replacing = new Set(plan.features.filter((f) => f.mode === "replace").map((f) => f.featureIndex));
10537
+ return new Set(plan.fields.filter((f) => replacing.has(f.featureIndex)).map(compositionFieldKey));
10538
+ }
10539
+ /**
10540
+ * A read of the candidate's own device. Its own composed output (a new device's
10541
+ * field, an ADDED field) is the slice-1 own-field rule; on an existing target
10542
+ * every other field — replaced, or not composed at all — is the NATIVE value,
10543
+ * valid when the device serves that cap natively (D663, rule 5).
10544
+ */
10545
+ function selfReadProblems(read, at, fields, self) {
10546
+ const readKey = `${read.cap}.${read.fieldPath}`;
10547
+ if (fields.some((f) => compositionFieldKey(f) === readKey && !self.replaced.has(readKey))) return [];
10548
+ if (self.native === null) return [problem("source-field-unknown", at, `this device has no composed field \`${read.cap}.${read.fieldPath}\``)];
10549
+ if (isNativeCap(self.native, read.cap)) return [];
10550
+ return [problem("source-capability-missing", at, `the target device (device ${self.native.deviceId}) has no native \`${read.cap}\``)];
10551
+ }
10552
+ function sourceProblems(fields, ctx, self) {
10553
+ const selfKey = compositionSourceKey(self.ref);
10554
+ return fields.flatMap((field) => field.reads.flatMap((read) => {
10555
+ const at = compositionFieldAt(field);
10556
+ const key = compositionSourceKey(read.source);
10557
+ if (key === selfKey) return selfReadProblems(read, at, fields, self);
10558
+ const desc = ctx.sources.get(key);
10559
+ if (desc === void 0 || desc.kind === "unreadable") return [problem("source-unreadable", at, `could not read source \`${key}\` (${desc === void 0 ? "it was not read" : desc.error}) — the save is refused rather than stored unchecked`)];
10560
+ if (desc.kind === "absent") return [problem("source-missing", at, `source \`${key}\` does not exist`)];
10561
+ if (!desc.caps.has(read.cap)) return [problem("source-capability-missing", at, `source \`${key}\` (device ${desc.deviceId}) has no \`${read.cap}\``)];
10562
+ return [];
10563
+ }));
10564
+ }
10565
+ /**
10566
+ * A cycle's node keys are `compositionReadKey` strings:
10567
+ * `<addonId>/<stableId>#<cap>.<fieldPath>`. When a node belongs to the
10568
+ * CANDIDATE itself (this composition being saved), pull its `cap`/`fieldPath`
10569
+ * back out so the refusal can point at that exact field, matching the
10570
+ * documented `features[N].fields.<path>` convention. A cap name has no `.`,
10571
+ * so splitting `rest` on the FIRST `.` is exact; an item leaf's remainder
10572
+ * (`items[desiccant].status`) is matched through `compositionFieldKey`.
10573
+ */
10574
+ function candidateFieldOfNode(nodeKey, candidateKey) {
10575
+ const prefix = `${candidateKey}#`;
10576
+ if (!nodeKey.startsWith(prefix)) return null;
10577
+ const rest = nodeKey.slice(prefix.length);
10578
+ const dot = rest.indexOf(".");
10579
+ if (dot === -1) return null;
10580
+ return {
10581
+ cap: rest.slice(0, dot),
10582
+ fieldPath: rest.slice(dot + 1)
10583
+ };
10584
+ }
10585
+ /** The first node of a cycle's path that is one of THIS composition's own
10586
+ * planned fields, as a documented-convention path; `'features'` when the
10587
+ * cycle runs entirely through other stored compositions. */
10588
+ function cyclePath(nodePath, candidateKey, fields) {
10589
+ for (const nodeKey of nodePath) {
10590
+ const hit = candidateFieldOfNode(nodeKey, candidateKey);
10591
+ if (hit === null) continue;
10592
+ const hitKey = `${hit.cap}.${hit.fieldPath}`;
10593
+ const field = fields.find((f) => compositionFieldKey(f) === hitKey);
10594
+ if (field !== void 0) return compositionFieldAt(field);
10595
+ }
10596
+ return "features";
10597
+ }
10598
+ /** The first unread device any of `nodes` belongs to; null when none does. */
10599
+ function unreadDeviceOf(nodes, unread) {
10600
+ for (const [key, error] of unread) if (nodes.some((node) => node.startsWith(`${key}#`))) return {
10601
+ key,
10602
+ error
10603
+ };
10604
+ return null;
10605
+ }
10606
+ /**
10607
+ * Cycle check runs against the CANDIDATE (this composition, as block
10608
+ * `ctx.blockId`, writing `self.ref`) plus every OTHER stored composition,
10609
+ * decided per strongly connected component (`findCandidateCycles`): a cyclic
10610
+ * component holding a candidate node refuses, with one representative cycle
10611
+ * through it; one without is not this save's cycle. A
10612
+ * stored composition of the same block is its old version; another block on
10613
+ * the same device, or two stored peers sharing a device, make
10614
+ * `compositionEdges` throw `CompositionGraphError` — refused BY NAME as
10615
+ * `duplicate-target` (D391, D663) instead of escaping as an uncaught throw.
10616
+ */
10617
+ function cycleProblems(composition, ctx, fields, self) {
10618
+ const candidate = {
10619
+ blockId: ctx.blockId ?? "(unsaved)",
10620
+ target: self.ref,
10621
+ composition,
10622
+ replaced: self.replaced
10623
+ };
10624
+ const candidateKey = compositionSourceKey(candidate.target);
10625
+ const unread = ctx.unreadTargets ?? /* @__PURE__ */ new Map();
10626
+ try {
10627
+ return findCandidateCycles(candidate, ctx.peers).map((c) => {
10628
+ const at = cyclePath(c.path, candidateKey, fields);
10629
+ const through = unreadDeviceOf([...c.component], unread);
10630
+ return through === null ? problem("cycle", at, `a field reads itself: ${c.path.join(" → ")}`) : problem("cycle", at, `possible cycle through \`${through.key}\` — its state could not be read (${through.error}): ${c.path.join(" → ")}`);
10631
+ });
10632
+ } catch (err) {
10633
+ if (err instanceof CompositionGraphError) return [problem("duplicate-target", "features", err.message)];
10634
+ throw err;
10635
+ }
10636
+ }
10637
+ function validateComposition(composition, ctx) {
10638
+ const plan = planComposition(composition, ctx.lookupCap, ctx.target ?? void 0);
10639
+ const self = candidateSelf(composition, ctx, plan);
10640
+ const cycles = cycleProblems(composition, ctx, plan.fields, self);
10641
+ const problems = [
10642
+ ...plan.problems,
10643
+ ...sourceProblems(plan.fields, ctx, self),
10644
+ ...cycles
10645
+ ];
10646
+ return {
10647
+ ok: problems.length === 0,
10648
+ problems,
10649
+ fields: [...plan.fields],
10650
+ features: [...plan.features],
10651
+ events: [...plan.events]
10652
+ };
10653
+ }
10654
+ //#endregion
10655
+ //#region src/composition/composable-caps.ts
10656
+ /**
10657
+ * What a composition may BUILD on a device type (G2, D676): the caps a new
10658
+ * device of that type, or an existing one that lacks them, can be given. The
10659
+ * blockers are the validator's own refusal codes, and a spec compares this
10660
+ * listing with `planComposition` for every capability — the editor can never
10661
+ * offer a feature the save would refuse for the same reason.
10662
+ */
10663
+ var ComposableFieldSchema = z.object({
10664
+ path: z.string(),
10665
+ kind: CompositionFieldKindSchema,
10666
+ nullable: z.boolean(),
10667
+ required: z.boolean(),
10668
+ enumValues: z.array(z.string()).optional()
10669
+ });
10670
+ var ComposableCapabilitySchema = z.object({
10671
+ cap: z.string(),
10672
+ fields: z.array(ComposableFieldSchema),
10673
+ /** Present for an item-array cap (`consumables.items`). */
10674
+ itemArray: z.object({
10675
+ path: z.string(),
10676
+ keyField: z.string()
10677
+ }).optional()
10678
+ });
10679
+ var ComposableCapabilitiesSchema = z.object({ caps: z.array(ComposableCapabilitySchema) });
10680
+ /** Why a cap cannot be BUILT (new device, or added to an existing one) on `deviceType`; [] = it can. */
10681
+ function builtCapabilityBlockers(def, deviceType) {
10682
+ if (BASE_DEVICE_CAPS.has(def.name)) return ["not-composable"];
10683
+ const state = def.runtimeState;
10684
+ if (def.scope !== "device" || state === void 0) return ["not-composable"];
10685
+ const blockers = [];
10686
+ if (def.deviceTypes !== void 0 && !def.deviceTypes.includes(deviceType)) blockers.push("wrong-device-type");
10687
+ if (Object.entries(def.methods).filter(([name, m]) => m.systemOnly !== true && def.composedMethods?.[name] === void 0).length > 0) blockers.push("has-commands");
10688
+ const fields = describeTopLevelStateFields(state);
10689
+ const itemArrayPath = def.status?.itemArray?.path ?? null;
10690
+ if (requiredTopLevelKeys(state).some((key) => key !== itemArrayPath && !fields.has(key))) blockers.push("not-composable");
10691
+ if (planCompositionEvents(def, {
10692
+ featureIndex: 0,
10693
+ cap: def.name,
10694
+ mode: "new"
10695
+ }, []).problems.some((p) => p.code === "not-composable") && !blockers.includes("not-composable")) blockers.push("not-composable");
10696
+ return blockers;
10697
+ }
10698
+ /** Every cap with no blocker, sorted by name. */
10699
+ function describeComposableCaps(defs, deviceType) {
10700
+ return defs.filter((def) => builtCapabilityBlockers(def, deviceType).length === 0).map((def) => {
10701
+ const state = def.runtimeState;
10702
+ const fields = state === void 0 ? [] : [...describeTopLevelStateFields(state).values()];
10703
+ const itemArray = def.status?.itemArray;
10704
+ return {
10705
+ cap: def.name,
10706
+ fields: fields.map((f) => ({
10707
+ path: f.path,
10708
+ kind: f.kind,
10709
+ nullable: f.nullable,
10710
+ required: f.required,
10711
+ ...f.enumValues === void 0 ? {} : { enumValues: [...f.enumValues] }
10712
+ })),
10713
+ ...itemArray === void 0 ? {} : { itemArray: {
10714
+ path: itemArray.path,
10715
+ keyField: itemArray.keyField
10716
+ } }
10717
+ };
10718
+ }).toSorted((a, b) => a.cap.localeCompare(b.cap));
10719
+ }
10720
+ //#endregion
9792
10721
  //#region src/capabilities/core-blocks.cap.ts
9793
10722
  /**
9794
10723
  * core-blocks — user-authored TypeScript, stored in the kernel and executed in
@@ -10086,6 +11015,14 @@ var coreBlocksCapability = {
10086
11015
  stableId: z.string().min(1)
10087
11016
  }), CompositionCustomizationReadSchema, { auth: "admin" }),
10088
11017
  /**
11018
+ * The capabilities a composition may BUILD on a device of `deviceType`
11019
+ * (a new device, or added to an existing one), with their fields — the
11020
+ * editor's feature list and the presets' availability (G2, D676). Built
11021
+ * from the validator's own blockers; a replace of a BOUND cap is not
11022
+ * listed here (the device's bindings say what it has).
11023
+ */
11024
+ listComposableCaps: method(z.object({ deviceType: z.enum(DeviceType) }), ComposableCapabilitiesSchema, { auth: "admin" }),
11025
+ /**
10089
11026
  * Validate without saving — the same verdict the save reaches. A mutation
10090
11027
  * for its body size; it writes nothing, so its access is `view`.
10091
11028
  */
@@ -26309,6 +27246,16 @@ var NodeInferenceDevicesSchema = z.object({
26309
27246
  * Strictly the control plane: never sees a frame, never calls inference,
26310
27247
  * never drains queues. The runner does that work locally on each agent.
26311
27248
  */
27249
+ /**
27250
+ * The input of `setCameraSensors` (G5, D676): the ONE typed write path of a
27251
+ * camera's attached sensors (D672). `config: null` removes the attachment —
27252
+ * the camera reads `not-configured` again, never `unreadable`.
27253
+ */
27254
+ var SetCameraSensorsInputSchema = z.object({
27255
+ deviceId: z.number().int().nonnegative(),
27256
+ /** `null` removes the attachment: the camera goes back to `not-configured`. */
27257
+ config: CameraSensorsConfigSchema.nullable()
27258
+ });
26312
27259
  var pipelineOrchestratorCapability = {
26313
27260
  name: "pipeline-orchestrator",
26314
27261
  scope: "system",
@@ -26774,6 +27721,18 @@ var pipelineOrchestratorCapability = {
26774
27721
  */
26775
27722
  getCameraStatuses: method(z.object({ deviceIds: z.array(z.number()).optional() }), z.array(CameraStatusSchema).readonly()),
26776
27723
  /**
27724
+ * Attach sensors to a camera, or detach them with `config: null` (D672
27725
+ * configuration, G5/D676). Written to the orchestrator's per-device store
27726
+ * under the same key `applyDeviceSettingsPatch` writes, and announced as a
27727
+ * settings change so the camera-sensors bridge refreshes. Refused by name
27728
+ * — nothing written — for a device that cannot be read, does not exist,
27729
+ * is not a camera, or names itself as its own sensor.
27730
+ */
27731
+ setCameraSensors: method(SetCameraSensorsInputSchema, z.object({ success: z.literal(true) }), {
27732
+ kind: "mutation",
27733
+ auth: "admin"
27734
+ }),
27735
+ /**
26777
27736
  * Disk-wins fleet reconcile after a recordings wipe. Starts the walk in
26778
27737
  * the addon process and returns immediately with the job snapshot — the
26779
27738
  * work outlives the tRPC/UDS 60s timeout. Poll `getReconcileFromDiskStatus`.
@@ -44679,569 +45638,366 @@ function createDeviceExtensionProvider(options) {
44679
45638
  };
44680
45639
  }
44681
45640
  //#endregion
44682
- //#region src/composition/composition-graph.ts
44683
- /**
44684
- * The field graph across every composition, and the cycles in it (D659).
44685
- *
44686
- * A node is ONE field of ONE device (`<addon>/<stableId>#<cap>.<field>`); an
44687
- * edge points from a composed field to each field it reads. A cycle, direct or
44688
- * through another composition, is refused at save by name (spec §2).
44689
- *
44690
- * The graph is built for ONE save: the CANDIDATE composition (the one being
44691
- * validated) plus every STORED composition. The candidate replaces its own old
44692
- * version, identified BY BLOCK ID wherever it sits in `stored` — whether a save
44693
- * introduces or removes a cycle must never depend on array order. A DIFFERENT
44694
- * block targeting the candidate's device is refused by name: one composition
44695
- * per device (D663). Two different stored peers that (wrongly) target the same
44696
- * device are corrupted state, not a cycle to resolve by picking one silently;
44697
- * that is refused by name too (D391).
44698
- *
44699
- * A customization of an EXISTING device reads that device's NATIVE value for a
44700
- * field it replaces or does not write ("Invert state" reads the `on` it
44701
- * replaces): such a self-read is no edge, so it is never a cycle (D663).
44702
- * Another composition reading that field reads the customizer's output.
44703
- *
44704
- * `findCompositionCycles` reports at least one cycle per cycle-SET (the DFS
44705
- * marks a node `done` after its first expansion) — not every elementary cycle
44706
- * through a shared node, so the path it names may AVOID the candidate while
44707
- * one through it goes unreported. What a save refuses is therefore decided per
44708
- * strongly connected component (`findCandidateCycles`, C-1). A dotted
44709
- * `fieldPath` is matched only as an exact string: a write to `state.value` and
44710
- * a read of `state` would not connect (no nested field writes exist yet).
44711
- *
44712
- * An item leaf is its own node, `…#consumables.items[desiccant].status`
44713
- * (`featureFieldEntries`), so two items sharing an inner path never merge. No
44714
- * READ can name an array element (`describeStateField` never describes one),
44715
- * so an item node is write-only: its edges to sources are what the check needs.
44716
- */
44717
- /** Two blocks' compositions target the same device — refused by name, never silently resolved. */
44718
- var CompositionGraphError = class extends Error {};
44719
- /** `"cap.field"` of every field a peer writes — the same spelling as `compositionFieldKey`. */
44720
- function writtenFields(peer) {
44721
- return new Set(peer.composition.features.flatMap((feature) => !compositionFeatureEnabled(feature) || feature.kind !== "fields" ? [] : featureFieldEntries(feature).map(({ fieldPath }) => `${feature.cap}.${fieldPath}`)));
44722
- }
44723
- /** A read of the peer's OWN device is an edge only when it reads the peer's own output (rule 5, D663). */
44724
- function readsComposedValue(peer, written, read) {
44725
- if (compositionSourceKey(read.source) !== compositionSourceKey(peer.target)) return true;
44726
- const field = `${read.cap}.${read.fieldPath}`;
44727
- return written.has(field) && peer.replaced?.has(field) !== true;
44728
- }
44729
- function peerEdges(peer) {
44730
- const written = writtenFields(peer);
44731
- return peer.composition.features.flatMap((feature) => !compositionFeatureEnabled(feature) || feature.kind !== "fields" ? [] : featureFieldEntries(feature).map(({ fieldPath, source }) => [compositionReadKey({
44732
- source: peer.target,
44733
- cap: feature.cap,
44734
- fieldPath
44735
- }), fieldReads(source).filter((read) => readsComposedValue(peer, written, read)).map(compositionReadKey)]));
44736
- }
44737
- /**
44738
- * Every peer that actually takes part in the graph: each stored peer minus the
44739
- * candidate's own old version (same block id — the drop happens before any
44740
- * edge is built, so its old edges never enter the map), plus the candidate
44741
- * itself, exactly once. Throws {@link CompositionGraphError} when a DIFFERENT
44742
- * block targets the candidate's device, or two stored peers share a device.
44743
- */
44744
- function resolvedPeers(candidate, stored) {
44745
- const candidateKey = compositionSourceKey(candidate.target);
44746
- const survivors = /* @__PURE__ */ new Map();
44747
- for (const peer of stored) {
44748
- if (peer.blockId === candidate.blockId) continue;
44749
- const key = compositionSourceKey(peer.target);
44750
- if (key === candidateKey) throw new CompositionGraphError(`block \`${peer.blockId}\` and block \`${candidate.blockId}\` both target device \`${key}\` — one composition per device; delete or edit the existing one`);
44751
- const clash = survivors.get(key);
44752
- if (clash !== void 0) throw new CompositionGraphError(`two stored compositions (\`${clash.blockId}\`, \`${peer.blockId}\`) both target device \`${key}\` — refusing to build the field graph`);
44753
- survivors.set(key, peer);
44754
- }
44755
- return [...survivors.values(), candidate];
44756
- }
44757
- function compositionEdges(candidate, stored) {
44758
- const edges = resolvedPeers(candidate, stored).flatMap(peerEdges);
44759
- return new Map(edges);
44760
- }
44761
- function findCompositionCycles(candidate, stored) {
44762
- const edges = compositionEdges(candidate, stored);
44763
- const marks = /* @__PURE__ */ new Map();
44764
- const found = /* @__PURE__ */ new Map();
44765
- const visit = (node, stack) => {
44766
- const mark = marks.get(node);
44767
- if (mark === "done") return;
44768
- if (mark === "visiting") {
44769
- const path = [...stack.slice(stack.indexOf(node)), node];
44770
- const id = [...new Set(path)].toSorted().join("|");
44771
- if (!found.has(id)) found.set(id, { path });
44772
- return;
44773
- }
44774
- marks.set(node, "visiting");
44775
- for (const next of edges.get(node) ?? []) visit(next, [...stack, node]);
44776
- marks.set(node, "done");
44777
- };
44778
- for (const node of edges.keys()) visit(node, []);
44779
- return [...found.values()];
44780
- }
44781
- /** Tarjan's strongly connected components over every node of the graph (sources included). */
44782
- function stronglyConnected(edges) {
44783
- const index = /* @__PURE__ */ new Map();
44784
- const low = /* @__PURE__ */ new Map();
44785
- const onStack = /* @__PURE__ */ new Set();
44786
- const stack = [];
44787
- const components = [];
44788
- const connect = (node) => {
44789
- index.set(node, index.size);
44790
- low.set(node, index.get(node) ?? 0);
44791
- stack.push(node);
44792
- onStack.add(node);
44793
- for (const next of edges.get(node) ?? []) if (!index.has(next)) {
44794
- connect(next);
44795
- low.set(node, Math.min(low.get(node) ?? 0, low.get(next) ?? 0));
44796
- } else if (onStack.has(next)) low.set(node, Math.min(low.get(node) ?? 0, index.get(next) ?? 0));
44797
- if (low.get(node) !== index.get(node)) return;
44798
- const component = [];
44799
- for (let member = stack.pop(); member !== void 0; member = stack.pop()) {
44800
- onStack.delete(member);
44801
- component.push(member);
44802
- if (member === node) break;
44803
- }
44804
- components.push(component);
44805
- };
44806
- for (const node of edges.keys()) if (!index.has(node)) connect(node);
44807
- return components;
44808
- }
44809
- /** The shortest walk from `start` back to itself inside `component` (one exists: the component has a cycle). */
44810
- function cycleThrough(start, component, edges) {
44811
- const parent = /* @__PURE__ */ new Map();
44812
- const queue = [start];
44813
- for (let head = 0; head < queue.length; head += 1) {
44814
- const node = queue[head];
44815
- if (node === void 0) break;
44816
- for (const next of edges.get(node) ?? []) {
44817
- if (next === start) {
44818
- const chain = [];
44819
- for (let at = node; at !== void 0 && at !== start; at = parent.get(at)) chain.push(at);
44820
- return [
44821
- start,
44822
- ...chain.reverse(),
44823
- start
44824
- ];
44825
- }
44826
- if (!component.has(next) || parent.has(next)) continue;
44827
- parent.set(next, node);
44828
- queue.push(next);
44829
- }
44830
- }
44831
- return [start, start];
44832
- }
45641
+ //#region src/units/unit-table.ts
44833
45642
  /**
44834
- * The cycles THIS save closes, decided per strongly connected component — never
44835
- * per reported DFS path, which names one back-edge per revisit and can report a
44836
- * component's cycle by a path that avoids the candidate while the one through it
44837
- * goes unreported. A component refuses when it holds a candidate node and a
44838
- * cycle (more than one node, or a self-loop). Components without a candidate
44839
- * node are not this save's cycles.
45643
+ * Frozen unit → spec table. `•` in the doc marks each dimension's canonical
45644
+ * unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
45645
+ * `factor = 5/9`, `offset = -160/9` (kept as exact expressions, not rounded
45646
+ * decimals). K derives from `°C = K − 273.15`.
44840
45647
  */
44841
- function findCandidateCycles(candidate, stored) {
44842
- const edges = compositionEdges(candidate, stored);
44843
- const prefix = `${compositionSourceKey(candidate.target)}#`;
44844
- return stronglyConnected(edges).flatMap((members) => {
44845
- const start = members.find((n) => n.startsWith(prefix));
44846
- if (start === void 0) return [];
44847
- const component = new Set(members);
44848
- const selfLoop = members.length === 1 && (edges.get(start) ?? []).includes(start);
44849
- if (members.length === 1 && !selfLoop) return [];
44850
- return [{
44851
- path: cycleThrough(start, component, edges),
44852
- component
44853
- }];
44854
- });
44855
- }
44856
- //#endregion
44857
- //#region src/composition/plan-result.ts
44858
- function problem(code, path, message) {
44859
- return {
44860
- code,
44861
- path,
44862
- message
44863
- };
44864
- }
44865
- function refused(...problems) {
44866
- return {
44867
- problems,
44868
- fields: [],
44869
- features: [],
44870
- events: []
44871
- };
44872
- }
44873
- /** Where a planned field sits in the composition: `features[N].fields.<path>` or `features[N].items.<key>.fields.<path>`. */
44874
- function compositionFieldAt(field) {
44875
- const inner = field.item === void 0 ? "fields" : `items.${field.item.key}.fields`;
44876
- return `features[${field.featureIndex}].${inner}.${field.path}`;
44877
- }
44878
- //#endregion
44879
- //#region src/composition/expression-kinds.ts
44880
- var NUMBER = {
44881
- kind: "fixed",
44882
- result: ["number"]
44883
- };
44884
- var BOOLEAN = {
44885
- kind: "fixed",
44886
- result: ["boolean"]
44887
- };
44888
- /** One rule per builtin. `expression-kinds.spec.ts` fails for a builtin missing here. */
44889
- var BUILTIN_RESULT_KINDS = Object.freeze({
44890
- min: NUMBER,
44891
- max: NUMBER,
44892
- abs: NUMBER,
44893
- floor: NUMBER,
44894
- ceil: NUMBER,
44895
- sqrt: NUMBER,
44896
- round: NUMBER,
44897
- pow: NUMBER,
44898
- clamp: NUMBER,
44899
- avg: NUMBER,
44900
- sum: NUMBER,
44901
- age: NUMBER,
44902
- convert: NUMBER,
44903
- coalesce: { kind: "coalesce" },
44904
- any: BOOLEAN,
44905
- all: BOOLEAN,
44906
- within: BOOLEAN,
44907
- latest: {
44908
- kind: "fixed",
44909
- result: ["number", "null"]
45648
+ var UNIT_TABLE = {
45649
+ "°C": {
45650
+ dimension: "temperature",
45651
+ factor: 1,
45652
+ offset: 0
45653
+ },
45654
+ "°F": {
45655
+ dimension: "temperature",
45656
+ factor: 5 / 9,
45657
+ offset: -160 / 9
45658
+ },
45659
+ K: {
45660
+ dimension: "temperature",
45661
+ factor: 1,
45662
+ offset: -273.15
45663
+ },
45664
+ hPa: {
45665
+ dimension: "pressure",
45666
+ factor: 1,
45667
+ offset: 0
45668
+ },
45669
+ kPa: {
45670
+ dimension: "pressure",
45671
+ factor: 10,
45672
+ offset: 0
45673
+ },
45674
+ Pa: {
45675
+ dimension: "pressure",
45676
+ factor: .01,
45677
+ offset: 0
45678
+ },
45679
+ mbar: {
45680
+ dimension: "pressure",
45681
+ factor: 1,
45682
+ offset: 0
45683
+ },
45684
+ bar: {
45685
+ dimension: "pressure",
45686
+ factor: 1e3,
45687
+ offset: 0
45688
+ },
45689
+ inHg: {
45690
+ dimension: "pressure",
45691
+ factor: 33.8639,
45692
+ offset: 0
45693
+ },
45694
+ mmHg: {
45695
+ dimension: "pressure",
45696
+ factor: 1.33322,
45697
+ offset: 0
45698
+ },
45699
+ psi: {
45700
+ dimension: "pressure",
45701
+ factor: 68.9476,
45702
+ offset: 0
45703
+ },
45704
+ "m/s": {
45705
+ dimension: "speed",
45706
+ factor: 1,
45707
+ offset: 0
45708
+ },
45709
+ "km/h": {
45710
+ dimension: "speed",
45711
+ factor: 1 / 3.6,
45712
+ offset: 0
45713
+ },
45714
+ mph: {
45715
+ dimension: "speed",
45716
+ factor: .44704,
45717
+ offset: 0
45718
+ },
45719
+ kn: {
45720
+ dimension: "speed",
45721
+ factor: .514444,
45722
+ offset: 0
45723
+ },
45724
+ "mm/h": {
45725
+ dimension: "precipitation-rate",
45726
+ factor: 1,
45727
+ offset: 0
45728
+ },
45729
+ "in/h": {
45730
+ dimension: "precipitation-rate",
45731
+ factor: 25.4,
45732
+ offset: 0
45733
+ },
45734
+ m: {
45735
+ dimension: "length",
45736
+ factor: 1,
45737
+ offset: 0
45738
+ },
45739
+ mm: {
45740
+ dimension: "length",
45741
+ factor: .001,
45742
+ offset: 0
45743
+ },
45744
+ cm: {
45745
+ dimension: "length",
45746
+ factor: .01,
45747
+ offset: 0
45748
+ },
45749
+ km: {
45750
+ dimension: "length",
45751
+ factor: 1e3,
45752
+ offset: 0
44910
45753
  },
44911
- number: {
44912
- kind: "fixed",
44913
- result: ["number", "null"]
45754
+ in: {
45755
+ dimension: "length",
45756
+ factor: .0254,
45757
+ offset: 0
44914
45758
  },
44915
- rose: {
44916
- kind: "fixed",
44917
- result: ["number", "null"]
45759
+ ft: {
45760
+ dimension: "length",
45761
+ factor: .3048,
45762
+ offset: 0
44918
45763
  },
44919
- count: NUMBER
44920
- });
44921
- var KindInferenceError = class extends Error {};
44922
- function kindOfValue(value) {
44923
- if (value === null) return "null";
44924
- if (typeof value === "number") return "number";
44925
- if (typeof value === "string") return "string";
44926
- return "boolean";
44927
- }
44928
- function only(kind) {
44929
- return new Set([kind]);
44930
- }
44931
- function union(...sets) {
44932
- return new Set(sets.flatMap((s) => [...s]));
44933
- }
44934
- function withoutNull(set) {
44935
- return new Set([...set].filter((k) => k !== "null"));
44936
- }
44937
- function binaryKinds(op, left, right) {
44938
- if (op === "+") {
44939
- const all = [...left, ...right];
44940
- if (all.every((k) => k === "string")) return only("string");
44941
- if (all.every((k) => k === "number")) return only("number");
44942
- return new Set(["number", "string"]);
45764
+ mi: {
45765
+ dimension: "length",
45766
+ factor: 1609.344,
45767
+ offset: 0
45768
+ },
45769
+ lx: {
45770
+ dimension: "illuminance",
45771
+ factor: 1,
45772
+ offset: 0
45773
+ },
45774
+ "W/m²": {
45775
+ dimension: "irradiance",
45776
+ factor: 1,
45777
+ offset: 0
45778
+ },
45779
+ W: {
45780
+ dimension: "power",
45781
+ factor: 1,
45782
+ offset: 0
45783
+ },
45784
+ kW: {
45785
+ dimension: "power",
45786
+ factor: 1e3,
45787
+ offset: 0
45788
+ },
45789
+ VA: {
45790
+ dimension: "apparent-power",
45791
+ factor: 1,
45792
+ offset: 0
45793
+ },
45794
+ Wh: {
45795
+ dimension: "energy",
45796
+ factor: 1,
45797
+ offset: 0
45798
+ },
45799
+ kWh: {
45800
+ dimension: "energy",
45801
+ factor: 1e3,
45802
+ offset: 0
45803
+ },
45804
+ MWh: {
45805
+ dimension: "energy",
45806
+ factor: 1e6,
45807
+ offset: 0
45808
+ },
45809
+ V: {
45810
+ dimension: "voltage",
45811
+ factor: 1,
45812
+ offset: 0
45813
+ },
45814
+ mV: {
45815
+ dimension: "voltage",
45816
+ factor: .001,
45817
+ offset: 0
45818
+ },
45819
+ A: {
45820
+ dimension: "current",
45821
+ factor: 1,
45822
+ offset: 0
45823
+ },
45824
+ mA: {
45825
+ dimension: "current",
45826
+ factor: .001,
45827
+ offset: 0
45828
+ },
45829
+ ppm: {
45830
+ dimension: "concentration-volume",
45831
+ factor: 1,
45832
+ offset: 0
45833
+ },
45834
+ ppb: {
45835
+ dimension: "concentration-volume",
45836
+ factor: .001,
45837
+ offset: 0
45838
+ },
45839
+ "µg/m³": {
45840
+ dimension: "concentration-mass",
45841
+ factor: 1,
45842
+ offset: 0
45843
+ },
45844
+ "mg/m³": {
45845
+ dimension: "concentration-mass",
45846
+ factor: 1e3,
45847
+ offset: 0
45848
+ },
45849
+ kg: {
45850
+ dimension: "mass",
45851
+ factor: 1,
45852
+ offset: 0
45853
+ },
45854
+ g: {
45855
+ dimension: "mass",
45856
+ factor: .001,
45857
+ offset: 0
45858
+ },
45859
+ lb: {
45860
+ dimension: "mass",
45861
+ factor: .453592,
45862
+ offset: 0
45863
+ },
45864
+ oz: {
45865
+ dimension: "mass",
45866
+ factor: .0283495,
45867
+ offset: 0
45868
+ },
45869
+ "%": {
45870
+ dimension: "percentage",
45871
+ factor: 1,
45872
+ offset: 0
44943
45873
  }
44944
- if (op === "-" || op === "*" || op === "/" || op === "%") return only("number");
44945
- return only("boolean");
44946
- }
44947
- /** "exactly N" / "at least N" / "N–M", for an arity refusal that says what IS allowed. */
44948
- function arityRange(builtin) {
44949
- if (builtin.minArgs === builtin.maxArgs) return `exactly ${builtin.minArgs}`;
44950
- if (builtin.maxArgs === Number.POSITIVE_INFINITY) return `at least ${builtin.minArgs}`;
44951
- return `${builtin.minArgs}–${builtin.maxArgs}`;
44952
- }
44953
- function callKinds(callee, args) {
44954
- const builtin = EXPRESSION_BUILTINS[callee];
44955
- if (builtin !== void 0 && (args.length < builtin.minArgs || args.length > builtin.maxArgs)) throw new KindInferenceError(`${callee}: wrong number of arguments (${args.length}); expected ${arityRange(builtin)}`);
44956
- const rule = BUILTIN_RESULT_KINDS[callee];
44957
- if (rule === void 0) throw new KindInferenceError(`no result-kind rule for builtin '${callee}'`);
44958
- if (rule.kind === "fixed") return new Set(rule.result);
44959
- const nonNull = union(...args.map(withoutNull));
44960
- return args.every((a) => a.has("null")) ? union(nonNull, only("null")) : nonNull;
44961
- }
44962
- function kindsOf(node, bindings) {
44963
- switch (node.kind) {
44964
- case "literal": return only(kindOfValue(node.value));
44965
- case "identifier": {
44966
- if (node.name === "now") return only("number");
44967
- const bound = bindings.get(node.name);
44968
- if (bound === void 0) throw new KindInferenceError(`unbound identifier '${node.name}'`);
44969
- return bound;
44970
- }
44971
- case "unary": return only(node.op === "!" ? "boolean" : "number");
44972
- case "binary": return binaryKinds(node.op, kindsOf(node.left, bindings), kindsOf(node.right, bindings));
44973
- case "logical": return union(kindsOf(node.left, bindings), kindsOf(node.right, bindings));
44974
- case "conditional": return union(kindsOf(node.consequent, bindings), kindsOf(node.alternate, bindings));
44975
- case "call": return callKinds(node.callee, node.args.map((a) => kindsOf(a, bindings)));
45874
+ };
45875
+ //#endregion
45876
+ //#region src/units/convert.ts
45877
+ /**
45878
+ * Pure unit-conversion API over `UNIT_TABLE`. No dependencies, no side effects.
45879
+ *
45880
+ * Conversion is refused (throws `UnitConversionError`, or returns `undefined`
45881
+ * from the `try*` variant) whenever a unit is unknown or the two units belong
45882
+ * to different dimensions — cross-dimension conversion is deliberately
45883
+ * impossible so a render override can never make the value and its unit label
45884
+ * disagree.
45885
+ *
45886
+ * Callers pass units through `normalizeUnit` (`../device/source-info.ts`) BEFORE
45887
+ * calling here — the table keys only canonical spellings.
45888
+ */
45889
+ /** Thrown by `convertUnit` when a conversion is refused. Carries the offending
45890
+ * units + a machine-readable `reason` for callers that branch on the cause. */
45891
+ var UnitConversionError = class extends Error {
45892
+ from;
45893
+ to;
45894
+ reason;
45895
+ constructor(from, to, reason) {
45896
+ super(`[units] cannot convert '${from}' → '${to}': ${reason}`);
45897
+ this.name = "UnitConversionError";
45898
+ this.from = from;
45899
+ this.to = to;
45900
+ this.reason = reason;
44976
45901
  }
45902
+ };
45903
+ /** Resolve a unit's `UnitSpec`, or `undefined` when the spelling is unknown. */
45904
+ function specFor(unit) {
45905
+ return Object.hasOwn(UNIT_TABLE, unit) ? UNIT_TABLE[unit] : void 0;
44977
45906
  }
44978
- function nodeContainsCall(node, callee) {
44979
- switch (node.kind) {
44980
- case "literal":
44981
- case "identifier": return false;
44982
- case "unary": return nodeContainsCall(node.operand, callee);
44983
- case "binary":
44984
- case "logical": return nodeContainsCall(node.left, callee) || nodeContainsCall(node.right, callee);
44985
- case "conditional": return nodeContainsCall(node.test, callee) || nodeContainsCall(node.consequent, callee) || nodeContainsCall(node.alternate, callee);
44986
- case "call": return node.callee === callee || node.args.some((arg) => nodeContainsCall(arg, callee));
44987
- }
45907
+ /** The dimension a unit belongs to, or `undefined` for an unknown unit. */
45908
+ function unitDimension(unit) {
45909
+ return specFor(unit)?.dimension;
44988
45910
  }
44989
- function expressionContainsBuiltinCall(expr, callee) {
44990
- const compiled = compileExpressionSafe(expr);
44991
- return compiled.ok && nodeContainsCall(compiled.parsed.ast, callee);
45911
+ /** Value in `spec`'s unit → its dimension's canonical unit. */
45912
+ function toCanonical(value, spec) {
45913
+ return value * spec.factor + spec.offset;
44992
45914
  }
44993
- function inferExpressionKinds(input) {
44994
- const compiled = compileExpressionSafe(input.expr);
44995
- if (!compiled.ok) return {
44996
- ok: false,
44997
- error: compiled.error
44998
- };
44999
- try {
45000
- return {
45001
- ok: true,
45002
- kinds: kindsOf(compiled.parsed.ast, input.bindingKinds)
45003
- };
45004
- } catch (err) {
45005
- if (err instanceof KindInferenceError) return {
45006
- ok: false,
45007
- error: err.message
45008
- };
45009
- throw err;
45010
- }
45915
+ /** Canonical-unit value → the unit described by `spec`. */
45916
+ function fromCanonical(canonical, spec) {
45917
+ return (canonical - spec.offset) / spec.factor;
45011
45918
  }
45012
- //#endregion
45013
- //#region src/composition/field-kinds.ts
45014
45919
  /**
45015
- * The kind half of planning a composition field (D659): which kinds a source
45016
- * can produce, whether they fit a target field, and the field's role.
45017
- * Shared by the top-level planner (`validate-composition.ts`) and the item
45018
- * planner (`composition-items.ts`). Internal to the composition module — NOT
45019
- * in the barrel: these are planner internals, not a published contract.
45920
+ * Convert `value` from unit `from` to unit `to`. Identity when `from === to`.
45921
+ * Throws `UnitConversionError` when either unit is unknown or the units belong
45922
+ * to different dimensions.
45020
45923
  */
45021
- function readKinds(read, lookupCap) {
45022
- const def = lookupCap(read.cap);
45023
- const schema = def?.runtimeState ?? def?.status?.schema;
45024
- if (def === null || schema === void 0) return {
45025
- ok: false,
45026
- code: "source-field-unknown",
45027
- message: `no capability \`${read.cap}\` with state to read`
45028
- };
45029
- const field = describeStateField(schema, read.fieldPath);
45030
- if (field === null) return {
45031
- ok: false,
45032
- code: "source-field-unknown",
45033
- message: `\`${read.cap}\` has no field \`${read.fieldPath}\``
45034
- };
45035
- const base = field.kind === "enum" ? "string" : field.kind;
45036
- return {
45037
- ok: true,
45038
- kinds: new Set(field.nullable ? [base, "null"] : [base])
45039
- };
45040
- }
45041
- function sourceKinds(source, lookupCap) {
45042
- if (source.kind === "from") return readKinds(source, lookupCap);
45043
- if (source.kind === "code") return {
45044
- ok: false,
45045
- code: "reserved-variant",
45046
- message: "code fields arrive in slice 4"
45047
- };
45048
- const bindingKinds = /* @__PURE__ */ new Map();
45049
- for (const [name, binding] of Object.entries(source.bindings)) {
45050
- if (binding.kind === "literal") {
45051
- bindingKinds.set(name, new Set([kindOfValue(binding.value)]));
45052
- continue;
45053
- }
45054
- const kinds = readKinds(binding, lookupCap);
45055
- if (!kinds.ok) return {
45056
- ...kinds,
45057
- message: `binding \`${name}\`: ${kinds.message}`
45058
- };
45059
- bindingKinds.set(name, kinds.kinds);
45060
- }
45061
- const inferred = inferExpressionKinds({
45062
- expr: source.expr,
45063
- bindingKinds
45064
- });
45065
- return inferred.ok ? {
45066
- ok: true,
45067
- kinds: inferred.kinds
45068
- } : {
45069
- ok: false,
45070
- code: "expression-invalid",
45071
- message: inferred.error
45072
- };
45073
- }
45074
- function compatibility(cap, target, kinds, at) {
45075
- const allowed = target.kind === "enum" ? "string" : target.kind;
45076
- const offending = [...kinds].filter((k) => k !== "null" && k !== allowed);
45077
- const problems = [];
45078
- if (offending.length > 0) problems.push(problem("kind-mismatch", at, `\`${cap}.${target.path}\` is a ${target.kind}; this source can produce ${offending.join(" or ")}`));
45079
- if (kinds.has("null") && !target.nullable) problems.push(problem("may-be-null", at, `\`${cap}.${target.path}\` cannot be null and this source can produce null — wrap it in coalesce(…) or pick a non-null source`));
45080
- return problems;
45924
+ function convertUnit(value, from, to) {
45925
+ if (from === to) return value;
45926
+ const fromSpec = specFor(from);
45927
+ if (!fromSpec) throw new UnitConversionError(from, to, "unknown-from");
45928
+ const toSpec = specFor(to);
45929
+ if (!toSpec) throw new UnitConversionError(from, to, "unknown-to");
45930
+ if (fromSpec.dimension !== toSpec.dimension) throw new UnitConversionError(from, to, "cross-dimension");
45931
+ return fromCanonical(toCanonical(value, fromSpec), toSpec);
45081
45932
  }
45082
45933
  /**
45083
- * A string a source produces WITHOUT reading any device — a field-level
45084
- * `expression` source whose compiled AST is a bare string literal (`"red"`,
45085
- * never `a` or `a + "x"`). Anything else that can only produce `'string'` at
45086
- * the kind level (a `from` read of an enum-typed source field, a computed
45087
- * expression) is NOT checked against the target's `enumValues` here: the
45088
- * kind inference already collapsed it to the coarse `'string'` kind, losing
45089
- * whichever enum it actually came from, so membership can only be judged at
45090
- * write time against the runtime-state schema. Known limitation — see the
45091
- * fix report for Task 6 round 1.
45934
+ * Graceful variant for the render path: returns the converted value, or
45935
+ * `undefined` when the conversion is refused (unknown unit / cross-dimension).
45936
+ * Never throws — a render caller falls back to the raw value + source unit.
45092
45937
  */
45093
- function literalStringValue(source) {
45094
- if (source.kind !== "expression") return null;
45095
- const compiled = compileExpressionSafe(source.expr);
45096
- if (!compiled.ok) return null;
45097
- const ast = compiled.parsed.ast;
45098
- return ast.kind === "literal" && typeof ast.value === "string" ? ast.value : null;
45938
+ function tryConvertUnit(value, from, to) {
45939
+ if (from === to) return value;
45940
+ const fromSpec = specFor(from);
45941
+ if (!fromSpec) return void 0;
45942
+ const toSpec = specFor(to);
45943
+ if (!toSpec) return void 0;
45944
+ if (fromSpec.dimension !== toSpec.dimension) return void 0;
45945
+ return fromCanonical(toCanonical(value, fromSpec), toSpec);
45099
45946
  }
45100
45947
  /**
45101
- * An enum target whose source is a save-time-KNOWN string literal outside its
45102
- * `enumValues` is refused now rather than left to fail the write later. A
45103
- * dynamic source (a `from` read, a non-literal expression) is left to
45104
- * runtime — see {@link literalStringValue}.
45948
+ * Whether `value` can be converted between `from` and `to` (same dimension,
45949
+ * both known). Cheap boolean probe for the UI's same-dimension unit picker and
45950
+ * the resolver's convertibility branch — compute ONCE so a unit label and its
45951
+ * value math can never disagree.
45105
45952
  */
45106
- function enumLiteralProblem(cap, target, source, at) {
45107
- if (target.kind !== "enum" || target.enumValues === void 0) return null;
45108
- const value = literalStringValue(source);
45109
- if (value === null || target.enumValues.includes(value)) return null;
45110
- const allowed = target.enumValues.map((v) => `\`${v}\``).join(", ");
45111
- return problem("kind-mismatch", at, `\`${cap}.${target.path}\` accepts only ${allowed}; this source is the literal \`${value}\``);
45112
- }
45113
- function roleOf(source) {
45114
- if (source.kind !== "expression") return "derived";
45115
- if (expressionContainsBuiltinCall(source.expr, "count")) return "accumulator";
45116
- if (fieldReads(source).length > 0) return "derived";
45117
- const compiled = compileExpressionSafe(source.expr);
45118
- return compiled.ok && compiled.parsed.identifiers.has("now") ? "clock" : "constant";
45953
+ function canConvertUnit(from, to) {
45954
+ if (from === to) return true;
45955
+ const fromDim = unitDimension(from);
45956
+ if (fromDim === void 0) return false;
45957
+ return fromDim === unitDimension(to);
45119
45958
  }
45120
45959
  /**
45121
- * How a planned field says "unavailable", per feature mode and AFTER `roleOf`
45122
- * (D393, D663 rulings S1 + S1b). The composer cannot take a device it does not
45123
- * own offline, and D393 forbids a stale number, so on an existing target a
45124
- * field that READS a source never gets `offline`.
45960
+ * Every known unit spelling in a dimension (table insertion order — canonical
45961
+ * unit first). Powers the UI's same-dimension unit picker.
45125
45962
  */
45126
- function unavailableFor(tf, role, mode, cap, at) {
45127
- if (mode === "replace" && (role === "derived" || role === "accumulator")) return {
45128
- ok: true,
45129
- unavailable: "release"
45130
- };
45131
- if (mode === "new" || role !== "derived") return {
45132
- ok: true,
45133
- unavailable: tf.nullable ? "null" : "offline"
45134
- };
45135
- if (tf.nullable) return {
45136
- ok: true,
45137
- unavailable: "null"
45138
- };
45139
- if (tf.enumValues?.includes("unknown") === true) return {
45140
- ok: true,
45141
- unavailable: "unknown"
45142
- };
45143
- return {
45144
- ok: false,
45145
- problem: problem("not-replaceable", at, `\`${cap}.${tf.path}\` reads a source but can say neither null nor 'unknown', and an ADDED capability has no native reading to fall back to (D393, D663)`)
45146
- };
45147
- }
45148
- //#endregion
45149
- //#region src/composition/composition-items.ts
45150
- /** Item fields the composer writes itself, with the value it writes. */
45151
- var COMPOSED_ITEM_FIXED_FIELDS = { resettable: false };
45152
- function reservedItemFields(itemArray) {
45153
- return new Set([
45154
- itemArray.keyField,
45155
- ...itemArray.labelField === void 0 ? [] : [itemArray.labelField],
45156
- ...Object.keys(COMPOSED_ITEM_FIXED_FIELDS)
45157
- ]);
45158
- }
45159
- /** A required leaf under an optional parent is required only once something writes that parent. */
45160
- function leafRequired(itemArray, path, written) {
45161
- const described = describeStateField(itemArray.itemSchema, path);
45162
- if (described === null || !described.required) return false;
45163
- return optionalAncestors(itemArray.itemSchema, path).every((parent) => written.some((w) => w.startsWith(`${parent}.`)));
45164
- }
45165
- function missingLeaves({ capName, itemArray, reserved }, item, at) {
45166
- const written = Object.keys(item.fields);
45167
- return enumerateSchemaFields(itemArray.itemSchema).flatMap((leaf) => {
45168
- if (reserved.has(leaf.path) || leaf.path in item.fields) return [];
45169
- if (!leafRequired(itemArray, leaf.path, written)) return [];
45170
- const described = describeStateField(itemArray.itemSchema, leaf.path);
45171
- if (described === null || described.nullable) return [];
45172
- return [problem("missing-field", `${at}.fields.${leaf.path}`, `\`${capName}.${itemArray.path}[].${leaf.path}\` is required and has no source`)];
45173
- });
45174
- }
45175
- function planItemField(ctx, leaf) {
45176
- const { capName, itemArray, featureIndex, lookupCap } = ctx;
45177
- const { key, label, path, source } = leaf;
45178
- const at = `features[${featureIndex}].items.${key}.fields.${path}`;
45179
- if (ctx.reserved.has(path)) return refused(problem("item-field-reserved", at, `\`${capName}.${itemArray.path}[].${path}\` is set by the composer itself — it takes no source`));
45180
- const tf = describeStateField(itemArray.itemSchema, path);
45181
- if (tf === null) return refused(problem("unknown-field", at, `a \`${capName}\` item has no field \`${path}\``));
45182
- const kinds = sourceKinds(source, lookupCap);
45183
- if (!kinds.ok) return refused(problem(kinds.code, at, kinds.message));
45184
- const role = roleOf(source);
45185
- const unavailable = unavailableFor(tf, role, ctx.mode, capName, at);
45186
- if (!unavailable.ok) return refused(unavailable.problem);
45187
- const plan = {
45188
- cap: capName,
45189
- path,
45190
- item: {
45191
- arrayPath: itemArray.path,
45192
- key,
45193
- label
45194
- },
45195
- featureIndex,
45196
- kind: tf.kind,
45197
- nullable: tf.nullable,
45198
- required: tf.required,
45199
- unavailable: unavailable.unavailable,
45200
- role,
45201
- source,
45202
- reads: [...fieldReads(source)]
45203
- };
45204
- const enumProblem = enumLiteralProblem(capName, tf, source, at);
45205
- return {
45206
- problems: [...compatibility(capName, tf, kinds.kinds, at), ...enumProblem === null ? [] : [enumProblem]],
45207
- fields: [plan],
45208
- features: [],
45209
- events: []
45210
- };
45211
- }
45212
- function planItems(def, feature, featureIndex, lookupCap, mode = "new") {
45213
- const at = `features[${featureIndex}].items`;
45214
- const itemArray = def.status?.itemArray;
45215
- if (itemArray === void 0) return refused(problem("not-item-array", at, `\`${def.name}\` has no item array — it takes no \`items\``));
45216
- if (itemArray.path !== "items") return refused(problem("not-item-array", at, `\`${def.name}\`'s item array is at \`${itemArray.path}\`, not \`${COMPOSITION_ITEM_ARRAY_PATH}\` — not composable yet`));
45217
- const ctx = {
45218
- capName: def.name,
45219
- itemArray,
45220
- reserved: reservedItemFields(itemArray),
45221
- featureIndex,
45222
- lookupCap,
45223
- mode
45224
- };
45225
- const results = Object.entries(feature.items ?? {}).flatMap(([key, item]) => [{
45226
- problems: missingLeaves(ctx, item, `${at}.${key}`),
45227
- fields: [],
45228
- features: [],
45229
- events: []
45230
- }, ...Object.entries(item.fields).map(([path, source]) => planItemField(ctx, {
45231
- key,
45232
- label: item.label,
45233
- path,
45234
- source
45235
- }))]);
45236
- return {
45237
- problems: results.flatMap((r) => r.problems),
45238
- fields: results.flatMap((r) => r.fields),
45239
- features: [],
45240
- events: []
45241
- };
45963
+ function unitsForDimension(dimension) {
45964
+ const out = [];
45965
+ for (const [unit, spec] of Object.entries(UNIT_TABLE)) if (spec.dimension === dimension) out.push(unit);
45966
+ return out;
45242
45967
  }
45243
45968
  //#endregion
45244
45969
  //#region src/composition/evaluate-field.ts
45970
+ /**
45971
+ * One composed field, evaluated from what its sources say NOW (D659).
45972
+ *
45973
+ * Pure. The composer calls it on every source change, and the slice-5 editor
45974
+ * will call it for its live preview, so both see the same answer.
45975
+ *
45976
+ * The rules (spec §2):
45977
+ * - a source that is offline or unreadable keeps its last value and is marked
45978
+ * STALE; the field is stale and keeps computing (D49);
45979
+ * - a source that is GONE makes the field UNAVAILABLE, `fatal`, and never a
45980
+ * plausible number (D393);
45981
+ * - a source that is unavailable but NOT gone (e.g. a cap unregistered at
45982
+ * runtime, R7b) makes the field UNAVAILABLE, non-fatal, `value: null`: it
45983
+ * may come back on its own, no block failure is raised for it;
45984
+ * - an expression that fails on a value makes the field unavailable for that
45985
+ * value, and NOT fatal: the next value may compute.
45986
+ *
45987
+ * `confirmed` (D663, D49): whether a NON-fatal unavailability is an ANSWER — a
45988
+ * cap the provider unregistered and a re-read agreed, a field the source
45989
+ * reported without, an expression that failed on a value — or only the
45990
+ * absence of one (a failed read, a first or empty read, a source not tracked
45991
+ * yet). Only a confirmed unavailability may hand a `release`-mode field back
45992
+ * to the native provider; an unconfirmed one holds it on its last value.
45993
+ * Absent means NOT confirmed. Fatal is always confirmed.
45994
+ *
45995
+ * When an expression has more than one unavailable binding, a FATAL one always
45996
+ * wins the outcome, regardless of position: every binding is scanned before
45997
+ * the field is judged, so an earlier non-fatal binding (e.g. a cap that is
45998
+ * momentarily unregistered) can never hide a later fatal one (a deleted
45999
+ * source) behind an early return.
46000
+ */
45245
46001
  function describeRead(read) {
45246
46002
  return `${compositionSourceKey(read.source)} ${read.cap}.${read.fieldPath}`;
45247
46003
  }
@@ -45308,7 +46064,10 @@ function expressionOutcome(source, read, now, stateful) {
45308
46064
  }
45309
46065
  const deadlines = [];
45310
46066
  const result = evaluateExpressionSource(source.expr, values, now, {
45311
- hooks: { noteDeadline: (at) => deadlines.push(at) },
46067
+ hooks: {
46068
+ noteDeadline: (at) => deadlines.push(at),
46069
+ convert: (value, from, to) => tryConvertUnit(value, normalizeUnit(from) ?? from, normalizeUnit(to) ?? to) ?? null
46070
+ },
45312
46071
  ...stateful === void 0 ? {} : { invokeStateful: (invocation) => evaluateStatefulExpressionCall(stateful.callPathPrefix === void 0 ? invocation : {
45313
46072
  ...invocation,
45314
46073
  path: `${stateful.callPathPrefix}@${invocation.path}`
@@ -45547,304 +46306,71 @@ function feederCustomizationExample(sources) {
45547
46306
  });
45548
46307
  }
45549
46308
  //#endregion
45550
- //#region src/composition/validate-composition.ts
45551
- function buildCapabilityLookup(defs) {
45552
- const byName = new Map(defs.map((d) => [d.name, d]));
45553
- return (capName) => byName.get(capName) ?? null;
45554
- }
45555
- /** Caps every `BaseDevice` registers on itself; a second registration throws. */
45556
- var BASE_DEVICE_CAPS = new Set(["device-status", "feature-probe"]);
45557
- var PENDING_SELF = {
45558
- addonId: COMPOSER_ADDON_ID,
45559
- stableId: `${COMPOSED_DEVICE_STABLE_ID_PREFIX}(unsaved)`
45560
- };
45561
- /** The candidate's block id before its first save. Stored block ids are `randomUUID()`, so none can carry it. */
45562
- var PENDING_BLOCK_ID = "(unsaved)";
45563
- function composableCap(feature, at, lookupCap) {
45564
- const def = lookupCap(feature.cap);
45565
- if (def === null) return problem("unknown-capability", `${at}.cap`, `no capability is named \`${feature.cap}\``);
45566
- if (BASE_DEVICE_CAPS.has(def.name)) return problem("not-composable", `${at}.cap`, `\`${def.name}\` is registered by every device itself — it cannot be composed`);
45567
- const state = def.runtimeState;
45568
- if (def.scope !== "device" || state === void 0) return problem("not-composable", `${at}.cap`, `\`${def.name}\` has no per-device state to compose`);
45569
- return {
45570
- def,
45571
- state,
45572
- fields: describeTopLevelStateFields(state)
45573
- };
45574
- }
45575
- /**
45576
- * A capability BUILT by the composition (a new device, or one ADDED to an
45577
- * existing device) must fit the device type, serve no command, and have every
45578
- * required field. A REPLACE needs none of it: the cap is bound (a fact), the
45579
- * native keeps serving its methods, and only the named fields are owned (D663).
45580
- */
45581
- function builtCapProblems({ def, state, fields: targetFields }, feature, at, deviceType) {
45582
- const problems = [];
45583
- if (def.deviceTypes !== void 0 && !def.deviceTypes.includes(deviceType)) problems.push(problem("wrong-device-type", `${at}.cap`, `\`${def.name}\` is not offered on a \`${deviceType}\` device (it allows ${def.deviceTypes.join(", ")})`));
45584
- const served = Object.entries(def.methods).filter(([name, m]) => m.systemOnly !== true && def.composedMethods?.[name] === void 0).map(([name]) => `\`${name}\``);
45585
- if (served.length > 0) problems.push(problem("has-commands", `${at}.cap`, `\`${def.name}\` has ${served.join(", ")}, which a composed device cannot serve until commands arrive (slice 3)`));
45586
- const itemArrayPath = feature.items === void 0 ? null : def.status?.itemArray?.path ?? null;
45587
- for (const key of requiredTopLevelKeys(state)) {
45588
- if (key === itemArrayPath) continue;
45589
- if (!targetFields.has(key)) problems.push(problem("not-composable", `${at}.fields`, `\`${def.name}.${key}\` is not a scalar — nested fields arrive in a later slice`));
45590
- else if (!(key in feature.fields)) problems.push(problem("missing-field", `${at}.fields.${key}`, `\`${def.name}.${key}\` is required and has no source`));
45591
- }
45592
- return problems;
45593
- }
45594
- function planTopLevelField({ def, fields }, field, mode, lookupCap) {
45595
- const { featureIndex, path, source } = field;
45596
- const fieldAt = `features[${featureIndex}].fields.${path}`;
45597
- if (path.includes(".")) return refused(problem("nested-field", fieldAt, `\`${path}\` is nested — nested fields arrive in a later slice`));
45598
- const tf = fields.get(path);
45599
- if (tf === void 0) return refused(problem("unknown-field", fieldAt, `\`${def.name}\` has no field \`${path}\``));
45600
- const kinds = sourceKinds(source, lookupCap);
45601
- if (!kinds.ok) return refused(problem(kinds.code, fieldAt, kinds.message));
45602
- const role = roleOf(source);
45603
- const unavailable = unavailableFor(tf, role, mode, def.name, fieldAt);
45604
- if (!unavailable.ok) return refused(unavailable.problem);
45605
- const plan = {
45606
- cap: def.name,
45607
- path,
45608
- featureIndex,
45609
- kind: tf.kind,
45610
- nullable: tf.nullable,
45611
- required: tf.required,
45612
- unavailable: unavailable.unavailable,
45613
- role,
45614
- source,
45615
- reads: [...fieldReads(source)]
45616
- };
45617
- const enumProblem = enumLiteralProblem(def.name, tf, source, fieldAt);
45618
- return {
45619
- problems: [...compatibility(def.name, tf, kinds.kinds, fieldAt), ...enumProblem === null ? [] : [enumProblem]],
45620
- fields: [plan],
45621
- features: [],
45622
- events: []
45623
- };
45624
- }
45625
- function planFeature(feature, featureIndex, target, lookupCap) {
45626
- const at = `features[${featureIndex}]`;
45627
- const cap = composableCap(feature, at, lookupCap);
45628
- if ("code" in cap) return refused(cap);
45629
- const capProblems = target.mode === "replace" ? [] : [...builtCapProblems(cap, feature, at, target.deviceType)];
45630
- if (feature.commands !== void 0 && Object.keys(feature.commands).length > 0) capProblems.push(problem("reserved-variant", `${at}.commands`, "commands (`forward`) arrive in slice 3"));
45631
- const perField = Object.entries(feature.fields).map(([path, source]) => planTopLevelField(cap, {
45632
- featureIndex,
45633
- path,
45634
- source
45635
- }, target.mode, lookupCap));
45636
- const items = feature.items === void 0 ? [] : [planItems(cap.def, feature, featureIndex, lookupCap, target.mode)];
45637
- const all = [...perField, ...items];
45638
- const fields = all.flatMap((result) => result.fields);
45639
- const featurePlan = {
45640
- featureIndex,
45641
- cap: cap.def.name,
45642
- mode: target.mode
45643
- };
45644
- const eventPlan = planCompositionEvents(cap.def, featurePlan, fields);
45645
- return {
45646
- problems: [
45647
- ...capProblems,
45648
- ...all.flatMap((r) => r.problems),
45649
- ...eventPlan.problems
45650
- ],
45651
- fields,
45652
- features: [featurePlan],
45653
- events: eventPlan.events
45654
- };
45655
- }
45656
- /** A cap the device serves itself; one the composer grafted (an earlier ADD) is not native. */
45657
- function isNativeCap(target, cap) {
45658
- const owner = target.nativeCaps.get(cap);
45659
- return owner !== void 0 && owner !== "composer";
45660
- }
45661
- /** The target read, or the refusal that replaces the whole plan when it could not be (D391). */
45662
- function planTargetOf(composition, target) {
45663
- if (composition.target.kind === "new") return {
45664
- kind: "new",
45665
- type: composition.target.type
45666
- };
45667
- const key = compositionSourceKey(composition.target.device);
45668
- if (target === void 0) return problem("target-unreadable", "target", `target device \`${key}\` was not read — the save is refused rather than stored unchecked`);
45669
- if (target.kind === "absent") return problem("target-missing", "target", `target device \`${key}\` does not exist`);
45670
- if (target.kind === "unreadable") return problem("target-unreadable", "target", `could not read target device \`${key}\` (${target.error}) — the save is refused rather than stored unchecked`);
45671
- return {
45672
- kind: "existing",
45673
- found: target
45674
- };
45675
- }
45676
- function featureTargetOf(target, cap) {
45677
- if (target.kind === "new") return {
45678
- mode: "new",
45679
- deviceType: target.type
45680
- };
45681
- return {
45682
- mode: isNativeCap(target.found, cap) ? "replace" : "add",
45683
- deviceType: target.found.type
45684
- };
46309
+ //#region src/composition/presets/doorbell-feature.ts
46310
+ /**
46311
+ * The doorbell of a camera as a customization (D671). ONE builder: the
46312
+ * virtual-doorbell migration and the admin UI's "Use as doorbell" preset both
46313
+ * call it, so a preset can never write a shape the migration would refuse as
46314
+ * "an unrelated existing block".
46315
+ */
46316
+ /** A rise closer than this to the previous one is the same press (D671). */
46317
+ var DOORBELL_RISE_DEBOUNCE_MS = 2e3;
46318
+ /** Every source cap of `source` that `SOURCE_CAP_ACTIVE_FIELD` knows AND the device has bound. */
46319
+ function doorbellFeatureSources(source, boundCaps) {
46320
+ return Object.keys(SOURCE_CAP_ACTIVE_FIELD).filter((cap) => Object.hasOwn(SOURCE_CAP_CHANGED_AT_FIELD, cap) && boundCaps.includes(cap)).toSorted().flatMap((cap) => {
46321
+ const activeField = SOURCE_CAP_ACTIVE_FIELD[cap];
46322
+ const changedAtField = SOURCE_CAP_CHANGED_AT_FIELD[cap];
46323
+ return activeField === void 0 || changedAtField === void 0 ? [] : [{
46324
+ source,
46325
+ cap,
46326
+ activeField,
46327
+ changedAtField
46328
+ }];
46329
+ });
45685
46330
  }
45686
- /**
45687
- * The static plan. `target` describes an EXISTING target device (one read);
45688
- * it is ignored for a new one. On an existing target each feature REPLACES a
45689
- * cap the device has natively, else ADDS it (D663).
45690
- */
45691
- function planComposition(composition, lookupCap, target) {
45692
- const planTarget = planTargetOf(composition, target);
45693
- if ("code" in planTarget) return refused(planTarget);
45694
- const results = composition.features.map((feature, index) => {
45695
- const result = feature.kind === "passthrough" ? refused(problem("reserved-variant", `features[${index}]`, `whole-capability passthrough of \`${feature.cap}\` arrives in slice 3`)) : planFeature(feature, index, featureTargetOf(planTarget, feature.cap), lookupCap);
45696
- return compositionFeatureEnabled(feature) ? result : {
45697
- problems: result.problems,
45698
- fields: [],
45699
- features: [],
45700
- events: []
46331
+ /** The D671 feature, byte for byte what the migration writes. Throws on zero sources. */
46332
+ function buildDoorbellCompositionFeature(input) {
46333
+ const sources = [...input.sources].toSorted((a, b) => `${a.source.addonId}/${a.source.stableId}#${a.cap}`.localeCompare(`${b.source.addonId}/${b.source.stableId}#${b.cap}`));
46334
+ if (sources.length === 0) throw new Error("doorbell composition needs at least one source");
46335
+ const edgeBindings = {};
46336
+ sources.forEach((entry, index) => {
46337
+ edgeBindings[`active${index}`] = {
46338
+ kind: "from",
46339
+ source: entry.source,
46340
+ cap: entry.cap,
46341
+ fieldPath: entry.activeField
46342
+ };
46343
+ edgeBindings[`changed${index}`] = {
46344
+ kind: "from",
46345
+ source: entry.source,
46346
+ cap: entry.cap,
46347
+ fieldPath: entry.changedAtField
45701
46348
  };
45702
46349
  });
45703
46350
  return {
45704
- problems: results.flatMap((r) => r.problems),
45705
- fields: results.flatMap((r) => r.fields),
45706
- features: results.flatMap((r) => r.features),
45707
- events: results.flatMap((r) => r.events)
45708
- };
45709
- }
45710
- function compositionSourceRefs(composition) {
45711
- const refs = composition.features.flatMap((f) => compositionFeatureEnabled(f) && f.kind === "fields" ? featureSources(f).flatMap(fieldReads).map((r) => r.source) : []);
45712
- return [...new Map(refs.map((r) => [compositionSourceKey(r), r])).values()];
45713
- }
45714
- /**
45715
- * The candidate's device: the existing target itself, else `self`, else a
45716
- * placeholder that cannot collide with a stored target. An existing target is
45717
- * known even on create, so a second customization of it is refused on create too.
45718
- */
45719
- function candidateSelf(composition, ctx, plan) {
45720
- return {
45721
- ref: composition.target.kind === "existing" ? composition.target.device : ctx.self ?? PENDING_SELF,
45722
- native: composition.target.kind === "existing" && ctx.target?.kind === "found" ? ctx.target : null,
45723
- replaced: replacedFieldKeys(plan)
45724
- };
45725
- }
45726
- /**
45727
- * `compositionFieldKey` of every field a REPLACE feature of `plan` owns — the
45728
- * candidate's own, and a stored peer's `CompositionPeer.replaced` (D663): one
45729
- * derivation, so the graph reads both the same way.
45730
- */
45731
- function replacedFieldKeys(plan) {
45732
- const replacing = new Set(plan.features.filter((f) => f.mode === "replace").map((f) => f.featureIndex));
45733
- return new Set(plan.fields.filter((f) => replacing.has(f.featureIndex)).map(compositionFieldKey));
45734
- }
45735
- /**
45736
- * A read of the candidate's own device. Its own composed output (a new device's
45737
- * field, an ADDED field) is the slice-1 own-field rule; on an existing target
45738
- * every other field — replaced, or not composed at all — is the NATIVE value,
45739
- * valid when the device serves that cap natively (D663, rule 5).
45740
- */
45741
- function selfReadProblems(read, at, fields, self) {
45742
- const readKey = `${read.cap}.${read.fieldPath}`;
45743
- if (fields.some((f) => compositionFieldKey(f) === readKey && !self.replaced.has(readKey))) return [];
45744
- if (self.native === null) return [problem("source-field-unknown", at, `this device has no composed field \`${read.cap}.${read.fieldPath}\``)];
45745
- if (isNativeCap(self.native, read.cap)) return [];
45746
- return [problem("source-capability-missing", at, `the target device (device ${self.native.deviceId}) has no native \`${read.cap}\``)];
45747
- }
45748
- function sourceProblems(fields, ctx, self) {
45749
- const selfKey = compositionSourceKey(self.ref);
45750
- return fields.flatMap((field) => field.reads.flatMap((read) => {
45751
- const at = compositionFieldAt(field);
45752
- const key = compositionSourceKey(read.source);
45753
- if (key === selfKey) return selfReadProblems(read, at, fields, self);
45754
- const desc = ctx.sources.get(key);
45755
- if (desc === void 0 || desc.kind === "unreadable") return [problem("source-unreadable", at, `could not read source \`${key}\` (${desc === void 0 ? "it was not read" : desc.error}) — the save is refused rather than stored unchecked`)];
45756
- if (desc.kind === "absent") return [problem("source-missing", at, `source \`${key}\` does not exist`)];
45757
- if (!desc.caps.has(read.cap)) return [problem("source-capability-missing", at, `source \`${key}\` (device ${desc.deviceId}) has no \`${read.cap}\``)];
45758
- return [];
45759
- }));
45760
- }
45761
- /**
45762
- * A cycle's node keys are `compositionReadKey` strings:
45763
- * `<addonId>/<stableId>#<cap>.<fieldPath>`. When a node belongs to the
45764
- * CANDIDATE itself (this composition being saved), pull its `cap`/`fieldPath`
45765
- * back out so the refusal can point at that exact field, matching the
45766
- * documented `features[N].fields.<path>` convention. A cap name has no `.`,
45767
- * so splitting `rest` on the FIRST `.` is exact; an item leaf's remainder
45768
- * (`items[desiccant].status`) is matched through `compositionFieldKey`.
45769
- */
45770
- function candidateFieldOfNode(nodeKey, candidateKey) {
45771
- const prefix = `${candidateKey}#`;
45772
- if (!nodeKey.startsWith(prefix)) return null;
45773
- const rest = nodeKey.slice(prefix.length);
45774
- const dot = rest.indexOf(".");
45775
- if (dot === -1) return null;
45776
- return {
45777
- cap: rest.slice(0, dot),
45778
- fieldPath: rest.slice(dot + 1)
45779
- };
45780
- }
45781
- /** The first node of a cycle's path that is one of THIS composition's own
45782
- * planned fields, as a documented-convention path; `'features'` when the
45783
- * cycle runs entirely through other stored compositions. */
45784
- function cyclePath(nodePath, candidateKey, fields) {
45785
- for (const nodeKey of nodePath) {
45786
- const hit = candidateFieldOfNode(nodeKey, candidateKey);
45787
- if (hit === null) continue;
45788
- const hitKey = `${hit.cap}.${hit.fieldPath}`;
45789
- const field = fields.find((f) => compositionFieldKey(f) === hitKey);
45790
- if (field !== void 0) return compositionFieldAt(field);
45791
- }
45792
- return "features";
45793
- }
45794
- /** The first unread device any of `nodes` belongs to; null when none does. */
45795
- function unreadDeviceOf(nodes, unread) {
45796
- for (const [key, error] of unread) if (nodes.some((node) => node.startsWith(`${key}#`))) return {
45797
- key,
45798
- error
45799
- };
45800
- return null;
45801
- }
45802
- /**
45803
- * Cycle check runs against the CANDIDATE (this composition, as block
45804
- * `ctx.blockId`, writing `self.ref`) plus every OTHER stored composition,
45805
- * decided per strongly connected component (`findCandidateCycles`): a cyclic
45806
- * component holding a candidate node refuses, with one representative cycle
45807
- * through it; one without is not this save's cycle. A
45808
- * stored composition of the same block is its old version; another block on
45809
- * the same device, or two stored peers sharing a device, make
45810
- * `compositionEdges` throw `CompositionGraphError` — refused BY NAME as
45811
- * `duplicate-target` (D391, D663) instead of escaping as an uncaught throw.
45812
- */
45813
- function cycleProblems(composition, ctx, fields, self) {
45814
- const candidate = {
45815
- blockId: ctx.blockId ?? "(unsaved)",
45816
- target: self.ref,
45817
- composition,
45818
- replaced: self.replaced
45819
- };
45820
- const candidateKey = compositionSourceKey(candidate.target);
45821
- const unread = ctx.unreadTargets ?? /* @__PURE__ */ new Map();
45822
- try {
45823
- return findCandidateCycles(candidate, ctx.peers).map((c) => {
45824
- const at = cyclePath(c.path, candidateKey, fields);
45825
- const through = unreadDeviceOf([...c.component], unread);
45826
- return through === null ? problem("cycle", at, `a field reads itself: ${c.path.join(" → ")}`) : problem("cycle", at, `possible cycle through \`${through.key}\` — its state could not be read (${through.error}): ${c.path.join(" → ")}`);
45827
- });
45828
- } catch (err) {
45829
- if (err instanceof CompositionGraphError) return [problem("duplicate-target", "features", err.message)];
45830
- throw err;
45831
- }
45832
- }
45833
- function validateComposition(composition, ctx) {
45834
- const plan = planComposition(composition, ctx.lookupCap, ctx.target ?? void 0);
45835
- const self = candidateSelf(composition, ctx, plan);
45836
- const cycles = cycleProblems(composition, ctx, plan.fields, self);
45837
- const problems = [
45838
- ...plan.problems,
45839
- ...sourceProblems(plan.fields, ctx, self),
45840
- ...cycles
45841
- ];
45842
- return {
45843
- ok: problems.length === 0,
45844
- problems,
45845
- fields: [...plan.fields],
45846
- features: [...plan.features],
45847
- events: [...plan.events]
46351
+ kind: "fields",
46352
+ cap: "doorbell",
46353
+ enabled: input.enabled,
46354
+ fields: {
46355
+ lastPressedAt: {
46356
+ kind: "expression",
46357
+ expr: `latest(${sources.map((_, index) => `rose(active${index}, changed${index}, ${DOORBELL_RISE_DEBOUNCE_MS})`).join(", ")})`,
46358
+ bindings: edgeBindings
46359
+ },
46360
+ pressCountSinceStart: {
46361
+ kind: "expression",
46362
+ expr: "count(lastPressedAt)",
46363
+ bindings: { lastPressedAt: {
46364
+ kind: "from",
46365
+ source: {
46366
+ addonId: input.camera.addonId,
46367
+ stableId: input.camera.stableId
46368
+ },
46369
+ cap: "doorbell",
46370
+ fieldPath: "lastPressedAt"
46371
+ } }
46372
+ }
46373
+ }
45848
46374
  };
45849
46375
  }
45850
46376
  //#endregion
@@ -52970,6 +53496,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
52970
53496
  addonId: null,
52971
53497
  access: "view"
52972
53498
  },
53499
+ "coreBlocks.listComposableCaps": {
53500
+ capName: "core-blocks",
53501
+ capScope: "system",
53502
+ addonId: null,
53503
+ access: "view"
53504
+ },
52973
53505
  "coreBlocks.listCompositions": {
52974
53506
  capName: "core-blocks",
52975
53507
  capScope: "system",
@@ -56654,6 +57186,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
56654
57186
  addonId: null,
56655
57187
  access: "create"
56656
57188
  },
57189
+ "pipelineOrchestrator.setCameraSensors": {
57190
+ capName: "pipeline-orchestrator",
57191
+ capScope: "system",
57192
+ addonId: null,
57193
+ access: "create"
57194
+ },
56657
57195
  "pipelineOrchestrator.setCameraStepOverride": {
56658
57196
  capName: "pipeline-orchestrator",
56659
57197
  capScope: "system",
@@ -60699,6 +61237,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
60699
61237
  form: "single",
60700
61238
  optional: false
60701
61239
  }],
61240
+ "pipelineOrchestrator.setCameraSensors": [{
61241
+ name: "deviceId",
61242
+ form: "single",
61243
+ optional: false
61244
+ }],
60702
61245
  "pipelineOrchestrator.setCameraStepOverride": [{
60703
61246
  name: "deviceId",
60704
61247
  form: "single",
@@ -61521,6 +62064,7 @@ var SYSTEM_SCOPE_DEVICE_METHODS = [
61521
62064
  "pipelineOrchestrator.getPipelineDevicePin",
61522
62065
  "pipelineOrchestrator.resolvePipeline",
61523
62066
  "pipelineOrchestrator.setCameraPipelineForAgent",
62067
+ "pipelineOrchestrator.setCameraSensors",
61524
62068
  "pipelineOrchestrator.setCameraStepOverride",
61525
62069
  "pipelineOrchestrator.setCameraStepToggle",
61526
62070
  "pipelineOrchestrator.setCameraSwitch",
@@ -62173,6 +62717,7 @@ function createSystemProxy(api) {
62173
62717
  getComposition: (input) => dispatch("coreBlocks", "getComposition", "query", input),
62174
62718
  listCompositions: (input) => dispatch("coreBlocks", "listCompositions", "query", input),
62175
62719
  getCustomization: (input) => dispatch("coreBlocks", "getCustomization", "query", input),
62720
+ listComposableCaps: (input) => dispatch("coreBlocks", "listComposableCaps", "query", input),
62176
62721
  validateComposition: (input) => dispatch("coreBlocks", "validateComposition", "mutation", input)
62177
62722
  },
62178
62723
  decoder: {
@@ -62504,6 +63049,7 @@ function createSystemProxy(api) {
62504
63049
  getNodeInferenceDevices: (input) => dispatch("pipelineOrchestrator", "getNodeInferenceDevices", "query", input),
62505
63050
  resetNodePipelineDefaults: (input) => dispatch("pipelineOrchestrator", "resetNodePipelineDefaults", "mutation", input),
62506
63051
  getCameraStatuses: (input) => dispatch("pipelineOrchestrator", "getCameraStatuses", "query", input),
63052
+ setCameraSensors: (input) => dispatch("pipelineOrchestrator", "setCameraSensors", "mutation", input),
62507
63053
  reconcileFromDisk: (input) => dispatch("pipelineOrchestrator", "reconcileFromDisk", "mutation", input),
62508
63054
  getReconcileFromDiskStatus: (input) => dispatch("pipelineOrchestrator", "getReconcileFromDiskStatus", "query", input),
62509
63055
  listTemplates: (input) => dispatch("pipelineOrchestrator", "listTemplates", "query", input),
@@ -66698,334 +67244,6 @@ var DEVICE_TYPE_INFO = { ["camera"]: {
66698
67244
  icon: "camera"
66699
67245
  } };
66700
67246
  //#endregion
66701
- //#region src/units/unit-table.ts
66702
- /**
66703
- * Frozen unit → spec table. `•` in the doc marks each dimension's canonical
66704
- * unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
66705
- * `factor = 5/9`, `offset = -160/9` (kept as exact expressions, not rounded
66706
- * decimals). K derives from `°C = K − 273.15`.
66707
- */
66708
- var UNIT_TABLE = {
66709
- "°C": {
66710
- dimension: "temperature",
66711
- factor: 1,
66712
- offset: 0
66713
- },
66714
- "°F": {
66715
- dimension: "temperature",
66716
- factor: 5 / 9,
66717
- offset: -160 / 9
66718
- },
66719
- K: {
66720
- dimension: "temperature",
66721
- factor: 1,
66722
- offset: -273.15
66723
- },
66724
- hPa: {
66725
- dimension: "pressure",
66726
- factor: 1,
66727
- offset: 0
66728
- },
66729
- kPa: {
66730
- dimension: "pressure",
66731
- factor: 10,
66732
- offset: 0
66733
- },
66734
- Pa: {
66735
- dimension: "pressure",
66736
- factor: .01,
66737
- offset: 0
66738
- },
66739
- mbar: {
66740
- dimension: "pressure",
66741
- factor: 1,
66742
- offset: 0
66743
- },
66744
- bar: {
66745
- dimension: "pressure",
66746
- factor: 1e3,
66747
- offset: 0
66748
- },
66749
- inHg: {
66750
- dimension: "pressure",
66751
- factor: 33.8639,
66752
- offset: 0
66753
- },
66754
- mmHg: {
66755
- dimension: "pressure",
66756
- factor: 1.33322,
66757
- offset: 0
66758
- },
66759
- psi: {
66760
- dimension: "pressure",
66761
- factor: 68.9476,
66762
- offset: 0
66763
- },
66764
- "m/s": {
66765
- dimension: "speed",
66766
- factor: 1,
66767
- offset: 0
66768
- },
66769
- "km/h": {
66770
- dimension: "speed",
66771
- factor: 1 / 3.6,
66772
- offset: 0
66773
- },
66774
- mph: {
66775
- dimension: "speed",
66776
- factor: .44704,
66777
- offset: 0
66778
- },
66779
- kn: {
66780
- dimension: "speed",
66781
- factor: .514444,
66782
- offset: 0
66783
- },
66784
- "mm/h": {
66785
- dimension: "precipitation-rate",
66786
- factor: 1,
66787
- offset: 0
66788
- },
66789
- "in/h": {
66790
- dimension: "precipitation-rate",
66791
- factor: 25.4,
66792
- offset: 0
66793
- },
66794
- m: {
66795
- dimension: "length",
66796
- factor: 1,
66797
- offset: 0
66798
- },
66799
- mm: {
66800
- dimension: "length",
66801
- factor: .001,
66802
- offset: 0
66803
- },
66804
- cm: {
66805
- dimension: "length",
66806
- factor: .01,
66807
- offset: 0
66808
- },
66809
- km: {
66810
- dimension: "length",
66811
- factor: 1e3,
66812
- offset: 0
66813
- },
66814
- in: {
66815
- dimension: "length",
66816
- factor: .0254,
66817
- offset: 0
66818
- },
66819
- ft: {
66820
- dimension: "length",
66821
- factor: .3048,
66822
- offset: 0
66823
- },
66824
- mi: {
66825
- dimension: "length",
66826
- factor: 1609.344,
66827
- offset: 0
66828
- },
66829
- lx: {
66830
- dimension: "illuminance",
66831
- factor: 1,
66832
- offset: 0
66833
- },
66834
- "W/m²": {
66835
- dimension: "irradiance",
66836
- factor: 1,
66837
- offset: 0
66838
- },
66839
- W: {
66840
- dimension: "power",
66841
- factor: 1,
66842
- offset: 0
66843
- },
66844
- kW: {
66845
- dimension: "power",
66846
- factor: 1e3,
66847
- offset: 0
66848
- },
66849
- VA: {
66850
- dimension: "apparent-power",
66851
- factor: 1,
66852
- offset: 0
66853
- },
66854
- Wh: {
66855
- dimension: "energy",
66856
- factor: 1,
66857
- offset: 0
66858
- },
66859
- kWh: {
66860
- dimension: "energy",
66861
- factor: 1e3,
66862
- offset: 0
66863
- },
66864
- MWh: {
66865
- dimension: "energy",
66866
- factor: 1e6,
66867
- offset: 0
66868
- },
66869
- V: {
66870
- dimension: "voltage",
66871
- factor: 1,
66872
- offset: 0
66873
- },
66874
- mV: {
66875
- dimension: "voltage",
66876
- factor: .001,
66877
- offset: 0
66878
- },
66879
- A: {
66880
- dimension: "current",
66881
- factor: 1,
66882
- offset: 0
66883
- },
66884
- mA: {
66885
- dimension: "current",
66886
- factor: .001,
66887
- offset: 0
66888
- },
66889
- ppm: {
66890
- dimension: "concentration-volume",
66891
- factor: 1,
66892
- offset: 0
66893
- },
66894
- ppb: {
66895
- dimension: "concentration-volume",
66896
- factor: .001,
66897
- offset: 0
66898
- },
66899
- "µg/m³": {
66900
- dimension: "concentration-mass",
66901
- factor: 1,
66902
- offset: 0
66903
- },
66904
- "mg/m³": {
66905
- dimension: "concentration-mass",
66906
- factor: 1e3,
66907
- offset: 0
66908
- },
66909
- kg: {
66910
- dimension: "mass",
66911
- factor: 1,
66912
- offset: 0
66913
- },
66914
- g: {
66915
- dimension: "mass",
66916
- factor: .001,
66917
- offset: 0
66918
- },
66919
- lb: {
66920
- dimension: "mass",
66921
- factor: .453592,
66922
- offset: 0
66923
- },
66924
- oz: {
66925
- dimension: "mass",
66926
- factor: .0283495,
66927
- offset: 0
66928
- },
66929
- "%": {
66930
- dimension: "percentage",
66931
- factor: 1,
66932
- offset: 0
66933
- }
66934
- };
66935
- //#endregion
66936
- //#region src/units/convert.ts
66937
- /**
66938
- * Pure unit-conversion API over `UNIT_TABLE`. No dependencies, no side effects.
66939
- *
66940
- * Conversion is refused (throws `UnitConversionError`, or returns `undefined`
66941
- * from the `try*` variant) whenever a unit is unknown or the two units belong
66942
- * to different dimensions — cross-dimension conversion is deliberately
66943
- * impossible so a render override can never make the value and its unit label
66944
- * disagree.
66945
- *
66946
- * Callers pass units through `normalizeUnit` (`../device/source-info.ts`) BEFORE
66947
- * calling here — the table keys only canonical spellings.
66948
- */
66949
- /** Thrown by `convertUnit` when a conversion is refused. Carries the offending
66950
- * units + a machine-readable `reason` for callers that branch on the cause. */
66951
- var UnitConversionError = class extends Error {
66952
- from;
66953
- to;
66954
- reason;
66955
- constructor(from, to, reason) {
66956
- super(`[units] cannot convert '${from}' → '${to}': ${reason}`);
66957
- this.name = "UnitConversionError";
66958
- this.from = from;
66959
- this.to = to;
66960
- this.reason = reason;
66961
- }
66962
- };
66963
- /** Resolve a unit's `UnitSpec`, or `undefined` when the spelling is unknown. */
66964
- function specFor(unit) {
66965
- return Object.hasOwn(UNIT_TABLE, unit) ? UNIT_TABLE[unit] : void 0;
66966
- }
66967
- /** The dimension a unit belongs to, or `undefined` for an unknown unit. */
66968
- function unitDimension(unit) {
66969
- return specFor(unit)?.dimension;
66970
- }
66971
- /** Value in `spec`'s unit → its dimension's canonical unit. */
66972
- function toCanonical(value, spec) {
66973
- return value * spec.factor + spec.offset;
66974
- }
66975
- /** Canonical-unit value → the unit described by `spec`. */
66976
- function fromCanonical(canonical, spec) {
66977
- return (canonical - spec.offset) / spec.factor;
66978
- }
66979
- /**
66980
- * Convert `value` from unit `from` to unit `to`. Identity when `from === to`.
66981
- * Throws `UnitConversionError` when either unit is unknown or the units belong
66982
- * to different dimensions.
66983
- */
66984
- function convertUnit(value, from, to) {
66985
- if (from === to) return value;
66986
- const fromSpec = specFor(from);
66987
- if (!fromSpec) throw new UnitConversionError(from, to, "unknown-from");
66988
- const toSpec = specFor(to);
66989
- if (!toSpec) throw new UnitConversionError(from, to, "unknown-to");
66990
- if (fromSpec.dimension !== toSpec.dimension) throw new UnitConversionError(from, to, "cross-dimension");
66991
- return fromCanonical(toCanonical(value, fromSpec), toSpec);
66992
- }
66993
- /**
66994
- * Graceful variant for the render path: returns the converted value, or
66995
- * `undefined` when the conversion is refused (unknown unit / cross-dimension).
66996
- * Never throws — a render caller falls back to the raw value + source unit.
66997
- */
66998
- function tryConvertUnit(value, from, to) {
66999
- if (from === to) return value;
67000
- const fromSpec = specFor(from);
67001
- if (!fromSpec) return void 0;
67002
- const toSpec = specFor(to);
67003
- if (!toSpec) return void 0;
67004
- if (fromSpec.dimension !== toSpec.dimension) return void 0;
67005
- return fromCanonical(toCanonical(value, fromSpec), toSpec);
67006
- }
67007
- /**
67008
- * Whether `value` can be converted between `from` and `to` (same dimension,
67009
- * both known). Cheap boolean probe for the UI's same-dimension unit picker and
67010
- * the resolver's convertibility branch — compute ONCE so a unit label and its
67011
- * value math can never disagree.
67012
- */
67013
- function canConvertUnit(from, to) {
67014
- if (from === to) return true;
67015
- const fromDim = unitDimension(from);
67016
- if (fromDim === void 0) return false;
67017
- return fromDim === unitDimension(to);
67018
- }
67019
- /**
67020
- * Every known unit spelling in a dimension (table insertion order — canonical
67021
- * unit first). Powers the UI's same-dimension unit picker.
67022
- */
67023
- function unitsForDimension(dimension) {
67024
- const out = [];
67025
- for (const [unit, spec] of Object.entries(UNIT_TABLE)) if (spec.dimension === dimension) out.push(unit);
67026
- return out;
67027
- }
67028
- //#endregion
67029
67247
  //#region src/util/location-match.ts
67030
67248
  /**
67031
67249
  * Pure fuzzy matcher for adoption location import. Normalized
@@ -68326,4 +68544,4 @@ function enumerateInferenceDevices(hw) {
68326
68544
  return out;
68327
68545
  }
68328
68546
  //#endregion
68329
- export { ACCESSORY_LABEL, ACCESS_ROLES, ALEXA_EGRESS_PROFILE, ALL_CAPABILITY_DEFINITIONS, APPLE_SA_TO_MACRO, ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT, AUDIO_ANALYSIS_CAP_NAME, AUDIO_BACKEND_CHOICES, AUDIO_CHUNK_FORMATS, AUDIO_MACRO_LABELS, AUDIO_NOT_CLASSIFIED_REASONS, AUDIO_PRESETS, AUDIO_SCALE_EPOCH_ISO, AUDIO_SCALE_EPOCH_MS, AccessoriesStatusSchema, AccessoryKind, AddBrokerInputSchema, AddonAutoUpdateSchema, AddonListItemSchema, AddonPageDeclarationSchema, AddonPageInfoSchema, AdminLinkTargetEnum, AdoptInputSchema as AdoptionAdoptInputSchema, AdoptResultSchema as AdoptionAdoptResultSchema, AdoptionCandidateResultSchema, AdoptionFilterSchema, GetCandidateInputSchema as AdoptionGetCandidateInputSchema, AdoptionJobSchema, AdoptionJobStateSchema, ListCandidatesInputSchema as AdoptionListCandidatesInputSchema, ListCandidatesOutputSchema as AdoptionListCandidatesOutputSchema, AdoptionOutcomeSchema, ReleaseInputSchema as AdoptionReleaseInputSchema, AdoptionStatusSchema, AgentLoadSummarySchema, AirQualitySensorStatusSchema, AlarmArmModeSchema, AlarmPanelStatusSchema, AlarmStateSchema, AlertSchema, AlertSeveritySchema, AlertSourceSchema, AlertStatusSchema, AmbientLightSensorStatusSchema, AnalyticsLtsSeriesSchema, ApiKeyRecordSchema, ApiKeySummarySchema, AppleFmAvailabilitySchema, AppleFmUnavailableReasonSchema, ArchiveEntrySchema, ArchiveManifestSchema, ArchivedDebugNoteQueryInputSchema, ArchivedDebugNoteSchema, AttachmentMediaTypeSchema, AttachmentSchema, AudioAnalysisResultSchema, AudioAnalysisSettingsSchema, AudioAttachDeviceInputSchema, AudioAttachDeviceResultSchema, AudioChunkFormatSchema, AudioChunkInputSchema, AudioClassSummarySchema, AudioClassificationLabelSchema, AudioClassificationResultSchema, AudioClassifyOutcomeSchema, AudioCodecInfoSchema, AudioDecodeSessionConfigSchema, AudioDetachDeviceResultSchema, AudioEncodeSchema, AudioEncodeSessionConfigSchema, AudioEncodedChunkSchema, AudioEventSchema, AudioLevelSchema, AudioMetricsHistoryPointSchema, AudioMetricsHistorySchema, AudioMetricsSnapshotSchema, AudioPcmChunkSchema, AudioStreamPickSchema, AuthResultSchema, AutoUpdateSettingsSchema, AutomationActionSchema, AutomationConditionOperatorSchema, AutomationConditionSchema, AutomationControlStatusSchema, AutomationRecipeSchema, AutomationTriggerSchema, AvailableIntegrationTypeSchema, BASE_DEVICE_CAPS, BASE_LIVE_EGRESS_PROFILE, BATTERY_DEVICE_PROFILE, BATTERY_UNREACHABLE_AFTER_MS, BIRTH_DECISION_DEFAULT_LIMIT, BOOT_RECOVERY_BACKOFF_MS, BUILTIN_RESULT_KINDS, BackgroundRunRegistry, BacklightModeSchema, BackupDestinationInfoSchema, BackupEntrySchema, BackupRunPhaseSchema, BackupRunSchema, BackupRunStateSchema, BackupTriggerResultSchema, BaseAddon, BaseDevice, BaseDeviceProvider, BatteryStatusSchema, BinaryStatusSchema, BirthDecisionQueryInputSchema, BirthDecisionRecordSchema, BirthDecisionVerdictSchema, BoundingBoxSchema, BrightnessStatusSchema, AddInputSchema as BrokerAddInputSchema, BrokerAudioClientSchema, BrokerClientsSchema, BrokerConnectionDetailsSchema, BrokerConsumerAttributionSchema, BrokerConsumerKindSchema, BrokerDecodedClientSchema, BrokerEncodedClientSchema, GetStateInputSchema as BrokerGetStateInputSchema, BrokerInfoSchema, BrokerProviderInfoSchema, PublishInputSchema as BrokerPublishInputSchema, RegistryStatusSchema as BrokerRegistryStatusSchema, BrokerRtspClientSchema, BrokerStatsSchema, BrokerStatusEnum, BrokerStatusSchema, SubscribeInputSchema as BrokerSubscribeInputSchema, SubscribeResultSchema as BrokerSubscribeResultSchema, TestConnectionResultSchema as BrokerTestConnectionResultSchema, UnsubscribeInputSchema as BrokerUnsubscribeInputSchema, BulkRecordSchema, CAMERA_SENSORS_NOT_LOADED, CAMERA_SENSORS_SETTINGS_KEY, CAMERA_SWITCH_CATALOG, CAMERA_SWITCH_ORDER, CAMERA_TRIGGER, CAM_PROFILE_ORDER, CAPABILITY_NAMES, CAPABILITY_ROUTER_KEYS, CAP_NAMES_WITH_STATUS, CAP_NODE_PIN_CONTEXT_KEY, CAP_PROVIDER_KIND_MAP, CLASS_MAP_MACRO_TARGETS, CLIP_BROKER_PACED_RATES, CLIP_PLAYBACK_OPTIONS, CLIP_REALTIME_SOURCE_RATES, CLIP_REASON_HEADER_MAX, CLIP_SEARCH_STRICTNESS, CLIP_STILL_DISPOSITION_HEADER, CLIP_STILL_REASON_CODE_HEADER, CLIP_STILL_REASON_HEADER, CLIP_STREAM_SOURCE_RATES, CLIP_STREAM_TRANSPORT_HEADER, CLIP_STRICTNESS_FACTOR, CLIP_VECTOR_INDEX_PATTERN, CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS, CLUSTER_MODEL_SCOPED_STEPS, CLUSTER_MODEL_SECTION_ID, CLUSTER_STEP_SETTING_FIELDS, COCO_80_LABELS, COCO_TO_MACRO, COMPOSED_DEVICE_STABLE_ID_PREFIX, COMPOSED_ITEM_FIXED_FIELDS, COMPOSER_ADDON_ID, COMPOSER_RUNNER_ID, COMPOSITION_EVENT_CATEGORY, COMPOSITION_ITEM_ARRAY_PATH, COMPOSITION_ITEM_KEY_RE, CONNECTION_TEST_TIMEOUT_MS, CONTAINER_CHILD_PRIORITY, CORE_BLOCKS_ADDON_ID, CORE_BLOCK_ADDON_PREFIX, CUSTOMIZATION_BLOCK_NAME_PREFIX, CamProfileSchema, CamStreamDescriptorSchema, CamStreamKindSchema, CamStreamResolutionSchema, CameraAssignmentStatusSchema, CameraAudioStatusSchema, CameraBrokerProfileSchema, CameraBrokerStatusSchema, CameraCredentialsSchema, CameraCredentialsStatusSchema, CameraDecoderShmSchema, CameraDecoderStatusSchema, CameraDetectionPhaseSchema, CameraDetectionProvisioningSchema, CameraDetectionProvisioningStateSchema, CameraDetectionStatusSchema, CameraMetricsSchema, CameraMetricsWithDeviceIdSchema, CameraMotionStatusSchema, CameraOccupancySnapshotForDeviceSchema, CameraRecordingModeSchema, CameraRecordingStatusSchema, CameraSensorAttachmentSchema, CameraSensorRefSchema, CameraSensorsConfigSchema, CameraSensorsModeSchema, CameraSensorsNotForwardedSchema, CameraSensorsStatusSchema, CameraSourceStatusSchema, CameraSourceStreamSchema, CameraStatusDegradationReasonSchema, CameraStatusDegradationSchema, CameraStatusSchema, CameraStatusStageSchema, CameraStreamSchema, CameraSwitchAuthoritySchema, CameraSwitchGroupSchema, CameraSwitchIdSchema, CameraSwitchSchema, CameraSwitchUnavailableReasonSchema, CameraSwitchWarningSchema, CandidateQueryFilterSchema, CapScopeSchema, CapabilityBindingsSchema, CarbonMonoxideStatusSchema, ChargingStatus, ClaimOutcomeSchema, ClaimsListingSchema, ClientNetworkStatsSchema, ClimateControlStatusSchema, ClipBytesOfferSchema, ClipBytesSchema, ClipExportFailureSchema, ClipModelMetaSchema, ClipPlaybackOptionsSchema, ClipPlaybackSchema, ClipSchema, ClipSearchStrictnessSchema, ClipSourceAvailabilitySchema, ClipSourceSchema, ClipStillDispositionSchema, ClipStillRefusalCodeSchema, ClipStreamAudioReasonSchema, ClipStreamAudioSchema, ClipStreamDialSchema, ClipWakeSchema, ClusterAddonNodeDeploymentSchema, ClusterAddonStatusEntrySchema, ClusterModelChoiceSchema, CollectionColumnSchema, CollectionIndexSchema, ColorStatusSchema, ComposerApplyInputSchema, ComposerApplyResultSchema, ComposerBlockSchema, ComposerBlockVerdictSchema, ComposerUnreadableBlockSchema, CompositionBindingSchema, CompositionBlockInputSchema, CompositionBlockStateSchema, CompositionCodeSourceSchema, CompositionCommandTargetSchema, CompositionCustomizationReadSchema, CompositionEventPlanSchema, CompositionExistingTargetSchema, CompositionExpressionSourceSchema, CompositionFeatureModeSchema, CompositionFeaturePlanSchema, CompositionFeatureSchema, CompositionFieldItemSchema, CompositionFieldKindSchema, CompositionFieldPlanSchema, CompositionFieldReadSchema, CompositionFieldRoleSchema, CompositionFieldSourceSchema, CompositionFieldStateKindSchema, CompositionFieldStateSchema, CompositionFieldsFeatureSchema, CompositionForwardCommandSchema, CompositionFromSourceSchema, CompositionGetReadSchema, CompositionGraphError, CompositionItemEntrySchema, CompositionListReadSchema, CompositionLiteralBindingSchema, CompositionNewTargetSchema, CompositionPassthroughFeatureSchema, CompositionProblemCodeSchema, CompositionProblemSchema, CompositionRunStatusSchema, CompositionSchema, CompositionSourceRefSchema, CompositionStateReadSchema, CompositionTargetSchema, CompositionUnavailableModeSchema, CompositionValidationSchema, CompositionViewSchema, ConfigEntrySchema, ConfigSectionWithValuesSchema, ConfigTabDeclarationSchema, ConnectionTestDescriptorSchema, ConnectionTestInputSchema, ConnectionTestOutcomeSchema, ConnectivityStatusSchema, ConsumableItemSchema, ConsumableRemainingSchema, ConsumableRemainingUnitSchema, ConsumablesStatusSchema, ContactStatusSchema, ControlKindSchema, ControlStatusSchema, ConvertArtifactSchema, ConvertResultSchema, ConvertTargetSchema, CoreBlockCompileResultSchema, CoreBlockInputSchema, CoreBlockPlacementSchema, CoreBlockSchema, CoreBlockSourceSchema, CoreBlockStatusSchema, CoverStateSchema, CoverStatusSchema, CreateApiKeyInputSchema, CreateApiKeyResultSchema, CreateIntegrationInputSchema, CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, CreateUserInputSchema, CustomActionInputSchema, CustomModelDescriptorSchema, DATAPLANE_SECRET_HEADER, DAYS_PER_WEEK, DAY_NAMES, DECLARED_DEVICE_SWEEP_LIMIT, DECLARED_INTEGRATION_FIXED_KEY, DEFAULT_ADDON_PLACEMENT, DEFAULT_AUDIO_ANALYZER_CONFIG, DEFAULT_CLUSTER_STEP_MODELS, DEFAULT_CLUSTER_STEP_SETTINGS, DEFAULT_DECODER_HWACCEL_CONFIG, DEFAULT_DETAIL_CROP_CONVENTION, DEFAULT_EVENTS_BAND_BUFFER_SEC, DEFAULT_EVENT_COLOR, DEFAULT_FEATURES, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, DEFAULT_MIN_LANDMARK_FACE_SIZE_PX, DEFAULT_NATIVE_LEASE_SETTINGS, DEFAULT_OVERLAY_LAYERS, DEFAULT_POOL_MEMORY_POLICY, DEFAULT_RECORDING_PROFILES, DEFAULT_RETENTION, DEFAULT_RUNTIME_STATE_DURABILITY, DEFAULT_TIMELAPSE_PREVIEW_TEXT, DEFAULT_TOKEN_EXPIRY, DERIVED_CAMERA_SILENCED_CAP_NAMES, DETAIL_CROP_PADDING_FIELD, DETAIL_CROP_PADDING_KEY, DETAIL_CROP_SECTION_ID, DETAIL_CROP_SQUARE_KEY, DETECTION_MACRO_CLASSES, DETECTION_PIPELINE_CAP_NAME, DEVICE_BACKEND_TO_FORMAT, DEVICE_CAP_NAMES, DEVICE_CHILDREN_BATCH_MAX, DEVICE_PROFILES, DEVICE_RESTORE_RETRY_CONCURRENCY, DEVICE_RESTORE_RETRY_DELAYS_MS, DEVICE_SCOPED_CAPS, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATE_READERS, DEVICE_STATUS_METHOD, DEVICE_TYPE_CONTROL_KIND, DEVICE_TYPE_INFO, DISPLAY_ICON_GROUPS, DISPLAY_ICON_KEYS, DISPLAY_ICON_OFFERED_KEYS, DISPLAY_ICON_VOCABULARY, DOORBELL_SOURCE_SLOT, EngineInfoSchema as DataStoreEngineInfoSchema, DayNightModeSchema, DayNightOptionsSchema, DayNightSettingsPatchSchema, DayNightStatusSchema, DeclaredDevices, DecodedAudioChunkSchema, DecodedFrameSchema, DecoderSessionConfigSchema, DecoderStatsSchema, DeleteIntegrationResultSchema, DetailCropConventionSchema, DetectionCatalogClassMapSchema, DetectionSourceSchema, DetectionSourcesSchema, DeviceAdminLinkSchema, DeviceCodeSeveritySchema, DeviceConfig, DeviceDiscoveryStatusSchema, ExposeInputSchema as DeviceExportExposeInputSchema, DeviceExportStatusSchema, UnexposeInputSchema as DeviceExportUnexposeInputSchema, DeviceFeature, DeviceInfoSchema, DeviceNetworkStatsSchema, DeviceRestoreRetryScheduler, DeviceRole, DeviceRuntimeState, DeviceSelectorSchema, DeviceStatusSchema, DeviceType, DiagnosticIdSchema, DiagnosticWindowPatchSchema, DiagnosticWindowSchema, DiscoveredChildDeviceSchema, DiscoveredChildStatusSchema, DiscoveredDeviceSchema, DiscoveredTargetSchema, DiskReconcileJobSchema, DisposerChain, DoorbellPressEventSchema, DoorbellSourceSlotValueSchema, DoorbellStatusSchema, EMBEDDING_MODEL_FAILED, EMBEDDING_REQUIREMENTS_FAILED, EMBEDDING_REQUIREMENTS_UNAVAILABLE, EVENTFUL_CAP_NAMES, EVENT_DENSITY_BATCH_MAX, EVENT_KIND_BY_CAP, EVENT_OWNER_TYPES, EVENT_PAD_MS, EVENT_TAXONOMY, EXPORT_DENSE_MAX_RANGES, EXPRESSION_BUILTINS, EXPRESSION_BUILTIN_NAMES, EXPRESSION_COMPILE_CACHE_CAPACITY, EXPRESSION_IDENTIFIER_RE, EXPRESSION_INJECTED_NOW, EXTENSION_HOST_DEVICE_TYPES, EXTENSION_SLOTS, EXTENSION_SLOT_IDS, EXTENSION_SLOT_LISTING_METHOD, EXTENSION_SLOT_REF_SEPARATOR, EffectiveTuningSchema, EgressEncodeSchema, EgressRateControlSchema, EgressTranscodeRequestSchema, EgressTranscodeSchema, ElementConfigStore, EmbeddingFailedModelSchema, EmbeddingFailedRequirementSchema, EmbeddingInfoSchema, EmbeddingRefusalCodeSchema, EmbeddingResultSchema, EmbeddingTowerSchema, EncodeProfileSchema, EncodedPacketSchema, EnrichedWidgetMetadataSchema, EnumSensorDateTimeFormatSchema, EnumSensorStatusSchema, EventCategory, EventDensityBucketSchema, EventDensityForDeviceSchema, EventEmitterStatusSchema, EventFireSchema, EventKindCategorySchema, EventKindDescriptorSchema, EventKindIconSchema, EventKindSchema, EventKindsForDeviceSchema, EventMediaArtifactSchema, EventMediaCoverageSchema, EventMediaKindSchema, EventMediaProductionSchema, EventOwnerTypeSchema, EventSourceType, ExportBytesSchema, ExportClipSubjectSchema, ExportDenseRangeSchema, ExportDenseSchema, ExportDownloadSchema, ExportFootageSubjectSchema, ExportOptionsSchema, ExportRecordSchema, ExportSetupFieldSchema, ExportSetupSchema, ExportSpeedSchema, ExportStateSchema, ExportSubjectSchema, ExportTimelapseSchema, ExposedDeviceSchema, ExposureModeSchema, ExpressionBindingSourceSchema, ExpressionEvalError, ExpressionFieldBindingSchema, ExpressionGlobalBindingSchema, ExpressionLiteralBindingSchema, ExpressionParseError, ExpressionSourceSchema, ExtensionCandidateSchema, ExtensionCandidatesSchema, ExtensionSetResultSchema, ExtensionSetSlotInputSchema, ExtensionSlotActivationSchema, ExtensionSlotIdSchema, ExtensionSlotRefInputSchema, ExtensionSlotRowSchema, ExtensionSlotSourceSchema, ExtensionSlotStateSchema, ExtensionSlotUnreachableSchema, ExtensionSlotValueSchema, ExtensionSourceAvailabilitySchema, ExtensionSourceHealthSchema, ExtensionSourceSchema, FEEDER_EXAMPLE_ADDON_ID, FEEDER_EXAMPLE_HA_DEVICE_ID, FFMPEG_PATH_ENV, FIRST_LEVEL_MACRO_CLASSES, FULL_IMAGE_BBOX, FailureContributionSchema, FailureCounters, FailureReasonCountSchema, FanControlStatusSchema, FanDirectionSchema, FeatureManifestSchema, FeatureProbeStatusSchema, FieldClaimModeSchema, FieldClaimSchema, FloodStatusSchema, Fmp4BoxSplitter, FrameHandleFormatSchema, FrameHandleSchema, FrameInputSchema, FrameLazyCountersSchema, FrameLazyMetricsSchema, G711_SCALE_CORRECTION_DB, GasStatusSchema, GetLoggingSettingsInputSchema, GetStreamWithCodecInputSchema, GlobalMetricsSchema, GridLayoutPatchSchema, GridLayoutViewSchema, HAP_AUDIO_BASE, HAP_AUDIO_BITRATE_KBPS, HAP_AUDIO_VBV_KBITS, HAP_KEYFRAME_INTERVAL_SEC, HF_BASE_URL, HF_REPO, HOURS_PER_DAY, HWACCEL_OPTIONS, HealthStatusSchema, HfModelResolutionSchema, HistoryPointSchema, HistoryResolutionEnum, HumidifierStatusSchema, HumiditySensorStatusSchema, HvacModeSchema, INFERENCE_DEVICE_EXCLUSION_REASONS, ImageContractSchema, ImageContractStateSchema, ImageRotateSchema, ImageSettingsOptionsSchema, ImageSettingsPatchSchema, ImageSettingsStatusSchema, ImageStatusSchema, InferenceDeviceExclusionReasonSchema, IngestOwnerSchema, InstalledPackageSchema, IntegrationLiteSchema, IntegrationWithStateSchema, IntercomAbilitySchema, IntercomStatusSchema, KNOWN_CAP_NAMES, KeyEventSchema, LEGACY_READ_ONLY_CONFIG_KEY, LINKED_DEVICES_SLOT, LOAD_CONTRIBUTION_ATTRIBUTIONS, LOAD_CONTRIBUTION_ROLES, LOCATION_DESCRIPTION_MAX, LOCATION_ICON_FALLBACK, LOCATION_ICON_IDS, LOG_CHANNEL_TICK_MS, LOG_LEVEL_RANK, LTS_SCOPE_CLASS_SEPARATOR, LabelAttributionSchema, LabelDefinitionSchema, LabelTierSchema, LawnMowerActivitySchema, LawnMowerControlStatusSchema, LedgerWalkDeviceReportSchema, LedgerWalkInputSchema, LedgerWalkRefusalSchema, LedgerWalkReportSchema, LedgerWalkSkipCountsSchema, LedgerWalkSkipReasonSchema, LegacyStorageLocationDefaultSchema, LinkedDeviceSchema, LinkedDevicesModeSchema, LinkedDevicesSlotValueSchema, LlmDefaultSchema, LlmDefaultSelectorSchema, LlmDownloadProgressSchema, LlmErrorCodeSchema, LlmGenerateBaseInputSchema, LlmGenerateErrSchema, LlmGenerateOkSchema, LlmGenerateResultSchema, LlmImageSchema, LlmNodeModelSchema, LlmProfileKindDescriptorSchema, LlmProfileKindSchema, LlmProfileSchema, LlmRefusalSourceSchema, LlmRetryPolicySchema, LlmRuntimeAppleCompleteInputSchema, LlmRuntimeCancelInputSchema, LlmRuntimeCompleteInputSchema, LlmRuntimeDiskUsageSchema, LlmRuntimeNodeSchema, LlmRuntimeStatusSchema, LlmTimeoutDefaults, LlmUsageRollupSchema, LlmUsageSchema, LoadContributionSchema, LocateSegmentResultSchema, LocationDescriptionAssignmentSchema, LocationIconAssignmentSchema, LocationIconIdSchema, LocationStatSchema, LockControlStatusSchema, LockStateSchema, LogChannelApplyResultSchema, LogChannelDescriptorSchema, LogChannelGate, LogChannelLevelSchema, LogChannelRegistry, LogChannelWindowPatchSchema, LogChannelWindowSchema, LogChannelWindowStateSchema, LogEntrySchema, LogLevelSchema, LogStreamEntrySchema, LoggingEffectiveSchema, LoggingExplicitSchema, LoggingLevelLayerSchema, LoggingLevelSourceSchema, LoggingScopeKindSchema, LoggingSettingsPatchSchema, LoggingSettingsStateSchema, LoginMethodContributionSchema, LoginStageEnum, LtsBucketSchema, MACRO_LABELS, MAX_ARCHIVED_DEBUG_NOTES, MAX_BIRTH_DECISION_RECORDS, MAX_BIRTH_LATENCY_PROXY_MS, MAX_CAMERA_SENSORS, MAX_CLIP_EVENT_IDS, MAX_CLIP_LABELS, MAX_COMPOSITION_CODE_LENGTH, MAX_COMPOSITION_FEATURES, MAX_COMPOSITION_FIELDS_PER_FEATURE, MAX_COMPOSITION_ITEMS, MAX_CONDITION_DEPTH, MAX_CONDITION_LEAVES, MAX_EXPRESSION_AST_NODES, MAX_EXPRESSION_BINDINGS, MAX_EXPRESSION_CALL_ARGS, MAX_EXPRESSION_EVAL_STEPS, MAX_EXPRESSION_SOURCE_LENGTH, MAX_KEYS, MAX_REASONS_PER_KEY, MAX_SENSOR_TRIGGER_DEVICES, MAX_TRACK_DEBUG_NOTE_LEN, MEDIA_OWNER_TYPES, MEDIA_PRESENCE_OWNER_KINDS, METHOD_ACCESS_MAP, METHOD_DEVICE_SELECTORS, MINUTES_PER_DAY, MODEL_FORMATS, MODEL_HOSTING, MODEL_PROVIDER_IDS, MOTION_CLOSE_AFTER_MS, MOTION_SOURCE_LABELS, MOTION_TRIGGER_FEATURE, ManagedModelCatalogEntrySchema, ManagedModelExtraFileSchema, ManagedModelRefSchema, ManagedRuntimeConfigSchema, MaskGridDimsSchema, MaskGridShapeSchema, MaskLineShapeSchema, MaskPointSchema, MaskPolygonShapeSchema, MaskPolygonVerticesSchema, MaskRectShapeSchema, MaskShapeKindSchema, MaskShapeSchema, MediaFileInfoSchema, MediaFileKindEnum, MediaFileRefSchema, MediaFileSchema, MediaPlayerRepeatSchema, MediaPlayerStateSchema, MediaPlayerStatusSchema, MediaPresenceOwnerKindSchema, MediaRelocateModeSchema, MeshPeerSchema, MeshStatusSchema, MethodAccessSchema, MigrateDeviceResultSchema, MigrateSwitchOutcomeSchema, MigrateSwitchReportSchema, ModelCatalogEntrySchema, ModelConvertInputSchema, ModelConvertMetadataSchema, ModelDistributeInputSchema, ModelDistributeResultSchema, ModelExtraFileSchema, ModelFormatEntrySchema, ModelFormatsSchema, ModelLicenseSchema, ModelProviderIdSchema, ModelSubstitutionSchema, ModelVariantGroupSchema, MotionAnalysisResultSchema, MotionEventSchema, MotionOnMotionChangedDataSchema, MotionRegionSchema, MotionSourceEnum, MotionSourcesSchema, MotionStatusSchema, MotionTriggerRuntimeStateSchema, MotionTriggerStatusSchema, MotionTriggeredBySchema, MotionZoneOptionsSchema, MotionZonePatchSchema, MotionZoneRegionSchema, MotionZoneStatusSchema, StatusSchema as MqttBrokerStatusSchema, MutationFilterSchema, NATIVE_LEASE_ACTIVITY_FIELD, NATIVE_LEASE_ACTIVITY_KEY, NATIVE_LEASE_ADMISSION_FIELD, NATIVE_LEASE_ADMISSION_KEY, NATIVE_LEASE_BUDGET_FIELD, NATIVE_LEASE_BUDGET_KEY, NATIVE_LEASE_HOLD_FIELD, NATIVE_LEASE_HOLD_KEY, NATIVE_LEASE_SCENE_BUDGET_FIELD, NATIVE_LEASE_SCENE_BUDGET_KEY, NATIVE_LEASE_SECTION_ID, NATIVE_LEASE_TILE_BUDGET_FIELD, NATIVE_LEASE_TILE_BUDGET_KEY, NAVIGATION_ACTION_CATALOG, NAVIGATION_LIGHT_LEVEL_MAX, NAVIGATION_LIGHT_LEVEL_MIN, NC_ALARM_OPENING_EVENT_KINDS, NC_ALARM_SYSTEM_EVENT_KINDS, NC_AUDIO_CONFIRM_HITS_DEFAULT, NC_AUDIO_CONFIRM_HITS_MAX, NC_AUDIO_CONFIRM_HITS_MIN, NC_AUDIO_CONFIRM_WINDOW_MAX_SEC, NC_AUDIO_CONFIRM_WINDOW_MIN_SEC, NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT, NC_AUDIO_DBFS_FLOOR, NC_AUDIO_DB_MAX, NC_AUDIO_DB_MIN, NC_AUDIO_DB_OFFERED, NC_AUDIO_DB_STEP, NC_AUDIO_DEFAULTS, NC_AUDIO_HIT_PERCENT_MAX, NC_AUDIO_HIT_PERCENT_MIN, NC_AUDIO_SAMPLING_MAX_SEC, NC_AUDIO_SAMPLING_MIN_SEC, NC_AUDIO_SEED, NC_AUTHORABLE_SYSTEM_EVENT_KINDS, NC_BASE_CONDITION_KEYS, NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_CLIP_POST_ROLL_DEFAULT_SEC, NC_CLIP_PRE_ROLL_DEFAULT_SEC, NC_CLIP_RETENTION_MAX_SEC, NC_CONDITION_CATALOG, NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, NC_CONFIRM_DEFAULT_TIMEOUT_MS, NC_CONFIRM_MAX_TIMEOUT_MS, NC_CONFIRM_MIN_TIMEOUT_MS, NC_CONSUMABLE_LOW_PERCENT_DEFAULT, NC_CONSUMABLE_LOW_PERCENT_MAX, NC_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_DEFAULT_SNOOZE_MINUTES, NC_HISTORY_LIMIT_DEFAULT, NC_HISTORY_LIMIT_MAX, NC_MAX_PER_TRACK_IMMEDIATE, NC_OCCUPANCY_DEFAULTS, NC_RULE_CLEARABLE_KEYS, NC_RULE_EDITOR_SECTION_ORDER, NC_RULE_KIND_SPECS, NC_RULE_SECTIONS, NC_SENSOR_RAISED_FIELD_BY_KIND, NC_SENSOR_TRANSITION_KINDS, NC_SENSOR_TRANSITION_NEVER_FIRES_WARNING, NC_SENSOR_TRANSITION_UNSUPPORTED_REASON, NC_SERVER_PACKAGE_NAME, NC_SNOOZE_MAX_MINUTES, NC_SYSTEM_DELIVERY, NC_SYSTEM_EVENT_CONDITION_FILTER_KEYS, NC_SYSTEM_EVENT_FAMILIES, NC_SYSTEM_EVENT_FAMILY, NC_SYSTEM_EVENT_FAMILY_FILTERS, NC_SYSTEM_EVENT_FILTER_KEYS, NC_SYSTEM_EVENT_KIND_GROUP_SPECS, NC_SYSTEM_EVENT_SUMMARY_FAMILIES, NC_SYSTEM_RULE_KINDS, NC_TANK_SYSTEM_EVENT_KINDS, NC_TAXONOMY, NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS, NC_TEMPLATE_VARS, NC_UPDATE_EVENT_PACKAGE_NAMES, NETWORK_LINK_TYPES, NETWORK_LINK_UNKNOWN, NativeCropBboxSchema, NativeCropRefSchema, NativeCropResultSchema, NativeDetectionSchema, NativeLeaseAdmissionSchema, NativeLeaseSettingsSchema, NativeObjectClassEnum, NativeObjectDetectionOptionsSchema, NativeObjectDetectionRuntimeStateSchema, NativeObjectDetectionSettingsPatchSchema, NativeObjectDetectionStatusSchema, NativeObjectGeometryEnum, NavigationActionEntrySchema, NavigationActionIdSchema, NavigationEntryKindSchema, NavigationFeaturesSchema, NavigationLightModeSchema, NavigationModeSchema, NavigationMoveCommandSchema, NavigationPointSchema, NavigationRuntimeStateSchema, NavigationStatusSchema, NcAlarmConfigSchema, NcAlarmModeCoverageSchema, NcAlarmSettingsPatchSchema, NcAlarmSettingsSchema, NcAlarmSkipReasonSchema, NcAlarmSkippedDeviceSchema, NcAudioConditionSchema, NcClipRetentionAskSchema, NcClipRetentionPlanSchema, NcConditionDescriptorSchema, NcConditionsSchema, NcConfirmExpectSchema, NcConfirmSchema, NcCrossingSchema, NcDeliverySchema, NcDeviceStateConditionSchema, NcHistoryEntrySchema, NcHistoryFilterSchema, NcHistoryRecordKindSchema, NcHistoryStatusSchema, NcHistorySubjectSchema, NcLinkedCameraModeSchema, NcMediaFrameSchema, NcMediaPolicySchema, NcOccupancyConditionSchema, NcPlateMatcherSchema, NcRuleActionSchema, NcRuleActionSequenceSchema, NcRuleActionsSchema, NcRuleClearableKeySchema, NcRuleInputSchema, NcRuleKindSchema, NcRuleLastRunSchema, NcRuleLastRunsSchema, NcRuleNotificationButtonSchema, NcRulePatchSchema, NcRuleSchema, NcRuleTargetSchema, NcRuleUpdateInputSchema, NcSceneConditionSchema, NcScheduleSchema, NcScheduleWindowSchema, NcSensorTransitionSchema, NcSnoozeInputSchema, NcSnoozeSchema, NcSnoozeScopeSchema, NcSnoozeSuppressedSchema, NcStateSummaryPreviewSchema, NcStateSummaryPreviewSectionSchema, NcSystemEventConditionSchema, NcSystemEventDeliveryModeSchema, NcSystemEventDeliverySchema, NcSystemEventKindSchema, NcTaxonomyEntrySchema, NcTaxonomySchema, NcTemplateFamilySchema, NcTemplateFieldSchema, NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, NcTemplateVarContextSchema, NcTemplateVarDescriptorSchema, NcTemplateVarGroupSchema, NcTemplateVarKindSchema, NcTestResultSchema, NcThrottleGranularitySchema, NcThrottleSchema, NcZoneConditionSchema, NetworkAccessStatusSchema, NetworkAddressSchema, NetworkEndpointSchema, NetworkLinkStatusSchema, NodeDirectoryEntrySchema, NodeDirectorySchema, NotificationActionIconSchema, NotificationActionSchema, NotificationFormatSchema, NotificationSchema, NotifierStatusSchema, NumericSensorStatusSchema, OPERATOR_WRITTEN_STALE_MS, OPS_LOG_DEFAULT_LIMIT, OPS_LOG_RING_DEFAULT_MAX, OVERFLOW_REASON, OVERLAY_LAYERS, OWNER_ONLY_EVENT_CATEGORIES, OauthIntegrationDescriptorSchema, ObjectEventSchema, OccupancyBurstRefusalSchema, OnboardFieldSupportSchema, OnboardRecordTrackSchema, OnboardScheduleSupportSchema, OnboardStorageSchema, OnboardStorageVolumeSchema, OpsLogDomainSchema, OpsLogEntrySchema, OpsLogOpSchema, OpsLogQueryInputSchema, OpsLogReasonSchema, OrchestratorMetricsSchema, OsdOverlayKindEnum, OsdOverlayPatchSchema, OsdOverlaySchema, OsdPositionEnum, OsdRenderOutcomeEnum, OsdRenderResultSchema, OsdSlotBindingSchema, OsdSlotViewSchema, OsdSourceOptionSchema, OsdSourceSchema, OsdSourceValueTypeEnum, OsdStatusSchema, PEER_BYTES_CHUNK_BYTES, PEER_BYTES_MAX_OUTSTANDING, PEER_BYTES_STALL_MS, PEER_BYTES_TICKET_TTL_MS, PENDING_BLOCK_ID, PET_FEEDER_MANUAL_FEED_MAX, PET_FEEDER_MANUAL_FEED_MIN, PIPELINE_ANALYTICS_CAP_NAME, PIPELINE_FLOW_CAPABILITY_NAMES, PIPELINE_OWNER_CAPABILITY_NAMES, PRIVACY_MASK_CAP_NAME, PROVIDER_KIND_CAP_NAMES, PROVIDER_PIN_FIELD, PYTHON_SCRIPT, PackageUpdateSchema, PackageVersionInfoSchema, ParkRefusalSchema, ParkTrackFrameResultSchema, ParkedFrameKindSchema, ParkedTrackFrameSchema, PasskeyLoginMethodSchema, PasskeySummarySchema, PcmSampleFormatSchema, PeerBytesTicketSchema, PerScopeBreakdownSchema, PetFeederStatusSchema, PickStreamPreferencesSchema, PickStreamRequirementsSchema, PickedCamStreamSchema, PipelineAssignmentSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineRunResultBridge, PipelineStepInputSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, PlaceholderReasonSchema, PolygonPointSchema, PoolMemoryWatchdog, PowerMeterStatusSchema, PresenceStatusSchema, PressureSensorStatusSchema, PrivacyMaskOptionsSchema, PrivacyMaskPatchSchema, PrivacyMaskRegionSchema, PrivacyMaskShapeSchema, PrivacyMaskStatusSchema, ProfileRtspEntrySchema, ProfileSlotSchema, ProfileSlotStatusSchema, ProviderStatusSchema, PtzAutotrackRuntimeStateSchema, PtzAutotrackSettingsSchema, PtzAutotrackStatusSchema, PtzAutotrackTargetOptionSchema, PtzHomePresetSchema, PtzHomeReturnSchema, PtzMoveCommandSchema, PtzOptionsSchema, PtzPositionSchema, PtzPresetFunctionSchema, PtzPresetSchema, PtzStatusSchema, QueryFilterSchema, RATE_CONTROL_RELAXED, RATE_CONTROL_TIGHT, REACHABILITY_FAILURES_TO_OFFLINE, REACHABILITY_POLL_INTERVAL_MS, REACHABILITY_PROBE_TIMEOUT_MS, RECOGNITION_TYPES, RECORDING_AUDIO_TRIGGER_OFFERED_DBFS, RECORDING_EXPORT_MAX_READ_BYTES, RECORDING_SOURCE_CAMSTACK, RECORDING_SOURCE_CAMSTACK_ADDON, RECORDING_TIMELINE_BATCH_MAX, REDACTED_SECRET, RESERVED_BINDING_NAMES, RESERVED_COLLECTION_SOURCES, RESTORED_CAP_NAMES, ROOM_EXAMPLE_MOTION_SOURCES, ROOM_EXAMPLE_TEMPERATURE_SOURCES, ROOM_OCCUPANCY_WINDOW_MS, ROOT_BUCKET_KEY, RUNTIME_DEFAULTS, RUNTIME_STATE_POLICY, RUNTIME_STATE_REFRESH_MISS_COOLDOWN_MS, RUNTIME_TO_FORMAT, RawStateResultSchema, ReadGopBytesResultSchema, ReadSegmentBytesResultSchema, ReadWindowBytesResultSchema, ReadinessRegistry, ReadinessTimeoutError, RebuildObjectEmbeddingsRefusalSchema, RecentTracksPageSchema, RecentTracksQueryInput, RecordTriggerSchema, RecordWindowSchema, RecordingAvailabilityForDeviceSchema, RecordingAvailabilitySchema, RecordingBandAudioSchema, RecordingBandModeSchema, RecordingBandSchema, RecordingBandTriggersSchema, RecordingConfigSchema, RecordingDaysForDeviceSchema, RecordingDaysSchema, RecordingDeviceUsageSchema, RecordingLocationUsageSchema, RecordingManifestSchema, RecordingObjectTriggerClassSchema, RecordingOnboardOptionsSchema, RecordingOnboardPatchSchema, RecordingOnboardStatusSchema, RecordingPlaybackSchema, RecordingRangeSchema, RecordingReadSchema, RecordingRebalanceInputSchema, RecordingRebalanceMoveSchema, RecordingRebalancePlanSchema, RecordingRebalanceSkipReasonSchema, RecordingRebalanceSkipSchema, RecordingRetentionSchema, RecordingSignalRuntimeStateSchema, RecordingSignalStatusSchema, RecordingSourceAvailabilitySchema, RecordingSourceOptionsSchema, RecordingSourceSchema, RecordingStatusSchema, RecordingStorageModeSchema, RecordingStorageUsageSchema, RecordingTriggersSchema, RecordingWeekdaySchema, RedirectLoginMethodSchema, RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, RelocateFootageClassSchema, RelocateFootageInputSchema, RelocateJobSchema, RelocateJobStateSchema, RelocateMediaInputSchema, RelocateResidueInputSchema, RelocateResidueSchema, RenderedAsSchema, ReportMotionInputSchema, ReportedFailureContributionSchema, ReportedLoadContributionSchema, RequestCensusGroupSchema, RequestCensusProcedureSchema, RequestCensusSnapshotSchema, RequestCensusStatusSchema, RetrainAnnotationDraftSchema, RetrainAnnotationKindSchema, RetrainAnnotationSchema, RetrainAnnotationSourceSchema, RetrainAssistResultSchema, RetrainAssistSubjectSchema, RetrainCopyRefusalSchema, RetrainFrameCandidateSchema, RetrainFrameListSchema, RetrainFrameSchema, RetrainFrameSelectionSchema, RetrainMacroClassSchema, RetrainStatusSchema, RetrainTrackSchema, RetrainTransitionResultSchema, RingBuffer, RtpSourceSchema, RtspRestreamEntrySchema, RunnerCameraConfigSchema, RunnerCameraDeviceUIFields, RunnerFrameSourceSchema, RunnerInferenceDeviceSchema, RunnerJumpStepProvisioningSchema, RunnerLocalLoadSchema, RunnerLocalMetricsSchema, SCENE_CONDITIONS, SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, SCENE_DEFAULT_ANCHOR_THRESHOLD, SCENE_DEFAULT_CHECK_INTERVAL_SEC, SCENE_DEFAULT_OBSERVATION_SPACING_SEC, SCENE_DEFAULT_QUIET_SECONDS, SCENE_DEFAULT_UNCOVERED_POLICY, SCENE_DIVERGED, SCENE_RESET_RECAPTURES, SCOPE_PRESETS, SENSOR_FEATURES, SENSOR_MAP, SHARE_VIEW_KINDS, SOURCE_CAPS, SOURCE_CAP_ACTIVE_FIELD, SOURCE_CAP_CHANGED_AT_FIELD, SOURCE_DEVICE_TYPES, SOURCE_INFO_METADATA_KEY, STATIONARY_OVERLAY_STYLE, STORAGE_ACCESS_FALLBACK, STORAGE_BYTES_PER_GB, STORAGE_LOCATION_MODES, STREAM_PROFILE_META, STREAM_QUALITY_LABELS, SUB_DETECTION_TYPES, SYSTEM_CAP_NAMES, SYSTEM_SCOPE_DEVICE_METHODS, SceneCheckSchema, SceneConditionSchema, SceneConfirmSchema, SceneMonitorSchema, SceneMonitorStateSchema, SceneMonitorStatusForDeviceSchema, SceneMonitorStatusSchema, SceneReferenceSchema, SceneUnavailableSchema, SceneUncoveredPolicySchema, SceneVerdictSchema, ScopedTokenSchema, ScopedTokenSummarySchema, ScoredObjectEventSchema, ScriptRunnerStatusSchema, SearchResultSchema, SendEmailInputSchema, SendEmailResultSchema, SendResultSchema, SensorEventSchema, ServerBootModeSchema, ServerPackageStatusSchema, ServerRollbackInfoSchema, ServerUpdateActionResultSchema, ServerUpdateCheckResultSchema, ServerUpdateOutcomeSchema, ServerUpdateStateSchema, SetLoggingSettingsInputSchema, SetSiteLocationInputSchema, SettingsPatchSchema, SettingsRecordSchema, SettingsSchemaWithValuesSchema, SettingsUpdateResultSchema, ShmRingStatsSchema, SiteLocationSchema, SiteLocationSourceSchema, SiteLocationStatusSchema, SiteZoneSchema, SmokeStatusSchema, SmtpStatusSchema, SnapshotImageSchema, SourceInfoSchema, SpatialDetectionSchema, SsoBridgeClaimsSchema, StartEmbeddedInputSchema, StationaryObjectSchema, AbortUploadInputSchema as StorageAbortUploadInputSchema, StorageAccessSchema, BeginDownloadInputSchema as StorageBeginDownloadInputSchema, BeginDownloadResultSchema as StorageBeginDownloadResultSchema, BeginUploadInputSchema as StorageBeginUploadInputSchema, BeginUploadResultSchema as StorageBeginUploadResultSchema, StorageCleanupInputSchema, StorageCleanupJobSchema, StorageCleanupPhaseSchema, StorageCleanupStatusInputSchema, StorageDrainProgressSchema, EndDownloadInputSchema as StorageEndDownloadInputSchema, StorageEvictionPolicySchema, FinalizeUploadInputSchema as StorageFinalizeUploadInputSchema, StorageLocationDeclarationSchema, StorageLocationModeSchema, StorageLocationRefSchema, StorageLocationSchema, StorageLocationTypeSchema, StorageMigrationClassSchema, StorageMigrationDestinationsSchema, StorageMigrationDrainInputSchema, StorageMigrationFindingCodeSchema, StorageMigrationFindingSchema, StorageMigrationFootageMoveInputSchema, StorageMigrationInputSchema, StorageMigrationJobSchema, StorageMigrationLaneSchema, StorageMigrationLeaseInputSchema, StorageMigrationMediaMoveInputSchema, StorageMigrationModeSchema, StorageMigrationMoveProgressSchema, StorageMigrationMoveSchema, StorageMigrationMoverSchema, StorageMigrationParticipantSchema, StorageMigrationPhaseSchema, StorageMigrationPlanSchema, StorageMigrationResidueSchema, StorageMigrationSourcesSchema, StorageOccupancyReportSchema, ProviderInfoSchema as StorageProviderInfoSchema, ReadChunkInputSchema as StorageReadChunkInputSchema, TestLocationResultSchema as StorageTestLocationResultSchema, WriteChunkInputSchema as StorageWriteChunkInputSchema, StreamCodecSchema, StreamFormatSchema, StreamNetworkStatsSchema, StreamParamsOptionsSchema, StreamParamsStatusSchema, StreamProfileConfigSchema, StreamProfileOptionsSchema, StreamProfilePatchSchema, StreamProfileSchema, StreamSignalSchema, StreamSignalsStatusSchema, StreamSourceEntrySchema, StreamSourceSchema, SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, SubscribeFramesInputSchema, SubscribeFramesResultSchema, SwitchStatusSchema, SystemMetricsSchema, SystemMirror, TAXONOMY_COLORS, TIMELAPSE_DENSE_FLOOR_SEC, TIMEZONES, TRANSCODE_DOWN_MAX_BITRATE_KBPS, TRANSCODE_DOWN_MAX_HEIGHT, TamperStatusSchema, TankStatusSchema, TargetKindCapsSchema, TargetKindLevelSchema, TargetKindSchema, TargetSchema, TemperatureSensorStatusSchema, TerminalInstanceInfoSchema, TerminalLegacyCameraSchema, TerminalOutputBatchSchema, TerminalOutputEventSchema, TerminalProfileInfoSchema, TerminalSessionInfoSchema, TestConnectionResultSchema$1 as TestConnectionResultSchema, TestConnectionStatusEnum, TestResultSchema, TimelapseRuleInputSchema, TimelapseRulePatchSchema, TimelapseRuleSchema, TimelapseTemplateSchema, ToastSchema, TokenScopeSchema, TopologyNodeSchema, TopologyProcessSchema, TopologyServiceSchema, TrackCascadeCountsSchema, TrackEnvelopeSchema, TrackFlagsPatchSchema, TrackFlagsSchema, TrackProjectionSchema, TrackSchema, TrackSourceSchema, TrackStateSchema, TrackZoneFilterSchema, TrackedDetectionSchema, TrainingExportDeviceTotalsSchema, TrainingExportSummarySchema, TransportPlaneCountsSchema, TransportPlaneSchema, TurnServerSchema, UNATTRIBUTED_BUCKET_KEY, UNIT_TABLE, BrokerInfoSchema$1 as UnifiedBrokerInfoSchema, UnitConversionError, UnstampedEventMediaCountSchema, UnstampedRowsSchema, UpdateIntegrationInputSchema, UpdateStatusSchema, UpdateUserInputSchema, UserRecordSchema, UserSummarySchema, VECTOR_INDEX_DIM_CONFLICT, VIDEOCLIPS_MAX_OFFER_BYTES, VIDEOCLIPS_MAX_READ_BYTES, VISIT_MERGE_GAP_MS, VacuumControlStatusSchema, VacuumStateSchema, ValveStateSchema, ValveStatusSchema, VectorDeclareIndexInputSchema, VectorDeleteByFilterInputSchema, VectorDeleteInputSchema, VectorDeleteResultSchema, VectorFilterSchema, VectorGetInputSchema, VectorGetResultSchema, VectorItemSchema, VectorMatchSchema, VectorMetadataSchema, VectorMetricSchema, VectorQueryInputSchema, VectorQueryResultSchema, VectorStatsInputSchema, VectorStatsResultSchema, VectorUpsertInputSchema, VectorUpsertResultSchema, VibrationStatusSchema, VideoEncodeSchema, WEBRTC_CLIMB_HOLD_CODES, WEBRTC_EGRESS_PROFILE, WEBRTC_TRY_BLOCKERS, WEEKLY_MASK_LENGTH, WELL_KNOWN_TABS, WELL_KNOWN_TAB_MAP, WaterHeaterStatusSchema, WeatherStatusSchema, WebrtcClimbHoldSchema, WebrtcLadderDecisionSchema, WebrtcSessionDebugSchema, WebrtcStreamChoiceSchema, WebrtcStreamTargetSchema, WebrtcTierFailureSchema, WhiteBalanceModeSchema, WidgetHostEnum, WidgetLoginMethodSchema, WidgetMetadataSchema, WidgetRemoteSchema, WidgetSizeEnum, WrapperActivationReadSchema, WrapperEvidenceSchema, WrapperIdentitySchema, WrapperKindSchema, YAMNET_TO_MACRO, ZoneCrossingDirectionSchema, ZoneCrossingSchema, ZoneKindEnum, ZoneRuleModeEnum, ZoneRuleSchema, ZoneRuleStageEnum, ZoneRulesArraySchema, ZoneSchema, ZoneScopeBreakdownSchema, __resetLogChannelRegistryForTests, accessoriesCapability, accessoryStableId, addonPagesCapability, addonPagesSourceCapability, addonRoutesCapability, addonSettingsCapability, addonWidgetsCapability, addonWidgetsSourceCapability, addonsCapability, adminUiCapability, airQualitySensorCapability, alarmPanelCapability, alertsCapability, ambientLightSensorCapability, asBoolean, asJsonArray, asJsonObject, asNumber, asString, assertTimelapseCadences, audioAnalysisCapability, audioAnalyzerCapability, audioChunkBytesPerSample, audioCodecCapability, audioIsFailClosed, audioKindId, audioLabelChoices, audioMetricsCapability, audioModeOf, audioOrDefaults, audioPlanFromEncodeProfile, audioScaleEraOf, authProviderCapability, autoAssignProfiles, automationControlCapability, backupCapability, bareAddonId, batteryCapability, bestLocationMatch, binaryCapability, bindAddonActions, brightnessCapability, brokerCapability, buildAddonRouteProvider, buildAudioArgs, buildCapabilityLookup, buildDeviceAdminUrl, buildEventKindDescriptor, buildFfmpegArgs, buildInputArgs, buildModelVariantGroups, buildNcTaxonomy, buildRoleScopes, buildStreamParamsConfigSchema, buildVideoArgs, buttonCapability, cameraCredentialsCapability, cameraGridLayoutCapability, cameraPipelineConfigCapability, cameraSensorRefKey, cameraStreamsCapability, canConvertUnit, canonicalEgressPlan, carbonMonoxideCapability, cellsToRects, classifyBearerPrincipal, classifyStream, classifyStreams, climateControlCapability, clipExportFailure, clipExportFailureOf, clipReasonHeaderValue, cloneStatefulExpressionMemory, clusterModelSettingKey, clusterStepSettingFieldsFor, clusterStepSettingKey, codecIsAccepted, collectHydratedFieldEntries, collectHydratedFieldValues, collectSecretConfigKeys, colorCapability, colorForKind, commitWatchdogRestart, compareToTarget, compileExpression, compileExpressionSafe, composeSwitchedOff, composedDeviceRef, composedDeviceStableId, composerCapability, compositionEdges, compositionFeatureEnabled, compositionFieldKey, compositionItemFieldPath, compositionReadKey, compositionSliceKey, compositionSourceKey, compositionSourceRefs, conditionDepth, conditionExclusionReason, conditionVisibleForKind, connectionTestCapability, connectivityCapability, consumableLowPercentOf, consumablesCapability, contactCapability, controlCapability, convertUnit, coreBlockAddonId, coreBlockComposition, coreBlockIdFromAddonId, coreBlockSourceKind, coreBlocksCapability, cosineSimilarity, countConditionLeaves, coverCapability, createDeviceExtensionProvider, createDeviceProxy, createDurableState, createEvent, createEventBusSliceSource, createExpressionScope, createHwAccelCache, createLazyTrpcSource, createLogChannelsProvider, createMirrorSource, createRuntimeStateBridge, createSliceHandle, createStatefulExpressionMemory, createSystemProxy, customAction, customModelRegistryCapability, dataStoreProviderCapability, dayNightCapability, dayOfWeekToIndex, declarationOwnerNodeId, declareLogChannel, decodeVectorBase64, decoderCapability, defaultDeliveryForSection, defaultDeviceFor, defineCustomActions, defineExtensionSlotProvider, deriveBatteryPresence, deriveCameraSwitches, deriveDetailCropRect, deriveRecordingMode, describeCustomActions, describeModelVariant, describeOnboardClamp, describeOnboardRefusal, describeStateField, describeSystemEventDeliveryProblem, describeSystemEventFamilyProblem, describeTopLevelStateFields, detectAccessRole, detectionPipelineCapability, deviceAdminLinkCapability, deviceAdoptionCapability, deviceBackendToFormat, deviceCustomAction, deviceDiscoveryCapability, deviceExportCapability, deviceExtensionCapability, deviceManagerCapability, deviceMatchesProfile, deviceOpsCapability, deviceProviderCapability, deviceSelectorMatches, deviceStateCapability, deviceStatusCapability, displayIconEntry, displayIconsInGroup, doorbellCapability, droppedConditionsForKind, egressTranscodeSharingKey, egressTransportFromRequest, embeddingEncoderCapability, embeddingModelFailedError, embeddingModelFailedOf, embeddingRefusalOf, embeddingRequirementsFailedError, embeddingRequirementsUnavailableError, emitDownForOwnedCaps, emitReadiness, emitsCollectionSelector, encodeProfileFromStreamShape, encodeVectorBase64, enumSensorCapability, enumerateInferenceDevices, enumerateItemArrayFields, enumerateSchemaFields, errMsg, evaluateAst, evaluateCompositionField, evaluateCount, evaluateExpressionSource, evaluatePoolMemory, evaluateRose, evaluateSensorEdge, evaluateSensorLevelEdge, evaluateStatefulExpressionCall, evaluateZoneRules, event, eventEmitterCapability, evictionPolicyForMode, evictionPolicyOfLocation, expandAudioChunkToF32le, expandCapMethods, expandContainer, exportSubjectOf, expressionContainsBuiltinCall, extensionSlotRef, extractNestedAddonId, extractSourceInfoFromMetadata, faceGalleryCapability, failureContributionCapability, failureRate, fanControlCapability, featureFieldEntries, featureProbeCapability, featureSources, feederCustomizationExample, feederExampleSources, ffmpegRate, fieldReads, filesystemBrowseCapability, findCandidateCycles, findCompositionCycles, findTimezone, floodCapability, foldSnapshotByFunction, formatForRuntime, formatMediaOwnerKey, formatMinutes, formatParkedFor, gasCapability, gbToBytes, generateAutomationBlock, getAudioMacroClassIds, getByPath, getCapsByProviderKind, getLogChannelRegistry, getTaxonomyEntry, gifDeriveSpeed, gifFilterComplex, gifFromMp4Args, hasMotionTrigger, hfModelUrl, htmlToText, humidifierCapability, humiditySensorCapability, hydrateSchema, imageCapability, imageSettingsCapability, inferExpressionKinds, inferModelProvider, initialPoolMemoryState, integrationsCapability, intercomCapability, interpretStoredClusterModel, invalidClusterStepModelEntries, invocationFromEncodeProfile, isAgentOnlyPlacement, isArrayOutputSchema, isAudioChunkFormat, isAudioLabelSelected, isAudioRule, isBaseConditionKey, isBatteryPresenceFault, isClusterScopedStep, isCollectionArrayMethod, isDeployableToAgent, isDetectionMacroClass, isDeviceConfigCap, isDeviceScopedCap, isDisplayIconKey, isEmbeddingModelFailed, isEvent, isEventOwnerType, isFirstLevelMacroClass, isHeldBackTemplateVar, isIsolatedBuiltin, isKnownTemplateVar, isLocationEnabled, isMediaOwnerType, isNode, isObjectInput, isOccupancyRule, isOwnerOnlyEventCategory, isRestoredCap, isSameAddonId, isScheduleActive, isSecretConfigField, isSoftwareDecode, isSourceCap, isStatefulBuiltin, isStorageLocationMode, isSystemDelivery, isSystemEventFamily, isSystemEventSummaryRule, isSystemRuleKind, isVectorIndexDimConflict, isVoidInput, ituDbfsFromPreEpoch, jobKindSchema, kebabToCamel, kindOfValue, kindsForDiscriminator, knownValues, lawnMowerControlCapability, legacyAutoLinkIds, legacyModeOf, lifecycleJobSchema, lifecycleJobScopeSchema, lifecycleJobStateSchema, lifecycleTaskSchema, llmCapability, llmRuntimeCapability, loadContributionCapability, localNetworkCapability, locationIconKey, locationSimilarity, lockControlCapability, logBannerArgs, logChannelsCapability, logDestinationCapability, logLevelAtMost, loginMethodCapability, looseSchema, makeProfileBrokerId, makeSourceBrokerId, mapAudioLabelToMacro, markdownToHtmlLite, markdownToText, maskUrlCredentials, mayReadLocation, mayWriteToLocation, mediaPlayerCapability, memoizePinnedFfmpeg, mergeSourceInfo, meshNetworkCapability, method, methodAccessForHttpMethod, metricsProviderCapability, migrateLegacyDeviceSignalConfig, minutesToTimeOfDay, modeMayRead, modeMayWrite, modelConvertCapability, modelDistributorCapability, modelFormatForRuntime, motionCapability, motionDetectionCapability, motionSourceLabel, motionTriggerCapability, motionZonesCapability, mqttBrokerCapability, nativeObjectDetectionCapability, navigationCapability, networkAccessCapability, networkLinkCapability, networkQualityCapability, nodePickerItems, nodePin, nodesCapability, normalizeAddonInitResult, normalizeAudioLabel, normalizeNodeId, normalizeTokenScopes, normalizeUnit, notificationOutputCapability, notificationRulesCapability, notifierCapability, numericSensorCapability, oauthIntegrationCapability, objectInputDeclaresAddonId, objectInputDeclaresRequiredDeviceId, occupancyScope, optionalAncestors, optionalMethod, osdCapability, osdManagerCapability, overlayClusterStepSettings, packagePickerItems, parseAdminBase, parseCameraStreamConfig, parseExpression, parseJsonArray, parseJsonObject, parseJsonUnknown, parseMediaOwnerKey, parseOccupancyScope, parseProcStatus, parseProfileBrokerId, parseRuleSection, parseStreamParamsFormPatch, patchAudio, petFeederCapability, pickAccessoryControl, pickClusterStepModels, pickClusterStepSettings, pickDetailCropConvention, pickInvalidClusterStepModels, pickNativeLeaseOverride, pickPreferredRtspEntry, pickRestartCandidate, pickVideoEncoder, pickerForCondition, pipelineAnalyticsCapability, pipelineExecutorCapability, pipelineOrchestratorCapability, pipelineRunnerCapability, planComposition, planCompositionEvents, planItems, plateGalleryCapability, platformProbeCapability, poolMemoryThreshold, powerMeterCapability, prepareNotification, presenceCapability, pressureSensorCapability, principalMayReachAddon, privacyMaskCapability, procedureAuthKey, ptzAutotrackCapability, ptzCapability, publicEventCategories, pythonScriptForBackend, rankStreams, readClusterStepModels, readClusterStepSettings, readDetailCropConvention, readDeviceStateFrom, readMotionTriggeredBy, readNativeLeaseOverride, readNodePin, readTimelapseGeneratedAt, readinessKey, rebootCapability, recordingArchiveCapability, recordingCapability, recordingExportCapability, recordingOnboardCapability, recordingSignalCapability, rectsToCells, reducePoints, replacedFieldKeys, requiredTopLevelKeys, requiresPython, reservedSourceOwner, resetPoolBaseline, resolveAddonExecution, resolveAddonGroup, resolveAddonPlacement, resolveBucketMs, resolveCapMount, resolveClipSearchMinScore, resolveClusterStepModelId, resolveContainerPrimaryChild, resolveCreateExportSubject, resolveDeviceControlKind, resolveDeviceProfile, resolveEgressDecodeHwAccel, resolveExportProfiles, resolveFormat, resolveHydratedFieldValue, resolveLocationIcon, resolveLocationMode, resolveMethodAuth, resolveMutate, resolvePoolMemoryPolicy, resolveRecordingProfiles, resolveRunnerId, resolveStreamMaps, resolveVariantModelId, resolveViewableDeviceIds, roleSpec, roomCompositionExample, ruleBelongsToAlarm, ruleEditorSectionsForKind, ruleKindOf, ruleKindSpec, ruleMatchesSection, ruleSection, ruleSectionOf, ruleSeedForSection, runInferenceStep, runtimeDevices, runtimeStatePolicyFor, sceneMonitorCapability, scheduleForSendTimes, schemaDeclaresAnyField, scopeInherits, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, scoreRuntimes, scriptRunnerCapability, searchDisplayIcons, selectAssignedProfileSlots, sendTimesOfSchedule, sensorRaisedOf, sensorTransitionNeverFires, sensorTransitionOffered, servedTemplateVars, serverManagementCapability, setByPath, settingsStoreCapability, signalPercentFromBars, signalPercentFromRssi, siteZoneKey, sleep, sleepCancellable, sliceActiveValue, sliceChangedAt, smokeCapability, smtpProviderCapability, snapshotCapability, ssoBridgeCapability, startReachabilityPoll, stateVocabularyFor, stepModelRunsOnFormat, storageCapability, storageEvictableCapability, storageMigrationCapability, storageOccupancyCapability, storageProviderCapability, streamBrokerCapability, streamCatalogCapability, streamParamsCapability, streamPixels, streamQualityLabel, streamSignalsCapability, stripRetiredBandPreBufferSec, strippedOfLegacyReadOnly, subKindsOf, summarisePrivacyAudio, summarizeEffectiveScope, supportedRuntimes, switchCapability, switchedOffIds, synthesizeSourceInfo, systemCapability, systemEventDeliveryProblems, systemEventFamilyOf, systemEventFamilyProblems, systemEventFilterApplies, systemEventFilterAppliesToAnyKind, systemEventKindNamesOf, systemEventKindsOfFamily, systemEventSummaryScheduleOf, systemFamilyOfKind, systemRuleKindOf, tamperCapability, taskLogEntrySchema, taskPhaseSchema, taskTargetSchema, temperatureSensorCapability, templateCarriesSummary, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies, templateVarsFor, terminalSessionCapability, textToHtml, timeOfDayToMinutes, toDeviceSummary, toExpressionValue, toNodeId, toStreamSourceEntry, toastCapability, toggleAudioLabel, tokenize, transcodeBody, tryConvertUnit, turnProviderCapability, unitDimension, unitsForDimension, unreachableExtensionSlotRow, unwrapSchema, updateCapability, userManagementCapability, userPasskeysCapability, vacuumControlCapability, validateComposition, validateExpressionSource, validateRecipeBounds, valveCapability, vectorDimFromBase64, vectorIndexDimConflictError, vectorStoreCapability, vibrationCapability, videoclipsCapability, viewerUiCapability, waterHeaterCapability, weatherCapability, webrtcClientHintsSchema, webrtcSessionCapability, weeklyMaskIndex, weeklyMaskIsUniform, weeklyMaskToWindows, windowsToWeeklyMask, wiringAddonHealthSchema, wiringHealthSnapshotSchema, wiringNodeHealthSchema, wiringProbeKindSchema, wiringProbeResultSchema, withLocationMode, zodEntriesToConfigUI, zoneAnalyticsCapability, zoneRulesCapability, zonesCapability };
68547
+ export { ACCESSORY_LABEL, ACCESS_ROLES, ALEXA_EGRESS_PROFILE, ALL_CAPABILITY_DEFINITIONS, APPLE_SA_TO_MACRO, ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT, AUDIO_ANALYSIS_CAP_NAME, AUDIO_BACKEND_CHOICES, AUDIO_CHUNK_FORMATS, AUDIO_MACRO_LABELS, AUDIO_NOT_CLASSIFIED_REASONS, AUDIO_PRESETS, AUDIO_SCALE_EPOCH_ISO, AUDIO_SCALE_EPOCH_MS, AccessoriesStatusSchema, AccessoryKind, AddBrokerInputSchema, AddonAutoUpdateSchema, AddonListItemSchema, AddonPageDeclarationSchema, AddonPageInfoSchema, AdminLinkTargetEnum, AdoptInputSchema as AdoptionAdoptInputSchema, AdoptResultSchema as AdoptionAdoptResultSchema, AdoptionCandidateResultSchema, AdoptionFilterSchema, GetCandidateInputSchema as AdoptionGetCandidateInputSchema, AdoptionJobSchema, AdoptionJobStateSchema, ListCandidatesInputSchema as AdoptionListCandidatesInputSchema, ListCandidatesOutputSchema as AdoptionListCandidatesOutputSchema, AdoptionOutcomeSchema, ReleaseInputSchema as AdoptionReleaseInputSchema, AdoptionStatusSchema, AgentLoadSummarySchema, AirQualitySensorStatusSchema, AlarmArmModeSchema, AlarmPanelStatusSchema, AlarmStateSchema, AlertSchema, AlertSeveritySchema, AlertSourceSchema, AlertStatusSchema, AmbientLightSensorStatusSchema, AnalyticsLtsSeriesSchema, ApiKeyRecordSchema, ApiKeySummarySchema, AppleFmAvailabilitySchema, AppleFmUnavailableReasonSchema, ArchiveEntrySchema, ArchiveManifestSchema, ArchivedDebugNoteQueryInputSchema, ArchivedDebugNoteSchema, AttachmentMediaTypeSchema, AttachmentSchema, AudioAnalysisResultSchema, AudioAnalysisSettingsSchema, AudioAttachDeviceInputSchema, AudioAttachDeviceResultSchema, AudioChunkFormatSchema, AudioChunkInputSchema, AudioClassSummarySchema, AudioClassificationLabelSchema, AudioClassificationResultSchema, AudioClassifyOutcomeSchema, AudioCodecInfoSchema, AudioDecodeSessionConfigSchema, AudioDetachDeviceResultSchema, AudioEncodeSchema, AudioEncodeSessionConfigSchema, AudioEncodedChunkSchema, AudioEventSchema, AudioLevelSchema, AudioMetricsHistoryPointSchema, AudioMetricsHistorySchema, AudioMetricsSnapshotSchema, AudioPcmChunkSchema, AudioStreamPickSchema, AuthResultSchema, AutoUpdateSettingsSchema, AutomationActionSchema, AutomationConditionOperatorSchema, AutomationConditionSchema, AutomationControlStatusSchema, AutomationRecipeSchema, AutomationTriggerSchema, AvailableIntegrationTypeSchema, BASE_DEVICE_CAPS, BASE_LIVE_EGRESS_PROFILE, BATTERY_DEVICE_PROFILE, BATTERY_UNREACHABLE_AFTER_MS, BIRTH_DECISION_DEFAULT_LIMIT, BOOT_RECOVERY_BACKOFF_MS, BUILTIN_RESULT_KINDS, BackgroundRunRegistry, BacklightModeSchema, BackupDestinationInfoSchema, BackupEntrySchema, BackupRunPhaseSchema, BackupRunSchema, BackupRunStateSchema, BackupTriggerResultSchema, BaseAddon, BaseDevice, BaseDeviceProvider, BatteryStatusSchema, BinaryStatusSchema, BirthDecisionQueryInputSchema, BirthDecisionRecordSchema, BirthDecisionVerdictSchema, BoundingBoxSchema, BrightnessStatusSchema, AddInputSchema as BrokerAddInputSchema, BrokerAudioClientSchema, BrokerClientsSchema, BrokerConnectionDetailsSchema, BrokerConsumerAttributionSchema, BrokerConsumerKindSchema, BrokerDecodedClientSchema, BrokerEncodedClientSchema, GetStateInputSchema as BrokerGetStateInputSchema, BrokerInfoSchema, BrokerProviderInfoSchema, PublishInputSchema as BrokerPublishInputSchema, RegistryStatusSchema as BrokerRegistryStatusSchema, BrokerRtspClientSchema, BrokerStatsSchema, BrokerStatusEnum, BrokerStatusSchema, SubscribeInputSchema as BrokerSubscribeInputSchema, SubscribeResultSchema as BrokerSubscribeResultSchema, TestConnectionResultSchema as BrokerTestConnectionResultSchema, UnsubscribeInputSchema as BrokerUnsubscribeInputSchema, BulkRecordSchema, CAMERA_SENSORS_NOT_LOADED, CAMERA_SENSORS_SETTINGS_KEY, CAMERA_SWITCH_CATALOG, CAMERA_SWITCH_ORDER, CAMERA_TRIGGER, CAM_PROFILE_ORDER, CAPABILITY_NAMES, CAPABILITY_ROUTER_KEYS, CAP_NAMES_WITH_STATUS, CAP_NODE_PIN_CONTEXT_KEY, CAP_PROVIDER_KIND_MAP, CLASS_MAP_MACRO_TARGETS, CLIP_BROKER_PACED_RATES, CLIP_PLAYBACK_OPTIONS, CLIP_REALTIME_SOURCE_RATES, CLIP_REASON_HEADER_MAX, CLIP_SEARCH_STRICTNESS, CLIP_STILL_DISPOSITION_HEADER, CLIP_STILL_REASON_CODE_HEADER, CLIP_STILL_REASON_HEADER, CLIP_STREAM_SOURCE_RATES, CLIP_STREAM_TRANSPORT_HEADER, CLIP_STRICTNESS_FACTOR, CLIP_VECTOR_INDEX_PATTERN, CLUSTER_MODEL_CHOICE_UNREADABLE_REASONS, CLUSTER_MODEL_SCOPED_STEPS, CLUSTER_MODEL_SECTION_ID, CLUSTER_STEP_SETTING_FIELDS, COCO_80_LABELS, COCO_TO_MACRO, COMPOSED_DEVICE_STABLE_ID_PREFIX, COMPOSED_ITEM_FIXED_FIELDS, COMPOSER_ADDON_ID, COMPOSER_RUNNER_ID, COMPOSITION_EVENT_CATEGORY, COMPOSITION_ITEM_ARRAY_PATH, COMPOSITION_ITEM_KEY_RE, CONNECTION_TEST_TIMEOUT_MS, CONTAINER_CHILD_PRIORITY, CORE_BLOCKS_ADDON_ID, CORE_BLOCK_ADDON_PREFIX, CUSTOMIZATION_BLOCK_NAME_PREFIX, CamProfileSchema, CamStreamDescriptorSchema, CamStreamKindSchema, CamStreamResolutionSchema, CameraAssignmentStatusSchema, CameraAudioStatusSchema, CameraBrokerProfileSchema, CameraBrokerStatusSchema, CameraCredentialsSchema, CameraCredentialsStatusSchema, CameraDecoderShmSchema, CameraDecoderStatusSchema, CameraDetectionPhaseSchema, CameraDetectionProvisioningSchema, CameraDetectionProvisioningStateSchema, CameraDetectionStatusSchema, CameraMetricsSchema, CameraMetricsWithDeviceIdSchema, CameraMotionStatusSchema, CameraOccupancySnapshotForDeviceSchema, CameraRecordingModeSchema, CameraRecordingStatusSchema, CameraSensorAttachmentSchema, CameraSensorRefSchema, CameraSensorsConfigSchema, CameraSensorsModeSchema, CameraSensorsNotForwardedSchema, CameraSensorsStatusSchema, CameraSourceStatusSchema, CameraSourceStreamSchema, CameraStatusDegradationReasonSchema, CameraStatusDegradationSchema, CameraStatusSchema, CameraStatusStageSchema, CameraStreamSchema, CameraSwitchAuthoritySchema, CameraSwitchGroupSchema, CameraSwitchIdSchema, CameraSwitchSchema, CameraSwitchUnavailableReasonSchema, CameraSwitchWarningSchema, CandidateQueryFilterSchema, CapScopeSchema, CapabilityBindingsSchema, CarbonMonoxideStatusSchema, ChargingStatus, ClaimOutcomeSchema, ClaimsListingSchema, ClientNetworkStatsSchema, ClimateControlStatusSchema, ClipBytesOfferSchema, ClipBytesSchema, ClipExportFailureSchema, ClipModelMetaSchema, ClipPlaybackOptionsSchema, ClipPlaybackSchema, ClipSchema, ClipSearchStrictnessSchema, ClipSourceAvailabilitySchema, ClipSourceSchema, ClipStillDispositionSchema, ClipStillRefusalCodeSchema, ClipStreamAudioReasonSchema, ClipStreamAudioSchema, ClipStreamDialSchema, ClipWakeSchema, ClusterAddonNodeDeploymentSchema, ClusterAddonStatusEntrySchema, ClusterModelChoiceSchema, CollectionColumnSchema, CollectionIndexSchema, ColorStatusSchema, ComposableCapabilitiesSchema, ComposableCapabilitySchema, ComposableFieldSchema, ComposerApplyInputSchema, ComposerApplyResultSchema, ComposerBlockSchema, ComposerBlockVerdictSchema, ComposerUnreadableBlockSchema, CompositionBindingSchema, CompositionBlockInputSchema, CompositionBlockStateSchema, CompositionCodeSourceSchema, CompositionCommandTargetSchema, CompositionCustomizationReadSchema, CompositionEventPlanSchema, CompositionExistingTargetSchema, CompositionExpressionSourceSchema, CompositionFeatureModeSchema, CompositionFeaturePlanSchema, CompositionFeatureSchema, CompositionFieldItemSchema, CompositionFieldKindSchema, CompositionFieldPlanSchema, CompositionFieldReadSchema, CompositionFieldRoleSchema, CompositionFieldSourceSchema, CompositionFieldStateKindSchema, CompositionFieldStateSchema, CompositionFieldsFeatureSchema, CompositionForwardCommandSchema, CompositionFromSourceSchema, CompositionGetReadSchema, CompositionGraphError, CompositionItemEntrySchema, CompositionListReadSchema, CompositionLiteralBindingSchema, CompositionNewTargetSchema, CompositionPassthroughFeatureSchema, CompositionProblemCodeSchema, CompositionProblemSchema, CompositionRunStatusSchema, CompositionSchema, CompositionSourceRefSchema, CompositionStateReadSchema, CompositionTargetSchema, CompositionUnavailableModeSchema, CompositionValidationSchema, CompositionViewSchema, ConfigEntrySchema, ConfigSectionWithValuesSchema, ConfigTabDeclarationSchema, ConnectionTestDescriptorSchema, ConnectionTestInputSchema, ConnectionTestOutcomeSchema, ConnectivityStatusSchema, ConsumableItemSchema, ConsumableRemainingSchema, ConsumableRemainingUnitSchema, ConsumablesStatusSchema, ContactStatusSchema, ControlKindSchema, ControlStatusSchema, ConvertArtifactSchema, ConvertResultSchema, ConvertTargetSchema, CoreBlockCompileResultSchema, CoreBlockInputSchema, CoreBlockPlacementSchema, CoreBlockSchema, CoreBlockSourceSchema, CoreBlockStatusSchema, CoverStateSchema, CoverStatusSchema, CreateApiKeyInputSchema, CreateApiKeyResultSchema, CreateIntegrationInputSchema, CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, CreateUserInputSchema, CustomActionInputSchema, CustomModelDescriptorSchema, DATAPLANE_SECRET_HEADER, DAYS_PER_WEEK, DAY_NAMES, DECLARED_DEVICE_SWEEP_LIMIT, DECLARED_INTEGRATION_FIXED_KEY, DEFAULT_ADDON_PLACEMENT, DEFAULT_AUDIO_ANALYZER_CONFIG, DEFAULT_CLUSTER_STEP_MODELS, DEFAULT_CLUSTER_STEP_SETTINGS, DEFAULT_DECODER_HWACCEL_CONFIG, DEFAULT_DETAIL_CROP_CONVENTION, DEFAULT_EVENTS_BAND_BUFFER_SEC, DEFAULT_EVENT_COLOR, DEFAULT_FEATURES, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, DEFAULT_MIN_LANDMARK_FACE_SIZE_PX, DEFAULT_NATIVE_LEASE_SETTINGS, DEFAULT_OVERLAY_LAYERS, DEFAULT_POOL_MEMORY_POLICY, DEFAULT_RECORDING_PROFILES, DEFAULT_RETENTION, DEFAULT_RUNTIME_STATE_DURABILITY, DEFAULT_TIMELAPSE_PREVIEW_TEXT, DEFAULT_TOKEN_EXPIRY, DERIVED_CAMERA_SILENCED_CAP_NAMES, DETAIL_CROP_PADDING_FIELD, DETAIL_CROP_PADDING_KEY, DETAIL_CROP_SECTION_ID, DETAIL_CROP_SQUARE_KEY, DETECTION_MACRO_CLASSES, DETECTION_PIPELINE_CAP_NAME, DEVICE_BACKEND_TO_FORMAT, DEVICE_CAP_NAMES, DEVICE_CHILDREN_BATCH_MAX, DEVICE_PROFILES, DEVICE_RESTORE_RETRY_CONCURRENCY, DEVICE_RESTORE_RETRY_DELAYS_MS, DEVICE_SCOPED_CAPS, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATE_READERS, DEVICE_STATUS_METHOD, DEVICE_TYPE_CONTROL_KIND, DEVICE_TYPE_INFO, DISPLAY_ICON_GROUPS, DISPLAY_ICON_KEYS, DISPLAY_ICON_OFFERED_KEYS, DISPLAY_ICON_VOCABULARY, DOORBELL_RISE_DEBOUNCE_MS, DOORBELL_SOURCE_SLOT, EngineInfoSchema as DataStoreEngineInfoSchema, DayNightModeSchema, DayNightOptionsSchema, DayNightSettingsPatchSchema, DayNightStatusSchema, DeclaredDevices, DecodedAudioChunkSchema, DecodedFrameSchema, DecoderSessionConfigSchema, DecoderStatsSchema, DeleteIntegrationResultSchema, DetailCropConventionSchema, DetectionCatalogClassMapSchema, DetectionSourceSchema, DetectionSourcesSchema, DeviceAdminLinkSchema, DeviceCodeSeveritySchema, DeviceConfig, DeviceDiscoveryStatusSchema, ExposeInputSchema as DeviceExportExposeInputSchema, DeviceExportStatusSchema, UnexposeInputSchema as DeviceExportUnexposeInputSchema, DeviceFeature, DeviceInfoSchema, DeviceNetworkStatsSchema, DeviceRestoreRetryScheduler, DeviceRole, DeviceRuntimeState, DeviceSelectorSchema, DeviceStatusSchema, DeviceType, DiagnosticIdSchema, DiagnosticWindowPatchSchema, DiagnosticWindowSchema, DiscoveredChildDeviceSchema, DiscoveredChildStatusSchema, DiscoveredDeviceSchema, DiscoveredTargetSchema, DiskReconcileJobSchema, DisposerChain, DoorbellPressEventSchema, DoorbellSourceSlotValueSchema, DoorbellStatusSchema, EMBEDDING_MODEL_FAILED, EMBEDDING_REQUIREMENTS_FAILED, EMBEDDING_REQUIREMENTS_UNAVAILABLE, EVENTFUL_CAP_NAMES, EVENT_DENSITY_BATCH_MAX, EVENT_KIND_BY_CAP, EVENT_OWNER_TYPES, EVENT_PAD_MS, EVENT_TAXONOMY, EXPORT_DENSE_MAX_RANGES, EXPRESSION_BUILTINS, EXPRESSION_BUILTIN_NAMES, EXPRESSION_COMPILE_CACHE_CAPACITY, EXPRESSION_IDENTIFIER_RE, EXPRESSION_INJECTED_NOW, EXTENSION_HOST_DEVICE_TYPES, EXTENSION_SLOTS, EXTENSION_SLOT_IDS, EXTENSION_SLOT_LISTING_METHOD, EXTENSION_SLOT_REF_SEPARATOR, EffectiveTuningSchema, EgressEncodeSchema, EgressRateControlSchema, EgressTranscodeRequestSchema, EgressTranscodeSchema, ElementConfigStore, EmbeddingFailedModelSchema, EmbeddingFailedRequirementSchema, EmbeddingInfoSchema, EmbeddingRefusalCodeSchema, EmbeddingResultSchema, EmbeddingTowerSchema, EncodeProfileSchema, EncodedPacketSchema, EnrichedWidgetMetadataSchema, EnumSensorDateTimeFormatSchema, EnumSensorStatusSchema, EventCategory, EventDensityBucketSchema, EventDensityForDeviceSchema, EventEmitterStatusSchema, EventFireSchema, EventKindCategorySchema, EventKindDescriptorSchema, EventKindIconSchema, EventKindSchema, EventKindsForDeviceSchema, EventMediaArtifactSchema, EventMediaCoverageSchema, EventMediaKindSchema, EventMediaProductionSchema, EventOwnerTypeSchema, EventSourceType, ExportBytesSchema, ExportClipSubjectSchema, ExportDenseRangeSchema, ExportDenseSchema, ExportDownloadSchema, ExportFootageSubjectSchema, ExportOptionsSchema, ExportRecordSchema, ExportSetupFieldSchema, ExportSetupSchema, ExportSpeedSchema, ExportStateSchema, ExportSubjectSchema, ExportTimelapseSchema, ExposedDeviceSchema, ExposureModeSchema, ExpressionBindingSourceSchema, ExpressionEvalError, ExpressionFieldBindingSchema, ExpressionGlobalBindingSchema, ExpressionLiteralBindingSchema, ExpressionParseError, ExpressionSourceSchema, ExtensionCandidateSchema, ExtensionCandidatesSchema, ExtensionSetResultSchema, ExtensionSetSlotInputSchema, ExtensionSlotActivationSchema, ExtensionSlotIdSchema, ExtensionSlotRefInputSchema, ExtensionSlotRowSchema, ExtensionSlotSourceSchema, ExtensionSlotStateSchema, ExtensionSlotUnreachableSchema, ExtensionSlotValueSchema, ExtensionSourceAvailabilitySchema, ExtensionSourceHealthSchema, ExtensionSourceSchema, FEEDER_EXAMPLE_ADDON_ID, FEEDER_EXAMPLE_HA_DEVICE_ID, FFMPEG_PATH_ENV, FIRST_LEVEL_MACRO_CLASSES, FULL_IMAGE_BBOX, FailureContributionSchema, FailureCounters, FailureReasonCountSchema, FanControlStatusSchema, FanDirectionSchema, FeatureManifestSchema, FeatureProbeStatusSchema, FieldClaimModeSchema, FieldClaimSchema, FloodStatusSchema, Fmp4BoxSplitter, FrameHandleFormatSchema, FrameHandleSchema, FrameInputSchema, FrameLazyCountersSchema, FrameLazyMetricsSchema, G711_SCALE_CORRECTION_DB, GasStatusSchema, GetLoggingSettingsInputSchema, GetStreamWithCodecInputSchema, GlobalMetricsSchema, GridLayoutPatchSchema, GridLayoutViewSchema, HAP_AUDIO_BASE, HAP_AUDIO_BITRATE_KBPS, HAP_AUDIO_VBV_KBITS, HAP_KEYFRAME_INTERVAL_SEC, HF_BASE_URL, HF_REPO, HOURS_PER_DAY, HWACCEL_OPTIONS, HealthStatusSchema, HfModelResolutionSchema, HistoryPointSchema, HistoryResolutionEnum, HumidifierStatusSchema, HumiditySensorStatusSchema, HvacModeSchema, INFERENCE_DEVICE_EXCLUSION_REASONS, ImageContractSchema, ImageContractStateSchema, ImageRotateSchema, ImageSettingsOptionsSchema, ImageSettingsPatchSchema, ImageSettingsStatusSchema, ImageStatusSchema, InferenceDeviceExclusionReasonSchema, IngestOwnerSchema, InstalledPackageSchema, IntegrationLiteSchema, IntegrationWithStateSchema, IntercomAbilitySchema, IntercomStatusSchema, KNOWN_CAP_NAMES, KeyEventSchema, LEGACY_READ_ONLY_CONFIG_KEY, LINKED_DEVICES_SLOT, LOAD_CONTRIBUTION_ATTRIBUTIONS, LOAD_CONTRIBUTION_ROLES, LOCATION_DESCRIPTION_MAX, LOCATION_ICON_FALLBACK, LOCATION_ICON_IDS, LOG_CHANNEL_TICK_MS, LOG_LEVEL_RANK, LTS_SCOPE_CLASS_SEPARATOR, LabelAttributionSchema, LabelDefinitionSchema, LabelTierSchema, LawnMowerActivitySchema, LawnMowerControlStatusSchema, LedgerWalkDeviceReportSchema, LedgerWalkInputSchema, LedgerWalkRefusalSchema, LedgerWalkReportSchema, LedgerWalkSkipCountsSchema, LedgerWalkSkipReasonSchema, LegacyStorageLocationDefaultSchema, LinkedDeviceSchema, LinkedDevicesModeSchema, LinkedDevicesSlotValueSchema, LlmDefaultSchema, LlmDefaultSelectorSchema, LlmDownloadProgressSchema, LlmErrorCodeSchema, LlmGenerateBaseInputSchema, LlmGenerateErrSchema, LlmGenerateOkSchema, LlmGenerateResultSchema, LlmImageSchema, LlmNodeModelSchema, LlmProfileKindDescriptorSchema, LlmProfileKindSchema, LlmProfileSchema, LlmRefusalSourceSchema, LlmRetryPolicySchema, LlmRuntimeAppleCompleteInputSchema, LlmRuntimeCancelInputSchema, LlmRuntimeCompleteInputSchema, LlmRuntimeDiskUsageSchema, LlmRuntimeNodeSchema, LlmRuntimeStatusSchema, LlmTimeoutDefaults, LlmUsageRollupSchema, LlmUsageSchema, LoadContributionSchema, LocateSegmentResultSchema, LocationDescriptionAssignmentSchema, LocationIconAssignmentSchema, LocationIconIdSchema, LocationStatSchema, LockControlStatusSchema, LockStateSchema, LogChannelApplyResultSchema, LogChannelDescriptorSchema, LogChannelGate, LogChannelLevelSchema, LogChannelRegistry, LogChannelWindowPatchSchema, LogChannelWindowSchema, LogChannelWindowStateSchema, LogEntrySchema, LogLevelSchema, LogStreamEntrySchema, LoggingEffectiveSchema, LoggingExplicitSchema, LoggingLevelLayerSchema, LoggingLevelSourceSchema, LoggingScopeKindSchema, LoggingSettingsPatchSchema, LoggingSettingsStateSchema, LoginMethodContributionSchema, LoginStageEnum, LtsBucketSchema, MACRO_LABELS, MAX_ARCHIVED_DEBUG_NOTES, MAX_BIRTH_DECISION_RECORDS, MAX_BIRTH_LATENCY_PROXY_MS, MAX_CAMERA_SENSORS, MAX_CLIP_EVENT_IDS, MAX_CLIP_LABELS, MAX_COMPOSITION_CODE_LENGTH, MAX_COMPOSITION_FEATURES, MAX_COMPOSITION_FIELDS_PER_FEATURE, MAX_COMPOSITION_ITEMS, MAX_CONDITION_DEPTH, MAX_CONDITION_LEAVES, MAX_EXPRESSION_AST_NODES, MAX_EXPRESSION_BINDINGS, MAX_EXPRESSION_CALL_ARGS, MAX_EXPRESSION_EVAL_STEPS, MAX_EXPRESSION_SOURCE_LENGTH, MAX_KEYS, MAX_REASONS_PER_KEY, MAX_SENSOR_TRIGGER_DEVICES, MAX_TRACK_DEBUG_NOTE_LEN, MEDIA_OWNER_TYPES, MEDIA_PRESENCE_OWNER_KINDS, METHOD_ACCESS_MAP, METHOD_DEVICE_SELECTORS, MINUTES_PER_DAY, MODEL_FORMATS, MODEL_HOSTING, MODEL_PROVIDER_IDS, MOTION_CLOSE_AFTER_MS, MOTION_SOURCE_LABELS, MOTION_TRIGGER_FEATURE, ManagedModelCatalogEntrySchema, ManagedModelExtraFileSchema, ManagedModelRefSchema, ManagedRuntimeConfigSchema, MaskGridDimsSchema, MaskGridShapeSchema, MaskLineShapeSchema, MaskPointSchema, MaskPolygonShapeSchema, MaskPolygonVerticesSchema, MaskRectShapeSchema, MaskShapeKindSchema, MaskShapeSchema, MediaFileInfoSchema, MediaFileKindEnum, MediaFileRefSchema, MediaFileSchema, MediaPlayerRepeatSchema, MediaPlayerStateSchema, MediaPlayerStatusSchema, MediaPresenceOwnerKindSchema, MediaRelocateModeSchema, MeshPeerSchema, MeshStatusSchema, MethodAccessSchema, MigrateDeviceResultSchema, MigrateSwitchOutcomeSchema, MigrateSwitchReportSchema, ModelCatalogEntrySchema, ModelConvertInputSchema, ModelConvertMetadataSchema, ModelDistributeInputSchema, ModelDistributeResultSchema, ModelExtraFileSchema, ModelFormatEntrySchema, ModelFormatsSchema, ModelLicenseSchema, ModelProviderIdSchema, ModelSubstitutionSchema, ModelVariantGroupSchema, MotionAnalysisResultSchema, MotionEventSchema, MotionOnMotionChangedDataSchema, MotionRegionSchema, MotionSourceEnum, MotionSourcesSchema, MotionStatusSchema, MotionTriggerRuntimeStateSchema, MotionTriggerStatusSchema, MotionTriggeredBySchema, MotionZoneOptionsSchema, MotionZonePatchSchema, MotionZoneRegionSchema, MotionZoneStatusSchema, StatusSchema as MqttBrokerStatusSchema, MutationFilterSchema, NATIVE_LEASE_ACTIVITY_FIELD, NATIVE_LEASE_ACTIVITY_KEY, NATIVE_LEASE_ADMISSION_FIELD, NATIVE_LEASE_ADMISSION_KEY, NATIVE_LEASE_BUDGET_FIELD, NATIVE_LEASE_BUDGET_KEY, NATIVE_LEASE_HOLD_FIELD, NATIVE_LEASE_HOLD_KEY, NATIVE_LEASE_SCENE_BUDGET_FIELD, NATIVE_LEASE_SCENE_BUDGET_KEY, NATIVE_LEASE_SECTION_ID, NATIVE_LEASE_TILE_BUDGET_FIELD, NATIVE_LEASE_TILE_BUDGET_KEY, NAVIGATION_ACTION_CATALOG, NAVIGATION_LIGHT_LEVEL_MAX, NAVIGATION_LIGHT_LEVEL_MIN, NC_ALARM_OPENING_EVENT_KINDS, NC_ALARM_SYSTEM_EVENT_KINDS, NC_AUDIO_CONFIRM_HITS_DEFAULT, NC_AUDIO_CONFIRM_HITS_MAX, NC_AUDIO_CONFIRM_HITS_MIN, NC_AUDIO_CONFIRM_WINDOW_MAX_SEC, NC_AUDIO_CONFIRM_WINDOW_MIN_SEC, NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT, NC_AUDIO_DBFS_FLOOR, NC_AUDIO_DB_MAX, NC_AUDIO_DB_MIN, NC_AUDIO_DB_OFFERED, NC_AUDIO_DB_STEP, NC_AUDIO_DEFAULTS, NC_AUDIO_HIT_PERCENT_MAX, NC_AUDIO_HIT_PERCENT_MIN, NC_AUDIO_SAMPLING_MAX_SEC, NC_AUDIO_SAMPLING_MIN_SEC, NC_AUDIO_SEED, NC_AUTHORABLE_SYSTEM_EVENT_KINDS, NC_BASE_CONDITION_KEYS, NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_CLIP_POST_ROLL_DEFAULT_SEC, NC_CLIP_PRE_ROLL_DEFAULT_SEC, NC_CLIP_RETENTION_MAX_SEC, NC_CONDITION_CATALOG, NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, NC_CONFIRM_DEFAULT_TIMEOUT_MS, NC_CONFIRM_MAX_TIMEOUT_MS, NC_CONFIRM_MIN_TIMEOUT_MS, NC_CONSUMABLE_LOW_PERCENT_DEFAULT, NC_CONSUMABLE_LOW_PERCENT_MAX, NC_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_DEFAULT_SNOOZE_MINUTES, NC_HISTORY_LIMIT_DEFAULT, NC_HISTORY_LIMIT_MAX, NC_MAX_PER_TRACK_IMMEDIATE, NC_OCCUPANCY_DEFAULTS, NC_RULE_CLEARABLE_KEYS, NC_RULE_EDITOR_SECTION_ORDER, NC_RULE_KIND_SPECS, NC_RULE_SECTIONS, NC_SENSOR_RAISED_FIELD_BY_KIND, NC_SENSOR_TRANSITION_KINDS, NC_SENSOR_TRANSITION_NEVER_FIRES_WARNING, NC_SENSOR_TRANSITION_UNSUPPORTED_REASON, NC_SERVER_PACKAGE_NAME, NC_SNOOZE_MAX_MINUTES, NC_SYSTEM_DELIVERY, NC_SYSTEM_EVENT_CONDITION_FILTER_KEYS, NC_SYSTEM_EVENT_FAMILIES, NC_SYSTEM_EVENT_FAMILY, NC_SYSTEM_EVENT_FAMILY_FILTERS, NC_SYSTEM_EVENT_FILTER_KEYS, NC_SYSTEM_EVENT_KIND_GROUP_SPECS, NC_SYSTEM_EVENT_SUMMARY_FAMILIES, NC_SYSTEM_RULE_KINDS, NC_TANK_SYSTEM_EVENT_KINDS, NC_TAXONOMY, NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS, NC_TEMPLATE_VARS, NC_UPDATE_EVENT_PACKAGE_NAMES, NETWORK_LINK_TYPES, NETWORK_LINK_UNKNOWN, NativeCropBboxSchema, NativeCropRefSchema, NativeCropResultSchema, NativeDetectionSchema, NativeLeaseAdmissionSchema, NativeLeaseSettingsSchema, NativeObjectClassEnum, NativeObjectDetectionOptionsSchema, NativeObjectDetectionRuntimeStateSchema, NativeObjectDetectionSettingsPatchSchema, NativeObjectDetectionStatusSchema, NativeObjectGeometryEnum, NavigationActionEntrySchema, NavigationActionIdSchema, NavigationEntryKindSchema, NavigationFeaturesSchema, NavigationLightModeSchema, NavigationModeSchema, NavigationMoveCommandSchema, NavigationPointSchema, NavigationRuntimeStateSchema, NavigationStatusSchema, NcAlarmConfigSchema, NcAlarmModeCoverageSchema, NcAlarmSettingsPatchSchema, NcAlarmSettingsSchema, NcAlarmSkipReasonSchema, NcAlarmSkippedDeviceSchema, NcAudioConditionSchema, NcClipRetentionAskSchema, NcClipRetentionPlanSchema, NcConditionDescriptorSchema, NcConditionsSchema, NcConfirmExpectSchema, NcConfirmSchema, NcCrossingSchema, NcDeliverySchema, NcDeviceStateConditionSchema, NcHistoryEntrySchema, NcHistoryFilterSchema, NcHistoryRecordKindSchema, NcHistoryStatusSchema, NcHistorySubjectSchema, NcLinkedCameraModeSchema, NcMediaFrameSchema, NcMediaPolicySchema, NcOccupancyConditionSchema, NcPlateMatcherSchema, NcRuleActionSchema, NcRuleActionSequenceSchema, NcRuleActionsSchema, NcRuleClearableKeySchema, NcRuleInputSchema, NcRuleKindSchema, NcRuleLastRunSchema, NcRuleLastRunsSchema, NcRuleNotificationButtonSchema, NcRulePatchSchema, NcRuleSchema, NcRuleTargetSchema, NcRuleUpdateInputSchema, NcSceneConditionSchema, NcScheduleSchema, NcScheduleWindowSchema, NcSensorTransitionSchema, NcSnoozeInputSchema, NcSnoozeSchema, NcSnoozeScopeSchema, NcSnoozeSuppressedSchema, NcStateSummaryPreviewSchema, NcStateSummaryPreviewSectionSchema, NcSystemEventConditionSchema, NcSystemEventDeliveryModeSchema, NcSystemEventDeliverySchema, NcSystemEventKindSchema, NcTaxonomyEntrySchema, NcTaxonomySchema, NcTemplateFamilySchema, NcTemplateFieldSchema, NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, NcTemplateVarContextSchema, NcTemplateVarDescriptorSchema, NcTemplateVarGroupSchema, NcTemplateVarKindSchema, NcTestResultSchema, NcThrottleGranularitySchema, NcThrottleSchema, NcZoneConditionSchema, NetworkAccessStatusSchema, NetworkAddressSchema, NetworkEndpointSchema, NetworkLinkStatusSchema, NodeDirectoryEntrySchema, NodeDirectorySchema, NotificationActionIconSchema, NotificationActionSchema, NotificationFormatSchema, NotificationSchema, NotifierStatusSchema, NumericSensorStatusSchema, OPERATOR_WRITTEN_STALE_MS, OPS_LOG_DEFAULT_LIMIT, OPS_LOG_RING_DEFAULT_MAX, OVERFLOW_REASON, OVERLAY_LAYERS, OWNER_ONLY_EVENT_CATEGORIES, OauthIntegrationDescriptorSchema, ObjectEventSchema, OccupancyBurstRefusalSchema, OnboardFieldSupportSchema, OnboardRecordTrackSchema, OnboardScheduleSupportSchema, OnboardStorageSchema, OnboardStorageVolumeSchema, OpsLogDomainSchema, OpsLogEntrySchema, OpsLogOpSchema, OpsLogQueryInputSchema, OpsLogReasonSchema, OrchestratorMetricsSchema, OsdOverlayKindEnum, OsdOverlayPatchSchema, OsdOverlaySchema, OsdPositionEnum, OsdRenderOutcomeEnum, OsdRenderResultSchema, OsdSlotBindingSchema, OsdSlotViewSchema, OsdSourceOptionSchema, OsdSourceSchema, OsdSourceValueTypeEnum, OsdStatusSchema, PEER_BYTES_CHUNK_BYTES, PEER_BYTES_MAX_OUTSTANDING, PEER_BYTES_STALL_MS, PEER_BYTES_TICKET_TTL_MS, PENDING_BLOCK_ID, PET_FEEDER_MANUAL_FEED_MAX, PET_FEEDER_MANUAL_FEED_MIN, PIPELINE_ANALYTICS_CAP_NAME, PIPELINE_FLOW_CAPABILITY_NAMES, PIPELINE_OWNER_CAPABILITY_NAMES, PRIVACY_MASK_CAP_NAME, PROVIDER_KIND_CAP_NAMES, PROVIDER_PIN_FIELD, PYTHON_SCRIPT, PackageUpdateSchema, PackageVersionInfoSchema, ParkRefusalSchema, ParkTrackFrameResultSchema, ParkedFrameKindSchema, ParkedTrackFrameSchema, PasskeyLoginMethodSchema, PasskeySummarySchema, PcmSampleFormatSchema, PeerBytesTicketSchema, PerScopeBreakdownSchema, PetFeederStatusSchema, PickStreamPreferencesSchema, PickStreamRequirementsSchema, PickedCamStreamSchema, PipelineAssignmentSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineRunResultBridge, PipelineStepInputSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, PlaceholderReasonSchema, PolygonPointSchema, PoolMemoryWatchdog, PowerMeterStatusSchema, PresenceStatusSchema, PressureSensorStatusSchema, PrivacyMaskOptionsSchema, PrivacyMaskPatchSchema, PrivacyMaskRegionSchema, PrivacyMaskShapeSchema, PrivacyMaskStatusSchema, ProfileRtspEntrySchema, ProfileSlotSchema, ProfileSlotStatusSchema, ProviderStatusSchema, PtzAutotrackRuntimeStateSchema, PtzAutotrackSettingsSchema, PtzAutotrackStatusSchema, PtzAutotrackTargetOptionSchema, PtzHomePresetSchema, PtzHomeReturnSchema, PtzMoveCommandSchema, PtzOptionsSchema, PtzPositionSchema, PtzPresetFunctionSchema, PtzPresetSchema, PtzStatusSchema, QueryFilterSchema, RATE_CONTROL_RELAXED, RATE_CONTROL_TIGHT, REACHABILITY_FAILURES_TO_OFFLINE, REACHABILITY_POLL_INTERVAL_MS, REACHABILITY_PROBE_TIMEOUT_MS, RECOGNITION_TYPES, RECORDING_AUDIO_TRIGGER_OFFERED_DBFS, RECORDING_EXPORT_MAX_READ_BYTES, RECORDING_SOURCE_CAMSTACK, RECORDING_SOURCE_CAMSTACK_ADDON, RECORDING_TIMELINE_BATCH_MAX, REDACTED_SECRET, RESERVED_BINDING_NAMES, RESERVED_COLLECTION_SOURCES, RESTORED_CAP_NAMES, ROOM_EXAMPLE_MOTION_SOURCES, ROOM_EXAMPLE_TEMPERATURE_SOURCES, ROOM_OCCUPANCY_WINDOW_MS, ROOT_BUCKET_KEY, RUNTIME_DEFAULTS, RUNTIME_STATE_POLICY, RUNTIME_STATE_REFRESH_MISS_COOLDOWN_MS, RUNTIME_TO_FORMAT, RawStateResultSchema, ReadGopBytesResultSchema, ReadSegmentBytesResultSchema, ReadWindowBytesResultSchema, ReadinessRegistry, ReadinessTimeoutError, RebuildObjectEmbeddingsRefusalSchema, RecentTracksPageSchema, RecentTracksQueryInput, RecordTriggerSchema, RecordWindowSchema, RecordingAvailabilityForDeviceSchema, RecordingAvailabilitySchema, RecordingBandAudioSchema, RecordingBandModeSchema, RecordingBandSchema, RecordingBandTriggersSchema, RecordingConfigSchema, RecordingDaysForDeviceSchema, RecordingDaysSchema, RecordingDeviceUsageSchema, RecordingLocationUsageSchema, RecordingManifestSchema, RecordingObjectTriggerClassSchema, RecordingOnboardOptionsSchema, RecordingOnboardPatchSchema, RecordingOnboardStatusSchema, RecordingPlaybackSchema, RecordingRangeSchema, RecordingReadSchema, RecordingRebalanceInputSchema, RecordingRebalanceMoveSchema, RecordingRebalancePlanSchema, RecordingRebalanceSkipReasonSchema, RecordingRebalanceSkipSchema, RecordingRetentionSchema, RecordingSignalRuntimeStateSchema, RecordingSignalStatusSchema, RecordingSourceAvailabilitySchema, RecordingSourceOptionsSchema, RecordingSourceSchema, RecordingStatusSchema, RecordingStorageModeSchema, RecordingStorageUsageSchema, RecordingTriggersSchema, RecordingWeekdaySchema, RedirectLoginMethodSchema, RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, RelocateFootageClassSchema, RelocateFootageInputSchema, RelocateJobSchema, RelocateJobStateSchema, RelocateMediaInputSchema, RelocateResidueInputSchema, RelocateResidueSchema, RenderedAsSchema, ReportMotionInputSchema, ReportedFailureContributionSchema, ReportedLoadContributionSchema, RequestCensusGroupSchema, RequestCensusProcedureSchema, RequestCensusSnapshotSchema, RequestCensusStatusSchema, RetrainAnnotationDraftSchema, RetrainAnnotationKindSchema, RetrainAnnotationSchema, RetrainAnnotationSourceSchema, RetrainAssistResultSchema, RetrainAssistSubjectSchema, RetrainCopyRefusalSchema, RetrainFrameCandidateSchema, RetrainFrameListSchema, RetrainFrameSchema, RetrainFrameSelectionSchema, RetrainMacroClassSchema, RetrainStatusSchema, RetrainTrackSchema, RetrainTransitionResultSchema, RingBuffer, RtpSourceSchema, RtspRestreamEntrySchema, RunnerCameraConfigSchema, RunnerCameraDeviceUIFields, RunnerFrameSourceSchema, RunnerInferenceDeviceSchema, RunnerJumpStepProvisioningSchema, RunnerLocalLoadSchema, RunnerLocalMetricsSchema, SCENE_CONDITIONS, SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, SCENE_DEFAULT_ANCHOR_THRESHOLD, SCENE_DEFAULT_CHECK_INTERVAL_SEC, SCENE_DEFAULT_OBSERVATION_SPACING_SEC, SCENE_DEFAULT_QUIET_SECONDS, SCENE_DEFAULT_UNCOVERED_POLICY, SCENE_DIVERGED, SCENE_RESET_RECAPTURES, SCOPE_PRESETS, SENSOR_FEATURES, SENSOR_MAP, SHARE_VIEW_KINDS, SOURCE_CAPS, SOURCE_CAP_ACTIVE_FIELD, SOURCE_CAP_CHANGED_AT_FIELD, SOURCE_DEVICE_TYPES, SOURCE_INFO_METADATA_KEY, STATIONARY_OVERLAY_STYLE, STORAGE_ACCESS_FALLBACK, STORAGE_BYTES_PER_GB, STORAGE_LOCATION_MODES, STREAM_PROFILE_META, STREAM_QUALITY_LABELS, SUB_DETECTION_TYPES, SYSTEM_CAP_NAMES, SYSTEM_SCOPE_DEVICE_METHODS, SceneCheckSchema, SceneConditionSchema, SceneConfirmSchema, SceneMonitorSchema, SceneMonitorStateSchema, SceneMonitorStatusForDeviceSchema, SceneMonitorStatusSchema, SceneReferenceSchema, SceneUnavailableSchema, SceneUncoveredPolicySchema, SceneVerdictSchema, ScopedTokenSchema, ScopedTokenSummarySchema, ScoredObjectEventSchema, ScriptRunnerStatusSchema, SearchResultSchema, SendEmailInputSchema, SendEmailResultSchema, SendResultSchema, SensorEventSchema, ServerBootModeSchema, ServerPackageStatusSchema, ServerRollbackInfoSchema, ServerUpdateActionResultSchema, ServerUpdateCheckResultSchema, ServerUpdateOutcomeSchema, ServerUpdateStateSchema, SetCameraSensorsInputSchema, SetLoggingSettingsInputSchema, SetSiteLocationInputSchema, SettingsPatchSchema, SettingsRecordSchema, SettingsSchemaWithValuesSchema, SettingsUpdateResultSchema, ShmRingStatsSchema, SiteLocationSchema, SiteLocationSourceSchema, SiteLocationStatusSchema, SiteZoneSchema, SmokeStatusSchema, SmtpStatusSchema, SnapshotImageSchema, SourceInfoSchema, SpatialDetectionSchema, SsoBridgeClaimsSchema, StartEmbeddedInputSchema, StationaryObjectSchema, AbortUploadInputSchema as StorageAbortUploadInputSchema, StorageAccessSchema, BeginDownloadInputSchema as StorageBeginDownloadInputSchema, BeginDownloadResultSchema as StorageBeginDownloadResultSchema, BeginUploadInputSchema as StorageBeginUploadInputSchema, BeginUploadResultSchema as StorageBeginUploadResultSchema, StorageCleanupInputSchema, StorageCleanupJobSchema, StorageCleanupPhaseSchema, StorageCleanupStatusInputSchema, StorageDrainProgressSchema, EndDownloadInputSchema as StorageEndDownloadInputSchema, StorageEvictionPolicySchema, FinalizeUploadInputSchema as StorageFinalizeUploadInputSchema, StorageLocationDeclarationSchema, StorageLocationModeSchema, StorageLocationRefSchema, StorageLocationSchema, StorageLocationTypeSchema, StorageMigrationClassSchema, StorageMigrationDestinationsSchema, StorageMigrationDrainInputSchema, StorageMigrationFindingCodeSchema, StorageMigrationFindingSchema, StorageMigrationFootageMoveInputSchema, StorageMigrationInputSchema, StorageMigrationJobSchema, StorageMigrationLaneSchema, StorageMigrationLeaseInputSchema, StorageMigrationMediaMoveInputSchema, StorageMigrationModeSchema, StorageMigrationMoveProgressSchema, StorageMigrationMoveSchema, StorageMigrationMoverSchema, StorageMigrationParticipantSchema, StorageMigrationPhaseSchema, StorageMigrationPlanSchema, StorageMigrationResidueSchema, StorageMigrationSourcesSchema, StorageOccupancyReportSchema, ProviderInfoSchema as StorageProviderInfoSchema, ReadChunkInputSchema as StorageReadChunkInputSchema, TestLocationResultSchema as StorageTestLocationResultSchema, WriteChunkInputSchema as StorageWriteChunkInputSchema, StreamCodecSchema, StreamFormatSchema, StreamNetworkStatsSchema, StreamParamsOptionsSchema, StreamParamsStatusSchema, StreamProfileConfigSchema, StreamProfileOptionsSchema, StreamProfilePatchSchema, StreamProfileSchema, StreamSignalSchema, StreamSignalsStatusSchema, StreamSourceEntrySchema, StreamSourceSchema, SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, SubscribeFramesInputSchema, SubscribeFramesResultSchema, SwitchStatusSchema, SystemMetricsSchema, SystemMirror, TAXONOMY_COLORS, TIMELAPSE_DENSE_FLOOR_SEC, TIMEZONES, TRANSCODE_DOWN_MAX_BITRATE_KBPS, TRANSCODE_DOWN_MAX_HEIGHT, TamperStatusSchema, TankStatusSchema, TargetKindCapsSchema, TargetKindLevelSchema, TargetKindSchema, TargetSchema, TemperatureSensorStatusSchema, TerminalInstanceInfoSchema, TerminalLegacyCameraSchema, TerminalOutputBatchSchema, TerminalOutputEventSchema, TerminalProfileInfoSchema, TerminalSessionInfoSchema, TestConnectionResultSchema$1 as TestConnectionResultSchema, TestConnectionStatusEnum, TestResultSchema, TimelapseRuleInputSchema, TimelapseRulePatchSchema, TimelapseRuleSchema, TimelapseTemplateSchema, ToastSchema, TokenScopeSchema, TopologyNodeSchema, TopologyProcessSchema, TopologyServiceSchema, TrackCascadeCountsSchema, TrackEnvelopeSchema, TrackFlagsPatchSchema, TrackFlagsSchema, TrackProjectionSchema, TrackSchema, TrackSourceSchema, TrackStateSchema, TrackZoneFilterSchema, TrackedDetectionSchema, TrainingExportDeviceTotalsSchema, TrainingExportSummarySchema, TransportPlaneCountsSchema, TransportPlaneSchema, TurnServerSchema, UNATTRIBUTED_BUCKET_KEY, UNIT_TABLE, BrokerInfoSchema$1 as UnifiedBrokerInfoSchema, UnitConversionError, UnstampedEventMediaCountSchema, UnstampedRowsSchema, UpdateIntegrationInputSchema, UpdateStatusSchema, UpdateUserInputSchema, UserRecordSchema, UserSummarySchema, VECTOR_INDEX_DIM_CONFLICT, VIDEOCLIPS_MAX_OFFER_BYTES, VIDEOCLIPS_MAX_READ_BYTES, VISIT_MERGE_GAP_MS, VacuumControlStatusSchema, VacuumStateSchema, ValveStateSchema, ValveStatusSchema, VectorDeclareIndexInputSchema, VectorDeleteByFilterInputSchema, VectorDeleteInputSchema, VectorDeleteResultSchema, VectorFilterSchema, VectorGetInputSchema, VectorGetResultSchema, VectorItemSchema, VectorMatchSchema, VectorMetadataSchema, VectorMetricSchema, VectorQueryInputSchema, VectorQueryResultSchema, VectorStatsInputSchema, VectorStatsResultSchema, VectorUpsertInputSchema, VectorUpsertResultSchema, VibrationStatusSchema, VideoEncodeSchema, WEBRTC_CLIMB_HOLD_CODES, WEBRTC_EGRESS_PROFILE, WEBRTC_TRY_BLOCKERS, WEEKLY_MASK_LENGTH, WELL_KNOWN_TABS, WELL_KNOWN_TAB_MAP, WaterHeaterStatusSchema, WeatherStatusSchema, WebrtcClimbHoldSchema, WebrtcLadderDecisionSchema, WebrtcSessionDebugSchema, WebrtcStreamChoiceSchema, WebrtcStreamTargetSchema, WebrtcTierFailureSchema, WhiteBalanceModeSchema, WidgetHostEnum, WidgetLoginMethodSchema, WidgetMetadataSchema, WidgetRemoteSchema, WidgetSizeEnum, WrapperActivationReadSchema, WrapperEvidenceSchema, WrapperIdentitySchema, WrapperKindSchema, YAMNET_TO_MACRO, ZoneCrossingDirectionSchema, ZoneCrossingSchema, ZoneKindEnum, ZoneRuleModeEnum, ZoneRuleSchema, ZoneRuleStageEnum, ZoneRulesArraySchema, ZoneSchema, ZoneScopeBreakdownSchema, __resetLogChannelRegistryForTests, accessoriesCapability, accessoryStableId, addonPagesCapability, addonPagesSourceCapability, addonRoutesCapability, addonSettingsCapability, addonWidgetsCapability, addonWidgetsSourceCapability, addonsCapability, adminUiCapability, airQualitySensorCapability, alarmPanelCapability, alertsCapability, ambientLightSensorCapability, asBoolean, asJsonArray, asJsonObject, asNumber, asString, assertTimelapseCadences, audioAnalysisCapability, audioAnalyzerCapability, audioChunkBytesPerSample, audioCodecCapability, audioIsFailClosed, audioKindId, audioLabelChoices, audioMetricsCapability, audioModeOf, audioOrDefaults, audioPlanFromEncodeProfile, audioScaleEraOf, authProviderCapability, autoAssignProfiles, automationControlCapability, backupCapability, bareAddonId, batteryCapability, bestLocationMatch, binaryCapability, bindAddonActions, brightnessCapability, brokerCapability, buildAddonRouteProvider, buildAudioArgs, buildCapabilityLookup, buildDeviceAdminUrl, buildDoorbellCompositionFeature, buildEventKindDescriptor, buildFfmpegArgs, buildInputArgs, buildModelVariantGroups, buildNcTaxonomy, buildRoleScopes, buildStreamParamsConfigSchema, buildVideoArgs, builtCapabilityBlockers, buttonCapability, cameraCredentialsCapability, cameraGridLayoutCapability, cameraPipelineConfigCapability, cameraSensorRefKey, cameraStreamsCapability, canConvertUnit, canonicalEgressPlan, carbonMonoxideCapability, cellsToRects, classifyBearerPrincipal, classifyStream, classifyStreams, climateControlCapability, clipExportFailure, clipExportFailureOf, clipReasonHeaderValue, cloneStatefulExpressionMemory, clusterModelSettingKey, clusterStepSettingFieldsFor, clusterStepSettingKey, codecIsAccepted, collectHydratedFieldEntries, collectHydratedFieldValues, collectSecretConfigKeys, colorCapability, colorForKind, commitWatchdogRestart, compareToTarget, compileExpression, compileExpressionSafe, composeSwitchedOff, composedDeviceRef, composedDeviceStableId, composerCapability, compositionEdges, compositionFeatureEnabled, compositionFieldKey, compositionItemFieldPath, compositionReadKey, compositionSliceKey, compositionSourceKey, compositionSourceRefs, conditionDepth, conditionExclusionReason, conditionVisibleForKind, connectionTestCapability, connectivityCapability, consumableLowPercentOf, consumablesCapability, contactCapability, controlCapability, convertUnit, coreBlockAddonId, coreBlockComposition, coreBlockIdFromAddonId, coreBlockSourceKind, coreBlocksCapability, cosineSimilarity, countConditionLeaves, coverCapability, createDeviceExtensionProvider, createDeviceProxy, createDurableState, createEvent, createEventBusSliceSource, createExpressionScope, createHwAccelCache, createLazyTrpcSource, createLogChannelsProvider, createMirrorSource, createRuntimeStateBridge, createSliceHandle, createStatefulExpressionMemory, createSystemProxy, customAction, customModelRegistryCapability, dataStoreProviderCapability, dayNightCapability, dayOfWeekToIndex, declarationOwnerNodeId, declareLogChannel, decodeVectorBase64, decoderCapability, defaultDeliveryForSection, defaultDeviceFor, defineCustomActions, defineExtensionSlotProvider, deriveBatteryPresence, deriveCameraSwitches, deriveDetailCropRect, deriveRecordingMode, describeComposableCaps, describeCustomActions, describeModelVariant, describeOnboardClamp, describeOnboardRefusal, describeStateField, describeSystemEventDeliveryProblem, describeSystemEventFamilyProblem, describeTopLevelStateFields, detectAccessRole, detectionPipelineCapability, deviceAdminLinkCapability, deviceAdoptionCapability, deviceBackendToFormat, deviceCustomAction, deviceDiscoveryCapability, deviceExportCapability, deviceExtensionCapability, deviceManagerCapability, deviceMatchesProfile, deviceOpsCapability, deviceProviderCapability, deviceSelectorMatches, deviceStateCapability, deviceStatusCapability, displayIconEntry, displayIconsInGroup, doorbellCapability, doorbellFeatureSources, droppedConditionsForKind, egressTranscodeSharingKey, egressTransportFromRequest, embeddingEncoderCapability, embeddingModelFailedError, embeddingModelFailedOf, embeddingRefusalOf, embeddingRequirementsFailedError, embeddingRequirementsUnavailableError, emitDownForOwnedCaps, emitReadiness, emitsCollectionSelector, encodeProfileFromStreamShape, encodeVectorBase64, enumSensorCapability, enumerateInferenceDevices, enumerateItemArrayFields, enumerateSchemaFields, errMsg, evaluateAst, evaluateCompositionField, evaluateCount, evaluateExpressionSource, evaluatePoolMemory, evaluateRose, evaluateSensorEdge, evaluateSensorLevelEdge, evaluateStatefulExpressionCall, evaluateZoneRules, event, eventEmitterCapability, evictionPolicyForMode, evictionPolicyOfLocation, expandAudioChunkToF32le, expandCapMethods, expandContainer, exportSubjectOf, expressionContainsBuiltinCall, extensionSlotRef, extractNestedAddonId, extractSourceInfoFromMetadata, faceGalleryCapability, failureContributionCapability, failureRate, fanControlCapability, featureFieldEntries, featureProbeCapability, featureSources, feederCustomizationExample, feederExampleSources, ffmpegRate, fieldReads, filesystemBrowseCapability, findCandidateCycles, findCompositionCycles, findTimezone, floodCapability, foldSnapshotByFunction, formatForRuntime, formatMediaOwnerKey, formatMinutes, formatParkedFor, gasCapability, gbToBytes, generateAutomationBlock, getAudioMacroClassIds, getByPath, getCapsByProviderKind, getLogChannelRegistry, getTaxonomyEntry, gifDeriveSpeed, gifFilterComplex, gifFromMp4Args, hasMotionTrigger, hfModelUrl, htmlToText, humidifierCapability, humiditySensorCapability, hydrateSchema, imageCapability, imageSettingsCapability, inferExpressionKinds, inferModelProvider, initialPoolMemoryState, integrationsCapability, intercomCapability, interpretStoredClusterModel, invalidClusterStepModelEntries, invocationFromEncodeProfile, isAgentOnlyPlacement, isArrayOutputSchema, isAudioChunkFormat, isAudioLabelSelected, isAudioRule, isBaseConditionKey, isBatteryPresenceFault, isClusterScopedStep, isCollectionArrayMethod, isDeployableToAgent, isDetectionMacroClass, isDeviceConfigCap, isDeviceScopedCap, isDisplayIconKey, isEmbeddingModelFailed, isEvent, isEventOwnerType, isFirstLevelMacroClass, isHeldBackTemplateVar, isIsolatedBuiltin, isKnownTemplateVar, isLocationEnabled, isMediaOwnerType, isNode, isObjectInput, isOccupancyRule, isOwnerOnlyEventCategory, isRestoredCap, isSameAddonId, isScheduleActive, isSecretConfigField, isSoftwareDecode, isSourceCap, isStatefulBuiltin, isStorageLocationMode, isSystemDelivery, isSystemEventFamily, isSystemEventSummaryRule, isSystemRuleKind, isVectorIndexDimConflict, isVoidInput, ituDbfsFromPreEpoch, jobKindSchema, kebabToCamel, kindOfValue, kindsForDiscriminator, knownValues, lawnMowerControlCapability, legacyAutoLinkIds, legacyModeOf, lifecycleJobSchema, lifecycleJobScopeSchema, lifecycleJobStateSchema, lifecycleTaskSchema, llmCapability, llmRuntimeCapability, loadContributionCapability, localNetworkCapability, locationIconKey, locationSimilarity, lockControlCapability, logBannerArgs, logChannelsCapability, logDestinationCapability, logLevelAtMost, loginMethodCapability, looseSchema, makeProfileBrokerId, makeSourceBrokerId, mapAudioLabelToMacro, markdownToHtmlLite, markdownToText, maskUrlCredentials, mayReadLocation, mayWriteToLocation, mediaPlayerCapability, memoizePinnedFfmpeg, mergeSourceInfo, meshNetworkCapability, method, methodAccessForHttpMethod, metricsProviderCapability, migrateLegacyDeviceSignalConfig, minutesToTimeOfDay, modeMayRead, modeMayWrite, modelConvertCapability, modelDistributorCapability, modelFormatForRuntime, motionCapability, motionDetectionCapability, motionSourceLabel, motionTriggerCapability, motionZonesCapability, mqttBrokerCapability, nativeObjectDetectionCapability, navigationCapability, networkAccessCapability, networkLinkCapability, networkQualityCapability, nodePickerItems, nodePin, nodesCapability, normalizeAddonInitResult, normalizeAudioLabel, normalizeNodeId, normalizeTokenScopes, normalizeUnit, notificationOutputCapability, notificationRulesCapability, notifierCapability, numericSensorCapability, oauthIntegrationCapability, objectInputDeclaresAddonId, objectInputDeclaresRequiredDeviceId, occupancyScope, optionalAncestors, optionalMethod, osdCapability, osdManagerCapability, overlayClusterStepSettings, packagePickerItems, parseAdminBase, parseCameraStreamConfig, parseExpression, parseJsonArray, parseJsonObject, parseJsonUnknown, parseMediaOwnerKey, parseOccupancyScope, parseProcStatus, parseProfileBrokerId, parseRuleSection, parseStreamParamsFormPatch, patchAudio, petFeederCapability, pickAccessoryControl, pickClusterStepModels, pickClusterStepSettings, pickDetailCropConvention, pickInvalidClusterStepModels, pickNativeLeaseOverride, pickPreferredRtspEntry, pickRestartCandidate, pickVideoEncoder, pickerForCondition, pipelineAnalyticsCapability, pipelineExecutorCapability, pipelineOrchestratorCapability, pipelineRunnerCapability, planComposition, planCompositionEvents, planItems, plateGalleryCapability, platformProbeCapability, poolMemoryThreshold, powerMeterCapability, prepareNotification, presenceCapability, pressureSensorCapability, principalMayReachAddon, privacyMaskCapability, procedureAuthKey, ptzAutotrackCapability, ptzCapability, publicEventCategories, pythonScriptForBackend, rankStreams, readClusterStepModels, readClusterStepSettings, readDetailCropConvention, readDeviceStateFrom, readMotionTriggeredBy, readNativeLeaseOverride, readNodePin, readTimelapseGeneratedAt, readinessKey, rebootCapability, recordingArchiveCapability, recordingCapability, recordingExportCapability, recordingOnboardCapability, recordingSignalCapability, rectsToCells, reducePoints, replacedFieldKeys, requiredTopLevelKeys, requiresPython, reservedSourceOwner, resetPoolBaseline, resolveAddonExecution, resolveAddonGroup, resolveAddonPlacement, resolveBucketMs, resolveCapMount, resolveClipSearchMinScore, resolveClusterStepModelId, resolveContainerPrimaryChild, resolveCreateExportSubject, resolveDeviceControlKind, resolveDeviceProfile, resolveEgressDecodeHwAccel, resolveExportProfiles, resolveFormat, resolveHydratedFieldValue, resolveLocationIcon, resolveLocationMode, resolveMethodAuth, resolveMutate, resolvePoolMemoryPolicy, resolveRecordingProfiles, resolveRunnerId, resolveStreamMaps, resolveVariantModelId, resolveViewableDeviceIds, roleSpec, roomCompositionExample, ruleBelongsToAlarm, ruleEditorSectionsForKind, ruleKindOf, ruleKindSpec, ruleMatchesSection, ruleSection, ruleSectionOf, ruleSeedForSection, runInferenceStep, runtimeDevices, runtimeStatePolicyFor, sceneMonitorCapability, scheduleForSendTimes, schemaDeclaresAnyField, scopeInherits, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, scoreRuntimes, scriptRunnerCapability, searchDisplayIcons, selectAssignedProfileSlots, sendTimesOfSchedule, sensorRaisedOf, sensorTransitionNeverFires, sensorTransitionOffered, servedTemplateVars, serverManagementCapability, setByPath, settingsStoreCapability, signalPercentFromBars, signalPercentFromRssi, siteZoneKey, sleep, sleepCancellable, sliceActiveValue, sliceChangedAt, smokeCapability, smtpProviderCapability, snapshotCapability, ssoBridgeCapability, startReachabilityPoll, stateVocabularyFor, stepModelRunsOnFormat, storageCapability, storageEvictableCapability, storageMigrationCapability, storageOccupancyCapability, storageProviderCapability, streamBrokerCapability, streamCatalogCapability, streamParamsCapability, streamPixels, streamQualityLabel, streamSignalsCapability, stripRetiredBandPreBufferSec, strippedOfLegacyReadOnly, subKindsOf, summarisePrivacyAudio, summarizeEffectiveScope, supportedRuntimes, switchCapability, switchedOffIds, synthesizeSourceInfo, systemCapability, systemEventDeliveryProblems, systemEventFamilyOf, systemEventFamilyProblems, systemEventFilterApplies, systemEventFilterAppliesToAnyKind, systemEventKindNamesOf, systemEventKindsOfFamily, systemEventSummaryScheduleOf, systemFamilyOfKind, systemRuleKindOf, tamperCapability, taskLogEntrySchema, taskPhaseSchema, taskTargetSchema, temperatureSensorCapability, templateCarriesSummary, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies, templateVarsFor, terminalSessionCapability, textToHtml, timeOfDayToMinutes, toDeviceSummary, toExpressionValue, toNodeId, toStreamSourceEntry, toastCapability, toggleAudioLabel, tokenize, transcodeBody, tryConvertUnit, turnProviderCapability, unitDimension, unitsForDimension, unreachableExtensionSlotRow, unwrapSchema, updateCapability, userManagementCapability, userPasskeysCapability, vacuumControlCapability, validateComposition, validateExpressionSource, validateRecipeBounds, valveCapability, vectorDimFromBase64, vectorIndexDimConflictError, vectorStoreCapability, vibrationCapability, videoclipsCapability, viewerUiCapability, waterHeaterCapability, weatherCapability, webrtcClientHintsSchema, webrtcSessionCapability, weeklyMaskIndex, weeklyMaskIsUniform, weeklyMaskToWindows, windowsToWeeklyMask, wiringAddonHealthSchema, wiringHealthSnapshotSchema, wiringNodeHealthSchema, wiringProbeKindSchema, wiringProbeResultSchema, withLocationMode, zodEntriesToConfigUI, zoneAnalyticsCapability, zoneRulesCapability, zonesCapability };