@camstack/types 1.2.160 → 1.2.162
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 +10 -40
- package/dist/addon.mjs +10 -40
- package/dist/capabilities/backup.cap.d.ts +13 -6
- package/dist/capabilities/storage-provider.cap.d.ts +0 -11
- package/dist/capabilities/storage.cap.d.ts +0 -22
- package/dist/generated/addon-api.d.ts +0 -7
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +15 -15
- package/dist/index.js +897 -860
- package/dist/index.mjs +896 -861
- package/dist/interfaces/storage-location.d.ts +31 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1431,378 +1431,6 @@ function logLevelAtMost(level, threshold) {
|
|
|
1431
1431
|
return LOG_LEVEL_RANK[level] <= LOG_LEVEL_RANK[threshold];
|
|
1432
1432
|
}
|
|
1433
1433
|
//#endregion
|
|
1434
|
-
//#region src/logging/log-channel.ts
|
|
1435
|
-
/**
|
|
1436
|
-
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
1437
|
-
* an addon declares its channels in.
|
|
1438
|
-
*
|
|
1439
|
-
* ## Two axes, deliberately separated
|
|
1440
|
-
*
|
|
1441
|
-
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
1442
|
-
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
1443
|
-
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
1444
|
-
* and rots silently. So a channel is declared where it is consulted, and the
|
|
1445
|
-
* `log-channels` capability enumerates the declarations.
|
|
1446
|
-
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
1447
|
-
* thing: the logging settings document on the `system` cap. Two authorities
|
|
1448
|
-
* over the values is the exact defect
|
|
1449
|
-
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
1450
|
-
* remove; re-introducing it from the cure side would be grotesque.
|
|
1451
|
-
*
|
|
1452
|
-
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
1453
|
-
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
1454
|
-
* the hot path with a value somebody actually read, and by
|
|
1455
|
-
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
1456
|
-
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
1457
|
-
* disarmed one (D49).
|
|
1458
|
-
*
|
|
1459
|
-
* ## The canonical call shape
|
|
1460
|
-
*
|
|
1461
|
-
* ```ts
|
|
1462
|
-
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
1463
|
-
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
1464
|
-
* }
|
|
1465
|
-
* ```
|
|
1466
|
-
*
|
|
1467
|
-
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
1468
|
-
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
1469
|
-
* object literal is never constructed because it lives inside the branch. It
|
|
1470
|
-
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
1471
|
-
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
1472
|
-
* destination floor (measured at 1.93 ns/call when off).
|
|
1473
|
-
*
|
|
1474
|
-
* ## Why a channel emits at `info`
|
|
1475
|
-
*
|
|
1476
|
-
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
1477
|
-
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
1478
|
-
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
1479
|
-
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
1480
|
-
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
1481
|
-
* emits at the channel's declared level, whose schema floor is `info`.
|
|
1482
|
-
*/
|
|
1483
|
-
/**
|
|
1484
|
-
* The level a channel writes at once armed.
|
|
1485
|
-
*
|
|
1486
|
-
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
1487
|
-
* not leave the process for Loki, and the whole point of arming a channel is
|
|
1488
|
-
* to read it later.
|
|
1489
|
-
*/
|
|
1490
|
-
var LogChannelLevelSchema = z.enum([
|
|
1491
|
-
"info",
|
|
1492
|
-
"warn",
|
|
1493
|
-
"error"
|
|
1494
|
-
]);
|
|
1495
|
-
/**
|
|
1496
|
-
* What an addon declares about one channel. No value, no state — a
|
|
1497
|
-
* declaration is inert.
|
|
1498
|
-
*/
|
|
1499
|
-
var LogChannelDescriptorSchema = z.object({
|
|
1500
|
-
/**
|
|
1501
|
-
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
1502
|
-
* the addon's short name so an operator reading a channel list can tell who
|
|
1503
|
-
* owns it without a second lookup.
|
|
1504
|
-
*/
|
|
1505
|
-
name: z.string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
1506
|
-
/** One sentence: what the operator will SEE after arming it. */
|
|
1507
|
-
description: z.string().min(1),
|
|
1508
|
-
/** The level its lines are emitted at. Never below `info`. */
|
|
1509
|
-
defaultLevel: LogChannelLevelSchema,
|
|
1510
|
-
/**
|
|
1511
|
-
* Whether this channel can be narrowed to a camera.
|
|
1512
|
-
*
|
|
1513
|
-
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
1514
|
-
* consulted with the numeric device id, AND every line the channel admits
|
|
1515
|
-
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
1516
|
-
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
1517
|
-
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
1518
|
-
* the body is the only way to filter.
|
|
1519
|
-
*
|
|
1520
|
-
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
1521
|
-
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
1522
|
-
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
1523
|
-
* path was never taken.
|
|
1524
|
-
*/
|
|
1525
|
-
perDevice: z.boolean()
|
|
1526
|
-
});
|
|
1527
|
-
/**
|
|
1528
|
-
* An armed window over one channel, as the document hands it to a mirror.
|
|
1529
|
-
*
|
|
1530
|
-
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
1531
|
-
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
1532
|
-
*/
|
|
1533
|
-
var LogChannelWindowSchema = z.object({
|
|
1534
|
-
channel: z.string().min(1),
|
|
1535
|
-
/** Epoch ms the window closes at. */
|
|
1536
|
-
armedUntilMs: z.number(),
|
|
1537
|
-
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
1538
|
-
deviceIds: z.array(z.number().int()).readonly().nullable()
|
|
1539
|
-
});
|
|
1540
|
-
/**
|
|
1541
|
-
* The gate a hot path holds.
|
|
1542
|
-
*
|
|
1543
|
-
* Obtain it ONCE — at module scope or in a constructor — and keep the
|
|
1544
|
-
* reference. Looking a channel up by name per line would put a Map lookup on
|
|
1545
|
-
* the path this class exists to keep free.
|
|
1546
|
-
*/
|
|
1547
|
-
var LogChannelGate = class {
|
|
1548
|
-
descriptor;
|
|
1549
|
-
/**
|
|
1550
|
-
* HOT PATH GUARD. A plain data FIELD, and it must stay one.
|
|
1551
|
-
*
|
|
1552
|
-
* `log-channel.spec.ts` asserts the property descriptor has no getter and
|
|
1553
|
-
* booby-traps the device set, so turning this into an accessor — or reading
|
|
1554
|
-
* anything before it — fails the spec instead of taxing every line the
|
|
1555
|
-
* process emits.
|
|
1556
|
-
*/
|
|
1557
|
-
on = false;
|
|
1558
|
-
/** `null` while armed for every camera. Never read while `on` is false. */
|
|
1559
|
-
devices = null;
|
|
1560
|
-
level;
|
|
1561
|
-
closesAtMs = 0;
|
|
1562
|
-
constructor(descriptor) {
|
|
1563
|
-
this.descriptor = descriptor;
|
|
1564
|
-
this.level = descriptor.defaultLevel;
|
|
1565
|
-
}
|
|
1566
|
-
/** Epoch ms this channel disarms itself at. 0 when disarmed. */
|
|
1567
|
-
get armedUntilMs() {
|
|
1568
|
-
return this.on ? this.closesAtMs : 0;
|
|
1569
|
-
}
|
|
1570
|
-
/**
|
|
1571
|
-
* Does this channel want a line about `deviceId`?
|
|
1572
|
-
*
|
|
1573
|
-
* Call it only behind `gate.on &&`. On its own it is still correct — the
|
|
1574
|
-
* guard is repeated inside — but the point of the prefix is that a disarmed
|
|
1575
|
-
* channel must not pay the call at all.
|
|
1576
|
-
*/
|
|
1577
|
-
wants(deviceId) {
|
|
1578
|
-
if (!this.on) return false;
|
|
1579
|
-
return this.devices === null || this.devices.has(deviceId);
|
|
1580
|
-
}
|
|
1581
|
-
/**
|
|
1582
|
-
* Emit one line on this channel, at the channel's declared level.
|
|
1583
|
-
*
|
|
1584
|
-
* The channel name is added as `tags.logChannel` so LogQL can select the
|
|
1585
|
-
* channel without matching on the message text, and whatever `tags` the
|
|
1586
|
-
* caller passed — `deviceId` above all — is preserved.
|
|
1587
|
-
*/
|
|
1588
|
-
log(logger, message, extras) {
|
|
1589
|
-
if (!this.on) return;
|
|
1590
|
-
const tags = {
|
|
1591
|
-
...extras.tags,
|
|
1592
|
-
logChannel: this.descriptor.name
|
|
1593
|
-
};
|
|
1594
|
-
const line = {
|
|
1595
|
-
...extras,
|
|
1596
|
-
tags
|
|
1597
|
-
};
|
|
1598
|
-
if (this.level === "error") logger.error(message, line);
|
|
1599
|
-
else if (this.level === "warn") logger.warn(message, line);
|
|
1600
|
-
else logger.info(message, line);
|
|
1601
|
-
}
|
|
1602
|
-
/**
|
|
1603
|
-
* Arm (or RE-arm, restarting) this channel. Off the hot path only.
|
|
1604
|
-
*
|
|
1605
|
-
* An empty `deviceIds` list is treated as "every camera" rather than "no
|
|
1606
|
-
* camera": a window that matches nothing is indistinguishable from a
|
|
1607
|
-
* disarmed one, and the operator who asked for it would wait for lines that
|
|
1608
|
-
* can never come.
|
|
1609
|
-
*/
|
|
1610
|
-
arm(window) {
|
|
1611
|
-
const ids = window.deviceIds;
|
|
1612
|
-
this.devices = ids === null || ids.length === 0 ? null : new Set(ids);
|
|
1613
|
-
this.closesAtMs = window.armedUntilMs;
|
|
1614
|
-
this.on = true;
|
|
1615
|
-
}
|
|
1616
|
-
/** Disarm. Off the hot path only. */
|
|
1617
|
-
disarm() {
|
|
1618
|
-
this.on = false;
|
|
1619
|
-
this.devices = null;
|
|
1620
|
-
this.closesAtMs = 0;
|
|
1621
|
-
}
|
|
1622
|
-
};
|
|
1623
|
-
/**
|
|
1624
|
-
* Every channel this PROCESS declares, and the mirror of what is armed on it.
|
|
1625
|
-
*
|
|
1626
|
-
* One per process. A forked runner has its own, and it is refreshed through
|
|
1627
|
-
* the `log-channels` capability by the hub that owns the document — the
|
|
1628
|
-
* registry never reaches for a value itself.
|
|
1629
|
-
*/
|
|
1630
|
-
var LogChannelRegistry = class {
|
|
1631
|
-
gates = /* @__PURE__ */ new Map();
|
|
1632
|
-
/**
|
|
1633
|
-
* Declare a channel and get its gate.
|
|
1634
|
-
*
|
|
1635
|
-
* A duplicate name throws. Two declarations of one name is a programming
|
|
1636
|
-
* error, not a merge: the operator would arm one and the other would stay
|
|
1637
|
-
* dark, which is the dead-knob shape (D62) with an extra step.
|
|
1638
|
-
*/
|
|
1639
|
-
declare(descriptor) {
|
|
1640
|
-
const parsed = LogChannelDescriptorSchema.parse(descriptor);
|
|
1641
|
-
if (this.gates.get(parsed.name) !== void 0) throw new Error(`log channel "${parsed.name}" is already declared in this process — two declarations of one name is a programming error, not a merge`);
|
|
1642
|
-
const gate = new LogChannelGate(parsed);
|
|
1643
|
-
this.gates.set(parsed.name, gate);
|
|
1644
|
-
return gate;
|
|
1645
|
-
}
|
|
1646
|
-
/** The declarations, sorted by name so a list is stable to read and diff. */
|
|
1647
|
-
list() {
|
|
1648
|
-
return [...this.gates.values()].map((gate) => gate.descriptor).sort((a, b) => a.name.localeCompare(b.name));
|
|
1649
|
-
}
|
|
1650
|
-
/** The gate for a declared channel, or `undefined`. */
|
|
1651
|
-
gate(name) {
|
|
1652
|
-
return this.gates.get(name);
|
|
1653
|
-
}
|
|
1654
|
-
/**
|
|
1655
|
-
* Apply the FULL set of armed windows. Off the hot path.
|
|
1656
|
-
*
|
|
1657
|
-
* Full, not incremental, and that is the whole design: the document is the
|
|
1658
|
-
* authority, so a channel the document does not name is disarmed here. An
|
|
1659
|
-
* incremental apply would let a disarm get lost in transit and leave a
|
|
1660
|
-
* channel running that nobody can see is running.
|
|
1661
|
-
*
|
|
1662
|
-
* A window already past its deadline is ignored rather than armed — a
|
|
1663
|
-
* restore that re-armed an expired window would make a forgotten diagnostic
|
|
1664
|
-
* immortal across restarts.
|
|
1665
|
-
*
|
|
1666
|
-
* Returns the names it could not place, so the caller can log them: a
|
|
1667
|
-
* channel named in the document that this process does not declare is
|
|
1668
|
-
* either a typo or an addon that has not booted yet, and both deserve a
|
|
1669
|
-
* line rather than silence.
|
|
1670
|
-
*/
|
|
1671
|
-
apply(windows, nowMs) {
|
|
1672
|
-
const wanted = /* @__PURE__ */ new Map();
|
|
1673
|
-
const unknown = [];
|
|
1674
|
-
for (const window of windows) {
|
|
1675
|
-
if (window.armedUntilMs <= nowMs) continue;
|
|
1676
|
-
if (!this.gates.has(window.channel)) {
|
|
1677
|
-
unknown.push(window.channel);
|
|
1678
|
-
continue;
|
|
1679
|
-
}
|
|
1680
|
-
wanted.set(window.channel, window);
|
|
1681
|
-
}
|
|
1682
|
-
for (const [name, gate] of this.gates) {
|
|
1683
|
-
const window = wanted.get(name);
|
|
1684
|
-
if (window === void 0) gate.disarm();
|
|
1685
|
-
else gate.arm(window);
|
|
1686
|
-
}
|
|
1687
|
-
return unknown;
|
|
1688
|
-
}
|
|
1689
|
-
/**
|
|
1690
|
-
* Disarm whatever has run out. Called on a timer, NEVER from a log path — a
|
|
1691
|
-
* diagnostic that adds a `Date.now()` to the path it is measuring measures
|
|
1692
|
-
* itself.
|
|
1693
|
-
*
|
|
1694
|
-
* Returns the names it closed, so the caller can write the one line that
|
|
1695
|
-
* says a window ended and stops "it went quiet" from reading as "the branch
|
|
1696
|
-
* was not taken".
|
|
1697
|
-
*/
|
|
1698
|
-
tick(nowMs) {
|
|
1699
|
-
const closed = [];
|
|
1700
|
-
for (const [name, gate] of this.gates) if (gate.on && gate.armedUntilMs <= nowMs) {
|
|
1701
|
-
gate.disarm();
|
|
1702
|
-
closed.push(name);
|
|
1703
|
-
}
|
|
1704
|
-
return closed;
|
|
1705
|
-
}
|
|
1706
|
-
/** The channels armed right now, as the document would describe them. */
|
|
1707
|
-
armed() {
|
|
1708
|
-
const out = [];
|
|
1709
|
-
for (const [name, gate] of this.gates) if (gate.on) out.push({
|
|
1710
|
-
channel: name,
|
|
1711
|
-
armedUntilMs: gate.armedUntilMs,
|
|
1712
|
-
deviceIds: null
|
|
1713
|
-
});
|
|
1714
|
-
return out;
|
|
1715
|
-
}
|
|
1716
|
-
};
|
|
1717
|
-
//#endregion
|
|
1718
|
-
//#region src/logging/log-channel.singleton.ts
|
|
1719
|
-
/**
|
|
1720
|
-
* Process-wide holder for the {@link LogChannelRegistry}.
|
|
1721
|
-
*
|
|
1722
|
-
* Three call sites that never meet need the SAME instance: the hot paths that
|
|
1723
|
-
* declare a gate at module scope, the `log-channels` provider that enumerates
|
|
1724
|
-
* the declarations for the hub, and the same provider applying the windows the
|
|
1725
|
-
* document hands down. A registry built inside any one of them would be
|
|
1726
|
-
* refreshed and collected — the shape of a knob that never does anything.
|
|
1727
|
-
*
|
|
1728
|
-
* Same idiom as `logging-gate.singleton.ts` and
|
|
1729
|
-
* `http-request-census.singleton.ts`.
|
|
1730
|
-
*/
|
|
1731
|
-
var instance = null;
|
|
1732
|
-
/** The process-wide log channel registry. Created empty on first use. */
|
|
1733
|
-
function getLogChannelRegistry() {
|
|
1734
|
-
instance ??= new LogChannelRegistry();
|
|
1735
|
-
return instance;
|
|
1736
|
-
}
|
|
1737
|
-
/**
|
|
1738
|
-
* Declare a channel on the process-wide registry and get its gate.
|
|
1739
|
-
*
|
|
1740
|
-
* The one call an addon makes. Keep the returned gate in a module-scope
|
|
1741
|
-
* `const`: looking a channel up by name per line would put a Map lookup on
|
|
1742
|
-
* exactly the path this mechanism exists to keep free.
|
|
1743
|
-
*
|
|
1744
|
-
* `scripts/check-log-channel-gated.ts` reads these call sites. It pairs the
|
|
1745
|
-
* declared name with the binding it is assigned to and refuses to let a
|
|
1746
|
-
* channel ship that no `<binding>.on` anywhere consults — a declared channel
|
|
1747
|
-
* nobody reads is a knob the operator turns with nothing happening, forever,
|
|
1748
|
-
* and without a line. That is D62, and this repo has now shipped it three
|
|
1749
|
-
* times (`audioThresholdDbfs`, the HA entities with no source, the second
|
|
1750
|
-
* per-camera switch that wrote a store nobody read).
|
|
1751
|
-
*/
|
|
1752
|
-
function declareLogChannel(descriptor) {
|
|
1753
|
-
return getLogChannelRegistry().declare(descriptor);
|
|
1754
|
-
}
|
|
1755
|
-
/** Test-only: drop the instance so a spec starts from an empty registry. */
|
|
1756
|
-
function __resetLogChannelRegistryForTests() {
|
|
1757
|
-
instance = null;
|
|
1758
|
-
}
|
|
1759
|
-
//#endregion
|
|
1760
|
-
//#region src/logging/log-channel-provider.ts
|
|
1761
|
-
/**
|
|
1762
|
-
* How often expiry is noticed. Coarse on purpose: the cost of a channel
|
|
1763
|
-
* running a few seconds past its deadline is a few extra lines, and the cost
|
|
1764
|
-
* of a tight timer in every addon process is paid forever.
|
|
1765
|
-
*/
|
|
1766
|
-
var LOG_CHANNEL_TICK_MS = 5e3;
|
|
1767
|
-
/**
|
|
1768
|
-
* Build the `log-channels` provider for this process.
|
|
1769
|
-
*
|
|
1770
|
-
* `logger` is used ONLY off the hot path — for the arm/expiry lines — so a
|
|
1771
|
-
* channel that is never armed costs this module nothing but a timer.
|
|
1772
|
-
*/
|
|
1773
|
-
function createLogChannelsProvider(logger, options = {}) {
|
|
1774
|
-
const registry = getLogChannelRegistry();
|
|
1775
|
-
const now = options.now ?? Date.now;
|
|
1776
|
-
const tickMs = options.tickMs ?? 5e3;
|
|
1777
|
-
const timer = setInterval(() => {
|
|
1778
|
-
const closed = registry.tick(now());
|
|
1779
|
-
for (const name of closed) logger.info("log channel window closed", {
|
|
1780
|
-
tags: { logChannel: name },
|
|
1781
|
-
meta: { channel: name }
|
|
1782
|
-
});
|
|
1783
|
-
}, tickMs);
|
|
1784
|
-
timer.unref?.();
|
|
1785
|
-
return {
|
|
1786
|
-
list: () => registry.list(),
|
|
1787
|
-
apply: (input) => {
|
|
1788
|
-
const unknown = registry.apply(input.windows, now());
|
|
1789
|
-
const armed = registry.armed();
|
|
1790
|
-
logger.info("log channels applied", { meta: {
|
|
1791
|
-
armed: armed.map((window) => window.channel),
|
|
1792
|
-
unknown,
|
|
1793
|
-
declared: registry.list().length
|
|
1794
|
-
} });
|
|
1795
|
-
return {
|
|
1796
|
-
armed: armed.length,
|
|
1797
|
-
unknown
|
|
1798
|
-
};
|
|
1799
|
-
},
|
|
1800
|
-
stop: () => {
|
|
1801
|
-
clearInterval(timer);
|
|
1802
|
-
}
|
|
1803
|
-
};
|
|
1804
|
-
}
|
|
1805
|
-
//#endregion
|
|
1806
1434
|
//#region src/interfaces/ops-log.ts
|
|
1807
1435
|
/**
|
|
1808
1436
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
@@ -3040,8 +2668,11 @@ var StorageLocationTypeSchema = z.string().regex(/^[a-z][a-zA-Z0-9-]*$/);
|
|
|
3040
2668
|
* `STORAGE_LOCATION_CARDINALITY` map has been removed.
|
|
3041
2669
|
*
|
|
3042
2670
|
* `id` is a stable namespaced string of the form `<type>:<slug>`.
|
|
3043
|
-
* The
|
|
3044
|
-
*
|
|
2671
|
+
* The seed names its first instance `<type>:default` — a NAME, not a flag.
|
|
2672
|
+
* There is no default location any more (D383): `enabled` is the whole write
|
|
2673
|
+
* model, and a bare type ref resolves to the sole location of the type, or —
|
|
2674
|
+
* transitionally, only while legacy NULL-stamped rows exist — to the row whose
|
|
2675
|
+
* slug is `default`.
|
|
3045
2676
|
*
|
|
3046
2677
|
* `isSystem` is a legacy persisted flag. Seed still creates the initial
|
|
3047
2678
|
* `<type>:default` locations; the flag is no longer a lock, a badge, or a
|
|
@@ -3062,21 +2693,20 @@ var StorageLocationSchema = z.object({
|
|
|
3062
2693
|
* flag at upsert time, not here (the schema is provider-agnostic).
|
|
3063
2694
|
*/
|
|
3064
2695
|
nodeId: z.string().optional(),
|
|
3065
|
-
isDefault: z.boolean().default(false),
|
|
3066
2696
|
isSystem: z.boolean().default(false),
|
|
3067
2697
|
/**
|
|
3068
|
-
*
|
|
3069
|
-
*
|
|
3070
|
-
*
|
|
3071
|
-
*
|
|
3072
|
-
*
|
|
2698
|
+
* THE write switch, and the only one (D383). `enabled: true` means every
|
|
2699
|
+
* consumer that chooses a write target for this type may write here, and all
|
|
2700
|
+
* enabled locations of a type are used TOGETHER; `false` means read-only —
|
|
2701
|
+
* still read, still played back, still age-swept, still drained, never
|
|
2702
|
+
* written.
|
|
3073
2703
|
*
|
|
3074
|
-
* OPTIONAL
|
|
3075
|
-
*
|
|
3076
|
-
*
|
|
3077
|
-
*
|
|
3078
|
-
*
|
|
3079
|
-
*
|
|
2704
|
+
* OPTIONAL only for the wire: an upsert that omits it means "leave what is
|
|
2705
|
+
* stored" on an update and "born inert unless it is the first location of its
|
|
2706
|
+
* type" on a create. On a PERSISTED row absence is legacy and it means
|
|
2707
|
+
* enabled — {@link isLocationEnabled} is the one place that says so, and the
|
|
2708
|
+
* orchestrator stamps every flagless row `true` once at hydrate so absence
|
|
2709
|
+
* stops existing rather than being re-derived on every read.
|
|
3080
2710
|
*/
|
|
3081
2711
|
enabled: z.boolean().optional(),
|
|
3082
2712
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
@@ -3090,9 +2720,31 @@ var StorageLocationSchema = z.object({
|
|
|
3090
2720
|
updatedAt: z.number()
|
|
3091
2721
|
});
|
|
3092
2722
|
/**
|
|
2723
|
+
* The retired `isDefault` key, DECLARED rather than dropped.
|
|
2724
|
+
*
|
|
2725
|
+
* A key removed from a non-strict `z.object` is stripped in silence (D380,
|
|
2726
|
+
* D381): a reader that still needs the old value gets `undefined` and cannot
|
|
2727
|
+
* tell "absent" from "never sent". The one reader that legitimately needs it —
|
|
2728
|
+
* the location store's boot migration, which turns the old default flag into
|
|
2729
|
+
* the `enabled` write set — parses THIS schema against the raw row instead, so
|
|
2730
|
+
* the migration is explicit and the live schema stays clean. Nothing else in
|
|
2731
|
+
* the repo may read it; `scripts/check-no-storage-default.ts` enforces that.
|
|
2732
|
+
*/
|
|
2733
|
+
var LegacyStorageLocationDefaultSchema = z.object({ isDefault: z.boolean().optional() });
|
|
2734
|
+
/**
|
|
2735
|
+
* Is this location a write target? THE one place that decides what an absent
|
|
2736
|
+
* `enabled` means on a persisted row — legacy rows predate the flag and were
|
|
2737
|
+
* active, so absence is enabled. Every consumer asks here rather than spelling
|
|
2738
|
+
* `enabled !== false` again, so the tri-state has exactly one interpretation.
|
|
2739
|
+
*/
|
|
2740
|
+
function isLocationEnabled(location) {
|
|
2741
|
+
return location.enabled !== false;
|
|
2742
|
+
}
|
|
2743
|
+
/**
|
|
3093
2744
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
3094
2745
|
* Either:
|
|
3095
|
-
* - a `StorageLocationType` (e.g. `'backups'`) →
|
|
2746
|
+
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
2747
|
+
* (transitionally, the `<type>:default`-slugged row when several exist)
|
|
3096
2748
|
* - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
|
|
3097
2749
|
*
|
|
3098
2750
|
* The orchestrator's `resolveRef(ref)` handles both cases.
|
|
@@ -3456,6 +3108,701 @@ function findTimezone(id) {
|
|
|
3456
3108
|
return TIMEZONES.find((tz) => tz.id === id);
|
|
3457
3109
|
}
|
|
3458
3110
|
//#endregion
|
|
3111
|
+
//#region src/logging/log-channel.ts
|
|
3112
|
+
/**
|
|
3113
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
3114
|
+
* an addon declares its channels in.
|
|
3115
|
+
*
|
|
3116
|
+
* ## Two axes, deliberately separated
|
|
3117
|
+
*
|
|
3118
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
3119
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
3120
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
3121
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
3122
|
+
* `log-channels` capability enumerates the declarations.
|
|
3123
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
3124
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
3125
|
+
* over the values is the exact defect
|
|
3126
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
3127
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
3128
|
+
*
|
|
3129
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
3130
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
3131
|
+
* the hot path with a value somebody actually read, and by
|
|
3132
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
3133
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
3134
|
+
* disarmed one (D49).
|
|
3135
|
+
*
|
|
3136
|
+
* ## The canonical call shape
|
|
3137
|
+
*
|
|
3138
|
+
* ```ts
|
|
3139
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
3140
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
3141
|
+
* }
|
|
3142
|
+
* ```
|
|
3143
|
+
*
|
|
3144
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
3145
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
3146
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
3147
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
3148
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
3149
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
3150
|
+
*
|
|
3151
|
+
* ## Why a channel emits at `info`
|
|
3152
|
+
*
|
|
3153
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
3154
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
3155
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
3156
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
3157
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
3158
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
3159
|
+
*/
|
|
3160
|
+
/**
|
|
3161
|
+
* The level a channel writes at once armed.
|
|
3162
|
+
*
|
|
3163
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
3164
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
3165
|
+
* to read it later.
|
|
3166
|
+
*/
|
|
3167
|
+
var LogChannelLevelSchema = z.enum([
|
|
3168
|
+
"info",
|
|
3169
|
+
"warn",
|
|
3170
|
+
"error"
|
|
3171
|
+
]);
|
|
3172
|
+
/**
|
|
3173
|
+
* What an addon declares about one channel. No value, no state — a
|
|
3174
|
+
* declaration is inert.
|
|
3175
|
+
*/
|
|
3176
|
+
var LogChannelDescriptorSchema = z.object({
|
|
3177
|
+
/**
|
|
3178
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
3179
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
3180
|
+
* owns it without a second lookup.
|
|
3181
|
+
*/
|
|
3182
|
+
name: z.string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
3183
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
3184
|
+
description: z.string().min(1),
|
|
3185
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
3186
|
+
defaultLevel: LogChannelLevelSchema,
|
|
3187
|
+
/**
|
|
3188
|
+
* Whether this channel can be narrowed to a camera.
|
|
3189
|
+
*
|
|
3190
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
3191
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
3192
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
3193
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
3194
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
3195
|
+
* the body is the only way to filter.
|
|
3196
|
+
*
|
|
3197
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
3198
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
3199
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
3200
|
+
* path was never taken.
|
|
3201
|
+
*/
|
|
3202
|
+
perDevice: z.boolean()
|
|
3203
|
+
});
|
|
3204
|
+
/**
|
|
3205
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
3206
|
+
*
|
|
3207
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
3208
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
3209
|
+
*/
|
|
3210
|
+
var LogChannelWindowSchema = z.object({
|
|
3211
|
+
channel: z.string().min(1),
|
|
3212
|
+
/** Epoch ms the window closes at. */
|
|
3213
|
+
armedUntilMs: z.number(),
|
|
3214
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
3215
|
+
deviceIds: z.array(z.number().int()).readonly().nullable()
|
|
3216
|
+
});
|
|
3217
|
+
/**
|
|
3218
|
+
* The gate a hot path holds.
|
|
3219
|
+
*
|
|
3220
|
+
* Obtain it ONCE — at module scope or in a constructor — and keep the
|
|
3221
|
+
* reference. Looking a channel up by name per line would put a Map lookup on
|
|
3222
|
+
* the path this class exists to keep free.
|
|
3223
|
+
*/
|
|
3224
|
+
var LogChannelGate = class {
|
|
3225
|
+
descriptor;
|
|
3226
|
+
/**
|
|
3227
|
+
* HOT PATH GUARD. A plain data FIELD, and it must stay one.
|
|
3228
|
+
*
|
|
3229
|
+
* `log-channel.spec.ts` asserts the property descriptor has no getter and
|
|
3230
|
+
* booby-traps the device set, so turning this into an accessor — or reading
|
|
3231
|
+
* anything before it — fails the spec instead of taxing every line the
|
|
3232
|
+
* process emits.
|
|
3233
|
+
*/
|
|
3234
|
+
on = false;
|
|
3235
|
+
/** `null` while armed for every camera. Never read while `on` is false. */
|
|
3236
|
+
devices = null;
|
|
3237
|
+
level;
|
|
3238
|
+
closesAtMs = 0;
|
|
3239
|
+
constructor(descriptor) {
|
|
3240
|
+
this.descriptor = descriptor;
|
|
3241
|
+
this.level = descriptor.defaultLevel;
|
|
3242
|
+
}
|
|
3243
|
+
/** Epoch ms this channel disarms itself at. 0 when disarmed. */
|
|
3244
|
+
get armedUntilMs() {
|
|
3245
|
+
return this.on ? this.closesAtMs : 0;
|
|
3246
|
+
}
|
|
3247
|
+
/**
|
|
3248
|
+
* Does this channel want a line about `deviceId`?
|
|
3249
|
+
*
|
|
3250
|
+
* Call it only behind `gate.on &&`. On its own it is still correct — the
|
|
3251
|
+
* guard is repeated inside — but the point of the prefix is that a disarmed
|
|
3252
|
+
* channel must not pay the call at all.
|
|
3253
|
+
*/
|
|
3254
|
+
wants(deviceId) {
|
|
3255
|
+
if (!this.on) return false;
|
|
3256
|
+
return this.devices === null || this.devices.has(deviceId);
|
|
3257
|
+
}
|
|
3258
|
+
/**
|
|
3259
|
+
* Emit one line on this channel, at the channel's declared level.
|
|
3260
|
+
*
|
|
3261
|
+
* The channel name is added as `tags.logChannel` so LogQL can select the
|
|
3262
|
+
* channel without matching on the message text, and whatever `tags` the
|
|
3263
|
+
* caller passed — `deviceId` above all — is preserved.
|
|
3264
|
+
*/
|
|
3265
|
+
log(logger, message, extras) {
|
|
3266
|
+
if (!this.on) return;
|
|
3267
|
+
const tags = {
|
|
3268
|
+
...extras.tags,
|
|
3269
|
+
logChannel: this.descriptor.name
|
|
3270
|
+
};
|
|
3271
|
+
const line = {
|
|
3272
|
+
...extras,
|
|
3273
|
+
tags
|
|
3274
|
+
};
|
|
3275
|
+
if (this.level === "error") logger.error(message, line);
|
|
3276
|
+
else if (this.level === "warn") logger.warn(message, line);
|
|
3277
|
+
else logger.info(message, line);
|
|
3278
|
+
}
|
|
3279
|
+
/**
|
|
3280
|
+
* Arm (or RE-arm, restarting) this channel. Off the hot path only.
|
|
3281
|
+
*
|
|
3282
|
+
* An empty `deviceIds` list is treated as "every camera" rather than "no
|
|
3283
|
+
* camera": a window that matches nothing is indistinguishable from a
|
|
3284
|
+
* disarmed one, and the operator who asked for it would wait for lines that
|
|
3285
|
+
* can never come.
|
|
3286
|
+
*/
|
|
3287
|
+
arm(window) {
|
|
3288
|
+
const ids = window.deviceIds;
|
|
3289
|
+
this.devices = ids === null || ids.length === 0 ? null : new Set(ids);
|
|
3290
|
+
this.closesAtMs = window.armedUntilMs;
|
|
3291
|
+
this.on = true;
|
|
3292
|
+
}
|
|
3293
|
+
/** Disarm. Off the hot path only. */
|
|
3294
|
+
disarm() {
|
|
3295
|
+
this.on = false;
|
|
3296
|
+
this.devices = null;
|
|
3297
|
+
this.closesAtMs = 0;
|
|
3298
|
+
}
|
|
3299
|
+
};
|
|
3300
|
+
/**
|
|
3301
|
+
* Every channel this PROCESS declares, and the mirror of what is armed on it.
|
|
3302
|
+
*
|
|
3303
|
+
* One per process. A forked runner has its own, and it is refreshed through
|
|
3304
|
+
* the `log-channels` capability by the hub that owns the document — the
|
|
3305
|
+
* registry never reaches for a value itself.
|
|
3306
|
+
*/
|
|
3307
|
+
var LogChannelRegistry = class {
|
|
3308
|
+
gates = /* @__PURE__ */ new Map();
|
|
3309
|
+
/**
|
|
3310
|
+
* Declare a channel and get its gate.
|
|
3311
|
+
*
|
|
3312
|
+
* A duplicate name throws. Two declarations of one name is a programming
|
|
3313
|
+
* error, not a merge: the operator would arm one and the other would stay
|
|
3314
|
+
* dark, which is the dead-knob shape (D62) with an extra step.
|
|
3315
|
+
*/
|
|
3316
|
+
declare(descriptor) {
|
|
3317
|
+
const parsed = LogChannelDescriptorSchema.parse(descriptor);
|
|
3318
|
+
if (this.gates.get(parsed.name) !== void 0) throw new Error(`log channel "${parsed.name}" is already declared in this process — two declarations of one name is a programming error, not a merge`);
|
|
3319
|
+
const gate = new LogChannelGate(parsed);
|
|
3320
|
+
this.gates.set(parsed.name, gate);
|
|
3321
|
+
return gate;
|
|
3322
|
+
}
|
|
3323
|
+
/** The declarations, sorted by name so a list is stable to read and diff. */
|
|
3324
|
+
list() {
|
|
3325
|
+
return [...this.gates.values()].map((gate) => gate.descriptor).sort((a, b) => a.name.localeCompare(b.name));
|
|
3326
|
+
}
|
|
3327
|
+
/** The gate for a declared channel, or `undefined`. */
|
|
3328
|
+
gate(name) {
|
|
3329
|
+
return this.gates.get(name);
|
|
3330
|
+
}
|
|
3331
|
+
/**
|
|
3332
|
+
* Apply the FULL set of armed windows. Off the hot path.
|
|
3333
|
+
*
|
|
3334
|
+
* Full, not incremental, and that is the whole design: the document is the
|
|
3335
|
+
* authority, so a channel the document does not name is disarmed here. An
|
|
3336
|
+
* incremental apply would let a disarm get lost in transit and leave a
|
|
3337
|
+
* channel running that nobody can see is running.
|
|
3338
|
+
*
|
|
3339
|
+
* A window already past its deadline is ignored rather than armed — a
|
|
3340
|
+
* restore that re-armed an expired window would make a forgotten diagnostic
|
|
3341
|
+
* immortal across restarts.
|
|
3342
|
+
*
|
|
3343
|
+
* Returns the names it could not place, so the caller can log them: a
|
|
3344
|
+
* channel named in the document that this process does not declare is
|
|
3345
|
+
* either a typo or an addon that has not booted yet, and both deserve a
|
|
3346
|
+
* line rather than silence.
|
|
3347
|
+
*/
|
|
3348
|
+
apply(windows, nowMs) {
|
|
3349
|
+
const wanted = /* @__PURE__ */ new Map();
|
|
3350
|
+
const unknown = [];
|
|
3351
|
+
for (const window of windows) {
|
|
3352
|
+
if (window.armedUntilMs <= nowMs) continue;
|
|
3353
|
+
if (!this.gates.has(window.channel)) {
|
|
3354
|
+
unknown.push(window.channel);
|
|
3355
|
+
continue;
|
|
3356
|
+
}
|
|
3357
|
+
wanted.set(window.channel, window);
|
|
3358
|
+
}
|
|
3359
|
+
for (const [name, gate] of this.gates) {
|
|
3360
|
+
const window = wanted.get(name);
|
|
3361
|
+
if (window === void 0) gate.disarm();
|
|
3362
|
+
else gate.arm(window);
|
|
3363
|
+
}
|
|
3364
|
+
return unknown;
|
|
3365
|
+
}
|
|
3366
|
+
/**
|
|
3367
|
+
* Disarm whatever has run out. Called on a timer, NEVER from a log path — a
|
|
3368
|
+
* diagnostic that adds a `Date.now()` to the path it is measuring measures
|
|
3369
|
+
* itself.
|
|
3370
|
+
*
|
|
3371
|
+
* Returns the names it closed, so the caller can write the one line that
|
|
3372
|
+
* says a window ended and stops "it went quiet" from reading as "the branch
|
|
3373
|
+
* was not taken".
|
|
3374
|
+
*/
|
|
3375
|
+
tick(nowMs) {
|
|
3376
|
+
const closed = [];
|
|
3377
|
+
for (const [name, gate] of this.gates) if (gate.on && gate.armedUntilMs <= nowMs) {
|
|
3378
|
+
gate.disarm();
|
|
3379
|
+
closed.push(name);
|
|
3380
|
+
}
|
|
3381
|
+
return closed;
|
|
3382
|
+
}
|
|
3383
|
+
/** The channels armed right now, as the document would describe them. */
|
|
3384
|
+
armed() {
|
|
3385
|
+
const out = [];
|
|
3386
|
+
for (const [name, gate] of this.gates) if (gate.on) out.push({
|
|
3387
|
+
channel: name,
|
|
3388
|
+
armedUntilMs: gate.armedUntilMs,
|
|
3389
|
+
deviceIds: null
|
|
3390
|
+
});
|
|
3391
|
+
return out;
|
|
3392
|
+
}
|
|
3393
|
+
};
|
|
3394
|
+
//#endregion
|
|
3395
|
+
//#region src/logging/log-channel.singleton.ts
|
|
3396
|
+
/**
|
|
3397
|
+
* Process-wide holder for the {@link LogChannelRegistry}.
|
|
3398
|
+
*
|
|
3399
|
+
* Three call sites that never meet need the SAME instance: the hot paths that
|
|
3400
|
+
* declare a gate at module scope, the `log-channels` provider that enumerates
|
|
3401
|
+
* the declarations for the hub, and the same provider applying the windows the
|
|
3402
|
+
* document hands down. A registry built inside any one of them would be
|
|
3403
|
+
* refreshed and collected — the shape of a knob that never does anything.
|
|
3404
|
+
*
|
|
3405
|
+
* Same idiom as `logging-gate.singleton.ts` and
|
|
3406
|
+
* `http-request-census.singleton.ts`.
|
|
3407
|
+
*/
|
|
3408
|
+
var instance = null;
|
|
3409
|
+
/** The process-wide log channel registry. Created empty on first use. */
|
|
3410
|
+
function getLogChannelRegistry() {
|
|
3411
|
+
instance ??= new LogChannelRegistry();
|
|
3412
|
+
return instance;
|
|
3413
|
+
}
|
|
3414
|
+
/**
|
|
3415
|
+
* Declare a channel on the process-wide registry and get its gate.
|
|
3416
|
+
*
|
|
3417
|
+
* The one call an addon makes. Keep the returned gate in a module-scope
|
|
3418
|
+
* `const`: looking a channel up by name per line would put a Map lookup on
|
|
3419
|
+
* exactly the path this mechanism exists to keep free.
|
|
3420
|
+
*
|
|
3421
|
+
* `scripts/check-log-channel-gated.ts` reads these call sites. It pairs the
|
|
3422
|
+
* declared name with the binding it is assigned to and refuses to let a
|
|
3423
|
+
* channel ship that no `<binding>.on` anywhere consults — a declared channel
|
|
3424
|
+
* nobody reads is a knob the operator turns with nothing happening, forever,
|
|
3425
|
+
* and without a line. That is D62, and this repo has now shipped it three
|
|
3426
|
+
* times (`audioThresholdDbfs`, the HA entities with no source, the second
|
|
3427
|
+
* per-camera switch that wrote a store nobody read).
|
|
3428
|
+
*/
|
|
3429
|
+
function declareLogChannel(descriptor) {
|
|
3430
|
+
return getLogChannelRegistry().declare(descriptor);
|
|
3431
|
+
}
|
|
3432
|
+
/** Test-only: drop the instance so a spec starts from an empty registry. */
|
|
3433
|
+
function __resetLogChannelRegistryForTests() {
|
|
3434
|
+
instance = null;
|
|
3435
|
+
}
|
|
3436
|
+
//#endregion
|
|
3437
|
+
//#region src/logging/log-channel-provider.ts
|
|
3438
|
+
/**
|
|
3439
|
+
* How often expiry is noticed. Coarse on purpose: the cost of a channel
|
|
3440
|
+
* running a few seconds past its deadline is a few extra lines, and the cost
|
|
3441
|
+
* of a tight timer in every addon process is paid forever.
|
|
3442
|
+
*/
|
|
3443
|
+
var LOG_CHANNEL_TICK_MS = 5e3;
|
|
3444
|
+
/**
|
|
3445
|
+
* Build the `log-channels` provider for this process.
|
|
3446
|
+
*
|
|
3447
|
+
* `logger` is used ONLY off the hot path — for the arm/expiry lines — so a
|
|
3448
|
+
* channel that is never armed costs this module nothing but a timer.
|
|
3449
|
+
*/
|
|
3450
|
+
function createLogChannelsProvider(logger, options = {}) {
|
|
3451
|
+
const registry = getLogChannelRegistry();
|
|
3452
|
+
const now = options.now ?? Date.now;
|
|
3453
|
+
const tickMs = options.tickMs ?? 5e3;
|
|
3454
|
+
const timer = setInterval(() => {
|
|
3455
|
+
const closed = registry.tick(now());
|
|
3456
|
+
for (const name of closed) logger.info("log channel window closed", {
|
|
3457
|
+
tags: { logChannel: name },
|
|
3458
|
+
meta: { channel: name }
|
|
3459
|
+
});
|
|
3460
|
+
}, tickMs);
|
|
3461
|
+
timer.unref?.();
|
|
3462
|
+
return {
|
|
3463
|
+
list: () => registry.list(),
|
|
3464
|
+
apply: (input) => {
|
|
3465
|
+
const unknown = registry.apply(input.windows, now());
|
|
3466
|
+
const armed = registry.armed();
|
|
3467
|
+
logger.info("log channels applied", { meta: {
|
|
3468
|
+
armed: armed.map((window) => window.channel),
|
|
3469
|
+
unknown,
|
|
3470
|
+
declared: registry.list().length
|
|
3471
|
+
} });
|
|
3472
|
+
return {
|
|
3473
|
+
armed: armed.length,
|
|
3474
|
+
unknown
|
|
3475
|
+
};
|
|
3476
|
+
},
|
|
3477
|
+
stop: () => {
|
|
3478
|
+
clearInterval(timer);
|
|
3479
|
+
}
|
|
3480
|
+
};
|
|
3481
|
+
}
|
|
3482
|
+
//#endregion
|
|
3483
|
+
//#region src/metrics/failure-counters.ts
|
|
3484
|
+
/**
|
|
3485
|
+
* `FailureCounters` — the per-camera counter every "how often does this camera
|
|
3486
|
+
* lose work, and why" question is answered from.
|
|
3487
|
+
*
|
|
3488
|
+
* ## Why a primitive and not four counters
|
|
3489
|
+
*
|
|
3490
|
+
* Four open failure modes were being triaged on 2026-08-28 and every one of
|
|
3491
|
+
* them was measured the same way: grep a log line, count it, and then guess at
|
|
3492
|
+
* the denominator. The guess is the defect. `enrichment crop native miss` read
|
|
3493
|
+
* as "35x worse than yesterday" and turned out to be **flat all day** the
|
|
3494
|
+
* moment it was divided by the successes on the same path — 0.25 misses per
|
|
3495
|
+
* landed capture, 0.08–0.33 across twelve hours, no trend. The count moved
|
|
3496
|
+
* because the traffic moved.
|
|
3497
|
+
*
|
|
3498
|
+
* So the unit here is not a counter. It is a **ratio with its denominator
|
|
3499
|
+
* attached**: {@link FailureCounterSample.attempts} is incremented on every
|
|
3500
|
+
* try, {@link FailureCounterSample.succeeded} on the ones that landed, and the
|
|
3501
|
+
* reasons partition the rest. A consumer can always divide; it can never
|
|
3502
|
+
* un-divide a bare count.
|
|
3503
|
+
*
|
|
3504
|
+
* ## Per camera, always
|
|
3505
|
+
*
|
|
3506
|
+
* The key is the numeric `deviceId` — the same value every log line in this
|
|
3507
|
+
* repo carries as `tags.deviceId`. There is no fleet-total mode and no
|
|
3508
|
+
* device-less bucket, because the question is always "why is 617 worse than
|
|
3509
|
+
* 615?" and a fleet total cannot answer it. A caller that cannot name the
|
|
3510
|
+
* camera must not note anything: an unnamed per-camera count is
|
|
3511
|
+
* indistinguishable from a shared one, which is how one camera's failures
|
|
3512
|
+
* quietly become everybody's.
|
|
3513
|
+
*
|
|
3514
|
+
* ## Cumulative, never drained
|
|
3515
|
+
*
|
|
3516
|
+
* A read NEVER resets anything. `load-contribution.cap.ts` already argued this
|
|
3517
|
+
* for CPU seconds and the argument carries over verbatim: *"a rate needs a
|
|
3518
|
+
* window, a window needs a sampler, and a new per-node sampler is the defect
|
|
3519
|
+
* half of `docs/architecture/load-ledger.md` documents. A counter can be
|
|
3520
|
+
* differenced by whoever already keeps a history; a rate cannot be
|
|
3521
|
+
* un-averaged."* A draining read has a second failure this surface cannot
|
|
3522
|
+
* afford — two consumers polling it would each destroy half of the other's
|
|
3523
|
+
* numbers, silently.
|
|
3524
|
+
*
|
|
3525
|
+
* {@link FailureCounterSample.sinceMs} is the incarnation marker: it is when
|
|
3526
|
+
* this counter started, and a consumer differencing two reads must drop the
|
|
3527
|
+
* interval when it changes, because the counter restarted from zero in a new
|
|
3528
|
+
* process.
|
|
3529
|
+
*
|
|
3530
|
+
* ## Bounded, and the bound is the point
|
|
3531
|
+
*
|
|
3532
|
+
* This lives in the memory of a process that is already the subject of an RSS
|
|
3533
|
+
* budget, so both dimensions are capped: {@link MAX_KEYS} counters and
|
|
3534
|
+
* {@link MAX_REASONS_PER_KEY} distinct reasons within one. Past the reason cap
|
|
3535
|
+
* the counts are folded into {@link OVERFLOW_REASON} rather than dropped —
|
|
3536
|
+
* losing them would make `attempts - succeeded` stop equalling the reason
|
|
3537
|
+
* total, and the ratio the whole surface exists to publish would quietly stop
|
|
3538
|
+
* adding up. Past the key cap a new key is refused and
|
|
3539
|
+
* {@link FailureCounters.keysRefused} says so, so the omission is visible
|
|
3540
|
+
* instead of silent.
|
|
3541
|
+
*
|
|
3542
|
+
* ## No timers, no IO, no logging
|
|
3543
|
+
*
|
|
3544
|
+
* Pure. It is read on whatever beat the caller already has. A telemetry
|
|
3545
|
+
* primitive that schedules its own work is a second sampler, and this repo has
|
|
3546
|
+
* paid for one of those already (`docs/architecture/load-ledger.md`).
|
|
3547
|
+
*/
|
|
3548
|
+
/** Distinct reason strings kept per counter before folding. */
|
|
3549
|
+
var MAX_REASONS_PER_KEY = 16;
|
|
3550
|
+
/**
|
|
3551
|
+
* Distinct (device, family, variant) counters one instance will hold.
|
|
3552
|
+
*
|
|
3553
|
+
* A large fleet x the handful of families any single addon reports, with
|
|
3554
|
+
* slack. At ~200 B per counter this is a ~100 KB ceiling on a process that
|
|
3555
|
+
* already declares an RSS budget in the gigabytes.
|
|
3556
|
+
*/
|
|
3557
|
+
var MAX_KEYS = 1024;
|
|
3558
|
+
/**
|
|
3559
|
+
* Where reasons past {@link MAX_REASONS_PER_KEY} go.
|
|
3560
|
+
*
|
|
3561
|
+
* They are FOLDED, never dropped: `attempts - succeeded` must always equal the
|
|
3562
|
+
* sum of the reason counts, or the ratio stops adding up.
|
|
3563
|
+
*/
|
|
3564
|
+
var OVERFLOW_REASON = "other";
|
|
3565
|
+
/** `deviceId` + `family` + optional `variant`, flattened into the map key. */
|
|
3566
|
+
function counterKey(deviceId, family, variant) {
|
|
3567
|
+
return variant === void 0 ? `${deviceId}${family}` : `${deviceId}${family}${variant}`;
|
|
3568
|
+
}
|
|
3569
|
+
/**
|
|
3570
|
+
* A bounded set of per-camera, cumulative failure counters.
|
|
3571
|
+
*
|
|
3572
|
+
* One instance per contributing subsystem. `note` is O(1) and allocation-free
|
|
3573
|
+
* on the steady path; `snapshot` reads without mutating anything.
|
|
3574
|
+
*/
|
|
3575
|
+
var FailureCounters = class {
|
|
3576
|
+
maxKeys;
|
|
3577
|
+
maxReasons;
|
|
3578
|
+
counters = /* @__PURE__ */ new Map();
|
|
3579
|
+
refused = 0;
|
|
3580
|
+
constructor(maxKeys = MAX_KEYS, maxReasons = 16) {
|
|
3581
|
+
this.maxKeys = maxKeys;
|
|
3582
|
+
this.maxReasons = maxReasons;
|
|
3583
|
+
}
|
|
3584
|
+
/**
|
|
3585
|
+
* Counters refused because {@link MAX_KEYS} was already held.
|
|
3586
|
+
*
|
|
3587
|
+
* Cumulative for the life of the instance: a bound that bit is a fact about
|
|
3588
|
+
* the deployment, and a surface that hid it would under-report a fleet
|
|
3589
|
+
* precisely when the fleet got large enough to matter.
|
|
3590
|
+
*/
|
|
3591
|
+
get keysRefused() {
|
|
3592
|
+
return this.refused;
|
|
3593
|
+
}
|
|
3594
|
+
/** Counters currently held. */
|
|
3595
|
+
get size() {
|
|
3596
|
+
return this.counters.size;
|
|
3597
|
+
}
|
|
3598
|
+
/**
|
|
3599
|
+
* Fold one observation in.
|
|
3600
|
+
*
|
|
3601
|
+
* A non-positive or non-integer `deviceId` is REFUSED rather than bucketed:
|
|
3602
|
+
* see the module docblock — an entry that cannot name its camera is worse
|
|
3603
|
+
* than no entry.
|
|
3604
|
+
*/
|
|
3605
|
+
note(observation, nowMs) {
|
|
3606
|
+
if (!Number.isInteger(observation.deviceId) || observation.deviceId <= 0) return;
|
|
3607
|
+
const key = counterKey(observation.deviceId, observation.family, observation.variant);
|
|
3608
|
+
let counter = this.counters.get(key);
|
|
3609
|
+
if (counter === void 0) {
|
|
3610
|
+
if (this.counters.size >= this.maxKeys) {
|
|
3611
|
+
this.refused += 1;
|
|
3612
|
+
return;
|
|
3613
|
+
}
|
|
3614
|
+
counter = {
|
|
3615
|
+
deviceId: observation.deviceId,
|
|
3616
|
+
family: observation.family,
|
|
3617
|
+
variant: observation.variant,
|
|
3618
|
+
sinceMs: nowMs,
|
|
3619
|
+
attempts: 0,
|
|
3620
|
+
succeeded: 0,
|
|
3621
|
+
reasons: /* @__PURE__ */ new Map()
|
|
3622
|
+
};
|
|
3623
|
+
this.counters.set(key, counter);
|
|
3624
|
+
}
|
|
3625
|
+
counter.attempts += 1;
|
|
3626
|
+
if (observation.reason === void 0) {
|
|
3627
|
+
counter.succeeded += 1;
|
|
3628
|
+
return;
|
|
3629
|
+
}
|
|
3630
|
+
const reason = counter.reasons.has(observation.reason) || counter.reasons.size < this.maxReasons ? observation.reason : OVERFLOW_REASON;
|
|
3631
|
+
counter.reasons.set(reason, (counter.reasons.get(reason) ?? 0) + 1);
|
|
3632
|
+
}
|
|
3633
|
+
/** Read every counter. Never mutates — see the module docblock. */
|
|
3634
|
+
snapshot(nowMs) {
|
|
3635
|
+
const out = [];
|
|
3636
|
+
for (const counter of this.counters.values()) out.push({
|
|
3637
|
+
deviceId: counter.deviceId,
|
|
3638
|
+
family: counter.family,
|
|
3639
|
+
...counter.variant !== void 0 ? { variant: counter.variant } : {},
|
|
3640
|
+
sinceMs: counter.sinceMs,
|
|
3641
|
+
atMs: nowMs,
|
|
3642
|
+
attempts: counter.attempts,
|
|
3643
|
+
succeeded: counter.succeeded,
|
|
3644
|
+
reasons: [...counter.reasons.entries()].map(([reason, count]) => ({
|
|
3645
|
+
reason,
|
|
3646
|
+
count
|
|
3647
|
+
})).toSorted((a, b) => b.count - a.count)
|
|
3648
|
+
});
|
|
3649
|
+
return out;
|
|
3650
|
+
}
|
|
3651
|
+
/** Drop everything (host disposal). */
|
|
3652
|
+
clear() {
|
|
3653
|
+
this.counters.clear();
|
|
3654
|
+
}
|
|
3655
|
+
};
|
|
3656
|
+
/**
|
|
3657
|
+
* Losses per attempt, as a ratio — the number the operator actually reads.
|
|
3658
|
+
*
|
|
3659
|
+
* `null` when there were no attempts: a camera nobody asked anything of has no
|
|
3660
|
+
* failure rate, and reporting 0 would say it was perfect.
|
|
3661
|
+
*/
|
|
3662
|
+
function failureRate(sample) {
|
|
3663
|
+
if (sample.attempts <= 0) return null;
|
|
3664
|
+
return (sample.attempts - sample.succeeded) / sample.attempts;
|
|
3665
|
+
}
|
|
3666
|
+
//#endregion
|
|
3667
|
+
//#region src/metrics/load-series-fold.ts
|
|
3668
|
+
/** Bucket key for rows no addon owns. Stable, so its series is continuous. */
|
|
3669
|
+
var UNATTRIBUTED_BUCKET_KEY = "__unattributed__";
|
|
3670
|
+
var ROOT_BUCKET_KEY = "__root__";
|
|
3671
|
+
function bucketFor(row) {
|
|
3672
|
+
if (row.addonId !== null) return {
|
|
3673
|
+
key: row.addonId,
|
|
3674
|
+
kind: "addon"
|
|
3675
|
+
};
|
|
3676
|
+
if (row.classification === "root") return {
|
|
3677
|
+
key: ROOT_BUCKET_KEY,
|
|
3678
|
+
kind: "root"
|
|
3679
|
+
};
|
|
3680
|
+
return {
|
|
3681
|
+
key: UNATTRIBUTED_BUCKET_KEY,
|
|
3682
|
+
kind: "unattributed"
|
|
3683
|
+
};
|
|
3684
|
+
}
|
|
3685
|
+
/** Round to one decimal — the precision both producers already emit at. */
|
|
3686
|
+
function deci(value) {
|
|
3687
|
+
return Math.round(value * 10) / 10;
|
|
3688
|
+
}
|
|
3689
|
+
/**
|
|
3690
|
+
* Fold one snapshot into one point per function.
|
|
3691
|
+
*
|
|
3692
|
+
* Produces a ONE-SAMPLE point: `min === max` on every field, `samples === 1`.
|
|
3693
|
+
* That is what lets a live event and a reduced server bucket sit in the same
|
|
3694
|
+
* series without the consumer knowing which is which.
|
|
3695
|
+
*/
|
|
3696
|
+
function foldSnapshotByFunction(rows, atMs) {
|
|
3697
|
+
const acc = /* @__PURE__ */ new Map();
|
|
3698
|
+
for (const row of rows) {
|
|
3699
|
+
const { key, kind } = bucketFor(row);
|
|
3700
|
+
const cur = acc.get(key) ?? {
|
|
3701
|
+
kind,
|
|
3702
|
+
main: 0,
|
|
3703
|
+
gc: 0,
|
|
3704
|
+
lifetime: 0,
|
|
3705
|
+
memory: 0,
|
|
3706
|
+
count: 0,
|
|
3707
|
+
splitKnown: true
|
|
3708
|
+
};
|
|
3709
|
+
const known = row.cpuMainPercent !== null && row.cpuGcPercent !== null;
|
|
3710
|
+
acc.set(key, {
|
|
3711
|
+
kind: cur.kind,
|
|
3712
|
+
main: cur.main + (row.cpuMainPercent ?? 0),
|
|
3713
|
+
gc: cur.gc + (row.cpuGcPercent ?? 0),
|
|
3714
|
+
lifetime: cur.lifetime + row.cpuPercent,
|
|
3715
|
+
memory: cur.memory + row.memoryRssBytes,
|
|
3716
|
+
count: cur.count + 1,
|
|
3717
|
+
splitKnown: cur.splitKnown && known
|
|
3718
|
+
});
|
|
3719
|
+
}
|
|
3720
|
+
return [...acc.entries()].map(([key, a]) => {
|
|
3721
|
+
const main = a.splitKnown ? deci(a.main) : null;
|
|
3722
|
+
const gc = a.splitKnown ? deci(a.gc) : null;
|
|
3723
|
+
const lifetime = deci(a.lifetime);
|
|
3724
|
+
return {
|
|
3725
|
+
key,
|
|
3726
|
+
kind: a.kind,
|
|
3727
|
+
point: {
|
|
3728
|
+
atMs,
|
|
3729
|
+
samples: 1,
|
|
3730
|
+
cpuMainPercent: main,
|
|
3731
|
+
cpuMainPercentMin: main,
|
|
3732
|
+
cpuGcPercent: gc,
|
|
3733
|
+
cpuGcPercentMin: gc,
|
|
3734
|
+
cpuLifetimePercent: lifetime,
|
|
3735
|
+
cpuLifetimePercentMin: lifetime,
|
|
3736
|
+
memoryRssBytes: a.memory,
|
|
3737
|
+
memoryRssBytesMin: a.memory,
|
|
3738
|
+
processCount: a.count,
|
|
3739
|
+
processCountMin: a.count
|
|
3740
|
+
}
|
|
3741
|
+
};
|
|
3742
|
+
});
|
|
3743
|
+
}
|
|
3744
|
+
/** The narrower of two bounds, treating `null` (UNKNOWN) as absorbing. */
|
|
3745
|
+
function minNullable(a, b) {
|
|
3746
|
+
if (a === null || b === null) return null;
|
|
3747
|
+
return a < b ? a : b;
|
|
3748
|
+
}
|
|
3749
|
+
function maxNullable(a, b) {
|
|
3750
|
+
if (a === null || b === null) return null;
|
|
3751
|
+
return a > b ? a : b;
|
|
3752
|
+
}
|
|
3753
|
+
/** Merge `next` into `held`, keeping the widest [min, max] of each field. */
|
|
3754
|
+
function mergePoints(held, next, atMs) {
|
|
3755
|
+
return {
|
|
3756
|
+
atMs,
|
|
3757
|
+
samples: held.samples + next.samples,
|
|
3758
|
+
cpuMainPercent: maxNullable(held.cpuMainPercent, next.cpuMainPercent),
|
|
3759
|
+
cpuMainPercentMin: minNullable(held.cpuMainPercentMin, next.cpuMainPercentMin),
|
|
3760
|
+
cpuGcPercent: maxNullable(held.cpuGcPercent, next.cpuGcPercent),
|
|
3761
|
+
cpuGcPercentMin: minNullable(held.cpuGcPercentMin, next.cpuGcPercentMin),
|
|
3762
|
+
cpuLifetimePercent: Math.max(held.cpuLifetimePercent, next.cpuLifetimePercent),
|
|
3763
|
+
cpuLifetimePercentMin: Math.min(held.cpuLifetimePercentMin, next.cpuLifetimePercentMin),
|
|
3764
|
+
memoryRssBytes: Math.max(held.memoryRssBytes, next.memoryRssBytes),
|
|
3765
|
+
memoryRssBytesMin: Math.min(held.memoryRssBytesMin, next.memoryRssBytesMin),
|
|
3766
|
+
processCount: Math.max(held.processCount, next.processCount),
|
|
3767
|
+
processCountMin: Math.min(held.processCountMin, next.processCountMin)
|
|
3768
|
+
};
|
|
3769
|
+
}
|
|
3770
|
+
/**
|
|
3771
|
+
* The bucket width that brings `spanMs` down to at most `maxPoints` points,
|
|
3772
|
+
* snapped up to a whole multiple of the sampling cadence.
|
|
3773
|
+
*
|
|
3774
|
+
* Returns `cadenceMs` (no reduction) when the span already fits. A caller that
|
|
3775
|
+
* asks for a `maxPoints` of 0 or less gets no reduction rather than an
|
|
3776
|
+
* infinite bucket — a nonsensical request must not produce a plausible chart.
|
|
3777
|
+
*/
|
|
3778
|
+
function resolveBucketMs(spanMs, cadenceMs, maxPoints) {
|
|
3779
|
+
if (maxPoints <= 0 || cadenceMs <= 0 || spanMs <= 0) return Math.max(cadenceMs, 1);
|
|
3780
|
+
const wanted = spanMs / maxPoints;
|
|
3781
|
+
if (wanted <= cadenceMs) return cadenceMs;
|
|
3782
|
+
return Math.ceil(wanted / cadenceMs) * cadenceMs;
|
|
3783
|
+
}
|
|
3784
|
+
/**
|
|
3785
|
+
* Reduce one function's points into buckets of `bucketMs`, preserving the
|
|
3786
|
+
* extremes.
|
|
3787
|
+
*
|
|
3788
|
+
* Points are expected oldest-first and are returned oldest-first. A bucket
|
|
3789
|
+
* with no samples is ABSENT — not zero, not interpolated, not the previous
|
|
3790
|
+
* value held over.
|
|
3791
|
+
*/
|
|
3792
|
+
function reducePoints(points, bucketMs, origin) {
|
|
3793
|
+
if (bucketMs <= 0 || points.length === 0) return points;
|
|
3794
|
+
const buckets = /* @__PURE__ */ new Map();
|
|
3795
|
+
for (const point of points) {
|
|
3796
|
+
const start = origin + Math.floor((point.atMs - origin) / bucketMs) * bucketMs;
|
|
3797
|
+
const held = buckets.get(start);
|
|
3798
|
+
buckets.set(start, held === void 0 ? {
|
|
3799
|
+
...point,
|
|
3800
|
+
atMs: start
|
|
3801
|
+
} : mergePoints(held, point, start));
|
|
3802
|
+
}
|
|
3803
|
+
return [...buckets.values()].toSorted((a, b) => a.atMs - b.atMs);
|
|
3804
|
+
}
|
|
3805
|
+
//#endregion
|
|
3459
3806
|
//#region src/stream-selection.ts
|
|
3460
3807
|
function pickPreferredRtspEntry(entries, pref, deviceId, options = {}) {
|
|
3461
3808
|
if (entries.length === 0) return null;
|
|
@@ -3512,329 +3859,6 @@ function pickClosestResolution(entries, target) {
|
|
|
3512
3859
|
return bestAbove?.entry ?? bestBelow?.entry;
|
|
3513
3860
|
}
|
|
3514
3861
|
//#endregion
|
|
3515
|
-
//#region src/metrics/load-series-fold.ts
|
|
3516
|
-
/** Bucket key for rows no addon owns. Stable, so its series is continuous. */
|
|
3517
|
-
var UNATTRIBUTED_BUCKET_KEY = "__unattributed__";
|
|
3518
|
-
var ROOT_BUCKET_KEY = "__root__";
|
|
3519
|
-
function bucketFor(row) {
|
|
3520
|
-
if (row.addonId !== null) return {
|
|
3521
|
-
key: row.addonId,
|
|
3522
|
-
kind: "addon"
|
|
3523
|
-
};
|
|
3524
|
-
if (row.classification === "root") return {
|
|
3525
|
-
key: ROOT_BUCKET_KEY,
|
|
3526
|
-
kind: "root"
|
|
3527
|
-
};
|
|
3528
|
-
return {
|
|
3529
|
-
key: UNATTRIBUTED_BUCKET_KEY,
|
|
3530
|
-
kind: "unattributed"
|
|
3531
|
-
};
|
|
3532
|
-
}
|
|
3533
|
-
/** Round to one decimal — the precision both producers already emit at. */
|
|
3534
|
-
function deci(value) {
|
|
3535
|
-
return Math.round(value * 10) / 10;
|
|
3536
|
-
}
|
|
3537
|
-
/**
|
|
3538
|
-
* Fold one snapshot into one point per function.
|
|
3539
|
-
*
|
|
3540
|
-
* Produces a ONE-SAMPLE point: `min === max` on every field, `samples === 1`.
|
|
3541
|
-
* That is what lets a live event and a reduced server bucket sit in the same
|
|
3542
|
-
* series without the consumer knowing which is which.
|
|
3543
|
-
*/
|
|
3544
|
-
function foldSnapshotByFunction(rows, atMs) {
|
|
3545
|
-
const acc = /* @__PURE__ */ new Map();
|
|
3546
|
-
for (const row of rows) {
|
|
3547
|
-
const { key, kind } = bucketFor(row);
|
|
3548
|
-
const cur = acc.get(key) ?? {
|
|
3549
|
-
kind,
|
|
3550
|
-
main: 0,
|
|
3551
|
-
gc: 0,
|
|
3552
|
-
lifetime: 0,
|
|
3553
|
-
memory: 0,
|
|
3554
|
-
count: 0,
|
|
3555
|
-
splitKnown: true
|
|
3556
|
-
};
|
|
3557
|
-
const known = row.cpuMainPercent !== null && row.cpuGcPercent !== null;
|
|
3558
|
-
acc.set(key, {
|
|
3559
|
-
kind: cur.kind,
|
|
3560
|
-
main: cur.main + (row.cpuMainPercent ?? 0),
|
|
3561
|
-
gc: cur.gc + (row.cpuGcPercent ?? 0),
|
|
3562
|
-
lifetime: cur.lifetime + row.cpuPercent,
|
|
3563
|
-
memory: cur.memory + row.memoryRssBytes,
|
|
3564
|
-
count: cur.count + 1,
|
|
3565
|
-
splitKnown: cur.splitKnown && known
|
|
3566
|
-
});
|
|
3567
|
-
}
|
|
3568
|
-
return [...acc.entries()].map(([key, a]) => {
|
|
3569
|
-
const main = a.splitKnown ? deci(a.main) : null;
|
|
3570
|
-
const gc = a.splitKnown ? deci(a.gc) : null;
|
|
3571
|
-
const lifetime = deci(a.lifetime);
|
|
3572
|
-
return {
|
|
3573
|
-
key,
|
|
3574
|
-
kind: a.kind,
|
|
3575
|
-
point: {
|
|
3576
|
-
atMs,
|
|
3577
|
-
samples: 1,
|
|
3578
|
-
cpuMainPercent: main,
|
|
3579
|
-
cpuMainPercentMin: main,
|
|
3580
|
-
cpuGcPercent: gc,
|
|
3581
|
-
cpuGcPercentMin: gc,
|
|
3582
|
-
cpuLifetimePercent: lifetime,
|
|
3583
|
-
cpuLifetimePercentMin: lifetime,
|
|
3584
|
-
memoryRssBytes: a.memory,
|
|
3585
|
-
memoryRssBytesMin: a.memory,
|
|
3586
|
-
processCount: a.count,
|
|
3587
|
-
processCountMin: a.count
|
|
3588
|
-
}
|
|
3589
|
-
};
|
|
3590
|
-
});
|
|
3591
|
-
}
|
|
3592
|
-
/** The narrower of two bounds, treating `null` (UNKNOWN) as absorbing. */
|
|
3593
|
-
function minNullable(a, b) {
|
|
3594
|
-
if (a === null || b === null) return null;
|
|
3595
|
-
return a < b ? a : b;
|
|
3596
|
-
}
|
|
3597
|
-
function maxNullable(a, b) {
|
|
3598
|
-
if (a === null || b === null) return null;
|
|
3599
|
-
return a > b ? a : b;
|
|
3600
|
-
}
|
|
3601
|
-
/** Merge `next` into `held`, keeping the widest [min, max] of each field. */
|
|
3602
|
-
function mergePoints(held, next, atMs) {
|
|
3603
|
-
return {
|
|
3604
|
-
atMs,
|
|
3605
|
-
samples: held.samples + next.samples,
|
|
3606
|
-
cpuMainPercent: maxNullable(held.cpuMainPercent, next.cpuMainPercent),
|
|
3607
|
-
cpuMainPercentMin: minNullable(held.cpuMainPercentMin, next.cpuMainPercentMin),
|
|
3608
|
-
cpuGcPercent: maxNullable(held.cpuGcPercent, next.cpuGcPercent),
|
|
3609
|
-
cpuGcPercentMin: minNullable(held.cpuGcPercentMin, next.cpuGcPercentMin),
|
|
3610
|
-
cpuLifetimePercent: Math.max(held.cpuLifetimePercent, next.cpuLifetimePercent),
|
|
3611
|
-
cpuLifetimePercentMin: Math.min(held.cpuLifetimePercentMin, next.cpuLifetimePercentMin),
|
|
3612
|
-
memoryRssBytes: Math.max(held.memoryRssBytes, next.memoryRssBytes),
|
|
3613
|
-
memoryRssBytesMin: Math.min(held.memoryRssBytesMin, next.memoryRssBytesMin),
|
|
3614
|
-
processCount: Math.max(held.processCount, next.processCount),
|
|
3615
|
-
processCountMin: Math.min(held.processCountMin, next.processCountMin)
|
|
3616
|
-
};
|
|
3617
|
-
}
|
|
3618
|
-
/**
|
|
3619
|
-
* The bucket width that brings `spanMs` down to at most `maxPoints` points,
|
|
3620
|
-
* snapped up to a whole multiple of the sampling cadence.
|
|
3621
|
-
*
|
|
3622
|
-
* Returns `cadenceMs` (no reduction) when the span already fits. A caller that
|
|
3623
|
-
* asks for a `maxPoints` of 0 or less gets no reduction rather than an
|
|
3624
|
-
* infinite bucket — a nonsensical request must not produce a plausible chart.
|
|
3625
|
-
*/
|
|
3626
|
-
function resolveBucketMs(spanMs, cadenceMs, maxPoints) {
|
|
3627
|
-
if (maxPoints <= 0 || cadenceMs <= 0 || spanMs <= 0) return Math.max(cadenceMs, 1);
|
|
3628
|
-
const wanted = spanMs / maxPoints;
|
|
3629
|
-
if (wanted <= cadenceMs) return cadenceMs;
|
|
3630
|
-
return Math.ceil(wanted / cadenceMs) * cadenceMs;
|
|
3631
|
-
}
|
|
3632
|
-
/**
|
|
3633
|
-
* Reduce one function's points into buckets of `bucketMs`, preserving the
|
|
3634
|
-
* extremes.
|
|
3635
|
-
*
|
|
3636
|
-
* Points are expected oldest-first and are returned oldest-first. A bucket
|
|
3637
|
-
* with no samples is ABSENT — not zero, not interpolated, not the previous
|
|
3638
|
-
* value held over.
|
|
3639
|
-
*/
|
|
3640
|
-
function reducePoints(points, bucketMs, origin) {
|
|
3641
|
-
if (bucketMs <= 0 || points.length === 0) return points;
|
|
3642
|
-
const buckets = /* @__PURE__ */ new Map();
|
|
3643
|
-
for (const point of points) {
|
|
3644
|
-
const start = origin + Math.floor((point.atMs - origin) / bucketMs) * bucketMs;
|
|
3645
|
-
const held = buckets.get(start);
|
|
3646
|
-
buckets.set(start, held === void 0 ? {
|
|
3647
|
-
...point,
|
|
3648
|
-
atMs: start
|
|
3649
|
-
} : mergePoints(held, point, start));
|
|
3650
|
-
}
|
|
3651
|
-
return [...buckets.values()].toSorted((a, b) => a.atMs - b.atMs);
|
|
3652
|
-
}
|
|
3653
|
-
//#endregion
|
|
3654
|
-
//#region src/metrics/failure-counters.ts
|
|
3655
|
-
/**
|
|
3656
|
-
* `FailureCounters` — the per-camera counter every "how often does this camera
|
|
3657
|
-
* lose work, and why" question is answered from.
|
|
3658
|
-
*
|
|
3659
|
-
* ## Why a primitive and not four counters
|
|
3660
|
-
*
|
|
3661
|
-
* Four open failure modes were being triaged on 2026-08-28 and every one of
|
|
3662
|
-
* them was measured the same way: grep a log line, count it, and then guess at
|
|
3663
|
-
* the denominator. The guess is the defect. `enrichment crop native miss` read
|
|
3664
|
-
* as "35x worse than yesterday" and turned out to be **flat all day** the
|
|
3665
|
-
* moment it was divided by the successes on the same path — 0.25 misses per
|
|
3666
|
-
* landed capture, 0.08–0.33 across twelve hours, no trend. The count moved
|
|
3667
|
-
* because the traffic moved.
|
|
3668
|
-
*
|
|
3669
|
-
* So the unit here is not a counter. It is a **ratio with its denominator
|
|
3670
|
-
* attached**: {@link FailureCounterSample.attempts} is incremented on every
|
|
3671
|
-
* try, {@link FailureCounterSample.succeeded} on the ones that landed, and the
|
|
3672
|
-
* reasons partition the rest. A consumer can always divide; it can never
|
|
3673
|
-
* un-divide a bare count.
|
|
3674
|
-
*
|
|
3675
|
-
* ## Per camera, always
|
|
3676
|
-
*
|
|
3677
|
-
* The key is the numeric `deviceId` — the same value every log line in this
|
|
3678
|
-
* repo carries as `tags.deviceId`. There is no fleet-total mode and no
|
|
3679
|
-
* device-less bucket, because the question is always "why is 617 worse than
|
|
3680
|
-
* 615?" and a fleet total cannot answer it. A caller that cannot name the
|
|
3681
|
-
* camera must not note anything: an unnamed per-camera count is
|
|
3682
|
-
* indistinguishable from a shared one, which is how one camera's failures
|
|
3683
|
-
* quietly become everybody's.
|
|
3684
|
-
*
|
|
3685
|
-
* ## Cumulative, never drained
|
|
3686
|
-
*
|
|
3687
|
-
* A read NEVER resets anything. `load-contribution.cap.ts` already argued this
|
|
3688
|
-
* for CPU seconds and the argument carries over verbatim: *"a rate needs a
|
|
3689
|
-
* window, a window needs a sampler, and a new per-node sampler is the defect
|
|
3690
|
-
* half of `docs/architecture/load-ledger.md` documents. A counter can be
|
|
3691
|
-
* differenced by whoever already keeps a history; a rate cannot be
|
|
3692
|
-
* un-averaged."* A draining read has a second failure this surface cannot
|
|
3693
|
-
* afford — two consumers polling it would each destroy half of the other's
|
|
3694
|
-
* numbers, silently.
|
|
3695
|
-
*
|
|
3696
|
-
* {@link FailureCounterSample.sinceMs} is the incarnation marker: it is when
|
|
3697
|
-
* this counter started, and a consumer differencing two reads must drop the
|
|
3698
|
-
* interval when it changes, because the counter restarted from zero in a new
|
|
3699
|
-
* process.
|
|
3700
|
-
*
|
|
3701
|
-
* ## Bounded, and the bound is the point
|
|
3702
|
-
*
|
|
3703
|
-
* This lives in the memory of a process that is already the subject of an RSS
|
|
3704
|
-
* budget, so both dimensions are capped: {@link MAX_KEYS} counters and
|
|
3705
|
-
* {@link MAX_REASONS_PER_KEY} distinct reasons within one. Past the reason cap
|
|
3706
|
-
* the counts are folded into {@link OVERFLOW_REASON} rather than dropped —
|
|
3707
|
-
* losing them would make `attempts - succeeded` stop equalling the reason
|
|
3708
|
-
* total, and the ratio the whole surface exists to publish would quietly stop
|
|
3709
|
-
* adding up. Past the key cap a new key is refused and
|
|
3710
|
-
* {@link FailureCounters.keysRefused} says so, so the omission is visible
|
|
3711
|
-
* instead of silent.
|
|
3712
|
-
*
|
|
3713
|
-
* ## No timers, no IO, no logging
|
|
3714
|
-
*
|
|
3715
|
-
* Pure. It is read on whatever beat the caller already has. A telemetry
|
|
3716
|
-
* primitive that schedules its own work is a second sampler, and this repo has
|
|
3717
|
-
* paid for one of those already (`docs/architecture/load-ledger.md`).
|
|
3718
|
-
*/
|
|
3719
|
-
/** Distinct reason strings kept per counter before folding. */
|
|
3720
|
-
var MAX_REASONS_PER_KEY = 16;
|
|
3721
|
-
/**
|
|
3722
|
-
* Distinct (device, family, variant) counters one instance will hold.
|
|
3723
|
-
*
|
|
3724
|
-
* A large fleet x the handful of families any single addon reports, with
|
|
3725
|
-
* slack. At ~200 B per counter this is a ~100 KB ceiling on a process that
|
|
3726
|
-
* already declares an RSS budget in the gigabytes.
|
|
3727
|
-
*/
|
|
3728
|
-
var MAX_KEYS = 1024;
|
|
3729
|
-
/**
|
|
3730
|
-
* Where reasons past {@link MAX_REASONS_PER_KEY} go.
|
|
3731
|
-
*
|
|
3732
|
-
* They are FOLDED, never dropped: `attempts - succeeded` must always equal the
|
|
3733
|
-
* sum of the reason counts, or the ratio stops adding up.
|
|
3734
|
-
*/
|
|
3735
|
-
var OVERFLOW_REASON = "other";
|
|
3736
|
-
/** `deviceId` + `family` + optional `variant`, flattened into the map key. */
|
|
3737
|
-
function counterKey(deviceId, family, variant) {
|
|
3738
|
-
return variant === void 0 ? `${deviceId}${family}` : `${deviceId}${family}${variant}`;
|
|
3739
|
-
}
|
|
3740
|
-
/**
|
|
3741
|
-
* A bounded set of per-camera, cumulative failure counters.
|
|
3742
|
-
*
|
|
3743
|
-
* One instance per contributing subsystem. `note` is O(1) and allocation-free
|
|
3744
|
-
* on the steady path; `snapshot` reads without mutating anything.
|
|
3745
|
-
*/
|
|
3746
|
-
var FailureCounters = class {
|
|
3747
|
-
maxKeys;
|
|
3748
|
-
maxReasons;
|
|
3749
|
-
counters = /* @__PURE__ */ new Map();
|
|
3750
|
-
refused = 0;
|
|
3751
|
-
constructor(maxKeys = MAX_KEYS, maxReasons = 16) {
|
|
3752
|
-
this.maxKeys = maxKeys;
|
|
3753
|
-
this.maxReasons = maxReasons;
|
|
3754
|
-
}
|
|
3755
|
-
/**
|
|
3756
|
-
* Counters refused because {@link MAX_KEYS} was already held.
|
|
3757
|
-
*
|
|
3758
|
-
* Cumulative for the life of the instance: a bound that bit is a fact about
|
|
3759
|
-
* the deployment, and a surface that hid it would under-report a fleet
|
|
3760
|
-
* precisely when the fleet got large enough to matter.
|
|
3761
|
-
*/
|
|
3762
|
-
get keysRefused() {
|
|
3763
|
-
return this.refused;
|
|
3764
|
-
}
|
|
3765
|
-
/** Counters currently held. */
|
|
3766
|
-
get size() {
|
|
3767
|
-
return this.counters.size;
|
|
3768
|
-
}
|
|
3769
|
-
/**
|
|
3770
|
-
* Fold one observation in.
|
|
3771
|
-
*
|
|
3772
|
-
* A non-positive or non-integer `deviceId` is REFUSED rather than bucketed:
|
|
3773
|
-
* see the module docblock — an entry that cannot name its camera is worse
|
|
3774
|
-
* than no entry.
|
|
3775
|
-
*/
|
|
3776
|
-
note(observation, nowMs) {
|
|
3777
|
-
if (!Number.isInteger(observation.deviceId) || observation.deviceId <= 0) return;
|
|
3778
|
-
const key = counterKey(observation.deviceId, observation.family, observation.variant);
|
|
3779
|
-
let counter = this.counters.get(key);
|
|
3780
|
-
if (counter === void 0) {
|
|
3781
|
-
if (this.counters.size >= this.maxKeys) {
|
|
3782
|
-
this.refused += 1;
|
|
3783
|
-
return;
|
|
3784
|
-
}
|
|
3785
|
-
counter = {
|
|
3786
|
-
deviceId: observation.deviceId,
|
|
3787
|
-
family: observation.family,
|
|
3788
|
-
variant: observation.variant,
|
|
3789
|
-
sinceMs: nowMs,
|
|
3790
|
-
attempts: 0,
|
|
3791
|
-
succeeded: 0,
|
|
3792
|
-
reasons: /* @__PURE__ */ new Map()
|
|
3793
|
-
};
|
|
3794
|
-
this.counters.set(key, counter);
|
|
3795
|
-
}
|
|
3796
|
-
counter.attempts += 1;
|
|
3797
|
-
if (observation.reason === void 0) {
|
|
3798
|
-
counter.succeeded += 1;
|
|
3799
|
-
return;
|
|
3800
|
-
}
|
|
3801
|
-
const reason = counter.reasons.has(observation.reason) || counter.reasons.size < this.maxReasons ? observation.reason : OVERFLOW_REASON;
|
|
3802
|
-
counter.reasons.set(reason, (counter.reasons.get(reason) ?? 0) + 1);
|
|
3803
|
-
}
|
|
3804
|
-
/** Read every counter. Never mutates — see the module docblock. */
|
|
3805
|
-
snapshot(nowMs) {
|
|
3806
|
-
const out = [];
|
|
3807
|
-
for (const counter of this.counters.values()) out.push({
|
|
3808
|
-
deviceId: counter.deviceId,
|
|
3809
|
-
family: counter.family,
|
|
3810
|
-
...counter.variant !== void 0 ? { variant: counter.variant } : {},
|
|
3811
|
-
sinceMs: counter.sinceMs,
|
|
3812
|
-
atMs: nowMs,
|
|
3813
|
-
attempts: counter.attempts,
|
|
3814
|
-
succeeded: counter.succeeded,
|
|
3815
|
-
reasons: [...counter.reasons.entries()].map(([reason, count]) => ({
|
|
3816
|
-
reason,
|
|
3817
|
-
count
|
|
3818
|
-
})).toSorted((a, b) => b.count - a.count)
|
|
3819
|
-
});
|
|
3820
|
-
return out;
|
|
3821
|
-
}
|
|
3822
|
-
/** Drop everything (host disposal). */
|
|
3823
|
-
clear() {
|
|
3824
|
-
this.counters.clear();
|
|
3825
|
-
}
|
|
3826
|
-
};
|
|
3827
|
-
/**
|
|
3828
|
-
* Losses per attempt, as a ratio — the number the operator actually reads.
|
|
3829
|
-
*
|
|
3830
|
-
* `null` when there were no attempts: a camera nobody asked anything of has no
|
|
3831
|
-
* failure rate, and reporting 0 would say it was perfect.
|
|
3832
|
-
*/
|
|
3833
|
-
function failureRate(sample) {
|
|
3834
|
-
if (sample.attempts <= 0) return null;
|
|
3835
|
-
return (sample.attempts - sample.succeeded) / sample.attempts;
|
|
3836
|
-
}
|
|
3837
|
-
//#endregion
|
|
3838
3862
|
//#region src/types/model-variant-groups.ts
|
|
3839
3863
|
var FORMAT_KEYS = [
|
|
3840
3864
|
"onnx",
|
|
@@ -6720,12 +6744,30 @@ var BackupDestinationInfoSchema = z.object({
|
|
|
6720
6744
|
lastSuccessAt: z.number().optional(),
|
|
6721
6745
|
/** Newest-archive size from `manifests.json`, or undefined. */
|
|
6722
6746
|
lastSuccessSizeBytes: z.number().optional(),
|
|
6723
|
-
/**
|
|
6747
|
+
/**
|
|
6748
|
+
* Cron cadence(s) of the ENABLED schedules that fan out to this
|
|
6749
|
+
* destination, comma-joined. Absent when no enabled schedule targets it
|
|
6750
|
+
* — a destination nothing is scheduled to write to must not advertise a
|
|
6751
|
+
* cadence (D384). This is never the `backup_destination_policies.cron`
|
|
6752
|
+
* column: that per-location cron has scheduled nothing since 2026-07-28
|
|
6753
|
+
* and reading it made a destination with a DISABLED schedule claim a
|
|
6754
|
+
* nightly run.
|
|
6755
|
+
*/
|
|
6724
6756
|
cron: z.string().optional(),
|
|
6725
|
-
/** ms-epoch of next
|
|
6757
|
+
/** ms-epoch of the next firing across those schedules (earliest), if any. */
|
|
6726
6758
|
nextRunAt: z.number().optional(),
|
|
6727
|
-
/**
|
|
6728
|
-
|
|
6759
|
+
/**
|
|
6760
|
+
* ms-epoch of the last time a run ATTEMPTED to write here — success or
|
|
6761
|
+
* failure. Never a success stamp: pair it with `lastSuccessAt` (the
|
|
6762
|
+
* newest archive that actually landed) and `lastError`.
|
|
6763
|
+
*/
|
|
6764
|
+
lastAttemptAt: z.number().optional(),
|
|
6765
|
+
/**
|
|
6766
|
+
* Why the last attempt failed, verbatim. Absent when the last attempt
|
|
6767
|
+
* landed the archive. A destination that has never been written to has
|
|
6768
|
+
* neither this nor `lastAttemptAt`.
|
|
6769
|
+
*/
|
|
6770
|
+
lastError: z.string().optional()
|
|
6729
6771
|
});
|
|
6730
6772
|
/**
|
|
6731
6773
|
* Per-archive entry returned by `backup.listArchives({ destinationId })`.
|
|
@@ -6888,8 +6930,16 @@ var BackupScheduleSchema = z.object({
|
|
|
6888
6930
|
retentionCount: z.number().int().min(1).max(1e3),
|
|
6889
6931
|
/** Optional subset of source locations to include; omitted = all. */
|
|
6890
6932
|
dataSources: z.array(z.string()).readonly().optional(),
|
|
6891
|
-
/**
|
|
6892
|
-
|
|
6933
|
+
/**
|
|
6934
|
+
* ms-epoch of the last tick that FIRED this schedule. Stamped before the
|
|
6935
|
+
* archive runs (it is the dedupe anchor), so it says "attempted", never
|
|
6936
|
+
* "succeeded" — a run refused by every destination stamps it too.
|
|
6937
|
+
*/
|
|
6938
|
+
lastAttemptAt: z.number().optional(),
|
|
6939
|
+
/** ms-epoch of the last run of this schedule that landed at ≥1 destination. */
|
|
6940
|
+
lastSuccessAt: z.number().optional(),
|
|
6941
|
+
/** Why the last fired run failed, verbatim. Absent when it succeeded. */
|
|
6942
|
+
lastError: z.string().optional(),
|
|
6893
6943
|
/** ms-epoch of next computed firing (read-only, filled on list). */
|
|
6894
6944
|
nextRunAt: z.number().optional()
|
|
6895
6945
|
});
|
|
@@ -7018,14 +7068,7 @@ var backupCapability = {
|
|
|
7018
7068
|
locationId: z.string(),
|
|
7019
7069
|
enabled: z.boolean(),
|
|
7020
7070
|
retentionCount: z.number().int().min(1).max(1e3),
|
|
7021
|
-
label: z.string().optional()
|
|
7022
|
-
/**
|
|
7023
|
-
* Per-destination cron expression. Empty string clears the
|
|
7024
|
-
* schedule (manual-only). Validated server-side via croner;
|
|
7025
|
-
* malformed expressions reject the upsert with an actionable
|
|
7026
|
-
* message.
|
|
7027
|
-
*/
|
|
7028
|
-
cron: z.string().optional()
|
|
7071
|
+
label: z.string().optional()
|
|
7029
7072
|
}), z.void(), {
|
|
7030
7073
|
kind: "mutation",
|
|
7031
7074
|
auth: "admin"
|
|
@@ -23128,7 +23171,6 @@ var storageCapability = {
|
|
|
23128
23171
|
}), z.instanceof(Uint8Array)),
|
|
23129
23172
|
endDownload: method(z.object({ downloadId: z.string() }), z.void(), { kind: "mutation" }),
|
|
23130
23173
|
listLocations: method(z.object({ type: StorageLocationTypeSchema.optional() }), z.array(StorageLocationSchema).readonly()),
|
|
23131
|
-
getDefaultLocation: method(z.object({ type: StorageLocationTypeSchema }), StorageLocationSchema.nullable()),
|
|
23132
23174
|
listLocationDeclarations: method(z.void(), z.array(StorageLocationDeclarationSchema).readonly()),
|
|
23133
23175
|
upsertLocation: method(StorageLocationSchema.omit({
|
|
23134
23176
|
createdAt: true,
|
|
@@ -36342,134 +36384,6 @@ var RUNTIME_DEFAULTS = {
|
|
|
36342
36384
|
"auth.tokenExpiry": "30d"
|
|
36343
36385
|
};
|
|
36344
36386
|
//#endregion
|
|
36345
|
-
//#region src/device/container-primary-child.ts
|
|
36346
|
-
/**
|
|
36347
|
-
* WHICH child a container stands for — one definition, for every consumer.
|
|
36348
|
-
*
|
|
36349
|
-
* A CONTAINER device has no controllable surface of its own: it groups entity
|
|
36350
|
-
* children (a Gree air-conditioner grouping a climate child plus light, x-fan
|
|
36351
|
-
* and health switches). Everything that has to show or act on a container has
|
|
36352
|
-
* to answer the same question — which child IS the container — and until now
|
|
36353
|
-
* three places answered it separately:
|
|
36354
|
-
*
|
|
36355
|
-
* - `ui-library/device-controls/primary-child.ts` (admin-ui rendering)
|
|
36356
|
-
* - `addon-provider-homeassistant` PARENT_TYPE_PRIORITY (adoption)
|
|
36357
|
-
* - the viewer's own `container-primary.ts` (linked-devices panel)
|
|
36358
|
-
*
|
|
36359
|
-
* Each carried the same list and a comment asking the others to stay in sync.
|
|
36360
|
-
* This is that list, in the one package all of them already depend on.
|
|
36361
|
-
*
|
|
36362
|
-
* `ui-library` and the server's linked-devices expansion IMPORT it. Two
|
|
36363
|
-
* consumers cannot, and keep a checked copy instead: the viewer resolves
|
|
36364
|
-
* `@camstack/types` from its own `node_modules` (an installed release, where a
|
|
36365
|
-
* newly added export simply is not there), and the Home Assistant provider
|
|
36366
|
-
* expresses the same precedence over the `DeviceType` enum because it answers
|
|
36367
|
-
* a different question from the same ordering. `scripts/check-container-
|
|
36368
|
-
* priority-in-sync.ts` fails the build when either drifts — the comment that
|
|
36369
|
-
* used to ask for this could not.
|
|
36370
|
-
*
|
|
36371
|
-
* The rule has two halves and the ORDER matters: an operator's explicit pick
|
|
36372
|
-
* wins outright, and only in its absence does type priority decide. The pick is
|
|
36373
|
-
* keyed on the child's re-sync-stable `entityId`, not its numeric id, so it
|
|
36374
|
-
* survives a re-sync that reallocates ids.
|
|
36375
|
-
*/
|
|
36376
|
-
/**
|
|
36377
|
-
* Type priority, most→least "primary". An actuator (climate / lock / cover / …)
|
|
36378
|
-
* outranks a bare `switch` so a container's defining child wins over its
|
|
36379
|
-
* auxiliary switches. Unknown or absent types sort after every entry.
|
|
36380
|
-
*
|
|
36381
|
-
* NB: `siren` deliberately sits BELOW `switch` — it is a switch-family
|
|
36382
|
-
* actuator, and a camera's siren must not out-rank the thing the container is.
|
|
36383
|
-
*
|
|
36384
|
-
* These strings are matched against a child's `DeviceType` VALUE, so they must
|
|
36385
|
-
* equal the enum's string values.
|
|
36386
|
-
*/
|
|
36387
|
-
var CONTAINER_CHILD_PRIORITY = [
|
|
36388
|
-
"media-player",
|
|
36389
|
-
"alarm-panel",
|
|
36390
|
-
"thermostat",
|
|
36391
|
-
"climate",
|
|
36392
|
-
"humidifier",
|
|
36393
|
-
"water-heater",
|
|
36394
|
-
"lock",
|
|
36395
|
-
"cover",
|
|
36396
|
-
"valve",
|
|
36397
|
-
"fan",
|
|
36398
|
-
"vacuum",
|
|
36399
|
-
"lawn-mower",
|
|
36400
|
-
"light",
|
|
36401
|
-
"switch",
|
|
36402
|
-
"siren",
|
|
36403
|
-
"button",
|
|
36404
|
-
"control",
|
|
36405
|
-
"notifier",
|
|
36406
|
-
"script",
|
|
36407
|
-
"automation",
|
|
36408
|
-
"update",
|
|
36409
|
-
"presence",
|
|
36410
|
-
"weather",
|
|
36411
|
-
"image",
|
|
36412
|
-
"sensor"
|
|
36413
|
-
];
|
|
36414
|
-
/**
|
|
36415
|
-
* Roles that say what a container IS, most→least defining. Consulted BEFORE
|
|
36416
|
-
* type priority, because `DeviceType` cannot tell them apart: Home Assistant
|
|
36417
|
-
* maps a door contact, a battery level, a temperature reading and a "last seen"
|
|
36418
|
-
* timestamp all to `DeviceType.Sensor`. Measured on container 4127 — children
|
|
36419
|
-
* `battery-sensor`, `temperature-sensor`, `datetime-sensor`, `contact-sensor`
|
|
36420
|
-
* and a role-less `button` — the type list ranked `button` above `sensor` and
|
|
36421
|
-
* the container stood for its "Identifica" button instead of the door contact
|
|
36422
|
-
* it is named after.
|
|
36423
|
-
*
|
|
36424
|
-
* Only STATE-DEFINING roles belong here. A diagnostic reading (battery,
|
|
36425
|
-
* temperature, humidity, signal, last-seen) is never what a container is, so
|
|
36426
|
-
* they are deliberately absent and fall through to type priority.
|
|
36427
|
-
*/
|
|
36428
|
-
var CONTAINER_CHILD_ROLE_PRIORITY = [
|
|
36429
|
-
"contact-sensor",
|
|
36430
|
-
"motion-sensor",
|
|
36431
|
-
"occupancy-sensor",
|
|
36432
|
-
"smoke-sensor",
|
|
36433
|
-
"co-sensor",
|
|
36434
|
-
"gas-sensor",
|
|
36435
|
-
"leak-sensor",
|
|
36436
|
-
"vibration-sensor",
|
|
36437
|
-
"tamper-sensor",
|
|
36438
|
-
"sound-sensor"
|
|
36439
|
-
];
|
|
36440
|
-
/**
|
|
36441
|
-
* NOT in the list, deliberately: `binary-sensor` and `binary-helper`. They are
|
|
36442
|
-
* GENERIC — they say "this reports a boolean", not what the container is — and
|
|
36443
|
-
* ranking them above type priority is a live regression, not a hypothetical:
|
|
36444
|
-
* container 1837 holds a real `lock` (features `['lock-open']`) alongside a
|
|
36445
|
-
* child named "Actuator" whose only role is `binary-sensor`, and the generic
|
|
36446
|
-
* role beat the lock. A role earns a place here by naming a SUBJECT (a contact,
|
|
36447
|
-
* a leak, smoke), never by naming a datatype.
|
|
36448
|
-
*/
|
|
36449
|
-
function roleRank(role) {
|
|
36450
|
-
if (role === void 0) return CONTAINER_CHILD_ROLE_PRIORITY.length;
|
|
36451
|
-
const i = CONTAINER_CHILD_ROLE_PRIORITY.indexOf(role);
|
|
36452
|
-
return i === -1 ? CONTAINER_CHILD_ROLE_PRIORITY.length : i;
|
|
36453
|
-
}
|
|
36454
|
-
function rank(type) {
|
|
36455
|
-
const i = CONTAINER_CHILD_PRIORITY.indexOf(type);
|
|
36456
|
-
return i === -1 ? CONTAINER_CHILD_PRIORITY.length : i;
|
|
36457
|
-
}
|
|
36458
|
-
/**
|
|
36459
|
-
* The child a container stands for: the operator's pick when it still exists,
|
|
36460
|
-
* else the highest-priority type. `null` for a childless container — a caller
|
|
36461
|
-
* must decide what an empty container means for it, rather than being handed a
|
|
36462
|
-
* child that is not there.
|
|
36463
|
-
*/
|
|
36464
|
-
function resolveContainerPrimaryChild(children, overrideEntityId, containerName) {
|
|
36465
|
-
if (overrideEntityId !== void 0 && overrideEntityId !== null) {
|
|
36466
|
-
const picked = children.find((c) => c.stableId === overrideEntityId) ?? children.find((c) => c.entityId !== void 0 && c.entityId === overrideEntityId);
|
|
36467
|
-
if (picked !== void 0) return picked;
|
|
36468
|
-
}
|
|
36469
|
-
const namesake = (c) => containerName !== void 0 && containerName.length > 0 && c.name !== void 0 && c.name.toLowerCase() === containerName.toLowerCase() ? 0 : 1;
|
|
36470
|
-
return [...children].toSorted((a, b) => roleRank(a.role) - roleRank(b.role) || namesake(a) - namesake(b) || rank(a.type) - rank(b.type))[0] ?? null;
|
|
36471
|
-
}
|
|
36472
|
-
//#endregion
|
|
36473
36387
|
//#region src/device/accessory.ts
|
|
36474
36388
|
/**
|
|
36475
36389
|
* Accessory device helpers — shared across drivers.
|
|
@@ -38055,6 +37969,134 @@ function isBatteryPresenceFault(presence) {
|
|
|
38055
37969
|
return presence === "unreachable";
|
|
38056
37970
|
}
|
|
38057
37971
|
//#endregion
|
|
37972
|
+
//#region src/device/container-primary-child.ts
|
|
37973
|
+
/**
|
|
37974
|
+
* WHICH child a container stands for — one definition, for every consumer.
|
|
37975
|
+
*
|
|
37976
|
+
* A CONTAINER device has no controllable surface of its own: it groups entity
|
|
37977
|
+
* children (a Gree air-conditioner grouping a climate child plus light, x-fan
|
|
37978
|
+
* and health switches). Everything that has to show or act on a container has
|
|
37979
|
+
* to answer the same question — which child IS the container — and until now
|
|
37980
|
+
* three places answered it separately:
|
|
37981
|
+
*
|
|
37982
|
+
* - `ui-library/device-controls/primary-child.ts` (admin-ui rendering)
|
|
37983
|
+
* - `addon-provider-homeassistant` PARENT_TYPE_PRIORITY (adoption)
|
|
37984
|
+
* - the viewer's own `container-primary.ts` (linked-devices panel)
|
|
37985
|
+
*
|
|
37986
|
+
* Each carried the same list and a comment asking the others to stay in sync.
|
|
37987
|
+
* This is that list, in the one package all of them already depend on.
|
|
37988
|
+
*
|
|
37989
|
+
* `ui-library` and the server's linked-devices expansion IMPORT it. Two
|
|
37990
|
+
* consumers cannot, and keep a checked copy instead: the viewer resolves
|
|
37991
|
+
* `@camstack/types` from its own `node_modules` (an installed release, where a
|
|
37992
|
+
* newly added export simply is not there), and the Home Assistant provider
|
|
37993
|
+
* expresses the same precedence over the `DeviceType` enum because it answers
|
|
37994
|
+
* a different question from the same ordering. `scripts/check-container-
|
|
37995
|
+
* priority-in-sync.ts` fails the build when either drifts — the comment that
|
|
37996
|
+
* used to ask for this could not.
|
|
37997
|
+
*
|
|
37998
|
+
* The rule has two halves and the ORDER matters: an operator's explicit pick
|
|
37999
|
+
* wins outright, and only in its absence does type priority decide. The pick is
|
|
38000
|
+
* keyed on the child's re-sync-stable `entityId`, not its numeric id, so it
|
|
38001
|
+
* survives a re-sync that reallocates ids.
|
|
38002
|
+
*/
|
|
38003
|
+
/**
|
|
38004
|
+
* Type priority, most→least "primary". An actuator (climate / lock / cover / …)
|
|
38005
|
+
* outranks a bare `switch` so a container's defining child wins over its
|
|
38006
|
+
* auxiliary switches. Unknown or absent types sort after every entry.
|
|
38007
|
+
*
|
|
38008
|
+
* NB: `siren` deliberately sits BELOW `switch` — it is a switch-family
|
|
38009
|
+
* actuator, and a camera's siren must not out-rank the thing the container is.
|
|
38010
|
+
*
|
|
38011
|
+
* These strings are matched against a child's `DeviceType` VALUE, so they must
|
|
38012
|
+
* equal the enum's string values.
|
|
38013
|
+
*/
|
|
38014
|
+
var CONTAINER_CHILD_PRIORITY = [
|
|
38015
|
+
"media-player",
|
|
38016
|
+
"alarm-panel",
|
|
38017
|
+
"thermostat",
|
|
38018
|
+
"climate",
|
|
38019
|
+
"humidifier",
|
|
38020
|
+
"water-heater",
|
|
38021
|
+
"lock",
|
|
38022
|
+
"cover",
|
|
38023
|
+
"valve",
|
|
38024
|
+
"fan",
|
|
38025
|
+
"vacuum",
|
|
38026
|
+
"lawn-mower",
|
|
38027
|
+
"light",
|
|
38028
|
+
"switch",
|
|
38029
|
+
"siren",
|
|
38030
|
+
"button",
|
|
38031
|
+
"control",
|
|
38032
|
+
"notifier",
|
|
38033
|
+
"script",
|
|
38034
|
+
"automation",
|
|
38035
|
+
"update",
|
|
38036
|
+
"presence",
|
|
38037
|
+
"weather",
|
|
38038
|
+
"image",
|
|
38039
|
+
"sensor"
|
|
38040
|
+
];
|
|
38041
|
+
/**
|
|
38042
|
+
* Roles that say what a container IS, most→least defining. Consulted BEFORE
|
|
38043
|
+
* type priority, because `DeviceType` cannot tell them apart: Home Assistant
|
|
38044
|
+
* maps a door contact, a battery level, a temperature reading and a "last seen"
|
|
38045
|
+
* timestamp all to `DeviceType.Sensor`. Measured on container 4127 — children
|
|
38046
|
+
* `battery-sensor`, `temperature-sensor`, `datetime-sensor`, `contact-sensor`
|
|
38047
|
+
* and a role-less `button` — the type list ranked `button` above `sensor` and
|
|
38048
|
+
* the container stood for its "Identifica" button instead of the door contact
|
|
38049
|
+
* it is named after.
|
|
38050
|
+
*
|
|
38051
|
+
* Only STATE-DEFINING roles belong here. A diagnostic reading (battery,
|
|
38052
|
+
* temperature, humidity, signal, last-seen) is never what a container is, so
|
|
38053
|
+
* they are deliberately absent and fall through to type priority.
|
|
38054
|
+
*/
|
|
38055
|
+
var CONTAINER_CHILD_ROLE_PRIORITY = [
|
|
38056
|
+
"contact-sensor",
|
|
38057
|
+
"motion-sensor",
|
|
38058
|
+
"occupancy-sensor",
|
|
38059
|
+
"smoke-sensor",
|
|
38060
|
+
"co-sensor",
|
|
38061
|
+
"gas-sensor",
|
|
38062
|
+
"leak-sensor",
|
|
38063
|
+
"vibration-sensor",
|
|
38064
|
+
"tamper-sensor",
|
|
38065
|
+
"sound-sensor"
|
|
38066
|
+
];
|
|
38067
|
+
/**
|
|
38068
|
+
* NOT in the list, deliberately: `binary-sensor` and `binary-helper`. They are
|
|
38069
|
+
* GENERIC — they say "this reports a boolean", not what the container is — and
|
|
38070
|
+
* ranking them above type priority is a live regression, not a hypothetical:
|
|
38071
|
+
* container 1837 holds a real `lock` (features `['lock-open']`) alongside a
|
|
38072
|
+
* child named "Actuator" whose only role is `binary-sensor`, and the generic
|
|
38073
|
+
* role beat the lock. A role earns a place here by naming a SUBJECT (a contact,
|
|
38074
|
+
* a leak, smoke), never by naming a datatype.
|
|
38075
|
+
*/
|
|
38076
|
+
function roleRank(role) {
|
|
38077
|
+
if (role === void 0) return CONTAINER_CHILD_ROLE_PRIORITY.length;
|
|
38078
|
+
const i = CONTAINER_CHILD_ROLE_PRIORITY.indexOf(role);
|
|
38079
|
+
return i === -1 ? CONTAINER_CHILD_ROLE_PRIORITY.length : i;
|
|
38080
|
+
}
|
|
38081
|
+
function rank(type) {
|
|
38082
|
+
const i = CONTAINER_CHILD_PRIORITY.indexOf(type);
|
|
38083
|
+
return i === -1 ? CONTAINER_CHILD_PRIORITY.length : i;
|
|
38084
|
+
}
|
|
38085
|
+
/**
|
|
38086
|
+
* The child a container stands for: the operator's pick when it still exists,
|
|
38087
|
+
* else the highest-priority type. `null` for a childless container — a caller
|
|
38088
|
+
* must decide what an empty container means for it, rather than being handed a
|
|
38089
|
+
* child that is not there.
|
|
38090
|
+
*/
|
|
38091
|
+
function resolveContainerPrimaryChild(children, overrideEntityId, containerName) {
|
|
38092
|
+
if (overrideEntityId !== void 0 && overrideEntityId !== null) {
|
|
38093
|
+
const picked = children.find((c) => c.stableId === overrideEntityId) ?? children.find((c) => c.entityId !== void 0 && c.entityId === overrideEntityId);
|
|
38094
|
+
if (picked !== void 0) return picked;
|
|
38095
|
+
}
|
|
38096
|
+
const namesake = (c) => containerName !== void 0 && containerName.length > 0 && c.name !== void 0 && c.name.toLowerCase() === containerName.toLowerCase() ? 0 : 1;
|
|
38097
|
+
return [...children].toSorted((a, b) => roleRank(a.role) - roleRank(b.role) || namesake(a) - namesake(b) || rank(a.type) - rank(b.type))[0] ?? null;
|
|
38098
|
+
}
|
|
38099
|
+
//#endregion
|
|
38058
38100
|
//#region src/device/declared-device.ts
|
|
38059
38101
|
/** Marker written to a declared integration's `info`. */
|
|
38060
38102
|
var DECLARED_INTEGRATION_FIXED_KEY = "fixed";
|
|
@@ -45621,12 +45663,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
45621
45663
|
addonId: null,
|
|
45622
45664
|
access: "view"
|
|
45623
45665
|
},
|
|
45624
|
-
"storage.getDefaultLocation": {
|
|
45625
|
-
capName: "storage",
|
|
45626
|
-
capScope: "system",
|
|
45627
|
-
addonId: null,
|
|
45628
|
-
access: "view"
|
|
45629
|
-
},
|
|
45630
45666
|
"storage.list": {
|
|
45631
45667
|
capName: "storage",
|
|
45632
45668
|
capScope: "system",
|
|
@@ -50054,7 +50090,6 @@ function createSystemProxy(api) {
|
|
|
50054
50090
|
readChunk: (input) => dispatch("storage", "readChunk", "query", input),
|
|
50055
50091
|
endDownload: (input) => dispatch("storage", "endDownload", "mutation", input),
|
|
50056
50092
|
listLocations: (input) => dispatch("storage", "listLocations", "query", input),
|
|
50057
|
-
getDefaultLocation: (input) => dispatch("storage", "getDefaultLocation", "query", input),
|
|
50058
50093
|
listLocationDeclarations: (input) => dispatch("storage", "listLocationDeclarations", "query", input),
|
|
50059
50094
|
upsertLocation: (input) => dispatch("storage", "upsertLocation", "mutation", input),
|
|
50060
50095
|
deleteLocation: (input) => dispatch("storage", "deleteLocation", "mutation", input),
|
|
@@ -54111,4 +54146,4 @@ function enumerateInferenceDevices(hw) {
|
|
|
54111
54146
|
return out;
|
|
54112
54147
|
}
|
|
54113
54148
|
//#endregion
|
|
54114
|
-
export { ACCESSORY_LABEL, ACCESS_ROLES, ALEXA_EGRESS_PROFILE, ALL_CAPABILITY_DEFINITIONS, APPLE_SA_TO_MACRO, AUDIO_ANALYSIS_CAP_NAME, AUDIO_BACKEND_CHOICES, AUDIO_MACRO_LABELS, AUDIO_PRESETS, AccessoriesStatusSchema, AccessoryKind, AddBrokerInputSchema, AddonAutoUpdateSchema, AddonListItemSchema, AddonPageDeclarationSchema, AddonPageInfoSchema, 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, ApiKeyRecordSchema, ApiKeySummarySchema, ArchiveEntrySchema, ArchiveManifestSchema, AttachmentMediaTypeSchema, AttachmentSchema, AudioAnalysisResultSchema, AudioAnalysisSettingsSchema, AudioChunkInputSchema, AudioClassSummarySchema, AudioClassificationLabelSchema, AudioClassificationResultSchema, AudioCodecInfoSchema, AudioDecodeSessionConfigSchema, AudioEncodeSchema, AudioEncodeSessionConfigSchema, AudioEncodedChunkSchema, AudioEventSchema, AudioLevelSchema, AudioMetricsHistoryPointSchema, AudioMetricsHistorySchema, AudioMetricsSnapshotSchema, AudioPcmChunkSchema, AuthResultSchema, AutoUpdateSettingsSchema, AutomationActionSchema, AutomationConditionOperatorSchema, AutomationConditionSchema, AutomationControlStatusSchema, AutomationRecipeSchema, AutomationTriggerSchema, AvailableIntegrationTypeSchema, BACKEND_TO_FORMAT, BASE_LIVE_EGRESS_PROFILE, BATTERY_DEVICE_PROFILE, BATTERY_UNREACHABLE_AFTER_MS, BOOT_RECOVERY_BACKOFF_MS, BacklightModeSchema, BackupDestinationInfoSchema, BackupEntrySchema, BackupRunPhaseSchema, BackupRunSchema, BackupRunStateSchema, BackupTriggerResultSchema, BaseAddon, BaseDevice, BaseDeviceProvider, BatteryStatusSchema, BinaryStatusSchema, 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, CLUSTER_MODEL_SCOPED_STEPS, CLUSTER_MODEL_SECTION_ID, CLUSTER_STEP_SETTING_FIELDS, COCO_80_LABELS, COCO_TO_MACRO, 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, CandidateQueryFilterSchema, CapScopeSchema, CapabilityBindingsSchema, CarbonMonoxideStatusSchema, ChargingStatus, ClientNetworkStatsSchema, ClimateControlStatusSchema, ClipPlaybackSchema, ClipSchema, ClusterAddonNodeDeploymentSchema, ClusterAddonStatusEntrySchema, CollectionColumnSchema, CollectionIndexSchema, ColorStatusSchema, ConfigEntrySchema, ConfigSectionWithValuesSchema, ConfigTabDeclarationSchema, ConnectionTestDescriptorSchema, ConnectionTestInputSchema, ConnectionTestOutcomeSchema, ConnectivityStatusSchema, ConsumableItemSchema, ConsumablesStatusSchema, ContactStatusSchema, ControlKindSchema, ControlStatusSchema, ConvertArtifactSchema, ConvertResultSchema, ConvertTargetSchema, CoreBlockCompileResultSchema, CoreBlockInputSchema, CoreBlockPlacementSchema, CoreBlockSchema, CoreBlockStatusSchema, CoverStateSchema, CoverStatusSchema, CreateApiKeyInputSchema, CreateApiKeyResultSchema, CreateIntegrationInputSchema, CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, CreateUserInputSchema, CustomActionInputSchema, CustomModelDescriptorSchema, DATAPLANE_SECRET_HEADER, 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_POOL_MEMORY_POLICY, DEFAULT_RECORDING_PROFILES, DEFAULT_RETENTION, DEFAULT_RUNTIME_STATE_DURABILITY, DEFAULT_TIMELAPSE_PREVIEW_TEXT, DEFAULT_TOKEN_EXPIRY, 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, EngineInfoSchema as DataStoreEngineInfoSchema, DayNightModeSchema, DayNightOptionsSchema, DayNightSettingsPatchSchema, DayNightStatusSchema, DeclaredDevices, DecodedAudioChunkSchema, DecodedFrameSchema, DecoderSessionConfigSchema, DecoderStatsSchema, DeleteIntegrationResultSchema, DetailCropConventionSchema, DetectionCatalogClassMapSchema, DetectionSourceSchema, 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, DoorbellStatusSchema, EVENTFUL_CAP_NAMES, EVENT_DENSITY_BATCH_MAX, EVENT_KIND_BY_CAP, EVENT_PAD_MS, EVENT_TAXONOMY, EXPORT_DENSE_MAX_RANGES, EXPRESSION_BUILTINS, EXPRESSION_BUILTIN_NAMES, EXPRESSION_COMPILE_CACHE_CAPACITY, EXPRESSION_IDENTIFIER_RE, EXPRESSION_INJECTED_NOW, EgressEncodeSchema, EgressRateControlSchema, EgressTranscodeRequestSchema, EgressTranscodeSchema, ElementConfigStore, EmbeddingInfoSchema, EmbeddingResultSchema, EncodeProfileSchema, EncodedPacketSchema, EnrichedWidgetMetadataSchema, EnumSensorDateTimeFormatSchema, EnumSensorStatusSchema, EventCategory, EventDensityBucketSchema, EventDensityForDeviceSchema, EventEmitterStatusSchema, EventFireSchema, EventItemSchema, EventKindCategorySchema, EventKindDescriptorSchema, EventKindIconSchema, EventKindSchema, EventKindsForDeviceSchema, EventMediaArtifactSchema, EventMediaCoverageSchema, EventMediaKindSchema, EventMediaProductionSchema, EventSourceType, ExportBytesSchema, ExportDenseRangeSchema, ExportDenseSchema, ExportDownloadSchema, ExportOptionsSchema, ExportRecordSchema, ExportSetupFieldSchema, ExportSetupSchema, ExportSpeedSchema, ExportStateSchema, ExportTimelapseSchema, ExposedDeviceSchema, ExposureModeSchema, ExpressionBindingSourceSchema, ExpressionEvalError, ExpressionFieldBindingSchema, ExpressionGlobalBindingSchema, ExpressionLiteralBindingSchema, ExpressionParseError, ExpressionSourceSchema, FIRST_LEVEL_MACRO_CLASSES, FULL_IMAGE_BBOX, FailureContributionSchema, FailureCounters, FailureReasonCountSchema, FanControlStatusSchema, FanDirectionSchema, FeatureManifestSchema, FeatureProbeStatusSchema, FloodStatusSchema, Fmp4BoxSplitter, FrameHandleFormatSchema, FrameHandleSchema, FrameInputSchema, FrameLazyCountersSchema, FrameLazyMetricsSchema, GasStatusSchema, GetLoggingSettingsInputSchema, GetStreamWithCodecInputSchema, GlobalMetricsSchema, HAP_AUDIO_BASE, HAP_AUDIO_BITRATE_KBPS, HAP_AUDIO_VBV_KBITS, HAP_KEYFRAME_INTERVAL_SEC, HF_BASE_URL, HF_REPO, 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, LOAD_CONTRIBUTION_ATTRIBUTIONS, LOAD_CONTRIBUTION_ROLES, LOG_CHANNEL_TICK_MS, LOG_LEVEL_RANK, LabelAttributionSchema, LabelDefinitionSchema, LabelTierSchema, LawnMowerActivitySchema, LawnMowerControlStatusSchema, LedgerWalkDeviceReportSchema, LedgerWalkInputSchema, LedgerWalkRefusalSchema, LedgerWalkReportSchema, LedgerWalkSkipCountsSchema, LedgerWalkSkipReasonSchema, LinkedDeviceSchema, LinkedDevicesModeSchema, LlmDefaultSchema, LlmDefaultSelectorSchema, LlmDownloadProgressSchema, LlmErrorCodeSchema, LlmGenerateBaseInputSchema, LlmGenerateErrSchema, LlmGenerateOkSchema, LlmGenerateResultSchema, LlmImageSchema, LlmNodeModelSchema, LlmProfileKindDescriptorSchema, LlmProfileKindSchema, LlmProfileSchema, LlmRetryPolicySchema, LlmRuntimeCompleteInputSchema, LlmRuntimeDiskUsageSchema, LlmRuntimeNodeSchema, LlmRuntimeStatusSchema, LlmTimeoutDefaults, LlmUsageRollupSchema, LlmUsageSchema, LoadContributionSchema, LocateSegmentResultSchema, LocationStatSchema, LockControlStatusSchema, LockStateSchema, LogChannelApplyResultSchema, LogChannelDescriptorSchema, LogChannelGate, LogChannelLevelSchema, LogChannelRegistry, LogChannelWindowPatchSchema, LogChannelWindowSchema, LogChannelWindowStateSchema, LogEntrySchema, LogLevelSchema, LogStreamEntrySchema, LoggingEffectiveSchema, LoggingExplicitSchema, LoggingLevelLayerSchema, LoggingLevelSourceSchema, LoggingScopeKindSchema, LoggingSettingsPatchSchema, LoggingSettingsStateSchema, LoginMethodContributionSchema, LoginStageEnum, MACRO_LABELS, MAX_CLIP_EVENT_IDS, MAX_CLIP_LABELS, 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, METHOD_ACCESS_MAP, METHOD_DEVICE_SELECTORS, MODEL_FORMATS, MODEL_PROVIDER_IDS, MOTION_TRIGGER_FEATURE, ManagedModelCatalogEntrySchema, ManagedModelExtraFileSchema, ManagedModelRefSchema, ManagedRuntimeConfigSchema, MaskGridDimsSchema, MaskGridShapeSchema, MaskLineShapeSchema, MaskPointSchema, MaskPolygonShapeSchema, MaskPolygonVerticesSchema, MaskRectShapeSchema, MaskShapeKindSchema, MaskShapeSchema, MediaFileInfoSchema, MediaFileKindEnum, MediaFileRefSchema, MediaFileSchema, MediaPlayerRepeatSchema, MediaPlayerStateSchema, MediaPlayerStatusSchema, MediaRelocateModeSchema, MeshPeerSchema, MeshStatusSchema, MethodAccessSchema, MigrateDeviceResultSchema, MigrateSwitchOutcomeSchema, MigrateSwitchReportSchema, ModelCatalogEntrySchema, ModelConvertInputSchema, ModelConvertMetadataSchema, ModelDistributeInputSchema, ModelDistributeResultSchema, ModelExtraFileSchema, ModelFormatEntrySchema, ModelFormatsSchema, 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_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_CONDITION_CATALOG, NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, NC_CONFIRM_DEFAULT_TIMEOUT_MS, NC_CONFIRM_MAX_TIMEOUT_MS, NC_CONFIRM_MIN_TIMEOUT_MS, NC_DEFAULT_SNOOZE_MINUTES, NC_HISTORY_LIMIT_DEFAULT, NC_HISTORY_LIMIT_MAX, NC_MAX_PER_TRACK_IMMEDIATE, NC_OCCUPANCY_DEFAULTS, NC_RULE_EDITOR_SECTION_ORDER, NC_RULE_KIND_SPECS, NC_RULE_SECTIONS, NC_SNOOZE_MAX_MINUTES, NC_SYSTEM_DELIVERY, NC_SYSTEM_EVENT_FILTER_KEYS, NC_TAXONOMY, NETWORK_LINK_TYPES, NETWORK_LINK_UNKNOWN, NativeCropBboxSchema, NativeCropRefSchema, NativeCropResultSchema, NativeDetectionSchema, NativeLeaseAdmissionSchema, NativeLeaseSettingsSchema, NativeObjectClassEnum, NativeObjectDetectionRuntimeStateSchema, NativeObjectDetectionStatusSchema, NavigationActionEntrySchema, NavigationActionIdSchema, NavigationEntryKindSchema, NavigationFeaturesSchema, NavigationLightModeSchema, NavigationModeSchema, NavigationMoveCommandSchema, NavigationPointSchema, NavigationRuntimeStateSchema, NavigationStatusSchema, NcAlarmConfigSchema, NcAlarmModeCoverageSchema, NcAlarmSettingsPatchSchema, NcAlarmSettingsSchema, NcAlarmSkipReasonSchema, NcAlarmSkippedDeviceSchema, NcAudioConditionSchema, NcConditionDescriptorSchema, NcConditionsSchema, NcConfirmExpectSchema, NcConfirmSchema, NcCrossingSchema, NcDeliverySchema, NcDeviceStateConditionSchema, NcHistoryEntrySchema, NcHistoryFilterSchema, NcHistoryRecordKindSchema, NcHistoryStatusSchema, NcHistorySubjectSchema, NcMediaFrameSchema, NcMediaPolicySchema, NcOccupancyConditionSchema, NcPlateMatcherSchema, NcRuleActionSchema, NcRuleActionSequenceSchema, NcRuleActionsSchema, NcRuleInputSchema, NcRuleNotificationButtonSchema, NcRulePatchSchema, NcRuleSchema, NcRuleTargetSchema, NcSceneConditionSchema, NcScheduleSchema, NcScheduleWindowSchema, NcSnoozeInputSchema, NcSnoozeSchema, NcSnoozeScopeSchema, NcSnoozeSuppressedSchema, NcSystemEventConditionSchema, NcSystemEventKindSchema, NcTaxonomyEntrySchema, NcTaxonomySchema, NcTestResultSchema, NcThrottleGranularitySchema, NcThrottleSchema, NcZoneConditionSchema, NetworkAccessStatusSchema, NetworkAddressSchema, NetworkEndpointSchema, NetworkLinkStatusSchema, NotificationActionIconSchema, NotificationActionSchema, NotificationFormatSchema, NotificationSchema, NotifierStatusSchema, NumericSensorStatusSchema, OPERATOR_WRITTEN_STALE_MS, OPS_LOG_DEFAULT_LIMIT, OPS_LOG_RING_DEFAULT_MAX, OVERFLOW_REASON, OauthIntegrationDescriptorSchema, ObjectEventSchema, OpsLogDomainSchema, OpsLogEntrySchema, OpsLogOpSchema, OpsLogQueryInputSchema, OpsLogReasonSchema, OrchestratorMetricsSchema, OsdOverlayKindEnum, OsdOverlayPatchSchema, OsdOverlaySchema, OsdPositionEnum, OsdRenderOutcomeEnum, OsdRenderResultSchema, OsdSlotBindingSchema, OsdSlotViewSchema, OsdSourceOptionSchema, OsdSourceSchema, OsdSourceValueTypeEnum, OsdStatusSchema, PET_FEEDER_MANUAL_FEED_MAX, PET_FEEDER_MANUAL_FEED_MIN, PIPELINE_FLOW_CAPABILITY_NAMES, PIPELINE_OWNER_CAPABILITY_NAMES, PRIVACY_MASK_CAP_NAME, PROVIDER_KIND_CAP_NAMES, PYTHON_SCRIPT, PackageUpdateSchema, PackageVersionInfoSchema, PasskeyLoginMethodSchema, PasskeySummarySchema, PcmSampleFormatSchema, 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, PtzMoveCommandSchema, PtzOptionsSchema, PtzPositionSchema, PtzPresetSchema, PtzStatusSchema, QueryFilterSchema, RATE_CONTROL_RELAXED, RATE_CONTROL_TIGHT, REACHABILITY_FAILURES_TO_OFFLINE, REACHABILITY_POLL_INTERVAL_MS, REACHABILITY_PROBE_TIMEOUT_MS, RECOGNITION_TYPES, RECORDING_EXPORT_MAX_READ_BYTES, RECORDING_TIMELINE_BATCH_MAX, REDACTED_SECRET, RESERVED_BINDING_NAMES, RESTORED_CAP_NAMES, ROOT_BUCKET_KEY, RUNTIME_DEFAULTS, RUNTIME_STATE_POLICY, RUNTIME_STATE_REFRESH_MISS_COOLDOWN_MS, RUNTIME_TO_FORMAT, RawStateResultSchema, ReadGopBytesResultSchema, ReadSegmentBytesResultSchema, ReadWindowBytesResultSchema, ReadinessRegistry, ReadinessTimeoutError, RecentTracksPageSchema, RecentTracksQueryInput, RecordingAvailabilityForDeviceSchema, RecordingAvailabilitySchema, RecordingBandModeSchema, RecordingBandSchema, RecordingBandTriggersSchema, RecordingConfigSchema, RecordingDaysForDeviceSchema, RecordingDaysSchema, RecordingDeviceUsageSchema, RecordingLocationUsageSchema, RecordingManifestSchema, RecordingObjectTriggerClassSchema, RecordingRangeSchema, RecordingRebalanceInputSchema, RecordingRebalanceMoveSchema, RecordingRebalancePlanSchema, RecordingRebalanceSkipReasonSchema, RecordingRebalanceSkipSchema, RecordingRetentionSchema, RecordingSignalRuntimeStateSchema, RecordingSignalStatusSchema, 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, 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, STORAGE_ACCESS_FALLBACK, 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, ServerUpdateStateSchema, SetLoggingSettingsInputSchema, SetSiteLocationInputSchema, SettingsPatchSchema, SettingsRecordSchema, SettingsSchemaWithValuesSchema, SettingsUpdateResultSchema, ShmRingStatsSchema, SiteLocationSchema, SiteLocationSourceSchema, SiteLocationStatusSchema, 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, EndDownloadInputSchema as StorageEndDownloadInputSchema, FinalizeUploadInputSchema as StorageFinalizeUploadInputSchema, StorageLocationDeclarationSchema, StorageLocationRefSchema, StorageLocationSchema, StorageLocationTypeSchema, StorageMigrationClassSchema, StorageMigrationDestinationsSchema, StorageMigrationDrainInputSchema, StorageMigrationFindingCodeSchema, StorageMigrationFindingSchema, StorageMigrationFootageMoveInputSchema, StorageMigrationInputSchema, StorageMigrationJobSchema, StorageMigrationLaneSchema, StorageMigrationLeaseInputSchema, StorageMigrationMediaMoveInputSchema, StorageMigrationModeSchema, StorageMigrationMoveProgressSchema, StorageMigrationMoveSchema, StorageMigrationMoverSchema, StorageMigrationParticipantSchema, StorageMigrationPhaseSchema, StorageMigrationPlanSchema, StorageMigrationResidueSchema, StorageMigrationSourcesSchema, ProviderInfoSchema as StorageProviderInfoSchema, ReadChunkInputSchema as StorageReadChunkInputSchema, TestLocationResultSchema as StorageTestLocationResultSchema, WriteChunkInputSchema as StorageWriteChunkInputSchema, StreamCodecSchema, StreamFormatSchema, StreamNetworkStatsSchema, StreamParamsOptionsSchema, StreamParamsStatusSchema, StreamProfileConfigSchema, StreamProfileOptionsSchema, StreamProfilePatchSchema, StreamProfileSchema, 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, 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_EGRESS_PROFILE, WELL_KNOWN_TABS, WELL_KNOWN_TAB_MAP, WaterHeaterStatusSchema, WeatherStatusSchema, WebrtcStreamChoiceSchema, WebrtcStreamTargetSchema, WhiteBalanceModeSchema, WidgetHostEnum, WidgetLoginMethodSchema, WidgetMetadataSchema, WidgetRemoteSchema, WidgetSizeEnum, 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, audioCodecCapability, audioIsFailClosed, audioKindId, audioLabelChoices, audioMetricsCapability, audioModeOf, audioOrDefaults, audioPlanFromEncodeProfile, authProviderCapability, autoAssignProfiles, automationControlCapability, backupCapability, bareAddonId, batteryCapability, bestLocationMatch, binaryCapability, bindAddonActions, brightnessCapability, brokerCapability, buildAddonRouteProvider, buildAudioArgs, buildEventKindDescriptor, buildFfmpegArgs, buildInputArgs, buildModelVariantGroups, buildNcTaxonomy, buildRoleScopes, buildStreamParamsConfigSchema, buildVideoArgs, buttonCapability, cameraCredentialsCapability, cameraPipelineConfigCapability, cameraStreamsCapability, canConvertUnit, canonicalEgressPlan, carbonMonoxideCapability, cellsToRects, classifyBearerPrincipal, classifyStream, classifyStreams, climateControlCapability, clusterModelSettingKey, clusterStepSettingFieldsFor, clusterStepSettingKey, collectHydratedFieldEntries, collectHydratedFieldValues, collectSecretConfigKeys, colorCapability, colorForKind, commitWatchdogRestart, compileExpression, compileExpressionSafe, composeSwitchedOff, conditionDepth, conditionExclusionReason, conditionVisibleForKind, connectionTestCapability, connectivityCapability, consumablesCapability, contactCapability, controlCapability, convertUnit, coreBlockAddonId, coreBlockIdFromAddonId, coreBlocksCapability, cosineSimilarity, countConditionLeaves, coverCapability, createDeviceProxy, createDurableState, createEvent, createEventBusSliceSource, createExpressionScope, createHwAccelCache, createLazyTrpcSource, createLogChannelsProvider, createMirrorSource, createRuntimeStateBridge, createSliceHandle, createSystemProxy, customAction, customModelRegistryCapability, dataStoreProviderCapability, dayNightCapability, declarationOwnerNodeId, declareLogChannel, decodeVectorBase64, decoderCapability, defaultDeliveryForSection, defaultDeviceFor, defineCustomActions, deriveBatteryPresence, deriveCameraSwitches, deriveDetailCropRect, deriveRecordingMode, describeModelVariant, detectAccessRole, detectionPipelineCapability, deviceAdoptionCapability, deviceBackendToFormat, deviceCustomAction, deviceDiscoveryCapability, deviceExportCapability, deviceManagerCapability, deviceMatchesProfile, deviceOpsCapability, deviceProviderCapability, deviceSelectorMatches, deviceStateCapability, deviceStatusCapability, doorbellCapability, droppedConditionsForKind, egressTranscodeSharingKey, egressTransportFromRequest, embeddingEncoderCapability, emitDownForOwnedCaps, emitReadiness, encodeProfileFromStreamShape, encodeVectorBase64, enumSensorCapability, enumerateInferenceDevices, enumerateItemArrayFields, enumerateSchemaFields, errMsg, evaluateAst, evaluateExpressionSource, evaluatePoolMemory, evaluateSensorEdge, evaluateZoneRules, event, eventEmitterCapability, eventsCapability, expandCapMethods, extractNestedAddonId, extractSourceInfoFromMetadata, faceGalleryCapability, failureContributionCapability, failureRate, fanControlCapability, featureProbeCapability, filesystemBrowseCapability, findTimezone, floodCapability, foldSnapshotByFunction, formatForBackend, formatForRuntime, gasCapability, generateAutomationBlock, getAudioMacroClassIds, getByPath, getCapsByProviderKind, getLogChannelRegistry, getTaxonomyEntry, hasMotionTrigger, hfModelUrl, htmlToText, humidifierCapability, humiditySensorCapability, hydrateSchema, imageCapability, imageSettingsCapability, inferModelProvider, initialPoolMemoryState, integrationsCapability, intercomCapability, invocationFromEncodeProfile, isAgentOnlyPlacement, isArrayOutputSchema, isAudioLabelSelected, isAudioRule, isBaseConditionKey, isBatteryPresenceFault, isClusterScopedStep, isCollectionArrayMethod, isDeployableToAgent, isDetectionMacroClass, isDeviceConfigCap, isDeviceScopedCap, isEvent, isFirstLevelMacroClass, isIsolatedBuiltin, isNode, isObjectInput, isOccupancyRule, isRestoredCap, isSameAddonId, isScheduleActive, isSecretConfigField, isSoftwareDecode, isSourceCap, isSystemDelivery, isVoidInput, jobKindSchema, kebabToCamel, knownValues, lawnMowerControlCapability, lifecycleJobSchema, lifecycleJobScopeSchema, lifecycleJobStateSchema, lifecycleTaskSchema, llmCapability, llmRuntimeCapability, loadContributionCapability, localNetworkCapability, locationSimilarity, lockControlCapability, logBannerArgs, logChannelsCapability, logDestinationCapability, logLevelAtMost, loginMethodCapability, looseSchema, makeProfileBrokerId, makeSourceBrokerId, mapAudioLabelToMacro, markdownToHtmlLite, markdownToText, maskUrlCredentials, mediaPlayerCapability, mergeSourceInfo, meshNetworkCapability, method, methodAccessForHttpMethod, metricsProviderCapability, migrateLegacyDeviceSignalConfig, modelConvertCapability, modelDistributorCapability, modelFormatForRuntime, motionCapability, motionDetectionCapability, motionTriggerCapability, motionZonesCapability, mqttBrokerCapability, nativeObjectDetectionCapability, navigationCapability, networkAccessCapability, networkLinkCapability, networkQualityCapability, nodePin, nodesCapability, normalizeAddonInitResult, normalizeAudioLabel, normalizeTokenScopes, normalizeUnit, notificationOutputCapability, notificationRulesCapability, notifierCapability, numericSensorCapability, oauthIntegrationCapability, objectInputDeclaresAddonId, osdCapability, osdManagerCapability, overlayClusterStepSettings, parseCameraStreamConfig, parseExpression, parseJsonArray, parseJsonObject, parseJsonUnknown, parseProcStatus, parseProfileBrokerId, parseRuleSection, parseStreamParamsFormPatch, patchAudio, petFeederCapability, pickAccessoryControl, pickClusterStepModels, pickClusterStepSettings, pickDetailCropConvention, pickNativeLeaseOverride, pickPreferredRtspEntry, pickRestartCandidate, pickVideoEncoder, pickerForCondition, pipelineAnalyticsCapability, pipelineExecutorCapability, pipelineOrchestratorCapability, pipelineRunnerCapability, plateGalleryCapability, platformProbeCapability, poolMemoryThreshold, powerMeterCapability, prepareNotification, presenceCapability, pressureSensorCapability, principalMayReachAddon, privacyMaskCapability, procedureAuthKey, ptzAutotrackCapability, ptzCapability, pythonScriptForBackend, readClusterStepModels, readClusterStepSettings, readDetailCropConvention, readDeviceStateFrom, readNativeLeaseOverride, readNodePin, readTimelapseGeneratedAt, readinessKey, rebootCapability, recordingCapability, recordingExportCapability, recordingSignalCapability, rectsToCells, reducePoints, requiresPython, resetPoolBaseline, resolveAddonExecution, resolveAddonGroup, resolveAddonPlacement, resolveAddonRuntime, resolveBucketMs, resolveCapMount, resolveClusterStepModelId, resolveContainerPrimaryChild, resolveDetectionRuntime, resolveDeviceControlKind, resolveDeviceProfile, resolveEgressDecodeHwAccel, resolveFormat, resolveHydratedFieldValue, resolveMethodAuth, resolveModelFormat, resolveMutate, resolvePoolMemoryPolicy, resolveRecordingProfiles, resolveRunnerId, resolveVariantModelId, resolveViewableDeviceIds, roleSpec, ruleEditorSectionsForKind, ruleKindOf, ruleKindSpec, ruleMatchesSection, ruleSection, ruleSectionOf, ruleSeedForSection, runInferenceStep, runtimeDevices, runtimeStatePolicyFor, sceneMonitorCapability, schemaDeclaresAnyField, scopeInherits, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, scoreRuntimes, scriptRunnerCapability, selectAssignedProfileSlots, serverManagementCapability, setByPath, settingsStoreCapability, signalPercentFromBars, signalPercentFromRssi, sleep, sleepCancellable, sliceActiveValue, sliceChangedAt, smokeCapability, smtpProviderCapability, snapshotCapability, ssoBridgeCapability, startReachabilityPoll, stateVocabularyFor, storageCapability, storageEvictableCapability, storageMigrationCapability, storageProviderCapability, streamBrokerCapability, streamCatalogCapability, streamParamsCapability, streamPixels, streamQualityLabel, stripRetiredBandPreBufferSec, subKindsOf, summarisePrivacyAudio, summarizeEffectiveScope, supportedRuntimes, switchCapability, switchedOffIds, synthesizeSourceInfo, systemCapability, systemEventFilterApplies, systemEventFilterAppliesToAnyKind, tamperCapability, taskLogEntrySchema, taskPhaseSchema, taskTargetSchema, temperatureSensorCapability, terminalSessionCapability, textToHtml, toDeviceSummary, toExpressionValue, toNodeId, toStreamSourceEntry, toastCapability, toggleAudioLabel, tokenize, transcodeBody, tryConvertUnit, turnProviderCapability, unitDimension, unitsForDimension, updateCapability, userManagementCapability, userPasskeysCapability, vacuumControlCapability, validateExpressionSource, validateRecipeBounds, valveCapability, vectorDimFromBase64, vectorStoreCapability, vibrationCapability, videoclipsCapability, viewerUiCapability, waterHeaterCapability, weatherCapability, webrtcClientHintsSchema, webrtcSessionCapability, wiringAddonHealthSchema, wiringHealthSnapshotSchema, wiringNodeHealthSchema, wiringProbeKindSchema, wiringProbeResultSchema, zodEntriesToConfigUI, zoneAnalyticsCapability, zoneRulesCapability, zonesCapability };
|
|
54149
|
+
export { ACCESSORY_LABEL, ACCESS_ROLES, ALEXA_EGRESS_PROFILE, ALL_CAPABILITY_DEFINITIONS, APPLE_SA_TO_MACRO, AUDIO_ANALYSIS_CAP_NAME, AUDIO_BACKEND_CHOICES, AUDIO_MACRO_LABELS, AUDIO_PRESETS, AccessoriesStatusSchema, AccessoryKind, AddBrokerInputSchema, AddonAutoUpdateSchema, AddonListItemSchema, AddonPageDeclarationSchema, AddonPageInfoSchema, 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, ApiKeyRecordSchema, ApiKeySummarySchema, ArchiveEntrySchema, ArchiveManifestSchema, AttachmentMediaTypeSchema, AttachmentSchema, AudioAnalysisResultSchema, AudioAnalysisSettingsSchema, AudioChunkInputSchema, AudioClassSummarySchema, AudioClassificationLabelSchema, AudioClassificationResultSchema, AudioCodecInfoSchema, AudioDecodeSessionConfigSchema, AudioEncodeSchema, AudioEncodeSessionConfigSchema, AudioEncodedChunkSchema, AudioEventSchema, AudioLevelSchema, AudioMetricsHistoryPointSchema, AudioMetricsHistorySchema, AudioMetricsSnapshotSchema, AudioPcmChunkSchema, AuthResultSchema, AutoUpdateSettingsSchema, AutomationActionSchema, AutomationConditionOperatorSchema, AutomationConditionSchema, AutomationControlStatusSchema, AutomationRecipeSchema, AutomationTriggerSchema, AvailableIntegrationTypeSchema, BACKEND_TO_FORMAT, BASE_LIVE_EGRESS_PROFILE, BATTERY_DEVICE_PROFILE, BATTERY_UNREACHABLE_AFTER_MS, BOOT_RECOVERY_BACKOFF_MS, BacklightModeSchema, BackupDestinationInfoSchema, BackupEntrySchema, BackupRunPhaseSchema, BackupRunSchema, BackupRunStateSchema, BackupTriggerResultSchema, BaseAddon, BaseDevice, BaseDeviceProvider, BatteryStatusSchema, BinaryStatusSchema, 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, CLUSTER_MODEL_SCOPED_STEPS, CLUSTER_MODEL_SECTION_ID, CLUSTER_STEP_SETTING_FIELDS, COCO_80_LABELS, COCO_TO_MACRO, 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, CandidateQueryFilterSchema, CapScopeSchema, CapabilityBindingsSchema, CarbonMonoxideStatusSchema, ChargingStatus, ClientNetworkStatsSchema, ClimateControlStatusSchema, ClipPlaybackSchema, ClipSchema, ClusterAddonNodeDeploymentSchema, ClusterAddonStatusEntrySchema, CollectionColumnSchema, CollectionIndexSchema, ColorStatusSchema, ConfigEntrySchema, ConfigSectionWithValuesSchema, ConfigTabDeclarationSchema, ConnectionTestDescriptorSchema, ConnectionTestInputSchema, ConnectionTestOutcomeSchema, ConnectivityStatusSchema, ConsumableItemSchema, ConsumablesStatusSchema, ContactStatusSchema, ControlKindSchema, ControlStatusSchema, ConvertArtifactSchema, ConvertResultSchema, ConvertTargetSchema, CoreBlockCompileResultSchema, CoreBlockInputSchema, CoreBlockPlacementSchema, CoreBlockSchema, CoreBlockStatusSchema, CoverStateSchema, CoverStatusSchema, CreateApiKeyInputSchema, CreateApiKeyResultSchema, CreateIntegrationInputSchema, CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, CreateUserInputSchema, CustomActionInputSchema, CustomModelDescriptorSchema, DATAPLANE_SECRET_HEADER, 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_POOL_MEMORY_POLICY, DEFAULT_RECORDING_PROFILES, DEFAULT_RETENTION, DEFAULT_RUNTIME_STATE_DURABILITY, DEFAULT_TIMELAPSE_PREVIEW_TEXT, DEFAULT_TOKEN_EXPIRY, 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, EngineInfoSchema as DataStoreEngineInfoSchema, DayNightModeSchema, DayNightOptionsSchema, DayNightSettingsPatchSchema, DayNightStatusSchema, DeclaredDevices, DecodedAudioChunkSchema, DecodedFrameSchema, DecoderSessionConfigSchema, DecoderStatsSchema, DeleteIntegrationResultSchema, DetailCropConventionSchema, DetectionCatalogClassMapSchema, DetectionSourceSchema, 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, DoorbellStatusSchema, EVENTFUL_CAP_NAMES, EVENT_DENSITY_BATCH_MAX, EVENT_KIND_BY_CAP, EVENT_PAD_MS, EVENT_TAXONOMY, EXPORT_DENSE_MAX_RANGES, EXPRESSION_BUILTINS, EXPRESSION_BUILTIN_NAMES, EXPRESSION_COMPILE_CACHE_CAPACITY, EXPRESSION_IDENTIFIER_RE, EXPRESSION_INJECTED_NOW, EgressEncodeSchema, EgressRateControlSchema, EgressTranscodeRequestSchema, EgressTranscodeSchema, ElementConfigStore, EmbeddingInfoSchema, EmbeddingResultSchema, EncodeProfileSchema, EncodedPacketSchema, EnrichedWidgetMetadataSchema, EnumSensorDateTimeFormatSchema, EnumSensorStatusSchema, EventCategory, EventDensityBucketSchema, EventDensityForDeviceSchema, EventEmitterStatusSchema, EventFireSchema, EventItemSchema, EventKindCategorySchema, EventKindDescriptorSchema, EventKindIconSchema, EventKindSchema, EventKindsForDeviceSchema, EventMediaArtifactSchema, EventMediaCoverageSchema, EventMediaKindSchema, EventMediaProductionSchema, EventSourceType, ExportBytesSchema, ExportDenseRangeSchema, ExportDenseSchema, ExportDownloadSchema, ExportOptionsSchema, ExportRecordSchema, ExportSetupFieldSchema, ExportSetupSchema, ExportSpeedSchema, ExportStateSchema, ExportTimelapseSchema, ExposedDeviceSchema, ExposureModeSchema, ExpressionBindingSourceSchema, ExpressionEvalError, ExpressionFieldBindingSchema, ExpressionGlobalBindingSchema, ExpressionLiteralBindingSchema, ExpressionParseError, ExpressionSourceSchema, FIRST_LEVEL_MACRO_CLASSES, FULL_IMAGE_BBOX, FailureContributionSchema, FailureCounters, FailureReasonCountSchema, FanControlStatusSchema, FanDirectionSchema, FeatureManifestSchema, FeatureProbeStatusSchema, FloodStatusSchema, Fmp4BoxSplitter, FrameHandleFormatSchema, FrameHandleSchema, FrameInputSchema, FrameLazyCountersSchema, FrameLazyMetricsSchema, GasStatusSchema, GetLoggingSettingsInputSchema, GetStreamWithCodecInputSchema, GlobalMetricsSchema, HAP_AUDIO_BASE, HAP_AUDIO_BITRATE_KBPS, HAP_AUDIO_VBV_KBITS, HAP_KEYFRAME_INTERVAL_SEC, HF_BASE_URL, HF_REPO, 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, LOAD_CONTRIBUTION_ATTRIBUTIONS, LOAD_CONTRIBUTION_ROLES, LOG_CHANNEL_TICK_MS, LOG_LEVEL_RANK, LabelAttributionSchema, LabelDefinitionSchema, LabelTierSchema, LawnMowerActivitySchema, LawnMowerControlStatusSchema, LedgerWalkDeviceReportSchema, LedgerWalkInputSchema, LedgerWalkRefusalSchema, LedgerWalkReportSchema, LedgerWalkSkipCountsSchema, LedgerWalkSkipReasonSchema, LegacyStorageLocationDefaultSchema, LinkedDeviceSchema, LinkedDevicesModeSchema, LlmDefaultSchema, LlmDefaultSelectorSchema, LlmDownloadProgressSchema, LlmErrorCodeSchema, LlmGenerateBaseInputSchema, LlmGenerateErrSchema, LlmGenerateOkSchema, LlmGenerateResultSchema, LlmImageSchema, LlmNodeModelSchema, LlmProfileKindDescriptorSchema, LlmProfileKindSchema, LlmProfileSchema, LlmRetryPolicySchema, LlmRuntimeCompleteInputSchema, LlmRuntimeDiskUsageSchema, LlmRuntimeNodeSchema, LlmRuntimeStatusSchema, LlmTimeoutDefaults, LlmUsageRollupSchema, LlmUsageSchema, LoadContributionSchema, LocateSegmentResultSchema, LocationStatSchema, LockControlStatusSchema, LockStateSchema, LogChannelApplyResultSchema, LogChannelDescriptorSchema, LogChannelGate, LogChannelLevelSchema, LogChannelRegistry, LogChannelWindowPatchSchema, LogChannelWindowSchema, LogChannelWindowStateSchema, LogEntrySchema, LogLevelSchema, LogStreamEntrySchema, LoggingEffectiveSchema, LoggingExplicitSchema, LoggingLevelLayerSchema, LoggingLevelSourceSchema, LoggingScopeKindSchema, LoggingSettingsPatchSchema, LoggingSettingsStateSchema, LoginMethodContributionSchema, LoginStageEnum, MACRO_LABELS, MAX_CLIP_EVENT_IDS, MAX_CLIP_LABELS, 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, METHOD_ACCESS_MAP, METHOD_DEVICE_SELECTORS, MODEL_FORMATS, MODEL_PROVIDER_IDS, MOTION_TRIGGER_FEATURE, ManagedModelCatalogEntrySchema, ManagedModelExtraFileSchema, ManagedModelRefSchema, ManagedRuntimeConfigSchema, MaskGridDimsSchema, MaskGridShapeSchema, MaskLineShapeSchema, MaskPointSchema, MaskPolygonShapeSchema, MaskPolygonVerticesSchema, MaskRectShapeSchema, MaskShapeKindSchema, MaskShapeSchema, MediaFileInfoSchema, MediaFileKindEnum, MediaFileRefSchema, MediaFileSchema, MediaPlayerRepeatSchema, MediaPlayerStateSchema, MediaPlayerStatusSchema, MediaRelocateModeSchema, MeshPeerSchema, MeshStatusSchema, MethodAccessSchema, MigrateDeviceResultSchema, MigrateSwitchOutcomeSchema, MigrateSwitchReportSchema, ModelCatalogEntrySchema, ModelConvertInputSchema, ModelConvertMetadataSchema, ModelDistributeInputSchema, ModelDistributeResultSchema, ModelExtraFileSchema, ModelFormatEntrySchema, ModelFormatsSchema, 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_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_CONDITION_CATALOG, NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, NC_CONFIRM_DEFAULT_TIMEOUT_MS, NC_CONFIRM_MAX_TIMEOUT_MS, NC_CONFIRM_MIN_TIMEOUT_MS, NC_DEFAULT_SNOOZE_MINUTES, NC_HISTORY_LIMIT_DEFAULT, NC_HISTORY_LIMIT_MAX, NC_MAX_PER_TRACK_IMMEDIATE, NC_OCCUPANCY_DEFAULTS, NC_RULE_EDITOR_SECTION_ORDER, NC_RULE_KIND_SPECS, NC_RULE_SECTIONS, NC_SNOOZE_MAX_MINUTES, NC_SYSTEM_DELIVERY, NC_SYSTEM_EVENT_FILTER_KEYS, NC_TAXONOMY, NETWORK_LINK_TYPES, NETWORK_LINK_UNKNOWN, NativeCropBboxSchema, NativeCropRefSchema, NativeCropResultSchema, NativeDetectionSchema, NativeLeaseAdmissionSchema, NativeLeaseSettingsSchema, NativeObjectClassEnum, NativeObjectDetectionRuntimeStateSchema, NativeObjectDetectionStatusSchema, NavigationActionEntrySchema, NavigationActionIdSchema, NavigationEntryKindSchema, NavigationFeaturesSchema, NavigationLightModeSchema, NavigationModeSchema, NavigationMoveCommandSchema, NavigationPointSchema, NavigationRuntimeStateSchema, NavigationStatusSchema, NcAlarmConfigSchema, NcAlarmModeCoverageSchema, NcAlarmSettingsPatchSchema, NcAlarmSettingsSchema, NcAlarmSkipReasonSchema, NcAlarmSkippedDeviceSchema, NcAudioConditionSchema, NcConditionDescriptorSchema, NcConditionsSchema, NcConfirmExpectSchema, NcConfirmSchema, NcCrossingSchema, NcDeliverySchema, NcDeviceStateConditionSchema, NcHistoryEntrySchema, NcHistoryFilterSchema, NcHistoryRecordKindSchema, NcHistoryStatusSchema, NcHistorySubjectSchema, NcMediaFrameSchema, NcMediaPolicySchema, NcOccupancyConditionSchema, NcPlateMatcherSchema, NcRuleActionSchema, NcRuleActionSequenceSchema, NcRuleActionsSchema, NcRuleInputSchema, NcRuleNotificationButtonSchema, NcRulePatchSchema, NcRuleSchema, NcRuleTargetSchema, NcSceneConditionSchema, NcScheduleSchema, NcScheduleWindowSchema, NcSnoozeInputSchema, NcSnoozeSchema, NcSnoozeScopeSchema, NcSnoozeSuppressedSchema, NcSystemEventConditionSchema, NcSystemEventKindSchema, NcTaxonomyEntrySchema, NcTaxonomySchema, NcTestResultSchema, NcThrottleGranularitySchema, NcThrottleSchema, NcZoneConditionSchema, NetworkAccessStatusSchema, NetworkAddressSchema, NetworkEndpointSchema, NetworkLinkStatusSchema, NotificationActionIconSchema, NotificationActionSchema, NotificationFormatSchema, NotificationSchema, NotifierStatusSchema, NumericSensorStatusSchema, OPERATOR_WRITTEN_STALE_MS, OPS_LOG_DEFAULT_LIMIT, OPS_LOG_RING_DEFAULT_MAX, OVERFLOW_REASON, OauthIntegrationDescriptorSchema, ObjectEventSchema, OpsLogDomainSchema, OpsLogEntrySchema, OpsLogOpSchema, OpsLogQueryInputSchema, OpsLogReasonSchema, OrchestratorMetricsSchema, OsdOverlayKindEnum, OsdOverlayPatchSchema, OsdOverlaySchema, OsdPositionEnum, OsdRenderOutcomeEnum, OsdRenderResultSchema, OsdSlotBindingSchema, OsdSlotViewSchema, OsdSourceOptionSchema, OsdSourceSchema, OsdSourceValueTypeEnum, OsdStatusSchema, PET_FEEDER_MANUAL_FEED_MAX, PET_FEEDER_MANUAL_FEED_MIN, PIPELINE_FLOW_CAPABILITY_NAMES, PIPELINE_OWNER_CAPABILITY_NAMES, PRIVACY_MASK_CAP_NAME, PROVIDER_KIND_CAP_NAMES, PYTHON_SCRIPT, PackageUpdateSchema, PackageVersionInfoSchema, PasskeyLoginMethodSchema, PasskeySummarySchema, PcmSampleFormatSchema, 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, PtzMoveCommandSchema, PtzOptionsSchema, PtzPositionSchema, PtzPresetSchema, PtzStatusSchema, QueryFilterSchema, RATE_CONTROL_RELAXED, RATE_CONTROL_TIGHT, REACHABILITY_FAILURES_TO_OFFLINE, REACHABILITY_POLL_INTERVAL_MS, REACHABILITY_PROBE_TIMEOUT_MS, RECOGNITION_TYPES, RECORDING_EXPORT_MAX_READ_BYTES, RECORDING_TIMELINE_BATCH_MAX, REDACTED_SECRET, RESERVED_BINDING_NAMES, RESTORED_CAP_NAMES, ROOT_BUCKET_KEY, RUNTIME_DEFAULTS, RUNTIME_STATE_POLICY, RUNTIME_STATE_REFRESH_MISS_COOLDOWN_MS, RUNTIME_TO_FORMAT, RawStateResultSchema, ReadGopBytesResultSchema, ReadSegmentBytesResultSchema, ReadWindowBytesResultSchema, ReadinessRegistry, ReadinessTimeoutError, RecentTracksPageSchema, RecentTracksQueryInput, RecordingAvailabilityForDeviceSchema, RecordingAvailabilitySchema, RecordingBandModeSchema, RecordingBandSchema, RecordingBandTriggersSchema, RecordingConfigSchema, RecordingDaysForDeviceSchema, RecordingDaysSchema, RecordingDeviceUsageSchema, RecordingLocationUsageSchema, RecordingManifestSchema, RecordingObjectTriggerClassSchema, RecordingRangeSchema, RecordingRebalanceInputSchema, RecordingRebalanceMoveSchema, RecordingRebalancePlanSchema, RecordingRebalanceSkipReasonSchema, RecordingRebalanceSkipSchema, RecordingRetentionSchema, RecordingSignalRuntimeStateSchema, RecordingSignalStatusSchema, 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, 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, STORAGE_ACCESS_FALLBACK, 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, ServerUpdateStateSchema, SetLoggingSettingsInputSchema, SetSiteLocationInputSchema, SettingsPatchSchema, SettingsRecordSchema, SettingsSchemaWithValuesSchema, SettingsUpdateResultSchema, ShmRingStatsSchema, SiteLocationSchema, SiteLocationSourceSchema, SiteLocationStatusSchema, 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, EndDownloadInputSchema as StorageEndDownloadInputSchema, FinalizeUploadInputSchema as StorageFinalizeUploadInputSchema, StorageLocationDeclarationSchema, StorageLocationRefSchema, StorageLocationSchema, StorageLocationTypeSchema, StorageMigrationClassSchema, StorageMigrationDestinationsSchema, StorageMigrationDrainInputSchema, StorageMigrationFindingCodeSchema, StorageMigrationFindingSchema, StorageMigrationFootageMoveInputSchema, StorageMigrationInputSchema, StorageMigrationJobSchema, StorageMigrationLaneSchema, StorageMigrationLeaseInputSchema, StorageMigrationMediaMoveInputSchema, StorageMigrationModeSchema, StorageMigrationMoveProgressSchema, StorageMigrationMoveSchema, StorageMigrationMoverSchema, StorageMigrationParticipantSchema, StorageMigrationPhaseSchema, StorageMigrationPlanSchema, StorageMigrationResidueSchema, StorageMigrationSourcesSchema, ProviderInfoSchema as StorageProviderInfoSchema, ReadChunkInputSchema as StorageReadChunkInputSchema, TestLocationResultSchema as StorageTestLocationResultSchema, WriteChunkInputSchema as StorageWriteChunkInputSchema, StreamCodecSchema, StreamFormatSchema, StreamNetworkStatsSchema, StreamParamsOptionsSchema, StreamParamsStatusSchema, StreamProfileConfigSchema, StreamProfileOptionsSchema, StreamProfilePatchSchema, StreamProfileSchema, 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, 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_EGRESS_PROFILE, WELL_KNOWN_TABS, WELL_KNOWN_TAB_MAP, WaterHeaterStatusSchema, WeatherStatusSchema, WebrtcStreamChoiceSchema, WebrtcStreamTargetSchema, WhiteBalanceModeSchema, WidgetHostEnum, WidgetLoginMethodSchema, WidgetMetadataSchema, WidgetRemoteSchema, WidgetSizeEnum, 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, audioCodecCapability, audioIsFailClosed, audioKindId, audioLabelChoices, audioMetricsCapability, audioModeOf, audioOrDefaults, audioPlanFromEncodeProfile, authProviderCapability, autoAssignProfiles, automationControlCapability, backupCapability, bareAddonId, batteryCapability, bestLocationMatch, binaryCapability, bindAddonActions, brightnessCapability, brokerCapability, buildAddonRouteProvider, buildAudioArgs, buildEventKindDescriptor, buildFfmpegArgs, buildInputArgs, buildModelVariantGroups, buildNcTaxonomy, buildRoleScopes, buildStreamParamsConfigSchema, buildVideoArgs, buttonCapability, cameraCredentialsCapability, cameraPipelineConfigCapability, cameraStreamsCapability, canConvertUnit, canonicalEgressPlan, carbonMonoxideCapability, cellsToRects, classifyBearerPrincipal, classifyStream, classifyStreams, climateControlCapability, clusterModelSettingKey, clusterStepSettingFieldsFor, clusterStepSettingKey, collectHydratedFieldEntries, collectHydratedFieldValues, collectSecretConfigKeys, colorCapability, colorForKind, commitWatchdogRestart, compileExpression, compileExpressionSafe, composeSwitchedOff, conditionDepth, conditionExclusionReason, conditionVisibleForKind, connectionTestCapability, connectivityCapability, consumablesCapability, contactCapability, controlCapability, convertUnit, coreBlockAddonId, coreBlockIdFromAddonId, coreBlocksCapability, cosineSimilarity, countConditionLeaves, coverCapability, createDeviceProxy, createDurableState, createEvent, createEventBusSliceSource, createExpressionScope, createHwAccelCache, createLazyTrpcSource, createLogChannelsProvider, createMirrorSource, createRuntimeStateBridge, createSliceHandle, createSystemProxy, customAction, customModelRegistryCapability, dataStoreProviderCapability, dayNightCapability, declarationOwnerNodeId, declareLogChannel, decodeVectorBase64, decoderCapability, defaultDeliveryForSection, defaultDeviceFor, defineCustomActions, deriveBatteryPresence, deriveCameraSwitches, deriveDetailCropRect, deriveRecordingMode, describeModelVariant, detectAccessRole, detectionPipelineCapability, deviceAdoptionCapability, deviceBackendToFormat, deviceCustomAction, deviceDiscoveryCapability, deviceExportCapability, deviceManagerCapability, deviceMatchesProfile, deviceOpsCapability, deviceProviderCapability, deviceSelectorMatches, deviceStateCapability, deviceStatusCapability, doorbellCapability, droppedConditionsForKind, egressTranscodeSharingKey, egressTransportFromRequest, embeddingEncoderCapability, emitDownForOwnedCaps, emitReadiness, encodeProfileFromStreamShape, encodeVectorBase64, enumSensorCapability, enumerateInferenceDevices, enumerateItemArrayFields, enumerateSchemaFields, errMsg, evaluateAst, evaluateExpressionSource, evaluatePoolMemory, evaluateSensorEdge, evaluateZoneRules, event, eventEmitterCapability, eventsCapability, expandCapMethods, extractNestedAddonId, extractSourceInfoFromMetadata, faceGalleryCapability, failureContributionCapability, failureRate, fanControlCapability, featureProbeCapability, filesystemBrowseCapability, findTimezone, floodCapability, foldSnapshotByFunction, formatForBackend, formatForRuntime, gasCapability, generateAutomationBlock, getAudioMacroClassIds, getByPath, getCapsByProviderKind, getLogChannelRegistry, getTaxonomyEntry, hasMotionTrigger, hfModelUrl, htmlToText, humidifierCapability, humiditySensorCapability, hydrateSchema, imageCapability, imageSettingsCapability, inferModelProvider, initialPoolMemoryState, integrationsCapability, intercomCapability, invocationFromEncodeProfile, isAgentOnlyPlacement, isArrayOutputSchema, isAudioLabelSelected, isAudioRule, isBaseConditionKey, isBatteryPresenceFault, isClusterScopedStep, isCollectionArrayMethod, isDeployableToAgent, isDetectionMacroClass, isDeviceConfigCap, isDeviceScopedCap, isEvent, isFirstLevelMacroClass, isIsolatedBuiltin, isLocationEnabled, isNode, isObjectInput, isOccupancyRule, isRestoredCap, isSameAddonId, isScheduleActive, isSecretConfigField, isSoftwareDecode, isSourceCap, isSystemDelivery, isVoidInput, jobKindSchema, kebabToCamel, knownValues, lawnMowerControlCapability, lifecycleJobSchema, lifecycleJobScopeSchema, lifecycleJobStateSchema, lifecycleTaskSchema, llmCapability, llmRuntimeCapability, loadContributionCapability, localNetworkCapability, locationSimilarity, lockControlCapability, logBannerArgs, logChannelsCapability, logDestinationCapability, logLevelAtMost, loginMethodCapability, looseSchema, makeProfileBrokerId, makeSourceBrokerId, mapAudioLabelToMacro, markdownToHtmlLite, markdownToText, maskUrlCredentials, mediaPlayerCapability, mergeSourceInfo, meshNetworkCapability, method, methodAccessForHttpMethod, metricsProviderCapability, migrateLegacyDeviceSignalConfig, modelConvertCapability, modelDistributorCapability, modelFormatForRuntime, motionCapability, motionDetectionCapability, motionTriggerCapability, motionZonesCapability, mqttBrokerCapability, nativeObjectDetectionCapability, navigationCapability, networkAccessCapability, networkLinkCapability, networkQualityCapability, nodePin, nodesCapability, normalizeAddonInitResult, normalizeAudioLabel, normalizeTokenScopes, normalizeUnit, notificationOutputCapability, notificationRulesCapability, notifierCapability, numericSensorCapability, oauthIntegrationCapability, objectInputDeclaresAddonId, osdCapability, osdManagerCapability, overlayClusterStepSettings, parseCameraStreamConfig, parseExpression, parseJsonArray, parseJsonObject, parseJsonUnknown, parseProcStatus, parseProfileBrokerId, parseRuleSection, parseStreamParamsFormPatch, patchAudio, petFeederCapability, pickAccessoryControl, pickClusterStepModels, pickClusterStepSettings, pickDetailCropConvention, pickNativeLeaseOverride, pickPreferredRtspEntry, pickRestartCandidate, pickVideoEncoder, pickerForCondition, pipelineAnalyticsCapability, pipelineExecutorCapability, pipelineOrchestratorCapability, pipelineRunnerCapability, plateGalleryCapability, platformProbeCapability, poolMemoryThreshold, powerMeterCapability, prepareNotification, presenceCapability, pressureSensorCapability, principalMayReachAddon, privacyMaskCapability, procedureAuthKey, ptzAutotrackCapability, ptzCapability, pythonScriptForBackend, readClusterStepModels, readClusterStepSettings, readDetailCropConvention, readDeviceStateFrom, readNativeLeaseOverride, readNodePin, readTimelapseGeneratedAt, readinessKey, rebootCapability, recordingCapability, recordingExportCapability, recordingSignalCapability, rectsToCells, reducePoints, requiresPython, resetPoolBaseline, resolveAddonExecution, resolveAddonGroup, resolveAddonPlacement, resolveAddonRuntime, resolveBucketMs, resolveCapMount, resolveClusterStepModelId, resolveContainerPrimaryChild, resolveDetectionRuntime, resolveDeviceControlKind, resolveDeviceProfile, resolveEgressDecodeHwAccel, resolveFormat, resolveHydratedFieldValue, resolveMethodAuth, resolveModelFormat, resolveMutate, resolvePoolMemoryPolicy, resolveRecordingProfiles, resolveRunnerId, resolveVariantModelId, resolveViewableDeviceIds, roleSpec, ruleEditorSectionsForKind, ruleKindOf, ruleKindSpec, ruleMatchesSection, ruleSection, ruleSectionOf, ruleSeedForSection, runInferenceStep, runtimeDevices, runtimeStatePolicyFor, sceneMonitorCapability, schemaDeclaresAnyField, scopeInherits, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, scoreRuntimes, scriptRunnerCapability, selectAssignedProfileSlots, serverManagementCapability, setByPath, settingsStoreCapability, signalPercentFromBars, signalPercentFromRssi, sleep, sleepCancellable, sliceActiveValue, sliceChangedAt, smokeCapability, smtpProviderCapability, snapshotCapability, ssoBridgeCapability, startReachabilityPoll, stateVocabularyFor, storageCapability, storageEvictableCapability, storageMigrationCapability, storageProviderCapability, streamBrokerCapability, streamCatalogCapability, streamParamsCapability, streamPixels, streamQualityLabel, stripRetiredBandPreBufferSec, subKindsOf, summarisePrivacyAudio, summarizeEffectiveScope, supportedRuntimes, switchCapability, switchedOffIds, synthesizeSourceInfo, systemCapability, systemEventFilterApplies, systemEventFilterAppliesToAnyKind, tamperCapability, taskLogEntrySchema, taskPhaseSchema, taskTargetSchema, temperatureSensorCapability, terminalSessionCapability, textToHtml, toDeviceSummary, toExpressionValue, toNodeId, toStreamSourceEntry, toastCapability, toggleAudioLabel, tokenize, transcodeBody, tryConvertUnit, turnProviderCapability, unitDimension, unitsForDimension, updateCapability, userManagementCapability, userPasskeysCapability, vacuumControlCapability, validateExpressionSource, validateRecipeBounds, valveCapability, vectorDimFromBase64, vectorStoreCapability, vibrationCapability, videoclipsCapability, viewerUiCapability, waterHeaterCapability, weatherCapability, webrtcClientHintsSchema, webrtcSessionCapability, wiringAddonHealthSchema, wiringHealthSnapshotSchema, wiringNodeHealthSchema, wiringProbeKindSchema, wiringProbeResultSchema, zodEntriesToConfigUI, zoneAnalyticsCapability, zoneRulesCapability, zonesCapability };
|