@camstack/addon-provider-amcrest 0.2.123 → 0.2.124

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.js CHANGED
@@ -5405,7 +5405,7 @@ var ZodIssueCode = {
5405
5405
  var ZodFirstPartyTypeKind;
5406
5406
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5407
5407
  //#endregion
5408
- //#region ../types/dist/sleep-C-v96WpE.mjs
5408
+ //#region ../types/dist/sleep-gU6hqv4_.mjs
5409
5409
  /**
5410
5410
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5411
5411
  * window to float samples (D455).
@@ -8984,6 +8984,82 @@ var ArchivedDebugNoteQueryInputSchema = object({
8984
8984
  /** Max rows returned, newest-first. */
8985
8985
  limit: number().int().min(1).max(1e3).optional()
8986
8986
  });
8987
+ var TrackRelationKindSchema = _enum(["same-subject", "different-subjects"]);
8988
+ var TrackSideSchema = _enum(["before", "after"]);
8989
+ var TrackPurityValueSchema = _enum(["mixed", "not-a-subject"]);
8990
+ var TrackRelationSchema = object({
8991
+ id: string(),
8992
+ deviceId: number().int(),
8993
+ leftTrackId: string(),
8994
+ rightTrackId: string(),
8995
+ leftSide: TrackSideSchema.nullable(),
8996
+ rightSide: TrackSideSchema.nullable(),
8997
+ relation: TrackRelationKindSchema,
8998
+ presence: literal("continuous").nullable(),
8999
+ leftStartedAt: number().int().nullable(),
9000
+ rightStartedAt: number().int().nullable(),
9001
+ createdAt: number().int(),
9002
+ updatedAt: number().int(),
9003
+ author: string().nullable()
9004
+ });
9005
+ var TrackPuritySchema = object({
9006
+ id: string(),
9007
+ deviceId: number().int(),
9008
+ sourceTrackId: string(),
9009
+ purity: TrackPurityValueSchema,
9010
+ switchAtMs: number().int().nullable(),
9011
+ startedAt: number().int().nullable(),
9012
+ createdAt: number().int(),
9013
+ updatedAt: number().int(),
9014
+ author: string().nullable()
9015
+ });
9016
+ var SetTrackRelationInputSchema = object({
9017
+ deviceId: number().int(),
9018
+ trackId: string().min(1),
9019
+ otherTrackId: string().min(1),
9020
+ relation: TrackRelationKindSchema,
9021
+ presence: literal("continuous").optional(),
9022
+ trackSide: TrackSideSchema.optional(),
9023
+ otherSide: TrackSideSchema.optional()
9024
+ });
9025
+ var ClearTrackRelationInputSchema = object({
9026
+ deviceId: number().int(),
9027
+ trackId: string().min(1),
9028
+ otherTrackId: string().min(1)
9029
+ });
9030
+ var ClearTrackRelationResultSchema = object({ cleared: boolean() });
9031
+ var SetTrackPurityInputSchema = object({
9032
+ deviceId: number().int(),
9033
+ trackId: string().min(1),
9034
+ purity: _enum([
9035
+ "pure",
9036
+ "mixed",
9037
+ "not-a-subject"
9038
+ ]),
9039
+ switchAtMs: number().int().optional()
9040
+ });
9041
+ /** `null` when `pure` cleared the row. */
9042
+ var SetTrackPurityResultSchema = object({ purity: TrackPuritySchema.nullable() });
9043
+ var ListTrackRelationsInputSchema = object({
9044
+ deviceId: number().int(),
9045
+ trackId: string().optional(),
9046
+ since: number().int().optional(),
9047
+ until: number().int().optional(),
9048
+ limit: number().int().min(1).max(5e3).optional()
9049
+ });
9050
+ var ListTrackRelationsResultSchema = object({
9051
+ relations: array(TrackRelationSchema).readonly(),
9052
+ purities: array(TrackPuritySchema).readonly(),
9053
+ truncated: boolean()
9054
+ });
9055
+ _enum([
9056
+ "unknown-track",
9057
+ "cross-device",
9058
+ "self-relation",
9059
+ "contradiction",
9060
+ "switch-outside-track",
9061
+ "switch-needs-mixed"
9062
+ ]);
8987
9063
  /**
8988
9064
  * Ops-log — the durable, append-only operations audit shared by the
8989
9065
  * recordings and events management surfaces.
@@ -11537,6 +11613,68 @@ method(object({
11537
11613
  password: string()
11538
11614
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
11539
11615
  /**
11616
+ * How long one snapshot may take end to end: the pinned copy of the whole
11617
+ * database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
11618
+ * disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
11619
+ * generous because a timeout fails the whole backup run.
11620
+ */
11621
+ var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
11622
+ /**
11623
+ * The databases an owner snapshots — declared by the OWNER, so a caller never
11624
+ * guesses which file is live from what sits beside it (a cleanly closed
11625
+ * database has no sidecars and is just as owned). Paths are absolute on the
11626
+ * owner's host.
11627
+ */
11628
+ var DatabaseSnapshotTargetsSchema = object({ databases: array(object({ livePath: string() })) });
11629
+ /** One b-tree table of the snapshot and the rows it holds. */
11630
+ var DatabaseSnapshotTableSchema = object({
11631
+ name: string(),
11632
+ rows: number().int().nonnegative()
11633
+ });
11634
+ /**
11635
+ * What the owner wrote. Every path is ABSOLUTE on the owner's host — the
11636
+ * caller pins the call to its own node, so it can read the file; a caller
11637
+ * that finds the path outside its own data root refuses it rather than
11638
+ * archiving something it cannot place.
11639
+ */
11640
+ var DatabaseSnapshotResultSchema = object({
11641
+ /** The live database the snapshot copies. Never to be copied as a file. */
11642
+ livePath: string(),
11643
+ /** The verified copy: `<livePath>` + {@link DATABASE_SNAPSHOT_SUFFIX}. */
11644
+ snapshotPath: string(),
11645
+ sizeBytes: number().int().nonnegative(),
11646
+ pageCount: number().int().nonnegative(),
11647
+ pageSize: number().int().positive(),
11648
+ /**
11649
+ * Every b-tree table with its row count. Read inside the SAME read
11650
+ * transaction the copy was taken from, and found EQUAL on the copy — so
11651
+ * this is the content of the snapshot, not an estimate of the source.
11652
+ */
11653
+ tables: array(DatabaseSnapshotTableSchema),
11654
+ /** Wall time of the pinned copy (row counts included). */
11655
+ copyMs: number().nonnegative(),
11656
+ /** Wall time of the checks on the copy (`integrity_check`, row counts). */
11657
+ verifyMs: number().nonnegative(),
11658
+ /** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
11659
+ takenAt: number()
11660
+ });
11661
+ /**
11662
+ * A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
11663
+ * the same facts, with both paths relative to the archive root (the node's
11664
+ * data dir), because an archive outlives the host that made it.
11665
+ */
11666
+ var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
11667
+ /** Archive-relative path of the live database the archive does NOT carry. */
11668
+ livePath: string(),
11669
+ /** Archive-relative path of the verified copy it carries in its place. */
11670
+ snapshotPath: string()
11671
+ });
11672
+ method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(object({}), DatabaseSnapshotResultSchema, {
11673
+ kind: "mutation",
11674
+ auth: "admin",
11675
+ timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
11676
+ });
11677
+ /**
11540
11678
  * Orchestrator-side destination metadata. The orchestrator computes
11541
11679
  * `id = <addonId>:<subId>` from its provider lookup so consumers
11542
11680
  * (admin UI, restore flow) see one canonical key.
@@ -11647,7 +11785,12 @@ var ArchiveManifestSchema = object({
11647
11785
  locations: array(string()),
11648
11786
  entries: array(ArchiveEntrySchema),
11649
11787
  totalBytes: number(),
11650
- totalFiles: number()
11788
+ totalFiles: number(),
11789
+ /**
11790
+ * Live SQLite databases this archive carries as their OWNER's verified
11791
+ * snapshot instead of as files (D693). Absent on archives made before.
11792
+ */
11793
+ sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional()
11651
11794
  });
11652
11795
  var LocationStatSchema = object({
11653
11796
  name: string(),
@@ -13173,6 +13316,116 @@ var CompositionBlockStateSchema = object({
13173
13316
  reason: string().optional(),
13174
13317
  fields: array(CompositionFieldStateSchema)
13175
13318
  });
13319
+ var ComposerBlockSchema = object({
13320
+ id: string().min(1),
13321
+ name: string().min(1).max(120),
13322
+ enabled: boolean(),
13323
+ updatedAt: number(),
13324
+ composition: CompositionSchema
13325
+ });
13326
+ /**
13327
+ * A stored composition row that no longer PARSES — a schema a release
13328
+ * tightened, a row written by a newer build. Sent by id so the composer keeps
13329
+ * its device as a placeholder and reports the block `failed` naming the parse
13330
+ * error. Leaving it out would read, twice, exactly like a delete (D49).
13331
+ */
13332
+ var ComposerUnreadableBlockSchema = object({
13333
+ id: string().min(1),
13334
+ /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
13335
+ name: string().nullable(),
13336
+ /** The parse error, in the operator's words. */
13337
+ error: string()
13338
+ });
13339
+ method(object({
13340
+ /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
13341
+ integrationId: string().nullable(),
13342
+ /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
13343
+ storeLoaded: boolean(),
13344
+ blocks: array(ComposerBlockSchema),
13345
+ /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
13346
+ restartBlockIds: array(string()),
13347
+ /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
13348
+ unreadableBlocks: array(ComposerUnreadableBlockSchema)
13349
+ }), object({
13350
+ blocks: array(object({
13351
+ blockId: string(),
13352
+ status: CompositionRunStatusSchema,
13353
+ reason: string().optional()
13354
+ })),
13355
+ /**
13356
+ * False when the composer declared and withdrew NOTHING (store not loaded,
13357
+ * integration unknown, its own rows unread or read empty once). An empty
13358
+ * apply the caller owes is paid off only by one the composer acted on (D49).
13359
+ */
13360
+ acted: boolean()
13361
+ }), {
13362
+ kind: "mutation",
13363
+ auth: "admin"
13364
+ }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
13365
+ var NUMBER = {
13366
+ kind: "fixed",
13367
+ result: ["number"]
13368
+ };
13369
+ var BOOLEAN = {
13370
+ kind: "fixed",
13371
+ result: ["boolean"]
13372
+ };
13373
+ Object.freeze({
13374
+ min: NUMBER,
13375
+ max: NUMBER,
13376
+ abs: NUMBER,
13377
+ floor: NUMBER,
13378
+ ceil: NUMBER,
13379
+ sqrt: NUMBER,
13380
+ round: NUMBER,
13381
+ pow: NUMBER,
13382
+ clamp: NUMBER,
13383
+ avg: NUMBER,
13384
+ sum: NUMBER,
13385
+ age: NUMBER,
13386
+ convert: NUMBER,
13387
+ coalesce: { kind: "coalesce" },
13388
+ any: BOOLEAN,
13389
+ all: BOOLEAN,
13390
+ within: BOOLEAN,
13391
+ latest: {
13392
+ kind: "fixed",
13393
+ result: ["number", "null"]
13394
+ },
13395
+ number: {
13396
+ kind: "fixed",
13397
+ result: ["number", "null"]
13398
+ },
13399
+ rose: {
13400
+ kind: "fixed",
13401
+ result: ["number", "null"]
13402
+ },
13403
+ count: NUMBER
13404
+ });
13405
+ `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
13406
+ /**
13407
+ * What a composition may BUILD on a device type (G2, D676): the caps a new
13408
+ * device of that type, or an existing one that lacks them, can be given. The
13409
+ * blockers are the validator's own refusal codes, and a spec compares this
13410
+ * listing with `planComposition` for every capability — the editor can never
13411
+ * offer a feature the save would refuse for the same reason.
13412
+ */
13413
+ var ComposableFieldSchema = object({
13414
+ path: string(),
13415
+ kind: CompositionFieldKindSchema,
13416
+ nullable: boolean(),
13417
+ required: boolean(),
13418
+ enumValues: array(string()).optional()
13419
+ });
13420
+ var ComposableCapabilitiesSchema = object({ caps: array(object({
13421
+ cap: string(),
13422
+ fields: array(ComposableFieldSchema),
13423
+ /** Present for an item-array cap (`consumables.items`). */
13424
+ itemArray: object({
13425
+ path: string(),
13426
+ keyField: string()
13427
+ }).optional()
13428
+ })) });
13176
13429
  /** Where a block runs. The operator chooses — a block driving a device on an
13177
13430
  * agent is the reason placement is not fixed to the hub. */
13178
13431
  var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
@@ -13337,7 +13590,7 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
13337
13590
  }), method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }), method(object({}), CompositionListReadSchema, { auth: "admin" }), method(object({
13338
13591
  addonId: string().min(1),
13339
13592
  stableId: string().min(1)
13340
- }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({
13593
+ }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({ deviceType: _enum(DeviceType) }), ComposableCapabilitiesSchema, { auth: "admin" }), method(object({
13341
13594
  composition: CompositionSchema,
13342
13595
  blockId: string().optional()
13343
13596
  }), CompositionValidationSchema, {
@@ -13345,52 +13598,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
13345
13598
  auth: "admin",
13346
13599
  access: "view"
13347
13600
  });
13348
- var ComposerBlockSchema = object({
13349
- id: string().min(1),
13350
- name: string().min(1).max(120),
13351
- enabled: boolean(),
13352
- updatedAt: number(),
13353
- composition: CompositionSchema
13354
- });
13355
- /**
13356
- * A stored composition row that no longer PARSES — a schema a release
13357
- * tightened, a row written by a newer build. Sent by id so the composer keeps
13358
- * its device as a placeholder and reports the block `failed` naming the parse
13359
- * error. Leaving it out would read, twice, exactly like a delete (D49).
13360
- */
13361
- var ComposerUnreadableBlockSchema = object({
13362
- id: string().min(1),
13363
- /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
13364
- name: string().nullable(),
13365
- /** The parse error, in the operator's words. */
13366
- error: string()
13367
- });
13368
- method(object({
13369
- /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
13370
- integrationId: string().nullable(),
13371
- /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
13372
- storeLoaded: boolean(),
13373
- blocks: array(ComposerBlockSchema),
13374
- /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
13375
- restartBlockIds: array(string()),
13376
- /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
13377
- unreadableBlocks: array(ComposerUnreadableBlockSchema)
13378
- }), object({
13379
- blocks: array(object({
13380
- blockId: string(),
13381
- status: CompositionRunStatusSchema,
13382
- reason: string().optional()
13383
- })),
13384
- /**
13385
- * False when the composer declared and withdrew NOTHING (store not loaded,
13386
- * integration unknown, its own rows unread or read empty once). An empty
13387
- * apply the caller owes is paid off only by one the composer acted on (D49).
13388
- */
13389
- acted: boolean()
13390
- }), {
13391
- kind: "mutation",
13392
- auth: "admin"
13393
- }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
13394
13601
  /**
13395
13602
  * `custom-model-registry` — collection cap exposing operator-registered
13396
13603
  * custom detection models. Each provider (today: `addon-model-studio`)
@@ -15541,6 +15748,219 @@ method(object({
15541
15748
  caps: array(string()).readonly().optional()
15542
15749
  }), record(string(), record(string(), unknown().nullable())));
15543
15750
  /**
15751
+ * Doorbell button cap. Two kinds of providers coexist behind this cap
15752
+ * name (same pattern as `snapshot`):
15753
+ *
15754
+ * - **Native** providers: registered per-device by device-driver
15755
+ * addons via `ctx.registerNativeCap` — either on a
15756
+ * `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
15757
+ * or directly on the camera (Reolink registers at camera level).
15758
+ * Emits an `onPressed` event every time the firmware pushes a
15759
+ * ring; status tracks the last press and a pressCount since start
15760
+ * (diagnostic).
15761
+ *
15762
+ * - **Wrapper** provider: the `virtual-doorbell` system builtin
15763
+ * (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
15764
+ * device (contact / switch / event-emitter …) into a doorbell for
15765
+ * a camera. `defaultActive: false` — the operator explicitly binds
15766
+ * it per camera in the device-bindings UI, then picks the source
15767
+ * device + trigger in the per-device settings.
15768
+ *
15769
+ * The DeviceEventPropagator re-emits `onPressed` on the camera parent
15770
+ * — subscribers listening at the camera level receive ring events
15771
+ * with `via[]` populated. No code on the parent needed.
15772
+ */
15773
+ var DoorbellStatusSchema = object({
15774
+ /** Ms epoch of the last press. null = never observed since this provider started. */
15775
+ lastPressedAt: number().nullable(),
15776
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
15777
+ pressCountSinceStart: number()
15778
+ });
15779
+ var DoorbellPressEventSchema = object({
15780
+ deviceId: number(),
15781
+ timestamp: number()
15782
+ });
15783
+ /**
15784
+ * The `doorbell-source` extension slot's editable value (D648): the camera's
15785
+ * virtual-doorbell trigger devices, exactly what the wrapper's
15786
+ * `doorbellSources` persists (as `{ deviceId }` records).
15787
+ */
15788
+ var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
15789
+ /**
15790
+ * The `doorbell-source` slot — which devices ring this camera's VIRTUAL
15791
+ * doorbell, owned by the `virtual-doorbell` wrapper over its
15792
+ * `doorbellSources` store (D648). A source rings when one of its
15793
+ * `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
15794
+ * different authority (`deviceManager.setWrapperActive`, D62) — the slot
15795
+ * reports it, it never writes it.
15796
+ */
15797
+ var DOORBELL_SOURCE_SLOT = {
15798
+ id: "doorbell-source",
15799
+ label: "Doorbell trigger devices",
15800
+ 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.",
15801
+ shape: "association",
15802
+ hostDeviceTypes: [DeviceType.Camera],
15803
+ sourceCaps: SOURCE_CAPS,
15804
+ cardinality: "many",
15805
+ value: DoorbellSourceSlotValueSchema
15806
+ };
15807
+ var doorbellCapability = {
15808
+ name: "doorbell",
15809
+ scope: "device",
15810
+ deviceNative: true,
15811
+ mode: "singleton",
15812
+ kind: "wrapper",
15813
+ defaultActive: false,
15814
+ deviceTypes: [DeviceType.Button, DeviceType.Camera],
15815
+ extensionSlots: [DOORBELL_SOURCE_SLOT],
15816
+ methods: {},
15817
+ events: {
15818
+ /**
15819
+ * Fires once per physical press. Reolink delivers via Baichuan
15820
+ * push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
15821
+ * release/duration — it's a pulse.
15822
+ */
15823
+ onPressed: {
15824
+ data: DoorbellPressEventSchema,
15825
+ fromState: {
15826
+ field: "lastPressedAt",
15827
+ on: "advance"
15828
+ }
15829
+ } },
15830
+ status: {
15831
+ schema: DoorbellStatusSchema,
15832
+ kind: "push"
15833
+ },
15834
+ /**
15835
+ * Runtime-state slice — last press timestamp + lifetime press count.
15836
+ * Mirrored by the kernel and readable via
15837
+ * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
15838
+ * without subscribing.
15839
+ */
15840
+ runtimeState: DoorbellStatusSchema,
15841
+ /**
15842
+ * 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.
15843
+ *
15844
+ * See `RuntimeStateDurability`. Enforced by
15845
+ * `scripts/check-runtime-state-durability.ts`.
15846
+ */
15847
+ durability: "restored"
15848
+ };
15849
+ var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
15850
+ DeviceType.Camera, DeviceType.Camera;
15851
+ /** A slot's editable value, discriminated on `slot`. */
15852
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
15853
+ DeviceType.Camera;
15854
+ var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
15855
+ state: literal("unreachable"),
15856
+ reason: string()
15857
+ })]);
15858
+ /** One provider of slots — the D554 source-listing row. */
15859
+ var ExtensionSourceSchema = object({
15860
+ /** The routing prefix of every `slotRef` this provider serves. */
15861
+ source: string(),
15862
+ label: string(),
15863
+ /** Stamped by the dispatcher from the registry (D557). */
15864
+ addonId: string().optional(),
15865
+ availability: ExtensionSourceAvailabilitySchema
15866
+ });
15867
+ /**
15868
+ * How one picked source stands. `missing` — no such device (deleted, or an id
15869
+ * that never existed); `foreign` — a device the slot's owner cannot read from
15870
+ * (a source owned by another addon); `unavailable` — it exists but is not a
15871
+ * valid source now (a container, which is never a pick). A source in any of
15872
+ * these states is SHOWN, never silently dropped or re-pointed.
15873
+ */
15874
+ var ExtensionSourceHealthSchema = _enum([
15875
+ "ok",
15876
+ "missing",
15877
+ "foreign",
15878
+ "unavailable"
15879
+ ]);
15880
+ var ExtensionSlotSourceSchema = object({
15881
+ deviceId: number().int(),
15882
+ /** The device's name, or null when it could not be resolved (`missing`). */
15883
+ name: string().nullable(),
15884
+ health: ExtensionSourceHealthSchema,
15885
+ detail: string().optional()
15886
+ });
15887
+ /**
15888
+ * A DIFFERENT authority that gates whether the slot's sources do anything —
15889
+ * reported read-only, named, never written through this contract (D62). The
15890
+ * virtual doorbell's sources ring only while the wrapper is bound to the
15891
+ * camera, and that binding belongs to `deviceManager.setWrapperActive`.
15892
+ * `unknown` means the gate could not be read; it is not "inactive" (D315).
15893
+ */
15894
+ var ExtensionSlotActivationSchema = object({
15895
+ state: _enum([
15896
+ "active",
15897
+ "inactive",
15898
+ "unknown"
15899
+ ]),
15900
+ authority: string(),
15901
+ detail: string().optional()
15902
+ });
15903
+ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
15904
+ state: literal("ok"),
15905
+ /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
15906
+ slotRef: string(),
15907
+ slot: ExtensionSlotIdSchema,
15908
+ /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
15909
+ authority: string(),
15910
+ activation: ExtensionSlotActivationSchema.nullable(),
15911
+ value: ExtensionSlotValueSchema,
15912
+ sources: array(ExtensionSlotSourceSchema),
15913
+ /**
15914
+ * Devices the owner links to the host ON ITS OWN, by structure, and that
15915
+ * are therefore not in `value` (D655): a camera's device-tree children, and
15916
+ * the child a picked container stands for (D356 — a container is never a
15917
+ * pick, its children are). Read-only; the editor shows them and may offer
15918
+ * per-device options on them (the linked-devices tracked-event opt-in).
15919
+ * Absent when the owner links nothing beyond the picks, and from an owner
15920
+ * older than D655.
15921
+ */
15922
+ impliedSources: array(ExtensionSlotSourceSchema).optional()
15923
+ }), object({
15924
+ state: literal("unreachable"),
15925
+ addonId: string(),
15926
+ reason: string()
15927
+ })]);
15928
+ var ExtensionCandidatesSchema = object({ candidates: array(object({
15929
+ deviceId: number().int(),
15930
+ name: string(),
15931
+ type: string(),
15932
+ location: string().nullable(),
15933
+ /** The container a child belongs to — "Spotlight 2" alone does not say which. */
15934
+ parentName: string().nullable(),
15935
+ /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
15936
+ suggested: boolean(),
15937
+ /** Why it is suggested ("same location"), null when it is not. */
15938
+ reason: string().nullable()
15939
+ })) });
15940
+ /**
15941
+ * What a write did. `none` — applied in place. `host` / `parent` — the owner
15942
+ * reloaded the host (or, for an accessory child, its parent) because the
15943
+ * write changed what the host REGISTERS. A slot never adds a capability to its
15944
+ * host — that is a composition (D663) — so today's owners answer `none`.
15945
+ */
15946
+ var ExtensionSetResultSchema = object({
15947
+ applied: literal(true),
15948
+ reload: _enum([
15949
+ "none",
15950
+ "host",
15951
+ "parent"
15952
+ ])
15953
+ });
15954
+ var ExtensionSlotRefInputSchema = object({
15955
+ deviceId: number().int(),
15956
+ slotRef: string().min(1)
15957
+ });
15958
+ var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
15959
+ method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
15960
+ kind: "mutation",
15961
+ auth: "admin"
15962
+ });
15963
+ /**
15544
15964
  * Per-field ownership (D663). A composition may CLAIM fields of a native
15545
15965
  * cap's runtime-state slice on an existing device: `replace` overlays the
15546
15966
  * claimed fields on the native slice, `add` builds a slice the device does
@@ -18550,17 +18970,25 @@ var NcScheduleSchema = object({
18550
18970
  */
18551
18971
  var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
18552
18972
  /**
18973
+ * How a summary window is SENT (D698): `rule` (absent) = ONE notification with
18974
+ * every section; `section` = one notification per section with something to
18975
+ * say (an unavailable section included), each titled by its section.
18976
+ */
18977
+ var NcStateSummarySplitSchema = _enum(["rule", "section"]);
18978
+ /**
18553
18979
  * `summary`: the rule sends NOTHING per event. When a window of `schedule`
18554
18980
  * CLOSES, it sends one notification with the current state of its kinds
18555
18981
  * (low batteries, consumables to replace, devices offline, updates
18556
- * available, ...), after its own filters. Nothing to report sends nothing.
18982
+ * available, ...), after its own filters — or, with `split: 'section'`
18983
+ * (D698), one notification per section. Nothing to report sends nothing.
18557
18984
  * The schedule is the ordinary `NcSchedule` (weekly windows, IANA timezone,
18558
18985
  * midnight crossing); the send time is each window's END. Refused on the
18559
18986
  * `alarm` family, which stays instant (`systemEventDeliveryProblems`).
18560
18987
  */
18561
18988
  var NcSystemEventDeliverySchema = discriminatedUnion("mode", [object({ mode: literal("instant") }), object({
18562
18989
  mode: literal("summary"),
18563
- schedule: NcScheduleSchema
18990
+ schedule: NcScheduleSchema,
18991
+ split: NcStateSummarySplitSchema.optional()
18564
18992
  })]);
18565
18993
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
18566
18994
  var NcPlateMatcherSchema = object({
@@ -18700,8 +19128,14 @@ var NcSensorTransitionSchema = _enum(["raised", "cleared"]);
18700
19128
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
18701
19129
  var NcZoneConditionSchema = object({
18702
19130
  ids: array(string().min(1)).min(1),
18703
- /** Quantifier over `ids` — at least one / every one visited. */
18704
- match: _enum(["any", "all"]).default("any")
19131
+ /**
19132
+ * LEGACY quantifier over `ids`. Absent = `any` (at least one visited), which
19133
+ * is what both editors mean and all they write since D690: "all of" was
19134
+ * removed from the editors because on an immediate rule it asked one
19135
+ * detection to stand in every zone at once. Still ACCEPTED, and `all` still
19136
+ * evaluated, so a stored rule keeps parsing and meaning what it meant.
19137
+ */
19138
+ match: _enum(["any", "all"]).optional()
18705
19139
  });
18706
19140
  /**
18707
19141
  * The P1 condition set — a flat AND of groups; absent group = pass;
@@ -19205,10 +19639,12 @@ var NcMediaPolicySchema = object({
19205
19639
  /**
19206
19640
  * Cooldown GRANULARITY over the subject's class — how much a fired
19207
19641
  * notification suppresses.
19208
- * - `shared` (default, and the absent value) — one window for the whole
19209
- * rule/scope: a cat silences the next dog for `cooldownSec`.
19210
- * - `per-class` — an independent window per detected class, so cat→dog fires
19211
- * at once and cat→cat still waits.
19642
+ * - `per-class` (default, and the absent value since 2026-10-01 — D36) — an
19643
+ * independent window per detected class: cat→dog fires at once, cat→cat
19644
+ * still waits.
19645
+ * - `shared` — one window for the whole rule/scope: a cat silences the next
19646
+ * dog for `cooldownSec`. Only written when an operator picks it; it is no
19647
+ * longer what an unset rule means.
19212
19648
  *
19213
19649
  * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
19214
19650
  * must not be swallowed by a bark's window (the precedent this generalizes —
@@ -19223,8 +19659,11 @@ var NcThrottleSchema = object({
19223
19659
  /**
19224
19660
  * Class granularity of the cooldown key. Optional rather than defaulted:
19225
19661
  * a Zod default does NOT run on the addon→addon cap path, so a persisted
19226
- * rule authored before this field simply carries none — and the engine
19227
- * reads absent as `shared`, the pre-existing behaviour.
19662
+ * rule authored before this field simply carries none. The engine used to
19663
+ * read absent as `shared` (D36); since 2026-10-01 it reads absent as
19664
+ * `per-class` — the operator's default — and only an explicit `shared`
19665
+ * still means `shared`. See `cooldownKey` / `keysPerClass` in the rule
19666
+ * engine, and D36's dated note.
19228
19667
  */
19229
19668
  granularity: NcThrottleGranularitySchema.optional()
19230
19669
  });
@@ -19548,11 +19987,23 @@ var NcStateSummaryPreviewSectionSchema = object({
19548
19987
  reason: string().optional()
19549
19988
  });
19550
19989
  /**
19990
+ * One notification a previewed summary would send (D698): the whole summary on
19991
+ * a `rule` split (no `section`), one section's on a `section` split.
19992
+ */
19993
+ var NcStateSummaryPreviewRowSchema = object({
19994
+ section: string().optional(),
19995
+ /** The section's name on a per-section row; every reported section's, joined, on a combined one. */
19996
+ title: string(),
19997
+ text: string(),
19998
+ count: number().int().nonnegative()
19999
+ });
20000
+ /**
19551
20001
  * The summary a rule would send now. `empty` = nothing to report and every
19552
20002
  * section read: such a summary is NOT sent. `dropped` counts the open states
19553
20003
  * the rule's own filters (or a camera mute) left out, by reason.
19554
20004
  * `excludedGroups` names the kind groups selected that have no state to report
19555
- * (backups & exports).
20005
+ * (backups & exports). `split` and `rows` (D698) say how it would be sent —
20006
+ * optional, so an older hub's answer still parses.
19556
20007
  */
19557
20008
  var NcStateSummaryPreviewSchema = object({
19558
20009
  empty: boolean(),
@@ -19560,7 +20011,9 @@ var NcStateSummaryPreviewSchema = object({
19560
20011
  text: string(),
19561
20012
  sections: array(NcStateSummaryPreviewSectionSchema),
19562
20013
  dropped: record(string(), number().int().nonnegative()),
19563
- excludedGroups: array(string())
20014
+ excludedGroups: array(string()),
20015
+ split: NcStateSummarySplitSchema.optional(),
20016
+ rows: array(NcStateSummaryPreviewRowSchema).optional()
19564
20017
  });
19565
20018
  var NcTestResultSchema = object({
19566
20019
  recordId: string(),
@@ -20576,7 +21029,7 @@ function cameraSensorRefKey(ref) {
20576
21029
  }
20577
21030
  /** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
20578
21031
  var CameraSensorsModeSchema = _enum(["in-addition"]);
20579
- object({
21032
+ var CameraSensorsConfigSchema = object({
20580
21033
  mode: CameraSensorsModeSchema,
20581
21034
  sensors: array(CameraSensorRefSchema).min(1).max(8)
20582
21035
  }).superRefine((value, ctx) => {
@@ -22481,7 +22934,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
22481
22934
  trackIds: array(string()).min(1)
22482
22935
  }), object({
22483
22936
  deleted: number().int(),
22484
- failed: array(string()).readonly()
22937
+ failed: array(string()).readonly(),
22938
+ sparedMediaIds: array(number().int()).readonly().optional()
22485
22939
  }), {
22486
22940
  kind: "mutation",
22487
22941
  auth: "admin"
@@ -22490,7 +22944,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
22490
22944
  deviceId: number(),
22491
22945
  trackId: string(),
22492
22946
  flags: TrackFlagsPatchSchema
22493
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
22947
+ }), 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, {
22494
22948
  kind: "query",
22495
22949
  auth: "admin"
22496
22950
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -24688,7 +25142,64 @@ var NodeInferenceDevicesSchema = object({
24688
25142
  reachable: boolean(),
24689
25143
  devices: array(NodeInferenceDeviceSchema).readonly()
24690
25144
  });
24691
- method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
25145
+ /**
25146
+ * Pipeline Orchestrator capability — global load balancer + camera dispatcher.
25147
+ *
25148
+ * Lives on the hub. Tracks the camera-to-agent assignment map, listens to
25149
+ * device lifecycle events, queries each runner's capacity + hardware
25150
+ * profile, and dispatches `attachCamera` / `detachCamera` cap calls to the
25151
+ * appropriate runner instances. Persists assignments via the multi-level
25152
+ * settings store so they survive hub restarts.
25153
+ *
25154
+ * Strictly the control plane: never sees a frame, never calls inference,
25155
+ * never drains queues. The runner does that work locally on each agent.
25156
+ */
25157
+ /**
25158
+ * The input of `setCameraSensors` (G5, D676): the ONE typed write path of a
25159
+ * camera's attached sensors (D672). `config: null` removes the attachment —
25160
+ * the camera reads `not-configured` again, never `unreadable`.
25161
+ */
25162
+ var SetCameraSensorsInputSchema = object({
25163
+ deviceId: number().int().nonnegative(),
25164
+ /** `null` removes the attachment: the camera goes back to `not-configured`. */
25165
+ config: CameraSensorsConfigSchema.nullable()
25166
+ });
25167
+ /**
25168
+ * Why an early occupancy look (D691) was not scheduled.
25169
+ *
25170
+ * - `unknown-camera` — no session was ever dispatched for it, so there is no
25171
+ * node and no config to attach a burst with.
25172
+ * - `out-of-range` — the ask is negative or further out than the orchestrator
25173
+ * will hold a timer for; the parked-object cadence is the answer there.
25174
+ * - `no-burst-producer` — this build has no burst producer at all.
25175
+ * - `already-looked` — this camera's ONE early look since its last session has
25176
+ * been spent. A look's own burst can re-arm a flickering flip, and a look
25177
+ * per arm would chain a burst every ~30 s forever (review H2); the next
25178
+ * real session re-arms the budget.
25179
+ */
25180
+ var OccupancyLookRefusalSchema = _enum([
25181
+ "unknown-camera",
25182
+ "out-of-range",
25183
+ "no-burst-producer",
25184
+ "already-looked"
25185
+ ]);
25186
+ method(object({
25187
+ deviceId: number().int().nonnegative(),
25188
+ /** How long from NOW until the pending flip's sustain window ends. RELATIVE,
25189
+ * so the caller's clock and the orchestrator's never have to agree. */
25190
+ afterMs: number().finite(),
25191
+ /** Why, for the log. */
25192
+ reason: string()
25193
+ }), object({
25194
+ scheduled: boolean(),
25195
+ /** When `scheduled`: how long until the burst is dialled. */
25196
+ dueInMs: number().optional(),
25197
+ /** When not `scheduled`: why. */
25198
+ refusedBecause: OccupancyLookRefusalSchema.optional()
25199
+ }), {
25200
+ kind: "mutation",
25201
+ auth: "admin"
25202
+ }), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
24692
25203
  kind: "mutation",
24693
25204
  auth: "admin"
24694
25205
  }), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
@@ -24842,7 +25353,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
24842
25353
  }), CameraSwitchGroupSchema, {
24843
25354
  kind: "mutation",
24844
25355
  auth: "admin"
24845
- }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
25356
+ }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(SetCameraSensorsInputSchema, object({ success: literal(true) }), {
25357
+ kind: "mutation",
25358
+ auth: "admin"
25359
+ }), method(_void(), DiskReconcileJobSchema, {
24846
25360
  kind: "mutation",
24847
25361
  auth: "admin"
24848
25362
  }), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
@@ -27561,219 +28075,6 @@ var CLIP_PLAYBACK_OPTIONS = {
27561
28075
  }
27562
28076
  };
27563
28077
  /**
27564
- * Doorbell button cap. Two kinds of providers coexist behind this cap
27565
- * name (same pattern as `snapshot`):
27566
- *
27567
- * - **Native** providers: registered per-device by device-driver
27568
- * addons via `ctx.registerNativeCap` — either on a
27569
- * `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
27570
- * or directly on the camera (Reolink registers at camera level).
27571
- * Emits an `onPressed` event every time the firmware pushes a
27572
- * ring; status tracks the last press and a pressCount since start
27573
- * (diagnostic).
27574
- *
27575
- * - **Wrapper** provider: the `virtual-doorbell` system builtin
27576
- * (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
27577
- * device (contact / switch / event-emitter …) into a doorbell for
27578
- * a camera. `defaultActive: false` — the operator explicitly binds
27579
- * it per camera in the device-bindings UI, then picks the source
27580
- * device + trigger in the per-device settings.
27581
- *
27582
- * The DeviceEventPropagator re-emits `onPressed` on the camera parent
27583
- * — subscribers listening at the camera level receive ring events
27584
- * with `via[]` populated. No code on the parent needed.
27585
- */
27586
- var DoorbellStatusSchema = object({
27587
- /** Ms epoch of the last press. null = never observed since this provider started. */
27588
- lastPressedAt: number().nullable(),
27589
- /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
27590
- pressCountSinceStart: number()
27591
- });
27592
- var DoorbellPressEventSchema = object({
27593
- deviceId: number(),
27594
- timestamp: number()
27595
- });
27596
- /**
27597
- * The `doorbell-source` extension slot's editable value (D648): the camera's
27598
- * virtual-doorbell trigger devices, exactly what the wrapper's
27599
- * `doorbellSources` persists (as `{ deviceId }` records).
27600
- */
27601
- var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
27602
- /**
27603
- * The `doorbell-source` slot — which devices ring this camera's VIRTUAL
27604
- * doorbell, owned by the `virtual-doorbell` wrapper over its
27605
- * `doorbellSources` store (D648). A source rings when one of its
27606
- * `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
27607
- * different authority (`deviceManager.setWrapperActive`, D62) — the slot
27608
- * reports it, it never writes it.
27609
- */
27610
- var DOORBELL_SOURCE_SLOT = {
27611
- id: "doorbell-source",
27612
- label: "Doorbell trigger devices",
27613
- 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.",
27614
- shape: "association",
27615
- hostDeviceTypes: [DeviceType.Camera],
27616
- sourceCaps: SOURCE_CAPS,
27617
- cardinality: "many",
27618
- value: DoorbellSourceSlotValueSchema
27619
- };
27620
- var doorbellCapability = {
27621
- name: "doorbell",
27622
- scope: "device",
27623
- deviceNative: true,
27624
- mode: "singleton",
27625
- kind: "wrapper",
27626
- defaultActive: false,
27627
- deviceTypes: [DeviceType.Button, DeviceType.Camera],
27628
- extensionSlots: [DOORBELL_SOURCE_SLOT],
27629
- methods: {},
27630
- events: {
27631
- /**
27632
- * Fires once per physical press. Reolink delivers via Baichuan
27633
- * push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
27634
- * release/duration — it's a pulse.
27635
- */
27636
- onPressed: {
27637
- data: DoorbellPressEventSchema,
27638
- fromState: {
27639
- field: "lastPressedAt",
27640
- on: "advance"
27641
- }
27642
- } },
27643
- status: {
27644
- schema: DoorbellStatusSchema,
27645
- kind: "push"
27646
- },
27647
- /**
27648
- * Runtime-state slice — last press timestamp + lifetime press count.
27649
- * Mirrored by the kernel and readable via
27650
- * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
27651
- * without subscribing.
27652
- */
27653
- runtimeState: DoorbellStatusSchema,
27654
- /**
27655
- * 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.
27656
- *
27657
- * See `RuntimeStateDurability`. Enforced by
27658
- * `scripts/check-runtime-state-durability.ts`.
27659
- */
27660
- durability: "restored"
27661
- };
27662
- var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
27663
- DeviceType.Camera, DeviceType.Camera;
27664
- /** A slot's editable value, discriminated on `slot`. */
27665
- var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
27666
- DeviceType.Camera;
27667
- var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
27668
- state: literal("unreachable"),
27669
- reason: string()
27670
- })]);
27671
- /** One provider of slots — the D554 source-listing row. */
27672
- var ExtensionSourceSchema = object({
27673
- /** The routing prefix of every `slotRef` this provider serves. */
27674
- source: string(),
27675
- label: string(),
27676
- /** Stamped by the dispatcher from the registry (D557). */
27677
- addonId: string().optional(),
27678
- availability: ExtensionSourceAvailabilitySchema
27679
- });
27680
- /**
27681
- * How one picked source stands. `missing` — no such device (deleted, or an id
27682
- * that never existed); `foreign` — a device the slot's owner cannot read from
27683
- * (a source owned by another addon); `unavailable` — it exists but is not a
27684
- * valid source now (a container, which is never a pick). A source in any of
27685
- * these states is SHOWN, never silently dropped or re-pointed.
27686
- */
27687
- var ExtensionSourceHealthSchema = _enum([
27688
- "ok",
27689
- "missing",
27690
- "foreign",
27691
- "unavailable"
27692
- ]);
27693
- var ExtensionSlotSourceSchema = object({
27694
- deviceId: number().int(),
27695
- /** The device's name, or null when it could not be resolved (`missing`). */
27696
- name: string().nullable(),
27697
- health: ExtensionSourceHealthSchema,
27698
- detail: string().optional()
27699
- });
27700
- /**
27701
- * A DIFFERENT authority that gates whether the slot's sources do anything —
27702
- * reported read-only, named, never written through this contract (D62). The
27703
- * virtual doorbell's sources ring only while the wrapper is bound to the
27704
- * camera, and that binding belongs to `deviceManager.setWrapperActive`.
27705
- * `unknown` means the gate could not be read; it is not "inactive" (D315).
27706
- */
27707
- var ExtensionSlotActivationSchema = object({
27708
- state: _enum([
27709
- "active",
27710
- "inactive",
27711
- "unknown"
27712
- ]),
27713
- authority: string(),
27714
- detail: string().optional()
27715
- });
27716
- var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
27717
- state: literal("ok"),
27718
- /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
27719
- slotRef: string(),
27720
- slot: ExtensionSlotIdSchema,
27721
- /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
27722
- authority: string(),
27723
- activation: ExtensionSlotActivationSchema.nullable(),
27724
- value: ExtensionSlotValueSchema,
27725
- sources: array(ExtensionSlotSourceSchema),
27726
- /**
27727
- * Devices the owner links to the host ON ITS OWN, by structure, and that
27728
- * are therefore not in `value` (D655): a camera's device-tree children, and
27729
- * the child a picked container stands for (D356 — a container is never a
27730
- * pick, its children are). Read-only; the editor shows them and may offer
27731
- * per-device options on them (the linked-devices tracked-event opt-in).
27732
- * Absent when the owner links nothing beyond the picks, and from an owner
27733
- * older than D655.
27734
- */
27735
- impliedSources: array(ExtensionSlotSourceSchema).optional()
27736
- }), object({
27737
- state: literal("unreachable"),
27738
- addonId: string(),
27739
- reason: string()
27740
- })]);
27741
- var ExtensionCandidatesSchema = object({ candidates: array(object({
27742
- deviceId: number().int(),
27743
- name: string(),
27744
- type: string(),
27745
- location: string().nullable(),
27746
- /** The container a child belongs to — "Spotlight 2" alone does not say which. */
27747
- parentName: string().nullable(),
27748
- /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
27749
- suggested: boolean(),
27750
- /** Why it is suggested ("same location"), null when it is not. */
27751
- reason: string().nullable()
27752
- })) });
27753
- /**
27754
- * What a write did. `none` — applied in place. `host` / `parent` — the owner
27755
- * reloaded the host (or, for an accessory child, its parent) because the
27756
- * write changed what the host REGISTERS. A slot never adds a capability to its
27757
- * host — that is a composition (D663) — so today's owners answer `none`.
27758
- */
27759
- var ExtensionSetResultSchema = object({
27760
- applied: literal(true),
27761
- reload: _enum([
27762
- "none",
27763
- "host",
27764
- "parent"
27765
- ])
27766
- });
27767
- var ExtensionSlotRefInputSchema = object({
27768
- deviceId: number().int(),
27769
- slotRef: string().min(1)
27770
- });
27771
- var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
27772
- method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
27773
- kind: "mutation",
27774
- auth: "admin"
27775
- });
27776
- /**
27777
28078
  * Optional client-side hints sent at session creation to help the provider
27778
28079
  * pick the best native source. All fields optional — a viewer that knows
27779
28080
  * nothing still gets a sane default. (Relocated from the retired `webrtc`
@@ -39426,47 +39727,6 @@ var zoneRulesCapability = {
39426
39727
  */
39427
39728
  durability: "restored"
39428
39729
  };
39429
- var NUMBER = {
39430
- kind: "fixed",
39431
- result: ["number"]
39432
- };
39433
- var BOOLEAN = {
39434
- kind: "fixed",
39435
- result: ["boolean"]
39436
- };
39437
- Object.freeze({
39438
- min: NUMBER,
39439
- max: NUMBER,
39440
- abs: NUMBER,
39441
- floor: NUMBER,
39442
- ceil: NUMBER,
39443
- sqrt: NUMBER,
39444
- round: NUMBER,
39445
- pow: NUMBER,
39446
- clamp: NUMBER,
39447
- avg: NUMBER,
39448
- sum: NUMBER,
39449
- age: NUMBER,
39450
- convert: NUMBER,
39451
- coalesce: { kind: "coalesce" },
39452
- any: BOOLEAN,
39453
- all: BOOLEAN,
39454
- within: BOOLEAN,
39455
- latest: {
39456
- kind: "fixed",
39457
- result: ["number", "null"]
39458
- },
39459
- number: {
39460
- kind: "fixed",
39461
- result: ["number", "null"]
39462
- },
39463
- rose: {
39464
- kind: "fixed",
39465
- result: ["number", "null"]
39466
- },
39467
- count: NUMBER
39468
- });
39469
- `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
39470
39730
  /**
39471
39731
  * Accessory device helpers — shared across drivers.
39472
39732
  *
@@ -43618,6 +43878,12 @@ Object.freeze({
43618
43878
  addonId: null,
43619
43879
  access: "view"
43620
43880
  },
43881
+ "coreBlocks.listComposableCaps": {
43882
+ capName: "core-blocks",
43883
+ capScope: "system",
43884
+ addonId: null,
43885
+ access: "view"
43886
+ },
43621
43887
  "coreBlocks.listCompositions": {
43622
43888
  capName: "core-blocks",
43623
43889
  capScope: "system",
@@ -43696,6 +43962,18 @@ Object.freeze({
43696
43962
  addonId: null,
43697
43963
  access: "view"
43698
43964
  },
43965
+ "databaseSnapshot.listDatabases": {
43966
+ capName: "database-snapshot",
43967
+ capScope: "system",
43968
+ addonId: null,
43969
+ access: "view"
43970
+ },
43971
+ "databaseSnapshot.writeSnapshot": {
43972
+ capName: "database-snapshot",
43973
+ capScope: "system",
43974
+ addonId: null,
43975
+ access: "create"
43976
+ },
43699
43977
  "dataStoreProvider.aggregate": {
43700
43978
  capName: "data-store-provider",
43701
43979
  capScope: "system",
@@ -46432,6 +46710,12 @@ Object.freeze({
46432
46710
  addonId: null,
46433
46711
  access: "create"
46434
46712
  },
46713
+ "pipelineAnalytics.clearTrackRelation": {
46714
+ capName: "pipeline-analytics",
46715
+ capScope: "device",
46716
+ addonId: null,
46717
+ access: "delete"
46718
+ },
46435
46719
  "pipelineAnalytics.clearTracks": {
46436
46720
  capName: "pipeline-analytics",
46437
46721
  capScope: "device",
@@ -46684,6 +46968,12 @@ Object.freeze({
46684
46968
  addonId: null,
46685
46969
  access: "view"
46686
46970
  },
46971
+ "pipelineAnalytics.listTrackRelations": {
46972
+ capName: "pipeline-analytics",
46973
+ capScope: "device",
46974
+ addonId: null,
46975
+ access: "view"
46976
+ },
46687
46977
  "pipelineAnalytics.listTracks": {
46688
46978
  capName: "pipeline-analytics",
46689
46979
  capScope: "device",
@@ -46798,6 +47088,18 @@ Object.freeze({
46798
47088
  addonId: null,
46799
47089
  access: "create"
46800
47090
  },
47091
+ "pipelineAnalytics.setTrackPurity": {
47092
+ capName: "pipeline-analytics",
47093
+ capScope: "device",
47094
+ addonId: null,
47095
+ access: "create"
47096
+ },
47097
+ "pipelineAnalytics.setTrackRelation": {
47098
+ capName: "pipeline-analytics",
47099
+ capScope: "device",
47100
+ addonId: null,
47101
+ access: "create"
47102
+ },
46801
47103
  "pipelineAnalytics.startStorageMigrationMove": {
46802
47104
  capName: "pipeline-analytics",
46803
47105
  capScope: "device",
@@ -47236,6 +47538,12 @@ Object.freeze({
47236
47538
  addonId: null,
47237
47539
  access: "delete"
47238
47540
  },
47541
+ "pipelineOrchestrator.requestOccupancyLook": {
47542
+ capName: "pipeline-orchestrator",
47543
+ capScope: "system",
47544
+ addonId: null,
47545
+ access: "create"
47546
+ },
47239
47547
  "pipelineOrchestrator.resetNodePipelineDefaults": {
47240
47548
  capName: "pipeline-orchestrator",
47241
47549
  capScope: "system",
@@ -47302,6 +47610,12 @@ Object.freeze({
47302
47610
  addonId: null,
47303
47611
  access: "create"
47304
47612
  },
47613
+ "pipelineOrchestrator.setCameraSensors": {
47614
+ capName: "pipeline-orchestrator",
47615
+ capScope: "system",
47616
+ addonId: null,
47617
+ access: "create"
47618
+ },
47305
47619
  "pipelineOrchestrator.setCameraStepOverride": {
47306
47620
  capName: "pipeline-orchestrator",
47307
47621
  capScope: "system",
@@ -50712,6 +51026,11 @@ Object.freeze({
50712
51026
  form: "single",
50713
51027
  optional: false
50714
51028
  }],
51029
+ "pipelineAnalytics.clearTrackRelation": [{
51030
+ name: "deviceId",
51031
+ form: "single",
51032
+ optional: false
51033
+ }],
50715
51034
  "pipelineAnalytics.clearTracks": [{
50716
51035
  name: "deviceId",
50717
51036
  form: "single",
@@ -50862,6 +51181,11 @@ Object.freeze({
50862
51181
  form: "single",
50863
51182
  optional: false
50864
51183
  }],
51184
+ "pipelineAnalytics.listTrackRelations": [{
51185
+ name: "deviceId",
51186
+ form: "single",
51187
+ optional: false
51188
+ }],
50865
51189
  "pipelineAnalytics.listTracks": [{
50866
51190
  name: "deviceId",
50867
51191
  form: "single",
@@ -50932,6 +51256,16 @@ Object.freeze({
50932
51256
  form: "single",
50933
51257
  optional: false
50934
51258
  }],
51259
+ "pipelineAnalytics.setTrackPurity": [{
51260
+ name: "deviceId",
51261
+ form: "single",
51262
+ optional: false
51263
+ }],
51264
+ "pipelineAnalytics.setTrackRelation": [{
51265
+ name: "deviceId",
51266
+ form: "single",
51267
+ optional: false
51268
+ }],
50935
51269
  "pipelineAnalytics.wipeAllAnalytics": [{
50936
51270
  name: "deviceId",
50937
51271
  form: "single",
@@ -51002,6 +51336,11 @@ Object.freeze({
51002
51336
  form: "single",
51003
51337
  optional: false
51004
51338
  }],
51339
+ "pipelineOrchestrator.requestOccupancyLook": [{
51340
+ name: "deviceId",
51341
+ form: "single",
51342
+ optional: false
51343
+ }],
51005
51344
  "pipelineOrchestrator.resolvePipeline": [{
51006
51345
  name: "deviceId",
51007
51346
  form: "single",
@@ -51012,6 +51351,11 @@ Object.freeze({
51012
51351
  form: "single",
51013
51352
  optional: false
51014
51353
  }],
51354
+ "pipelineOrchestrator.setCameraSensors": [{
51355
+ name: "deviceId",
51356
+ form: "single",
51357
+ optional: false
51358
+ }],
51015
51359
  "pipelineOrchestrator.setCameraStepOverride": [{
51016
51360
  name: "deviceId",
51017
51361
  form: "single",
@@ -52158,6 +52502,18 @@ var STATE_SUMMARY_VARS = [
52158
52502
  systemEventKinds: [...SUMMARISABLE],
52159
52503
  systemEventDeliveries: ["summary"]
52160
52504
  },
52505
+ {
52506
+ name: "summarySection",
52507
+ label: "Summary: this section",
52508
+ description: "The section a per-section summary row is about (D698); on a summary sent as one message, every section it reports, comma-separated.",
52509
+ example: "Batterie scariche",
52510
+ group: "system",
52511
+ families: ["rule"],
52512
+ fields: [...RULE_TEXT],
52513
+ kinds: ["system"],
52514
+ systemEventKinds: [...SUMMARISABLE],
52515
+ systemEventDeliveries: ["summary"]
52516
+ },
52161
52517
  ...STATE_SUMMARY_SECTION_VARS.map((v) => ({
52162
52518
  name: v.name,
52163
52519
  label: v.label,
@@ -52234,6 +52590,37 @@ var STATE_SUMMARY_VARS = [
52234
52590
  [...RULE_TEXT],
52235
52591
  ...STATE_SUMMARY_VARS
52236
52592
  ];
52593
+ new Set([
52594
+ "disarmed",
52595
+ "armed_home",
52596
+ "armed_away",
52597
+ "armed_night",
52598
+ "armed_vacation",
52599
+ "armed_custom_bypass",
52600
+ "arming",
52601
+ "disarming",
52602
+ "pending",
52603
+ "triggered",
52604
+ "open",
52605
+ "opening",
52606
+ "closing",
52607
+ "closed",
52608
+ "stopped",
52609
+ "locked",
52610
+ "unlocked",
52611
+ "locking",
52612
+ "unlocking",
52613
+ "jammed",
52614
+ "on",
52615
+ "off",
52616
+ "home",
52617
+ "not_home",
52618
+ "matched",
52619
+ "diverged",
52620
+ "unknown",
52621
+ "latched",
52622
+ "live"
52623
+ ]);
52237
52624
  /**
52238
52625
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
52239
52626
  *