@camstack/addon-provider-reolink 1.2.165 → 1.2.166

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 (3) hide show
  1. package/dist/addon.js +707 -320
  2. package/dist/addon.mjs +707 -320
  3. package/package.json +3 -2
package/dist/addon.mjs CHANGED
@@ -5396,7 +5396,7 @@ var ZodIssueCode = {
5396
5396
  var ZodFirstPartyTypeKind;
5397
5397
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5398
5398
  //#endregion
5399
- //#region ../types/dist/sleep-C-v96WpE.mjs
5399
+ //#region ../types/dist/sleep-gU6hqv4_.mjs
5400
5400
  /**
5401
5401
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5402
5402
  * window to float samples (D455).
@@ -9033,6 +9033,82 @@ var ArchivedDebugNoteQueryInputSchema = object({
9033
9033
  /** Max rows returned, newest-first. */
9034
9034
  limit: number().int().min(1).max(1e3).optional()
9035
9035
  });
9036
+ var TrackRelationKindSchema = _enum(["same-subject", "different-subjects"]);
9037
+ var TrackSideSchema = _enum(["before", "after"]);
9038
+ var TrackPurityValueSchema = _enum(["mixed", "not-a-subject"]);
9039
+ var TrackRelationSchema = object({
9040
+ id: string(),
9041
+ deviceId: number().int(),
9042
+ leftTrackId: string(),
9043
+ rightTrackId: string(),
9044
+ leftSide: TrackSideSchema.nullable(),
9045
+ rightSide: TrackSideSchema.nullable(),
9046
+ relation: TrackRelationKindSchema,
9047
+ presence: literal("continuous").nullable(),
9048
+ leftStartedAt: number().int().nullable(),
9049
+ rightStartedAt: number().int().nullable(),
9050
+ createdAt: number().int(),
9051
+ updatedAt: number().int(),
9052
+ author: string().nullable()
9053
+ });
9054
+ var TrackPuritySchema = object({
9055
+ id: string(),
9056
+ deviceId: number().int(),
9057
+ sourceTrackId: string(),
9058
+ purity: TrackPurityValueSchema,
9059
+ switchAtMs: number().int().nullable(),
9060
+ startedAt: number().int().nullable(),
9061
+ createdAt: number().int(),
9062
+ updatedAt: number().int(),
9063
+ author: string().nullable()
9064
+ });
9065
+ var SetTrackRelationInputSchema = object({
9066
+ deviceId: number().int(),
9067
+ trackId: string().min(1),
9068
+ otherTrackId: string().min(1),
9069
+ relation: TrackRelationKindSchema,
9070
+ presence: literal("continuous").optional(),
9071
+ trackSide: TrackSideSchema.optional(),
9072
+ otherSide: TrackSideSchema.optional()
9073
+ });
9074
+ var ClearTrackRelationInputSchema = object({
9075
+ deviceId: number().int(),
9076
+ trackId: string().min(1),
9077
+ otherTrackId: string().min(1)
9078
+ });
9079
+ var ClearTrackRelationResultSchema = object({ cleared: boolean() });
9080
+ var SetTrackPurityInputSchema = object({
9081
+ deviceId: number().int(),
9082
+ trackId: string().min(1),
9083
+ purity: _enum([
9084
+ "pure",
9085
+ "mixed",
9086
+ "not-a-subject"
9087
+ ]),
9088
+ switchAtMs: number().int().optional()
9089
+ });
9090
+ /** `null` when `pure` cleared the row. */
9091
+ var SetTrackPurityResultSchema = object({ purity: TrackPuritySchema.nullable() });
9092
+ var ListTrackRelationsInputSchema = object({
9093
+ deviceId: number().int(),
9094
+ trackId: string().optional(),
9095
+ since: number().int().optional(),
9096
+ until: number().int().optional(),
9097
+ limit: number().int().min(1).max(5e3).optional()
9098
+ });
9099
+ var ListTrackRelationsResultSchema = object({
9100
+ relations: array(TrackRelationSchema).readonly(),
9101
+ purities: array(TrackPuritySchema).readonly(),
9102
+ truncated: boolean()
9103
+ });
9104
+ _enum([
9105
+ "unknown-track",
9106
+ "cross-device",
9107
+ "self-relation",
9108
+ "contradiction",
9109
+ "switch-outside-track",
9110
+ "switch-needs-mixed"
9111
+ ]);
9036
9112
  /**
9037
9113
  * Ops-log — the durable, append-only operations audit shared by the
9038
9114
  * recordings and events management surfaces.
@@ -12118,6 +12194,68 @@ method(object({
12118
12194
  password: string()
12119
12195
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
12120
12196
  /**
12197
+ * How long one snapshot may take end to end: the pinned copy of the whole
12198
+ * database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
12199
+ * disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
12200
+ * generous because a timeout fails the whole backup run.
12201
+ */
12202
+ var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
12203
+ /**
12204
+ * The databases an owner snapshots — declared by the OWNER, so a caller never
12205
+ * guesses which file is live from what sits beside it (a cleanly closed
12206
+ * database has no sidecars and is just as owned). Paths are absolute on the
12207
+ * owner's host.
12208
+ */
12209
+ var DatabaseSnapshotTargetsSchema = object({ databases: array(object({ livePath: string() })) });
12210
+ /** One b-tree table of the snapshot and the rows it holds. */
12211
+ var DatabaseSnapshotTableSchema = object({
12212
+ name: string(),
12213
+ rows: number().int().nonnegative()
12214
+ });
12215
+ /**
12216
+ * What the owner wrote. Every path is ABSOLUTE on the owner's host — the
12217
+ * caller pins the call to its own node, so it can read the file; a caller
12218
+ * that finds the path outside its own data root refuses it rather than
12219
+ * archiving something it cannot place.
12220
+ */
12221
+ var DatabaseSnapshotResultSchema = object({
12222
+ /** The live database the snapshot copies. Never to be copied as a file. */
12223
+ livePath: string(),
12224
+ /** The verified copy: `<livePath>` + {@link DATABASE_SNAPSHOT_SUFFIX}. */
12225
+ snapshotPath: string(),
12226
+ sizeBytes: number().int().nonnegative(),
12227
+ pageCount: number().int().nonnegative(),
12228
+ pageSize: number().int().positive(),
12229
+ /**
12230
+ * Every b-tree table with its row count. Read inside the SAME read
12231
+ * transaction the copy was taken from, and found EQUAL on the copy — so
12232
+ * this is the content of the snapshot, not an estimate of the source.
12233
+ */
12234
+ tables: array(DatabaseSnapshotTableSchema),
12235
+ /** Wall time of the pinned copy (row counts included). */
12236
+ copyMs: number().nonnegative(),
12237
+ /** Wall time of the checks on the copy (`integrity_check`, row counts). */
12238
+ verifyMs: number().nonnegative(),
12239
+ /** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
12240
+ takenAt: number()
12241
+ });
12242
+ /**
12243
+ * A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
12244
+ * the same facts, with both paths relative to the archive root (the node's
12245
+ * data dir), because an archive outlives the host that made it.
12246
+ */
12247
+ var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
12248
+ /** Archive-relative path of the live database the archive does NOT carry. */
12249
+ livePath: string(),
12250
+ /** Archive-relative path of the verified copy it carries in its place. */
12251
+ snapshotPath: string()
12252
+ });
12253
+ method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(object({}), DatabaseSnapshotResultSchema, {
12254
+ kind: "mutation",
12255
+ auth: "admin",
12256
+ timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
12257
+ });
12258
+ /**
12121
12259
  * Orchestrator-side destination metadata. The orchestrator computes
12122
12260
  * `id = <addonId>:<subId>` from its provider lookup so consumers
12123
12261
  * (admin UI, restore flow) see one canonical key.
@@ -12228,7 +12366,12 @@ var ArchiveManifestSchema = object({
12228
12366
  locations: array(string()),
12229
12367
  entries: array(ArchiveEntrySchema),
12230
12368
  totalBytes: number(),
12231
- totalFiles: number()
12369
+ totalFiles: number(),
12370
+ /**
12371
+ * Live SQLite databases this archive carries as their OWNER's verified
12372
+ * snapshot instead of as files (D693). Absent on archives made before.
12373
+ */
12374
+ sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional()
12232
12375
  });
12233
12376
  var LocationStatSchema = object({
12234
12377
  name: string(),
@@ -13754,6 +13897,116 @@ var CompositionBlockStateSchema = object({
13754
13897
  reason: string().optional(),
13755
13898
  fields: array(CompositionFieldStateSchema)
13756
13899
  });
13900
+ var ComposerBlockSchema = object({
13901
+ id: string().min(1),
13902
+ name: string().min(1).max(120),
13903
+ enabled: boolean(),
13904
+ updatedAt: number(),
13905
+ composition: CompositionSchema
13906
+ });
13907
+ /**
13908
+ * A stored composition row that no longer PARSES — a schema a release
13909
+ * tightened, a row written by a newer build. Sent by id so the composer keeps
13910
+ * its device as a placeholder and reports the block `failed` naming the parse
13911
+ * error. Leaving it out would read, twice, exactly like a delete (D49).
13912
+ */
13913
+ var ComposerUnreadableBlockSchema = object({
13914
+ id: string().min(1),
13915
+ /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
13916
+ name: string().nullable(),
13917
+ /** The parse error, in the operator's words. */
13918
+ error: string()
13919
+ });
13920
+ method(object({
13921
+ /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
13922
+ integrationId: string().nullable(),
13923
+ /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
13924
+ storeLoaded: boolean(),
13925
+ blocks: array(ComposerBlockSchema),
13926
+ /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
13927
+ restartBlockIds: array(string()),
13928
+ /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
13929
+ unreadableBlocks: array(ComposerUnreadableBlockSchema)
13930
+ }), object({
13931
+ blocks: array(object({
13932
+ blockId: string(),
13933
+ status: CompositionRunStatusSchema,
13934
+ reason: string().optional()
13935
+ })),
13936
+ /**
13937
+ * False when the composer declared and withdrew NOTHING (store not loaded,
13938
+ * integration unknown, its own rows unread or read empty once). An empty
13939
+ * apply the caller owes is paid off only by one the composer acted on (D49).
13940
+ */
13941
+ acted: boolean()
13942
+ }), {
13943
+ kind: "mutation",
13944
+ auth: "admin"
13945
+ }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
13946
+ var NUMBER = {
13947
+ kind: "fixed",
13948
+ result: ["number"]
13949
+ };
13950
+ var BOOLEAN = {
13951
+ kind: "fixed",
13952
+ result: ["boolean"]
13953
+ };
13954
+ Object.freeze({
13955
+ min: NUMBER,
13956
+ max: NUMBER,
13957
+ abs: NUMBER,
13958
+ floor: NUMBER,
13959
+ ceil: NUMBER,
13960
+ sqrt: NUMBER,
13961
+ round: NUMBER,
13962
+ pow: NUMBER,
13963
+ clamp: NUMBER,
13964
+ avg: NUMBER,
13965
+ sum: NUMBER,
13966
+ age: NUMBER,
13967
+ convert: NUMBER,
13968
+ coalesce: { kind: "coalesce" },
13969
+ any: BOOLEAN,
13970
+ all: BOOLEAN,
13971
+ within: BOOLEAN,
13972
+ latest: {
13973
+ kind: "fixed",
13974
+ result: ["number", "null"]
13975
+ },
13976
+ number: {
13977
+ kind: "fixed",
13978
+ result: ["number", "null"]
13979
+ },
13980
+ rose: {
13981
+ kind: "fixed",
13982
+ result: ["number", "null"]
13983
+ },
13984
+ count: NUMBER
13985
+ });
13986
+ `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
13987
+ /**
13988
+ * What a composition may BUILD on a device type (G2, D676): the caps a new
13989
+ * device of that type, or an existing one that lacks them, can be given. The
13990
+ * blockers are the validator's own refusal codes, and a spec compares this
13991
+ * listing with `planComposition` for every capability — the editor can never
13992
+ * offer a feature the save would refuse for the same reason.
13993
+ */
13994
+ var ComposableFieldSchema = object({
13995
+ path: string(),
13996
+ kind: CompositionFieldKindSchema,
13997
+ nullable: boolean(),
13998
+ required: boolean(),
13999
+ enumValues: array(string()).optional()
14000
+ });
14001
+ var ComposableCapabilitiesSchema = object({ caps: array(object({
14002
+ cap: string(),
14003
+ fields: array(ComposableFieldSchema),
14004
+ /** Present for an item-array cap (`consumables.items`). */
14005
+ itemArray: object({
14006
+ path: string(),
14007
+ keyField: string()
14008
+ }).optional()
14009
+ })) });
13757
14010
  /** Where a block runs. The operator chooses — a block driving a device on an
13758
14011
  * agent is the reason placement is not fixed to the hub. */
13759
14012
  var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
@@ -13918,7 +14171,7 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
13918
14171
  }), method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }), method(object({}), CompositionListReadSchema, { auth: "admin" }), method(object({
13919
14172
  addonId: string().min(1),
13920
14173
  stableId: string().min(1)
13921
- }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({
14174
+ }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({ deviceType: _enum(DeviceType) }), ComposableCapabilitiesSchema, { auth: "admin" }), method(object({
13922
14175
  composition: CompositionSchema,
13923
14176
  blockId: string().optional()
13924
14177
  }), CompositionValidationSchema, {
@@ -13926,52 +14179,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
13926
14179
  auth: "admin",
13927
14180
  access: "view"
13928
14181
  });
13929
- var ComposerBlockSchema = object({
13930
- id: string().min(1),
13931
- name: string().min(1).max(120),
13932
- enabled: boolean(),
13933
- updatedAt: number(),
13934
- composition: CompositionSchema
13935
- });
13936
- /**
13937
- * A stored composition row that no longer PARSES — a schema a release
13938
- * tightened, a row written by a newer build. Sent by id so the composer keeps
13939
- * its device as a placeholder and reports the block `failed` naming the parse
13940
- * error. Leaving it out would read, twice, exactly like a delete (D49).
13941
- */
13942
- var ComposerUnreadableBlockSchema = object({
13943
- id: string().min(1),
13944
- /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
13945
- name: string().nullable(),
13946
- /** The parse error, in the operator's words. */
13947
- error: string()
13948
- });
13949
- method(object({
13950
- /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
13951
- integrationId: string().nullable(),
13952
- /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
13953
- storeLoaded: boolean(),
13954
- blocks: array(ComposerBlockSchema),
13955
- /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
13956
- restartBlockIds: array(string()),
13957
- /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
13958
- unreadableBlocks: array(ComposerUnreadableBlockSchema)
13959
- }), object({
13960
- blocks: array(object({
13961
- blockId: string(),
13962
- status: CompositionRunStatusSchema,
13963
- reason: string().optional()
13964
- })),
13965
- /**
13966
- * False when the composer declared and withdrew NOTHING (store not loaded,
13967
- * integration unknown, its own rows unread or read empty once). An empty
13968
- * apply the caller owes is paid off only by one the composer acted on (D49).
13969
- */
13970
- acted: boolean()
13971
- }), {
13972
- kind: "mutation",
13973
- auth: "admin"
13974
- }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
13975
14182
  /**
13976
14183
  * `custom-model-registry` — collection cap exposing operator-registered
13977
14184
  * custom detection models. Each provider (today: `addon-model-studio`)
@@ -16122,6 +16329,219 @@ method(object({
16122
16329
  caps: array(string()).readonly().optional()
16123
16330
  }), record(string(), record(string(), unknown().nullable())));
16124
16331
  /**
16332
+ * Doorbell button cap. Two kinds of providers coexist behind this cap
16333
+ * name (same pattern as `snapshot`):
16334
+ *
16335
+ * - **Native** providers: registered per-device by device-driver
16336
+ * addons via `ctx.registerNativeCap` — either on a
16337
+ * `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
16338
+ * or directly on the camera (Reolink registers at camera level).
16339
+ * Emits an `onPressed` event every time the firmware pushes a
16340
+ * ring; status tracks the last press and a pressCount since start
16341
+ * (diagnostic).
16342
+ *
16343
+ * - **Wrapper** provider: the `virtual-doorbell` system builtin
16344
+ * (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
16345
+ * device (contact / switch / event-emitter …) into a doorbell for
16346
+ * a camera. `defaultActive: false` — the operator explicitly binds
16347
+ * it per camera in the device-bindings UI, then picks the source
16348
+ * device + trigger in the per-device settings.
16349
+ *
16350
+ * The DeviceEventPropagator re-emits `onPressed` on the camera parent
16351
+ * — subscribers listening at the camera level receive ring events
16352
+ * with `via[]` populated. No code on the parent needed.
16353
+ */
16354
+ var DoorbellStatusSchema = object({
16355
+ /** Ms epoch of the last press. null = never observed since this provider started. */
16356
+ lastPressedAt: number().nullable(),
16357
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
16358
+ pressCountSinceStart: number()
16359
+ });
16360
+ var DoorbellPressEventSchema = object({
16361
+ deviceId: number(),
16362
+ timestamp: number()
16363
+ });
16364
+ /**
16365
+ * The `doorbell-source` extension slot's editable value (D648): the camera's
16366
+ * virtual-doorbell trigger devices, exactly what the wrapper's
16367
+ * `doorbellSources` persists (as `{ deviceId }` records).
16368
+ */
16369
+ var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
16370
+ /**
16371
+ * The `doorbell-source` slot — which devices ring this camera's VIRTUAL
16372
+ * doorbell, owned by the `virtual-doorbell` wrapper over its
16373
+ * `doorbellSources` store (D648). A source rings when one of its
16374
+ * `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
16375
+ * different authority (`deviceManager.setWrapperActive`, D62) — the slot
16376
+ * reports it, it never writes it.
16377
+ */
16378
+ var DOORBELL_SOURCE_SLOT = {
16379
+ id: "doorbell-source",
16380
+ label: "Doorbell trigger devices",
16381
+ description: "Any of these becoming active rings this camera's virtual doorbell: a binary sensor when it goes active, a switch when it turns on.",
16382
+ shape: "association",
16383
+ hostDeviceTypes: [DeviceType.Camera],
16384
+ sourceCaps: SOURCE_CAPS,
16385
+ cardinality: "many",
16386
+ value: DoorbellSourceSlotValueSchema
16387
+ };
16388
+ var doorbellCapability = {
16389
+ name: "doorbell",
16390
+ scope: "device",
16391
+ deviceNative: true,
16392
+ mode: "singleton",
16393
+ kind: "wrapper",
16394
+ defaultActive: false,
16395
+ deviceTypes: [DeviceType.Button, DeviceType.Camera],
16396
+ extensionSlots: [DOORBELL_SOURCE_SLOT],
16397
+ methods: {},
16398
+ events: {
16399
+ /**
16400
+ * Fires once per physical press. Reolink delivers via Baichuan
16401
+ * push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
16402
+ * release/duration — it's a pulse.
16403
+ */
16404
+ onPressed: {
16405
+ data: DoorbellPressEventSchema,
16406
+ fromState: {
16407
+ field: "lastPressedAt",
16408
+ on: "advance"
16409
+ }
16410
+ } },
16411
+ status: {
16412
+ schema: DoorbellStatusSchema,
16413
+ kind: "push"
16414
+ },
16415
+ /**
16416
+ * Runtime-state slice — last press timestamp + lifetime press count.
16417
+ * Mirrored by the kernel and readable via
16418
+ * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
16419
+ * without subscribing.
16420
+ */
16421
+ runtimeState: DoorbellStatusSchema,
16422
+ /**
16423
+ * Runtime-state durability: **restored** — a monotonic accumulator: the slice IS the record. `lastPressedAt` is content here, not a clock, so it is deliberately NOT volatile.
16424
+ *
16425
+ * See `RuntimeStateDurability`. Enforced by
16426
+ * `scripts/check-runtime-state-durability.ts`.
16427
+ */
16428
+ durability: "restored"
16429
+ };
16430
+ var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
16431
+ DeviceType.Camera, DeviceType.Camera;
16432
+ /** A slot's editable value, discriminated on `slot`. */
16433
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
16434
+ DeviceType.Camera;
16435
+ var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
16436
+ state: literal("unreachable"),
16437
+ reason: string()
16438
+ })]);
16439
+ /** One provider of slots — the D554 source-listing row. */
16440
+ var ExtensionSourceSchema = object({
16441
+ /** The routing prefix of every `slotRef` this provider serves. */
16442
+ source: string(),
16443
+ label: string(),
16444
+ /** Stamped by the dispatcher from the registry (D557). */
16445
+ addonId: string().optional(),
16446
+ availability: ExtensionSourceAvailabilitySchema
16447
+ });
16448
+ /**
16449
+ * How one picked source stands. `missing` — no such device (deleted, or an id
16450
+ * that never existed); `foreign` — a device the slot's owner cannot read from
16451
+ * (a source owned by another addon); `unavailable` — it exists but is not a
16452
+ * valid source now (a container, which is never a pick). A source in any of
16453
+ * these states is SHOWN, never silently dropped or re-pointed.
16454
+ */
16455
+ var ExtensionSourceHealthSchema = _enum([
16456
+ "ok",
16457
+ "missing",
16458
+ "foreign",
16459
+ "unavailable"
16460
+ ]);
16461
+ var ExtensionSlotSourceSchema = object({
16462
+ deviceId: number().int(),
16463
+ /** The device's name, or null when it could not be resolved (`missing`). */
16464
+ name: string().nullable(),
16465
+ health: ExtensionSourceHealthSchema,
16466
+ detail: string().optional()
16467
+ });
16468
+ /**
16469
+ * A DIFFERENT authority that gates whether the slot's sources do anything —
16470
+ * reported read-only, named, never written through this contract (D62). The
16471
+ * virtual doorbell's sources ring only while the wrapper is bound to the
16472
+ * camera, and that binding belongs to `deviceManager.setWrapperActive`.
16473
+ * `unknown` means the gate could not be read; it is not "inactive" (D315).
16474
+ */
16475
+ var ExtensionSlotActivationSchema = object({
16476
+ state: _enum([
16477
+ "active",
16478
+ "inactive",
16479
+ "unknown"
16480
+ ]),
16481
+ authority: string(),
16482
+ detail: string().optional()
16483
+ });
16484
+ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
16485
+ state: literal("ok"),
16486
+ /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
16487
+ slotRef: string(),
16488
+ slot: ExtensionSlotIdSchema,
16489
+ /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
16490
+ authority: string(),
16491
+ activation: ExtensionSlotActivationSchema.nullable(),
16492
+ value: ExtensionSlotValueSchema,
16493
+ sources: array(ExtensionSlotSourceSchema),
16494
+ /**
16495
+ * Devices the owner links to the host ON ITS OWN, by structure, and that
16496
+ * are therefore not in `value` (D655): a camera's device-tree children, and
16497
+ * the child a picked container stands for (D356 — a container is never a
16498
+ * pick, its children are). Read-only; the editor shows them and may offer
16499
+ * per-device options on them (the linked-devices tracked-event opt-in).
16500
+ * Absent when the owner links nothing beyond the picks, and from an owner
16501
+ * older than D655.
16502
+ */
16503
+ impliedSources: array(ExtensionSlotSourceSchema).optional()
16504
+ }), object({
16505
+ state: literal("unreachable"),
16506
+ addonId: string(),
16507
+ reason: string()
16508
+ })]);
16509
+ var ExtensionCandidatesSchema = object({ candidates: array(object({
16510
+ deviceId: number().int(),
16511
+ name: string(),
16512
+ type: string(),
16513
+ location: string().nullable(),
16514
+ /** The container a child belongs to — "Spotlight 2" alone does not say which. */
16515
+ parentName: string().nullable(),
16516
+ /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
16517
+ suggested: boolean(),
16518
+ /** Why it is suggested ("same location"), null when it is not. */
16519
+ reason: string().nullable()
16520
+ })) });
16521
+ /**
16522
+ * What a write did. `none` — applied in place. `host` / `parent` — the owner
16523
+ * reloaded the host (or, for an accessory child, its parent) because the
16524
+ * write changed what the host REGISTERS. A slot never adds a capability to its
16525
+ * host — that is a composition (D663) — so today's owners answer `none`.
16526
+ */
16527
+ var ExtensionSetResultSchema = object({
16528
+ applied: literal(true),
16529
+ reload: _enum([
16530
+ "none",
16531
+ "host",
16532
+ "parent"
16533
+ ])
16534
+ });
16535
+ var ExtensionSlotRefInputSchema = object({
16536
+ deviceId: number().int(),
16537
+ slotRef: string().min(1)
16538
+ });
16539
+ var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
16540
+ method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
16541
+ kind: "mutation",
16542
+ auth: "admin"
16543
+ });
16544
+ /**
16125
16545
  * Per-field ownership (D663). A composition may CLAIM fields of a native
16126
16546
  * cap's runtime-state slice on an existing device: `replace` overlays the
16127
16547
  * claimed fields on the native slice, `add` builds a slice the device does
@@ -19171,17 +19591,25 @@ var NcScheduleSchema = object({
19171
19591
  */
19172
19592
  var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
19173
19593
  /**
19594
+ * How a summary window is SENT (D698): `rule` (absent) = ONE notification with
19595
+ * every section; `section` = one notification per section with something to
19596
+ * say (an unavailable section included), each titled by its section.
19597
+ */
19598
+ var NcStateSummarySplitSchema = _enum(["rule", "section"]);
19599
+ /**
19174
19600
  * `summary`: the rule sends NOTHING per event. When a window of `schedule`
19175
19601
  * CLOSES, it sends one notification with the current state of its kinds
19176
19602
  * (low batteries, consumables to replace, devices offline, updates
19177
- * available, ...), after its own filters. Nothing to report sends nothing.
19603
+ * available, ...), after its own filters — or, with `split: 'section'`
19604
+ * (D698), one notification per section. Nothing to report sends nothing.
19178
19605
  * The schedule is the ordinary `NcSchedule` (weekly windows, IANA timezone,
19179
19606
  * midnight crossing); the send time is each window's END. Refused on the
19180
19607
  * `alarm` family, which stays instant (`systemEventDeliveryProblems`).
19181
19608
  */
19182
19609
  var NcSystemEventDeliverySchema = discriminatedUnion("mode", [object({ mode: literal("instant") }), object({
19183
19610
  mode: literal("summary"),
19184
- schedule: NcScheduleSchema
19611
+ schedule: NcScheduleSchema,
19612
+ split: NcStateSummarySplitSchema.optional()
19185
19613
  })]);
19186
19614
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
19187
19615
  var NcPlateMatcherSchema = object({
@@ -19321,8 +19749,14 @@ var NcSensorTransitionSchema = _enum(["raised", "cleared"]);
19321
19749
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
19322
19750
  var NcZoneConditionSchema = object({
19323
19751
  ids: array(string().min(1)).min(1),
19324
- /** Quantifier over `ids` — at least one / every one visited. */
19325
- match: _enum(["any", "all"]).default("any")
19752
+ /**
19753
+ * LEGACY quantifier over `ids`. Absent = `any` (at least one visited), which
19754
+ * is what both editors mean and all they write since D690: "all of" was
19755
+ * removed from the editors because on an immediate rule it asked one
19756
+ * detection to stand in every zone at once. Still ACCEPTED, and `all` still
19757
+ * evaluated, so a stored rule keeps parsing and meaning what it meant.
19758
+ */
19759
+ match: _enum(["any", "all"]).optional()
19326
19760
  });
19327
19761
  /**
19328
19762
  * The P1 condition set — a flat AND of groups; absent group = pass;
@@ -19826,10 +20260,12 @@ var NcMediaPolicySchema = object({
19826
20260
  /**
19827
20261
  * Cooldown GRANULARITY over the subject's class — how much a fired
19828
20262
  * notification suppresses.
19829
- * - `shared` (default, and the absent value) — one window for the whole
19830
- * rule/scope: a cat silences the next dog for `cooldownSec`.
19831
- * - `per-class` — an independent window per detected class, so cat→dog fires
19832
- * at once and cat→cat still waits.
20263
+ * - `per-class` (default, and the absent value since 2026-10-01 — D36) — an
20264
+ * independent window per detected class: cat→dog fires at once, cat→cat
20265
+ * still waits.
20266
+ * - `shared` — one window for the whole rule/scope: a cat silences the next
20267
+ * dog for `cooldownSec`. Only written when an operator picks it; it is no
20268
+ * longer what an unset rule means.
19833
20269
  *
19834
20270
  * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
19835
20271
  * must not be swallowed by a bark's window (the precedent this generalizes —
@@ -19844,8 +20280,11 @@ var NcThrottleSchema = object({
19844
20280
  /**
19845
20281
  * Class granularity of the cooldown key. Optional rather than defaulted:
19846
20282
  * a Zod default does NOT run on the addon→addon cap path, so a persisted
19847
- * rule authored before this field simply carries none — and the engine
19848
- * reads absent as `shared`, the pre-existing behaviour.
20283
+ * rule authored before this field simply carries none. The engine used to
20284
+ * read absent as `shared` (D36); since 2026-10-01 it reads absent as
20285
+ * `per-class` — the operator's default — and only an explicit `shared`
20286
+ * still means `shared`. See `cooldownKey` / `keysPerClass` in the rule
20287
+ * engine, and D36's dated note.
19849
20288
  */
19850
20289
  granularity: NcThrottleGranularitySchema.optional()
19851
20290
  });
@@ -20169,11 +20608,23 @@ var NcStateSummaryPreviewSectionSchema = object({
20169
20608
  reason: string().optional()
20170
20609
  });
20171
20610
  /**
20611
+ * One notification a previewed summary would send (D698): the whole summary on
20612
+ * a `rule` split (no `section`), one section's on a `section` split.
20613
+ */
20614
+ var NcStateSummaryPreviewRowSchema = object({
20615
+ section: string().optional(),
20616
+ /** The section's name on a per-section row; every reported section's, joined, on a combined one. */
20617
+ title: string(),
20618
+ text: string(),
20619
+ count: number().int().nonnegative()
20620
+ });
20621
+ /**
20172
20622
  * The summary a rule would send now. `empty` = nothing to report and every
20173
20623
  * section read: such a summary is NOT sent. `dropped` counts the open states
20174
20624
  * the rule's own filters (or a camera mute) left out, by reason.
20175
20625
  * `excludedGroups` names the kind groups selected that have no state to report
20176
- * (backups & exports).
20626
+ * (backups & exports). `split` and `rows` (D698) say how it would be sent —
20627
+ * optional, so an older hub's answer still parses.
20177
20628
  */
20178
20629
  var NcStateSummaryPreviewSchema = object({
20179
20630
  empty: boolean(),
@@ -20181,7 +20632,9 @@ var NcStateSummaryPreviewSchema = object({
20181
20632
  text: string(),
20182
20633
  sections: array(NcStateSummaryPreviewSectionSchema),
20183
20634
  dropped: record(string(), number().int().nonnegative()),
20184
- excludedGroups: array(string())
20635
+ excludedGroups: array(string()),
20636
+ split: NcStateSummarySplitSchema.optional(),
20637
+ rows: array(NcStateSummaryPreviewRowSchema).optional()
20185
20638
  });
20186
20639
  var NcTestResultSchema = object({
20187
20640
  recordId: string(),
@@ -21197,7 +21650,7 @@ function cameraSensorRefKey(ref) {
21197
21650
  }
21198
21651
  /** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
21199
21652
  var CameraSensorsModeSchema = _enum(["in-addition"]);
21200
- object({
21653
+ var CameraSensorsConfigSchema = object({
21201
21654
  mode: CameraSensorsModeSchema,
21202
21655
  sensors: array(CameraSensorRefSchema).min(1).max(8)
21203
21656
  }).superRefine((value, ctx) => {
@@ -23102,7 +23555,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
23102
23555
  trackIds: array(string()).min(1)
23103
23556
  }), object({
23104
23557
  deleted: number().int(),
23105
- failed: array(string()).readonly()
23558
+ failed: array(string()).readonly(),
23559
+ sparedMediaIds: array(number().int()).readonly().optional()
23106
23560
  }), {
23107
23561
  kind: "mutation",
23108
23562
  auth: "admin"
@@ -23111,7 +23565,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
23111
23565
  deviceId: number(),
23112
23566
  trackId: string(),
23113
23567
  flags: TrackFlagsPatchSchema
23114
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
23568
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(SetTrackRelationInputSchema, TrackRelationSchema, { kind: "mutation" }), method(ClearTrackRelationInputSchema, ClearTrackRelationResultSchema, { kind: "mutation" }), method(SetTrackPurityInputSchema, SetTrackPurityResultSchema, { kind: "mutation" }), method(ListTrackRelationsInputSchema, ListTrackRelationsResultSchema, { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
23115
23569
  kind: "query",
23116
23570
  auth: "admin"
23117
23571
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -25309,7 +25763,64 @@ var NodeInferenceDevicesSchema = object({
25309
25763
  reachable: boolean(),
25310
25764
  devices: array(NodeInferenceDeviceSchema).readonly()
25311
25765
  });
25312
- method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
25766
+ /**
25767
+ * Pipeline Orchestrator capability — global load balancer + camera dispatcher.
25768
+ *
25769
+ * Lives on the hub. Tracks the camera-to-agent assignment map, listens to
25770
+ * device lifecycle events, queries each runner's capacity + hardware
25771
+ * profile, and dispatches `attachCamera` / `detachCamera` cap calls to the
25772
+ * appropriate runner instances. Persists assignments via the multi-level
25773
+ * settings store so they survive hub restarts.
25774
+ *
25775
+ * Strictly the control plane: never sees a frame, never calls inference,
25776
+ * never drains queues. The runner does that work locally on each agent.
25777
+ */
25778
+ /**
25779
+ * The input of `setCameraSensors` (G5, D676): the ONE typed write path of a
25780
+ * camera's attached sensors (D672). `config: null` removes the attachment —
25781
+ * the camera reads `not-configured` again, never `unreadable`.
25782
+ */
25783
+ var SetCameraSensorsInputSchema = object({
25784
+ deviceId: number().int().nonnegative(),
25785
+ /** `null` removes the attachment: the camera goes back to `not-configured`. */
25786
+ config: CameraSensorsConfigSchema.nullable()
25787
+ });
25788
+ /**
25789
+ * Why an early occupancy look (D691) was not scheduled.
25790
+ *
25791
+ * - `unknown-camera` — no session was ever dispatched for it, so there is no
25792
+ * node and no config to attach a burst with.
25793
+ * - `out-of-range` — the ask is negative or further out than the orchestrator
25794
+ * will hold a timer for; the parked-object cadence is the answer there.
25795
+ * - `no-burst-producer` — this build has no burst producer at all.
25796
+ * - `already-looked` — this camera's ONE early look since its last session has
25797
+ * been spent. A look's own burst can re-arm a flickering flip, and a look
25798
+ * per arm would chain a burst every ~30 s forever (review H2); the next
25799
+ * real session re-arms the budget.
25800
+ */
25801
+ var OccupancyLookRefusalSchema = _enum([
25802
+ "unknown-camera",
25803
+ "out-of-range",
25804
+ "no-burst-producer",
25805
+ "already-looked"
25806
+ ]);
25807
+ method(object({
25808
+ deviceId: number().int().nonnegative(),
25809
+ /** How long from NOW until the pending flip's sustain window ends. RELATIVE,
25810
+ * so the caller's clock and the orchestrator's never have to agree. */
25811
+ afterMs: number().finite(),
25812
+ /** Why, for the log. */
25813
+ reason: string()
25814
+ }), object({
25815
+ scheduled: boolean(),
25816
+ /** When `scheduled`: how long until the burst is dialled. */
25817
+ dueInMs: number().optional(),
25818
+ /** When not `scheduled`: why. */
25819
+ refusedBecause: OccupancyLookRefusalSchema.optional()
25820
+ }), {
25821
+ kind: "mutation",
25822
+ auth: "admin"
25823
+ }), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
25313
25824
  kind: "mutation",
25314
25825
  auth: "admin"
25315
25826
  }), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
@@ -25463,7 +25974,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
25463
25974
  }), CameraSwitchGroupSchema, {
25464
25975
  kind: "mutation",
25465
25976
  auth: "admin"
25466
- }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
25977
+ }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(SetCameraSensorsInputSchema, object({ success: literal(true) }), {
25978
+ kind: "mutation",
25979
+ auth: "admin"
25980
+ }), method(_void(), DiskReconcileJobSchema, {
25467
25981
  kind: "mutation",
25468
25982
  auth: "admin"
25469
25983
  }), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
@@ -28191,219 +28705,6 @@ var CLIP_PLAYBACK_OPTIONS = {
28191
28705
  }
28192
28706
  };
28193
28707
  /**
28194
- * Doorbell button cap. Two kinds of providers coexist behind this cap
28195
- * name (same pattern as `snapshot`):
28196
- *
28197
- * - **Native** providers: registered per-device by device-driver
28198
- * addons via `ctx.registerNativeCap` — either on a
28199
- * `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
28200
- * or directly on the camera (Reolink registers at camera level).
28201
- * Emits an `onPressed` event every time the firmware pushes a
28202
- * ring; status tracks the last press and a pressCount since start
28203
- * (diagnostic).
28204
- *
28205
- * - **Wrapper** provider: the `virtual-doorbell` system builtin
28206
- * (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
28207
- * device (contact / switch / event-emitter …) into a doorbell for
28208
- * a camera. `defaultActive: false` — the operator explicitly binds
28209
- * it per camera in the device-bindings UI, then picks the source
28210
- * device + trigger in the per-device settings.
28211
- *
28212
- * The DeviceEventPropagator re-emits `onPressed` on the camera parent
28213
- * — subscribers listening at the camera level receive ring events
28214
- * with `via[]` populated. No code on the parent needed.
28215
- */
28216
- var DoorbellStatusSchema = object({
28217
- /** Ms epoch of the last press. null = never observed since this provider started. */
28218
- lastPressedAt: number().nullable(),
28219
- /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
28220
- pressCountSinceStart: number()
28221
- });
28222
- var DoorbellPressEventSchema = object({
28223
- deviceId: number(),
28224
- timestamp: number()
28225
- });
28226
- /**
28227
- * The `doorbell-source` extension slot's editable value (D648): the camera's
28228
- * virtual-doorbell trigger devices, exactly what the wrapper's
28229
- * `doorbellSources` persists (as `{ deviceId }` records).
28230
- */
28231
- var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
28232
- /**
28233
- * The `doorbell-source` slot — which devices ring this camera's VIRTUAL
28234
- * doorbell, owned by the `virtual-doorbell` wrapper over its
28235
- * `doorbellSources` store (D648). A source rings when one of its
28236
- * `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
28237
- * different authority (`deviceManager.setWrapperActive`, D62) — the slot
28238
- * reports it, it never writes it.
28239
- */
28240
- var DOORBELL_SOURCE_SLOT = {
28241
- id: "doorbell-source",
28242
- label: "Doorbell trigger devices",
28243
- description: "Any of these becoming active rings this camera's virtual doorbell: a binary sensor when it goes active, a switch when it turns on.",
28244
- shape: "association",
28245
- hostDeviceTypes: [DeviceType.Camera],
28246
- sourceCaps: SOURCE_CAPS,
28247
- cardinality: "many",
28248
- value: DoorbellSourceSlotValueSchema
28249
- };
28250
- var doorbellCapability = {
28251
- name: "doorbell",
28252
- scope: "device",
28253
- deviceNative: true,
28254
- mode: "singleton",
28255
- kind: "wrapper",
28256
- defaultActive: false,
28257
- deviceTypes: [DeviceType.Button, DeviceType.Camera],
28258
- extensionSlots: [DOORBELL_SOURCE_SLOT],
28259
- methods: {},
28260
- events: {
28261
- /**
28262
- * Fires once per physical press. Reolink delivers via Baichuan
28263
- * push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
28264
- * release/duration — it's a pulse.
28265
- */
28266
- onPressed: {
28267
- data: DoorbellPressEventSchema,
28268
- fromState: {
28269
- field: "lastPressedAt",
28270
- on: "advance"
28271
- }
28272
- } },
28273
- status: {
28274
- schema: DoorbellStatusSchema,
28275
- kind: "push"
28276
- },
28277
- /**
28278
- * Runtime-state slice — last press timestamp + lifetime press count.
28279
- * Mirrored by the kernel and readable via
28280
- * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
28281
- * without subscribing.
28282
- */
28283
- runtimeState: DoorbellStatusSchema,
28284
- /**
28285
- * Runtime-state durability: **restored** — a monotonic accumulator: the slice IS the record. `lastPressedAt` is content here, not a clock, so it is deliberately NOT volatile.
28286
- *
28287
- * See `RuntimeStateDurability`. Enforced by
28288
- * `scripts/check-runtime-state-durability.ts`.
28289
- */
28290
- durability: "restored"
28291
- };
28292
- var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
28293
- DeviceType.Camera, DeviceType.Camera;
28294
- /** A slot's editable value, discriminated on `slot`. */
28295
- var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
28296
- DeviceType.Camera;
28297
- var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
28298
- state: literal("unreachable"),
28299
- reason: string()
28300
- })]);
28301
- /** One provider of slots — the D554 source-listing row. */
28302
- var ExtensionSourceSchema = object({
28303
- /** The routing prefix of every `slotRef` this provider serves. */
28304
- source: string(),
28305
- label: string(),
28306
- /** Stamped by the dispatcher from the registry (D557). */
28307
- addonId: string().optional(),
28308
- availability: ExtensionSourceAvailabilitySchema
28309
- });
28310
- /**
28311
- * How one picked source stands. `missing` — no such device (deleted, or an id
28312
- * that never existed); `foreign` — a device the slot's owner cannot read from
28313
- * (a source owned by another addon); `unavailable` — it exists but is not a
28314
- * valid source now (a container, which is never a pick). A source in any of
28315
- * these states is SHOWN, never silently dropped or re-pointed.
28316
- */
28317
- var ExtensionSourceHealthSchema = _enum([
28318
- "ok",
28319
- "missing",
28320
- "foreign",
28321
- "unavailable"
28322
- ]);
28323
- var ExtensionSlotSourceSchema = object({
28324
- deviceId: number().int(),
28325
- /** The device's name, or null when it could not be resolved (`missing`). */
28326
- name: string().nullable(),
28327
- health: ExtensionSourceHealthSchema,
28328
- detail: string().optional()
28329
- });
28330
- /**
28331
- * A DIFFERENT authority that gates whether the slot's sources do anything —
28332
- * reported read-only, named, never written through this contract (D62). The
28333
- * virtual doorbell's sources ring only while the wrapper is bound to the
28334
- * camera, and that binding belongs to `deviceManager.setWrapperActive`.
28335
- * `unknown` means the gate could not be read; it is not "inactive" (D315).
28336
- */
28337
- var ExtensionSlotActivationSchema = object({
28338
- state: _enum([
28339
- "active",
28340
- "inactive",
28341
- "unknown"
28342
- ]),
28343
- authority: string(),
28344
- detail: string().optional()
28345
- });
28346
- var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
28347
- state: literal("ok"),
28348
- /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
28349
- slotRef: string(),
28350
- slot: ExtensionSlotIdSchema,
28351
- /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
28352
- authority: string(),
28353
- activation: ExtensionSlotActivationSchema.nullable(),
28354
- value: ExtensionSlotValueSchema,
28355
- sources: array(ExtensionSlotSourceSchema),
28356
- /**
28357
- * Devices the owner links to the host ON ITS OWN, by structure, and that
28358
- * are therefore not in `value` (D655): a camera's device-tree children, and
28359
- * the child a picked container stands for (D356 — a container is never a
28360
- * pick, its children are). Read-only; the editor shows them and may offer
28361
- * per-device options on them (the linked-devices tracked-event opt-in).
28362
- * Absent when the owner links nothing beyond the picks, and from an owner
28363
- * older than D655.
28364
- */
28365
- impliedSources: array(ExtensionSlotSourceSchema).optional()
28366
- }), object({
28367
- state: literal("unreachable"),
28368
- addonId: string(),
28369
- reason: string()
28370
- })]);
28371
- var ExtensionCandidatesSchema = object({ candidates: array(object({
28372
- deviceId: number().int(),
28373
- name: string(),
28374
- type: string(),
28375
- location: string().nullable(),
28376
- /** The container a child belongs to — "Spotlight 2" alone does not say which. */
28377
- parentName: string().nullable(),
28378
- /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
28379
- suggested: boolean(),
28380
- /** Why it is suggested ("same location"), null when it is not. */
28381
- reason: string().nullable()
28382
- })) });
28383
- /**
28384
- * What a write did. `none` — applied in place. `host` / `parent` — the owner
28385
- * reloaded the host (or, for an accessory child, its parent) because the
28386
- * write changed what the host REGISTERS. A slot never adds a capability to its
28387
- * host — that is a composition (D663) — so today's owners answer `none`.
28388
- */
28389
- var ExtensionSetResultSchema = object({
28390
- applied: literal(true),
28391
- reload: _enum([
28392
- "none",
28393
- "host",
28394
- "parent"
28395
- ])
28396
- });
28397
- var ExtensionSlotRefInputSchema = object({
28398
- deviceId: number().int(),
28399
- slotRef: string().min(1)
28400
- });
28401
- var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
28402
- method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
28403
- kind: "mutation",
28404
- auth: "admin"
28405
- });
28406
- /**
28407
28708
  * Optional client-side hints sent at session creation to help the provider
28408
28709
  * pick the best native source. All fields optional — a viewer that knows
28409
28710
  * nothing still gets a sane default. (Relocated from the retired `webrtc`
@@ -40093,47 +40394,6 @@ var zoneRulesCapability = {
40093
40394
  */
40094
40395
  durability: "restored"
40095
40396
  };
40096
- var NUMBER = {
40097
- kind: "fixed",
40098
- result: ["number"]
40099
- };
40100
- var BOOLEAN = {
40101
- kind: "fixed",
40102
- result: ["boolean"]
40103
- };
40104
- Object.freeze({
40105
- min: NUMBER,
40106
- max: NUMBER,
40107
- abs: NUMBER,
40108
- floor: NUMBER,
40109
- ceil: NUMBER,
40110
- sqrt: NUMBER,
40111
- round: NUMBER,
40112
- pow: NUMBER,
40113
- clamp: NUMBER,
40114
- avg: NUMBER,
40115
- sum: NUMBER,
40116
- age: NUMBER,
40117
- convert: NUMBER,
40118
- coalesce: { kind: "coalesce" },
40119
- any: BOOLEAN,
40120
- all: BOOLEAN,
40121
- within: BOOLEAN,
40122
- latest: {
40123
- kind: "fixed",
40124
- result: ["number", "null"]
40125
- },
40126
- number: {
40127
- kind: "fixed",
40128
- result: ["number", "null"]
40129
- },
40130
- rose: {
40131
- kind: "fixed",
40132
- result: ["number", "null"]
40133
- },
40134
- count: NUMBER
40135
- });
40136
- `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
40137
40397
  /**
40138
40398
  * Accessory device helpers — shared across drivers.
40139
40399
  *
@@ -44257,6 +44517,12 @@ Object.freeze({
44257
44517
  addonId: null,
44258
44518
  access: "view"
44259
44519
  },
44520
+ "coreBlocks.listComposableCaps": {
44521
+ capName: "core-blocks",
44522
+ capScope: "system",
44523
+ addonId: null,
44524
+ access: "view"
44525
+ },
44260
44526
  "coreBlocks.listCompositions": {
44261
44527
  capName: "core-blocks",
44262
44528
  capScope: "system",
@@ -44335,6 +44601,18 @@ Object.freeze({
44335
44601
  addonId: null,
44336
44602
  access: "view"
44337
44603
  },
44604
+ "databaseSnapshot.listDatabases": {
44605
+ capName: "database-snapshot",
44606
+ capScope: "system",
44607
+ addonId: null,
44608
+ access: "view"
44609
+ },
44610
+ "databaseSnapshot.writeSnapshot": {
44611
+ capName: "database-snapshot",
44612
+ capScope: "system",
44613
+ addonId: null,
44614
+ access: "create"
44615
+ },
44338
44616
  "dataStoreProvider.aggregate": {
44339
44617
  capName: "data-store-provider",
44340
44618
  capScope: "system",
@@ -47071,6 +47349,12 @@ Object.freeze({
47071
47349
  addonId: null,
47072
47350
  access: "create"
47073
47351
  },
47352
+ "pipelineAnalytics.clearTrackRelation": {
47353
+ capName: "pipeline-analytics",
47354
+ capScope: "device",
47355
+ addonId: null,
47356
+ access: "delete"
47357
+ },
47074
47358
  "pipelineAnalytics.clearTracks": {
47075
47359
  capName: "pipeline-analytics",
47076
47360
  capScope: "device",
@@ -47323,6 +47607,12 @@ Object.freeze({
47323
47607
  addonId: null,
47324
47608
  access: "view"
47325
47609
  },
47610
+ "pipelineAnalytics.listTrackRelations": {
47611
+ capName: "pipeline-analytics",
47612
+ capScope: "device",
47613
+ addonId: null,
47614
+ access: "view"
47615
+ },
47326
47616
  "pipelineAnalytics.listTracks": {
47327
47617
  capName: "pipeline-analytics",
47328
47618
  capScope: "device",
@@ -47437,6 +47727,18 @@ Object.freeze({
47437
47727
  addonId: null,
47438
47728
  access: "create"
47439
47729
  },
47730
+ "pipelineAnalytics.setTrackPurity": {
47731
+ capName: "pipeline-analytics",
47732
+ capScope: "device",
47733
+ addonId: null,
47734
+ access: "create"
47735
+ },
47736
+ "pipelineAnalytics.setTrackRelation": {
47737
+ capName: "pipeline-analytics",
47738
+ capScope: "device",
47739
+ addonId: null,
47740
+ access: "create"
47741
+ },
47440
47742
  "pipelineAnalytics.startStorageMigrationMove": {
47441
47743
  capName: "pipeline-analytics",
47442
47744
  capScope: "device",
@@ -47875,6 +48177,12 @@ Object.freeze({
47875
48177
  addonId: null,
47876
48178
  access: "delete"
47877
48179
  },
48180
+ "pipelineOrchestrator.requestOccupancyLook": {
48181
+ capName: "pipeline-orchestrator",
48182
+ capScope: "system",
48183
+ addonId: null,
48184
+ access: "create"
48185
+ },
47878
48186
  "pipelineOrchestrator.resetNodePipelineDefaults": {
47879
48187
  capName: "pipeline-orchestrator",
47880
48188
  capScope: "system",
@@ -47941,6 +48249,12 @@ Object.freeze({
47941
48249
  addonId: null,
47942
48250
  access: "create"
47943
48251
  },
48252
+ "pipelineOrchestrator.setCameraSensors": {
48253
+ capName: "pipeline-orchestrator",
48254
+ capScope: "system",
48255
+ addonId: null,
48256
+ access: "create"
48257
+ },
47944
48258
  "pipelineOrchestrator.setCameraStepOverride": {
47945
48259
  capName: "pipeline-orchestrator",
47946
48260
  capScope: "system",
@@ -51351,6 +51665,11 @@ Object.freeze({
51351
51665
  form: "single",
51352
51666
  optional: false
51353
51667
  }],
51668
+ "pipelineAnalytics.clearTrackRelation": [{
51669
+ name: "deviceId",
51670
+ form: "single",
51671
+ optional: false
51672
+ }],
51354
51673
  "pipelineAnalytics.clearTracks": [{
51355
51674
  name: "deviceId",
51356
51675
  form: "single",
@@ -51501,6 +51820,11 @@ Object.freeze({
51501
51820
  form: "single",
51502
51821
  optional: false
51503
51822
  }],
51823
+ "pipelineAnalytics.listTrackRelations": [{
51824
+ name: "deviceId",
51825
+ form: "single",
51826
+ optional: false
51827
+ }],
51504
51828
  "pipelineAnalytics.listTracks": [{
51505
51829
  name: "deviceId",
51506
51830
  form: "single",
@@ -51571,6 +51895,16 @@ Object.freeze({
51571
51895
  form: "single",
51572
51896
  optional: false
51573
51897
  }],
51898
+ "pipelineAnalytics.setTrackPurity": [{
51899
+ name: "deviceId",
51900
+ form: "single",
51901
+ optional: false
51902
+ }],
51903
+ "pipelineAnalytics.setTrackRelation": [{
51904
+ name: "deviceId",
51905
+ form: "single",
51906
+ optional: false
51907
+ }],
51574
51908
  "pipelineAnalytics.wipeAllAnalytics": [{
51575
51909
  name: "deviceId",
51576
51910
  form: "single",
@@ -51641,6 +51975,11 @@ Object.freeze({
51641
51975
  form: "single",
51642
51976
  optional: false
51643
51977
  }],
51978
+ "pipelineOrchestrator.requestOccupancyLook": [{
51979
+ name: "deviceId",
51980
+ form: "single",
51981
+ optional: false
51982
+ }],
51644
51983
  "pipelineOrchestrator.resolvePipeline": [{
51645
51984
  name: "deviceId",
51646
51985
  form: "single",
@@ -51651,6 +51990,11 @@ Object.freeze({
51651
51990
  form: "single",
51652
51991
  optional: false
51653
51992
  }],
51993
+ "pipelineOrchestrator.setCameraSensors": [{
51994
+ name: "deviceId",
51995
+ form: "single",
51996
+ optional: false
51997
+ }],
51654
51998
  "pipelineOrchestrator.setCameraStepOverride": [{
51655
51999
  name: "deviceId",
51656
52000
  form: "single",
@@ -52797,6 +53141,18 @@ var STATE_SUMMARY_VARS = [
52797
53141
  systemEventKinds: [...SUMMARISABLE],
52798
53142
  systemEventDeliveries: ["summary"]
52799
53143
  },
53144
+ {
53145
+ name: "summarySection",
53146
+ label: "Summary: this section",
53147
+ description: "The section a per-section summary row is about (D698); on a summary sent as one message, every section it reports, comma-separated.",
53148
+ example: "Batterie scariche",
53149
+ group: "system",
53150
+ families: ["rule"],
53151
+ fields: [...RULE_TEXT],
53152
+ kinds: ["system"],
53153
+ systemEventKinds: [...SUMMARISABLE],
53154
+ systemEventDeliveries: ["summary"]
53155
+ },
52800
53156
  ...STATE_SUMMARY_SECTION_VARS.map((v) => ({
52801
53157
  name: v.name,
52802
53158
  label: v.label,
@@ -52873,6 +53229,37 @@ var STATE_SUMMARY_VARS = [
52873
53229
  [...RULE_TEXT],
52874
53230
  ...STATE_SUMMARY_VARS
52875
53231
  ];
53232
+ new Set([
53233
+ "disarmed",
53234
+ "armed_home",
53235
+ "armed_away",
53236
+ "armed_night",
53237
+ "armed_vacation",
53238
+ "armed_custom_bypass",
53239
+ "arming",
53240
+ "disarming",
53241
+ "pending",
53242
+ "triggered",
53243
+ "open",
53244
+ "opening",
53245
+ "closing",
53246
+ "closed",
53247
+ "stopped",
53248
+ "locked",
53249
+ "unlocked",
53250
+ "locking",
53251
+ "unlocking",
53252
+ "jammed",
53253
+ "on",
53254
+ "off",
53255
+ "home",
53256
+ "not_home",
53257
+ "matched",
53258
+ "diverged",
53259
+ "unknown",
53260
+ "latched",
53261
+ "live"
53262
+ ]);
52876
53263
  /**
52877
53264
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
52878
53265
  *