@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.mjs CHANGED
@@ -5384,7 +5384,7 @@ var ZodIssueCode = {
5384
5384
  var ZodFirstPartyTypeKind;
5385
5385
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5386
5386
  //#endregion
5387
- //#region ../types/dist/sleep-C-v96WpE.mjs
5387
+ //#region ../types/dist/sleep-gU6hqv4_.mjs
5388
5388
  /**
5389
5389
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5390
5390
  * window to float samples (D455).
@@ -8963,6 +8963,82 @@ var ArchivedDebugNoteQueryInputSchema = object({
8963
8963
  /** Max rows returned, newest-first. */
8964
8964
  limit: number().int().min(1).max(1e3).optional()
8965
8965
  });
8966
+ var TrackRelationKindSchema = _enum(["same-subject", "different-subjects"]);
8967
+ var TrackSideSchema = _enum(["before", "after"]);
8968
+ var TrackPurityValueSchema = _enum(["mixed", "not-a-subject"]);
8969
+ var TrackRelationSchema = object({
8970
+ id: string(),
8971
+ deviceId: number().int(),
8972
+ leftTrackId: string(),
8973
+ rightTrackId: string(),
8974
+ leftSide: TrackSideSchema.nullable(),
8975
+ rightSide: TrackSideSchema.nullable(),
8976
+ relation: TrackRelationKindSchema,
8977
+ presence: literal("continuous").nullable(),
8978
+ leftStartedAt: number().int().nullable(),
8979
+ rightStartedAt: number().int().nullable(),
8980
+ createdAt: number().int(),
8981
+ updatedAt: number().int(),
8982
+ author: string().nullable()
8983
+ });
8984
+ var TrackPuritySchema = object({
8985
+ id: string(),
8986
+ deviceId: number().int(),
8987
+ sourceTrackId: string(),
8988
+ purity: TrackPurityValueSchema,
8989
+ switchAtMs: number().int().nullable(),
8990
+ startedAt: number().int().nullable(),
8991
+ createdAt: number().int(),
8992
+ updatedAt: number().int(),
8993
+ author: string().nullable()
8994
+ });
8995
+ var SetTrackRelationInputSchema = object({
8996
+ deviceId: number().int(),
8997
+ trackId: string().min(1),
8998
+ otherTrackId: string().min(1),
8999
+ relation: TrackRelationKindSchema,
9000
+ presence: literal("continuous").optional(),
9001
+ trackSide: TrackSideSchema.optional(),
9002
+ otherSide: TrackSideSchema.optional()
9003
+ });
9004
+ var ClearTrackRelationInputSchema = object({
9005
+ deviceId: number().int(),
9006
+ trackId: string().min(1),
9007
+ otherTrackId: string().min(1)
9008
+ });
9009
+ var ClearTrackRelationResultSchema = object({ cleared: boolean() });
9010
+ var SetTrackPurityInputSchema = object({
9011
+ deviceId: number().int(),
9012
+ trackId: string().min(1),
9013
+ purity: _enum([
9014
+ "pure",
9015
+ "mixed",
9016
+ "not-a-subject"
9017
+ ]),
9018
+ switchAtMs: number().int().optional()
9019
+ });
9020
+ /** `null` when `pure` cleared the row. */
9021
+ var SetTrackPurityResultSchema = object({ purity: TrackPuritySchema.nullable() });
9022
+ var ListTrackRelationsInputSchema = object({
9023
+ deviceId: number().int(),
9024
+ trackId: string().optional(),
9025
+ since: number().int().optional(),
9026
+ until: number().int().optional(),
9027
+ limit: number().int().min(1).max(5e3).optional()
9028
+ });
9029
+ var ListTrackRelationsResultSchema = object({
9030
+ relations: array(TrackRelationSchema).readonly(),
9031
+ purities: array(TrackPuritySchema).readonly(),
9032
+ truncated: boolean()
9033
+ });
9034
+ _enum([
9035
+ "unknown-track",
9036
+ "cross-device",
9037
+ "self-relation",
9038
+ "contradiction",
9039
+ "switch-outside-track",
9040
+ "switch-needs-mixed"
9041
+ ]);
8966
9042
  /**
8967
9043
  * Ops-log — the durable, append-only operations audit shared by the
8968
9044
  * recordings and events management surfaces.
@@ -11516,6 +11592,68 @@ method(object({
11516
11592
  password: string()
11517
11593
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
11518
11594
  /**
11595
+ * How long one snapshot may take end to end: the pinned copy of the whole
11596
+ * database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
11597
+ * disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
11598
+ * generous because a timeout fails the whole backup run.
11599
+ */
11600
+ var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
11601
+ /**
11602
+ * The databases an owner snapshots — declared by the OWNER, so a caller never
11603
+ * guesses which file is live from what sits beside it (a cleanly closed
11604
+ * database has no sidecars and is just as owned). Paths are absolute on the
11605
+ * owner's host.
11606
+ */
11607
+ var DatabaseSnapshotTargetsSchema = object({ databases: array(object({ livePath: string() })) });
11608
+ /** One b-tree table of the snapshot and the rows it holds. */
11609
+ var DatabaseSnapshotTableSchema = object({
11610
+ name: string(),
11611
+ rows: number().int().nonnegative()
11612
+ });
11613
+ /**
11614
+ * What the owner wrote. Every path is ABSOLUTE on the owner's host — the
11615
+ * caller pins the call to its own node, so it can read the file; a caller
11616
+ * that finds the path outside its own data root refuses it rather than
11617
+ * archiving something it cannot place.
11618
+ */
11619
+ var DatabaseSnapshotResultSchema = object({
11620
+ /** The live database the snapshot copies. Never to be copied as a file. */
11621
+ livePath: string(),
11622
+ /** The verified copy: `<livePath>` + {@link DATABASE_SNAPSHOT_SUFFIX}. */
11623
+ snapshotPath: string(),
11624
+ sizeBytes: number().int().nonnegative(),
11625
+ pageCount: number().int().nonnegative(),
11626
+ pageSize: number().int().positive(),
11627
+ /**
11628
+ * Every b-tree table with its row count. Read inside the SAME read
11629
+ * transaction the copy was taken from, and found EQUAL on the copy — so
11630
+ * this is the content of the snapshot, not an estimate of the source.
11631
+ */
11632
+ tables: array(DatabaseSnapshotTableSchema),
11633
+ /** Wall time of the pinned copy (row counts included). */
11634
+ copyMs: number().nonnegative(),
11635
+ /** Wall time of the checks on the copy (`integrity_check`, row counts). */
11636
+ verifyMs: number().nonnegative(),
11637
+ /** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
11638
+ takenAt: number()
11639
+ });
11640
+ /**
11641
+ * A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
11642
+ * the same facts, with both paths relative to the archive root (the node's
11643
+ * data dir), because an archive outlives the host that made it.
11644
+ */
11645
+ var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
11646
+ /** Archive-relative path of the live database the archive does NOT carry. */
11647
+ livePath: string(),
11648
+ /** Archive-relative path of the verified copy it carries in its place. */
11649
+ snapshotPath: string()
11650
+ });
11651
+ method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(object({}), DatabaseSnapshotResultSchema, {
11652
+ kind: "mutation",
11653
+ auth: "admin",
11654
+ timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
11655
+ });
11656
+ /**
11519
11657
  * Orchestrator-side destination metadata. The orchestrator computes
11520
11658
  * `id = <addonId>:<subId>` from its provider lookup so consumers
11521
11659
  * (admin UI, restore flow) see one canonical key.
@@ -11626,7 +11764,12 @@ var ArchiveManifestSchema = object({
11626
11764
  locations: array(string()),
11627
11765
  entries: array(ArchiveEntrySchema),
11628
11766
  totalBytes: number(),
11629
- totalFiles: number()
11767
+ totalFiles: number(),
11768
+ /**
11769
+ * Live SQLite databases this archive carries as their OWNER's verified
11770
+ * snapshot instead of as files (D693). Absent on archives made before.
11771
+ */
11772
+ sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional()
11630
11773
  });
11631
11774
  var LocationStatSchema = object({
11632
11775
  name: string(),
@@ -13152,6 +13295,116 @@ var CompositionBlockStateSchema = object({
13152
13295
  reason: string().optional(),
13153
13296
  fields: array(CompositionFieldStateSchema)
13154
13297
  });
13298
+ var ComposerBlockSchema = object({
13299
+ id: string().min(1),
13300
+ name: string().min(1).max(120),
13301
+ enabled: boolean(),
13302
+ updatedAt: number(),
13303
+ composition: CompositionSchema
13304
+ });
13305
+ /**
13306
+ * A stored composition row that no longer PARSES — a schema a release
13307
+ * tightened, a row written by a newer build. Sent by id so the composer keeps
13308
+ * its device as a placeholder and reports the block `failed` naming the parse
13309
+ * error. Leaving it out would read, twice, exactly like a delete (D49).
13310
+ */
13311
+ var ComposerUnreadableBlockSchema = object({
13312
+ id: string().min(1),
13313
+ /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
13314
+ name: string().nullable(),
13315
+ /** The parse error, in the operator's words. */
13316
+ error: string()
13317
+ });
13318
+ method(object({
13319
+ /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
13320
+ integrationId: string().nullable(),
13321
+ /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
13322
+ storeLoaded: boolean(),
13323
+ blocks: array(ComposerBlockSchema),
13324
+ /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
13325
+ restartBlockIds: array(string()),
13326
+ /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
13327
+ unreadableBlocks: array(ComposerUnreadableBlockSchema)
13328
+ }), object({
13329
+ blocks: array(object({
13330
+ blockId: string(),
13331
+ status: CompositionRunStatusSchema,
13332
+ reason: string().optional()
13333
+ })),
13334
+ /**
13335
+ * False when the composer declared and withdrew NOTHING (store not loaded,
13336
+ * integration unknown, its own rows unread or read empty once). An empty
13337
+ * apply the caller owes is paid off only by one the composer acted on (D49).
13338
+ */
13339
+ acted: boolean()
13340
+ }), {
13341
+ kind: "mutation",
13342
+ auth: "admin"
13343
+ }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
13344
+ var NUMBER = {
13345
+ kind: "fixed",
13346
+ result: ["number"]
13347
+ };
13348
+ var BOOLEAN = {
13349
+ kind: "fixed",
13350
+ result: ["boolean"]
13351
+ };
13352
+ Object.freeze({
13353
+ min: NUMBER,
13354
+ max: NUMBER,
13355
+ abs: NUMBER,
13356
+ floor: NUMBER,
13357
+ ceil: NUMBER,
13358
+ sqrt: NUMBER,
13359
+ round: NUMBER,
13360
+ pow: NUMBER,
13361
+ clamp: NUMBER,
13362
+ avg: NUMBER,
13363
+ sum: NUMBER,
13364
+ age: NUMBER,
13365
+ convert: NUMBER,
13366
+ coalesce: { kind: "coalesce" },
13367
+ any: BOOLEAN,
13368
+ all: BOOLEAN,
13369
+ within: BOOLEAN,
13370
+ latest: {
13371
+ kind: "fixed",
13372
+ result: ["number", "null"]
13373
+ },
13374
+ number: {
13375
+ kind: "fixed",
13376
+ result: ["number", "null"]
13377
+ },
13378
+ rose: {
13379
+ kind: "fixed",
13380
+ result: ["number", "null"]
13381
+ },
13382
+ count: NUMBER
13383
+ });
13384
+ `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
13385
+ /**
13386
+ * What a composition may BUILD on a device type (G2, D676): the caps a new
13387
+ * device of that type, or an existing one that lacks them, can be given. The
13388
+ * blockers are the validator's own refusal codes, and a spec compares this
13389
+ * listing with `planComposition` for every capability — the editor can never
13390
+ * offer a feature the save would refuse for the same reason.
13391
+ */
13392
+ var ComposableFieldSchema = object({
13393
+ path: string(),
13394
+ kind: CompositionFieldKindSchema,
13395
+ nullable: boolean(),
13396
+ required: boolean(),
13397
+ enumValues: array(string()).optional()
13398
+ });
13399
+ var ComposableCapabilitiesSchema = object({ caps: array(object({
13400
+ cap: string(),
13401
+ fields: array(ComposableFieldSchema),
13402
+ /** Present for an item-array cap (`consumables.items`). */
13403
+ itemArray: object({
13404
+ path: string(),
13405
+ keyField: string()
13406
+ }).optional()
13407
+ })) });
13155
13408
  /** Where a block runs. The operator chooses — a block driving a device on an
13156
13409
  * agent is the reason placement is not fixed to the hub. */
13157
13410
  var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
@@ -13316,7 +13569,7 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
13316
13569
  }), method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }), method(object({}), CompositionListReadSchema, { auth: "admin" }), method(object({
13317
13570
  addonId: string().min(1),
13318
13571
  stableId: string().min(1)
13319
- }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({
13572
+ }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({ deviceType: _enum(DeviceType) }), ComposableCapabilitiesSchema, { auth: "admin" }), method(object({
13320
13573
  composition: CompositionSchema,
13321
13574
  blockId: string().optional()
13322
13575
  }), CompositionValidationSchema, {
@@ -13324,52 +13577,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
13324
13577
  auth: "admin",
13325
13578
  access: "view"
13326
13579
  });
13327
- var ComposerBlockSchema = object({
13328
- id: string().min(1),
13329
- name: string().min(1).max(120),
13330
- enabled: boolean(),
13331
- updatedAt: number(),
13332
- composition: CompositionSchema
13333
- });
13334
- /**
13335
- * A stored composition row that no longer PARSES — a schema a release
13336
- * tightened, a row written by a newer build. Sent by id so the composer keeps
13337
- * its device as a placeholder and reports the block `failed` naming the parse
13338
- * error. Leaving it out would read, twice, exactly like a delete (D49).
13339
- */
13340
- var ComposerUnreadableBlockSchema = object({
13341
- id: string().min(1),
13342
- /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
13343
- name: string().nullable(),
13344
- /** The parse error, in the operator's words. */
13345
- error: string()
13346
- });
13347
- method(object({
13348
- /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
13349
- integrationId: string().nullable(),
13350
- /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
13351
- storeLoaded: boolean(),
13352
- blocks: array(ComposerBlockSchema),
13353
- /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
13354
- restartBlockIds: array(string()),
13355
- /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
13356
- unreadableBlocks: array(ComposerUnreadableBlockSchema)
13357
- }), object({
13358
- blocks: array(object({
13359
- blockId: string(),
13360
- status: CompositionRunStatusSchema,
13361
- reason: string().optional()
13362
- })),
13363
- /**
13364
- * False when the composer declared and withdrew NOTHING (store not loaded,
13365
- * integration unknown, its own rows unread or read empty once). An empty
13366
- * apply the caller owes is paid off only by one the composer acted on (D49).
13367
- */
13368
- acted: boolean()
13369
- }), {
13370
- kind: "mutation",
13371
- auth: "admin"
13372
- }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
13373
13580
  /**
13374
13581
  * `custom-model-registry` — collection cap exposing operator-registered
13375
13582
  * custom detection models. Each provider (today: `addon-model-studio`)
@@ -15520,6 +15727,219 @@ method(object({
15520
15727
  caps: array(string()).readonly().optional()
15521
15728
  }), record(string(), record(string(), unknown().nullable())));
15522
15729
  /**
15730
+ * Doorbell button cap. Two kinds of providers coexist behind this cap
15731
+ * name (same pattern as `snapshot`):
15732
+ *
15733
+ * - **Native** providers: registered per-device by device-driver
15734
+ * addons via `ctx.registerNativeCap` — either on a
15735
+ * `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
15736
+ * or directly on the camera (Reolink registers at camera level).
15737
+ * Emits an `onPressed` event every time the firmware pushes a
15738
+ * ring; status tracks the last press and a pressCount since start
15739
+ * (diagnostic).
15740
+ *
15741
+ * - **Wrapper** provider: the `virtual-doorbell` system builtin
15742
+ * (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
15743
+ * device (contact / switch / event-emitter …) into a doorbell for
15744
+ * a camera. `defaultActive: false` — the operator explicitly binds
15745
+ * it per camera in the device-bindings UI, then picks the source
15746
+ * device + trigger in the per-device settings.
15747
+ *
15748
+ * The DeviceEventPropagator re-emits `onPressed` on the camera parent
15749
+ * — subscribers listening at the camera level receive ring events
15750
+ * with `via[]` populated. No code on the parent needed.
15751
+ */
15752
+ var DoorbellStatusSchema = object({
15753
+ /** Ms epoch of the last press. null = never observed since this provider started. */
15754
+ lastPressedAt: number().nullable(),
15755
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
15756
+ pressCountSinceStart: number()
15757
+ });
15758
+ var DoorbellPressEventSchema = object({
15759
+ deviceId: number(),
15760
+ timestamp: number()
15761
+ });
15762
+ /**
15763
+ * The `doorbell-source` extension slot's editable value (D648): the camera's
15764
+ * virtual-doorbell trigger devices, exactly what the wrapper's
15765
+ * `doorbellSources` persists (as `{ deviceId }` records).
15766
+ */
15767
+ var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
15768
+ /**
15769
+ * The `doorbell-source` slot — which devices ring this camera's VIRTUAL
15770
+ * doorbell, owned by the `virtual-doorbell` wrapper over its
15771
+ * `doorbellSources` store (D648). A source rings when one of its
15772
+ * `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
15773
+ * different authority (`deviceManager.setWrapperActive`, D62) — the slot
15774
+ * reports it, it never writes it.
15775
+ */
15776
+ var DOORBELL_SOURCE_SLOT = {
15777
+ id: "doorbell-source",
15778
+ label: "Doorbell trigger devices",
15779
+ 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.",
15780
+ shape: "association",
15781
+ hostDeviceTypes: [DeviceType.Camera],
15782
+ sourceCaps: SOURCE_CAPS,
15783
+ cardinality: "many",
15784
+ value: DoorbellSourceSlotValueSchema
15785
+ };
15786
+ var doorbellCapability = {
15787
+ name: "doorbell",
15788
+ scope: "device",
15789
+ deviceNative: true,
15790
+ mode: "singleton",
15791
+ kind: "wrapper",
15792
+ defaultActive: false,
15793
+ deviceTypes: [DeviceType.Button, DeviceType.Camera],
15794
+ extensionSlots: [DOORBELL_SOURCE_SLOT],
15795
+ methods: {},
15796
+ events: {
15797
+ /**
15798
+ * Fires once per physical press. Reolink delivers via Baichuan
15799
+ * push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
15800
+ * release/duration — it's a pulse.
15801
+ */
15802
+ onPressed: {
15803
+ data: DoorbellPressEventSchema,
15804
+ fromState: {
15805
+ field: "lastPressedAt",
15806
+ on: "advance"
15807
+ }
15808
+ } },
15809
+ status: {
15810
+ schema: DoorbellStatusSchema,
15811
+ kind: "push"
15812
+ },
15813
+ /**
15814
+ * Runtime-state slice — last press timestamp + lifetime press count.
15815
+ * Mirrored by the kernel and readable via
15816
+ * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
15817
+ * without subscribing.
15818
+ */
15819
+ runtimeState: DoorbellStatusSchema,
15820
+ /**
15821
+ * 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.
15822
+ *
15823
+ * See `RuntimeStateDurability`. Enforced by
15824
+ * `scripts/check-runtime-state-durability.ts`.
15825
+ */
15826
+ durability: "restored"
15827
+ };
15828
+ var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
15829
+ DeviceType.Camera, DeviceType.Camera;
15830
+ /** A slot's editable value, discriminated on `slot`. */
15831
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
15832
+ DeviceType.Camera;
15833
+ var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
15834
+ state: literal("unreachable"),
15835
+ reason: string()
15836
+ })]);
15837
+ /** One provider of slots — the D554 source-listing row. */
15838
+ var ExtensionSourceSchema = object({
15839
+ /** The routing prefix of every `slotRef` this provider serves. */
15840
+ source: string(),
15841
+ label: string(),
15842
+ /** Stamped by the dispatcher from the registry (D557). */
15843
+ addonId: string().optional(),
15844
+ availability: ExtensionSourceAvailabilitySchema
15845
+ });
15846
+ /**
15847
+ * How one picked source stands. `missing` — no such device (deleted, or an id
15848
+ * that never existed); `foreign` — a device the slot's owner cannot read from
15849
+ * (a source owned by another addon); `unavailable` — it exists but is not a
15850
+ * valid source now (a container, which is never a pick). A source in any of
15851
+ * these states is SHOWN, never silently dropped or re-pointed.
15852
+ */
15853
+ var ExtensionSourceHealthSchema = _enum([
15854
+ "ok",
15855
+ "missing",
15856
+ "foreign",
15857
+ "unavailable"
15858
+ ]);
15859
+ var ExtensionSlotSourceSchema = object({
15860
+ deviceId: number().int(),
15861
+ /** The device's name, or null when it could not be resolved (`missing`). */
15862
+ name: string().nullable(),
15863
+ health: ExtensionSourceHealthSchema,
15864
+ detail: string().optional()
15865
+ });
15866
+ /**
15867
+ * A DIFFERENT authority that gates whether the slot's sources do anything —
15868
+ * reported read-only, named, never written through this contract (D62). The
15869
+ * virtual doorbell's sources ring only while the wrapper is bound to the
15870
+ * camera, and that binding belongs to `deviceManager.setWrapperActive`.
15871
+ * `unknown` means the gate could not be read; it is not "inactive" (D315).
15872
+ */
15873
+ var ExtensionSlotActivationSchema = object({
15874
+ state: _enum([
15875
+ "active",
15876
+ "inactive",
15877
+ "unknown"
15878
+ ]),
15879
+ authority: string(),
15880
+ detail: string().optional()
15881
+ });
15882
+ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
15883
+ state: literal("ok"),
15884
+ /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
15885
+ slotRef: string(),
15886
+ slot: ExtensionSlotIdSchema,
15887
+ /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
15888
+ authority: string(),
15889
+ activation: ExtensionSlotActivationSchema.nullable(),
15890
+ value: ExtensionSlotValueSchema,
15891
+ sources: array(ExtensionSlotSourceSchema),
15892
+ /**
15893
+ * Devices the owner links to the host ON ITS OWN, by structure, and that
15894
+ * are therefore not in `value` (D655): a camera's device-tree children, and
15895
+ * the child a picked container stands for (D356 — a container is never a
15896
+ * pick, its children are). Read-only; the editor shows them and may offer
15897
+ * per-device options on them (the linked-devices tracked-event opt-in).
15898
+ * Absent when the owner links nothing beyond the picks, and from an owner
15899
+ * older than D655.
15900
+ */
15901
+ impliedSources: array(ExtensionSlotSourceSchema).optional()
15902
+ }), object({
15903
+ state: literal("unreachable"),
15904
+ addonId: string(),
15905
+ reason: string()
15906
+ })]);
15907
+ var ExtensionCandidatesSchema = object({ candidates: array(object({
15908
+ deviceId: number().int(),
15909
+ name: string(),
15910
+ type: string(),
15911
+ location: string().nullable(),
15912
+ /** The container a child belongs to — "Spotlight 2" alone does not say which. */
15913
+ parentName: string().nullable(),
15914
+ /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
15915
+ suggested: boolean(),
15916
+ /** Why it is suggested ("same location"), null when it is not. */
15917
+ reason: string().nullable()
15918
+ })) });
15919
+ /**
15920
+ * What a write did. `none` — applied in place. `host` / `parent` — the owner
15921
+ * reloaded the host (or, for an accessory child, its parent) because the
15922
+ * write changed what the host REGISTERS. A slot never adds a capability to its
15923
+ * host — that is a composition (D663) — so today's owners answer `none`.
15924
+ */
15925
+ var ExtensionSetResultSchema = object({
15926
+ applied: literal(true),
15927
+ reload: _enum([
15928
+ "none",
15929
+ "host",
15930
+ "parent"
15931
+ ])
15932
+ });
15933
+ var ExtensionSlotRefInputSchema = object({
15934
+ deviceId: number().int(),
15935
+ slotRef: string().min(1)
15936
+ });
15937
+ var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
15938
+ method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
15939
+ kind: "mutation",
15940
+ auth: "admin"
15941
+ });
15942
+ /**
15523
15943
  * Per-field ownership (D663). A composition may CLAIM fields of a native
15524
15944
  * cap's runtime-state slice on an existing device: `replace` overlays the
15525
15945
  * claimed fields on the native slice, `add` builds a slice the device does
@@ -18529,17 +18949,25 @@ var NcScheduleSchema = object({
18529
18949
  */
18530
18950
  var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
18531
18951
  /**
18952
+ * How a summary window is SENT (D698): `rule` (absent) = ONE notification with
18953
+ * every section; `section` = one notification per section with something to
18954
+ * say (an unavailable section included), each titled by its section.
18955
+ */
18956
+ var NcStateSummarySplitSchema = _enum(["rule", "section"]);
18957
+ /**
18532
18958
  * `summary`: the rule sends NOTHING per event. When a window of `schedule`
18533
18959
  * CLOSES, it sends one notification with the current state of its kinds
18534
18960
  * (low batteries, consumables to replace, devices offline, updates
18535
- * available, ...), after its own filters. Nothing to report sends nothing.
18961
+ * available, ...), after its own filters — or, with `split: 'section'`
18962
+ * (D698), one notification per section. Nothing to report sends nothing.
18536
18963
  * The schedule is the ordinary `NcSchedule` (weekly windows, IANA timezone,
18537
18964
  * midnight crossing); the send time is each window's END. Refused on the
18538
18965
  * `alarm` family, which stays instant (`systemEventDeliveryProblems`).
18539
18966
  */
18540
18967
  var NcSystemEventDeliverySchema = discriminatedUnion("mode", [object({ mode: literal("instant") }), object({
18541
18968
  mode: literal("summary"),
18542
- schedule: NcScheduleSchema
18969
+ schedule: NcScheduleSchema,
18970
+ split: NcStateSummarySplitSchema.optional()
18543
18971
  })]);
18544
18972
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
18545
18973
  var NcPlateMatcherSchema = object({
@@ -18679,8 +19107,14 @@ var NcSensorTransitionSchema = _enum(["raised", "cleared"]);
18679
19107
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
18680
19108
  var NcZoneConditionSchema = object({
18681
19109
  ids: array(string().min(1)).min(1),
18682
- /** Quantifier over `ids` — at least one / every one visited. */
18683
- match: _enum(["any", "all"]).default("any")
19110
+ /**
19111
+ * LEGACY quantifier over `ids`. Absent = `any` (at least one visited), which
19112
+ * is what both editors mean and all they write since D690: "all of" was
19113
+ * removed from the editors because on an immediate rule it asked one
19114
+ * detection to stand in every zone at once. Still ACCEPTED, and `all` still
19115
+ * evaluated, so a stored rule keeps parsing and meaning what it meant.
19116
+ */
19117
+ match: _enum(["any", "all"]).optional()
18684
19118
  });
18685
19119
  /**
18686
19120
  * The P1 condition set — a flat AND of groups; absent group = pass;
@@ -19184,10 +19618,12 @@ var NcMediaPolicySchema = object({
19184
19618
  /**
19185
19619
  * Cooldown GRANULARITY over the subject's class — how much a fired
19186
19620
  * notification suppresses.
19187
- * - `shared` (default, and the absent value) — one window for the whole
19188
- * rule/scope: a cat silences the next dog for `cooldownSec`.
19189
- * - `per-class` — an independent window per detected class, so cat→dog fires
19190
- * at once and cat→cat still waits.
19621
+ * - `per-class` (default, and the absent value since 2026-10-01 — D36) — an
19622
+ * independent window per detected class: cat→dog fires at once, cat→cat
19623
+ * still waits.
19624
+ * - `shared` — one window for the whole rule/scope: a cat silences the next
19625
+ * dog for `cooldownSec`. Only written when an operator picks it; it is no
19626
+ * longer what an unset rule means.
19191
19627
  *
19192
19628
  * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
19193
19629
  * must not be swallowed by a bark's window (the precedent this generalizes —
@@ -19202,8 +19638,11 @@ var NcThrottleSchema = object({
19202
19638
  /**
19203
19639
  * Class granularity of the cooldown key. Optional rather than defaulted:
19204
19640
  * a Zod default does NOT run on the addon→addon cap path, so a persisted
19205
- * rule authored before this field simply carries none — and the engine
19206
- * reads absent as `shared`, the pre-existing behaviour.
19641
+ * rule authored before this field simply carries none. The engine used to
19642
+ * read absent as `shared` (D36); since 2026-10-01 it reads absent as
19643
+ * `per-class` — the operator's default — and only an explicit `shared`
19644
+ * still means `shared`. See `cooldownKey` / `keysPerClass` in the rule
19645
+ * engine, and D36's dated note.
19207
19646
  */
19208
19647
  granularity: NcThrottleGranularitySchema.optional()
19209
19648
  });
@@ -19527,11 +19966,23 @@ var NcStateSummaryPreviewSectionSchema = object({
19527
19966
  reason: string().optional()
19528
19967
  });
19529
19968
  /**
19969
+ * One notification a previewed summary would send (D698): the whole summary on
19970
+ * a `rule` split (no `section`), one section's on a `section` split.
19971
+ */
19972
+ var NcStateSummaryPreviewRowSchema = object({
19973
+ section: string().optional(),
19974
+ /** The section's name on a per-section row; every reported section's, joined, on a combined one. */
19975
+ title: string(),
19976
+ text: string(),
19977
+ count: number().int().nonnegative()
19978
+ });
19979
+ /**
19530
19980
  * The summary a rule would send now. `empty` = nothing to report and every
19531
19981
  * section read: such a summary is NOT sent. `dropped` counts the open states
19532
19982
  * the rule's own filters (or a camera mute) left out, by reason.
19533
19983
  * `excludedGroups` names the kind groups selected that have no state to report
19534
- * (backups & exports).
19984
+ * (backups & exports). `split` and `rows` (D698) say how it would be sent —
19985
+ * optional, so an older hub's answer still parses.
19535
19986
  */
19536
19987
  var NcStateSummaryPreviewSchema = object({
19537
19988
  empty: boolean(),
@@ -19539,7 +19990,9 @@ var NcStateSummaryPreviewSchema = object({
19539
19990
  text: string(),
19540
19991
  sections: array(NcStateSummaryPreviewSectionSchema),
19541
19992
  dropped: record(string(), number().int().nonnegative()),
19542
- excludedGroups: array(string())
19993
+ excludedGroups: array(string()),
19994
+ split: NcStateSummarySplitSchema.optional(),
19995
+ rows: array(NcStateSummaryPreviewRowSchema).optional()
19543
19996
  });
19544
19997
  var NcTestResultSchema = object({
19545
19998
  recordId: string(),
@@ -20555,7 +21008,7 @@ function cameraSensorRefKey(ref) {
20555
21008
  }
20556
21009
  /** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
20557
21010
  var CameraSensorsModeSchema = _enum(["in-addition"]);
20558
- object({
21011
+ var CameraSensorsConfigSchema = object({
20559
21012
  mode: CameraSensorsModeSchema,
20560
21013
  sensors: array(CameraSensorRefSchema).min(1).max(8)
20561
21014
  }).superRefine((value, ctx) => {
@@ -22460,7 +22913,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
22460
22913
  trackIds: array(string()).min(1)
22461
22914
  }), object({
22462
22915
  deleted: number().int(),
22463
- failed: array(string()).readonly()
22916
+ failed: array(string()).readonly(),
22917
+ sparedMediaIds: array(number().int()).readonly().optional()
22464
22918
  }), {
22465
22919
  kind: "mutation",
22466
22920
  auth: "admin"
@@ -22469,7 +22923,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
22469
22923
  deviceId: number(),
22470
22924
  trackId: string(),
22471
22925
  flags: TrackFlagsPatchSchema
22472
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
22926
+ }), 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, {
22473
22927
  kind: "query",
22474
22928
  auth: "admin"
22475
22929
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -24667,7 +25121,64 @@ var NodeInferenceDevicesSchema = object({
24667
25121
  reachable: boolean(),
24668
25122
  devices: array(NodeInferenceDeviceSchema).readonly()
24669
25123
  });
24670
- method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
25124
+ /**
25125
+ * Pipeline Orchestrator capability — global load balancer + camera dispatcher.
25126
+ *
25127
+ * Lives on the hub. Tracks the camera-to-agent assignment map, listens to
25128
+ * device lifecycle events, queries each runner's capacity + hardware
25129
+ * profile, and dispatches `attachCamera` / `detachCamera` cap calls to the
25130
+ * appropriate runner instances. Persists assignments via the multi-level
25131
+ * settings store so they survive hub restarts.
25132
+ *
25133
+ * Strictly the control plane: never sees a frame, never calls inference,
25134
+ * never drains queues. The runner does that work locally on each agent.
25135
+ */
25136
+ /**
25137
+ * The input of `setCameraSensors` (G5, D676): the ONE typed write path of a
25138
+ * camera's attached sensors (D672). `config: null` removes the attachment —
25139
+ * the camera reads `not-configured` again, never `unreadable`.
25140
+ */
25141
+ var SetCameraSensorsInputSchema = object({
25142
+ deviceId: number().int().nonnegative(),
25143
+ /** `null` removes the attachment: the camera goes back to `not-configured`. */
25144
+ config: CameraSensorsConfigSchema.nullable()
25145
+ });
25146
+ /**
25147
+ * Why an early occupancy look (D691) was not scheduled.
25148
+ *
25149
+ * - `unknown-camera` — no session was ever dispatched for it, so there is no
25150
+ * node and no config to attach a burst with.
25151
+ * - `out-of-range` — the ask is negative or further out than the orchestrator
25152
+ * will hold a timer for; the parked-object cadence is the answer there.
25153
+ * - `no-burst-producer` — this build has no burst producer at all.
25154
+ * - `already-looked` — this camera's ONE early look since its last session has
25155
+ * been spent. A look's own burst can re-arm a flickering flip, and a look
25156
+ * per arm would chain a burst every ~30 s forever (review H2); the next
25157
+ * real session re-arms the budget.
25158
+ */
25159
+ var OccupancyLookRefusalSchema = _enum([
25160
+ "unknown-camera",
25161
+ "out-of-range",
25162
+ "no-burst-producer",
25163
+ "already-looked"
25164
+ ]);
25165
+ method(object({
25166
+ deviceId: number().int().nonnegative(),
25167
+ /** How long from NOW until the pending flip's sustain window ends. RELATIVE,
25168
+ * so the caller's clock and the orchestrator's never have to agree. */
25169
+ afterMs: number().finite(),
25170
+ /** Why, for the log. */
25171
+ reason: string()
25172
+ }), object({
25173
+ scheduled: boolean(),
25174
+ /** When `scheduled`: how long until the burst is dialled. */
25175
+ dueInMs: number().optional(),
25176
+ /** When not `scheduled`: why. */
25177
+ refusedBecause: OccupancyLookRefusalSchema.optional()
25178
+ }), {
25179
+ kind: "mutation",
25180
+ auth: "admin"
25181
+ }), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
24671
25182
  kind: "mutation",
24672
25183
  auth: "admin"
24673
25184
  }), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
@@ -24821,7 +25332,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
24821
25332
  }), CameraSwitchGroupSchema, {
24822
25333
  kind: "mutation",
24823
25334
  auth: "admin"
24824
- }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
25335
+ }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(SetCameraSensorsInputSchema, object({ success: literal(true) }), {
25336
+ kind: "mutation",
25337
+ auth: "admin"
25338
+ }), method(_void(), DiskReconcileJobSchema, {
24825
25339
  kind: "mutation",
24826
25340
  auth: "admin"
24827
25341
  }), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
@@ -27540,219 +28054,6 @@ var CLIP_PLAYBACK_OPTIONS = {
27540
28054
  }
27541
28055
  };
27542
28056
  /**
27543
- * Doorbell button cap. Two kinds of providers coexist behind this cap
27544
- * name (same pattern as `snapshot`):
27545
- *
27546
- * - **Native** providers: registered per-device by device-driver
27547
- * addons via `ctx.registerNativeCap` — either on a
27548
- * `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
27549
- * or directly on the camera (Reolink registers at camera level).
27550
- * Emits an `onPressed` event every time the firmware pushes a
27551
- * ring; status tracks the last press and a pressCount since start
27552
- * (diagnostic).
27553
- *
27554
- * - **Wrapper** provider: the `virtual-doorbell` system builtin
27555
- * (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
27556
- * device (contact / switch / event-emitter …) into a doorbell for
27557
- * a camera. `defaultActive: false` — the operator explicitly binds
27558
- * it per camera in the device-bindings UI, then picks the source
27559
- * device + trigger in the per-device settings.
27560
- *
27561
- * The DeviceEventPropagator re-emits `onPressed` on the camera parent
27562
- * — subscribers listening at the camera level receive ring events
27563
- * with `via[]` populated. No code on the parent needed.
27564
- */
27565
- var DoorbellStatusSchema = object({
27566
- /** Ms epoch of the last press. null = never observed since this provider started. */
27567
- lastPressedAt: number().nullable(),
27568
- /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
27569
- pressCountSinceStart: number()
27570
- });
27571
- var DoorbellPressEventSchema = object({
27572
- deviceId: number(),
27573
- timestamp: number()
27574
- });
27575
- /**
27576
- * The `doorbell-source` extension slot's editable value (D648): the camera's
27577
- * virtual-doorbell trigger devices, exactly what the wrapper's
27578
- * `doorbellSources` persists (as `{ deviceId }` records).
27579
- */
27580
- var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
27581
- /**
27582
- * The `doorbell-source` slot — which devices ring this camera's VIRTUAL
27583
- * doorbell, owned by the `virtual-doorbell` wrapper over its
27584
- * `doorbellSources` store (D648). A source rings when one of its
27585
- * `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
27586
- * different authority (`deviceManager.setWrapperActive`, D62) — the slot
27587
- * reports it, it never writes it.
27588
- */
27589
- var DOORBELL_SOURCE_SLOT = {
27590
- id: "doorbell-source",
27591
- label: "Doorbell trigger devices",
27592
- 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.",
27593
- shape: "association",
27594
- hostDeviceTypes: [DeviceType.Camera],
27595
- sourceCaps: SOURCE_CAPS,
27596
- cardinality: "many",
27597
- value: DoorbellSourceSlotValueSchema
27598
- };
27599
- var doorbellCapability = {
27600
- name: "doorbell",
27601
- scope: "device",
27602
- deviceNative: true,
27603
- mode: "singleton",
27604
- kind: "wrapper",
27605
- defaultActive: false,
27606
- deviceTypes: [DeviceType.Button, DeviceType.Camera],
27607
- extensionSlots: [DOORBELL_SOURCE_SLOT],
27608
- methods: {},
27609
- events: {
27610
- /**
27611
- * Fires once per physical press. Reolink delivers via Baichuan
27612
- * push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
27613
- * release/duration — it's a pulse.
27614
- */
27615
- onPressed: {
27616
- data: DoorbellPressEventSchema,
27617
- fromState: {
27618
- field: "lastPressedAt",
27619
- on: "advance"
27620
- }
27621
- } },
27622
- status: {
27623
- schema: DoorbellStatusSchema,
27624
- kind: "push"
27625
- },
27626
- /**
27627
- * Runtime-state slice — last press timestamp + lifetime press count.
27628
- * Mirrored by the kernel and readable via
27629
- * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
27630
- * without subscribing.
27631
- */
27632
- runtimeState: DoorbellStatusSchema,
27633
- /**
27634
- * 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.
27635
- *
27636
- * See `RuntimeStateDurability`. Enforced by
27637
- * `scripts/check-runtime-state-durability.ts`.
27638
- */
27639
- durability: "restored"
27640
- };
27641
- var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
27642
- DeviceType.Camera, DeviceType.Camera;
27643
- /** A slot's editable value, discriminated on `slot`. */
27644
- var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
27645
- DeviceType.Camera;
27646
- var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
27647
- state: literal("unreachable"),
27648
- reason: string()
27649
- })]);
27650
- /** One provider of slots — the D554 source-listing row. */
27651
- var ExtensionSourceSchema = object({
27652
- /** The routing prefix of every `slotRef` this provider serves. */
27653
- source: string(),
27654
- label: string(),
27655
- /** Stamped by the dispatcher from the registry (D557). */
27656
- addonId: string().optional(),
27657
- availability: ExtensionSourceAvailabilitySchema
27658
- });
27659
- /**
27660
- * How one picked source stands. `missing` — no such device (deleted, or an id
27661
- * that never existed); `foreign` — a device the slot's owner cannot read from
27662
- * (a source owned by another addon); `unavailable` — it exists but is not a
27663
- * valid source now (a container, which is never a pick). A source in any of
27664
- * these states is SHOWN, never silently dropped or re-pointed.
27665
- */
27666
- var ExtensionSourceHealthSchema = _enum([
27667
- "ok",
27668
- "missing",
27669
- "foreign",
27670
- "unavailable"
27671
- ]);
27672
- var ExtensionSlotSourceSchema = object({
27673
- deviceId: number().int(),
27674
- /** The device's name, or null when it could not be resolved (`missing`). */
27675
- name: string().nullable(),
27676
- health: ExtensionSourceHealthSchema,
27677
- detail: string().optional()
27678
- });
27679
- /**
27680
- * A DIFFERENT authority that gates whether the slot's sources do anything —
27681
- * reported read-only, named, never written through this contract (D62). The
27682
- * virtual doorbell's sources ring only while the wrapper is bound to the
27683
- * camera, and that binding belongs to `deviceManager.setWrapperActive`.
27684
- * `unknown` means the gate could not be read; it is not "inactive" (D315).
27685
- */
27686
- var ExtensionSlotActivationSchema = object({
27687
- state: _enum([
27688
- "active",
27689
- "inactive",
27690
- "unknown"
27691
- ]),
27692
- authority: string(),
27693
- detail: string().optional()
27694
- });
27695
- var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
27696
- state: literal("ok"),
27697
- /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
27698
- slotRef: string(),
27699
- slot: ExtensionSlotIdSchema,
27700
- /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
27701
- authority: string(),
27702
- activation: ExtensionSlotActivationSchema.nullable(),
27703
- value: ExtensionSlotValueSchema,
27704
- sources: array(ExtensionSlotSourceSchema),
27705
- /**
27706
- * Devices the owner links to the host ON ITS OWN, by structure, and that
27707
- * are therefore not in `value` (D655): a camera's device-tree children, and
27708
- * the child a picked container stands for (D356 — a container is never a
27709
- * pick, its children are). Read-only; the editor shows them and may offer
27710
- * per-device options on them (the linked-devices tracked-event opt-in).
27711
- * Absent when the owner links nothing beyond the picks, and from an owner
27712
- * older than D655.
27713
- */
27714
- impliedSources: array(ExtensionSlotSourceSchema).optional()
27715
- }), object({
27716
- state: literal("unreachable"),
27717
- addonId: string(),
27718
- reason: string()
27719
- })]);
27720
- var ExtensionCandidatesSchema = object({ candidates: array(object({
27721
- deviceId: number().int(),
27722
- name: string(),
27723
- type: string(),
27724
- location: string().nullable(),
27725
- /** The container a child belongs to — "Spotlight 2" alone does not say which. */
27726
- parentName: string().nullable(),
27727
- /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
27728
- suggested: boolean(),
27729
- /** Why it is suggested ("same location"), null when it is not. */
27730
- reason: string().nullable()
27731
- })) });
27732
- /**
27733
- * What a write did. `none` — applied in place. `host` / `parent` — the owner
27734
- * reloaded the host (or, for an accessory child, its parent) because the
27735
- * write changed what the host REGISTERS. A slot never adds a capability to its
27736
- * host — that is a composition (D663) — so today's owners answer `none`.
27737
- */
27738
- var ExtensionSetResultSchema = object({
27739
- applied: literal(true),
27740
- reload: _enum([
27741
- "none",
27742
- "host",
27743
- "parent"
27744
- ])
27745
- });
27746
- var ExtensionSlotRefInputSchema = object({
27747
- deviceId: number().int(),
27748
- slotRef: string().min(1)
27749
- });
27750
- var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
27751
- method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
27752
- kind: "mutation",
27753
- auth: "admin"
27754
- });
27755
- /**
27756
28057
  * Optional client-side hints sent at session creation to help the provider
27757
28058
  * pick the best native source. All fields optional — a viewer that knows
27758
28059
  * nothing still gets a sane default. (Relocated from the retired `webrtc`
@@ -39405,47 +39706,6 @@ var zoneRulesCapability = {
39405
39706
  */
39406
39707
  durability: "restored"
39407
39708
  };
39408
- var NUMBER = {
39409
- kind: "fixed",
39410
- result: ["number"]
39411
- };
39412
- var BOOLEAN = {
39413
- kind: "fixed",
39414
- result: ["boolean"]
39415
- };
39416
- Object.freeze({
39417
- min: NUMBER,
39418
- max: NUMBER,
39419
- abs: NUMBER,
39420
- floor: NUMBER,
39421
- ceil: NUMBER,
39422
- sqrt: NUMBER,
39423
- round: NUMBER,
39424
- pow: NUMBER,
39425
- clamp: NUMBER,
39426
- avg: NUMBER,
39427
- sum: NUMBER,
39428
- age: NUMBER,
39429
- convert: NUMBER,
39430
- coalesce: { kind: "coalesce" },
39431
- any: BOOLEAN,
39432
- all: BOOLEAN,
39433
- within: BOOLEAN,
39434
- latest: {
39435
- kind: "fixed",
39436
- result: ["number", "null"]
39437
- },
39438
- number: {
39439
- kind: "fixed",
39440
- result: ["number", "null"]
39441
- },
39442
- rose: {
39443
- kind: "fixed",
39444
- result: ["number", "null"]
39445
- },
39446
- count: NUMBER
39447
- });
39448
- `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
39449
39709
  /**
39450
39710
  * Accessory device helpers — shared across drivers.
39451
39711
  *
@@ -43597,6 +43857,12 @@ Object.freeze({
43597
43857
  addonId: null,
43598
43858
  access: "view"
43599
43859
  },
43860
+ "coreBlocks.listComposableCaps": {
43861
+ capName: "core-blocks",
43862
+ capScope: "system",
43863
+ addonId: null,
43864
+ access: "view"
43865
+ },
43600
43866
  "coreBlocks.listCompositions": {
43601
43867
  capName: "core-blocks",
43602
43868
  capScope: "system",
@@ -43675,6 +43941,18 @@ Object.freeze({
43675
43941
  addonId: null,
43676
43942
  access: "view"
43677
43943
  },
43944
+ "databaseSnapshot.listDatabases": {
43945
+ capName: "database-snapshot",
43946
+ capScope: "system",
43947
+ addonId: null,
43948
+ access: "view"
43949
+ },
43950
+ "databaseSnapshot.writeSnapshot": {
43951
+ capName: "database-snapshot",
43952
+ capScope: "system",
43953
+ addonId: null,
43954
+ access: "create"
43955
+ },
43678
43956
  "dataStoreProvider.aggregate": {
43679
43957
  capName: "data-store-provider",
43680
43958
  capScope: "system",
@@ -46411,6 +46689,12 @@ Object.freeze({
46411
46689
  addonId: null,
46412
46690
  access: "create"
46413
46691
  },
46692
+ "pipelineAnalytics.clearTrackRelation": {
46693
+ capName: "pipeline-analytics",
46694
+ capScope: "device",
46695
+ addonId: null,
46696
+ access: "delete"
46697
+ },
46414
46698
  "pipelineAnalytics.clearTracks": {
46415
46699
  capName: "pipeline-analytics",
46416
46700
  capScope: "device",
@@ -46663,6 +46947,12 @@ Object.freeze({
46663
46947
  addonId: null,
46664
46948
  access: "view"
46665
46949
  },
46950
+ "pipelineAnalytics.listTrackRelations": {
46951
+ capName: "pipeline-analytics",
46952
+ capScope: "device",
46953
+ addonId: null,
46954
+ access: "view"
46955
+ },
46666
46956
  "pipelineAnalytics.listTracks": {
46667
46957
  capName: "pipeline-analytics",
46668
46958
  capScope: "device",
@@ -46777,6 +47067,18 @@ Object.freeze({
46777
47067
  addonId: null,
46778
47068
  access: "create"
46779
47069
  },
47070
+ "pipelineAnalytics.setTrackPurity": {
47071
+ capName: "pipeline-analytics",
47072
+ capScope: "device",
47073
+ addonId: null,
47074
+ access: "create"
47075
+ },
47076
+ "pipelineAnalytics.setTrackRelation": {
47077
+ capName: "pipeline-analytics",
47078
+ capScope: "device",
47079
+ addonId: null,
47080
+ access: "create"
47081
+ },
46780
47082
  "pipelineAnalytics.startStorageMigrationMove": {
46781
47083
  capName: "pipeline-analytics",
46782
47084
  capScope: "device",
@@ -47215,6 +47517,12 @@ Object.freeze({
47215
47517
  addonId: null,
47216
47518
  access: "delete"
47217
47519
  },
47520
+ "pipelineOrchestrator.requestOccupancyLook": {
47521
+ capName: "pipeline-orchestrator",
47522
+ capScope: "system",
47523
+ addonId: null,
47524
+ access: "create"
47525
+ },
47218
47526
  "pipelineOrchestrator.resetNodePipelineDefaults": {
47219
47527
  capName: "pipeline-orchestrator",
47220
47528
  capScope: "system",
@@ -47281,6 +47589,12 @@ Object.freeze({
47281
47589
  addonId: null,
47282
47590
  access: "create"
47283
47591
  },
47592
+ "pipelineOrchestrator.setCameraSensors": {
47593
+ capName: "pipeline-orchestrator",
47594
+ capScope: "system",
47595
+ addonId: null,
47596
+ access: "create"
47597
+ },
47284
47598
  "pipelineOrchestrator.setCameraStepOverride": {
47285
47599
  capName: "pipeline-orchestrator",
47286
47600
  capScope: "system",
@@ -50691,6 +51005,11 @@ Object.freeze({
50691
51005
  form: "single",
50692
51006
  optional: false
50693
51007
  }],
51008
+ "pipelineAnalytics.clearTrackRelation": [{
51009
+ name: "deviceId",
51010
+ form: "single",
51011
+ optional: false
51012
+ }],
50694
51013
  "pipelineAnalytics.clearTracks": [{
50695
51014
  name: "deviceId",
50696
51015
  form: "single",
@@ -50841,6 +51160,11 @@ Object.freeze({
50841
51160
  form: "single",
50842
51161
  optional: false
50843
51162
  }],
51163
+ "pipelineAnalytics.listTrackRelations": [{
51164
+ name: "deviceId",
51165
+ form: "single",
51166
+ optional: false
51167
+ }],
50844
51168
  "pipelineAnalytics.listTracks": [{
50845
51169
  name: "deviceId",
50846
51170
  form: "single",
@@ -50911,6 +51235,16 @@ Object.freeze({
50911
51235
  form: "single",
50912
51236
  optional: false
50913
51237
  }],
51238
+ "pipelineAnalytics.setTrackPurity": [{
51239
+ name: "deviceId",
51240
+ form: "single",
51241
+ optional: false
51242
+ }],
51243
+ "pipelineAnalytics.setTrackRelation": [{
51244
+ name: "deviceId",
51245
+ form: "single",
51246
+ optional: false
51247
+ }],
50914
51248
  "pipelineAnalytics.wipeAllAnalytics": [{
50915
51249
  name: "deviceId",
50916
51250
  form: "single",
@@ -50981,6 +51315,11 @@ Object.freeze({
50981
51315
  form: "single",
50982
51316
  optional: false
50983
51317
  }],
51318
+ "pipelineOrchestrator.requestOccupancyLook": [{
51319
+ name: "deviceId",
51320
+ form: "single",
51321
+ optional: false
51322
+ }],
50984
51323
  "pipelineOrchestrator.resolvePipeline": [{
50985
51324
  name: "deviceId",
50986
51325
  form: "single",
@@ -50991,6 +51330,11 @@ Object.freeze({
50991
51330
  form: "single",
50992
51331
  optional: false
50993
51332
  }],
51333
+ "pipelineOrchestrator.setCameraSensors": [{
51334
+ name: "deviceId",
51335
+ form: "single",
51336
+ optional: false
51337
+ }],
50994
51338
  "pipelineOrchestrator.setCameraStepOverride": [{
50995
51339
  name: "deviceId",
50996
51340
  form: "single",
@@ -52137,6 +52481,18 @@ var STATE_SUMMARY_VARS = [
52137
52481
  systemEventKinds: [...SUMMARISABLE],
52138
52482
  systemEventDeliveries: ["summary"]
52139
52483
  },
52484
+ {
52485
+ name: "summarySection",
52486
+ label: "Summary: this section",
52487
+ description: "The section a per-section summary row is about (D698); on a summary sent as one message, every section it reports, comma-separated.",
52488
+ example: "Batterie scariche",
52489
+ group: "system",
52490
+ families: ["rule"],
52491
+ fields: [...RULE_TEXT],
52492
+ kinds: ["system"],
52493
+ systemEventKinds: [...SUMMARISABLE],
52494
+ systemEventDeliveries: ["summary"]
52495
+ },
52140
52496
  ...STATE_SUMMARY_SECTION_VARS.map((v) => ({
52141
52497
  name: v.name,
52142
52498
  label: v.label,
@@ -52213,6 +52569,37 @@ var STATE_SUMMARY_VARS = [
52213
52569
  [...RULE_TEXT],
52214
52570
  ...STATE_SUMMARY_VARS
52215
52571
  ];
52572
+ new Set([
52573
+ "disarmed",
52574
+ "armed_home",
52575
+ "armed_away",
52576
+ "armed_night",
52577
+ "armed_vacation",
52578
+ "armed_custom_bypass",
52579
+ "arming",
52580
+ "disarming",
52581
+ "pending",
52582
+ "triggered",
52583
+ "open",
52584
+ "opening",
52585
+ "closing",
52586
+ "closed",
52587
+ "stopped",
52588
+ "locked",
52589
+ "unlocked",
52590
+ "locking",
52591
+ "unlocking",
52592
+ "jammed",
52593
+ "on",
52594
+ "off",
52595
+ "home",
52596
+ "not_home",
52597
+ "matched",
52598
+ "diverged",
52599
+ "unknown",
52600
+ "latched",
52601
+ "live"
52602
+ ]);
52216
52603
  /**
52217
52604
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
52218
52605
  *