@camstack/addon-provider-wyze 0.2.120 → 0.2.121

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 +2 -2
package/dist/addon.mjs CHANGED
@@ -5381,7 +5381,7 @@ var ZodIssueCode = {
5381
5381
  var ZodFirstPartyTypeKind;
5382
5382
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5383
5383
  //#endregion
5384
- //#region ../types/dist/sleep-C-v96WpE.mjs
5384
+ //#region ../types/dist/sleep-gU6hqv4_.mjs
5385
5385
  /**
5386
5386
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5387
5387
  * window to float samples (D455).
@@ -8970,6 +8970,82 @@ var ArchivedDebugNoteQueryInputSchema = object({
8970
8970
  /** Max rows returned, newest-first. */
8971
8971
  limit: number().int().min(1).max(1e3).optional()
8972
8972
  });
8973
+ var TrackRelationKindSchema = _enum(["same-subject", "different-subjects"]);
8974
+ var TrackSideSchema = _enum(["before", "after"]);
8975
+ var TrackPurityValueSchema = _enum(["mixed", "not-a-subject"]);
8976
+ var TrackRelationSchema = object({
8977
+ id: string(),
8978
+ deviceId: number().int(),
8979
+ leftTrackId: string(),
8980
+ rightTrackId: string(),
8981
+ leftSide: TrackSideSchema.nullable(),
8982
+ rightSide: TrackSideSchema.nullable(),
8983
+ relation: TrackRelationKindSchema,
8984
+ presence: literal("continuous").nullable(),
8985
+ leftStartedAt: number().int().nullable(),
8986
+ rightStartedAt: number().int().nullable(),
8987
+ createdAt: number().int(),
8988
+ updatedAt: number().int(),
8989
+ author: string().nullable()
8990
+ });
8991
+ var TrackPuritySchema = object({
8992
+ id: string(),
8993
+ deviceId: number().int(),
8994
+ sourceTrackId: string(),
8995
+ purity: TrackPurityValueSchema,
8996
+ switchAtMs: number().int().nullable(),
8997
+ startedAt: number().int().nullable(),
8998
+ createdAt: number().int(),
8999
+ updatedAt: number().int(),
9000
+ author: string().nullable()
9001
+ });
9002
+ var SetTrackRelationInputSchema = object({
9003
+ deviceId: number().int(),
9004
+ trackId: string().min(1),
9005
+ otherTrackId: string().min(1),
9006
+ relation: TrackRelationKindSchema,
9007
+ presence: literal("continuous").optional(),
9008
+ trackSide: TrackSideSchema.optional(),
9009
+ otherSide: TrackSideSchema.optional()
9010
+ });
9011
+ var ClearTrackRelationInputSchema = object({
9012
+ deviceId: number().int(),
9013
+ trackId: string().min(1),
9014
+ otherTrackId: string().min(1)
9015
+ });
9016
+ var ClearTrackRelationResultSchema = object({ cleared: boolean() });
9017
+ var SetTrackPurityInputSchema = object({
9018
+ deviceId: number().int(),
9019
+ trackId: string().min(1),
9020
+ purity: _enum([
9021
+ "pure",
9022
+ "mixed",
9023
+ "not-a-subject"
9024
+ ]),
9025
+ switchAtMs: number().int().optional()
9026
+ });
9027
+ /** `null` when `pure` cleared the row. */
9028
+ var SetTrackPurityResultSchema = object({ purity: TrackPuritySchema.nullable() });
9029
+ var ListTrackRelationsInputSchema = object({
9030
+ deviceId: number().int(),
9031
+ trackId: string().optional(),
9032
+ since: number().int().optional(),
9033
+ until: number().int().optional(),
9034
+ limit: number().int().min(1).max(5e3).optional()
9035
+ });
9036
+ var ListTrackRelationsResultSchema = object({
9037
+ relations: array(TrackRelationSchema).readonly(),
9038
+ purities: array(TrackPuritySchema).readonly(),
9039
+ truncated: boolean()
9040
+ });
9041
+ _enum([
9042
+ "unknown-track",
9043
+ "cross-device",
9044
+ "self-relation",
9045
+ "contradiction",
9046
+ "switch-outside-track",
9047
+ "switch-needs-mixed"
9048
+ ]);
8973
9049
  /**
8974
9050
  * Ops-log — the durable, append-only operations audit shared by the
8975
9051
  * recordings and events management surfaces.
@@ -11523,6 +11599,68 @@ method(object({
11523
11599
  password: string()
11524
11600
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
11525
11601
  /**
11602
+ * How long one snapshot may take end to end: the pinned copy of the whole
11603
+ * database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
11604
+ * disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
11605
+ * generous because a timeout fails the whole backup run.
11606
+ */
11607
+ var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
11608
+ /**
11609
+ * The databases an owner snapshots — declared by the OWNER, so a caller never
11610
+ * guesses which file is live from what sits beside it (a cleanly closed
11611
+ * database has no sidecars and is just as owned). Paths are absolute on the
11612
+ * owner's host.
11613
+ */
11614
+ var DatabaseSnapshotTargetsSchema = object({ databases: array(object({ livePath: string() })) });
11615
+ /** One b-tree table of the snapshot and the rows it holds. */
11616
+ var DatabaseSnapshotTableSchema = object({
11617
+ name: string(),
11618
+ rows: number().int().nonnegative()
11619
+ });
11620
+ /**
11621
+ * What the owner wrote. Every path is ABSOLUTE on the owner's host — the
11622
+ * caller pins the call to its own node, so it can read the file; a caller
11623
+ * that finds the path outside its own data root refuses it rather than
11624
+ * archiving something it cannot place.
11625
+ */
11626
+ var DatabaseSnapshotResultSchema = object({
11627
+ /** The live database the snapshot copies. Never to be copied as a file. */
11628
+ livePath: string(),
11629
+ /** The verified copy: `<livePath>` + {@link DATABASE_SNAPSHOT_SUFFIX}. */
11630
+ snapshotPath: string(),
11631
+ sizeBytes: number().int().nonnegative(),
11632
+ pageCount: number().int().nonnegative(),
11633
+ pageSize: number().int().positive(),
11634
+ /**
11635
+ * Every b-tree table with its row count. Read inside the SAME read
11636
+ * transaction the copy was taken from, and found EQUAL on the copy — so
11637
+ * this is the content of the snapshot, not an estimate of the source.
11638
+ */
11639
+ tables: array(DatabaseSnapshotTableSchema),
11640
+ /** Wall time of the pinned copy (row counts included). */
11641
+ copyMs: number().nonnegative(),
11642
+ /** Wall time of the checks on the copy (`integrity_check`, row counts). */
11643
+ verifyMs: number().nonnegative(),
11644
+ /** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
11645
+ takenAt: number()
11646
+ });
11647
+ /**
11648
+ * A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
11649
+ * the same facts, with both paths relative to the archive root (the node's
11650
+ * data dir), because an archive outlives the host that made it.
11651
+ */
11652
+ var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
11653
+ /** Archive-relative path of the live database the archive does NOT carry. */
11654
+ livePath: string(),
11655
+ /** Archive-relative path of the verified copy it carries in its place. */
11656
+ snapshotPath: string()
11657
+ });
11658
+ method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(object({}), DatabaseSnapshotResultSchema, {
11659
+ kind: "mutation",
11660
+ auth: "admin",
11661
+ timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
11662
+ });
11663
+ /**
11526
11664
  * Orchestrator-side destination metadata. The orchestrator computes
11527
11665
  * `id = <addonId>:<subId>` from its provider lookup so consumers
11528
11666
  * (admin UI, restore flow) see one canonical key.
@@ -11633,7 +11771,12 @@ var ArchiveManifestSchema = object({
11633
11771
  locations: array(string()),
11634
11772
  entries: array(ArchiveEntrySchema),
11635
11773
  totalBytes: number(),
11636
- totalFiles: number()
11774
+ totalFiles: number(),
11775
+ /**
11776
+ * Live SQLite databases this archive carries as their OWNER's verified
11777
+ * snapshot instead of as files (D693). Absent on archives made before.
11778
+ */
11779
+ sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional()
11637
11780
  });
11638
11781
  var LocationStatSchema = object({
11639
11782
  name: string(),
@@ -13159,6 +13302,116 @@ var CompositionBlockStateSchema = object({
13159
13302
  reason: string().optional(),
13160
13303
  fields: array(CompositionFieldStateSchema)
13161
13304
  });
13305
+ var ComposerBlockSchema = object({
13306
+ id: string().min(1),
13307
+ name: string().min(1).max(120),
13308
+ enabled: boolean(),
13309
+ updatedAt: number(),
13310
+ composition: CompositionSchema
13311
+ });
13312
+ /**
13313
+ * A stored composition row that no longer PARSES — a schema a release
13314
+ * tightened, a row written by a newer build. Sent by id so the composer keeps
13315
+ * its device as a placeholder and reports the block `failed` naming the parse
13316
+ * error. Leaving it out would read, twice, exactly like a delete (D49).
13317
+ */
13318
+ var ComposerUnreadableBlockSchema = object({
13319
+ id: string().min(1),
13320
+ /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
13321
+ name: string().nullable(),
13322
+ /** The parse error, in the operator's words. */
13323
+ error: string()
13324
+ });
13325
+ method(object({
13326
+ /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
13327
+ integrationId: string().nullable(),
13328
+ /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
13329
+ storeLoaded: boolean(),
13330
+ blocks: array(ComposerBlockSchema),
13331
+ /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
13332
+ restartBlockIds: array(string()),
13333
+ /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
13334
+ unreadableBlocks: array(ComposerUnreadableBlockSchema)
13335
+ }), object({
13336
+ blocks: array(object({
13337
+ blockId: string(),
13338
+ status: CompositionRunStatusSchema,
13339
+ reason: string().optional()
13340
+ })),
13341
+ /**
13342
+ * False when the composer declared and withdrew NOTHING (store not loaded,
13343
+ * integration unknown, its own rows unread or read empty once). An empty
13344
+ * apply the caller owes is paid off only by one the composer acted on (D49).
13345
+ */
13346
+ acted: boolean()
13347
+ }), {
13348
+ kind: "mutation",
13349
+ auth: "admin"
13350
+ }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
13351
+ var NUMBER = {
13352
+ kind: "fixed",
13353
+ result: ["number"]
13354
+ };
13355
+ var BOOLEAN = {
13356
+ kind: "fixed",
13357
+ result: ["boolean"]
13358
+ };
13359
+ Object.freeze({
13360
+ min: NUMBER,
13361
+ max: NUMBER,
13362
+ abs: NUMBER,
13363
+ floor: NUMBER,
13364
+ ceil: NUMBER,
13365
+ sqrt: NUMBER,
13366
+ round: NUMBER,
13367
+ pow: NUMBER,
13368
+ clamp: NUMBER,
13369
+ avg: NUMBER,
13370
+ sum: NUMBER,
13371
+ age: NUMBER,
13372
+ convert: NUMBER,
13373
+ coalesce: { kind: "coalesce" },
13374
+ any: BOOLEAN,
13375
+ all: BOOLEAN,
13376
+ within: BOOLEAN,
13377
+ latest: {
13378
+ kind: "fixed",
13379
+ result: ["number", "null"]
13380
+ },
13381
+ number: {
13382
+ kind: "fixed",
13383
+ result: ["number", "null"]
13384
+ },
13385
+ rose: {
13386
+ kind: "fixed",
13387
+ result: ["number", "null"]
13388
+ },
13389
+ count: NUMBER
13390
+ });
13391
+ `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
13392
+ /**
13393
+ * What a composition may BUILD on a device type (G2, D676): the caps a new
13394
+ * device of that type, or an existing one that lacks them, can be given. The
13395
+ * blockers are the validator's own refusal codes, and a spec compares this
13396
+ * listing with `planComposition` for every capability — the editor can never
13397
+ * offer a feature the save would refuse for the same reason.
13398
+ */
13399
+ var ComposableFieldSchema = object({
13400
+ path: string(),
13401
+ kind: CompositionFieldKindSchema,
13402
+ nullable: boolean(),
13403
+ required: boolean(),
13404
+ enumValues: array(string()).optional()
13405
+ });
13406
+ var ComposableCapabilitiesSchema = object({ caps: array(object({
13407
+ cap: string(),
13408
+ fields: array(ComposableFieldSchema),
13409
+ /** Present for an item-array cap (`consumables.items`). */
13410
+ itemArray: object({
13411
+ path: string(),
13412
+ keyField: string()
13413
+ }).optional()
13414
+ })) });
13162
13415
  /** Where a block runs. The operator chooses — a block driving a device on an
13163
13416
  * agent is the reason placement is not fixed to the hub. */
13164
13417
  var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
@@ -13323,7 +13576,7 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
13323
13576
  }), method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }), method(object({}), CompositionListReadSchema, { auth: "admin" }), method(object({
13324
13577
  addonId: string().min(1),
13325
13578
  stableId: string().min(1)
13326
- }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({
13579
+ }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({ deviceType: _enum(DeviceType) }), ComposableCapabilitiesSchema, { auth: "admin" }), method(object({
13327
13580
  composition: CompositionSchema,
13328
13581
  blockId: string().optional()
13329
13582
  }), CompositionValidationSchema, {
@@ -13331,52 +13584,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
13331
13584
  auth: "admin",
13332
13585
  access: "view"
13333
13586
  });
13334
- var ComposerBlockSchema = object({
13335
- id: string().min(1),
13336
- name: string().min(1).max(120),
13337
- enabled: boolean(),
13338
- updatedAt: number(),
13339
- composition: CompositionSchema
13340
- });
13341
- /**
13342
- * A stored composition row that no longer PARSES — a schema a release
13343
- * tightened, a row written by a newer build. Sent by id so the composer keeps
13344
- * its device as a placeholder and reports the block `failed` naming the parse
13345
- * error. Leaving it out would read, twice, exactly like a delete (D49).
13346
- */
13347
- var ComposerUnreadableBlockSchema = object({
13348
- id: string().min(1),
13349
- /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
13350
- name: string().nullable(),
13351
- /** The parse error, in the operator's words. */
13352
- error: string()
13353
- });
13354
- method(object({
13355
- /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
13356
- integrationId: string().nullable(),
13357
- /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
13358
- storeLoaded: boolean(),
13359
- blocks: array(ComposerBlockSchema),
13360
- /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
13361
- restartBlockIds: array(string()),
13362
- /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
13363
- unreadableBlocks: array(ComposerUnreadableBlockSchema)
13364
- }), object({
13365
- blocks: array(object({
13366
- blockId: string(),
13367
- status: CompositionRunStatusSchema,
13368
- reason: string().optional()
13369
- })),
13370
- /**
13371
- * False when the composer declared and withdrew NOTHING (store not loaded,
13372
- * integration unknown, its own rows unread or read empty once). An empty
13373
- * apply the caller owes is paid off only by one the composer acted on (D49).
13374
- */
13375
- acted: boolean()
13376
- }), {
13377
- kind: "mutation",
13378
- auth: "admin"
13379
- }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
13380
13587
  /**
13381
13588
  * `custom-model-registry` — collection cap exposing operator-registered
13382
13589
  * custom detection models. Each provider (today: `addon-model-studio`)
@@ -15431,6 +15638,219 @@ method(object({
15431
15638
  caps: array(string()).readonly().optional()
15432
15639
  }), record(string(), record(string(), unknown().nullable())));
15433
15640
  /**
15641
+ * Doorbell button cap. Two kinds of providers coexist behind this cap
15642
+ * name (same pattern as `snapshot`):
15643
+ *
15644
+ * - **Native** providers: registered per-device by device-driver
15645
+ * addons via `ctx.registerNativeCap` — either on a
15646
+ * `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
15647
+ * or directly on the camera (Reolink registers at camera level).
15648
+ * Emits an `onPressed` event every time the firmware pushes a
15649
+ * ring; status tracks the last press and a pressCount since start
15650
+ * (diagnostic).
15651
+ *
15652
+ * - **Wrapper** provider: the `virtual-doorbell` system builtin
15653
+ * (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
15654
+ * device (contact / switch / event-emitter …) into a doorbell for
15655
+ * a camera. `defaultActive: false` — the operator explicitly binds
15656
+ * it per camera in the device-bindings UI, then picks the source
15657
+ * device + trigger in the per-device settings.
15658
+ *
15659
+ * The DeviceEventPropagator re-emits `onPressed` on the camera parent
15660
+ * — subscribers listening at the camera level receive ring events
15661
+ * with `via[]` populated. No code on the parent needed.
15662
+ */
15663
+ var DoorbellStatusSchema = object({
15664
+ /** Ms epoch of the last press. null = never observed since this provider started. */
15665
+ lastPressedAt: number().nullable(),
15666
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
15667
+ pressCountSinceStart: number()
15668
+ });
15669
+ var DoorbellPressEventSchema = object({
15670
+ deviceId: number(),
15671
+ timestamp: number()
15672
+ });
15673
+ /**
15674
+ * The `doorbell-source` extension slot's editable value (D648): the camera's
15675
+ * virtual-doorbell trigger devices, exactly what the wrapper's
15676
+ * `doorbellSources` persists (as `{ deviceId }` records).
15677
+ */
15678
+ var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
15679
+ /**
15680
+ * The `doorbell-source` slot — which devices ring this camera's VIRTUAL
15681
+ * doorbell, owned by the `virtual-doorbell` wrapper over its
15682
+ * `doorbellSources` store (D648). A source rings when one of its
15683
+ * `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
15684
+ * different authority (`deviceManager.setWrapperActive`, D62) — the slot
15685
+ * reports it, it never writes it.
15686
+ */
15687
+ var DOORBELL_SOURCE_SLOT = {
15688
+ id: "doorbell-source",
15689
+ label: "Doorbell trigger devices",
15690
+ 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.",
15691
+ shape: "association",
15692
+ hostDeviceTypes: [DeviceType.Camera],
15693
+ sourceCaps: SOURCE_CAPS,
15694
+ cardinality: "many",
15695
+ value: DoorbellSourceSlotValueSchema
15696
+ };
15697
+ var doorbellCapability = {
15698
+ name: "doorbell",
15699
+ scope: "device",
15700
+ deviceNative: true,
15701
+ mode: "singleton",
15702
+ kind: "wrapper",
15703
+ defaultActive: false,
15704
+ deviceTypes: [DeviceType.Button, DeviceType.Camera],
15705
+ extensionSlots: [DOORBELL_SOURCE_SLOT],
15706
+ methods: {},
15707
+ events: {
15708
+ /**
15709
+ * Fires once per physical press. Reolink delivers via Baichuan
15710
+ * push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
15711
+ * release/duration — it's a pulse.
15712
+ */
15713
+ onPressed: {
15714
+ data: DoorbellPressEventSchema,
15715
+ fromState: {
15716
+ field: "lastPressedAt",
15717
+ on: "advance"
15718
+ }
15719
+ } },
15720
+ status: {
15721
+ schema: DoorbellStatusSchema,
15722
+ kind: "push"
15723
+ },
15724
+ /**
15725
+ * Runtime-state slice — last press timestamp + lifetime press count.
15726
+ * Mirrored by the kernel and readable via
15727
+ * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
15728
+ * without subscribing.
15729
+ */
15730
+ runtimeState: DoorbellStatusSchema,
15731
+ /**
15732
+ * 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.
15733
+ *
15734
+ * See `RuntimeStateDurability`. Enforced by
15735
+ * `scripts/check-runtime-state-durability.ts`.
15736
+ */
15737
+ durability: "restored"
15738
+ };
15739
+ var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
15740
+ DeviceType.Camera, DeviceType.Camera;
15741
+ /** A slot's editable value, discriminated on `slot`. */
15742
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
15743
+ DeviceType.Camera;
15744
+ var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
15745
+ state: literal("unreachable"),
15746
+ reason: string()
15747
+ })]);
15748
+ /** One provider of slots — the D554 source-listing row. */
15749
+ var ExtensionSourceSchema = object({
15750
+ /** The routing prefix of every `slotRef` this provider serves. */
15751
+ source: string(),
15752
+ label: string(),
15753
+ /** Stamped by the dispatcher from the registry (D557). */
15754
+ addonId: string().optional(),
15755
+ availability: ExtensionSourceAvailabilitySchema
15756
+ });
15757
+ /**
15758
+ * How one picked source stands. `missing` — no such device (deleted, or an id
15759
+ * that never existed); `foreign` — a device the slot's owner cannot read from
15760
+ * (a source owned by another addon); `unavailable` — it exists but is not a
15761
+ * valid source now (a container, which is never a pick). A source in any of
15762
+ * these states is SHOWN, never silently dropped or re-pointed.
15763
+ */
15764
+ var ExtensionSourceHealthSchema = _enum([
15765
+ "ok",
15766
+ "missing",
15767
+ "foreign",
15768
+ "unavailable"
15769
+ ]);
15770
+ var ExtensionSlotSourceSchema = object({
15771
+ deviceId: number().int(),
15772
+ /** The device's name, or null when it could not be resolved (`missing`). */
15773
+ name: string().nullable(),
15774
+ health: ExtensionSourceHealthSchema,
15775
+ detail: string().optional()
15776
+ });
15777
+ /**
15778
+ * A DIFFERENT authority that gates whether the slot's sources do anything —
15779
+ * reported read-only, named, never written through this contract (D62). The
15780
+ * virtual doorbell's sources ring only while the wrapper is bound to the
15781
+ * camera, and that binding belongs to `deviceManager.setWrapperActive`.
15782
+ * `unknown` means the gate could not be read; it is not "inactive" (D315).
15783
+ */
15784
+ var ExtensionSlotActivationSchema = object({
15785
+ state: _enum([
15786
+ "active",
15787
+ "inactive",
15788
+ "unknown"
15789
+ ]),
15790
+ authority: string(),
15791
+ detail: string().optional()
15792
+ });
15793
+ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
15794
+ state: literal("ok"),
15795
+ /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
15796
+ slotRef: string(),
15797
+ slot: ExtensionSlotIdSchema,
15798
+ /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
15799
+ authority: string(),
15800
+ activation: ExtensionSlotActivationSchema.nullable(),
15801
+ value: ExtensionSlotValueSchema,
15802
+ sources: array(ExtensionSlotSourceSchema),
15803
+ /**
15804
+ * Devices the owner links to the host ON ITS OWN, by structure, and that
15805
+ * are therefore not in `value` (D655): a camera's device-tree children, and
15806
+ * the child a picked container stands for (D356 — a container is never a
15807
+ * pick, its children are). Read-only; the editor shows them and may offer
15808
+ * per-device options on them (the linked-devices tracked-event opt-in).
15809
+ * Absent when the owner links nothing beyond the picks, and from an owner
15810
+ * older than D655.
15811
+ */
15812
+ impliedSources: array(ExtensionSlotSourceSchema).optional()
15813
+ }), object({
15814
+ state: literal("unreachable"),
15815
+ addonId: string(),
15816
+ reason: string()
15817
+ })]);
15818
+ var ExtensionCandidatesSchema = object({ candidates: array(object({
15819
+ deviceId: number().int(),
15820
+ name: string(),
15821
+ type: string(),
15822
+ location: string().nullable(),
15823
+ /** The container a child belongs to — "Spotlight 2" alone does not say which. */
15824
+ parentName: string().nullable(),
15825
+ /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
15826
+ suggested: boolean(),
15827
+ /** Why it is suggested ("same location"), null when it is not. */
15828
+ reason: string().nullable()
15829
+ })) });
15830
+ /**
15831
+ * What a write did. `none` — applied in place. `host` / `parent` — the owner
15832
+ * reloaded the host (or, for an accessory child, its parent) because the
15833
+ * write changed what the host REGISTERS. A slot never adds a capability to its
15834
+ * host — that is a composition (D663) — so today's owners answer `none`.
15835
+ */
15836
+ var ExtensionSetResultSchema = object({
15837
+ applied: literal(true),
15838
+ reload: _enum([
15839
+ "none",
15840
+ "host",
15841
+ "parent"
15842
+ ])
15843
+ });
15844
+ var ExtensionSlotRefInputSchema = object({
15845
+ deviceId: number().int(),
15846
+ slotRef: string().min(1)
15847
+ });
15848
+ var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
15849
+ method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
15850
+ kind: "mutation",
15851
+ auth: "admin"
15852
+ });
15853
+ /**
15434
15854
  * Per-field ownership (D663). A composition may CLAIM fields of a native
15435
15855
  * cap's runtime-state slice on an existing device: `replace` overlays the
15436
15856
  * claimed fields on the native slice, `add` builds a slice the device does
@@ -18440,17 +18860,25 @@ var NcScheduleSchema = object({
18440
18860
  */
18441
18861
  var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
18442
18862
  /**
18863
+ * How a summary window is SENT (D698): `rule` (absent) = ONE notification with
18864
+ * every section; `section` = one notification per section with something to
18865
+ * say (an unavailable section included), each titled by its section.
18866
+ */
18867
+ var NcStateSummarySplitSchema = _enum(["rule", "section"]);
18868
+ /**
18443
18869
  * `summary`: the rule sends NOTHING per event. When a window of `schedule`
18444
18870
  * CLOSES, it sends one notification with the current state of its kinds
18445
18871
  * (low batteries, consumables to replace, devices offline, updates
18446
- * available, ...), after its own filters. Nothing to report sends nothing.
18872
+ * available, ...), after its own filters — or, with `split: 'section'`
18873
+ * (D698), one notification per section. Nothing to report sends nothing.
18447
18874
  * The schedule is the ordinary `NcSchedule` (weekly windows, IANA timezone,
18448
18875
  * midnight crossing); the send time is each window's END. Refused on the
18449
18876
  * `alarm` family, which stays instant (`systemEventDeliveryProblems`).
18450
18877
  */
18451
18878
  var NcSystemEventDeliverySchema = discriminatedUnion("mode", [object({ mode: literal("instant") }), object({
18452
18879
  mode: literal("summary"),
18453
- schedule: NcScheduleSchema
18880
+ schedule: NcScheduleSchema,
18881
+ split: NcStateSummarySplitSchema.optional()
18454
18882
  })]);
18455
18883
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
18456
18884
  var NcPlateMatcherSchema = object({
@@ -18590,8 +19018,14 @@ var NcSensorTransitionSchema = _enum(["raised", "cleared"]);
18590
19018
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
18591
19019
  var NcZoneConditionSchema = object({
18592
19020
  ids: array(string().min(1)).min(1),
18593
- /** Quantifier over `ids` — at least one / every one visited. */
18594
- match: _enum(["any", "all"]).default("any")
19021
+ /**
19022
+ * LEGACY quantifier over `ids`. Absent = `any` (at least one visited), which
19023
+ * is what both editors mean and all they write since D690: "all of" was
19024
+ * removed from the editors because on an immediate rule it asked one
19025
+ * detection to stand in every zone at once. Still ACCEPTED, and `all` still
19026
+ * evaluated, so a stored rule keeps parsing and meaning what it meant.
19027
+ */
19028
+ match: _enum(["any", "all"]).optional()
18595
19029
  });
18596
19030
  /**
18597
19031
  * The P1 condition set — a flat AND of groups; absent group = pass;
@@ -19095,10 +19529,12 @@ var NcMediaPolicySchema = object({
19095
19529
  /**
19096
19530
  * Cooldown GRANULARITY over the subject's class — how much a fired
19097
19531
  * notification suppresses.
19098
- * - `shared` (default, and the absent value) — one window for the whole
19099
- * rule/scope: a cat silences the next dog for `cooldownSec`.
19100
- * - `per-class` — an independent window per detected class, so cat→dog fires
19101
- * at once and cat→cat still waits.
19532
+ * - `per-class` (default, and the absent value since 2026-10-01 — D36) — an
19533
+ * independent window per detected class: cat→dog fires at once, cat→cat
19534
+ * still waits.
19535
+ * - `shared` — one window for the whole rule/scope: a cat silences the next
19536
+ * dog for `cooldownSec`. Only written when an operator picks it; it is no
19537
+ * longer what an unset rule means.
19102
19538
  *
19103
19539
  * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
19104
19540
  * must not be swallowed by a bark's window (the precedent this generalizes —
@@ -19113,8 +19549,11 @@ var NcThrottleSchema = object({
19113
19549
  /**
19114
19550
  * Class granularity of the cooldown key. Optional rather than defaulted:
19115
19551
  * a Zod default does NOT run on the addon→addon cap path, so a persisted
19116
- * rule authored before this field simply carries none — and the engine
19117
- * reads absent as `shared`, the pre-existing behaviour.
19552
+ * rule authored before this field simply carries none. The engine used to
19553
+ * read absent as `shared` (D36); since 2026-10-01 it reads absent as
19554
+ * `per-class` — the operator's default — and only an explicit `shared`
19555
+ * still means `shared`. See `cooldownKey` / `keysPerClass` in the rule
19556
+ * engine, and D36's dated note.
19118
19557
  */
19119
19558
  granularity: NcThrottleGranularitySchema.optional()
19120
19559
  });
@@ -19438,11 +19877,23 @@ var NcStateSummaryPreviewSectionSchema = object({
19438
19877
  reason: string().optional()
19439
19878
  });
19440
19879
  /**
19880
+ * One notification a previewed summary would send (D698): the whole summary on
19881
+ * a `rule` split (no `section`), one section's on a `section` split.
19882
+ */
19883
+ var NcStateSummaryPreviewRowSchema = object({
19884
+ section: string().optional(),
19885
+ /** The section's name on a per-section row; every reported section's, joined, on a combined one. */
19886
+ title: string(),
19887
+ text: string(),
19888
+ count: number().int().nonnegative()
19889
+ });
19890
+ /**
19441
19891
  * The summary a rule would send now. `empty` = nothing to report and every
19442
19892
  * section read: such a summary is NOT sent. `dropped` counts the open states
19443
19893
  * the rule's own filters (or a camera mute) left out, by reason.
19444
19894
  * `excludedGroups` names the kind groups selected that have no state to report
19445
- * (backups & exports).
19895
+ * (backups & exports). `split` and `rows` (D698) say how it would be sent —
19896
+ * optional, so an older hub's answer still parses.
19446
19897
  */
19447
19898
  var NcStateSummaryPreviewSchema = object({
19448
19899
  empty: boolean(),
@@ -19450,7 +19901,9 @@ var NcStateSummaryPreviewSchema = object({
19450
19901
  text: string(),
19451
19902
  sections: array(NcStateSummaryPreviewSectionSchema),
19452
19903
  dropped: record(string(), number().int().nonnegative()),
19453
- excludedGroups: array(string())
19904
+ excludedGroups: array(string()),
19905
+ split: NcStateSummarySplitSchema.optional(),
19906
+ rows: array(NcStateSummaryPreviewRowSchema).optional()
19454
19907
  });
19455
19908
  var NcTestResultSchema = object({
19456
19909
  recordId: string(),
@@ -20466,7 +20919,7 @@ function cameraSensorRefKey(ref) {
20466
20919
  }
20467
20920
  /** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
20468
20921
  var CameraSensorsModeSchema = _enum(["in-addition"]);
20469
- object({
20922
+ var CameraSensorsConfigSchema = object({
20470
20923
  mode: CameraSensorsModeSchema,
20471
20924
  sensors: array(CameraSensorRefSchema).min(1).max(8)
20472
20925
  }).superRefine((value, ctx) => {
@@ -22371,7 +22824,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
22371
22824
  trackIds: array(string()).min(1)
22372
22825
  }), object({
22373
22826
  deleted: number().int(),
22374
- failed: array(string()).readonly()
22827
+ failed: array(string()).readonly(),
22828
+ sparedMediaIds: array(number().int()).readonly().optional()
22375
22829
  }), {
22376
22830
  kind: "mutation",
22377
22831
  auth: "admin"
@@ -22380,7 +22834,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
22380
22834
  deviceId: number(),
22381
22835
  trackId: string(),
22382
22836
  flags: TrackFlagsPatchSchema
22383
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
22837
+ }), 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, {
22384
22838
  kind: "query",
22385
22839
  auth: "admin"
22386
22840
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -24578,7 +25032,64 @@ var NodeInferenceDevicesSchema = object({
24578
25032
  reachable: boolean(),
24579
25033
  devices: array(NodeInferenceDeviceSchema).readonly()
24580
25034
  });
24581
- method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
25035
+ /**
25036
+ * Pipeline Orchestrator capability — global load balancer + camera dispatcher.
25037
+ *
25038
+ * Lives on the hub. Tracks the camera-to-agent assignment map, listens to
25039
+ * device lifecycle events, queries each runner's capacity + hardware
25040
+ * profile, and dispatches `attachCamera` / `detachCamera` cap calls to the
25041
+ * appropriate runner instances. Persists assignments via the multi-level
25042
+ * settings store so they survive hub restarts.
25043
+ *
25044
+ * Strictly the control plane: never sees a frame, never calls inference,
25045
+ * never drains queues. The runner does that work locally on each agent.
25046
+ */
25047
+ /**
25048
+ * The input of `setCameraSensors` (G5, D676): the ONE typed write path of a
25049
+ * camera's attached sensors (D672). `config: null` removes the attachment —
25050
+ * the camera reads `not-configured` again, never `unreadable`.
25051
+ */
25052
+ var SetCameraSensorsInputSchema = object({
25053
+ deviceId: number().int().nonnegative(),
25054
+ /** `null` removes the attachment: the camera goes back to `not-configured`. */
25055
+ config: CameraSensorsConfigSchema.nullable()
25056
+ });
25057
+ /**
25058
+ * Why an early occupancy look (D691) was not scheduled.
25059
+ *
25060
+ * - `unknown-camera` — no session was ever dispatched for it, so there is no
25061
+ * node and no config to attach a burst with.
25062
+ * - `out-of-range` — the ask is negative or further out than the orchestrator
25063
+ * will hold a timer for; the parked-object cadence is the answer there.
25064
+ * - `no-burst-producer` — this build has no burst producer at all.
25065
+ * - `already-looked` — this camera's ONE early look since its last session has
25066
+ * been spent. A look's own burst can re-arm a flickering flip, and a look
25067
+ * per arm would chain a burst every ~30 s forever (review H2); the next
25068
+ * real session re-arms the budget.
25069
+ */
25070
+ var OccupancyLookRefusalSchema = _enum([
25071
+ "unknown-camera",
25072
+ "out-of-range",
25073
+ "no-burst-producer",
25074
+ "already-looked"
25075
+ ]);
25076
+ method(object({
25077
+ deviceId: number().int().nonnegative(),
25078
+ /** How long from NOW until the pending flip's sustain window ends. RELATIVE,
25079
+ * so the caller's clock and the orchestrator's never have to agree. */
25080
+ afterMs: number().finite(),
25081
+ /** Why, for the log. */
25082
+ reason: string()
25083
+ }), object({
25084
+ scheduled: boolean(),
25085
+ /** When `scheduled`: how long until the burst is dialled. */
25086
+ dueInMs: number().optional(),
25087
+ /** When not `scheduled`: why. */
25088
+ refusedBecause: OccupancyLookRefusalSchema.optional()
25089
+ }), {
25090
+ kind: "mutation",
25091
+ auth: "admin"
25092
+ }), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
24582
25093
  kind: "mutation",
24583
25094
  auth: "admin"
24584
25095
  }), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
@@ -24732,7 +25243,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
24732
25243
  }), CameraSwitchGroupSchema, {
24733
25244
  kind: "mutation",
24734
25245
  auth: "admin"
24735
- }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
25246
+ }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(SetCameraSensorsInputSchema, object({ success: literal(true) }), {
25247
+ kind: "mutation",
25248
+ auth: "admin"
25249
+ }), method(_void(), DiskReconcileJobSchema, {
24736
25250
  kind: "mutation",
24737
25251
  auth: "admin"
24738
25252
  }), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
@@ -27042,219 +27556,6 @@ DeviceType.Camera, method(object({
27042
27556
  auth: "protected"
27043
27557
  });
27044
27558
  /**
27045
- * Doorbell button cap. Two kinds of providers coexist behind this cap
27046
- * name (same pattern as `snapshot`):
27047
- *
27048
- * - **Native** providers: registered per-device by device-driver
27049
- * addons via `ctx.registerNativeCap` — either on a
27050
- * `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
27051
- * or directly on the camera (Reolink registers at camera level).
27052
- * Emits an `onPressed` event every time the firmware pushes a
27053
- * ring; status tracks the last press and a pressCount since start
27054
- * (diagnostic).
27055
- *
27056
- * - **Wrapper** provider: the `virtual-doorbell` system builtin
27057
- * (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
27058
- * device (contact / switch / event-emitter …) into a doorbell for
27059
- * a camera. `defaultActive: false` — the operator explicitly binds
27060
- * it per camera in the device-bindings UI, then picks the source
27061
- * device + trigger in the per-device settings.
27062
- *
27063
- * The DeviceEventPropagator re-emits `onPressed` on the camera parent
27064
- * — subscribers listening at the camera level receive ring events
27065
- * with `via[]` populated. No code on the parent needed.
27066
- */
27067
- var DoorbellStatusSchema = object({
27068
- /** Ms epoch of the last press. null = never observed since this provider started. */
27069
- lastPressedAt: number().nullable(),
27070
- /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
27071
- pressCountSinceStart: number()
27072
- });
27073
- var DoorbellPressEventSchema = object({
27074
- deviceId: number(),
27075
- timestamp: number()
27076
- });
27077
- /**
27078
- * The `doorbell-source` extension slot's editable value (D648): the camera's
27079
- * virtual-doorbell trigger devices, exactly what the wrapper's
27080
- * `doorbellSources` persists (as `{ deviceId }` records).
27081
- */
27082
- var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
27083
- /**
27084
- * The `doorbell-source` slot — which devices ring this camera's VIRTUAL
27085
- * doorbell, owned by the `virtual-doorbell` wrapper over its
27086
- * `doorbellSources` store (D648). A source rings when one of its
27087
- * `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
27088
- * different authority (`deviceManager.setWrapperActive`, D62) — the slot
27089
- * reports it, it never writes it.
27090
- */
27091
- var DOORBELL_SOURCE_SLOT = {
27092
- id: "doorbell-source",
27093
- label: "Doorbell trigger devices",
27094
- 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.",
27095
- shape: "association",
27096
- hostDeviceTypes: [DeviceType.Camera],
27097
- sourceCaps: SOURCE_CAPS,
27098
- cardinality: "many",
27099
- value: DoorbellSourceSlotValueSchema
27100
- };
27101
- var doorbellCapability = {
27102
- name: "doorbell",
27103
- scope: "device",
27104
- deviceNative: true,
27105
- mode: "singleton",
27106
- kind: "wrapper",
27107
- defaultActive: false,
27108
- deviceTypes: [DeviceType.Button, DeviceType.Camera],
27109
- extensionSlots: [DOORBELL_SOURCE_SLOT],
27110
- methods: {},
27111
- events: {
27112
- /**
27113
- * Fires once per physical press. Reolink delivers via Baichuan
27114
- * push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
27115
- * release/duration — it's a pulse.
27116
- */
27117
- onPressed: {
27118
- data: DoorbellPressEventSchema,
27119
- fromState: {
27120
- field: "lastPressedAt",
27121
- on: "advance"
27122
- }
27123
- } },
27124
- status: {
27125
- schema: DoorbellStatusSchema,
27126
- kind: "push"
27127
- },
27128
- /**
27129
- * Runtime-state slice — last press timestamp + lifetime press count.
27130
- * Mirrored by the kernel and readable via
27131
- * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
27132
- * without subscribing.
27133
- */
27134
- runtimeState: DoorbellStatusSchema,
27135
- /**
27136
- * 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.
27137
- *
27138
- * See `RuntimeStateDurability`. Enforced by
27139
- * `scripts/check-runtime-state-durability.ts`.
27140
- */
27141
- durability: "restored"
27142
- };
27143
- var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
27144
- DeviceType.Camera, DeviceType.Camera;
27145
- /** A slot's editable value, discriminated on `slot`. */
27146
- var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
27147
- DeviceType.Camera;
27148
- var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
27149
- state: literal("unreachable"),
27150
- reason: string()
27151
- })]);
27152
- /** One provider of slots — the D554 source-listing row. */
27153
- var ExtensionSourceSchema = object({
27154
- /** The routing prefix of every `slotRef` this provider serves. */
27155
- source: string(),
27156
- label: string(),
27157
- /** Stamped by the dispatcher from the registry (D557). */
27158
- addonId: string().optional(),
27159
- availability: ExtensionSourceAvailabilitySchema
27160
- });
27161
- /**
27162
- * How one picked source stands. `missing` — no such device (deleted, or an id
27163
- * that never existed); `foreign` — a device the slot's owner cannot read from
27164
- * (a source owned by another addon); `unavailable` — it exists but is not a
27165
- * valid source now (a container, which is never a pick). A source in any of
27166
- * these states is SHOWN, never silently dropped or re-pointed.
27167
- */
27168
- var ExtensionSourceHealthSchema = _enum([
27169
- "ok",
27170
- "missing",
27171
- "foreign",
27172
- "unavailable"
27173
- ]);
27174
- var ExtensionSlotSourceSchema = object({
27175
- deviceId: number().int(),
27176
- /** The device's name, or null when it could not be resolved (`missing`). */
27177
- name: string().nullable(),
27178
- health: ExtensionSourceHealthSchema,
27179
- detail: string().optional()
27180
- });
27181
- /**
27182
- * A DIFFERENT authority that gates whether the slot's sources do anything —
27183
- * reported read-only, named, never written through this contract (D62). The
27184
- * virtual doorbell's sources ring only while the wrapper is bound to the
27185
- * camera, and that binding belongs to `deviceManager.setWrapperActive`.
27186
- * `unknown` means the gate could not be read; it is not "inactive" (D315).
27187
- */
27188
- var ExtensionSlotActivationSchema = object({
27189
- state: _enum([
27190
- "active",
27191
- "inactive",
27192
- "unknown"
27193
- ]),
27194
- authority: string(),
27195
- detail: string().optional()
27196
- });
27197
- var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
27198
- state: literal("ok"),
27199
- /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
27200
- slotRef: string(),
27201
- slot: ExtensionSlotIdSchema,
27202
- /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
27203
- authority: string(),
27204
- activation: ExtensionSlotActivationSchema.nullable(),
27205
- value: ExtensionSlotValueSchema,
27206
- sources: array(ExtensionSlotSourceSchema),
27207
- /**
27208
- * Devices the owner links to the host ON ITS OWN, by structure, and that
27209
- * are therefore not in `value` (D655): a camera's device-tree children, and
27210
- * the child a picked container stands for (D356 — a container is never a
27211
- * pick, its children are). Read-only; the editor shows them and may offer
27212
- * per-device options on them (the linked-devices tracked-event opt-in).
27213
- * Absent when the owner links nothing beyond the picks, and from an owner
27214
- * older than D655.
27215
- */
27216
- impliedSources: array(ExtensionSlotSourceSchema).optional()
27217
- }), object({
27218
- state: literal("unreachable"),
27219
- addonId: string(),
27220
- reason: string()
27221
- })]);
27222
- var ExtensionCandidatesSchema = object({ candidates: array(object({
27223
- deviceId: number().int(),
27224
- name: string(),
27225
- type: string(),
27226
- location: string().nullable(),
27227
- /** The container a child belongs to — "Spotlight 2" alone does not say which. */
27228
- parentName: string().nullable(),
27229
- /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
27230
- suggested: boolean(),
27231
- /** Why it is suggested ("same location"), null when it is not. */
27232
- reason: string().nullable()
27233
- })) });
27234
- /**
27235
- * What a write did. `none` — applied in place. `host` / `parent` — the owner
27236
- * reloaded the host (or, for an accessory child, its parent) because the
27237
- * write changed what the host REGISTERS. A slot never adds a capability to its
27238
- * host — that is a composition (D663) — so today's owners answer `none`.
27239
- */
27240
- var ExtensionSetResultSchema = object({
27241
- applied: literal(true),
27242
- reload: _enum([
27243
- "none",
27244
- "host",
27245
- "parent"
27246
- ])
27247
- });
27248
- var ExtensionSlotRefInputSchema = object({
27249
- deviceId: number().int(),
27250
- slotRef: string().min(1)
27251
- });
27252
- var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
27253
- method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
27254
- kind: "mutation",
27255
- auth: "admin"
27256
- });
27257
- /**
27258
27559
  * Optional client-side hints sent at session creation to help the provider
27259
27560
  * pick the best native source. All fields optional — a viewer that knows
27260
27561
  * nothing still gets a sane default. (Relocated from the retired `webrtc`
@@ -38428,47 +38729,6 @@ var zoneRulesCapability = {
38428
38729
  */
38429
38730
  durability: "restored"
38430
38731
  };
38431
- var NUMBER = {
38432
- kind: "fixed",
38433
- result: ["number"]
38434
- };
38435
- var BOOLEAN = {
38436
- kind: "fixed",
38437
- result: ["boolean"]
38438
- };
38439
- Object.freeze({
38440
- min: NUMBER,
38441
- max: NUMBER,
38442
- abs: NUMBER,
38443
- floor: NUMBER,
38444
- ceil: NUMBER,
38445
- sqrt: NUMBER,
38446
- round: NUMBER,
38447
- pow: NUMBER,
38448
- clamp: NUMBER,
38449
- avg: NUMBER,
38450
- sum: NUMBER,
38451
- age: NUMBER,
38452
- convert: NUMBER,
38453
- coalesce: { kind: "coalesce" },
38454
- any: BOOLEAN,
38455
- all: BOOLEAN,
38456
- within: BOOLEAN,
38457
- latest: {
38458
- kind: "fixed",
38459
- result: ["number", "null"]
38460
- },
38461
- number: {
38462
- kind: "fixed",
38463
- result: ["number", "null"]
38464
- },
38465
- rose: {
38466
- kind: "fixed",
38467
- result: ["number", "null"]
38468
- },
38469
- count: NUMBER
38470
- });
38471
- `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
38472
38732
  /**
38473
38733
  * Accessory device helpers — shared across drivers.
38474
38734
  *
@@ -42414,6 +42674,12 @@ Object.freeze({
42414
42674
  addonId: null,
42415
42675
  access: "view"
42416
42676
  },
42677
+ "coreBlocks.listComposableCaps": {
42678
+ capName: "core-blocks",
42679
+ capScope: "system",
42680
+ addonId: null,
42681
+ access: "view"
42682
+ },
42417
42683
  "coreBlocks.listCompositions": {
42418
42684
  capName: "core-blocks",
42419
42685
  capScope: "system",
@@ -42492,6 +42758,18 @@ Object.freeze({
42492
42758
  addonId: null,
42493
42759
  access: "view"
42494
42760
  },
42761
+ "databaseSnapshot.listDatabases": {
42762
+ capName: "database-snapshot",
42763
+ capScope: "system",
42764
+ addonId: null,
42765
+ access: "view"
42766
+ },
42767
+ "databaseSnapshot.writeSnapshot": {
42768
+ capName: "database-snapshot",
42769
+ capScope: "system",
42770
+ addonId: null,
42771
+ access: "create"
42772
+ },
42495
42773
  "dataStoreProvider.aggregate": {
42496
42774
  capName: "data-store-provider",
42497
42775
  capScope: "system",
@@ -45228,6 +45506,12 @@ Object.freeze({
45228
45506
  addonId: null,
45229
45507
  access: "create"
45230
45508
  },
45509
+ "pipelineAnalytics.clearTrackRelation": {
45510
+ capName: "pipeline-analytics",
45511
+ capScope: "device",
45512
+ addonId: null,
45513
+ access: "delete"
45514
+ },
45231
45515
  "pipelineAnalytics.clearTracks": {
45232
45516
  capName: "pipeline-analytics",
45233
45517
  capScope: "device",
@@ -45480,6 +45764,12 @@ Object.freeze({
45480
45764
  addonId: null,
45481
45765
  access: "view"
45482
45766
  },
45767
+ "pipelineAnalytics.listTrackRelations": {
45768
+ capName: "pipeline-analytics",
45769
+ capScope: "device",
45770
+ addonId: null,
45771
+ access: "view"
45772
+ },
45483
45773
  "pipelineAnalytics.listTracks": {
45484
45774
  capName: "pipeline-analytics",
45485
45775
  capScope: "device",
@@ -45594,6 +45884,18 @@ Object.freeze({
45594
45884
  addonId: null,
45595
45885
  access: "create"
45596
45886
  },
45887
+ "pipelineAnalytics.setTrackPurity": {
45888
+ capName: "pipeline-analytics",
45889
+ capScope: "device",
45890
+ addonId: null,
45891
+ access: "create"
45892
+ },
45893
+ "pipelineAnalytics.setTrackRelation": {
45894
+ capName: "pipeline-analytics",
45895
+ capScope: "device",
45896
+ addonId: null,
45897
+ access: "create"
45898
+ },
45597
45899
  "pipelineAnalytics.startStorageMigrationMove": {
45598
45900
  capName: "pipeline-analytics",
45599
45901
  capScope: "device",
@@ -46032,6 +46334,12 @@ Object.freeze({
46032
46334
  addonId: null,
46033
46335
  access: "delete"
46034
46336
  },
46337
+ "pipelineOrchestrator.requestOccupancyLook": {
46338
+ capName: "pipeline-orchestrator",
46339
+ capScope: "system",
46340
+ addonId: null,
46341
+ access: "create"
46342
+ },
46035
46343
  "pipelineOrchestrator.resetNodePipelineDefaults": {
46036
46344
  capName: "pipeline-orchestrator",
46037
46345
  capScope: "system",
@@ -46098,6 +46406,12 @@ Object.freeze({
46098
46406
  addonId: null,
46099
46407
  access: "create"
46100
46408
  },
46409
+ "pipelineOrchestrator.setCameraSensors": {
46410
+ capName: "pipeline-orchestrator",
46411
+ capScope: "system",
46412
+ addonId: null,
46413
+ access: "create"
46414
+ },
46101
46415
  "pipelineOrchestrator.setCameraStepOverride": {
46102
46416
  capName: "pipeline-orchestrator",
46103
46417
  capScope: "system",
@@ -49508,6 +49822,11 @@ Object.freeze({
49508
49822
  form: "single",
49509
49823
  optional: false
49510
49824
  }],
49825
+ "pipelineAnalytics.clearTrackRelation": [{
49826
+ name: "deviceId",
49827
+ form: "single",
49828
+ optional: false
49829
+ }],
49511
49830
  "pipelineAnalytics.clearTracks": [{
49512
49831
  name: "deviceId",
49513
49832
  form: "single",
@@ -49658,6 +49977,11 @@ Object.freeze({
49658
49977
  form: "single",
49659
49978
  optional: false
49660
49979
  }],
49980
+ "pipelineAnalytics.listTrackRelations": [{
49981
+ name: "deviceId",
49982
+ form: "single",
49983
+ optional: false
49984
+ }],
49661
49985
  "pipelineAnalytics.listTracks": [{
49662
49986
  name: "deviceId",
49663
49987
  form: "single",
@@ -49728,6 +50052,16 @@ Object.freeze({
49728
50052
  form: "single",
49729
50053
  optional: false
49730
50054
  }],
50055
+ "pipelineAnalytics.setTrackPurity": [{
50056
+ name: "deviceId",
50057
+ form: "single",
50058
+ optional: false
50059
+ }],
50060
+ "pipelineAnalytics.setTrackRelation": [{
50061
+ name: "deviceId",
50062
+ form: "single",
50063
+ optional: false
50064
+ }],
49731
50065
  "pipelineAnalytics.wipeAllAnalytics": [{
49732
50066
  name: "deviceId",
49733
50067
  form: "single",
@@ -49798,6 +50132,11 @@ Object.freeze({
49798
50132
  form: "single",
49799
50133
  optional: false
49800
50134
  }],
50135
+ "pipelineOrchestrator.requestOccupancyLook": [{
50136
+ name: "deviceId",
50137
+ form: "single",
50138
+ optional: false
50139
+ }],
49801
50140
  "pipelineOrchestrator.resolvePipeline": [{
49802
50141
  name: "deviceId",
49803
50142
  form: "single",
@@ -49808,6 +50147,11 @@ Object.freeze({
49808
50147
  form: "single",
49809
50148
  optional: false
49810
50149
  }],
50150
+ "pipelineOrchestrator.setCameraSensors": [{
50151
+ name: "deviceId",
50152
+ form: "single",
50153
+ optional: false
50154
+ }],
49811
50155
  "pipelineOrchestrator.setCameraStepOverride": [{
49812
50156
  name: "deviceId",
49813
50157
  form: "single",
@@ -50954,6 +51298,18 @@ var STATE_SUMMARY_VARS = [
50954
51298
  systemEventKinds: [...SUMMARISABLE],
50955
51299
  systemEventDeliveries: ["summary"]
50956
51300
  },
51301
+ {
51302
+ name: "summarySection",
51303
+ label: "Summary: this section",
51304
+ description: "The section a per-section summary row is about (D698); on a summary sent as one message, every section it reports, comma-separated.",
51305
+ example: "Batterie scariche",
51306
+ group: "system",
51307
+ families: ["rule"],
51308
+ fields: [...RULE_TEXT],
51309
+ kinds: ["system"],
51310
+ systemEventKinds: [...SUMMARISABLE],
51311
+ systemEventDeliveries: ["summary"]
51312
+ },
50957
51313
  ...STATE_SUMMARY_SECTION_VARS.map((v) => ({
50958
51314
  name: v.name,
50959
51315
  label: v.label,
@@ -51030,6 +51386,37 @@ var STATE_SUMMARY_VARS = [
51030
51386
  [...RULE_TEXT],
51031
51387
  ...STATE_SUMMARY_VARS
51032
51388
  ];
51389
+ new Set([
51390
+ "disarmed",
51391
+ "armed_home",
51392
+ "armed_away",
51393
+ "armed_night",
51394
+ "armed_vacation",
51395
+ "armed_custom_bypass",
51396
+ "arming",
51397
+ "disarming",
51398
+ "pending",
51399
+ "triggered",
51400
+ "open",
51401
+ "opening",
51402
+ "closing",
51403
+ "closed",
51404
+ "stopped",
51405
+ "locked",
51406
+ "unlocked",
51407
+ "locking",
51408
+ "unlocking",
51409
+ "jammed",
51410
+ "on",
51411
+ "off",
51412
+ "home",
51413
+ "not_home",
51414
+ "matched",
51415
+ "diverged",
51416
+ "unknown",
51417
+ "latched",
51418
+ "live"
51419
+ ]);
51033
51420
  /**
51034
51421
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
51035
51422
  *