@camstack/types 1.2.267 → 1.2.268
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/addon.js +4 -4
- package/dist/addon.mjs +3 -3
- package/dist/capabilities/battery.cap.d.ts +17 -2
- package/dist/capabilities/capability-definition.d.ts +22 -0
- package/dist/capabilities/composer.cap.d.ts +99 -0
- package/dist/capabilities/consumables.cap.d.ts +79 -0
- package/dist/capabilities/core-blocks.cap.d.ts +1149 -91
- package/dist/capabilities/device-extension.cap.d.ts +12 -13
- package/dist/capabilities/device-state.cap.d.ts +186 -2
- package/dist/capabilities/index.d.ts +3 -3
- package/dist/composition/composition-graph.d.ts +42 -9
- package/dist/composition/composition-items.d.ts +25 -0
- package/dist/composition/composition-report.d.ts +93 -2
- package/dist/composition/composition.d.ts +154 -3
- package/dist/composition/customization-name.d.ts +6 -0
- package/dist/composition/evaluate-field.d.ts +12 -0
- package/dist/composition/examples.d.ts +33 -0
- package/dist/composition/field-kinds.d.ts +42 -0
- package/dist/composition/index.d.ts +1 -0
- package/dist/composition/plan-result.d.ts +16 -0
- package/dist/composition/state-fields.d.ts +6 -0
- package/dist/composition/validate-composition.d.ts +44 -9
- package/dist/composition-CPFIlFfw.mjs +1759 -0
- package/dist/composition-QlOB7QTG.js +2184 -0
- package/dist/device/device-context.d.ts +9 -0
- package/dist/device/device-runtime-state.d.ts +15 -1
- package/dist/device/index.d.ts +1 -1
- package/dist/device-extension/slot-descriptor.d.ts +8 -11
- package/dist/device-extension/slot-provider.d.ts +0 -2
- package/dist/enums/event-category.d.ts +25 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/err-msg-DX6i_MY4.mjs +339 -0
- package/dist/err-msg-Dx2Kor0g.js +368 -0
- package/dist/{event-category-BVDXG4tB.mjs → event-category-C5xZWqz6.mjs} +31 -1
- package/dist/{event-category-BVfsrBYA.js → event-category-MbnB-6AN.js} +48 -0
- package/dist/generated/addon-api.d.ts +42 -0
- package/dist/generated/device-proxy.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/system-proxy.d.ts +2 -2
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1513 -1656
- package/dist/index.mjs +1208 -1384
- package/dist/interfaces/kernel-abstractions.d.ts +16 -0
- package/dist/interfaces/status-overlay.d.ts +42 -0
- package/dist/node.d.ts +1 -0
- package/dist/node.js +29 -8
- package/dist/node.mjs +23 -3
- package/dist/{sleep-8K9gue-H.js → sleep-BSzia-xT.js} +6 -352
- package/dist/{sleep-DC-wdyeS.mjs → sleep-jkRQgtSc.mjs} +7 -329
- package/package.json +1 -1
- package/dist/canonical-hash-CPK2Dy60.mjs +0 -715
- package/dist/canonical-hash-CSE4ioRi.js +0 -792
- package/dist/err-msg-COpsHMw2.js +0 -18
- package/dist/err-msg-IQTHeDzc.mjs +0 -13
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { t as EventCategory } from "./event-category-
|
|
3
|
-
import { a as
|
|
1
|
+
import { $ as CamProfileSchema, A as DEVICE_STATUS_METHOD, At as normalizeAddonInitResult, B as nodePin, Bt as hydrateSchema, C as customAction, Ct as PEER_BYTES_STALL_MS, D as adminUiCapability, Dt as SHARE_VIEW_KINDS, E as deviceCustomAction, Et as DATAPLANE_SECRET_HEADER, F as method, Ft as isEvent, G as emitDownForOwnedCaps, Gt as isAudioChunkFormat, H as toNodeId, Ht as AUDIO_CHUNK_FORMATS, I as optionalMethod, It as WELL_KNOWN_TABS, J as AudioChunkFormatSchema, K as readinessKey, L as resolveCapMount, Lt as WELL_KNOWN_TAB_MAP, M as event, Mt as createDurableState, N as expandCapMethods, Nt as createEvent, O as DEFAULT_RUNTIME_STATE_DURABILITY, Ot as DisposerChain, P as isDeviceConfigCap, Pt as emitReadiness, Q as CAM_PROFILE_ORDER, R as systemMethod, Rt as collectHydratedFieldEntries, S as DEVICE_CHILDREN_BATCH_MAX, St as PEER_BYTES_MAX_OUTSTANDING, T as describeCustomActions, Tt as PeerBytesTicketSchema, U as ReadinessRegistry, Ut as audioChunkBytesPerSample, V as readNodePin, Vt as resolveHydratedFieldValue, W as ReadinessTimeoutError, Wt as expandAudioChunkToF32le, X as BrokerStatsSchema, Y as AudioStreamPickSchema, Z as BrokerStatusSchema, _ as createMirrorSource, _t as makeProfileBrokerId, a as asJsonObject, at as EncodedPacketSchema, b as deviceOpsCapability, bt as selectAssignedProfileSlots, c as parseJsonArray, ct as ProfileRtspEntrySchema, d as BOOT_RECOVERY_BACKOFF_MS, dt as StreamSourceEntrySchema, et as CamStreamKindSchema, f as DEVICE_SCOPED_CAPS, ft as StreamSourceSchema, g as createLazyTrpcSource, gt as SubscribeFramesResultSchema, h as createEventBusSliceSource, ht as SubscribeFramesInputSchema, i as asJsonArray, it as DecodedFrameSchema, j as PROVIDER_PIN_FIELD, jt as normalizeNodeId, k as DEVICE_SETTINGS_CONTRIBUTION_METHODS, kt as BaseAddon, l as parseJsonObject, lt as ProfileSlotSchema, m as createDeviceProxy, mt as SubscribeAudioChunksResultSchema, n as sleepCancellable, nt as CameraStreamSchema, o as asNumber, ot as FrameHandleFormatSchema, p as isDeviceScopedCap, pt as SubscribeAudioChunksInputSchema, q as scopeKey, r as asBoolean, rt as DecodedAudioChunkSchema, s as asString, st as FrameHandleSchema, t as sleep, tt as CamStreamResolutionSchema, u as parseJsonUnknown, ut as ProfileSlotStatusSchema, v as createSliceHandle, vt as makeSourceBrokerId, w as defineCustomActions, wt as PEER_BYTES_TICKET_TTL_MS, x as viewerUiCapability, xt as PEER_BYTES_CHUNK_BYTES, y as RawStateResultSchema, yt as parseProfileBrokerId, z as CAP_NODE_PIN_CONTEXT_KEY, zt as collectHydratedFieldValues } from "./sleep-jkRQgtSc.mjs";
|
|
2
|
+
import { i as publicEventCategories, n as OWNER_ONLY_EVENT_CATEGORIES, r as isOwnerOnlyEventCategory, t as EventCategory } from "./event-category-C5xZWqz6.mjs";
|
|
3
|
+
import { $ as MAX_EXPRESSION_SOURCE_LENGTH, A as compositionItemFieldPath, B as validateExpressionSource, C as CompositionTargetSchema, D as MAX_COMPOSITION_ITEMS, E as MAX_COMPOSITION_FIELDS_PER_FEATURE, F as featureSources, G as parseExpression, H as evaluateAst, I as fieldReads, J as EXPRESSION_IDENTIFIER_RE, K as tokenize, L as EXPRESSION_INJECTED_NOW, M as compositionSliceKey, N as compositionSourceKey, O as composedDeviceRef, P as featureFieldEntries, Q as MAX_EXPRESSION_EVAL_STEPS, R as evaluateExpressionSource, S as CompositionSourceRefSchema, T as MAX_COMPOSITION_FEATURES, U as compileExpression, V as createExpressionScope, W as compileExpressionSafe, X as MAX_EXPRESSION_BINDINGS, Y as MAX_EXPRESSION_AST_NODES, Z as MAX_EXPRESSION_CALL_ARGS, _ as CompositionItemEntrySchema, _t as resolveStreamMaps, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, at as canonicalHash, b as CompositionPassthroughFeatureSchema, c as CompositionCommandTargetSchema, ct as audioPlanFromEncodeProfile, d as CompositionFeatureSchema, dt as buildInputArgs, et as RESERVED_BINDING_NAMES, f as CompositionFieldReadSchema, ft as buildVideoArgs, g as CompositionFromSourceSchema, gt as pickVideoEncoder, h as CompositionForwardCommandSchema, ht as logBannerArgs, i as COMPOSITION_ITEM_KEY_RE, it as ExpressionParseError, j as compositionReadKey, k as composedDeviceStableId, l as CompositionExistingTargetSchema, lt as buildAudioArgs, m as CompositionFieldsFeatureSchema, mt as isSoftwareDecode, n as COMPOSER_ADDON_ID, nt as EXPRESSION_BUILTIN_NAMES, o as CompositionBindingSchema, ot as Fmp4BoxSplitter, p as CompositionFieldSourceSchema, pt as invocationFromEncodeProfile, q as EXPRESSION_COMPILE_CACHE_CAPACITY, r as COMPOSITION_ITEM_ARRAY_PATH, rt as ExpressionEvalError, s as CompositionCodeSourceSchema, st as AUDIO_PRESETS, t as COMPOSED_DEVICE_STABLE_ID_PREFIX, tt as EXPRESSION_BUILTINS, u as CompositionExpressionSourceSchema, ut as buildFfmpegArgs, v as CompositionLiteralBindingSchema, w as MAX_COMPOSITION_CODE_LENGTH, x as CompositionSchema, y as CompositionNewTargetSchema, z as toExpressionValue } from "./composition-CPFIlFfw.mjs";
|
|
4
|
+
import { a as DeviceType, i as DeviceRole, n as ChargingStatus, r as DeviceFeature, t as errMsg } from "./err-msg-DX6i_MY4.mjs";
|
|
4
5
|
import { EventSourceType } from "./enums.mjs";
|
|
5
|
-
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/media/media-owner-key.ts
|
|
8
8
|
/**
|
|
@@ -5530,809 +5530,6 @@ function principalMayReachAddon(input) {
|
|
|
5530
5530
|
};
|
|
5531
5531
|
}
|
|
5532
5532
|
//#endregion
|
|
5533
|
-
//#region src/expression/errors.ts
|
|
5534
|
-
/**
|
|
5535
|
-
* Error types for the safe expression engine. Two distinct classes so callers
|
|
5536
|
-
* can tell a compile-time (grammar) failure from a runtime (evaluation)
|
|
5537
|
-
* failure — both are non-fatal to the host: read paths degrade to "skip link".
|
|
5538
|
-
*/
|
|
5539
|
-
/** Thrown by the tokenizer / parser. Carries a 0-based source `position` when
|
|
5540
|
-
* the failure is anchored to a character (author-facing inline feedback). */
|
|
5541
|
-
var ExpressionParseError = class extends Error {
|
|
5542
|
-
position;
|
|
5543
|
-
constructor(message, position) {
|
|
5544
|
-
super(message);
|
|
5545
|
-
this.name = "ExpressionParseError";
|
|
5546
|
-
this.position = position;
|
|
5547
|
-
}
|
|
5548
|
-
};
|
|
5549
|
-
/** Thrown by the evaluator (unknown identifier, type mismatch, non-finite
|
|
5550
|
-
* result, unknown builtin, step-budget exceeded). */
|
|
5551
|
-
var ExpressionEvalError = class extends Error {
|
|
5552
|
-
constructor(message) {
|
|
5553
|
-
super(message);
|
|
5554
|
-
this.name = "ExpressionEvalError";
|
|
5555
|
-
}
|
|
5556
|
-
};
|
|
5557
|
-
//#endregion
|
|
5558
|
-
//#region src/expression/builtins.ts
|
|
5559
|
-
function asFiniteNumber(value, name, index) {
|
|
5560
|
-
if (typeof value !== "number" || !Number.isFinite(value)) throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a finite number`);
|
|
5561
|
-
return value;
|
|
5562
|
-
}
|
|
5563
|
-
function asString$1(value, name, index) {
|
|
5564
|
-
if (typeof value !== "string") throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a string`);
|
|
5565
|
-
return value;
|
|
5566
|
-
}
|
|
5567
|
-
function finiteResult(value, name) {
|
|
5568
|
-
if (!Number.isFinite(value)) throw new ExpressionEvalError(`${name}: produced a non-finite result`);
|
|
5569
|
-
return value;
|
|
5570
|
-
}
|
|
5571
|
-
function allFiniteNumbers(args, name) {
|
|
5572
|
-
return args.map((a, idx) => asFiniteNumber(a, name, idx));
|
|
5573
|
-
}
|
|
5574
|
-
function asBoolean$1(value, name, index) {
|
|
5575
|
-
if (typeof value !== "boolean") throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a boolean`);
|
|
5576
|
-
return value;
|
|
5577
|
-
}
|
|
5578
|
-
var INF = Number.POSITIVE_INFINITY;
|
|
5579
|
-
var table = {
|
|
5580
|
-
min: {
|
|
5581
|
-
minArgs: 1,
|
|
5582
|
-
maxArgs: INF,
|
|
5583
|
-
apply: (args) => finiteResult(Math.min(...allFiniteNumbers(args, "min")), "min")
|
|
5584
|
-
},
|
|
5585
|
-
max: {
|
|
5586
|
-
minArgs: 1,
|
|
5587
|
-
maxArgs: INF,
|
|
5588
|
-
apply: (args) => finiteResult(Math.max(...allFiniteNumbers(args, "max")), "max")
|
|
5589
|
-
},
|
|
5590
|
-
abs: {
|
|
5591
|
-
minArgs: 1,
|
|
5592
|
-
maxArgs: 1,
|
|
5593
|
-
apply: (args) => finiteResult(Math.abs(asFiniteNumber(args[0], "abs", 0)), "abs")
|
|
5594
|
-
},
|
|
5595
|
-
floor: {
|
|
5596
|
-
minArgs: 1,
|
|
5597
|
-
maxArgs: 1,
|
|
5598
|
-
apply: (args) => finiteResult(Math.floor(asFiniteNumber(args[0], "floor", 0)), "floor")
|
|
5599
|
-
},
|
|
5600
|
-
ceil: {
|
|
5601
|
-
minArgs: 1,
|
|
5602
|
-
maxArgs: 1,
|
|
5603
|
-
apply: (args) => finiteResult(Math.ceil(asFiniteNumber(args[0], "ceil", 0)), "ceil")
|
|
5604
|
-
},
|
|
5605
|
-
sqrt: {
|
|
5606
|
-
minArgs: 1,
|
|
5607
|
-
maxArgs: 1,
|
|
5608
|
-
apply: (args) => finiteResult(Math.sqrt(asFiniteNumber(args[0], "sqrt", 0)), "sqrt")
|
|
5609
|
-
},
|
|
5610
|
-
round: {
|
|
5611
|
-
minArgs: 1,
|
|
5612
|
-
maxArgs: 2,
|
|
5613
|
-
apply: (args) => {
|
|
5614
|
-
const x = asFiniteNumber(args[0], "round", 0);
|
|
5615
|
-
const digits = args.length > 1 ? Math.trunc(asFiniteNumber(args[1], "round", 1)) : 0;
|
|
5616
|
-
if (digits < 0 || digits > 100) throw new ExpressionEvalError("round: digits must be between 0 and 100");
|
|
5617
|
-
const factor = 10 ** digits;
|
|
5618
|
-
return finiteResult(Math.round(x * factor) / factor, "round");
|
|
5619
|
-
}
|
|
5620
|
-
},
|
|
5621
|
-
pow: {
|
|
5622
|
-
minArgs: 2,
|
|
5623
|
-
maxArgs: 2,
|
|
5624
|
-
apply: (args) => finiteResult(asFiniteNumber(args[0], "pow", 0) ** asFiniteNumber(args[1], "pow", 1), "pow")
|
|
5625
|
-
},
|
|
5626
|
-
clamp: {
|
|
5627
|
-
minArgs: 3,
|
|
5628
|
-
maxArgs: 3,
|
|
5629
|
-
apply: (args) => {
|
|
5630
|
-
const x = asFiniteNumber(args[0], "clamp", 0);
|
|
5631
|
-
const lo = asFiniteNumber(args[1], "clamp", 1);
|
|
5632
|
-
const hi = asFiniteNumber(args[2], "clamp", 2);
|
|
5633
|
-
if (lo > hi) throw new ExpressionEvalError("clamp: lower bound is greater than upper bound");
|
|
5634
|
-
return finiteResult(Math.min(hi, Math.max(lo, x)), "clamp");
|
|
5635
|
-
}
|
|
5636
|
-
},
|
|
5637
|
-
avg: {
|
|
5638
|
-
minArgs: 1,
|
|
5639
|
-
maxArgs: INF,
|
|
5640
|
-
apply: (args) => {
|
|
5641
|
-
const nums = allFiniteNumbers(args, "avg");
|
|
5642
|
-
return finiteResult(nums.reduce((acc, v) => acc + v, 0) / nums.length, "avg");
|
|
5643
|
-
}
|
|
5644
|
-
},
|
|
5645
|
-
sum: {
|
|
5646
|
-
minArgs: 1,
|
|
5647
|
-
maxArgs: INF,
|
|
5648
|
-
apply: (args) => finiteResult(allFiniteNumbers(args, "sum").reduce((acc, v) => acc + v, 0), "sum")
|
|
5649
|
-
},
|
|
5650
|
-
coalesce: {
|
|
5651
|
-
minArgs: 1,
|
|
5652
|
-
maxArgs: INF,
|
|
5653
|
-
apply: (args) => {
|
|
5654
|
-
for (const a of args) if (a !== null) return a;
|
|
5655
|
-
return null;
|
|
5656
|
-
}
|
|
5657
|
-
},
|
|
5658
|
-
age: {
|
|
5659
|
-
minArgs: 2,
|
|
5660
|
-
maxArgs: 2,
|
|
5661
|
-
apply: (args) => finiteResult(asFiniteNumber(args[0], "age", 0) - asFiniteNumber(args[1], "age", 1), "age")
|
|
5662
|
-
},
|
|
5663
|
-
convert: {
|
|
5664
|
-
minArgs: 3,
|
|
5665
|
-
maxArgs: 3,
|
|
5666
|
-
apply: (args, hooks) => {
|
|
5667
|
-
const x = asFiniteNumber(args[0], "convert", 0);
|
|
5668
|
-
const from = asString$1(args[1], "convert", 1).trim();
|
|
5669
|
-
const to = asString$1(args[2], "convert", 2).trim();
|
|
5670
|
-
if (hooks.convert) {
|
|
5671
|
-
const out = hooks.convert(x, from, to);
|
|
5672
|
-
if (out === null) throw new ExpressionEvalError(`convert: cannot convert '${from}' to '${to}'`);
|
|
5673
|
-
return finiteResult(out, "convert");
|
|
5674
|
-
}
|
|
5675
|
-
if (from === to) return x;
|
|
5676
|
-
throw new ExpressionEvalError("convert: unit conversion table not installed");
|
|
5677
|
-
}
|
|
5678
|
-
},
|
|
5679
|
-
any: {
|
|
5680
|
-
minArgs: 1,
|
|
5681
|
-
maxArgs: INF,
|
|
5682
|
-
apply: (args) => args.map((a, i) => asBoolean$1(a, "any", i)).some((b) => b)
|
|
5683
|
-
},
|
|
5684
|
-
all: {
|
|
5685
|
-
minArgs: 1,
|
|
5686
|
-
maxArgs: INF,
|
|
5687
|
-
apply: (args) => args.map((a, i) => asBoolean$1(a, "all", i)).every((b) => b)
|
|
5688
|
-
},
|
|
5689
|
-
within: {
|
|
5690
|
-
minArgs: 2,
|
|
5691
|
-
maxArgs: 2,
|
|
5692
|
-
apply: (args, hooks) => {
|
|
5693
|
-
const windowMs = asFiniteNumber(args[1], "within", 1);
|
|
5694
|
-
if (windowMs < 0) throw new ExpressionEvalError("within: the window must not be negative");
|
|
5695
|
-
const at = args[0];
|
|
5696
|
-
if (at === null) return false;
|
|
5697
|
-
const ts = asFiniteNumber(at, "within", 0);
|
|
5698
|
-
const now = hooks.now;
|
|
5699
|
-
if (now === void 0 || !Number.isFinite(now)) throw new ExpressionEvalError("within: no clock was supplied to this evaluation");
|
|
5700
|
-
const inside = now - ts <= windowMs;
|
|
5701
|
-
if (inside) hooks.noteDeadline?.(ts + windowMs + 1);
|
|
5702
|
-
return inside;
|
|
5703
|
-
}
|
|
5704
|
-
},
|
|
5705
|
-
latest: {
|
|
5706
|
-
minArgs: 1,
|
|
5707
|
-
maxArgs: INF,
|
|
5708
|
-
apply: (args) => {
|
|
5709
|
-
const present = args.flatMap((a, i) => a === null ? [] : [asFiniteNumber(a, "latest", i)]);
|
|
5710
|
-
return present.length === 0 ? null : finiteResult(Math.max(...present), "latest");
|
|
5711
|
-
}
|
|
5712
|
-
}
|
|
5713
|
-
};
|
|
5714
|
-
/** Frozen, null-prototype builtin table. */
|
|
5715
|
-
var EXPRESSION_BUILTINS = Object.freeze(Object.assign(Object.create(null), table));
|
|
5716
|
-
/** The set of valid builtin names — used by the parser to reject unknown
|
|
5717
|
-
* callees at parse time (immediate author feedback). */
|
|
5718
|
-
var EXPRESSION_BUILTIN_NAMES = new Set(Object.keys(table));
|
|
5719
|
-
//#endregion
|
|
5720
|
-
//#region src/expression/limits.ts
|
|
5721
|
-
/**
|
|
5722
|
-
* Resource-bound constants for the safe expression engine.
|
|
5723
|
-
*
|
|
5724
|
-
* Every bound is defense-in-depth: the grammar is non-Turing-complete (no
|
|
5725
|
-
* loops, recursion, lambdas or member access — see `ast.ts`), so evaluation is
|
|
5726
|
-
* O(nodeCount) by construction. These caps merely put a hard ceiling on the
|
|
5727
|
-
* work a single author-supplied expression can request, so a hostile or
|
|
5728
|
-
* accidental pathological string can never spend unbounded CPU/memory.
|
|
5729
|
-
*/
|
|
5730
|
-
/** Max source length (chars) — checked BEFORE tokenizing so a huge string is
|
|
5731
|
-
* rejected without allocation. */
|
|
5732
|
-
var MAX_EXPRESSION_SOURCE_LENGTH = 2048;
|
|
5733
|
-
/** Max AST nodes — checked during parse; a deeply nested grouping that exceeds
|
|
5734
|
-
* this is rejected as "expression too complex". */
|
|
5735
|
-
var MAX_EXPRESSION_AST_NODES = 256;
|
|
5736
|
-
/** Defense-in-depth walker step budget — one increment per node visit during
|
|
5737
|
-
* evaluation. The grammar guarantees O(nodeCount) walks, so this can only trip
|
|
5738
|
-
* on a crafted maximum-size AST. */
|
|
5739
|
-
var MAX_EXPRESSION_EVAL_STEPS = 4096;
|
|
5740
|
-
/** Max named bindings on one {@link ExpressionSource}. */
|
|
5741
|
-
var MAX_EXPRESSION_BINDINGS = 32;
|
|
5742
|
-
/** Max positional arguments to any builtin call. */
|
|
5743
|
-
var MAX_EXPRESSION_CALL_ARGS = 16;
|
|
5744
|
-
/** LRU compile-cache capacity (parsed ASTs keyed by raw source string). */
|
|
5745
|
-
var EXPRESSION_COMPILE_CACHE_CAPACITY = 256;
|
|
5746
|
-
/** A legal binding / identifier name. */
|
|
5747
|
-
var EXPRESSION_IDENTIFIER_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
5748
|
-
/** Binding names an author may NOT use: `now` is auto-injected; the literal
|
|
5749
|
-
* keywords lex as values, not identifiers, so binding to them is meaningless. */
|
|
5750
|
-
var RESERVED_BINDING_NAMES = new Set([
|
|
5751
|
-
"now",
|
|
5752
|
-
"true",
|
|
5753
|
-
"false",
|
|
5754
|
-
"null"
|
|
5755
|
-
]);
|
|
5756
|
-
//#endregion
|
|
5757
|
-
//#region src/expression/tokenizer.ts
|
|
5758
|
-
/**
|
|
5759
|
-
* Tokenizer for the safe expression mini-language. Hand-rolled, single-pass,
|
|
5760
|
-
* zero-dependency. The grammar is deliberately boring: decimal numbers,
|
|
5761
|
-
* single/double-quoted strings with a tiny escape set, identifiers, the three
|
|
5762
|
-
* value keywords (`true`/`false`/`null`) and a fixed punctuator set. Anything
|
|
5763
|
-
* outside that — a bare `.`, `=`, `[`, `]`, `{`, `}`, `;`, backtick, `&`, `|` —
|
|
5764
|
-
* is a parse error with a source position, so member access / assignment /
|
|
5765
|
-
* template literals are lexically impossible.
|
|
5766
|
-
*/
|
|
5767
|
-
var KEYWORDS = new Set([
|
|
5768
|
-
"true",
|
|
5769
|
-
"false",
|
|
5770
|
-
"null"
|
|
5771
|
-
]);
|
|
5772
|
-
function isDigit(ch) {
|
|
5773
|
-
return ch >= "0" && ch <= "9";
|
|
5774
|
-
}
|
|
5775
|
-
function isIdentStart(ch) {
|
|
5776
|
-
return ch >= "A" && ch <= "Z" || ch >= "a" && ch <= "z" || ch === "_";
|
|
5777
|
-
}
|
|
5778
|
-
function isIdentPart(ch) {
|
|
5779
|
-
return isIdentStart(ch) || isDigit(ch);
|
|
5780
|
-
}
|
|
5781
|
-
function isWhitespace(ch) {
|
|
5782
|
-
return ch === " " || ch === " " || ch === "\n" || ch === "\r" || ch === "\f" || ch === "\v";
|
|
5783
|
-
}
|
|
5784
|
-
/** Tokenize `source` into a flat token list ending with a single `eof` token.
|
|
5785
|
-
* Throws `ExpressionParseError` on any illegal character or unterminated
|
|
5786
|
-
* string. */
|
|
5787
|
-
function tokenize(source) {
|
|
5788
|
-
if (source.length > 2048) throw new ExpressionParseError(`expression too long (${source.length} > ${MAX_EXPRESSION_SOURCE_LENGTH} chars)`, 0);
|
|
5789
|
-
const tokens = [];
|
|
5790
|
-
let i = 0;
|
|
5791
|
-
const n = source.length;
|
|
5792
|
-
while (i < n) {
|
|
5793
|
-
const ch = source[i];
|
|
5794
|
-
if (isWhitespace(ch)) {
|
|
5795
|
-
i += 1;
|
|
5796
|
-
continue;
|
|
5797
|
-
}
|
|
5798
|
-
if (isDigit(ch)) {
|
|
5799
|
-
const start = i;
|
|
5800
|
-
while (i < n && isDigit(source[i])) i += 1;
|
|
5801
|
-
if (i < n && source[i] === ".") {
|
|
5802
|
-
if (i + 1 >= n || !isDigit(source[i + 1])) throw new ExpressionParseError("malformed number: decimal point needs a digit", i);
|
|
5803
|
-
i += 1;
|
|
5804
|
-
while (i < n && isDigit(source[i])) i += 1;
|
|
5805
|
-
}
|
|
5806
|
-
const text = source.slice(start, i);
|
|
5807
|
-
const value = Number(text);
|
|
5808
|
-
if (!Number.isFinite(value)) throw new ExpressionParseError(`malformed number: '${text}'`, start);
|
|
5809
|
-
tokens.push({
|
|
5810
|
-
type: "number",
|
|
5811
|
-
value,
|
|
5812
|
-
pos: start
|
|
5813
|
-
});
|
|
5814
|
-
continue;
|
|
5815
|
-
}
|
|
5816
|
-
if (ch === "'" || ch === "\"") {
|
|
5817
|
-
const quote = ch;
|
|
5818
|
-
const start = i;
|
|
5819
|
-
i += 1;
|
|
5820
|
-
let out = "";
|
|
5821
|
-
let closed = false;
|
|
5822
|
-
while (i < n) {
|
|
5823
|
-
const c = source[i];
|
|
5824
|
-
if (c === "\\") {
|
|
5825
|
-
const next = i + 1 < n ? source[i + 1] : "";
|
|
5826
|
-
if (next === "\\" || next === "'" || next === "\"") {
|
|
5827
|
-
out += next;
|
|
5828
|
-
i += 2;
|
|
5829
|
-
continue;
|
|
5830
|
-
}
|
|
5831
|
-
throw new ExpressionParseError(`invalid string escape: '\\${next}'`, i);
|
|
5832
|
-
}
|
|
5833
|
-
if (c === quote) {
|
|
5834
|
-
closed = true;
|
|
5835
|
-
i += 1;
|
|
5836
|
-
break;
|
|
5837
|
-
}
|
|
5838
|
-
out += c;
|
|
5839
|
-
i += 1;
|
|
5840
|
-
}
|
|
5841
|
-
if (!closed) throw new ExpressionParseError("unterminated string literal", start);
|
|
5842
|
-
tokens.push({
|
|
5843
|
-
type: "string",
|
|
5844
|
-
value: out,
|
|
5845
|
-
pos: start
|
|
5846
|
-
});
|
|
5847
|
-
continue;
|
|
5848
|
-
}
|
|
5849
|
-
if (isIdentStart(ch)) {
|
|
5850
|
-
const start = i;
|
|
5851
|
-
while (i < n && isIdentPart(source[i])) i += 1;
|
|
5852
|
-
const text = source.slice(start, i);
|
|
5853
|
-
if (KEYWORDS.has(text)) tokens.push({
|
|
5854
|
-
type: "keyword",
|
|
5855
|
-
keyword: keywordOf(text),
|
|
5856
|
-
pos: start
|
|
5857
|
-
});
|
|
5858
|
-
else tokens.push({
|
|
5859
|
-
type: "identifier",
|
|
5860
|
-
name: text,
|
|
5861
|
-
pos: start
|
|
5862
|
-
});
|
|
5863
|
-
continue;
|
|
5864
|
-
}
|
|
5865
|
-
const two = i + 1 < n ? source.slice(i, i + 2) : "";
|
|
5866
|
-
if (two === "<=" || two === ">=" || two === "==" || two === "!=" || two === "&&" || two === "||") {
|
|
5867
|
-
tokens.push({
|
|
5868
|
-
type: "punct",
|
|
5869
|
-
punct: two,
|
|
5870
|
-
pos: i
|
|
5871
|
-
});
|
|
5872
|
-
i += 2;
|
|
5873
|
-
continue;
|
|
5874
|
-
}
|
|
5875
|
-
if (isSinglePunct(ch)) {
|
|
5876
|
-
tokens.push({
|
|
5877
|
-
type: "punct",
|
|
5878
|
-
punct: ch,
|
|
5879
|
-
pos: i
|
|
5880
|
-
});
|
|
5881
|
-
i += 1;
|
|
5882
|
-
continue;
|
|
5883
|
-
}
|
|
5884
|
-
throw new ExpressionParseError(`unexpected character '${ch}'`, i);
|
|
5885
|
-
}
|
|
5886
|
-
tokens.push({
|
|
5887
|
-
type: "eof",
|
|
5888
|
-
pos: n
|
|
5889
|
-
});
|
|
5890
|
-
return tokens;
|
|
5891
|
-
}
|
|
5892
|
-
function keywordOf(text) {
|
|
5893
|
-
if (text === "true") return "true";
|
|
5894
|
-
if (text === "false") return "false";
|
|
5895
|
-
return "null";
|
|
5896
|
-
}
|
|
5897
|
-
function isSinglePunct(ch) {
|
|
5898
|
-
return ch === "(" || ch === ")" || ch === "," || ch === "?" || ch === ":" || ch === "+" || ch === "-" || ch === "*" || ch === "/" || ch === "%" || ch === "!" || ch === "<" || ch === ">";
|
|
5899
|
-
}
|
|
5900
|
-
//#endregion
|
|
5901
|
-
//#region src/expression/parser.ts
|
|
5902
|
-
/**
|
|
5903
|
-
* Pratt (precedence-climbing) parser for the safe expression mini-language.
|
|
5904
|
-
*
|
|
5905
|
-
* Precedence (low → high): ternary `?:` (right-assoc) → `||` → `&&` → equality
|
|
5906
|
-
* → relational → additive → multiplicative → unary `! -` → call / primary.
|
|
5907
|
-
* Calls are ONLY `IDENT '(' args? ')'` at primary position — the callee is a
|
|
5908
|
-
* string validated against the builtin table at parse time, so an unknown
|
|
5909
|
-
* function is rejected immediately (author feedback) and a persisted expression
|
|
5910
|
-
* that references a since-removed builtin degrades at read.
|
|
5911
|
-
*
|
|
5912
|
-
* A node counter caps total AST size (`MAX_EXPRESSION_AST_NODES`) and call
|
|
5913
|
-
* arity is capped (`MAX_EXPRESSION_CALL_ARGS`) — both raise `ExpressionParseError`.
|
|
5914
|
-
*/
|
|
5915
|
-
/** Binary/logical operator precedence (higher binds tighter). */
|
|
5916
|
-
var BINARY_PRECEDENCE = {
|
|
5917
|
-
"||": 1,
|
|
5918
|
-
"&&": 2,
|
|
5919
|
-
"==": 3,
|
|
5920
|
-
"!=": 3,
|
|
5921
|
-
"<": 4,
|
|
5922
|
-
"<=": 4,
|
|
5923
|
-
">": 4,
|
|
5924
|
-
">=": 4,
|
|
5925
|
-
"+": 5,
|
|
5926
|
-
"-": 5,
|
|
5927
|
-
"*": 6,
|
|
5928
|
-
"/": 6,
|
|
5929
|
-
"%": 6
|
|
5930
|
-
};
|
|
5931
|
-
function isLogicalOp(op) {
|
|
5932
|
-
return op === "&&" || op === "||";
|
|
5933
|
-
}
|
|
5934
|
-
function isBinaryOp(op) {
|
|
5935
|
-
return op === "+" || op === "-" || op === "*" || op === "/" || op === "%" || op === "==" || op === "!=" || op === "<" || op === "<=" || op === ">" || op === ">=";
|
|
5936
|
-
}
|
|
5937
|
-
var Parser = class {
|
|
5938
|
-
tokens;
|
|
5939
|
-
pos = 0;
|
|
5940
|
-
nodeCount = 0;
|
|
5941
|
-
identifiers = /* @__PURE__ */ new Set();
|
|
5942
|
-
callees = /* @__PURE__ */ new Set();
|
|
5943
|
-
constructor(tokens) {
|
|
5944
|
-
this.tokens = tokens;
|
|
5945
|
-
}
|
|
5946
|
-
parse() {
|
|
5947
|
-
const ast = this.parseTernary();
|
|
5948
|
-
const tok = this.peek();
|
|
5949
|
-
if (tok.type !== "eof") throw new ExpressionParseError("unexpected trailing input", tok.pos);
|
|
5950
|
-
return {
|
|
5951
|
-
ast,
|
|
5952
|
-
identifiers: this.identifiers,
|
|
5953
|
-
callees: this.callees,
|
|
5954
|
-
nodeCount: this.nodeCount
|
|
5955
|
-
};
|
|
5956
|
-
}
|
|
5957
|
-
peek() {
|
|
5958
|
-
return this.tokens[this.pos];
|
|
5959
|
-
}
|
|
5960
|
-
next() {
|
|
5961
|
-
return this.tokens[this.pos++];
|
|
5962
|
-
}
|
|
5963
|
-
/** Consume a punctuator token, erroring if the next token isn't it. */
|
|
5964
|
-
expectPunct(punct) {
|
|
5965
|
-
const tok = this.peek();
|
|
5966
|
-
if (tok.type !== "punct" || tok.punct !== punct) throw new ExpressionParseError(`expected '${punct}'`, tok.pos);
|
|
5967
|
-
this.pos += 1;
|
|
5968
|
-
}
|
|
5969
|
-
matchPunct(punct) {
|
|
5970
|
-
const tok = this.peek();
|
|
5971
|
-
if (tok.type === "punct" && tok.punct === punct) {
|
|
5972
|
-
this.pos += 1;
|
|
5973
|
-
return true;
|
|
5974
|
-
}
|
|
5975
|
-
return false;
|
|
5976
|
-
}
|
|
5977
|
-
countNode() {
|
|
5978
|
-
this.nodeCount += 1;
|
|
5979
|
-
if (this.nodeCount > 256) throw new ExpressionParseError("expression too complex", this.peek().pos);
|
|
5980
|
-
}
|
|
5981
|
-
parseTernary() {
|
|
5982
|
-
const test = this.parseBinary(1);
|
|
5983
|
-
if (this.matchPunct("?")) {
|
|
5984
|
-
const consequent = this.parseTernary();
|
|
5985
|
-
this.expectPunct(":");
|
|
5986
|
-
const alternate = this.parseTernary();
|
|
5987
|
-
this.countNode();
|
|
5988
|
-
return {
|
|
5989
|
-
kind: "conditional",
|
|
5990
|
-
test,
|
|
5991
|
-
consequent,
|
|
5992
|
-
alternate
|
|
5993
|
-
};
|
|
5994
|
-
}
|
|
5995
|
-
return test;
|
|
5996
|
-
}
|
|
5997
|
-
parseBinary(minPrec) {
|
|
5998
|
-
let left = this.parseUnary();
|
|
5999
|
-
for (;;) {
|
|
6000
|
-
const tok = this.peek();
|
|
6001
|
-
if (tok.type !== "punct") break;
|
|
6002
|
-
const prec = BINARY_PRECEDENCE[tok.punct];
|
|
6003
|
-
if (prec === void 0 || prec < minPrec) break;
|
|
6004
|
-
const op = tok.punct;
|
|
6005
|
-
this.pos += 1;
|
|
6006
|
-
const right = this.parseBinary(prec + 1);
|
|
6007
|
-
this.countNode();
|
|
6008
|
-
if (isLogicalOp(op)) left = {
|
|
6009
|
-
kind: "logical",
|
|
6010
|
-
op,
|
|
6011
|
-
left,
|
|
6012
|
-
right
|
|
6013
|
-
};
|
|
6014
|
-
else if (isBinaryOp(op)) left = {
|
|
6015
|
-
kind: "binary",
|
|
6016
|
-
op,
|
|
6017
|
-
left,
|
|
6018
|
-
right
|
|
6019
|
-
};
|
|
6020
|
-
else throw new ExpressionParseError(`unexpected operator '${op}'`, tok.pos);
|
|
6021
|
-
}
|
|
6022
|
-
return left;
|
|
6023
|
-
}
|
|
6024
|
-
parseUnary() {
|
|
6025
|
-
const tok = this.peek();
|
|
6026
|
-
if (tok.type === "punct" && (tok.punct === "!" || tok.punct === "-")) {
|
|
6027
|
-
const op = tok.punct;
|
|
6028
|
-
this.pos += 1;
|
|
6029
|
-
const operand = this.parseUnary();
|
|
6030
|
-
this.countNode();
|
|
6031
|
-
return {
|
|
6032
|
-
kind: "unary",
|
|
6033
|
-
op,
|
|
6034
|
-
operand
|
|
6035
|
-
};
|
|
6036
|
-
}
|
|
6037
|
-
return this.parsePrimary();
|
|
6038
|
-
}
|
|
6039
|
-
parsePrimary() {
|
|
6040
|
-
const tok = this.next();
|
|
6041
|
-
switch (tok.type) {
|
|
6042
|
-
case "number":
|
|
6043
|
-
this.countNode();
|
|
6044
|
-
return {
|
|
6045
|
-
kind: "literal",
|
|
6046
|
-
value: tok.value
|
|
6047
|
-
};
|
|
6048
|
-
case "string":
|
|
6049
|
-
this.countNode();
|
|
6050
|
-
return {
|
|
6051
|
-
kind: "literal",
|
|
6052
|
-
value: tok.value
|
|
6053
|
-
};
|
|
6054
|
-
case "keyword":
|
|
6055
|
-
this.countNode();
|
|
6056
|
-
return {
|
|
6057
|
-
kind: "literal",
|
|
6058
|
-
value: tok.keyword === "null" ? null : tok.keyword === "true"
|
|
6059
|
-
};
|
|
6060
|
-
case "identifier": {
|
|
6061
|
-
const nextTok = this.peek();
|
|
6062
|
-
if (nextTok.type === "punct" && nextTok.punct === "(") return this.parseCall(tok.name, tok.pos);
|
|
6063
|
-
this.identifiers.add(tok.name);
|
|
6064
|
-
this.countNode();
|
|
6065
|
-
return {
|
|
6066
|
-
kind: "identifier",
|
|
6067
|
-
name: tok.name
|
|
6068
|
-
};
|
|
6069
|
-
}
|
|
6070
|
-
case "punct":
|
|
6071
|
-
if (tok.punct === "(") {
|
|
6072
|
-
const inner = this.parseTernary();
|
|
6073
|
-
this.expectPunct(")");
|
|
6074
|
-
return inner;
|
|
6075
|
-
}
|
|
6076
|
-
throw new ExpressionParseError(`unexpected token '${tok.punct}'`, tok.pos);
|
|
6077
|
-
case "eof": throw new ExpressionParseError("unexpected end of expression", tok.pos);
|
|
6078
|
-
}
|
|
6079
|
-
}
|
|
6080
|
-
parseCall(callee, pos) {
|
|
6081
|
-
if (!EXPRESSION_BUILTIN_NAMES.has(callee)) throw new ExpressionParseError(`unknown function '${callee}'`, pos);
|
|
6082
|
-
this.expectPunct("(");
|
|
6083
|
-
const args = [];
|
|
6084
|
-
if (!this.matchPunct(")")) for (;;) {
|
|
6085
|
-
args.push(this.parseTernary());
|
|
6086
|
-
if (args.length > 16) throw new ExpressionParseError(`too many arguments to '${callee}'`, pos);
|
|
6087
|
-
if (this.matchPunct(",")) continue;
|
|
6088
|
-
this.expectPunct(")");
|
|
6089
|
-
break;
|
|
6090
|
-
}
|
|
6091
|
-
this.callees.add(callee);
|
|
6092
|
-
this.countNode();
|
|
6093
|
-
return {
|
|
6094
|
-
kind: "call",
|
|
6095
|
-
callee,
|
|
6096
|
-
args
|
|
6097
|
-
};
|
|
6098
|
-
}
|
|
6099
|
-
};
|
|
6100
|
-
/** Tokenize + parse `source` into a validated `ParsedExpression`. Throws
|
|
6101
|
-
* `ExpressionParseError` on any lexical or grammatical failure. */
|
|
6102
|
-
function parseExpression(source) {
|
|
6103
|
-
return new Parser(tokenize(source)).parse();
|
|
6104
|
-
}
|
|
6105
|
-
//#endregion
|
|
6106
|
-
//#region src/expression/compile.ts
|
|
6107
|
-
/**
|
|
6108
|
-
* LRU compile cache for parsed expressions (spec §2.4 "parse once … LRU keyed
|
|
6109
|
-
* by expr"). The cache stores BOTH successes and failures (negative caching),
|
|
6110
|
-
* so a corrupt persisted string costs exactly one tokenize+parse total — not
|
|
6111
|
-
* one per read on a hot resolve path.
|
|
6112
|
-
*
|
|
6113
|
-
* The cache is a module-level singleton: entries are pure, content-addressed
|
|
6114
|
-
* ASTs keyed by the raw source string, so sharing one instance across all
|
|
6115
|
-
* callers is safe and maximises hit rate.
|
|
6116
|
-
*/
|
|
6117
|
-
var cache = /* @__PURE__ */ new Map();
|
|
6118
|
-
function getCached(source) {
|
|
6119
|
-
const hit = cache.get(source);
|
|
6120
|
-
if (hit !== void 0) {
|
|
6121
|
-
cache.delete(source);
|
|
6122
|
-
cache.set(source, hit);
|
|
6123
|
-
return hit;
|
|
6124
|
-
}
|
|
6125
|
-
let result;
|
|
6126
|
-
try {
|
|
6127
|
-
result = {
|
|
6128
|
-
ok: true,
|
|
6129
|
-
parsed: parseExpression(source)
|
|
6130
|
-
};
|
|
6131
|
-
} catch (err) {
|
|
6132
|
-
result = {
|
|
6133
|
-
ok: false,
|
|
6134
|
-
error: err instanceof ExpressionParseError ? err.message : String(err)
|
|
6135
|
-
};
|
|
6136
|
-
}
|
|
6137
|
-
cache.set(source, result);
|
|
6138
|
-
if (cache.size > 256) {
|
|
6139
|
-
const oldest = cache.keys().next().value;
|
|
6140
|
-
if (oldest !== void 0) cache.delete(oldest);
|
|
6141
|
-
}
|
|
6142
|
-
return result;
|
|
6143
|
-
}
|
|
6144
|
-
/** Compile `source` to a `ParsedExpression`, throwing `ExpressionParseError`
|
|
6145
|
-
* on failure. LRU/negative-cached. */
|
|
6146
|
-
function compileExpression(source) {
|
|
6147
|
-
const result = getCached(source);
|
|
6148
|
-
if (result.ok) return result.parsed;
|
|
6149
|
-
throw new ExpressionParseError(result.error);
|
|
6150
|
-
}
|
|
6151
|
-
/** Compile `source`, returning a discriminated result instead of throwing.
|
|
6152
|
-
* Used by read paths that must degrade rather than raise. LRU/negative-cached. */
|
|
6153
|
-
function compileExpressionSafe(source) {
|
|
6154
|
-
return getCached(source);
|
|
6155
|
-
}
|
|
6156
|
-
//#endregion
|
|
6157
|
-
//#region src/expression/evaluator.ts
|
|
6158
|
-
/**
|
|
6159
|
-
* Tree-walking evaluator for the safe expression mini-language.
|
|
6160
|
-
*
|
|
6161
|
-
* SECURITY (spec §4 rule 2/5):
|
|
6162
|
-
* - The scope is an `Object.create(null)` copy of ONLY the caller's own
|
|
6163
|
-
* enumerable binding entries, so `name in scope` is a pure own-key check and
|
|
6164
|
-
* `constructor` / `__proto__` / `toString` are plain unknown identifiers.
|
|
6165
|
-
* - Performs ZERO I/O and never touches `globalThis` / `Date` / `Math`
|
|
6166
|
-
* directly — the only external calls are into the frozen builtin table.
|
|
6167
|
-
* - The grammar has no loops/recursion/lambdas, so a walk is O(nodeCount) by
|
|
6168
|
-
* construction; the step counter is defense-in-depth for a crafted max-size
|
|
6169
|
-
* AST. Nothing blocks: there are no timers, awaits or unbounded loops.
|
|
6170
|
-
*/
|
|
6171
|
-
var EMPTY_HOOKS = Object.freeze({});
|
|
6172
|
-
/** Build a null-prototype scope from own-enumerable binding entries. Inherited
|
|
6173
|
-
* keys of the input (e.g. from a `{__proto__: {...}}` payload) are NOT copied,
|
|
6174
|
-
* so nothing smuggles in via the prototype chain. */
|
|
6175
|
-
function createExpressionScope(bindings) {
|
|
6176
|
-
const scope = Object.create(null);
|
|
6177
|
-
for (const key of Object.keys(bindings)) if (Object.prototype.hasOwnProperty.call(bindings, key)) scope[key] = bindings[key];
|
|
6178
|
-
return scope;
|
|
6179
|
-
}
|
|
6180
|
-
function isFiniteNumber(value) {
|
|
6181
|
-
return typeof value === "number" && Number.isFinite(value);
|
|
6182
|
-
}
|
|
6183
|
-
/** JS truthiness of a primitive value. */
|
|
6184
|
-
function truthy(value) {
|
|
6185
|
-
return Boolean(value);
|
|
6186
|
-
}
|
|
6187
|
-
function requireFinite(value, context) {
|
|
6188
|
-
if (!Number.isFinite(value)) throw new ExpressionEvalError(`${context} produced a non-finite result`);
|
|
6189
|
-
return value;
|
|
6190
|
-
}
|
|
6191
|
-
function step(ctx) {
|
|
6192
|
-
ctx.steps += 1;
|
|
6193
|
-
if (ctx.steps > ctx.maxSteps) throw new ExpressionEvalError("expression evaluation step budget exceeded");
|
|
6194
|
-
}
|
|
6195
|
-
function evalNode(node, ctx) {
|
|
6196
|
-
step(ctx);
|
|
6197
|
-
switch (node.kind) {
|
|
6198
|
-
case "literal": return node.value;
|
|
6199
|
-
case "identifier":
|
|
6200
|
-
if (!(node.name in ctx.scope)) throw new ExpressionEvalError(`unknown identifier: ${node.name}`);
|
|
6201
|
-
return ctx.scope[node.name];
|
|
6202
|
-
case "unary": return evalUnary(node.op, evalNode(node.operand, ctx));
|
|
6203
|
-
case "binary": return evalBinary(node.op, evalNode(node.left, ctx), evalNode(node.right, ctx));
|
|
6204
|
-
case "logical": {
|
|
6205
|
-
const left = evalNode(node.left, ctx);
|
|
6206
|
-
if (node.op === "&&") return truthy(left) ? evalNode(node.right, ctx) : left;
|
|
6207
|
-
return truthy(left) ? left : evalNode(node.right, ctx);
|
|
6208
|
-
}
|
|
6209
|
-
case "conditional": return truthy(evalNode(node.test, ctx)) ? evalNode(node.consequent, ctx) : evalNode(node.alternate, ctx);
|
|
6210
|
-
case "call": return evalCall(node.callee, node.args.map((a) => evalNode(a, ctx)), ctx.hooks);
|
|
6211
|
-
}
|
|
6212
|
-
}
|
|
6213
|
-
function evalUnary(op, operand) {
|
|
6214
|
-
if (op === "!") return !truthy(operand);
|
|
6215
|
-
if (!isFiniteNumber(operand)) throw new ExpressionEvalError("unary \"-\" requires a finite number");
|
|
6216
|
-
return requireFinite(-operand, "unary \"-\"");
|
|
6217
|
-
}
|
|
6218
|
-
function evalBinary(op, left, right) {
|
|
6219
|
-
switch (op) {
|
|
6220
|
-
case "==": return left === right;
|
|
6221
|
-
case "!=": return left !== right;
|
|
6222
|
-
case "+":
|
|
6223
|
-
if (typeof left === "string" && typeof right === "string") return left + right;
|
|
6224
|
-
if (isFiniteNumber(left) && isFiniteNumber(right)) return requireFinite(left + right, "\"+\"");
|
|
6225
|
-
throw new ExpressionEvalError("\"+\" requires two numbers or two strings");
|
|
6226
|
-
case "-":
|
|
6227
|
-
case "*":
|
|
6228
|
-
case "/":
|
|
6229
|
-
case "%":
|
|
6230
|
-
if (!isFiniteNumber(left) || !isFiniteNumber(right)) throw new ExpressionEvalError(`"${op}" requires two finite numbers`);
|
|
6231
|
-
return requireFinite(op === "-" ? left - right : op === "*" ? left * right : op === "/" ? left / right : left % right, `"${op}"`);
|
|
6232
|
-
case "<":
|
|
6233
|
-
case "<=":
|
|
6234
|
-
case ">":
|
|
6235
|
-
case ">=":
|
|
6236
|
-
if (isFiniteNumber(left) && isFiniteNumber(right)) return op === "<" ? left < right : op === "<=" ? left <= right : op === ">" ? left > right : left >= right;
|
|
6237
|
-
if (typeof left === "string" && typeof right === "string") return op === "<" ? left < right : op === "<=" ? left <= right : op === ">" ? left > right : left >= right;
|
|
6238
|
-
throw new ExpressionEvalError(`"${op}" requires two numbers or two strings`);
|
|
6239
|
-
}
|
|
6240
|
-
}
|
|
6241
|
-
function evalCall(callee, args, hooks) {
|
|
6242
|
-
if (!Object.prototype.hasOwnProperty.call(EXPRESSION_BUILTINS, callee)) throw new ExpressionEvalError(`unknown function: ${callee}`);
|
|
6243
|
-
const builtin = EXPRESSION_BUILTINS[callee];
|
|
6244
|
-
if (args.length < builtin.minArgs || args.length > builtin.maxArgs) throw new ExpressionEvalError(`${callee}: wrong number of arguments (${args.length})`);
|
|
6245
|
-
return builtin.apply(args, hooks);
|
|
6246
|
-
}
|
|
6247
|
-
/** Evaluate an AST node against a scope. Throws `ExpressionEvalError` on any
|
|
6248
|
-
* runtime failure (unknown identifier, type mismatch, non-finite result,
|
|
6249
|
-
* step-budget exhaustion). */
|
|
6250
|
-
function evaluateAst(node, scope, opts) {
|
|
6251
|
-
return evalNode(node, {
|
|
6252
|
-
scope,
|
|
6253
|
-
hooks: opts?.hooks ?? EMPTY_HOOKS,
|
|
6254
|
-
maxSteps: opts?.maxSteps ?? 4096,
|
|
6255
|
-
steps: 0
|
|
6256
|
-
});
|
|
6257
|
-
}
|
|
6258
|
-
//#endregion
|
|
6259
|
-
//#region src/expression/expression-source.ts
|
|
6260
|
-
/** The `now` epoch-ms binding is auto-injected into every evaluation and is a
|
|
6261
|
-
* reserved binding name (authors may not rebind it). */
|
|
6262
|
-
var EXPRESSION_INJECTED_NOW = "now";
|
|
6263
|
-
/**
|
|
6264
|
-
* Coerce an untrusted `getByPath` / mirror read to an `ExpressionValue`.
|
|
6265
|
-
* Non-primitive values (objects, arrays, `undefined`, functions, bigint,
|
|
6266
|
-
* symbol) and non-finite numbers become `undefined` so the caller can apply
|
|
6267
|
-
* its binding-miss policy (→ `null`). `null` itself is a valid value.
|
|
6268
|
-
*/
|
|
6269
|
-
function toExpressionValue(raw) {
|
|
6270
|
-
if (raw === null) return null;
|
|
6271
|
-
if (typeof raw === "string") return raw;
|
|
6272
|
-
if (typeof raw === "boolean") return raw;
|
|
6273
|
-
if (typeof raw === "number") return Number.isFinite(raw) ? raw : void 0;
|
|
6274
|
-
}
|
|
6275
|
-
/**
|
|
6276
|
-
* Author-time validation. Returns `null` when the source is valid, else a
|
|
6277
|
-
* human-readable error message. Checks: the expression compiles; binding count
|
|
6278
|
-
* is within `MAX_EXPRESSION_BINDINGS`; every binding name is a legal identifier,
|
|
6279
|
-
* is not reserved (`now`/keywords) and does not shadow a builtin; and every
|
|
6280
|
-
* FREE identifier of the AST is covered by a binding or the injected `now`.
|
|
6281
|
-
*/
|
|
6282
|
-
function validateExpressionSource(src) {
|
|
6283
|
-
const names = Object.keys(src.bindings);
|
|
6284
|
-
if (names.length > 32) return `too many bindings (${names.length} > 32)`;
|
|
6285
|
-
for (const name of names) {
|
|
6286
|
-
if (!EXPRESSION_IDENTIFIER_RE.test(name)) return `invalid binding name '${name}'`;
|
|
6287
|
-
if (RESERVED_BINDING_NAMES.has(name)) return `binding name '${name}' is reserved`;
|
|
6288
|
-
if (EXPRESSION_BUILTIN_NAMES.has(name)) return `binding name '${name}' shadows a builtin function`;
|
|
6289
|
-
}
|
|
6290
|
-
const compiled = compileExpressionSafe(src.expr);
|
|
6291
|
-
if (!compiled.ok) return compiled.error;
|
|
6292
|
-
const bound = new Set(names);
|
|
6293
|
-
for (const id of compiled.parsed.identifiers) {
|
|
6294
|
-
if (id === "now") continue;
|
|
6295
|
-
if (!bound.has(id)) return `expression references unbound identifier '${id}'`;
|
|
6296
|
-
}
|
|
6297
|
-
return null;
|
|
6298
|
-
}
|
|
6299
|
-
/**
|
|
6300
|
-
* Shared read-path evaluation. Builds a null-proto scope from `bindingValues`
|
|
6301
|
-
* plus the injected `now` (supplied by the caller for determinism and
|
|
6302
|
-
* testability), compiles via the LRU, and evaluates. Any failure (parse or
|
|
6303
|
-
* eval) returns `{ ok: false }` — the caller treats that as "skip this
|
|
6304
|
-
* derivation", never as a throw that takes the pass down.
|
|
6305
|
-
*/
|
|
6306
|
-
function evaluateExpressionSource(expr, bindingValues, now, opts) {
|
|
6307
|
-
const compiled = compileExpressionSafe(expr);
|
|
6308
|
-
if (!compiled.ok) return {
|
|
6309
|
-
ok: false,
|
|
6310
|
-
error: compiled.error
|
|
6311
|
-
};
|
|
6312
|
-
const scope = createExpressionScope({
|
|
6313
|
-
...bindingValues,
|
|
6314
|
-
["now"]: now
|
|
6315
|
-
});
|
|
6316
|
-
const hooks = {
|
|
6317
|
-
...opts?.hooks,
|
|
6318
|
-
now
|
|
6319
|
-
};
|
|
6320
|
-
try {
|
|
6321
|
-
return {
|
|
6322
|
-
ok: true,
|
|
6323
|
-
value: evaluateAst(compiled.parsed.ast, scope, {
|
|
6324
|
-
...opts,
|
|
6325
|
-
hooks
|
|
6326
|
-
})
|
|
6327
|
-
};
|
|
6328
|
-
} catch (err) {
|
|
6329
|
-
return {
|
|
6330
|
-
ok: false,
|
|
6331
|
-
error: err instanceof ExpressionEvalError ? err.message : String(err)
|
|
6332
|
-
};
|
|
6333
|
-
}
|
|
6334
|
-
}
|
|
6335
|
-
//#endregion
|
|
6336
5533
|
//#region src/expression/binding-source.ts
|
|
6337
5534
|
/**
|
|
6338
5535
|
* What an expression's named bindings READ from.
|
|
@@ -10135,177 +9332,6 @@ function kebabToCamel(s) {
|
|
|
10135
9332
|
return s.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
10136
9333
|
}
|
|
10137
9334
|
//#endregion
|
|
10138
|
-
//#region src/composition/composition.ts
|
|
10139
|
-
/**
|
|
10140
|
-
* A COMPOSITION: a device assembled from other devices' state (D659).
|
|
10141
|
-
*
|
|
10142
|
-
* The data half of the composed-devices spec §1. A composition is stored inside
|
|
10143
|
-
* a core block (`CoreBlock.source.kind === 'composition'`) and run by the shared
|
|
10144
|
-
* `composer` runner. It names a TARGET and, for each capability of the target, a
|
|
10145
|
-
* FIELD MAP: every state field has exactly one source.
|
|
10146
|
-
*
|
|
10147
|
-
* Sources are keyed by `(addonId, stableId)`, NEVER by numeric device id. A
|
|
10148
|
-
* resync reissues numeric ids, and a composition that stored them would be
|
|
10149
|
-
* orphaned by the first re-adoption (the linked-devices lesson). A `stableId` is
|
|
10150
|
-
* unique only within its owning addon, so the owner travels with it.
|
|
10151
|
-
*
|
|
10152
|
-
* Later slices EXTEND these unions and do not reshape them. The variants a later
|
|
10153
|
-
* slice implements are already in the wire shape, and `validateComposition`
|
|
10154
|
-
* refuses them BY NAME until then:
|
|
10155
|
-
* target `existing` → slice 2 · feature `passthrough` → slice 3 ·
|
|
10156
|
-
* `commands` (`forward`) → slice 3 · source `code` → slice 4.
|
|
10157
|
-
*/
|
|
10158
|
-
/** The owner of every composed device: the `composer` builtin. */
|
|
10159
|
-
var COMPOSER_ADDON_ID = "composer";
|
|
10160
|
-
/** A composed device's stableId is this prefix plus the block id. */
|
|
10161
|
-
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
10162
|
-
/** A device with more capabilities than this is two devices. */
|
|
10163
|
-
var MAX_COMPOSITION_FEATURES = 16;
|
|
10164
|
-
var MAX_COMPOSITION_FIELDS_PER_FEATURE = 32;
|
|
10165
|
-
/** Longest snippet a `code` source may carry (slice 4). */
|
|
10166
|
-
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
10167
|
-
var CompositionSourceRefSchema = z.object({
|
|
10168
|
-
/** The owning addon; `stableId` is unique only within it. */
|
|
10169
|
-
addonId: z.string().min(1),
|
|
10170
|
-
stableId: z.string().min(1)
|
|
10171
|
-
});
|
|
10172
|
-
/** One field of one capability of one source device. */
|
|
10173
|
-
var CompositionFieldReadSchema = z.object({
|
|
10174
|
-
source: CompositionSourceRefSchema,
|
|
10175
|
-
cap: z.string().min(1),
|
|
10176
|
-
/** Dotted path into the source cap's runtime-state slice. */
|
|
10177
|
-
fieldPath: z.string().min(1)
|
|
10178
|
-
});
|
|
10179
|
-
/** `from`: copy one source field verbatim. It is also an expression's `from` binding. */
|
|
10180
|
-
var CompositionFromSourceSchema = CompositionFieldReadSchema.extend({ kind: z.literal("from") });
|
|
10181
|
-
/** A constant binding. No device is read. */
|
|
10182
|
-
var CompositionLiteralBindingSchema = z.object({
|
|
10183
|
-
kind: z.literal("literal"),
|
|
10184
|
-
value: z.union([
|
|
10185
|
-
z.string(),
|
|
10186
|
-
z.number(),
|
|
10187
|
-
z.boolean(),
|
|
10188
|
-
z.null()
|
|
10189
|
-
])
|
|
10190
|
-
});
|
|
10191
|
-
var CompositionBindingSchema = z.discriminatedUnion("kind", [CompositionFromSourceSchema, CompositionLiteralBindingSchema]);
|
|
10192
|
-
/**
|
|
10193
|
-
* `expression`: a formula over named bindings, in the salvaged expression
|
|
10194
|
-
* engine. Validated at parse by the SAME function every other consumer runs,
|
|
10195
|
-
* so the editor and the store cannot disagree.
|
|
10196
|
-
*/
|
|
10197
|
-
var CompositionExpressionSourceSchema = z.object({
|
|
10198
|
-
kind: z.literal("expression"),
|
|
10199
|
-
expr: z.string().min(1).max(MAX_EXPRESSION_SOURCE_LENGTH),
|
|
10200
|
-
bindings: z.record(z.string().regex(EXPRESSION_IDENTIFIER_RE), CompositionBindingSchema)
|
|
10201
|
-
}).superRefine((src, ctx) => {
|
|
10202
|
-
const err = validateExpressionSource(src);
|
|
10203
|
-
if (err !== null) ctx.addIssue({
|
|
10204
|
-
code: "custom",
|
|
10205
|
-
message: err,
|
|
10206
|
-
path: ["expr"]
|
|
10207
|
-
});
|
|
10208
|
-
});
|
|
10209
|
-
/** `code`: RESERVED for slice 4 (own runner, one-way eject). */
|
|
10210
|
-
var CompositionCodeSourceSchema = z.object({
|
|
10211
|
-
kind: z.literal("code"),
|
|
10212
|
-
code: z.string().min(1).max(MAX_COMPOSITION_CODE_LENGTH)
|
|
10213
|
-
});
|
|
10214
|
-
var CompositionFieldSourceSchema = z.discriminatedUnion("kind", [
|
|
10215
|
-
CompositionFromSourceSchema,
|
|
10216
|
-
CompositionExpressionSourceSchema,
|
|
10217
|
-
CompositionCodeSourceSchema
|
|
10218
|
-
]);
|
|
10219
|
-
/** `forward`: RESERVED for slice 3. Argument mapping arrives there as an additive optional `args`. */
|
|
10220
|
-
var CompositionForwardCommandSchema = z.object({
|
|
10221
|
-
kind: z.literal("forward"),
|
|
10222
|
-
source: CompositionSourceRefSchema,
|
|
10223
|
-
cap: z.string().min(1),
|
|
10224
|
-
method: z.string().min(1)
|
|
10225
|
-
});
|
|
10226
|
-
var CompositionCommandTargetSchema = z.discriminatedUnion("kind", [CompositionForwardCommandSchema, CompositionCodeSourceSchema]);
|
|
10227
|
-
var CompositionFieldsFeatureSchema = z.object({
|
|
10228
|
-
kind: z.literal("fields"),
|
|
10229
|
-
cap: z.string().min(1),
|
|
10230
|
-
fields: z.record(z.string().min(1), CompositionFieldSourceSchema).refine((fields) => Object.keys(fields).length <= 32, { message: `at most 32 fields per capability` }),
|
|
10231
|
-
/** RESERVED for slice 3; refused by the validator when non-empty. */
|
|
10232
|
-
commands: z.record(z.string().min(1), CompositionCommandTargetSchema).optional()
|
|
10233
|
-
});
|
|
10234
|
-
/** RESERVED for slice 3: a media / data-plane cap, whole, from one source. */
|
|
10235
|
-
var CompositionPassthroughFeatureSchema = z.object({
|
|
10236
|
-
kind: z.literal("passthrough"),
|
|
10237
|
-
cap: z.string().min(1),
|
|
10238
|
-
source: CompositionSourceRefSchema
|
|
10239
|
-
});
|
|
10240
|
-
var CompositionFeatureSchema = z.discriminatedUnion("kind", [CompositionFieldsFeatureSchema, CompositionPassthroughFeatureSchema]);
|
|
10241
|
-
/**
|
|
10242
|
-
* A NEW device. It has no `name` of its own: the block's name IS the device's
|
|
10243
|
-
* name (2026-08-08). A second copy here would be a second writer of one string (D62).
|
|
10244
|
-
*/
|
|
10245
|
-
var CompositionNewTargetSchema = z.object({
|
|
10246
|
-
kind: z.literal("new"),
|
|
10247
|
-
type: z.enum(DeviceType),
|
|
10248
|
-
role: z.enum(DeviceRole).optional()
|
|
10249
|
-
});
|
|
10250
|
-
/** RESERVED for slice 2: customize an existing device. */
|
|
10251
|
-
var CompositionExistingTargetSchema = z.object({
|
|
10252
|
-
kind: z.literal("existing"),
|
|
10253
|
-
device: CompositionSourceRefSchema
|
|
10254
|
-
});
|
|
10255
|
-
var CompositionTargetSchema = z.discriminatedUnion("kind", [CompositionNewTargetSchema, CompositionExistingTargetSchema]);
|
|
10256
|
-
var CompositionSchema = z.object({
|
|
10257
|
-
target: CompositionTargetSchema,
|
|
10258
|
-
features: z.array(CompositionFeatureSchema).min(1).max(16)
|
|
10259
|
-
}).superRefine((composition, ctx) => {
|
|
10260
|
-
const seen = /* @__PURE__ */ new Set();
|
|
10261
|
-
composition.features.forEach((feature, index) => {
|
|
10262
|
-
if (seen.has(feature.cap)) ctx.addIssue({
|
|
10263
|
-
code: "custom",
|
|
10264
|
-
message: `capability \`${feature.cap}\` is composed twice — one feature per capability`,
|
|
10265
|
-
path: [
|
|
10266
|
-
"features",
|
|
10267
|
-
index,
|
|
10268
|
-
"cap"
|
|
10269
|
-
]
|
|
10270
|
-
});
|
|
10271
|
-
seen.add(feature.cap);
|
|
10272
|
-
});
|
|
10273
|
-
});
|
|
10274
|
-
function compositionSourceKey(ref) {
|
|
10275
|
-
return `${ref.addonId}/${ref.stableId}`;
|
|
10276
|
-
}
|
|
10277
|
-
function compositionSliceKey(ref, cap) {
|
|
10278
|
-
return `${compositionSourceKey(ref)}#${cap}`;
|
|
10279
|
-
}
|
|
10280
|
-
function compositionReadKey(read) {
|
|
10281
|
-
return `${compositionSliceKey(read.source, read.cap)}.${read.fieldPath}`;
|
|
10282
|
-
}
|
|
10283
|
-
function composedDeviceStableId(blockId) {
|
|
10284
|
-
return `${COMPOSED_DEVICE_STABLE_ID_PREFIX}${blockId}`;
|
|
10285
|
-
}
|
|
10286
|
-
function composedDeviceRef(blockId) {
|
|
10287
|
-
return {
|
|
10288
|
-
addonId: COMPOSER_ADDON_ID,
|
|
10289
|
-
stableId: composedDeviceStableId(blockId)
|
|
10290
|
-
};
|
|
10291
|
-
}
|
|
10292
|
-
/** Every device field a source reads: `from` is one read, an expression is its `from` bindings. */
|
|
10293
|
-
function fieldReads(source) {
|
|
10294
|
-
switch (source.kind) {
|
|
10295
|
-
case "from": return [{
|
|
10296
|
-
source: source.source,
|
|
10297
|
-
cap: source.cap,
|
|
10298
|
-
fieldPath: source.fieldPath
|
|
10299
|
-
}];
|
|
10300
|
-
case "expression": return Object.values(source.bindings).flatMap((binding) => binding.kind === "from" ? [{
|
|
10301
|
-
source: binding.source,
|
|
10302
|
-
cap: binding.cap,
|
|
10303
|
-
fieldPath: binding.fieldPath
|
|
10304
|
-
}] : []);
|
|
10305
|
-
case "code": return [];
|
|
10306
|
-
}
|
|
10307
|
-
}
|
|
10308
|
-
//#endregion
|
|
10309
9335
|
//#region src/composition/composition-report.ts
|
|
10310
9336
|
/**
|
|
10311
9337
|
* What the validator says about a composition and what the composer says about
|
|
@@ -10328,7 +9354,12 @@ var CompositionProblemCodeSchema = z.enum([
|
|
|
10328
9354
|
"source-field-unknown",
|
|
10329
9355
|
"expression-invalid",
|
|
10330
9356
|
"cycle",
|
|
10331
|
-
"duplicate-target"
|
|
9357
|
+
"duplicate-target",
|
|
9358
|
+
"not-item-array",
|
|
9359
|
+
"item-field-reserved",
|
|
9360
|
+
"target-missing",
|
|
9361
|
+
"target-unreadable",
|
|
9362
|
+
"not-replaceable"
|
|
10332
9363
|
]);
|
|
10333
9364
|
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.celsius`. */
|
|
10334
9365
|
var CompositionProblemSchema = z.object({
|
|
@@ -10342,8 +9373,18 @@ var CompositionFieldKindSchema = z.enum([
|
|
|
10342
9373
|
"boolean",
|
|
10343
9374
|
"enum"
|
|
10344
9375
|
]);
|
|
10345
|
-
/**
|
|
10346
|
-
|
|
9376
|
+
/**
|
|
9377
|
+
* How a field says "unavailable" (D393, D663): `null` when its schema allows it;
|
|
9378
|
+
* `unknown` — the enum's own word — for an ADDED field that has one; `release`
|
|
9379
|
+
* for a REPLACED field of an existing device, whose claim is released so the
|
|
9380
|
+
* native provider's reading shows again; else the (composed) device goes offline.
|
|
9381
|
+
*/
|
|
9382
|
+
var CompositionUnavailableModeSchema = z.enum([
|
|
9383
|
+
"null",
|
|
9384
|
+
"offline",
|
|
9385
|
+
"unknown",
|
|
9386
|
+
"release"
|
|
9387
|
+
]);
|
|
10347
9388
|
/**
|
|
10348
9389
|
* `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
|
|
10349
9390
|
* field of its cap changes value · `constant` reads nothing, computed once.
|
|
@@ -10353,9 +9394,17 @@ var CompositionFieldRoleSchema = z.enum([
|
|
|
10353
9394
|
"clock",
|
|
10354
9395
|
"constant"
|
|
10355
9396
|
]);
|
|
9397
|
+
/** The item a planned field belongs to; its `path` is then the dotted path INSIDE the item. */
|
|
9398
|
+
var CompositionFieldItemSchema = z.object({
|
|
9399
|
+
arrayPath: z.string(),
|
|
9400
|
+
key: z.string(),
|
|
9401
|
+
label: z.string()
|
|
9402
|
+
});
|
|
10356
9403
|
var CompositionFieldPlanSchema = z.object({
|
|
10357
9404
|
cap: z.string(),
|
|
9405
|
+
/** Top-level field, or — when `item` is set — the dotted path inside that item. */
|
|
10358
9406
|
path: z.string(),
|
|
9407
|
+
item: CompositionFieldItemSchema.optional(),
|
|
10359
9408
|
/** Index into `composition.features` this field's capability came from —
|
|
10360
9409
|
* lets a source/cycle problem name its path as `features[N].fields.<path>`
|
|
10361
9410
|
* (the same convention `planComposition`'s own problems already use). */
|
|
@@ -10368,16 +9417,42 @@ var CompositionFieldPlanSchema = z.object({
|
|
|
10368
9417
|
source: CompositionFieldSourceSchema,
|
|
10369
9418
|
reads: z.array(CompositionFieldReadSchema)
|
|
10370
9419
|
});
|
|
9420
|
+
/** The key every record map, log line and graph node uses for a planned field. Two items' `status` are two keys. */
|
|
9421
|
+
function compositionFieldKey(plan) {
|
|
9422
|
+
const path = plan.item === void 0 ? plan.path : compositionItemFieldPath(plan.item.arrayPath, plan.item.key, plan.path);
|
|
9423
|
+
return `${plan.cap}.${path}`;
|
|
9424
|
+
}
|
|
9425
|
+
/**
|
|
9426
|
+
* What a feature does to its target (D663): `new` builds a capability on a new
|
|
9427
|
+
* device; on an existing device it `add`s a capability the device lacks, or
|
|
9428
|
+
* `replace`s named fields of one it has natively.
|
|
9429
|
+
*/
|
|
9430
|
+
var CompositionFeatureModeSchema = z.enum([
|
|
9431
|
+
"new",
|
|
9432
|
+
"add",
|
|
9433
|
+
"replace"
|
|
9434
|
+
]);
|
|
9435
|
+
var CompositionFeaturePlanSchema = z.object({
|
|
9436
|
+
featureIndex: z.number().int().nonnegative(),
|
|
9437
|
+
cap: z.string(),
|
|
9438
|
+
mode: CompositionFeatureModeSchema
|
|
9439
|
+
});
|
|
10371
9440
|
var CompositionValidationSchema = z.object({
|
|
10372
9441
|
ok: z.boolean(),
|
|
10373
9442
|
problems: z.array(CompositionProblemSchema),
|
|
10374
|
-
fields: z.array(CompositionFieldPlanSchema)
|
|
9443
|
+
fields: z.array(CompositionFieldPlanSchema),
|
|
9444
|
+
features: z.array(CompositionFeaturePlanSchema)
|
|
10375
9445
|
});
|
|
10376
|
-
/**
|
|
9446
|
+
/**
|
|
9447
|
+
* Mirrors `CoreBlockStatus`, pinned by `core-blocks-source.spec.ts`. `degraded`:
|
|
9448
|
+
* running, but a replaced field is released to the native provider while its
|
|
9449
|
+
* source is unavailable (ruling S1b, D663) — the reason names each such field.
|
|
9450
|
+
*/
|
|
10377
9451
|
var CompositionRunStatusSchema = z.enum([
|
|
10378
9452
|
"stopped",
|
|
10379
9453
|
"starting",
|
|
10380
9454
|
"running",
|
|
9455
|
+
"degraded",
|
|
10381
9456
|
"failed"
|
|
10382
9457
|
]);
|
|
10383
9458
|
var CompositionFieldStateKindSchema = z.enum([
|
|
@@ -10388,6 +9463,8 @@ var CompositionFieldStateKindSchema = z.enum([
|
|
|
10388
9463
|
var CompositionFieldStateSchema = z.object({
|
|
10389
9464
|
cap: z.string(),
|
|
10390
9465
|
path: z.string(),
|
|
9466
|
+
/** Same as the plan's: two items' `status` are told apart by it. */
|
|
9467
|
+
item: CompositionFieldItemSchema.optional(),
|
|
10391
9468
|
state: CompositionFieldStateKindSchema,
|
|
10392
9469
|
/** `null` whenever `state === 'unavailable'`; never a plausible stand-in (D393). */
|
|
10393
9470
|
value: z.union([
|
|
@@ -10469,11 +9546,14 @@ function coreBlockIdFromAddonId(addonId) {
|
|
|
10469
9546
|
* agent is the reason placement is not fixed to the hub. */
|
|
10470
9547
|
var CoreBlockPlacementSchema = z.union([z.literal("hub"), z.string().min(1)]);
|
|
10471
9548
|
/** What a block's process is doing. Mirrors the addon runner's own lifecycle so
|
|
10472
|
-
* a failing block reads the same way a failing addon does.
|
|
9549
|
+
* a failing block reads the same way a failing addon does. `degraded` is a
|
|
9550
|
+
* composition on an existing device with a field handed back to the native
|
|
9551
|
+
* provider while its source is unavailable (S1b, D663); the error names it. */
|
|
10473
9552
|
var CoreBlockStatusSchema = z.enum([
|
|
10474
9553
|
"stopped",
|
|
10475
9554
|
"starting",
|
|
10476
9555
|
"running",
|
|
9556
|
+
"degraded",
|
|
10477
9557
|
"failed"
|
|
10478
9558
|
]);
|
|
10479
9559
|
/** Client-authored fields. */
|
|
@@ -10509,9 +9589,16 @@ var CoreBlockSourceSchema = z.discriminatedUnion("kind", [
|
|
|
10509
9589
|
composition: CompositionSchema
|
|
10510
9590
|
})
|
|
10511
9591
|
]);
|
|
10512
|
-
/**
|
|
9592
|
+
/**
|
|
9593
|
+
* The client-authored half of a composition block. No `code`, no placement (hub-only; Phase 7).
|
|
9594
|
+
*
|
|
9595
|
+
* `name`: REQUIRED for a `new` target — the block's name IS the device's name
|
|
9596
|
+
* (D659). ABSENT for an `existing` target — a customization has no name of its
|
|
9597
|
+
* own; the server derives one (`customizationBlockName`, D663) and refuses a
|
|
9598
|
+
* client-sent name by name.
|
|
9599
|
+
*/
|
|
10513
9600
|
var CompositionBlockInputSchema = z.object({
|
|
10514
|
-
name: z.string().min(1).max(120),
|
|
9601
|
+
name: z.string().min(1).max(120).optional(),
|
|
10515
9602
|
enabled: z.boolean(),
|
|
10516
9603
|
composition: CompositionSchema
|
|
10517
9604
|
});
|
|
@@ -10570,6 +9657,11 @@ var CompositionGetReadSchema = z.discriminatedUnion("state", [z.object({
|
|
|
10570
9657
|
state: z.literal("loaded"),
|
|
10571
9658
|
view: CompositionViewSchema.nullable()
|
|
10572
9659
|
}), CompositionsNotLoadedSchema]);
|
|
9660
|
+
/** The customization of one existing device, found by its TARGET, or `not-loaded` (D315). */
|
|
9661
|
+
var CompositionCustomizationReadSchema = z.discriminatedUnion("state", [z.object({
|
|
9662
|
+
state: z.literal("loaded"),
|
|
9663
|
+
view: CompositionViewSchema.nullable()
|
|
9664
|
+
}), CompositionsNotLoadedSchema]);
|
|
10573
9665
|
/** What a compile attempt produced. */
|
|
10574
9666
|
var CoreBlockCompileResultSchema = z.object({
|
|
10575
9667
|
ok: z.boolean(),
|
|
@@ -10680,6 +9772,14 @@ var coreBlocksCapability = {
|
|
|
10680
9772
|
getComposition: method(z.object({ blockId: z.string() }), CompositionGetReadSchema, { auth: "admin" }),
|
|
10681
9773
|
listCompositions: method(z.object({}), CompositionListReadSchema, { auth: "admin" }),
|
|
10682
9774
|
/**
|
|
9775
|
+
* The composition that customizes an existing device (D663), found by its
|
|
9776
|
+
* TARGET — never by the block's derived name. One per device at most.
|
|
9777
|
+
*/
|
|
9778
|
+
getCustomization: method(z.object({
|
|
9779
|
+
addonId: z.string().min(1),
|
|
9780
|
+
stableId: z.string().min(1)
|
|
9781
|
+
}), CompositionCustomizationReadSchema, { auth: "admin" }),
|
|
9782
|
+
/**
|
|
10683
9783
|
* Validate without saving — the same verdict the save reaches. A mutation
|
|
10684
9784
|
* for its body size; it writes nothing, so its access is `view`.
|
|
10685
9785
|
*/
|
|
@@ -14200,6 +13300,52 @@ var deviceManagerCapability = {
|
|
|
14200
13300
|
//#endregion
|
|
14201
13301
|
//#region src/capabilities/device-state.cap.ts
|
|
14202
13302
|
/**
|
|
13303
|
+
* Per-field ownership (D663). A composition may CLAIM fields of a native
|
|
13304
|
+
* cap's runtime-state slice on an existing device: `replace` overlays the
|
|
13305
|
+
* claimed fields on the native slice, `add` builds a slice the device does
|
|
13306
|
+
* not natively have. Declared here — once — so the hub mirror (Task 5) and
|
|
13307
|
+
* the claim methods (Task 6) share one union.
|
|
13308
|
+
*/
|
|
13309
|
+
var FieldClaimModeSchema = z.enum(["replace", "add"]);
|
|
13310
|
+
/** What a claim, patch or release answers. A refusal always names its reason. */
|
|
13311
|
+
var ClaimOutcomeSchema = z.discriminatedUnion("ok", [z.object({
|
|
13312
|
+
ok: z.literal(true),
|
|
13313
|
+
changed: z.boolean()
|
|
13314
|
+
}), z.object({
|
|
13315
|
+
ok: z.literal(false),
|
|
13316
|
+
code: z.enum([
|
|
13317
|
+
"owned-by-other",
|
|
13318
|
+
"not-claimed",
|
|
13319
|
+
"field-not-claimed",
|
|
13320
|
+
"invalid-slice",
|
|
13321
|
+
"unknown-device",
|
|
13322
|
+
"row-unreadable",
|
|
13323
|
+
"migration-in-flight"
|
|
13324
|
+
]),
|
|
13325
|
+
message: z.string()
|
|
13326
|
+
})]);
|
|
13327
|
+
/** One claim as `listClaims` reports it. `fields` is the PLANNED set, explicit (ruling S5). */
|
|
13328
|
+
var FieldClaimSchema = z.object({
|
|
13329
|
+
deviceId: z.number(),
|
|
13330
|
+
capName: z.string(),
|
|
13331
|
+
owner: z.string().min(1),
|
|
13332
|
+
mode: FieldClaimModeSchema,
|
|
13333
|
+
fields: z.array(z.string().min(1)).min(1)
|
|
13334
|
+
});
|
|
13335
|
+
/**
|
|
13336
|
+
* What `listClaims` answers. The claims INDEX is a listing projection loaded
|
|
13337
|
+
* from the settings store at boot; until a load has succeeded it is
|
|
13338
|
+
* `not-loaded`, never `[]` — an unanswered question must not look like an
|
|
13339
|
+
* empty answer (D315).
|
|
13340
|
+
*/
|
|
13341
|
+
var ClaimsListingSchema = z.discriminatedUnion("state", [z.object({
|
|
13342
|
+
state: z.literal("loaded"),
|
|
13343
|
+
claims: z.array(FieldClaimSchema)
|
|
13344
|
+
}), z.object({
|
|
13345
|
+
state: z.literal("not-loaded"),
|
|
13346
|
+
reason: z.string()
|
|
13347
|
+
})]);
|
|
13348
|
+
/**
|
|
14203
13349
|
* `deviceState` — generic, cap-agnostic surface for cross-process
|
|
14204
13350
|
* access to per-device runtime state. Read pendant for every cap's
|
|
14205
13351
|
* runtime-state slice + the canonical write entrypoint. Mirrors the
|
|
@@ -14230,8 +13376,12 @@ var deviceStateCapability = {
|
|
|
14230
13376
|
/** Full state snapshot for one device. Empty object if no
|
|
14231
13377
|
* cap-keyed slice has been written yet. */
|
|
14232
13378
|
getSnapshot: method(z.object({ deviceId: z.number() }), z.record(z.string(), z.record(z.string(), z.unknown()))),
|
|
14233
|
-
/**
|
|
14234
|
-
*
|
|
13379
|
+
/**
|
|
13380
|
+
* Single cap slice — the EFFECTIVE one: the merge every consumer sees, null
|
|
13381
|
+
* when the slice hasn't been written, the device isn't registered, or a
|
|
13382
|
+
* claim HOLDS the cap (D663). Never the native shadow — that is
|
|
13383
|
+
* `getNativeCapSlice`, admin-only.
|
|
13384
|
+
*/
|
|
14235
13385
|
getCapSlice: method(z.object({
|
|
14236
13386
|
deviceId: z.number(),
|
|
14237
13387
|
capName: z.string()
|
|
@@ -14276,7 +13426,66 @@ var deviceStateCapability = {
|
|
|
14276
13426
|
deviceId: z.number(),
|
|
14277
13427
|
capName: z.string(),
|
|
14278
13428
|
slice: z.record(z.string(), z.unknown())
|
|
14279
|
-
}), z.void(), { kind: "mutation" })
|
|
13429
|
+
}), z.void(), { kind: "mutation" }),
|
|
13430
|
+
/**
|
|
13431
|
+
* Claim `fields` of `capName` on a device for `owner`. The PLANNED field set
|
|
13432
|
+
* is explicit (ruling S5): `values` may be partial and MUST be a subset of
|
|
13433
|
+
* `fields` (else `field-not-claimed`); a claimed field with no value is HELD,
|
|
13434
|
+
* never answered from the native. A re-claim by the same owner REPLACES
|
|
13435
|
+
* `fields` and MERGES `values` — a field dropped from `fields` loses its
|
|
13436
|
+
* value. Another owner's claim → `owned-by-other`.
|
|
13437
|
+
*/
|
|
13438
|
+
claimFields: method(z.object({
|
|
13439
|
+
deviceId: z.number(),
|
|
13440
|
+
capName: z.string(),
|
|
13441
|
+
owner: z.string().min(1),
|
|
13442
|
+
mode: FieldClaimModeSchema,
|
|
13443
|
+
fields: z.array(z.string().min(1)).min(1),
|
|
13444
|
+
values: z.record(z.string(), z.unknown())
|
|
13445
|
+
}), ClaimOutcomeSchema, {
|
|
13446
|
+
kind: "mutation",
|
|
13447
|
+
auth: "admin"
|
|
13448
|
+
}),
|
|
13449
|
+
/**
|
|
13450
|
+
* Write owned values. Every key of `values` must be in the claim's `fields`
|
|
13451
|
+
* (`field-not-claimed`); no claim → `not-claimed`; another owner's →
|
|
13452
|
+
* `owned-by-other`. Partial patches merge (S5); debounced like a native slice.
|
|
13453
|
+
*/
|
|
13454
|
+
patchOwnedFields: method(z.object({
|
|
13455
|
+
deviceId: z.number(),
|
|
13456
|
+
capName: z.string(),
|
|
13457
|
+
owner: z.string().min(1),
|
|
13458
|
+
values: z.record(z.string(), z.unknown())
|
|
13459
|
+
}), ClaimOutcomeSchema, {
|
|
13460
|
+
kind: "mutation",
|
|
13461
|
+
auth: "admin"
|
|
13462
|
+
}),
|
|
13463
|
+
/**
|
|
13464
|
+
* Hand the cap back. A `replace` re-emits the native slice exactly as last
|
|
13465
|
+
* written; an `add` leaves the mirror. `not-claimed` also removes a stale
|
|
13466
|
+
* index entry — the index self-heals through this method.
|
|
13467
|
+
*/
|
|
13468
|
+
releaseClaim: method(z.object({
|
|
13469
|
+
deviceId: z.number(),
|
|
13470
|
+
capName: z.string(),
|
|
13471
|
+
owner: z.string().min(1)
|
|
13472
|
+
}), ClaimOutcomeSchema, {
|
|
13473
|
+
kind: "mutation",
|
|
13474
|
+
auth: "admin"
|
|
13475
|
+
}),
|
|
13476
|
+
/** Every claim the index lists, optionally those whose owner starts with `ownerPrefix`. */
|
|
13477
|
+
listClaims: method(z.object({ ownerPrefix: z.string().optional() }), ClaimsListingSchema, { auth: "admin" }),
|
|
13478
|
+
/**
|
|
13479
|
+
* The NATIVE slice — what the provider wrote, the shadow under a `replace`
|
|
13480
|
+
* claim — for the owner's derived reads. Admin-only (D224, ruled in the
|
|
13481
|
+
* Task 6 review): the shadow is a second truth beside the merge, and the
|
|
13482
|
+
* event channel already refuses it to everyone but the composer; a
|
|
13483
|
+
* protected read of it would hand out what the events withhold.
|
|
13484
|
+
*/
|
|
13485
|
+
getNativeCapSlice: method(z.object({
|
|
13486
|
+
deviceId: z.number(),
|
|
13487
|
+
capName: z.string()
|
|
13488
|
+
}), z.record(z.string(), z.unknown()).nullable(), { auth: "admin" })
|
|
14280
13489
|
},
|
|
14281
13490
|
events: {
|
|
14282
13491
|
/**
|
|
@@ -30868,11 +30077,10 @@ var EXTENSION_HOST_DEVICE_TYPES = [DeviceType.Camera];
|
|
|
30868
30077
|
* `device-extension` — ONE place to see and author what a device is extended
|
|
30869
30078
|
* with by OTHER devices (D648).
|
|
30870
30079
|
*
|
|
30871
|
-
* **A contract, not a store.** Every slot (`linked-devices`,
|
|
30872
|
-
*
|
|
30873
|
-
*
|
|
30874
|
-
*
|
|
30875
|
-
* path. This cap persists nothing and has no config method (guarded by
|
|
30080
|
+
* **A contract, not a store.** Every slot (`linked-devices`, `doorbell-source`)
|
|
30081
|
+
* is declared by the cap that owns the function (`extensionSlots` in its
|
|
30082
|
+
* `*.cap.ts`, D4) and SERVED by the addon that already owns its store, over
|
|
30083
|
+
* that store and its existing write path. This cap persists nothing and has no config method (guarded by
|
|
30876
30084
|
* `scripts/check-extension-slots.ts`): D62 applied to the whole feature, and
|
|
30877
30085
|
* D3 — no shadow registry.
|
|
30878
30086
|
*
|
|
@@ -30893,6 +30101,11 @@ var EXTENSION_HOST_DEVICE_TYPES = [DeviceType.Camera];
|
|
|
30893
30101
|
* The slot's value travels as the generated discriminated union
|
|
30894
30102
|
* (`ExtensionSlotValue`, keyed on `slot`), so a value under the wrong slot is
|
|
30895
30103
|
* a schema error before it reaches any owner.
|
|
30104
|
+
*
|
|
30105
|
+
* **Associations only.** A slot LISTS other devices on its host. A host that
|
|
30106
|
+
* GAINS a capability from other devices is a composition (D663, amends D648:
|
|
30107
|
+
* the reserved `graft` shape, its `projects` and its `enabled` switch were
|
|
30108
|
+
* retired unimplemented).
|
|
30896
30109
|
*/
|
|
30897
30110
|
/** Separator between the source and the slot id in a `slotRef`. It is the
|
|
30898
30111
|
* D554 routing separator: the dispatcher matches `<source>:` prefixes. */
|
|
@@ -30915,7 +30128,7 @@ var ExtensionSourceSchema = z.object({
|
|
|
30915
30128
|
/**
|
|
30916
30129
|
* How one picked source stands. `missing` — no such device (deleted, or an id
|
|
30917
30130
|
* that never existed); `foreign` — a device the slot's owner cannot read from
|
|
30918
|
-
* (
|
|
30131
|
+
* (a source owned by another addon); `unavailable` — it exists but is not a
|
|
30919
30132
|
* valid source now (a container, which is never a pick). A source in any of
|
|
30920
30133
|
* these states is SHOWN, never silently dropped or re-pointed.
|
|
30921
30134
|
*/
|
|
@@ -30956,10 +30169,6 @@ var ExtensionSlotStateSchema = z.object({
|
|
|
30956
30169
|
slot: ExtensionSlotIdSchema,
|
|
30957
30170
|
/** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
|
|
30958
30171
|
authority: z.string(),
|
|
30959
|
-
/** graft: its switch. association: null — removing every source is "off". */
|
|
30960
|
-
enabled: z.boolean().nullable(),
|
|
30961
|
-
/** graft: the cap registered on the host. association: null. */
|
|
30962
|
-
projects: z.string().nullable(),
|
|
30963
30172
|
activation: ExtensionSlotActivationSchema.nullable(),
|
|
30964
30173
|
value: ExtensionSlotValueSchema,
|
|
30965
30174
|
sources: z.array(ExtensionSlotSourceSchema),
|
|
@@ -31010,7 +30219,8 @@ var ExtensionCandidatesSchema = z.object({ candidates: z.array(ExtensionCandidat
|
|
|
31010
30219
|
/**
|
|
31011
30220
|
* What a write did. `none` — applied in place. `host` / `parent` — the owner
|
|
31012
30221
|
* reloaded the host (or, for an accessory child, its parent) because the
|
|
31013
|
-
* write changed what the host REGISTERS
|
|
30222
|
+
* write changed what the host REGISTERS. A slot never adds a capability to its
|
|
30223
|
+
* host — that is a composition (D663) — so today's owners answer `none`.
|
|
31014
30224
|
*/
|
|
31015
30225
|
var ExtensionSetResultSchema = z.object({
|
|
31016
30226
|
applied: z.literal(true),
|
|
@@ -32640,7 +31850,9 @@ var batteryCapability = {
|
|
|
32640
31850
|
DeviceType.Camera,
|
|
32641
31851
|
DeviceType.Sensor,
|
|
32642
31852
|
DeviceType.Button,
|
|
32643
|
-
DeviceType.Switch
|
|
31853
|
+
DeviceType.Switch,
|
|
31854
|
+
DeviceType.PetFeeder,
|
|
31855
|
+
DeviceType.Container
|
|
32644
31856
|
],
|
|
32645
31857
|
methods: {
|
|
32646
31858
|
/**
|
|
@@ -32667,6 +31879,19 @@ wakeForStream: method(z.object({
|
|
|
32667
31879
|
awoke: z.boolean(),
|
|
32668
31880
|
durationMs: z.number()
|
|
32669
31881
|
}), { kind: "mutation" }) },
|
|
31882
|
+
/**
|
|
31883
|
+
* A composed provider (battery ADDED to a pet feeder or container that has
|
|
31884
|
+
* no wake surface) answers `wakeForStream` with the same "unavailable"
|
|
31885
|
+
* result the contract already defines above: "Returns `awoke: false` when
|
|
31886
|
+
* … the cap surface is unavailable." (D663).
|
|
31887
|
+
*/
|
|
31888
|
+
composedMethods: { wakeForStream: {
|
|
31889
|
+
kind: "answer",
|
|
31890
|
+
value: {
|
|
31891
|
+
awoke: false,
|
|
31892
|
+
durationMs: 0
|
|
31893
|
+
}
|
|
31894
|
+
} },
|
|
32670
31895
|
events: {
|
|
32671
31896
|
/**
|
|
32672
31897
|
* Emitted whenever the cached status changes (firmware push OR
|
|
@@ -32682,7 +31907,7 @@ onStatusChanged: { data: z.object({
|
|
|
32682
31907
|
schema: BatteryStatusSchema,
|
|
32683
31908
|
kind: "push",
|
|
32684
31909
|
empty: {
|
|
32685
|
-
percentage:
|
|
31910
|
+
percentage: null,
|
|
32686
31911
|
charging: "unknown",
|
|
32687
31912
|
sleeping: false,
|
|
32688
31913
|
lastUpdated: 0
|
|
@@ -33568,6 +32793,19 @@ var connectivityCapability = {
|
|
|
33568
32793
|
* provider populates it by guessing (no HA inference). The UI renders a
|
|
33569
32794
|
* "No consumables reported" placeholder when `items` is empty.
|
|
33570
32795
|
*/
|
|
32796
|
+
/** Units a remaining-life counter is reported in. Closed: the panel renders
|
|
32797
|
+
* each. */
|
|
32798
|
+
var ConsumableRemainingUnitSchema = z.enum([
|
|
32799
|
+
"days",
|
|
32800
|
+
"hours",
|
|
32801
|
+
"cycles"
|
|
32802
|
+
]);
|
|
32803
|
+
/** Remaining life as a COUNT, not a percentage (the PetKit desiccant reports
|
|
32804
|
+
* days). `value` null = unknown (D393). */
|
|
32805
|
+
var ConsumableRemainingSchema = z.object({
|
|
32806
|
+
value: z.number().min(0).nullable(),
|
|
32807
|
+
unit: ConsumableRemainingUnitSchema
|
|
32808
|
+
});
|
|
33571
32809
|
/** A single consumable item. Either a continuous `level` (remaining
|
|
33572
32810
|
* life %) or a discrete `status` may be known — both may be null when a
|
|
33573
32811
|
* provider only knows the item exists. `level` and `status` are not
|
|
@@ -33584,7 +32822,10 @@ var ConsumableItemSchema = z.object({
|
|
|
33584
32822
|
/** Ms epoch of the last replace, when known. */
|
|
33585
32823
|
lastResetAt: z.number().nullable(),
|
|
33586
32824
|
/** Whether `reset()` is meaningful for this item. */
|
|
33587
|
-
resettable: z.boolean()
|
|
32825
|
+
resettable: z.boolean(),
|
|
32826
|
+
/** Remaining life as a count (days/hours/cycles), when a provider reports
|
|
32827
|
+
* it that way instead of — or alongside — `level`. Absent = not reported. */
|
|
32828
|
+
remaining: ConsumableRemainingSchema.optional()
|
|
33588
32829
|
});
|
|
33589
32830
|
var ConsumablesStatusSchema = z.object({
|
|
33590
32831
|
items: z.array(ConsumableItemSchema),
|
|
@@ -33614,6 +32855,16 @@ reset: method(z.object({
|
|
|
33614
32855
|
kind: "mutation",
|
|
33615
32856
|
auth: "admin"
|
|
33616
32857
|
}) },
|
|
32858
|
+
/**
|
|
32859
|
+
* A composed consumable (item added to a device with no native consumables
|
|
32860
|
+
* provider) refuses `reset` by name: "Only meaningful when the item's
|
|
32861
|
+
* `resettable` is true" — a composed item is never resettable until
|
|
32862
|
+
* commands (`forward`) arrive in slice 3 (D663).
|
|
32863
|
+
*/
|
|
32864
|
+
composedMethods: { reset: {
|
|
32865
|
+
kind: "refuse",
|
|
32866
|
+
reason: "a composed consumable is not resettable until commands (forward) arrive — slice 3"
|
|
32867
|
+
} },
|
|
33617
32868
|
status: {
|
|
33618
32869
|
schema: ConsumablesStatusSchema,
|
|
33619
32870
|
kind: "push",
|
|
@@ -45190,8 +44441,6 @@ function createDeviceExtensionProvider(options) {
|
|
|
45190
44441
|
slotRef: extensionSlotRef(source, slot.slot),
|
|
45191
44442
|
slot: slot.slot,
|
|
45192
44443
|
authority: listing.authority,
|
|
45193
|
-
enabled: listing.enabled,
|
|
45194
|
-
projects: EXTENSION_SLOTS[slot.slot].descriptor.projects ?? null,
|
|
45195
44444
|
activation: listing.activation,
|
|
45196
44445
|
value: listing.value,
|
|
45197
44446
|
sources: [...listing.sources],
|
|
@@ -45226,44 +44475,68 @@ function createDeviceExtensionProvider(options) {
|
|
|
45226
44475
|
* through another composition, is refused at save by name (spec §2).
|
|
45227
44476
|
*
|
|
45228
44477
|
* The graph is built for ONE save: the CANDIDATE composition (the one being
|
|
45229
|
-
* validated) plus every STORED composition. The candidate
|
|
45230
|
-
*
|
|
45231
|
-
*
|
|
45232
|
-
*
|
|
45233
|
-
*
|
|
45234
|
-
*
|
|
44478
|
+
* validated) plus every STORED composition. The candidate replaces its own old
|
|
44479
|
+
* version, identified BY BLOCK ID wherever it sits in `stored` — whether a save
|
|
44480
|
+
* introduces or removes a cycle must never depend on array order. A DIFFERENT
|
|
44481
|
+
* block targeting the candidate's device is refused by name: one composition
|
|
44482
|
+
* per device (D663). Two different stored peers that (wrongly) target the same
|
|
44483
|
+
* device are corrupted state, not a cycle to resolve by picking one silently;
|
|
44484
|
+
* that is refused by name too (D391).
|
|
44485
|
+
*
|
|
44486
|
+
* A customization of an EXISTING device reads that device's NATIVE value for a
|
|
44487
|
+
* field it replaces or does not write ("Invert state" reads the `on` it
|
|
44488
|
+
* replaces): such a self-read is no edge, so it is never a cycle (D663).
|
|
44489
|
+
* Another composition reading that field reads the customizer's output.
|
|
45235
44490
|
*
|
|
45236
44491
|
* `findCompositionCycles` reports at least one cycle per cycle-SET (the DFS
|
|
45237
|
-
* marks a node `done` after its first expansion) —
|
|
45238
|
-
*
|
|
44492
|
+
* marks a node `done` after its first expansion) — not every elementary cycle
|
|
44493
|
+
* through a shared node, so the path it names may AVOID the candidate while
|
|
44494
|
+
* one through it goes unreported. What a save refuses is therefore decided per
|
|
44495
|
+
* strongly connected component (`findCandidateCycles`, C-1). A dotted
|
|
45239
44496
|
* `fieldPath` is matched only as an exact string: a write to `state.value` and
|
|
45240
44497
|
* a read of `state` would not connect (no nested field writes exist yet).
|
|
44498
|
+
*
|
|
44499
|
+
* An item leaf is its own node, `…#consumables.items[desiccant].status`
|
|
44500
|
+
* (`featureFieldEntries`), so two items sharing an inner path never merge. No
|
|
44501
|
+
* READ can name an array element (`describeStateField` never describes one),
|
|
44502
|
+
* so an item node is write-only: its edges to sources are what the check needs.
|
|
45241
44503
|
*/
|
|
45242
|
-
/** Two
|
|
44504
|
+
/** Two blocks' compositions target the same device — refused by name, never silently resolved. */
|
|
45243
44505
|
var CompositionGraphError = class extends Error {};
|
|
44506
|
+
/** `"cap.field"` of every field a peer writes — the same spelling as `compositionFieldKey`. */
|
|
44507
|
+
function writtenFields(peer) {
|
|
44508
|
+
return new Set(peer.composition.features.flatMap((feature) => feature.kind !== "fields" ? [] : featureFieldEntries(feature).map(({ fieldPath }) => `${feature.cap}.${fieldPath}`)));
|
|
44509
|
+
}
|
|
44510
|
+
/** A read of the peer's OWN device is an edge only when it reads the peer's own output (rule 5, D663). */
|
|
44511
|
+
function readsComposedValue(peer, written, read) {
|
|
44512
|
+
if (compositionSourceKey(read.source) !== compositionSourceKey(peer.target)) return true;
|
|
44513
|
+
const field = `${read.cap}.${read.fieldPath}`;
|
|
44514
|
+
return written.has(field) && peer.replaced?.has(field) !== true;
|
|
44515
|
+
}
|
|
45244
44516
|
function peerEdges(peer) {
|
|
45245
|
-
|
|
44517
|
+
const written = writtenFields(peer);
|
|
44518
|
+
return peer.composition.features.flatMap((feature) => feature.kind !== "fields" ? [] : featureFieldEntries(feature).map(({ fieldPath, source }) => [compositionReadKey({
|
|
45246
44519
|
source: peer.target,
|
|
45247
44520
|
cap: feature.cap,
|
|
45248
|
-
fieldPath
|
|
45249
|
-
}), fieldReads(source).map(compositionReadKey)]));
|
|
44521
|
+
fieldPath
|
|
44522
|
+
}), fieldReads(source).filter((read) => readsComposedValue(peer, written, read)).map(compositionReadKey)]));
|
|
45250
44523
|
}
|
|
45251
44524
|
/**
|
|
45252
|
-
* Every peer that actually takes part in the graph: each stored peer minus
|
|
45253
|
-
*
|
|
45254
|
-
*
|
|
45255
|
-
*
|
|
45256
|
-
* candidate
|
|
45257
|
-
* DIFFERENT stored peers (neither of them the candidate's own old version)
|
|
45258
|
-
* target the same device.
|
|
44525
|
+
* Every peer that actually takes part in the graph: each stored peer minus the
|
|
44526
|
+
* candidate's own old version (same block id — the drop happens before any
|
|
44527
|
+
* edge is built, so its old edges never enter the map), plus the candidate
|
|
44528
|
+
* itself, exactly once. Throws {@link CompositionGraphError} when a DIFFERENT
|
|
44529
|
+
* block targets the candidate's device, or two stored peers share a device.
|
|
45259
44530
|
*/
|
|
45260
44531
|
function resolvedPeers(candidate, stored) {
|
|
45261
44532
|
const candidateKey = compositionSourceKey(candidate.target);
|
|
45262
44533
|
const survivors = /* @__PURE__ */ new Map();
|
|
45263
44534
|
for (const peer of stored) {
|
|
44535
|
+
if (peer.blockId === candidate.blockId) continue;
|
|
45264
44536
|
const key = compositionSourceKey(peer.target);
|
|
45265
|
-
if (key === candidateKey)
|
|
45266
|
-
|
|
44537
|
+
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`);
|
|
44538
|
+
const clash = survivors.get(key);
|
|
44539
|
+
if (clash !== void 0) throw new CompositionGraphError(`two stored compositions (\`${clash.blockId}\`, \`${peer.blockId}\`) both target device \`${key}\` — refusing to build the field graph`);
|
|
45267
44540
|
survivors.set(key, peer);
|
|
45268
44541
|
}
|
|
45269
44542
|
return [...survivors.values(), candidate];
|
|
@@ -45292,172 +44565,215 @@ function findCompositionCycles(candidate, stored) {
|
|
|
45292
44565
|
for (const node of edges.keys()) visit(node, []);
|
|
45293
44566
|
return [...found.values()];
|
|
45294
44567
|
}
|
|
44568
|
+
/** Tarjan's strongly connected components over every node of the graph (sources included). */
|
|
44569
|
+
function stronglyConnected(edges) {
|
|
44570
|
+
const index = /* @__PURE__ */ new Map();
|
|
44571
|
+
const low = /* @__PURE__ */ new Map();
|
|
44572
|
+
const onStack = /* @__PURE__ */ new Set();
|
|
44573
|
+
const stack = [];
|
|
44574
|
+
const components = [];
|
|
44575
|
+
const connect = (node) => {
|
|
44576
|
+
index.set(node, index.size);
|
|
44577
|
+
low.set(node, index.get(node) ?? 0);
|
|
44578
|
+
stack.push(node);
|
|
44579
|
+
onStack.add(node);
|
|
44580
|
+
for (const next of edges.get(node) ?? []) if (!index.has(next)) {
|
|
44581
|
+
connect(next);
|
|
44582
|
+
low.set(node, Math.min(low.get(node) ?? 0, low.get(next) ?? 0));
|
|
44583
|
+
} else if (onStack.has(next)) low.set(node, Math.min(low.get(node) ?? 0, index.get(next) ?? 0));
|
|
44584
|
+
if (low.get(node) !== index.get(node)) return;
|
|
44585
|
+
const component = [];
|
|
44586
|
+
for (let member = stack.pop(); member !== void 0; member = stack.pop()) {
|
|
44587
|
+
onStack.delete(member);
|
|
44588
|
+
component.push(member);
|
|
44589
|
+
if (member === node) break;
|
|
44590
|
+
}
|
|
44591
|
+
components.push(component);
|
|
44592
|
+
};
|
|
44593
|
+
for (const node of edges.keys()) if (!index.has(node)) connect(node);
|
|
44594
|
+
return components;
|
|
44595
|
+
}
|
|
44596
|
+
/** The shortest walk from `start` back to itself inside `component` (one exists: the component has a cycle). */
|
|
44597
|
+
function cycleThrough(start, component, edges) {
|
|
44598
|
+
const parent = /* @__PURE__ */ new Map();
|
|
44599
|
+
const queue = [start];
|
|
44600
|
+
for (let head = 0; head < queue.length; head += 1) {
|
|
44601
|
+
const node = queue[head];
|
|
44602
|
+
if (node === void 0) break;
|
|
44603
|
+
for (const next of edges.get(node) ?? []) {
|
|
44604
|
+
if (next === start) {
|
|
44605
|
+
const chain = [];
|
|
44606
|
+
for (let at = node; at !== void 0 && at !== start; at = parent.get(at)) chain.push(at);
|
|
44607
|
+
return [
|
|
44608
|
+
start,
|
|
44609
|
+
...chain.reverse(),
|
|
44610
|
+
start
|
|
44611
|
+
];
|
|
44612
|
+
}
|
|
44613
|
+
if (!component.has(next) || parent.has(next)) continue;
|
|
44614
|
+
parent.set(next, node);
|
|
44615
|
+
queue.push(next);
|
|
44616
|
+
}
|
|
44617
|
+
}
|
|
44618
|
+
return [start, start];
|
|
44619
|
+
}
|
|
44620
|
+
/**
|
|
44621
|
+
* The cycles THIS save closes, decided per strongly connected component — never
|
|
44622
|
+
* per reported DFS path, which names one back-edge per revisit and can report a
|
|
44623
|
+
* component's cycle by a path that avoids the candidate while the one through it
|
|
44624
|
+
* goes unreported. A component refuses when it holds a candidate node and a
|
|
44625
|
+
* cycle (more than one node, or a self-loop). Components without a candidate
|
|
44626
|
+
* node are not this save's cycles.
|
|
44627
|
+
*/
|
|
44628
|
+
function findCandidateCycles(candidate, stored) {
|
|
44629
|
+
const edges = compositionEdges(candidate, stored);
|
|
44630
|
+
const prefix = `${compositionSourceKey(candidate.target)}#`;
|
|
44631
|
+
return stronglyConnected(edges).flatMap((members) => {
|
|
44632
|
+
const start = members.find((n) => n.startsWith(prefix));
|
|
44633
|
+
if (start === void 0) return [];
|
|
44634
|
+
const component = new Set(members);
|
|
44635
|
+
const selfLoop = members.length === 1 && (edges.get(start) ?? []).includes(start);
|
|
44636
|
+
if (members.length === 1 && !selfLoop) return [];
|
|
44637
|
+
return [{
|
|
44638
|
+
path: cycleThrough(start, component, edges),
|
|
44639
|
+
component
|
|
44640
|
+
}];
|
|
44641
|
+
});
|
|
44642
|
+
}
|
|
45295
44643
|
//#endregion
|
|
45296
|
-
//#region src/
|
|
45297
|
-
|
|
45298
|
-
|
|
44644
|
+
//#region src/device/schema-fields.ts
|
|
44645
|
+
/** Unwrap ZodNullable / ZodOptional / ZodDefault wrappers to reach the inner type.
|
|
44646
|
+
* Zod v4 exposes `.unwrap()` on all three wrapper classes. */
|
|
44647
|
+
function unwrapSchema(schema) {
|
|
44648
|
+
let s = schema;
|
|
44649
|
+
while (s instanceof z.ZodNullable || s instanceof z.ZodOptional || s instanceof z.ZodDefault) s = s.unwrap();
|
|
44650
|
+
return s;
|
|
45299
44651
|
}
|
|
45300
|
-
function
|
|
45301
|
-
|
|
45302
|
-
|
|
45303
|
-
|
|
45304
|
-
|
|
45305
|
-
fatal: reading.fatal
|
|
45306
|
-
};
|
|
45307
|
-
return {
|
|
45308
|
-
state: reading.state,
|
|
45309
|
-
value: reading.value,
|
|
45310
|
-
reason: reading.state === "stale" ? `${describeRead(read)}: ${reading.reason}` : null,
|
|
45311
|
-
deadline: null
|
|
44652
|
+
function leafKind(schema) {
|
|
44653
|
+
const s = unwrapSchema(schema);
|
|
44654
|
+
if (s instanceof z.ZodEnum) return {
|
|
44655
|
+
kind: "enum",
|
|
44656
|
+
enumValues: s.options
|
|
45312
44657
|
};
|
|
44658
|
+
if (s instanceof z.ZodNumber) return { kind: "number" };
|
|
44659
|
+
if (s instanceof z.ZodString) return { kind: "string" };
|
|
44660
|
+
if (s instanceof z.ZodBoolean) return { kind: "boolean" };
|
|
44661
|
+
return null;
|
|
45313
44662
|
}
|
|
45314
|
-
|
|
45315
|
-
|
|
45316
|
-
|
|
45317
|
-
|
|
45318
|
-
|
|
45319
|
-
|
|
45320
|
-
|
|
45321
|
-
|
|
45322
|
-
|
|
45323
|
-
|
|
45324
|
-
const
|
|
45325
|
-
|
|
45326
|
-
|
|
45327
|
-
|
|
45328
|
-
value: null,
|
|
45329
|
-
reason: `binding \`${name}\` (${describeRead(binding)}): ${reading.reason}`,
|
|
45330
|
-
fatal: reading.fatal
|
|
45331
|
-
};
|
|
45332
|
-
if (reading.fatal) {
|
|
45333
|
-
fatalUnavailable = outcome;
|
|
45334
|
-
break;
|
|
45335
|
-
}
|
|
45336
|
-
if (nonFatalUnavailable === null) nonFatalUnavailable = outcome;
|
|
44663
|
+
/** Walk a cap status schema into flat wireable leaf fields (dotted paths).
|
|
44664
|
+
* Recurses into nested ZodObject (unwrapping nullable/optional/default first),
|
|
44665
|
+
* so fields with null live values are still offered. Arrays / unknown shapes
|
|
44666
|
+
* are skipped — never throws. */
|
|
44667
|
+
function enumerateSchemaFields(schema, prefix = "") {
|
|
44668
|
+
const root = unwrapSchema(schema);
|
|
44669
|
+
if (!(root instanceof z.ZodObject)) return [];
|
|
44670
|
+
const out = [];
|
|
44671
|
+
const shape = root.shape;
|
|
44672
|
+
for (const [key, field] of Object.entries(shape)) {
|
|
44673
|
+
const path = prefix ? `${prefix}.${key}` : key;
|
|
44674
|
+
const inner = unwrapSchema(field);
|
|
44675
|
+
if (inner instanceof z.ZodObject) {
|
|
44676
|
+
out.push(...enumerateSchemaFields(inner, path));
|
|
45337
44677
|
continue;
|
|
45338
44678
|
}
|
|
45339
|
-
|
|
45340
|
-
if (
|
|
44679
|
+
const leaf = leafKind(field);
|
|
44680
|
+
if (leaf) out.push({
|
|
44681
|
+
path,
|
|
44682
|
+
kind: leaf.kind,
|
|
44683
|
+
...leaf.enumValues ? { enumValues: leaf.enumValues } : {}
|
|
44684
|
+
});
|
|
45341
44685
|
}
|
|
45342
|
-
|
|
45343
|
-
if (nonFatalUnavailable !== null) return nonFatalUnavailable;
|
|
45344
|
-
const deadlines = [];
|
|
45345
|
-
const result = evaluateExpressionSource(source.expr, values, now, { hooks: { noteDeadline: (at) => deadlines.push(at) } });
|
|
45346
|
-
if (!result.ok) return {
|
|
45347
|
-
state: "unavailable",
|
|
45348
|
-
value: null,
|
|
45349
|
-
reason: `the expression failed: ${result.error}`,
|
|
45350
|
-
fatal: false
|
|
45351
|
-
};
|
|
45352
|
-
return {
|
|
45353
|
-
state: staleReasons.length > 0 ? "stale" : "fresh",
|
|
45354
|
-
value: result.value,
|
|
45355
|
-
reason: staleReasons.length > 0 ? staleReasons.join("; ") : null,
|
|
45356
|
-
deadline: deadlines.length > 0 ? Math.min(...deadlines) : null
|
|
45357
|
-
};
|
|
44686
|
+
return out;
|
|
45358
44687
|
}
|
|
45359
|
-
|
|
45360
|
-
|
|
45361
|
-
|
|
45362
|
-
|
|
45363
|
-
|
|
45364
|
-
|
|
45365
|
-
|
|
45366
|
-
|
|
45367
|
-
|
|
45368
|
-
|
|
45369
|
-
};
|
|
45370
|
-
}
|
|
44688
|
+
/** Enumerate the per-item wireable fields of an item-array cap (see
|
|
44689
|
+
* `CapabilityStatusItemArray`): the item schema's leaf fields, minus the
|
|
44690
|
+
* `keyField` (the key comes from the link's `itemKey`, never from a wired
|
|
44691
|
+
* source), each tagged `item: true` so the authoring UI collects an
|
|
44692
|
+
* `itemKey` alongside the field. Never throws. */
|
|
44693
|
+
function enumerateItemArrayFields(itemArray) {
|
|
44694
|
+
return enumerateSchemaFields(itemArray.itemSchema).filter((f) => f.path !== itemArray.keyField).map((f) => ({
|
|
44695
|
+
...f,
|
|
44696
|
+
item: true
|
|
44697
|
+
}));
|
|
45371
44698
|
}
|
|
45372
44699
|
//#endregion
|
|
45373
|
-
//#region src/composition/
|
|
44700
|
+
//#region src/composition/state-fields.ts
|
|
45374
44701
|
/**
|
|
45375
|
-
*
|
|
45376
|
-
*
|
|
45377
|
-
*
|
|
45378
|
-
* §4 item 4 asked for one).
|
|
44702
|
+
* What a capability's state field IS: kind, nullability, whether required. The
|
|
44703
|
+
* validator needs nullability, which `enumerateSchemaFields` does not report,
|
|
44704
|
+
* and that decides a field's unavailable mode (D393).
|
|
45379
44705
|
*/
|
|
45380
|
-
|
|
45381
|
-
|
|
45382
|
-
{
|
|
45383
|
-
|
|
45384
|
-
|
|
45385
|
-
|
|
45386
|
-
|
|
45387
|
-
|
|
45388
|
-
stableId: "sensor.sofa_temperature"
|
|
45389
|
-
},
|
|
45390
|
-
{
|
|
45391
|
-
addonId: "provider-homeassistant",
|
|
45392
|
-
stableId: "sensor.window_temperature"
|
|
44706
|
+
function fieldAt(schema, path) {
|
|
44707
|
+
let current = schema;
|
|
44708
|
+
for (const segment of path.split(".")) {
|
|
44709
|
+
const container = unwrapSchema(current);
|
|
44710
|
+
if (!(container instanceof z.ZodObject)) return null;
|
|
44711
|
+
const next = container.shape[segment];
|
|
44712
|
+
if (!(next instanceof z.ZodType)) return null;
|
|
44713
|
+
current = next;
|
|
45393
44714
|
}
|
|
45394
|
-
|
|
45395
|
-
|
|
45396
|
-
|
|
45397
|
-
|
|
45398
|
-
|
|
45399
|
-
|
|
45400
|
-
|
|
45401
|
-
}];
|
|
45402
|
-
function from(source, cap, fieldPath) {
|
|
44715
|
+
return current;
|
|
44716
|
+
}
|
|
44717
|
+
function describeStateField(schema, path) {
|
|
44718
|
+
const leaf = enumerateSchemaFields(schema).find((f) => f.path === path);
|
|
44719
|
+
if (leaf === void 0) return null;
|
|
44720
|
+
const field = fieldAt(schema, path);
|
|
44721
|
+
if (field === null) return null;
|
|
45403
44722
|
return {
|
|
45404
|
-
|
|
45405
|
-
|
|
45406
|
-
|
|
45407
|
-
|
|
44723
|
+
path,
|
|
44724
|
+
kind: leaf.kind,
|
|
44725
|
+
nullable: field.safeParse(null).success,
|
|
44726
|
+
required: !field.safeParse(void 0).success,
|
|
44727
|
+
...leaf.enumValues === void 0 ? {} : { enumValues: leaf.enumValues }
|
|
45408
44728
|
};
|
|
45409
44729
|
}
|
|
45410
|
-
function
|
|
45411
|
-
return
|
|
44730
|
+
function describeTopLevelStateFields(schema) {
|
|
44731
|
+
return new Map(enumerateSchemaFields(schema).filter((f) => !f.path.includes(".")).flatMap((f) => {
|
|
44732
|
+
const described = describeStateField(schema, f.path);
|
|
44733
|
+
return described === null ? [] : [[f.path, described]];
|
|
44734
|
+
}));
|
|
45412
44735
|
}
|
|
45413
|
-
|
|
45414
|
-
|
|
45415
|
-
const
|
|
45416
|
-
|
|
45417
|
-
|
|
45418
|
-
|
|
45419
|
-
|
|
45420
|
-
|
|
45421
|
-
|
|
45422
|
-
|
|
45423
|
-
|
|
45424
|
-
|
|
45425
|
-
|
|
45426
|
-
|
|
45427
|
-
|
|
45428
|
-
|
|
45429
|
-
|
|
45430
|
-
expr: `round(avg(${Object.keys(t).join(", ")}), 1)`,
|
|
45431
|
-
bindings: t
|
|
45432
|
-
},
|
|
45433
|
-
lastFetchedAt: {
|
|
45434
|
-
kind: "expression",
|
|
45435
|
-
expr: `max(${Object.keys(f).join(", ")})`,
|
|
45436
|
-
bindings: f
|
|
45437
|
-
}
|
|
45438
|
-
}
|
|
45439
|
-
}, {
|
|
45440
|
-
kind: "fields",
|
|
45441
|
-
cap: "binary",
|
|
45442
|
-
fields: {
|
|
45443
|
-
on: {
|
|
45444
|
-
kind: "expression",
|
|
45445
|
-
expr: `any(${[...Object.keys(d), ...windows].join(", ")})`,
|
|
45446
|
-
bindings: {
|
|
45447
|
-
...d,
|
|
45448
|
-
...m
|
|
45449
|
-
}
|
|
45450
|
-
},
|
|
45451
|
-
lastChangedAt: {
|
|
45452
|
-
kind: "expression",
|
|
45453
|
-
expr: "now",
|
|
45454
|
-
bindings: {}
|
|
45455
|
-
}
|
|
45456
|
-
}
|
|
45457
|
-
}]
|
|
44736
|
+
/** Top-level keys a value MUST carry: those whose schema refuses `undefined`. */
|
|
44737
|
+
function requiredTopLevelKeys(schema) {
|
|
44738
|
+
const root = unwrapSchema(schema);
|
|
44739
|
+
if (!(root instanceof z.ZodObject)) return [];
|
|
44740
|
+
return Object.entries(root.shape).flatMap(([key, field]) => field instanceof z.ZodType && !field.safeParse(void 0).success ? [key] : []);
|
|
44741
|
+
}
|
|
44742
|
+
/**
|
|
44743
|
+
* The proper prefixes of `path` whose schema accepts `undefined`: a required
|
|
44744
|
+
* leaf under one of them is required only once something writes that parent
|
|
44745
|
+
* (`remaining.unit` is required only when `remaining` is present).
|
|
44746
|
+
*/
|
|
44747
|
+
function optionalAncestors(schema, path) {
|
|
44748
|
+
const segments = path.split(".");
|
|
44749
|
+
return segments.slice(0, -1).flatMap((_, i) => {
|
|
44750
|
+
const prefix = segments.slice(0, i + 1).join(".");
|
|
44751
|
+
const field = fieldAt(schema, prefix);
|
|
44752
|
+
return field !== null && field.safeParse(void 0).success ? [prefix] : [];
|
|
45458
44753
|
});
|
|
45459
44754
|
}
|
|
45460
44755
|
//#endregion
|
|
44756
|
+
//#region src/composition/plan-result.ts
|
|
44757
|
+
function problem(code, path, message) {
|
|
44758
|
+
return {
|
|
44759
|
+
code,
|
|
44760
|
+
path,
|
|
44761
|
+
message
|
|
44762
|
+
};
|
|
44763
|
+
}
|
|
44764
|
+
function refused(...problems) {
|
|
44765
|
+
return {
|
|
44766
|
+
problems,
|
|
44767
|
+
fields: [],
|
|
44768
|
+
features: []
|
|
44769
|
+
};
|
|
44770
|
+
}
|
|
44771
|
+
/** Where a planned field sits in the composition: `features[N].fields.<path>` or `features[N].items.<key>.fields.<path>`. */
|
|
44772
|
+
function compositionFieldAt(field) {
|
|
44773
|
+
const inner = field.item === void 0 ? "fields" : `items.${field.item.key}.fields`;
|
|
44774
|
+
return `features[${field.featureIndex}].${inner}.${field.path}`;
|
|
44775
|
+
}
|
|
44776
|
+
//#endregion
|
|
45461
44777
|
//#region src/composition/expression-kinds.ts
|
|
45462
44778
|
var NUMBER = {
|
|
45463
44779
|
kind: "fixed",
|
|
@@ -45489,6 +44805,10 @@ var BUILTIN_RESULT_KINDS = Object.freeze({
|
|
|
45489
44805
|
latest: {
|
|
45490
44806
|
kind: "fixed",
|
|
45491
44807
|
result: ["number", "null"]
|
|
44808
|
+
},
|
|
44809
|
+
number: {
|
|
44810
|
+
kind: "fixed",
|
|
44811
|
+
result: ["number", "null"]
|
|
45492
44812
|
}
|
|
45493
44813
|
});
|
|
45494
44814
|
var KindInferenceError = class extends Error {};
|
|
@@ -45568,129 +44888,14 @@ function inferExpressionKinds(input) {
|
|
|
45568
44888
|
}
|
|
45569
44889
|
}
|
|
45570
44890
|
//#endregion
|
|
45571
|
-
//#region src/
|
|
45572
|
-
/** Unwrap ZodNullable / ZodOptional / ZodDefault wrappers to reach the inner type.
|
|
45573
|
-
* Zod v4 exposes `.unwrap()` on all three wrapper classes. */
|
|
45574
|
-
function unwrapSchema(schema) {
|
|
45575
|
-
let s = schema;
|
|
45576
|
-
while (s instanceof z.ZodNullable || s instanceof z.ZodOptional || s instanceof z.ZodDefault) s = s.unwrap();
|
|
45577
|
-
return s;
|
|
45578
|
-
}
|
|
45579
|
-
function leafKind(schema) {
|
|
45580
|
-
const s = unwrapSchema(schema);
|
|
45581
|
-
if (s instanceof z.ZodEnum) return {
|
|
45582
|
-
kind: "enum",
|
|
45583
|
-
enumValues: s.options
|
|
45584
|
-
};
|
|
45585
|
-
if (s instanceof z.ZodNumber) return { kind: "number" };
|
|
45586
|
-
if (s instanceof z.ZodString) return { kind: "string" };
|
|
45587
|
-
if (s instanceof z.ZodBoolean) return { kind: "boolean" };
|
|
45588
|
-
return null;
|
|
45589
|
-
}
|
|
45590
|
-
/** Walk a cap status schema into flat wireable leaf fields (dotted paths).
|
|
45591
|
-
* Recurses into nested ZodObject (unwrapping nullable/optional/default first),
|
|
45592
|
-
* so fields with null live values are still offered. Arrays / unknown shapes
|
|
45593
|
-
* are skipped — never throws. */
|
|
45594
|
-
function enumerateSchemaFields(schema, prefix = "") {
|
|
45595
|
-
const root = unwrapSchema(schema);
|
|
45596
|
-
if (!(root instanceof z.ZodObject)) return [];
|
|
45597
|
-
const out = [];
|
|
45598
|
-
const shape = root.shape;
|
|
45599
|
-
for (const [key, field] of Object.entries(shape)) {
|
|
45600
|
-
const path = prefix ? `${prefix}.${key}` : key;
|
|
45601
|
-
const inner = unwrapSchema(field);
|
|
45602
|
-
if (inner instanceof z.ZodObject) {
|
|
45603
|
-
out.push(...enumerateSchemaFields(inner, path));
|
|
45604
|
-
continue;
|
|
45605
|
-
}
|
|
45606
|
-
const leaf = leafKind(field);
|
|
45607
|
-
if (leaf) out.push({
|
|
45608
|
-
path,
|
|
45609
|
-
kind: leaf.kind,
|
|
45610
|
-
...leaf.enumValues ? { enumValues: leaf.enumValues } : {}
|
|
45611
|
-
});
|
|
45612
|
-
}
|
|
45613
|
-
return out;
|
|
45614
|
-
}
|
|
45615
|
-
/** Enumerate the per-item wireable fields of an item-array cap (see
|
|
45616
|
-
* `CapabilityStatusItemArray`): the item schema's leaf fields, minus the
|
|
45617
|
-
* `keyField` (the key comes from the link's `itemKey`, never from a wired
|
|
45618
|
-
* source), each tagged `item: true` so the authoring UI collects an
|
|
45619
|
-
* `itemKey` alongside the field. Never throws. */
|
|
45620
|
-
function enumerateItemArrayFields(itemArray) {
|
|
45621
|
-
return enumerateSchemaFields(itemArray.itemSchema).filter((f) => f.path !== itemArray.keyField).map((f) => ({
|
|
45622
|
-
...f,
|
|
45623
|
-
item: true
|
|
45624
|
-
}));
|
|
45625
|
-
}
|
|
45626
|
-
//#endregion
|
|
45627
|
-
//#region src/composition/state-fields.ts
|
|
44891
|
+
//#region src/composition/field-kinds.ts
|
|
45628
44892
|
/**
|
|
45629
|
-
*
|
|
45630
|
-
*
|
|
45631
|
-
*
|
|
44893
|
+
* The kind half of planning a composition field (D659): which kinds a source
|
|
44894
|
+
* can produce, whether they fit a target field, and the field's role.
|
|
44895
|
+
* Shared by the top-level planner (`validate-composition.ts`) and the item
|
|
44896
|
+
* planner (`composition-items.ts`). Internal to the composition module — NOT
|
|
44897
|
+
* in the barrel: these are planner internals, not a published contract.
|
|
45632
44898
|
*/
|
|
45633
|
-
function fieldAt(schema, path) {
|
|
45634
|
-
let current = schema;
|
|
45635
|
-
for (const segment of path.split(".")) {
|
|
45636
|
-
const container = unwrapSchema(current);
|
|
45637
|
-
if (!(container instanceof z.ZodObject)) return null;
|
|
45638
|
-
const next = container.shape[segment];
|
|
45639
|
-
if (!(next instanceof z.ZodType)) return null;
|
|
45640
|
-
current = next;
|
|
45641
|
-
}
|
|
45642
|
-
return current;
|
|
45643
|
-
}
|
|
45644
|
-
function describeStateField(schema, path) {
|
|
45645
|
-
const leaf = enumerateSchemaFields(schema).find((f) => f.path === path);
|
|
45646
|
-
if (leaf === void 0) return null;
|
|
45647
|
-
const field = fieldAt(schema, path);
|
|
45648
|
-
if (field === null) return null;
|
|
45649
|
-
return {
|
|
45650
|
-
path,
|
|
45651
|
-
kind: leaf.kind,
|
|
45652
|
-
nullable: field.safeParse(null).success,
|
|
45653
|
-
required: !field.safeParse(void 0).success,
|
|
45654
|
-
...leaf.enumValues === void 0 ? {} : { enumValues: leaf.enumValues }
|
|
45655
|
-
};
|
|
45656
|
-
}
|
|
45657
|
-
function describeTopLevelStateFields(schema) {
|
|
45658
|
-
return new Map(enumerateSchemaFields(schema).filter((f) => !f.path.includes(".")).flatMap((f) => {
|
|
45659
|
-
const described = describeStateField(schema, f.path);
|
|
45660
|
-
return described === null ? [] : [[f.path, described]];
|
|
45661
|
-
}));
|
|
45662
|
-
}
|
|
45663
|
-
/** Top-level keys a value MUST carry: those whose schema refuses `undefined`. */
|
|
45664
|
-
function requiredTopLevelKeys(schema) {
|
|
45665
|
-
const root = unwrapSchema(schema);
|
|
45666
|
-
if (!(root instanceof z.ZodObject)) return [];
|
|
45667
|
-
return Object.entries(root.shape).flatMap(([key, field]) => field instanceof z.ZodType && !field.safeParse(void 0).success ? [key] : []);
|
|
45668
|
-
}
|
|
45669
|
-
//#endregion
|
|
45670
|
-
//#region src/composition/validate-composition.ts
|
|
45671
|
-
function buildCapabilityLookup(defs) {
|
|
45672
|
-
const byName = new Map(defs.map((d) => [d.name, d]));
|
|
45673
|
-
return (capName) => byName.get(capName) ?? null;
|
|
45674
|
-
}
|
|
45675
|
-
/** Caps every `BaseDevice` registers on itself; a second registration throws. */
|
|
45676
|
-
var BASE_DEVICE_CAPS = new Set(["device-status", "feature-probe"]);
|
|
45677
|
-
var PENDING_SELF = {
|
|
45678
|
-
addonId: COMPOSER_ADDON_ID,
|
|
45679
|
-
stableId: `${COMPOSED_DEVICE_STABLE_ID_PREFIX}(unsaved)`
|
|
45680
|
-
};
|
|
45681
|
-
function problem(code, path, message) {
|
|
45682
|
-
return {
|
|
45683
|
-
code,
|
|
45684
|
-
path,
|
|
45685
|
-
message
|
|
45686
|
-
};
|
|
45687
|
-
}
|
|
45688
|
-
function refused(...problems) {
|
|
45689
|
-
return {
|
|
45690
|
-
problems,
|
|
45691
|
-
fields: []
|
|
45692
|
-
};
|
|
45693
|
-
}
|
|
45694
44899
|
function readKinds(read, lookupCap) {
|
|
45695
44900
|
const def = lookupCap(read.cap);
|
|
45696
44901
|
const schema = def?.runtimeState ?? def?.status?.schema;
|
|
@@ -45789,74 +44994,600 @@ function roleOf(source) {
|
|
|
45789
44994
|
const compiled = compileExpressionSafe(source.expr);
|
|
45790
44995
|
return compiled.ok && compiled.parsed.identifiers.has("now") ? "clock" : "constant";
|
|
45791
44996
|
}
|
|
45792
|
-
|
|
45793
|
-
|
|
44997
|
+
/**
|
|
44998
|
+
* How a planned field says "unavailable", per feature mode and AFTER `roleOf`
|
|
44999
|
+
* (D393, D663 rulings S1 + S1b). The composer cannot take a device it does not
|
|
45000
|
+
* own offline, and D393 forbids a stale number, so on an existing target a
|
|
45001
|
+
* field that READS a source never gets `offline`.
|
|
45002
|
+
*/
|
|
45003
|
+
function unavailableFor(tf, role, mode, cap, at) {
|
|
45004
|
+
if (mode === "new" || role !== "derived") return {
|
|
45005
|
+
ok: true,
|
|
45006
|
+
unavailable: tf.nullable ? "null" : "offline"
|
|
45007
|
+
};
|
|
45008
|
+
if (mode === "replace") return {
|
|
45009
|
+
ok: true,
|
|
45010
|
+
unavailable: "release"
|
|
45011
|
+
};
|
|
45012
|
+
if (tf.nullable) return {
|
|
45013
|
+
ok: true,
|
|
45014
|
+
unavailable: "null"
|
|
45015
|
+
};
|
|
45016
|
+
if (tf.enumValues?.includes("unknown") === true) return {
|
|
45017
|
+
ok: true,
|
|
45018
|
+
unavailable: "unknown"
|
|
45019
|
+
};
|
|
45020
|
+
return {
|
|
45021
|
+
ok: false,
|
|
45022
|
+
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)`)
|
|
45023
|
+
};
|
|
45024
|
+
}
|
|
45025
|
+
//#endregion
|
|
45026
|
+
//#region src/composition/composition-items.ts
|
|
45027
|
+
/** Item fields the composer writes itself, with the value it writes. */
|
|
45028
|
+
var COMPOSED_ITEM_FIXED_FIELDS = { resettable: false };
|
|
45029
|
+
function reservedItemFields(itemArray) {
|
|
45030
|
+
return new Set([
|
|
45031
|
+
itemArray.keyField,
|
|
45032
|
+
...itemArray.labelField === void 0 ? [] : [itemArray.labelField],
|
|
45033
|
+
...Object.keys(COMPOSED_ITEM_FIXED_FIELDS)
|
|
45034
|
+
]);
|
|
45035
|
+
}
|
|
45036
|
+
/** A required leaf under an optional parent is required only once something writes that parent. */
|
|
45037
|
+
function leafRequired(itemArray, path, written) {
|
|
45038
|
+
const described = describeStateField(itemArray.itemSchema, path);
|
|
45039
|
+
if (described === null || !described.required) return false;
|
|
45040
|
+
return optionalAncestors(itemArray.itemSchema, path).every((parent) => written.some((w) => w.startsWith(`${parent}.`)));
|
|
45041
|
+
}
|
|
45042
|
+
function missingLeaves({ capName, itemArray, reserved }, item, at) {
|
|
45043
|
+
const written = Object.keys(item.fields);
|
|
45044
|
+
return enumerateSchemaFields(itemArray.itemSchema).flatMap((leaf) => {
|
|
45045
|
+
if (reserved.has(leaf.path) || leaf.path in item.fields) return [];
|
|
45046
|
+
if (!leafRequired(itemArray, leaf.path, written)) return [];
|
|
45047
|
+
const described = describeStateField(itemArray.itemSchema, leaf.path);
|
|
45048
|
+
if (described === null || described.nullable) return [];
|
|
45049
|
+
return [problem("missing-field", `${at}.fields.${leaf.path}`, `\`${capName}.${itemArray.path}[].${leaf.path}\` is required and has no source`)];
|
|
45050
|
+
});
|
|
45051
|
+
}
|
|
45052
|
+
function planItemField(ctx, leaf) {
|
|
45053
|
+
const { capName, itemArray, featureIndex, lookupCap } = ctx;
|
|
45054
|
+
const { key, label, path, source } = leaf;
|
|
45055
|
+
const at = `features[${featureIndex}].items.${key}.fields.${path}`;
|
|
45056
|
+
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`));
|
|
45057
|
+
const tf = describeStateField(itemArray.itemSchema, path);
|
|
45058
|
+
if (tf === null) return refused(problem("unknown-field", at, `a \`${capName}\` item has no field \`${path}\``));
|
|
45059
|
+
const kinds = sourceKinds(source, lookupCap);
|
|
45060
|
+
if (!kinds.ok) return refused(problem(kinds.code, at, kinds.message));
|
|
45061
|
+
const role = roleOf(source);
|
|
45062
|
+
const unavailable = unavailableFor(tf, role, ctx.mode, capName, at);
|
|
45063
|
+
if (!unavailable.ok) return refused(unavailable.problem);
|
|
45064
|
+
const plan = {
|
|
45065
|
+
cap: capName,
|
|
45066
|
+
path,
|
|
45067
|
+
item: {
|
|
45068
|
+
arrayPath: itemArray.path,
|
|
45069
|
+
key,
|
|
45070
|
+
label
|
|
45071
|
+
},
|
|
45072
|
+
featureIndex,
|
|
45073
|
+
kind: tf.kind,
|
|
45074
|
+
nullable: tf.nullable,
|
|
45075
|
+
required: tf.required,
|
|
45076
|
+
unavailable: unavailable.unavailable,
|
|
45077
|
+
role,
|
|
45078
|
+
source,
|
|
45079
|
+
reads: [...fieldReads(source)]
|
|
45080
|
+
};
|
|
45081
|
+
const enumProblem = enumLiteralProblem(capName, tf, source, at);
|
|
45082
|
+
return {
|
|
45083
|
+
problems: [...compatibility(capName, tf, kinds.kinds, at), ...enumProblem === null ? [] : [enumProblem]],
|
|
45084
|
+
fields: [plan],
|
|
45085
|
+
features: []
|
|
45086
|
+
};
|
|
45087
|
+
}
|
|
45088
|
+
function planItems(def, feature, featureIndex, lookupCap, mode = "new") {
|
|
45089
|
+
const at = `features[${featureIndex}].items`;
|
|
45090
|
+
const itemArray = def.status?.itemArray;
|
|
45091
|
+
if (itemArray === void 0) return refused(problem("not-item-array", at, `\`${def.name}\` has no item array — it takes no \`items\``));
|
|
45092
|
+
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`));
|
|
45093
|
+
const ctx = {
|
|
45094
|
+
capName: def.name,
|
|
45095
|
+
itemArray,
|
|
45096
|
+
reserved: reservedItemFields(itemArray),
|
|
45097
|
+
featureIndex,
|
|
45098
|
+
lookupCap,
|
|
45099
|
+
mode
|
|
45100
|
+
};
|
|
45101
|
+
const results = Object.entries(feature.items ?? {}).flatMap(([key, item]) => [{
|
|
45102
|
+
problems: missingLeaves(ctx, item, `${at}.${key}`),
|
|
45103
|
+
fields: [],
|
|
45104
|
+
features: []
|
|
45105
|
+
}, ...Object.entries(item.fields).map(([path, source]) => planItemField(ctx, {
|
|
45106
|
+
key,
|
|
45107
|
+
label: item.label,
|
|
45108
|
+
path,
|
|
45109
|
+
source
|
|
45110
|
+
}))]);
|
|
45111
|
+
return {
|
|
45112
|
+
problems: results.flatMap((r) => r.problems),
|
|
45113
|
+
fields: results.flatMap((r) => r.fields),
|
|
45114
|
+
features: []
|
|
45115
|
+
};
|
|
45116
|
+
}
|
|
45117
|
+
//#endregion
|
|
45118
|
+
//#region src/composition/evaluate-field.ts
|
|
45119
|
+
function describeRead(read) {
|
|
45120
|
+
return `${compositionSourceKey(read.source)} ${read.cap}.${read.fieldPath}`;
|
|
45121
|
+
}
|
|
45122
|
+
function isConfirmed(reading) {
|
|
45123
|
+
return reading.fatal || reading.confirmed === true;
|
|
45124
|
+
}
|
|
45125
|
+
function fromReading(reading, read) {
|
|
45126
|
+
if (reading.state === "unavailable") return {
|
|
45127
|
+
state: "unavailable",
|
|
45128
|
+
value: null,
|
|
45129
|
+
reason: `${describeRead(read)}: ${reading.reason}`,
|
|
45130
|
+
fatal: reading.fatal,
|
|
45131
|
+
confirmed: isConfirmed(reading)
|
|
45132
|
+
};
|
|
45133
|
+
return {
|
|
45134
|
+
state: reading.state,
|
|
45135
|
+
value: reading.value,
|
|
45136
|
+
reason: reading.state === "stale" ? `${describeRead(read)}: ${reading.reason}` : null,
|
|
45137
|
+
deadline: null
|
|
45138
|
+
};
|
|
45139
|
+
}
|
|
45140
|
+
function expressionOutcome(source, read, now) {
|
|
45141
|
+
const values = {};
|
|
45142
|
+
const staleReasons = [];
|
|
45143
|
+
let fatalUnavailable = null;
|
|
45144
|
+
let nonFatalUnavailable = null;
|
|
45145
|
+
for (const [name, binding] of Object.entries(source.bindings)) {
|
|
45146
|
+
if (binding.kind === "literal") {
|
|
45147
|
+
values[name] = binding.value;
|
|
45148
|
+
continue;
|
|
45149
|
+
}
|
|
45150
|
+
const reading = read(binding);
|
|
45151
|
+
if (reading.state === "unavailable") {
|
|
45152
|
+
const outcome = {
|
|
45153
|
+
state: "unavailable",
|
|
45154
|
+
value: null,
|
|
45155
|
+
reason: `binding \`${name}\` (${describeRead(binding)}): ${reading.reason}`,
|
|
45156
|
+
fatal: reading.fatal,
|
|
45157
|
+
confirmed: isConfirmed(reading)
|
|
45158
|
+
};
|
|
45159
|
+
if (reading.fatal) {
|
|
45160
|
+
fatalUnavailable = outcome;
|
|
45161
|
+
break;
|
|
45162
|
+
}
|
|
45163
|
+
if (nonFatalUnavailable === null || outcome.confirmed && !nonFatalUnavailable.confirmed) nonFatalUnavailable = outcome;
|
|
45164
|
+
continue;
|
|
45165
|
+
}
|
|
45166
|
+
values[name] = reading.value;
|
|
45167
|
+
if (reading.state === "stale") staleReasons.push(`\`${name}\`: ${reading.reason}`);
|
|
45168
|
+
}
|
|
45169
|
+
if (fatalUnavailable !== null) return fatalUnavailable;
|
|
45170
|
+
if (nonFatalUnavailable !== null) return nonFatalUnavailable;
|
|
45171
|
+
const deadlines = [];
|
|
45172
|
+
const result = evaluateExpressionSource(source.expr, values, now, { hooks: { noteDeadline: (at) => deadlines.push(at) } });
|
|
45173
|
+
if (!result.ok) return {
|
|
45174
|
+
state: "unavailable",
|
|
45175
|
+
value: null,
|
|
45176
|
+
reason: `the expression failed: ${result.error}`,
|
|
45177
|
+
fatal: false,
|
|
45178
|
+
confirmed: true
|
|
45179
|
+
};
|
|
45180
|
+
return {
|
|
45181
|
+
state: staleReasons.length > 0 ? "stale" : "fresh",
|
|
45182
|
+
value: result.value,
|
|
45183
|
+
reason: staleReasons.length > 0 ? staleReasons.join("; ") : null,
|
|
45184
|
+
deadline: deadlines.length > 0 ? Math.min(...deadlines) : null
|
|
45185
|
+
};
|
|
45186
|
+
}
|
|
45187
|
+
function evaluateCompositionField(input) {
|
|
45188
|
+
const { source } = input;
|
|
45189
|
+
switch (source.kind) {
|
|
45190
|
+
case "from": return fromReading(input.read(source), source);
|
|
45191
|
+
case "expression": return expressionOutcome(source, input.read, input.now);
|
|
45192
|
+
case "code": return {
|
|
45193
|
+
state: "unavailable",
|
|
45194
|
+
value: null,
|
|
45195
|
+
reason: "code fields are not runnable in the composer — they arrive in slice 4",
|
|
45196
|
+
fatal: true,
|
|
45197
|
+
confirmed: true
|
|
45198
|
+
};
|
|
45199
|
+
}
|
|
45200
|
+
}
|
|
45201
|
+
//#endregion
|
|
45202
|
+
//#region src/composition/examples.ts
|
|
45203
|
+
/**
|
|
45204
|
+
* The worked composed-device example: a ROOM. Temperature is the average of N
|
|
45205
|
+
* sensors, and occupancy is any motion within the last five minutes. It is the
|
|
45206
|
+
* slice-1 acceptance case and the template an author starts from (Phase 4
|
|
45207
|
+
* §4 item 4 asked for one).
|
|
45208
|
+
*/
|
|
45209
|
+
var ROOM_OCCUPANCY_WINDOW_MS = 3e5;
|
|
45210
|
+
var ROOM_EXAMPLE_TEMPERATURE_SOURCES = [
|
|
45211
|
+
{
|
|
45212
|
+
addonId: "provider-homeassistant",
|
|
45213
|
+
stableId: "sensor.living_room_temperature"
|
|
45214
|
+
},
|
|
45215
|
+
{
|
|
45216
|
+
addonId: "provider-homeassistant",
|
|
45217
|
+
stableId: "sensor.sofa_temperature"
|
|
45218
|
+
},
|
|
45219
|
+
{
|
|
45220
|
+
addonId: "provider-homeassistant",
|
|
45221
|
+
stableId: "sensor.window_temperature"
|
|
45222
|
+
}
|
|
45223
|
+
];
|
|
45224
|
+
var ROOM_EXAMPLE_MOTION_SOURCES = [{
|
|
45225
|
+
addonId: "provider-homeassistant",
|
|
45226
|
+
stableId: "binary_sensor.living_room_motion"
|
|
45227
|
+
}, {
|
|
45228
|
+
addonId: "provider-homeassistant",
|
|
45229
|
+
stableId: "binary_sensor.living_room_presence"
|
|
45230
|
+
}];
|
|
45231
|
+
function from(source, cap, fieldPath) {
|
|
45232
|
+
return {
|
|
45233
|
+
kind: "from",
|
|
45234
|
+
source,
|
|
45235
|
+
cap,
|
|
45236
|
+
fieldPath
|
|
45237
|
+
};
|
|
45238
|
+
}
|
|
45239
|
+
function named(prefix, sources, cap, fieldPath) {
|
|
45240
|
+
return Object.fromEntries(sources.map((s, i) => [`${prefix}${i + 1}`, from(s, cap, fieldPath)]));
|
|
45241
|
+
}
|
|
45242
|
+
function roomCompositionExample(input) {
|
|
45243
|
+
const t = named("t", input.temperatureSources, "temperature-sensor", "celsius");
|
|
45244
|
+
const f = named("f", input.temperatureSources, "temperature-sensor", "lastFetchedAt");
|
|
45245
|
+
const d = named("d", input.motionSources, "motion", "detected");
|
|
45246
|
+
const m = named("m", input.motionSources, "motion", "lastDetectedAt");
|
|
45247
|
+
const windows = Object.keys(m).map((name) => `within(${name}, ${input.occupancyWindowMs})`);
|
|
45248
|
+
return CompositionSchema.parse({
|
|
45249
|
+
target: {
|
|
45250
|
+
kind: "new",
|
|
45251
|
+
type: DeviceType.Sensor
|
|
45252
|
+
},
|
|
45253
|
+
features: [{
|
|
45254
|
+
kind: "fields",
|
|
45255
|
+
cap: "temperature-sensor",
|
|
45256
|
+
fields: {
|
|
45257
|
+
celsius: {
|
|
45258
|
+
kind: "expression",
|
|
45259
|
+
expr: `round(avg(${Object.keys(t).join(", ")}), 1)`,
|
|
45260
|
+
bindings: t
|
|
45261
|
+
},
|
|
45262
|
+
lastFetchedAt: {
|
|
45263
|
+
kind: "expression",
|
|
45264
|
+
expr: `max(${Object.keys(f).join(", ")})`,
|
|
45265
|
+
bindings: f
|
|
45266
|
+
}
|
|
45267
|
+
}
|
|
45268
|
+
}, {
|
|
45269
|
+
kind: "fields",
|
|
45270
|
+
cap: "binary",
|
|
45271
|
+
fields: {
|
|
45272
|
+
on: {
|
|
45273
|
+
kind: "expression",
|
|
45274
|
+
expr: `any(${[...Object.keys(d), ...windows].join(", ")})`,
|
|
45275
|
+
bindings: {
|
|
45276
|
+
...d,
|
|
45277
|
+
...m
|
|
45278
|
+
}
|
|
45279
|
+
},
|
|
45280
|
+
lastChangedAt: {
|
|
45281
|
+
kind: "expression",
|
|
45282
|
+
expr: "now",
|
|
45283
|
+
bindings: {}
|
|
45284
|
+
}
|
|
45285
|
+
}
|
|
45286
|
+
}]
|
|
45287
|
+
});
|
|
45288
|
+
}
|
|
45289
|
+
/**
|
|
45290
|
+
* The slice-2 worked customization (D663): the PetKit "Fresh Element Infinity"
|
|
45291
|
+
* feeder as Home Assistant imports it — ONE `Container` with a child per entity
|
|
45292
|
+
* (`<container stableId>-<entityId>`), and NO native battery (its
|
|
45293
|
+
* `binary_sensor.*_battery` is `battery_charging`, which `isBatteryEntity` does
|
|
45294
|
+
* not match). The customization ADDS `consumables` (the desiccant) and
|
|
45295
|
+
* `battery`. It is the Task 14 acceptance case and the template slice 5's
|
|
45296
|
+
* presets start from.
|
|
45297
|
+
*
|
|
45298
|
+
* Every read names what the HA provider REALLY registers (read 2026-09-28):
|
|
45299
|
+
* the desiccant sensor has a unit (`d`) but no device_class, so HA hosts it as
|
|
45300
|
+
* an `enum-sensor` whose `value` is the raw STRING state — `number(d)` reads it,
|
|
45301
|
+
* and anything that is not a number is `null`, never 0 (D393). The battery
|
|
45302
|
+
* status sensor is an `enum-sensor` too (`unavailable` keeps its cold `''`, so
|
|
45303
|
+
* `percentage` is `null`). `charging` maps `battery_charging` off to
|
|
45304
|
+
* `'unknown'`, never `'none'`: off does not prove "on battery alone" (the
|
|
45305
|
+
* operator confirms the real semantics live).
|
|
45306
|
+
*/
|
|
45307
|
+
var FEEDER_EXAMPLE_HA_DEVICE_ID = "8dec3b512fda40cbb8cd121c7a99f890";
|
|
45308
|
+
var FEEDER_EXAMPLE_ADDON_ID = "provider-homeassistant";
|
|
45309
|
+
/** The HA container's stableId (`ha-discovery.ts`) and a child's (`<container>-<entityId>`). */
|
|
45310
|
+
function feederExampleSources(brokerId) {
|
|
45311
|
+
const feeder = {
|
|
45312
|
+
addonId: FEEDER_EXAMPLE_ADDON_ID,
|
|
45313
|
+
stableId: `ha:${brokerId}:dev:${FEEDER_EXAMPLE_HA_DEVICE_ID}`
|
|
45314
|
+
};
|
|
45315
|
+
const child = (entityId) => ({
|
|
45316
|
+
addonId: FEEDER_EXAMPLE_ADDON_ID,
|
|
45317
|
+
stableId: `${feeder.stableId}-${entityId}`
|
|
45318
|
+
});
|
|
45319
|
+
return {
|
|
45320
|
+
feeder,
|
|
45321
|
+
desiccantDays: child("sensor.freshelement_3_desiccant_days_remaining"),
|
|
45322
|
+
batteryStatus: child("sensor.freshelement_3_battery_status"),
|
|
45323
|
+
batteryCharging: child("binary_sensor.freshelement_3_battery")
|
|
45324
|
+
};
|
|
45325
|
+
}
|
|
45326
|
+
function feederCustomizationExample(sources) {
|
|
45327
|
+
const days = { d: from(sources.desiccantDays, "enum-sensor", "value") };
|
|
45328
|
+
return CompositionSchema.parse({
|
|
45329
|
+
target: {
|
|
45330
|
+
kind: "existing",
|
|
45331
|
+
device: sources.feeder
|
|
45332
|
+
},
|
|
45333
|
+
features: [{
|
|
45334
|
+
kind: "fields",
|
|
45335
|
+
cap: "consumables",
|
|
45336
|
+
fields: {
|
|
45337
|
+
lastChangedAt: {
|
|
45338
|
+
kind: "expression",
|
|
45339
|
+
expr: "now",
|
|
45340
|
+
bindings: {}
|
|
45341
|
+
},
|
|
45342
|
+
lastFetchedAt: {
|
|
45343
|
+
kind: "expression",
|
|
45344
|
+
expr: "now",
|
|
45345
|
+
bindings: {}
|
|
45346
|
+
}
|
|
45347
|
+
},
|
|
45348
|
+
items: { desiccant: {
|
|
45349
|
+
label: "Desiccant",
|
|
45350
|
+
fields: {
|
|
45351
|
+
"remaining.value": {
|
|
45352
|
+
kind: "expression",
|
|
45353
|
+
expr: "number(d)",
|
|
45354
|
+
bindings: days
|
|
45355
|
+
},
|
|
45356
|
+
"remaining.unit": {
|
|
45357
|
+
kind: "expression",
|
|
45358
|
+
expr: "\"days\"",
|
|
45359
|
+
bindings: {}
|
|
45360
|
+
},
|
|
45361
|
+
status: {
|
|
45362
|
+
kind: "expression",
|
|
45363
|
+
expr: "number(d) == null ? null : (number(d) <= 0 ? \"replace\" : \"ok\")",
|
|
45364
|
+
bindings: days
|
|
45365
|
+
}
|
|
45366
|
+
}
|
|
45367
|
+
} }
|
|
45368
|
+
}, {
|
|
45369
|
+
kind: "fields",
|
|
45370
|
+
cap: "battery",
|
|
45371
|
+
fields: {
|
|
45372
|
+
percentage: {
|
|
45373
|
+
kind: "expression",
|
|
45374
|
+
expr: "s == \"low\" ? 15 : (s == \"normal\" ? 100 : null)",
|
|
45375
|
+
bindings: { s: from(sources.batteryStatus, "enum-sensor", "value") }
|
|
45376
|
+
},
|
|
45377
|
+
binary: {
|
|
45378
|
+
kind: "expression",
|
|
45379
|
+
expr: "true",
|
|
45380
|
+
bindings: {}
|
|
45381
|
+
},
|
|
45382
|
+
charging: {
|
|
45383
|
+
kind: "expression",
|
|
45384
|
+
expr: "c ? \"dc\" : \"unknown\"",
|
|
45385
|
+
bindings: { c: from(sources.batteryCharging, "binary", "on") }
|
|
45386
|
+
},
|
|
45387
|
+
sleeping: {
|
|
45388
|
+
kind: "expression",
|
|
45389
|
+
expr: "false",
|
|
45390
|
+
bindings: {}
|
|
45391
|
+
},
|
|
45392
|
+
lastUpdated: {
|
|
45393
|
+
kind: "expression",
|
|
45394
|
+
expr: "now",
|
|
45395
|
+
bindings: {}
|
|
45396
|
+
}
|
|
45397
|
+
}
|
|
45398
|
+
}]
|
|
45399
|
+
});
|
|
45400
|
+
}
|
|
45401
|
+
//#endregion
|
|
45402
|
+
//#region src/composition/validate-composition.ts
|
|
45403
|
+
function buildCapabilityLookup(defs) {
|
|
45404
|
+
const byName = new Map(defs.map((d) => [d.name, d]));
|
|
45405
|
+
return (capName) => byName.get(capName) ?? null;
|
|
45406
|
+
}
|
|
45407
|
+
/** Caps every `BaseDevice` registers on itself; a second registration throws. */
|
|
45408
|
+
var BASE_DEVICE_CAPS = new Set(["device-status", "feature-probe"]);
|
|
45409
|
+
var PENDING_SELF = {
|
|
45410
|
+
addonId: COMPOSER_ADDON_ID,
|
|
45411
|
+
stableId: `${COMPOSED_DEVICE_STABLE_ID_PREFIX}(unsaved)`
|
|
45412
|
+
};
|
|
45413
|
+
/** The candidate's block id before its first save. Stored block ids are `randomUUID()`, so none can carry it. */
|
|
45414
|
+
var PENDING_BLOCK_ID = "(unsaved)";
|
|
45415
|
+
function composableCap(feature, at, lookupCap) {
|
|
45794
45416
|
const def = lookupCap(feature.cap);
|
|
45795
|
-
if (def === null) return
|
|
45796
|
-
if (BASE_DEVICE_CAPS.has(def.name)) return
|
|
45417
|
+
if (def === null) return problem("unknown-capability", `${at}.cap`, `no capability is named \`${feature.cap}\``);
|
|
45418
|
+
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`);
|
|
45797
45419
|
const state = def.runtimeState;
|
|
45798
|
-
if (def.scope !== "device" || state === void 0) return
|
|
45799
|
-
|
|
45800
|
-
|
|
45801
|
-
|
|
45802
|
-
|
|
45420
|
+
if (def.scope !== "device" || state === void 0) return problem("not-composable", `${at}.cap`, `\`${def.name}\` has no per-device state to compose`);
|
|
45421
|
+
return {
|
|
45422
|
+
def,
|
|
45423
|
+
state,
|
|
45424
|
+
fields: describeTopLevelStateFields(state)
|
|
45425
|
+
};
|
|
45426
|
+
}
|
|
45427
|
+
/**
|
|
45428
|
+
* A capability BUILT by the composition (a new device, or one ADDED to an
|
|
45429
|
+
* existing device) must fit the device type, serve no command, and have every
|
|
45430
|
+
* required field. A REPLACE needs none of it: the cap is bound (a fact), the
|
|
45431
|
+
* native keeps serving its methods, and only the named fields are owned (D663).
|
|
45432
|
+
*/
|
|
45433
|
+
function builtCapProblems({ def, state, fields: targetFields }, feature, at, deviceType) {
|
|
45434
|
+
const problems = [];
|
|
45435
|
+
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(", ")})`));
|
|
45436
|
+
const served = Object.entries(def.methods).filter(([name, m]) => m.systemOnly !== true && def.composedMethods?.[name] === void 0).map(([name]) => `\`${name}\``);
|
|
45437
|
+
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)`));
|
|
45438
|
+
const itemArrayPath = feature.items === void 0 ? null : def.status?.itemArray?.path ?? null;
|
|
45439
|
+
for (const key of requiredTopLevelKeys(state)) {
|
|
45440
|
+
if (key === itemArrayPath) continue;
|
|
45441
|
+
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`));
|
|
45442
|
+
else if (!(key in feature.fields)) problems.push(problem("missing-field", `${at}.fields.${key}`, `\`${def.name}.${key}\` is required and has no source`));
|
|
45443
|
+
}
|
|
45444
|
+
return problems;
|
|
45445
|
+
}
|
|
45446
|
+
function planTopLevelField({ def, fields }, field, mode, lookupCap) {
|
|
45447
|
+
const { featureIndex, path, source } = field;
|
|
45448
|
+
const fieldAt = `features[${featureIndex}].fields.${path}`;
|
|
45449
|
+
if (path.includes(".")) return refused(problem("nested-field", fieldAt, `\`${path}\` is nested — nested fields arrive in a later slice`));
|
|
45450
|
+
const tf = fields.get(path);
|
|
45451
|
+
if (tf === void 0) return refused(problem("unknown-field", fieldAt, `\`${def.name}\` has no field \`${path}\``));
|
|
45452
|
+
const kinds = sourceKinds(source, lookupCap);
|
|
45453
|
+
if (!kinds.ok) return refused(problem(kinds.code, fieldAt, kinds.message));
|
|
45454
|
+
const role = roleOf(source);
|
|
45455
|
+
const unavailable = unavailableFor(tf, role, mode, def.name, fieldAt);
|
|
45456
|
+
if (!unavailable.ok) return refused(unavailable.problem);
|
|
45457
|
+
const plan = {
|
|
45458
|
+
cap: def.name,
|
|
45459
|
+
path,
|
|
45460
|
+
featureIndex,
|
|
45461
|
+
kind: tf.kind,
|
|
45462
|
+
nullable: tf.nullable,
|
|
45463
|
+
required: tf.required,
|
|
45464
|
+
unavailable: unavailable.unavailable,
|
|
45465
|
+
role,
|
|
45466
|
+
source,
|
|
45467
|
+
reads: [...fieldReads(source)]
|
|
45468
|
+
};
|
|
45469
|
+
const enumProblem = enumLiteralProblem(def.name, tf, source, fieldAt);
|
|
45470
|
+
return {
|
|
45471
|
+
problems: [...compatibility(def.name, tf, kinds.kinds, fieldAt), ...enumProblem === null ? [] : [enumProblem]],
|
|
45472
|
+
fields: [plan],
|
|
45473
|
+
features: []
|
|
45474
|
+
};
|
|
45475
|
+
}
|
|
45476
|
+
function planFeature(feature, featureIndex, target, lookupCap) {
|
|
45477
|
+
const at = `features[${featureIndex}]`;
|
|
45478
|
+
const cap = composableCap(feature, at, lookupCap);
|
|
45479
|
+
if ("code" in cap) return refused(cap);
|
|
45480
|
+
const capProblems = target.mode === "replace" ? [] : [...builtCapProblems(cap, feature, at, target.deviceType)];
|
|
45803
45481
|
if (feature.commands !== void 0 && Object.keys(feature.commands).length > 0) capProblems.push(problem("reserved-variant", `${at}.commands`, "commands (`forward`) arrive in slice 3"));
|
|
45804
|
-
const
|
|
45805
|
-
|
|
45806
|
-
|
|
45807
|
-
|
|
45808
|
-
|
|
45809
|
-
|
|
45810
|
-
|
|
45811
|
-
|
|
45812
|
-
|
|
45813
|
-
|
|
45814
|
-
|
|
45815
|
-
cap: def.name,
|
|
45816
|
-
path,
|
|
45482
|
+
const perField = Object.entries(feature.fields).map(([path, source]) => planTopLevelField(cap, {
|
|
45483
|
+
featureIndex,
|
|
45484
|
+
path,
|
|
45485
|
+
source
|
|
45486
|
+
}, target.mode, lookupCap));
|
|
45487
|
+
const items = feature.items === void 0 ? [] : [planItems(cap.def, feature, featureIndex, lookupCap, target.mode)];
|
|
45488
|
+
const all = [...perField, ...items];
|
|
45489
|
+
return {
|
|
45490
|
+
problems: [...capProblems, ...all.flatMap((r) => r.problems)],
|
|
45491
|
+
fields: all.flatMap((r) => r.fields),
|
|
45492
|
+
features: [{
|
|
45817
45493
|
featureIndex,
|
|
45818
|
-
|
|
45819
|
-
|
|
45820
|
-
|
|
45821
|
-
|
|
45822
|
-
|
|
45823
|
-
|
|
45824
|
-
|
|
45825
|
-
|
|
45826
|
-
|
|
45827
|
-
|
|
45828
|
-
|
|
45829
|
-
|
|
45830
|
-
|
|
45831
|
-
|
|
45494
|
+
cap: cap.def.name,
|
|
45495
|
+
mode: target.mode
|
|
45496
|
+
}]
|
|
45497
|
+
};
|
|
45498
|
+
}
|
|
45499
|
+
/** A cap the device serves itself; one the composer grafted (an earlier ADD) is not native. */
|
|
45500
|
+
function isNativeCap(target, cap) {
|
|
45501
|
+
const owner = target.nativeCaps.get(cap);
|
|
45502
|
+
return owner !== void 0 && owner !== "composer";
|
|
45503
|
+
}
|
|
45504
|
+
/** The target read, or the refusal that replaces the whole plan when it could not be (D391). */
|
|
45505
|
+
function planTargetOf(composition, target) {
|
|
45506
|
+
if (composition.target.kind === "new") return {
|
|
45507
|
+
kind: "new",
|
|
45508
|
+
type: composition.target.type
|
|
45509
|
+
};
|
|
45510
|
+
const key = compositionSourceKey(composition.target.device);
|
|
45511
|
+
if (target === void 0) return problem("target-unreadable", "target", `target device \`${key}\` was not read — the save is refused rather than stored unchecked`);
|
|
45512
|
+
if (target.kind === "absent") return problem("target-missing", "target", `target device \`${key}\` does not exist`);
|
|
45513
|
+
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`);
|
|
45832
45514
|
return {
|
|
45833
|
-
|
|
45834
|
-
|
|
45515
|
+
kind: "existing",
|
|
45516
|
+
found: target
|
|
45835
45517
|
};
|
|
45836
45518
|
}
|
|
45837
|
-
function
|
|
45838
|
-
|
|
45839
|
-
|
|
45519
|
+
function featureTargetOf(target, cap) {
|
|
45520
|
+
if (target.kind === "new") return {
|
|
45521
|
+
mode: "new",
|
|
45522
|
+
deviceType: target.type
|
|
45523
|
+
};
|
|
45524
|
+
return {
|
|
45525
|
+
mode: isNativeCap(target.found, cap) ? "replace" : "add",
|
|
45526
|
+
deviceType: target.found.type
|
|
45527
|
+
};
|
|
45528
|
+
}
|
|
45529
|
+
/**
|
|
45530
|
+
* The static plan. `target` describes an EXISTING target device (one read);
|
|
45531
|
+
* it is ignored for a new one. On an existing target each feature REPLACES a
|
|
45532
|
+
* cap the device has natively, else ADDS it (D663).
|
|
45533
|
+
*/
|
|
45534
|
+
function planComposition(composition, lookupCap, target) {
|
|
45535
|
+
const planTarget = planTargetOf(composition, target);
|
|
45536
|
+
if ("code" in planTarget) return refused(planTarget);
|
|
45840
45537
|
const results = composition.features.map((feature, index) => {
|
|
45841
|
-
|
|
45842
|
-
|
|
45843
|
-
return planFeature(feature, index, target, lookupCap);
|
|
45538
|
+
if (feature.kind === "passthrough") return refused(problem("reserved-variant", `features[${index}]`, `whole-capability passthrough of \`${feature.cap}\` arrives in slice 3`));
|
|
45539
|
+
return planFeature(feature, index, featureTargetOf(planTarget, feature.cap), lookupCap);
|
|
45844
45540
|
});
|
|
45845
45541
|
return {
|
|
45846
45542
|
problems: results.flatMap((r) => r.problems),
|
|
45847
|
-
fields: results.flatMap((r) => r.fields)
|
|
45543
|
+
fields: results.flatMap((r) => r.fields),
|
|
45544
|
+
features: results.flatMap((r) => r.features)
|
|
45848
45545
|
};
|
|
45849
45546
|
}
|
|
45850
45547
|
function compositionSourceRefs(composition) {
|
|
45851
|
-
const refs = composition.features.flatMap((f) => f.kind === "fields" ?
|
|
45548
|
+
const refs = composition.features.flatMap((f) => f.kind === "fields" ? featureSources(f).flatMap(fieldReads).map((r) => r.source) : []);
|
|
45852
45549
|
return [...new Map(refs.map((r) => [compositionSourceKey(r), r])).values()];
|
|
45853
45550
|
}
|
|
45854
|
-
|
|
45855
|
-
|
|
45551
|
+
/**
|
|
45552
|
+
* The candidate's device: the existing target itself, else `self`, else a
|
|
45553
|
+
* placeholder that cannot collide with a stored target. An existing target is
|
|
45554
|
+
* known even on create, so a second customization of it is refused on create too.
|
|
45555
|
+
*/
|
|
45556
|
+
function candidateSelf(composition, ctx, plan) {
|
|
45557
|
+
return {
|
|
45558
|
+
ref: composition.target.kind === "existing" ? composition.target.device : ctx.self ?? PENDING_SELF,
|
|
45559
|
+
native: composition.target.kind === "existing" && ctx.target?.kind === "found" ? ctx.target : null,
|
|
45560
|
+
replaced: replacedFieldKeys(plan)
|
|
45561
|
+
};
|
|
45562
|
+
}
|
|
45563
|
+
/**
|
|
45564
|
+
* `compositionFieldKey` of every field a REPLACE feature of `plan` owns — the
|
|
45565
|
+
* candidate's own, and a stored peer's `CompositionPeer.replaced` (D663): one
|
|
45566
|
+
* derivation, so the graph reads both the same way.
|
|
45567
|
+
*/
|
|
45568
|
+
function replacedFieldKeys(plan) {
|
|
45569
|
+
const replacing = new Set(plan.features.filter((f) => f.mode === "replace").map((f) => f.featureIndex));
|
|
45570
|
+
return new Set(plan.fields.filter((f) => replacing.has(f.featureIndex)).map(compositionFieldKey));
|
|
45571
|
+
}
|
|
45572
|
+
/**
|
|
45573
|
+
* A read of the candidate's own device. Its own composed output (a new device's
|
|
45574
|
+
* field, an ADDED field) is the slice-1 own-field rule; on an existing target
|
|
45575
|
+
* every other field — replaced, or not composed at all — is the NATIVE value,
|
|
45576
|
+
* valid when the device serves that cap natively (D663, rule 5).
|
|
45577
|
+
*/
|
|
45578
|
+
function selfReadProblems(read, at, fields, self) {
|
|
45579
|
+
const readKey = `${read.cap}.${read.fieldPath}`;
|
|
45580
|
+
if (fields.some((f) => compositionFieldKey(f) === readKey && !self.replaced.has(readKey))) return [];
|
|
45581
|
+
if (self.native === null) return [problem("source-field-unknown", at, `this device has no composed field \`${read.cap}.${read.fieldPath}\``)];
|
|
45582
|
+
if (isNativeCap(self.native, read.cap)) return [];
|
|
45583
|
+
return [problem("source-capability-missing", at, `the target device (device ${self.native.deviceId}) has no native \`${read.cap}\``)];
|
|
45584
|
+
}
|
|
45585
|
+
function sourceProblems(fields, ctx, self) {
|
|
45586
|
+
const selfKey = compositionSourceKey(self.ref);
|
|
45856
45587
|
return fields.flatMap((field) => field.reads.flatMap((read) => {
|
|
45857
|
-
const at =
|
|
45588
|
+
const at = compositionFieldAt(field);
|
|
45858
45589
|
const key = compositionSourceKey(read.source);
|
|
45859
|
-
if (key === selfKey) return
|
|
45590
|
+
if (key === selfKey) return selfReadProblems(read, at, fields, self);
|
|
45860
45591
|
const desc = ctx.sources.get(key);
|
|
45861
45592
|
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`)];
|
|
45862
45593
|
if (desc.kind === "absent") return [problem("source-missing", at, `source \`${key}\` does not exist`)];
|
|
@@ -45869,8 +45600,9 @@ function sourceProblems(fields, ctx) {
|
|
|
45869
45600
|
* `<addonId>/<stableId>#<cap>.<fieldPath>`. When a node belongs to the
|
|
45870
45601
|
* CANDIDATE itself (this composition being saved), pull its `cap`/`fieldPath`
|
|
45871
45602
|
* back out so the refusal can point at that exact field, matching the
|
|
45872
|
-
* documented `features[N].fields.<path>` convention
|
|
45873
|
-
*
|
|
45603
|
+
* documented `features[N].fields.<path>` convention. A cap name has no `.`,
|
|
45604
|
+
* so splitting `rest` on the FIRST `.` is exact; an item leaf's remainder
|
|
45605
|
+
* (`items[desiccant].status`) is matched through `compositionFieldKey`.
|
|
45874
45606
|
*/
|
|
45875
45607
|
function candidateFieldOfNode(nodeKey, candidateKey) {
|
|
45876
45608
|
const prefix = `${candidateKey}#`;
|
|
@@ -45890,44 +45622,65 @@ function cyclePath(nodePath, candidateKey, fields) {
|
|
|
45890
45622
|
for (const nodeKey of nodePath) {
|
|
45891
45623
|
const hit = candidateFieldOfNode(nodeKey, candidateKey);
|
|
45892
45624
|
if (hit === null) continue;
|
|
45893
|
-
const
|
|
45894
|
-
|
|
45625
|
+
const hitKey = `${hit.cap}.${hit.fieldPath}`;
|
|
45626
|
+
const field = fields.find((f) => compositionFieldKey(f) === hitKey);
|
|
45627
|
+
if (field !== void 0) return compositionFieldAt(field);
|
|
45895
45628
|
}
|
|
45896
45629
|
return "features";
|
|
45897
45630
|
}
|
|
45631
|
+
/** The first unread device any of `nodes` belongs to; null when none does. */
|
|
45632
|
+
function unreadDeviceOf(nodes, unread) {
|
|
45633
|
+
for (const [key, error] of unread) if (nodes.some((node) => node.startsWith(`${key}#`))) return {
|
|
45634
|
+
key,
|
|
45635
|
+
error
|
|
45636
|
+
};
|
|
45637
|
+
return null;
|
|
45638
|
+
}
|
|
45898
45639
|
/**
|
|
45899
|
-
* Cycle check runs against the CANDIDATE (this composition,
|
|
45900
|
-
*
|
|
45901
|
-
*
|
|
45902
|
-
*
|
|
45903
|
-
*
|
|
45904
|
-
*
|
|
45640
|
+
* Cycle check runs against the CANDIDATE (this composition, as block
|
|
45641
|
+
* `ctx.blockId`, writing `self.ref`) plus every OTHER stored composition,
|
|
45642
|
+
* decided per strongly connected component (`findCandidateCycles`): a cyclic
|
|
45643
|
+
* component holding a candidate node refuses, with one representative cycle
|
|
45644
|
+
* through it; one without is not this save's cycle. A
|
|
45645
|
+
* stored composition of the same block is its old version; another block on
|
|
45646
|
+
* the same device, or two stored peers sharing a device, make
|
|
45647
|
+
* `compositionEdges` throw `CompositionGraphError` — refused BY NAME as
|
|
45648
|
+
* `duplicate-target` (D391, D663) instead of escaping as an uncaught throw.
|
|
45905
45649
|
*/
|
|
45906
|
-
function cycleProblems(composition, ctx, fields) {
|
|
45650
|
+
function cycleProblems(composition, ctx, fields, self) {
|
|
45907
45651
|
const candidate = {
|
|
45908
|
-
|
|
45909
|
-
|
|
45652
|
+
blockId: ctx.blockId ?? "(unsaved)",
|
|
45653
|
+
target: self.ref,
|
|
45654
|
+
composition,
|
|
45655
|
+
replaced: self.replaced
|
|
45910
45656
|
};
|
|
45911
45657
|
const candidateKey = compositionSourceKey(candidate.target);
|
|
45658
|
+
const unread = ctx.unreadTargets ?? /* @__PURE__ */ new Map();
|
|
45912
45659
|
try {
|
|
45913
|
-
return
|
|
45660
|
+
return findCandidateCycles(candidate, ctx.peers).map((c) => {
|
|
45661
|
+
const at = cyclePath(c.path, candidateKey, fields);
|
|
45662
|
+
const through = unreadDeviceOf([...c.component], unread);
|
|
45663
|
+
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(" → ")}`);
|
|
45664
|
+
});
|
|
45914
45665
|
} catch (err) {
|
|
45915
45666
|
if (err instanceof CompositionGraphError) return [problem("duplicate-target", "features", err.message)];
|
|
45916
45667
|
throw err;
|
|
45917
45668
|
}
|
|
45918
45669
|
}
|
|
45919
45670
|
function validateComposition(composition, ctx) {
|
|
45920
|
-
const plan = planComposition(composition, ctx.lookupCap);
|
|
45921
|
-
const
|
|
45671
|
+
const plan = planComposition(composition, ctx.lookupCap, ctx.target ?? void 0);
|
|
45672
|
+
const self = candidateSelf(composition, ctx, plan);
|
|
45673
|
+
const cycles = cycleProblems(composition, ctx, plan.fields, self);
|
|
45922
45674
|
const problems = [
|
|
45923
45675
|
...plan.problems,
|
|
45924
|
-
...sourceProblems(plan.fields, ctx),
|
|
45676
|
+
...sourceProblems(plan.fields, ctx, self),
|
|
45925
45677
|
...cycles
|
|
45926
45678
|
];
|
|
45927
45679
|
return {
|
|
45928
45680
|
ok: problems.length === 0,
|
|
45929
45681
|
problems,
|
|
45930
|
-
fields: [...plan.fields]
|
|
45682
|
+
fields: [...plan.fields],
|
|
45683
|
+
features: [...plan.features]
|
|
45931
45684
|
};
|
|
45932
45685
|
}
|
|
45933
45686
|
//#endregion
|
|
@@ -46242,38 +45995,31 @@ var DeviceConfig = class DeviceConfig {
|
|
|
46242
45995
|
};
|
|
46243
45996
|
//#endregion
|
|
46244
45997
|
//#region src/device/device-runtime-state.ts
|
|
46245
|
-
/**
|
|
46246
|
-
* Concrete implementation. Routes every successful write through
|
|
46247
|
-
* `writer(capName, slice)` — the kernel hooks this up to
|
|
46248
|
-
* `device-state.setCapSlice`, the canonical cross-layer write
|
|
46249
|
-
* entrypoint, which handles disk persistence (debounced on the hub)
|
|
46250
|
-
* and mirror updates.
|
|
46251
|
-
*
|
|
46252
|
-
* Schema validation runs in-process before the writer is called —
|
|
46253
|
-
* the round-trip should never carry an invalid slice. `flush()`
|
|
46254
|
-
* awaits any in-flight writer promises so shutdown is lossless.
|
|
46255
|
-
*
|
|
46256
|
-
* `initial` is the persisted blob loaded at boot. Slices for caps
|
|
46257
|
-
* whose schema hasn't been installed yet are kept in-memory verbatim
|
|
46258
|
-
* and validated when the cap registers later.
|
|
46259
|
-
*/
|
|
46260
45998
|
var DeviceRuntimeState = class DeviceRuntimeState {
|
|
46261
45999
|
writer;
|
|
46000
|
+
onWriteFailed;
|
|
46262
46001
|
/** In-flight writer promises tracked so `flush()` can await them. */
|
|
46263
46002
|
pendingWrites = /* @__PURE__ */ new Set();
|
|
46003
|
+
/**
|
|
46004
|
+
* Caps whose last write the hub refused. The equality gate in
|
|
46005
|
+
* `applyCapWrite` is bypassed for these, so the SAME value is re-sent on the
|
|
46006
|
+
* next write instead of being swallowed forever; a landing write clears it.
|
|
46007
|
+
*/
|
|
46008
|
+
failedWrites = /* @__PURE__ */ new Set();
|
|
46264
46009
|
/** Per-cap committed slice — after schema validation when known. */
|
|
46265
46010
|
slices;
|
|
46266
46011
|
/** Per-cap registered schema (set by `installCapSchema`). */
|
|
46267
46012
|
schemas = /* @__PURE__ */ new Map();
|
|
46268
46013
|
listeners = /* @__PURE__ */ new Set();
|
|
46269
46014
|
capListeners = /* @__PURE__ */ new Map();
|
|
46270
|
-
constructor(initial, writer) {
|
|
46015
|
+
constructor(initial, writer, onWriteFailed) {
|
|
46271
46016
|
this.writer = writer;
|
|
46017
|
+
this.onWriteFailed = onWriteFailed;
|
|
46272
46018
|
this.slices = /* @__PURE__ */ new Map();
|
|
46273
46019
|
for (const [k, v] of Object.entries(initial)) if (v && typeof v === "object" && !Array.isArray(v)) this.slices.set(k, { ...v });
|
|
46274
46020
|
}
|
|
46275
|
-
static fromInitial(initial, writer) {
|
|
46276
|
-
return new DeviceRuntimeState(initial, writer);
|
|
46021
|
+
static fromInitial(initial, writer, onWriteFailed) {
|
|
46022
|
+
return new DeviceRuntimeState(initial, writer, onWriteFailed);
|
|
46277
46023
|
}
|
|
46278
46024
|
installCapSchema(capName, schema) {
|
|
46279
46025
|
const existing = this.schemas.get(capName);
|
|
@@ -46317,10 +46063,15 @@ var DeviceRuntimeState = class DeviceRuntimeState {
|
|
|
46317
46063
|
...value
|
|
46318
46064
|
} : { ...value };
|
|
46319
46065
|
const parsed = schema.parse(next);
|
|
46320
|
-
if (shallowEqual(current, parsed)) return;
|
|
46066
|
+
if (shallowEqual(current, parsed) && !this.failedWrites.has(capName)) return;
|
|
46321
46067
|
this.slices.set(capName, parsed);
|
|
46322
46068
|
this.fireListeners([capName]);
|
|
46323
|
-
const writePromise = this.writer(capName, { ...parsed }).
|
|
46069
|
+
const writePromise = this.writer(capName, { ...parsed }).then(() => {
|
|
46070
|
+
this.failedWrites.delete(capName);
|
|
46071
|
+
}).catch((err) => {
|
|
46072
|
+
this.failedWrites.add(capName);
|
|
46073
|
+
this.onWriteFailed?.(capName, err instanceof Error ? err.message : String(err));
|
|
46074
|
+
});
|
|
46324
46075
|
this.pendingWrites.add(writePromise);
|
|
46325
46076
|
writePromise.finally(() => {
|
|
46326
46077
|
this.pendingWrites.delete(writePromise);
|
|
@@ -46601,7 +46352,16 @@ var BaseDevice = class {
|
|
|
46601
46352
|
});
|
|
46602
46353
|
};
|
|
46603
46354
|
const initial = ctx.initialRuntimeState ?? {};
|
|
46604
|
-
|
|
46355
|
+
const onWriteFailed = (cap, error) => {
|
|
46356
|
+
ctx.logger.warn("runtime-state write refused by the hub — the slice is not mirrored; it is re-sent on the next write", {
|
|
46357
|
+
tags: { deviceId: ctx.id },
|
|
46358
|
+
meta: {
|
|
46359
|
+
cap,
|
|
46360
|
+
error
|
|
46361
|
+
}
|
|
46362
|
+
});
|
|
46363
|
+
};
|
|
46364
|
+
this.runtimeState = DeviceRuntimeState.fromInitial(initial, writer, onWriteFailed);
|
|
46605
46365
|
ctx.bindRuntimeState?.(this.runtimeState);
|
|
46606
46366
|
ctx.registerNativeCap?.(deviceStatusCapability, {});
|
|
46607
46367
|
const seed = {
|
|
@@ -52971,6 +52731,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
52971
52731
|
addonId: null,
|
|
52972
52732
|
access: "view"
|
|
52973
52733
|
},
|
|
52734
|
+
"coreBlocks.getCustomization": {
|
|
52735
|
+
capName: "core-blocks",
|
|
52736
|
+
capScope: "system",
|
|
52737
|
+
addonId: null,
|
|
52738
|
+
access: "view"
|
|
52739
|
+
},
|
|
52974
52740
|
"coreBlocks.getTypeDefs": {
|
|
52975
52741
|
capName: "core-blocks",
|
|
52976
52742
|
capScope: "system",
|
|
@@ -54093,6 +53859,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
54093
53859
|
addonId: null,
|
|
54094
53860
|
access: "create"
|
|
54095
53861
|
},
|
|
53862
|
+
"deviceState.claimFields": {
|
|
53863
|
+
capName: "device-state",
|
|
53864
|
+
capScope: "system",
|
|
53865
|
+
addonId: null,
|
|
53866
|
+
access: "create"
|
|
53867
|
+
},
|
|
54096
53868
|
"deviceState.getAllSnapshots": {
|
|
54097
53869
|
capName: "device-state",
|
|
54098
53870
|
capScope: "system",
|
|
@@ -54105,12 +53877,36 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
54105
53877
|
addonId: null,
|
|
54106
53878
|
access: "view"
|
|
54107
53879
|
},
|
|
53880
|
+
"deviceState.getNativeCapSlice": {
|
|
53881
|
+
capName: "device-state",
|
|
53882
|
+
capScope: "system",
|
|
53883
|
+
addonId: null,
|
|
53884
|
+
access: "view"
|
|
53885
|
+
},
|
|
54108
53886
|
"deviceState.getSnapshot": {
|
|
54109
53887
|
capName: "device-state",
|
|
54110
53888
|
capScope: "system",
|
|
54111
53889
|
addonId: null,
|
|
54112
53890
|
access: "view"
|
|
54113
53891
|
},
|
|
53892
|
+
"deviceState.listClaims": {
|
|
53893
|
+
capName: "device-state",
|
|
53894
|
+
capScope: "system",
|
|
53895
|
+
addonId: null,
|
|
53896
|
+
access: "view"
|
|
53897
|
+
},
|
|
53898
|
+
"deviceState.patchOwnedFields": {
|
|
53899
|
+
capName: "device-state",
|
|
53900
|
+
capScope: "system",
|
|
53901
|
+
addonId: null,
|
|
53902
|
+
access: "create"
|
|
53903
|
+
},
|
|
53904
|
+
"deviceState.releaseClaim": {
|
|
53905
|
+
capName: "device-state",
|
|
53906
|
+
capScope: "system",
|
|
53907
|
+
addonId: null,
|
|
53908
|
+
access: "create"
|
|
53909
|
+
},
|
|
54114
53910
|
"deviceState.setCapSlice": {
|
|
54115
53911
|
capName: "device-state",
|
|
54116
53912
|
capScope: "system",
|
|
@@ -59961,16 +59757,36 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
59961
59757
|
form: "single",
|
|
59962
59758
|
optional: false
|
|
59963
59759
|
}],
|
|
59760
|
+
"deviceState.claimFields": [{
|
|
59761
|
+
name: "deviceId",
|
|
59762
|
+
form: "single",
|
|
59763
|
+
optional: false
|
|
59764
|
+
}],
|
|
59964
59765
|
"deviceState.getCapSlice": [{
|
|
59965
59766
|
name: "deviceId",
|
|
59966
59767
|
form: "single",
|
|
59967
59768
|
optional: false
|
|
59968
59769
|
}],
|
|
59770
|
+
"deviceState.getNativeCapSlice": [{
|
|
59771
|
+
name: "deviceId",
|
|
59772
|
+
form: "single",
|
|
59773
|
+
optional: false
|
|
59774
|
+
}],
|
|
59969
59775
|
"deviceState.getSnapshot": [{
|
|
59970
59776
|
name: "deviceId",
|
|
59971
59777
|
form: "single",
|
|
59972
59778
|
optional: false
|
|
59973
59779
|
}],
|
|
59780
|
+
"deviceState.patchOwnedFields": [{
|
|
59781
|
+
name: "deviceId",
|
|
59782
|
+
form: "single",
|
|
59783
|
+
optional: false
|
|
59784
|
+
}],
|
|
59785
|
+
"deviceState.releaseClaim": [{
|
|
59786
|
+
name: "deviceId",
|
|
59787
|
+
form: "single",
|
|
59788
|
+
optional: false
|
|
59789
|
+
}],
|
|
59974
59790
|
"deviceState.setCapSlice": [{
|
|
59975
59791
|
name: "deviceId",
|
|
59976
59792
|
form: "single",
|
|
@@ -61466,8 +61282,12 @@ var SYSTEM_SCOPE_DEVICE_METHODS = [
|
|
|
61466
61282
|
"deviceManager.updateConfig",
|
|
61467
61283
|
"deviceManager.updateDeviceField",
|
|
61468
61284
|
"deviceManager.updateDeviceFieldsBatch",
|
|
61285
|
+
"deviceState.claimFields",
|
|
61469
61286
|
"deviceState.getCapSlice",
|
|
61287
|
+
"deviceState.getNativeCapSlice",
|
|
61470
61288
|
"deviceState.getSnapshot",
|
|
61289
|
+
"deviceState.patchOwnedFields",
|
|
61290
|
+
"deviceState.releaseClaim",
|
|
61471
61291
|
"deviceState.setCapSlice",
|
|
61472
61292
|
"faceGallery.getFaceByTrack",
|
|
61473
61293
|
"faceGallery.listRecentFaces",
|
|
@@ -62147,6 +61967,7 @@ function createSystemProxy(api) {
|
|
|
62147
61967
|
updateComposition: (input) => dispatch("coreBlocks", "updateComposition", "mutation", input),
|
|
62148
61968
|
getComposition: (input) => dispatch("coreBlocks", "getComposition", "query", input),
|
|
62149
61969
|
listCompositions: (input) => dispatch("coreBlocks", "listCompositions", "query", input),
|
|
61970
|
+
getCustomization: (input) => dispatch("coreBlocks", "getCustomization", "query", input),
|
|
62150
61971
|
validateComposition: (input) => dispatch("coreBlocks", "validateComposition", "mutation", input)
|
|
62151
61972
|
},
|
|
62152
61973
|
decoder: {
|
|
@@ -62250,7 +62071,10 @@ function createSystemProxy(api) {
|
|
|
62250
62071
|
createDevice: (input) => dispatch("deviceProvider", "createDevice", "mutation", input),
|
|
62251
62072
|
testCreationField: (input) => dispatch("deviceProvider", "testCreationField", "mutation", input)
|
|
62252
62073
|
},
|
|
62253
|
-
deviceState: {
|
|
62074
|
+
deviceState: {
|
|
62075
|
+
getAllSnapshots: (input) => dispatch("deviceState", "getAllSnapshots", "query", input),
|
|
62076
|
+
listClaims: (input) => dispatch("deviceState", "listClaims", "query", input)
|
|
62077
|
+
},
|
|
62254
62078
|
faceGallery: {
|
|
62255
62079
|
listIdentities: (input) => dispatch("faceGallery", "listIdentities", "query", input),
|
|
62256
62080
|
createIdentity: (input) => dispatch("faceGallery", "createIdentity", "mutation", input),
|
|
@@ -68297,4 +68121,4 @@ function enumerateInferenceDevices(hw) {
|
|
|
68297
68121
|
return out;
|
|
68298
68122
|
}
|
|
68299
68123
|
//#endregion
|
|
68300
|
-
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_SWITCH_CATALOG, CAMERA_SWITCH_ORDER, 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, COMPOSER_ADDON_ID, COMPOSER_RUNNER_ID, CONNECTION_TEST_TIMEOUT_MS, CONTAINER_CHILD_PRIORITY, CORE_BLOCKS_ADDON_ID, CORE_BLOCK_ADDON_PREFIX, CamProfileSchema, CamStreamDescriptorSchema, CamStreamKindSchema, CamStreamResolutionSchema, CameraAssignmentStatusSchema, CameraAudioStatusSchema, CameraBrokerProfileSchema, CameraBrokerStatusSchema, CameraCredentialsSchema, CameraCredentialsStatusSchema, CameraDecoderShmSchema, CameraDecoderStatusSchema, CameraDetectionPhaseSchema, CameraDetectionProvisioningSchema, CameraDetectionProvisioningStateSchema, CameraDetectionStatusSchema, CameraMetricsSchema, CameraMetricsWithDeviceIdSchema, CameraMotionStatusSchema, CameraOccupancySnapshotForDeviceSchema, CameraRecordingModeSchema, CameraRecordingStatusSchema, CameraSourceStatusSchema, CameraSourceStreamSchema, CameraStatusDegradationReasonSchema, CameraStatusDegradationSchema, CameraStatusSchema, CameraStatusStageSchema, CameraStreamSchema, CameraSwitchAuthoritySchema, CameraSwitchGroupSchema, CameraSwitchIdSchema, CameraSwitchSchema, CameraSwitchUnavailableReasonSchema, CameraSwitchWarningSchema, CandidateQueryFilterSchema, CapScopeSchema, CapabilityBindingsSchema, CarbonMonoxideStatusSchema, ChargingStatus, 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, CompositionExistingTargetSchema, CompositionExpressionSourceSchema, CompositionFeatureSchema, CompositionFieldKindSchema, CompositionFieldPlanSchema, CompositionFieldReadSchema, CompositionFieldRoleSchema, CompositionFieldSourceSchema, CompositionFieldStateKindSchema, CompositionFieldStateSchema, CompositionFieldsFeatureSchema, CompositionForwardCommandSchema, CompositionFromSourceSchema, CompositionGetReadSchema, CompositionGraphError, CompositionListReadSchema, CompositionLiteralBindingSchema, CompositionNewTargetSchema, CompositionPassthroughFeatureSchema, CompositionProblemCodeSchema, CompositionProblemSchema, CompositionRunStatusSchema, CompositionSchema, CompositionSourceRefSchema, CompositionStateReadSchema, CompositionTargetSchema, CompositionUnavailableModeSchema, CompositionValidationSchema, CompositionViewSchema, ConfigEntrySchema, ConfigSectionWithValuesSchema, ConfigTabDeclarationSchema, ConnectionTestDescriptorSchema, ConnectionTestInputSchema, ConnectionTestOutcomeSchema, ConnectivityStatusSchema, ConsumableItemSchema, 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, FIRST_LEVEL_MACRO_CLASSES, FULL_IMAGE_BBOX, FailureContributionSchema, FailureCounters, FailureReasonCountSchema, FanControlStatusSchema, FanDirectionSchema, FeatureManifestSchema, FeatureProbeStatusSchema, 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_CLIP_EVENT_IDS, MAX_CLIP_LABELS, MAX_COMPOSITION_CODE_LENGTH, MAX_COMPOSITION_FEATURES, MAX_COMPOSITION_FIELDS_PER_FEATURE, 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_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, 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, 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, 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, SUMMARIES_DEFAULT_LIMIT, SUMMARIES_MAX_LIMIT, 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, SummarySchema, 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, 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, cameraStreamsCapability, canConvertUnit, canonicalEgressPlan, carbonMonoxideCapability, cellsToRects, classifyBearerPrincipal, classifyStream, classifyStreams, climateControlCapability, clipExportFailure, clipExportFailureOf, clipReasonHeaderValue, clusterModelSettingKey, clusterStepSettingFieldsFor, clusterStepSettingKey, codecIsAccepted, collectHydratedFieldEntries, collectHydratedFieldValues, collectSecretConfigKeys, colorCapability, colorForKind, commitWatchdogRestart, compareToTarget, compileExpression, compileExpressionSafe, composeSwitchedOff, composedDeviceRef, composedDeviceStableId, composerCapability, compositionEdges, 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, 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, evaluateExpressionSource, evaluatePoolMemory, evaluateSensorEdge, evaluateZoneRules, event, eventEmitterCapability, evictionPolicyForMode, evictionPolicyOfLocation, expandAudioChunkToF32le, expandCapMethods, expandContainer, exportSubjectOf, extensionSlotRef, extractNestedAddonId, extractSourceInfoFromMetadata, faceGalleryCapability, failureContributionCapability, failureRate, fanControlCapability, featureProbeCapability, fieldReads, filesystemBrowseCapability, findCompositionCycles, findTimezone, floodCapability, foldSnapshotByFunction, formatForRuntime, formatMediaOwnerKey, formatMinutes, formatParkedFor, gasCapability, gbToBytes, generateAutomationBlock, getAudioMacroClassIds, getByPath, getCapsByProviderKind, getLogChannelRegistry, getTaxonomyEntry, 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, isRestoredCap, isSameAddonId, isScheduleActive, isSecretConfigField, isSoftwareDecode, isSourceCap, 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, mergeSourceInfo, meshNetworkCapability, method, methodAccessForHttpMethod, metricsProviderCapability, migrateLegacyDeviceSignalConfig, minutesToTimeOfDay, modeMayRead, modeMayWrite, modelConvertCapability, modelDistributorCapability, modelFormatForRuntime, motionCapability, motionDetectionCapability, motionTriggerCapability, motionZonesCapability, mqttBrokerCapability, nativeObjectDetectionCapability, navigationCapability, networkAccessCapability, networkLinkCapability, networkQualityCapability, nodePickerItems, nodePin, nodesCapability, normalizeAddonInitResult, normalizeAudioLabel, normalizeNodeId, normalizeTokenScopes, normalizeUnit, notificationOutputCapability, notificationRulesCapability, notifierCapability, numericSensorCapability, oauthIntegrationCapability, objectInputDeclaresAddonId, objectInputDeclaresRequiredDeviceId, occupancyScope, 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, plateGalleryCapability, platformProbeCapability, poolMemoryThreshold, powerMeterCapability, prepareNotification, presenceCapability, pressureSensorCapability, principalMayReachAddon, privacyMaskCapability, procedureAuthKey, ptzAutotrackCapability, ptzCapability, pythonScriptForBackend, rankStreams, readClusterStepModels, readClusterStepSettings, readDetailCropConvention, readDeviceStateFrom, readNativeLeaseOverride, readNodePin, readTimelapseGeneratedAt, readinessKey, rebootCapability, recordingArchiveCapability, recordingCapability, recordingExportCapability, recordingOnboardCapability, recordingSignalCapability, rectsToCells, reducePoints, 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, 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 };
|
|
68124
|
+
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_SWITCH_CATALOG, CAMERA_SWITCH_ORDER, 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_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, 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, 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, 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_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_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, 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, SUMMARIES_DEFAULT_LIMIT, SUMMARIES_MAX_LIMIT, 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, SummarySchema, 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, 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, cameraStreamsCapability, canConvertUnit, canonicalEgressPlan, carbonMonoxideCapability, cellsToRects, classifyBearerPrincipal, classifyStream, classifyStreams, climateControlCapability, clipExportFailure, clipExportFailureOf, clipReasonHeaderValue, clusterModelSettingKey, clusterStepSettingFieldsFor, clusterStepSettingKey, codecIsAccepted, collectHydratedFieldEntries, collectHydratedFieldValues, collectSecretConfigKeys, colorCapability, colorForKind, commitWatchdogRestart, compareToTarget, compileExpression, compileExpressionSafe, composeSwitchedOff, composedDeviceRef, composedDeviceStableId, composerCapability, compositionEdges, 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, 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, evaluateExpressionSource, evaluatePoolMemory, evaluateSensorEdge, evaluateZoneRules, event, eventEmitterCapability, evictionPolicyForMode, evictionPolicyOfLocation, expandAudioChunkToF32le, expandCapMethods, expandContainer, exportSubjectOf, extensionSlotRef, extractNestedAddonId, extractSourceInfoFromMetadata, faceGalleryCapability, failureContributionCapability, failureRate, fanControlCapability, featureFieldEntries, featureProbeCapability, featureSources, feederCustomizationExample, feederExampleSources, fieldReads, filesystemBrowseCapability, findCandidateCycles, findCompositionCycles, findTimezone, floodCapability, foldSnapshotByFunction, formatForRuntime, formatMediaOwnerKey, formatMinutes, formatParkedFor, gasCapability, gbToBytes, generateAutomationBlock, getAudioMacroClassIds, getByPath, getCapsByProviderKind, getLogChannelRegistry, getTaxonomyEntry, 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, 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, mergeSourceInfo, meshNetworkCapability, method, methodAccessForHttpMethod, metricsProviderCapability, migrateLegacyDeviceSignalConfig, minutesToTimeOfDay, modeMayRead, modeMayWrite, modelConvertCapability, modelDistributorCapability, modelFormatForRuntime, motionCapability, motionDetectionCapability, 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, planItems, plateGalleryCapability, platformProbeCapability, poolMemoryThreshold, powerMeterCapability, prepareNotification, presenceCapability, pressureSensorCapability, principalMayReachAddon, privacyMaskCapability, procedureAuthKey, ptzAutotrackCapability, ptzCapability, publicEventCategories, pythonScriptForBackend, rankStreams, readClusterStepModels, readClusterStepSettings, readDetailCropConvention, readDeviceStateFrom, 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 };
|