@camstack/system 1.2.313 → 1.2.314

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.
Files changed (106) hide show
  1. package/dist/addon-runner.js +1 -1
  2. package/dist/addon-runner.mjs +1 -1
  3. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/dist/builtins/autotrack/index.js +1 -1
  10. package/dist/builtins/autotrack/index.mjs +1 -1
  11. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  12. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  13. package/dist/builtins/camera-grid/index.js +1 -1
  14. package/dist/builtins/camera-grid/index.mjs +1 -1
  15. package/dist/builtins/composer/claim-gate.d.ts +32 -0
  16. package/dist/builtins/composer/composed-device-set.d.ts +38 -0
  17. package/dist/builtins/composer/composed-device.d.ts +4 -3
  18. package/dist/builtins/composer/composer-grafts.d.ts +54 -0
  19. package/dist/builtins/composer/composer-plan.d.ts +89 -0
  20. package/dist/builtins/composer/composer-verdict.d.ts +19 -0
  21. package/dist/builtins/composer/composer.addon.js +2500 -422
  22. package/dist/builtins/composer/composer.addon.mjs +2493 -415
  23. package/dist/builtins/composer/composer.d.ts +66 -51
  24. package/dist/builtins/composer/composition-runtime.d.ts +84 -9
  25. package/dist/builtins/composer/confirmed-seed.d.ts +32 -0
  26. package/dist/builtins/composer/existing-target.d.ts +87 -0
  27. package/dist/builtins/composer/field-record.d.ts +41 -0
  28. package/dist/builtins/composer/graft-host.d.ts +47 -0
  29. package/dist/builtins/composer/held-claims.d.ts +12 -0
  30. package/dist/builtins/composer/owned-fields-target.d.ts +55 -0
  31. package/dist/builtins/composer/slice-assembler.d.ts +10 -0
  32. package/dist/builtins/composer/source-readings.d.ts +122 -0
  33. package/dist/builtins/composer/source-tracker.d.ts +35 -42
  34. package/dist/builtins/console-logging/index.js +1 -1
  35. package/dist/builtins/console-logging/index.mjs +1 -1
  36. package/dist/builtins/core-blocks/composition-api.d.ts +7 -4
  37. package/dist/builtins/core-blocks/composition-peers.d.ts +9 -0
  38. package/dist/builtins/core-blocks/composition-sources.d.ts +14 -3
  39. package/dist/builtins/core-blocks/core-block-store.d.ts +8 -1
  40. package/dist/builtins/core-blocks/core-blocks.addon.d.ts +4 -3
  41. package/dist/builtins/core-blocks/core-blocks.addon.js +326 -50
  42. package/dist/builtins/core-blocks/core-blocks.addon.mjs +326 -50
  43. package/dist/builtins/device-manager/claimed-status-overlay.d.ts +12 -0
  44. package/dist/builtins/device-manager/device-manager.addon.d.ts +16 -0
  45. package/dist/builtins/device-manager/device-manager.addon.js +1825 -317
  46. package/dist/builtins/device-manager/device-manager.addon.mjs +1825 -317
  47. package/dist/builtins/device-manager/device-provider-context.d.ts +24 -2
  48. package/dist/builtins/device-manager/device-row-store.d.ts +2 -0
  49. package/dist/builtins/device-manager/device-state-claim-views.d.ts +77 -0
  50. package/dist/builtins/device-manager/device-state-claims.d.ts +43 -0
  51. package/dist/builtins/device-manager/device-state-mirror.d.ts +145 -61
  52. package/dist/builtins/device-manager/field-claims-index.d.ts +69 -0
  53. package/dist/builtins/device-manager/field-ownership.d.ts +53 -0
  54. package/dist/builtins/device-manager/migrate-device.d.ts +27 -0
  55. package/dist/builtins/device-manager/migrate-guard.d.ts +7 -0
  56. package/dist/builtins/device-manager/migrate-hardware-state.d.ts +55 -0
  57. package/dist/builtins/device-manager/migration-refused.d.ts +23 -0
  58. package/dist/builtins/device-manager/mirror-row-writer.d.ts +138 -0
  59. package/dist/builtins/device-manager/runtime-state-persist-gate.d.ts +4 -0
  60. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -3
  61. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -3
  62. package/dist/builtins/hub-forwarder/index.js +1 -1
  63. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  64. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  65. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  66. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  67. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  68. package/dist/builtins/local-network/local-network.addon.js +1 -1
  69. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  70. package/dist/builtins/loki-logging/index.js +1 -1
  71. package/dist/builtins/loki-logging/index.mjs +1 -1
  72. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  73. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  74. package/dist/builtins/platform-probe/index.js +1 -1
  75. package/dist/builtins/platform-probe/index.mjs +1 -1
  76. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  77. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  78. package/dist/builtins/snapshot/index.js +1 -1
  79. package/dist/builtins/snapshot/index.mjs +1 -1
  80. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  81. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  82. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  83. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  84. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  85. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  86. package/dist/builtins/system-config/system-config.addon.js +1 -1
  87. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  88. package/dist/builtins/winston-logging/index.js +1 -1
  89. package/dist/builtins/winston-logging/index.mjs +1 -1
  90. package/dist/{child-cap-dispatch-CHTiHbsv.mjs → child-cap-dispatch-AAltfBUH.mjs} +1484 -1417
  91. package/dist/{child-cap-dispatch-Dyn_7ezH.js → child-cap-dispatch-DzcUd_ct.js} +1503 -1424
  92. package/dist/{dist-CkRwnhbo.js → dist-BtNkk3Qz.js} +4577 -3824
  93. package/dist/{dist-Cj7pJmXq.mjs → dist-cH4t1ZEm.mjs} +4541 -3824
  94. package/dist/index.js +137 -8
  95. package/dist/index.mjs +133 -8
  96. package/dist/kernel/capability-registry.d.ts +43 -1
  97. package/dist/kernel/index.d.ts +3 -1
  98. package/dist/kernel/moleculer/device-cap-proxy.d.ts +0 -10
  99. package/dist/kernel/status-overlay.d.ts +18 -0
  100. package/dist/kernel/transport/claimed-get-status.d.ts +15 -0
  101. package/dist/kernel/transport/index.d.ts +2 -0
  102. package/dist/kernel/transport/local-child-registry.d.ts +23 -0
  103. package/dist/kernel/transport/parent-unowned-call.d.ts +25 -0
  104. package/dist/{retired-settings-keys-CGSuXhP8.js → retired-settings-keys-B7imb-qH.js} +1 -1
  105. package/dist/{retired-settings-keys-C1duPikd.mjs → retired-settings-keys-DQYHfZ0S.mjs} +1 -1
  106. package/package.json +1 -1
@@ -1,4 +1,6 @@
1
1
  import { DeviceManagerSettings } from './device-meta-store.js';
2
+ import { OwnedCaps } from './field-ownership.js';
3
+ import { MigrationRefusedError } from './migration-refused.js';
2
4
  /** The narrow settings slice the swap needs — the seam the spec fakes. */
3
5
  export type HardwareStateStore = Pick<DeviceManagerSettings, 'readDeviceStore' | 'writeDeviceStore' | 'clearDeviceStore' | 'readDeviceRuntimeState' | 'writeDeviceRuntimeState'>;
4
6
  export interface SwappedHardwareState {
@@ -14,6 +16,59 @@ export interface SwappedHardwareState {
14
16
  readonly roleKeysKeptAtSource: readonly string[];
15
17
  readonly roleKeysKeptAtTarget: readonly string[];
16
18
  }
19
+ /** One claimed cap on a device that blocks its migration. */
20
+ export interface BlockingClaim {
21
+ readonly cap: string;
22
+ readonly owner: string;
23
+ readonly fields: readonly string[];
24
+ }
25
+ /** A device whose row carries claims, and what they are. */
26
+ export interface ClaimBlockedDevice {
27
+ readonly deviceId: number;
28
+ readonly claims: readonly BlockingClaim[];
29
+ }
30
+ /**
31
+ * The refusal of a migration over a device under customization. `blocked`
32
+ * carries the same facts as the message, per device, so the caller can log
33
+ * one line per device tagged with its id.
34
+ */
35
+ export declare class FieldClaimsBlockMigrationError extends Error {
36
+ readonly sourceId: number;
37
+ readonly targetId: number;
38
+ readonly blocked: readonly ClaimBlockedDevice[];
39
+ constructor(sourceId: number, targetId: number, blocked: readonly ClaimBlockedDevice[]);
40
+ }
41
+ /**
42
+ * A claim that landed while the migration was already running (D663 final
43
+ * review I-1). It passed the claim methods' migration gate just before the
44
+ * migration began, and its write-through had not reached the row when
45
+ * {@link assertNoFieldClaims} read it. Found after the drain, before any row
46
+ * moved — so it is a {@link MigrationRefusedError}: both cameras' switches are
47
+ * restored, and the claim stays on the number it names.
48
+ */
49
+ export declare class ClaimLandedDuringMigrationError extends MigrationRefusedError {
50
+ readonly sourceId: number;
51
+ readonly targetId: number;
52
+ readonly blocked: readonly ClaimBlockedDevice[];
53
+ constructor(sourceId: number, targetId: number, blocked: readonly ClaimBlockedDevice[]);
54
+ }
55
+ /**
56
+ * The second look, from MEMORY, once the mirror's writer is held and drained
57
+ * (I-1). A claim is in the mirror from the moment it is accepted, before its
58
+ * write-through lands, and the hold refuses any claim that reaches the mirror
59
+ * after it — so an empty answer here means no claim can land on either row
60
+ * until the swap is done.
61
+ */
62
+ export declare function assertNoClaimLandedDuringMigration(ownedCapsOf: (deviceId: number) => OwnedCaps, sourceId: number, targetId: number): void;
63
+ /**
64
+ * A claim names a NUMBER (`$owned` sits in `__device-state:<id>`); the block
65
+ * that owns it names a STABLE ID; `swapIds` moves the stable id to the other
66
+ * number. No swap of `$owned` keeps both keys right, so a device under
67
+ * customization is not migratable (D663). Read from the ROW — claims are
68
+ * written through, so the row is where one exists. A row that cannot be read
69
+ * THROWS: an unknown answer must refuse, never read as "no claim" (D49).
70
+ */
71
+ export declare function assertNoFieldClaims(settings: Pick<HardwareStateStore, 'readDeviceRuntimeState'>, sourceId: number, targetId: number): Promise<void>;
17
72
  /**
18
73
  * Swap the hardware-scoped halves of two devices' persisted state. Runs right
19
74
  * after `swapIds`, under the same meta write lock. THROWS on failure: a
@@ -0,0 +1,23 @@
1
+ /**
2
+ * A migration step that REFUSED with nothing moved.
3
+ *
4
+ * `migrateDevice` distinguishes two kinds of failure after the disable phase,
5
+ * and they must never be confused (D663 task 5b ruling I-1):
6
+ *
7
+ * - **refused, nothing moved** — a precheck of `swapIds` (a row missing, the
8
+ * temp id taken), the mirror drain that runs before the rows move, or a
9
+ * claim found in the mirror after that drain (it landed while the migration
10
+ * was starting). Both cameras are switched back to exactly what they were,
11
+ * because nothing about either device changed.
12
+ * - **failed while moving** — any other throw from `swapIds` (rows partially
13
+ * moved), or from `swapHardwareState` (rows swapped, state not). The two
14
+ * devices may wear each other's identity; switching them back on would run
15
+ * pipelines against crossed identities, so they stay off and the operator is
16
+ * told to intervene.
17
+ *
18
+ * Only a step that KNOWS it wrote nothing may throw this. An unknown error is
19
+ * read as "may have moved" — the safe reading.
20
+ */
21
+ export declare class MigrationRefusedError extends Error {
22
+ constructor(message: string, options?: ErrorOptions);
23
+ }
@@ -0,0 +1,138 @@
1
+ import { IScopedLogger } from '@camstack/types';
2
+ import { DeviceManagerSettings } from './device-meta-store.js';
3
+ import { MigrationRefusedError } from './migration-refused.js';
4
+ import { RuntimeStatePolicyLookup } from './runtime-state-persist-gate.js';
5
+ /** A device's row as it may reach disk: cap name → persistable slice (plus `$owned`). */
6
+ export type PersistableRow = Record<string, Record<string, unknown>>;
7
+ /**
8
+ * The drain before a migration could not vouch for a device's row. Nothing has
9
+ * moved yet, so it is a {@link MigrationRefusedError}: the migration refuses
10
+ * and restores both cameras' switches.
11
+ */
12
+ export declare class RuntimeStateDrainError extends MigrationRefusedError {
13
+ readonly deviceId: number;
14
+ constructor(deviceId: number, reason: string, options?: ErrorOptions);
15
+ }
16
+ /** A migration's hold on the debounced writer (`holdDiskWrites`). */
17
+ export interface MirrorWriteHold {
18
+ /** Let the writer back onto the rows; re-arms it so the row converges to memory. */
19
+ readonly release: () => void;
20
+ }
21
+ /** What the writer needs from the mirror that owns it. */
22
+ export interface MirrorRowWriterDeps {
23
+ readonly logger: IScopedLogger;
24
+ /** Per-cap durability + volatile-field policy (D4). */
25
+ readonly policyFor: RuntimeStatePolicyLookup;
26
+ /** The device's row as memory holds it NOW — taken when a write RUNS. */
27
+ readonly persistableFor: (deviceId: number) => PersistableRow;
28
+ }
29
+ export declare class MirrorRowWriter {
30
+ private readonly deps;
31
+ static readonly RUNTIME_STATE_DEBOUNCE_MS = 1000;
32
+ /**
33
+ * Per-device disk-write debouncer for runtime-state. `setCapSlice`
34
+ * updates the in-memory mirror synchronously and emits the change
35
+ * event immediately, but the disk write is coalesced.
36
+ */
37
+ private readonly runtimeStateDebounce;
38
+ /**
39
+ * Devices whose debounced writer is HELD off the row — a migration is
40
+ * swapping it (`holdDiskWrites`). A change while held stays in memory only.
41
+ */
42
+ private readonly writesHeld;
43
+ /** Held devices a durable change was scheduled for — what `release` re-arms. */
44
+ private readonly heldDirty;
45
+ /**
46
+ * What is believed to be ON DISK for each device — the persistable projection
47
+ * of the last blob actually written (or read at seed time). The
48
+ * effective-change gate compares against THIS, not against the previous
49
+ * mirror state: two clock-only ticks in a row must not add up to a write just
50
+ * because each was compared with its immediate predecessor.
51
+ */
52
+ private readonly lastPersisted;
53
+ /**
54
+ * Per-device count of writes the effective-change gate skipped since the last
55
+ * real one. Reported on the next write that DOES happen, so the log says how
56
+ * much churn the gate absorbed instead of saying nothing at all — a branch
57
+ * that drops work silently reads as "never happened".
58
+ */
59
+ private readonly skippedSinceWrite;
60
+ constructor(deps: MirrorRowWriterDeps);
61
+ /** What is believed to be on the device's row; undefined before any read or write. */
62
+ persisted(deviceId: number): PersistableRow | undefined;
63
+ /** Record what the row now holds — a write that landed, or a row just read. */
64
+ markPersisted(deviceId: number, row: PersistableRow): void;
65
+ /** A migration holds the writer off this device's row right now. */
66
+ isHeld(deviceId: number): boolean;
67
+ /**
68
+ * Chain a row write behind whatever is in flight for the device. Returns the
69
+ * write's own promise (it may reject, to its caller); the queue tail never
70
+ * rejects and clears itself once it is the last one out.
71
+ */
72
+ serialiseWrite<T>(deviceId: number, task: () => Promise<T>): Promise<T>;
73
+ private slotFor;
74
+ /** Arm the writer for a durable change, or remember it for `release` while a migration holds the device. */
75
+ armOrHold(deviceId: number, settings: DeviceManagerSettings): void;
76
+ /**
77
+ * Debounced disk writer, behind two gates.
78
+ *
79
+ * GATE — DURABILITY: a change to a `durability: 'session'` cap never even
80
+ * arms the timer. That is where the fleet's write rate goes: `audio-metrics`
81
+ * and `zone-analytics` are ~90 % of the offered 12–19 writes/s, they change
82
+ * genuinely every second, and their restored value is worthless.
83
+ *
84
+ * GATE — EFFECTIVE CHANGE (at flush): the persistable blob is compared with
85
+ * what is believed to be on disk, ignoring the clock fields each cap declared
86
+ * volatile. `battery` wrote its blob 526 times in 25 minutes without one
87
+ * percentage moving; this is the gate that turns those into one write.
88
+ *
89
+ * The blob is read from the live mirror at flush time, so the disk picture is
90
+ * always the latest state — no risk of writing a stale snapshot.
91
+ */
92
+ schedule(deviceId: number, settings: DeviceManagerSettings, changedCap: string): void;
93
+ /** Arm the debounce timer; at fire, queue a write of the live blob unless disk already has it. */
94
+ private armDiskWrite;
95
+ /** The debounced write itself: the blob as memory holds it NOW, behind the effective-change gate. Never rejects. */
96
+ private writeLiveBlob;
97
+ /**
98
+ * Hold the debounced writer off these devices' rows while a migration swaps
99
+ * them (D663 re-review N-6). Resolves once each device is DRAINED: a write
100
+ * still in its debounce window is written now (it is this hardware's latest
101
+ * state, and the swap then carries it to the right number), and a write
102
+ * already in flight has landed. Until `release`, nothing the writer does
103
+ * reaches these rows — a blob read before the swap and written after it would
104
+ * put the other box's state back under the number, and make it the baseline.
105
+ *
106
+ * Only what the writer already had pending is written — never memory
107
+ * wholesale, which for a row nobody read would overwrite it with a partial
108
+ * picture. `release` re-arms the writer for a device changed while held:
109
+ * after the migration's `replace` reseed memory equals the row and nothing
110
+ * is written; after a failed swap the row converges to memory.
111
+ *
112
+ * The migration must not proceed over a row that is not what memory says it
113
+ * is. So a drain write that FAILS, and equally a write that was in flight and
114
+ * FAILED (ruling I-2 — awaiting it is not the same as it landing), release
115
+ * the hold, log the device and reject with a {@link RuntimeStateDrainError};
116
+ * the owed write is re-armed on release.
117
+ *
118
+ * One hold per device at a time: `writesHeld` is a set, not a refcount, so a
119
+ * second overlapping hold would be released by the first. Safe because the
120
+ * only caller is `migrateDevice`, serialised by `migrationGuard` and the meta
121
+ * write lock; a new caller needs a refcount first.
122
+ */
123
+ holdDiskWrites(deviceIds: readonly number[], settings: DeviceManagerSettings): Promise<MirrorWriteHold>;
124
+ /** Cancel the timer, await the write in flight, then write (queued) what is not yet on disk. */
125
+ private drainDiskWrite;
126
+ /** A drain that cannot vouch for the row: still owed (re-armed on release), logged, refused. */
127
+ private refuseDrain;
128
+ /**
129
+ * True when `blob` differs from what is believed to be on disk only in fields
130
+ * the owning caps declared volatile. Counts the skip so the next real write
131
+ * can report how much churn was absorbed.
132
+ */
133
+ private isAlreadyPersisted;
134
+ /** Flush every pending debounced disk write (graceful shutdown). Clears the
135
+ * debounce slots after awaiting in-flight + scheduled writes so shutdown is
136
+ * lossless. */
137
+ flushPendingWrites(settings: DeviceManagerSettings | undefined): Promise<void>;
138
+ }
@@ -11,6 +11,10 @@ export type RuntimeStateBlob = Readonly<Record<string, Readonly<Record<string, u
11
11
  * direction is deliberate: the cost of losing a session value is a cold window
12
12
  * until the provider republishes; the cost of persisting an unasked-for one is
13
13
  * a commit per second on the fleet's busiest write path.
14
+ *
15
+ * `$owned` is not a cap: it is the device's claims record (D663) and is kept
16
+ * whatever the lookup says — a restart that forgot who owns a field would hand
17
+ * it back to the native provider.
14
18
  */
15
19
  export declare function persistableBlob(blob: RuntimeStateBlob, policyFor: RuntimeStatePolicyLookup): Record<string, Record<string, unknown>>;
16
20
  /**
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CkRwnhbo.js");
6
+ const require_dist = require("../../dist-BtNkk3Qz.js");
7
7
  const require_device_state_changed = require("../../device-state-changed-Bk7cvTnz.js");
8
8
  //#region src/builtins/doorbell/trigger-engine.ts
9
9
  /**
@@ -538,7 +538,6 @@ function createDoorbellExtensionProvider(deps) {
538
538
  const ids = (await deps.readSources(deviceId)).map((s) => s.deviceId);
539
539
  if (ids.length === 0) return {
540
540
  authority: DOORBELL_SOURCES_AUTHORITY,
541
- enabled: null,
542
541
  activation: null,
543
542
  value: {
544
543
  slot: "doorbell-source",
@@ -550,7 +549,6 @@ function createDoorbellExtensionProvider(deps) {
550
549
  const byId = new Map(devices.map((d) => [d.id, d]));
551
550
  return {
552
551
  authority: DOORBELL_SOURCES_AUTHORITY,
553
- enabled: null,
554
552
  activation,
555
553
  value: {
556
554
  slot: "doorbell-source",
@@ -1,4 +1,4 @@
1
- import { Ft as isSourceCap, Ln as DeviceType, Pt as isSameAddonId, St as evaluateSensorEdge, W as bareAddonId, Wn as createEvent, _t as doorbellCapability, dt as defineExtensionSlotProvider, ir as EventCategory, jn as BaseAddon, k as SOURCE_CAPS, kn as errMsg, pt as deviceExtensionCapability, st as createDeviceExtensionProvider } from "../../dist-Cj7pJmXq.mjs";
1
+ import { Bn as BaseAddon, K as bareAddonId, Nt as isSameAddonId, Pt as isSourceCap, Rn as DeviceType, Xn as createEvent, ft as deviceExtensionCapability, gt as doorbellCapability, j as SOURCE_CAPS, ot as createDeviceExtensionProvider, ur as EventCategory, ut as defineExtensionSlotProvider, xt as evaluateSensorEdge, zn as errMsg } from "../../dist-cH4t1ZEm.mjs";
2
2
  import { n as parseDeviceStateChanged } from "../../device-state-changed-DoBbkyEI.mjs";
3
3
  //#region src/builtins/doorbell/trigger-engine.ts
4
4
  /**
@@ -533,7 +533,6 @@ function createDoorbellExtensionProvider(deps) {
533
533
  const ids = (await deps.readSources(deviceId)).map((s) => s.deviceId);
534
534
  if (ids.length === 0) return {
535
535
  authority: DOORBELL_SOURCES_AUTHORITY,
536
- enabled: null,
537
536
  activation: null,
538
537
  value: {
539
538
  slot: "doorbell-source",
@@ -545,7 +544,6 @@ function createDoorbellExtensionProvider(deps) {
545
544
  const byId = new Map(devices.map((d) => [d.id, d]));
546
545
  return {
547
546
  authority: DOORBELL_SOURCES_AUTHORITY,
548
- enabled: null,
549
547
  activation,
550
548
  value: {
551
549
  slot: "doorbell-source",
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CkRwnhbo.js");
6
+ const require_dist = require("../../dist-BtNkk3Qz.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  //#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
9
9
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
@@ -1,4 +1,4 @@
1
- import { Ut as logDestinationCapability, jn as BaseAddon } from "../../dist-Cj7pJmXq.mjs";
1
+ import { Bn as BaseAddon, Ht as logDestinationCapability } from "../../dist-cH4t1ZEm.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  //#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
4
4
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-CkRwnhbo.js");
3
+ const require_dist = require("../../dist-BtNkk3Qz.js");
4
4
  //#region src/builtins/liveness-monitor/liveness-checks.ts
5
5
  var NO_DEVICES = "liveness:no-devices";
6
6
  var ALL_OFFLINE = "liveness:all-devices-offline";
@@ -1,4 +1,4 @@
1
- import { O as RecordingStatusSchema, T as RECORDING_SOURCE_CAMSTACK_ADDON, Wn as createEvent, ir as EventCategory, jn as BaseAddon, kn as errMsg } from "../../dist-Cj7pJmXq.mjs";
1
+ import { A as RecordingStatusSchema, Bn as BaseAddon, D as RECORDING_SOURCE_CAMSTACK_ADDON, Xn as createEvent, ur as EventCategory, zn as errMsg } from "../../dist-cH4t1ZEm.mjs";
2
2
  //#region src/builtins/liveness-monitor/liveness-checks.ts
3
3
  var NO_DEVICES = "liveness:no-devices";
4
4
  var ALL_OFFLINE = "liveness:all-devices-offline";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CkRwnhbo.js");
6
+ const require_dist = require("../../dist-BtNkk3Qz.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  node_crypto = require_chunk.__toESM(node_crypto);
9
9
  let crypto$1 = require("crypto");
@@ -1,5 +1,5 @@
1
1
  import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
2
- import { Cn as userManagementCapability, H as authProviderCapability, L as UserRecordSchema, M as ScopedTokenSchema, jn as BaseAddon, r as ApiKeyRecordSchema } from "../../dist-Cj7pJmXq.mjs";
2
+ import { Bn as BaseAddon, P as ScopedTokenSchema, Sn as userManagementCapability, W as authProviderCapability, r as ApiKeyRecordSchema, z as UserRecordSchema } from "../../dist-cH4t1ZEm.mjs";
3
3
  import * as crypto$2 from "node:crypto";
4
4
  import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
5
5
  import nodeCrypto from "crypto";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-CkRwnhbo.js");
3
+ const require_dist = require("../../dist-BtNkk3Qz.js");
4
4
  const require_tls = require("../../tls-D_wUeOTD.js");
5
5
  let node_fs_promises = require("node:fs/promises");
6
6
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Vt as localNetworkCapability, ir as EventCategory, jn as BaseAddon } from "../../dist-Cj7pJmXq.mjs";
1
+ import { Bn as BaseAddon, Bt as localNetworkCapability, ur as EventCategory } from "../../dist-cH4t1ZEm.mjs";
2
2
  import { S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, i as writeExtraSans, l as reissueTlsLeaf, n as readTlsAccessStatus, o as validateUploadedTls, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, y as applyLanHttp } from "../../tls-IM-v7JV4.mjs";
3
3
  import { mkdir, writeFile } from "node:fs/promises";
4
4
  import { join } from "node:path";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CkRwnhbo.js");
6
+ const require_dist = require("../../dist-BtNkk3Qz.js");
7
7
  //#region src/builtins/loki-logging/loki-payload.ts
8
8
  /**
9
9
  * Loki rejects a label name that is not a valid Prometheus label
@@ -1,4 +1,4 @@
1
- import { Ut as logDestinationCapability, jn as BaseAddon } from "../../dist-Cj7pJmXq.mjs";
1
+ import { Bn as BaseAddon, Ht as logDestinationCapability } from "../../dist-cH4t1ZEm.mjs";
2
2
  //#region src/builtins/loki-logging/loki-payload.ts
3
3
  /**
4
4
  * Loki rejects a label name that is not a valid Prometheus label
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CkRwnhbo.js");
6
+ const require_dist = require("../../dist-BtNkk3Qz.js");
7
7
  const require_proc_stat = require("../../proc-stat-DL-WUOhl.js");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { Dt as foldSnapshotByFunction, Jt as metricsProviderCapability, Wn as createEvent, an as reducePoints, ir as EventCategory, jn as BaseAddon, kn as errMsg, on as resolveBucketMs } from "../../dist-Cj7pJmXq.mjs";
1
+ import { Bn as BaseAddon, Et as foldSnapshotByFunction, Xn as createEvent, in as reducePoints, on as resolveBucketMs, qt as metricsProviderCapability, ur as EventCategory, zn as errMsg } from "../../dist-cH4t1ZEm.mjs";
2
2
  import { a as parseProcStat, i as nodeProcReader, n as elapsedSecSince, o as parseProcStatusRss, r as lifetimeCpuPercent, t as commandFromCmdline } from "../../proc-stat-CbC55Kqi.mjs";
3
3
  import { access, readFile, readdir } from "node:fs/promises";
4
4
  import * as fs from "node:fs";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CkRwnhbo.js");
6
+ const require_dist = require("../../dist-BtNkk3Qz.js");
7
7
  let node_fs = require("node:fs");
8
8
  node_fs = require_chunk.__toESM(node_fs);
9
9
  let node_child_process = require("node:child_process");
@@ -1,5 +1,5 @@
1
1
  import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
2
- import { Kn as emitReadiness, fn as scoreRuntimes, ir as EventCategory, jn as BaseAddon, kn as errMsg, nn as platformProbeCapability, vt as enumerateInferenceDevices } from "../../dist-Cj7pJmXq.mjs";
2
+ import { Bn as BaseAddon, Qn as emitReadiness, _t as enumerateInferenceDevices, fn as scoreRuntimes, tn as platformProbeCapability, ur as EventCategory, zn as errMsg } from "../../dist-cH4t1ZEm.mjs";
3
3
  import * as fs from "node:fs";
4
4
  import { execFile } from "node:child_process";
5
5
  import * as os from "node:os";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CkRwnhbo.js");
6
+ const require_dist = require("../../dist-BtNkk3Qz.js");
7
7
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
8
8
  /**
9
9
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -1,4 +1,4 @@
1
- import { ir as EventCategory, jn as BaseAddon } from "../../dist-Cj7pJmXq.mjs";
1
+ import { Bn as BaseAddon, ur as EventCategory } from "../../dist-cH4t1ZEm.mjs";
2
2
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
3
3
  /**
4
4
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CkRwnhbo.js");
6
+ const require_dist = require("../../dist-BtNkk3Qz.js");
7
7
  const require_snapshot_courtesy = require("../../snapshot-courtesy-Cqs7GkOV.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { Fn as DeviceFeature, G as batteryCapability, Ln as DeviceType, W as bareAddonId, Zn as nodePin, a as BatteryStatusSchema, ft as deriveBatteryPresence, hn as snapshotCapability, ir as EventCategory, jn as BaseAddon, kn as errMsg, xn as streamQualityLabel } from "../../dist-Cj7pJmXq.mjs";
1
+ import { Bn as BaseAddon, In as DeviceFeature, K as bareAddonId, Rn as DeviceType, a as BatteryStatusSchema, dt as deriveBatteryPresence, hn as snapshotCapability, q as batteryCapability, rr as nodePin, ur as EventCategory, xn as streamQualityLabel, zn as errMsg } from "../../dist-cH4t1ZEm.mjs";
2
2
  import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg } from "../../snapshot-courtesy-CZPvteq2.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CkRwnhbo.js");
6
+ const require_dist = require("../../dist-BtNkk3Qz.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Et as filesystemBrowseCapability, jn as BaseAddon, yn as storageProviderCapability } from "../../dist-Cj7pJmXq.mjs";
1
+ import { Bn as BaseAddon, Tt as filesystemBrowseCapability, yn as storageProviderCapability } from "../../dist-cH4t1ZEm.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
4
4
  import * as path$1 from "node:path";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CkRwnhbo.js");
6
+ const require_dist = require("../../dist-BtNkk3Qz.js");
7
7
  const require_hub_cap_forward = require("../../hub-cap-forward-DmHNjbB0.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { Ct as evictionPolicyOfLocation, E as REDACTED_SECRET, F as StorageLocationTypeSchema, I as StorageMigrationJobSchema, Kt as mayReadLocation, Mt as isLocationEnabled, N as StorageCleanupJobSchema, On as withLocationMode, P as StorageLocationModeSchema, Qn as parseJsonObject, Y as collectSecretConfigKeys, Yt as modeMayWrite, _n as storageMigrationCapability, b as LegacyStorageLocationDefaultSchema, gn as storageCapability, ir as EventCategory, jn as BaseAddon, kt as gbToBytes, pn as settingsStoreCapability, qt as mayWriteToLocation, sn as resolveLocationMode, zt as legacyModeOf } from "../../dist-Cj7pJmXq.mjs";
1
+ import { Bn as BaseAddon, Dn as withLocationMode, F as StorageCleanupJobSchema, Gt as mayReadLocation, I as StorageLocationModeSchema, Jt as modeMayWrite, Kt as mayWriteToLocation, L as StorageLocationTypeSchema, O as REDACTED_SECRET, Ot as gbToBytes, R as StorageMigrationJobSchema, Rt as legacyModeOf, S as LegacyStorageLocationDefaultSchema, St as evictionPolicyOfLocation, Z as collectSecretConfigKeys, _n as storageMigrationCapability, gn as storageCapability, ir as parseJsonObject, jt as isLocationEnabled, pn as settingsStoreCapability, sn as resolveLocationMode, ur as EventCategory } from "../../dist-cH4t1ZEm.mjs";
2
2
  import { t as HUB_CAP_FWD_ACTION } from "../../hub-cap-forward-BdT320dq.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CkRwnhbo.js");
6
+ const require_dist = require("../../dist-BtNkk3Qz.js");
7
7
  //#region src/builtins/system-config/system-config.addon.ts
8
8
  /**
9
9
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -1,4 +1,4 @@
1
- import { Jn as hydrateSchema, jn as BaseAddon, kn as errMsg } from "../../dist-Cj7pJmXq.mjs";
1
+ import { Bn as BaseAddon, er as hydrateSchema, zn as errMsg } from "../../dist-cH4t1ZEm.mjs";
2
2
  //#region src/builtins/system-config/system-config.addon.ts
3
3
  /**
4
4
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CkRwnhbo.js");
6
+ const require_dist = require("../../dist-BtNkk3Qz.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  let node_path = require("node:path");
9
9
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { Ut as logDestinationCapability, jn as BaseAddon } from "../../dist-Cj7pJmXq.mjs";
1
+ import { Bn as BaseAddon, Ht as logDestinationCapability } from "../../dist-cH4t1ZEm.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  import * as path$1 from "node:path";
4
4
  import path from "node:path";