@camstack/addon-post-analysis 1.2.306 → 1.2.308

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.
@@ -12479,6 +12479,68 @@ method(object({
12479
12479
  password: string()
12480
12480
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
12481
12481
  /**
12482
+ * How long one snapshot may take end to end: the pinned copy of the whole
12483
+ * database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
12484
+ * disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
12485
+ * generous because a timeout fails the whole backup run.
12486
+ */
12487
+ var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
12488
+ /**
12489
+ * The databases an owner snapshots — declared by the OWNER, so a caller never
12490
+ * guesses which file is live from what sits beside it (a cleanly closed
12491
+ * database has no sidecars and is just as owned). Paths are absolute on the
12492
+ * owner's host.
12493
+ */
12494
+ var DatabaseSnapshotTargetsSchema = object({ databases: array(object({ livePath: string() })) });
12495
+ /** One b-tree table of the snapshot and the rows it holds. */
12496
+ var DatabaseSnapshotTableSchema = object({
12497
+ name: string(),
12498
+ rows: number().int().nonnegative()
12499
+ });
12500
+ /**
12501
+ * What the owner wrote. Every path is ABSOLUTE on the owner's host — the
12502
+ * caller pins the call to its own node, so it can read the file; a caller
12503
+ * that finds the path outside its own data root refuses it rather than
12504
+ * archiving something it cannot place.
12505
+ */
12506
+ var DatabaseSnapshotResultSchema = object({
12507
+ /** The live database the snapshot copies. Never to be copied as a file. */
12508
+ livePath: string(),
12509
+ /** The verified copy: `<livePath>` + {@link DATABASE_SNAPSHOT_SUFFIX}. */
12510
+ snapshotPath: string(),
12511
+ sizeBytes: number().int().nonnegative(),
12512
+ pageCount: number().int().nonnegative(),
12513
+ pageSize: number().int().positive(),
12514
+ /**
12515
+ * Every b-tree table with its row count. Read inside the SAME read
12516
+ * transaction the copy was taken from, and found EQUAL on the copy — so
12517
+ * this is the content of the snapshot, not an estimate of the source.
12518
+ */
12519
+ tables: array(DatabaseSnapshotTableSchema),
12520
+ /** Wall time of the pinned copy (row counts included). */
12521
+ copyMs: number().nonnegative(),
12522
+ /** Wall time of the checks on the copy (`integrity_check`, row counts). */
12523
+ verifyMs: number().nonnegative(),
12524
+ /** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
12525
+ takenAt: number()
12526
+ });
12527
+ /**
12528
+ * A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
12529
+ * the same facts, with both paths relative to the archive root (the node's
12530
+ * data dir), because an archive outlives the host that made it.
12531
+ */
12532
+ var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
12533
+ /** Archive-relative path of the live database the archive does NOT carry. */
12534
+ livePath: string(),
12535
+ /** Archive-relative path of the verified copy it carries in its place. */
12536
+ snapshotPath: string()
12537
+ });
12538
+ method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(object({}), DatabaseSnapshotResultSchema, {
12539
+ kind: "mutation",
12540
+ auth: "admin",
12541
+ timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
12542
+ });
12543
+ /**
12482
12544
  * Orchestrator-side destination metadata. The orchestrator computes
12483
12545
  * `id = <addonId>:<subId>` from its provider lookup so consumers
12484
12546
  * (admin UI, restore flow) see one canonical key.
@@ -12589,7 +12651,12 @@ var ArchiveManifestSchema = object({
12589
12651
  locations: array(string()),
12590
12652
  entries: array(ArchiveEntrySchema),
12591
12653
  totalBytes: number(),
12592
- totalFiles: number()
12654
+ totalFiles: number(),
12655
+ /**
12656
+ * Live SQLite databases this archive carries as their OWNER's verified
12657
+ * snapshot instead of as files (D693). Absent on archives made before.
12658
+ */
12659
+ sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional()
12593
12660
  });
12594
12661
  var LocationStatSchema = object({
12595
12662
  name: string(),
@@ -14119,6 +14186,52 @@ var CompositionBlockStateSchema = object({
14119
14186
  reason: string().optional(),
14120
14187
  fields: array(CompositionFieldStateSchema)
14121
14188
  });
14189
+ var ComposerBlockSchema = object({
14190
+ id: string().min(1),
14191
+ name: string().min(1).max(120),
14192
+ enabled: boolean(),
14193
+ updatedAt: number(),
14194
+ composition: CompositionSchema
14195
+ });
14196
+ /**
14197
+ * A stored composition row that no longer PARSES — a schema a release
14198
+ * tightened, a row written by a newer build. Sent by id so the composer keeps
14199
+ * its device as a placeholder and reports the block `failed` naming the parse
14200
+ * error. Leaving it out would read, twice, exactly like a delete (D49).
14201
+ */
14202
+ var ComposerUnreadableBlockSchema = object({
14203
+ id: string().min(1),
14204
+ /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
14205
+ name: string().nullable(),
14206
+ /** The parse error, in the operator's words. */
14207
+ error: string()
14208
+ });
14209
+ method(object({
14210
+ /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
14211
+ integrationId: string().nullable(),
14212
+ /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
14213
+ storeLoaded: boolean(),
14214
+ blocks: array(ComposerBlockSchema),
14215
+ /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
14216
+ restartBlockIds: array(string()),
14217
+ /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
14218
+ unreadableBlocks: array(ComposerUnreadableBlockSchema)
14219
+ }), object({
14220
+ blocks: array(object({
14221
+ blockId: string(),
14222
+ status: CompositionRunStatusSchema,
14223
+ reason: string().optional()
14224
+ })),
14225
+ /**
14226
+ * False when the composer declared and withdrew NOTHING (store not loaded,
14227
+ * integration unknown, its own rows unread or read empty once). An empty
14228
+ * apply the caller owes is paid off only by one the composer acted on (D49).
14229
+ */
14230
+ acted: boolean()
14231
+ }), {
14232
+ kind: "mutation",
14233
+ auth: "admin"
14234
+ }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
14122
14235
  var NUMBER = {
14123
14236
  kind: "fixed",
14124
14237
  result: ["number"]
@@ -14355,52 +14468,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
14355
14468
  auth: "admin",
14356
14469
  access: "view"
14357
14470
  });
14358
- var ComposerBlockSchema = object({
14359
- id: string().min(1),
14360
- name: string().min(1).max(120),
14361
- enabled: boolean(),
14362
- updatedAt: number(),
14363
- composition: CompositionSchema
14364
- });
14365
- /**
14366
- * A stored composition row that no longer PARSES — a schema a release
14367
- * tightened, a row written by a newer build. Sent by id so the composer keeps
14368
- * its device as a placeholder and reports the block `failed` naming the parse
14369
- * error. Leaving it out would read, twice, exactly like a delete (D49).
14370
- */
14371
- var ComposerUnreadableBlockSchema = object({
14372
- id: string().min(1),
14373
- /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
14374
- name: string().nullable(),
14375
- /** The parse error, in the operator's words. */
14376
- error: string()
14377
- });
14378
- method(object({
14379
- /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
14380
- integrationId: string().nullable(),
14381
- /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
14382
- storeLoaded: boolean(),
14383
- blocks: array(ComposerBlockSchema),
14384
- /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
14385
- restartBlockIds: array(string()),
14386
- /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
14387
- unreadableBlocks: array(ComposerUnreadableBlockSchema)
14388
- }), object({
14389
- blocks: array(object({
14390
- blockId: string(),
14391
- status: CompositionRunStatusSchema,
14392
- reason: string().optional()
14393
- })),
14394
- /**
14395
- * False when the composer declared and withdrew NOTHING (store not loaded,
14396
- * integration unknown, its own rows unread or read empty once). An empty
14397
- * apply the caller owes is paid off only by one the composer acted on (D49).
14398
- */
14399
- acted: boolean()
14400
- }), {
14401
- kind: "mutation",
14402
- auth: "admin"
14403
- }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
14404
14471
  /**
14405
14472
  * `custom-model-registry` — collection cap exposing operator-registered
14406
14473
  * custom detection models. Each provider (today: `addon-model-studio`)
@@ -16349,13 +16416,226 @@ method(object({
16349
16416
  }), FieldProbeResultSchema, {
16350
16417
  kind: "mutation",
16351
16418
  auth: "admin"
16352
- }), method(object({
16353
- deviceId: number(),
16354
- caps: array(string()).readonly().optional()
16355
- }), record(string(), unknown().nullable())), method(object({
16356
- deviceIds: array(number()).readonly(),
16357
- caps: array(string()).readonly().optional()
16358
- }), record(string(), record(string(), unknown().nullable())));
16419
+ }), method(object({
16420
+ deviceId: number(),
16421
+ caps: array(string()).readonly().optional()
16422
+ }), record(string(), unknown().nullable())), method(object({
16423
+ deviceIds: array(number()).readonly(),
16424
+ caps: array(string()).readonly().optional()
16425
+ }), record(string(), record(string(), unknown().nullable())));
16426
+ /**
16427
+ * Doorbell button cap. Two kinds of providers coexist behind this cap
16428
+ * name (same pattern as `snapshot`):
16429
+ *
16430
+ * - **Native** providers: registered per-device by device-driver
16431
+ * addons via `ctx.registerNativeCap` — either on a
16432
+ * `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
16433
+ * or directly on the camera (Reolink registers at camera level).
16434
+ * Emits an `onPressed` event every time the firmware pushes a
16435
+ * ring; status tracks the last press and a pressCount since start
16436
+ * (diagnostic).
16437
+ *
16438
+ * - **Wrapper** provider: the `virtual-doorbell` system builtin
16439
+ * (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
16440
+ * device (contact / switch / event-emitter …) into a doorbell for
16441
+ * a camera. `defaultActive: false` — the operator explicitly binds
16442
+ * it per camera in the device-bindings UI, then picks the source
16443
+ * device + trigger in the per-device settings.
16444
+ *
16445
+ * The DeviceEventPropagator re-emits `onPressed` on the camera parent
16446
+ * — subscribers listening at the camera level receive ring events
16447
+ * with `via[]` populated. No code on the parent needed.
16448
+ */
16449
+ var DoorbellStatusSchema = object({
16450
+ /** Ms epoch of the last press. null = never observed since this provider started. */
16451
+ lastPressedAt: number().nullable(),
16452
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
16453
+ pressCountSinceStart: number()
16454
+ });
16455
+ var DoorbellPressEventSchema = object({
16456
+ deviceId: number(),
16457
+ timestamp: number()
16458
+ });
16459
+ /**
16460
+ * The `doorbell-source` extension slot's editable value (D648): the camera's
16461
+ * virtual-doorbell trigger devices, exactly what the wrapper's
16462
+ * `doorbellSources` persists (as `{ deviceId }` records).
16463
+ */
16464
+ var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
16465
+ /**
16466
+ * The `doorbell-source` slot — which devices ring this camera's VIRTUAL
16467
+ * doorbell, owned by the `virtual-doorbell` wrapper over its
16468
+ * `doorbellSources` store (D648). A source rings when one of its
16469
+ * `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
16470
+ * different authority (`deviceManager.setWrapperActive`, D62) — the slot
16471
+ * reports it, it never writes it.
16472
+ */
16473
+ var DOORBELL_SOURCE_SLOT = {
16474
+ id: "doorbell-source",
16475
+ label: "Doorbell trigger devices",
16476
+ 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.",
16477
+ shape: "association",
16478
+ hostDeviceTypes: [DeviceType.Camera],
16479
+ sourceCaps: SOURCE_CAPS,
16480
+ cardinality: "many",
16481
+ value: DoorbellSourceSlotValueSchema
16482
+ };
16483
+ var doorbellCapability = {
16484
+ name: "doorbell",
16485
+ scope: "device",
16486
+ deviceNative: true,
16487
+ mode: "singleton",
16488
+ kind: "wrapper",
16489
+ defaultActive: false,
16490
+ deviceTypes: [DeviceType.Button, DeviceType.Camera],
16491
+ extensionSlots: [DOORBELL_SOURCE_SLOT],
16492
+ methods: {},
16493
+ events: {
16494
+ /**
16495
+ * Fires once per physical press. Reolink delivers via Baichuan
16496
+ * push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
16497
+ * release/duration — it's a pulse.
16498
+ */
16499
+ onPressed: {
16500
+ data: DoorbellPressEventSchema,
16501
+ fromState: {
16502
+ field: "lastPressedAt",
16503
+ on: "advance"
16504
+ }
16505
+ } },
16506
+ status: {
16507
+ schema: DoorbellStatusSchema,
16508
+ kind: "push"
16509
+ },
16510
+ /**
16511
+ * Runtime-state slice — last press timestamp + lifetime press count.
16512
+ * Mirrored by the kernel and readable via
16513
+ * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
16514
+ * without subscribing.
16515
+ */
16516
+ runtimeState: DoorbellStatusSchema,
16517
+ /**
16518
+ * 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.
16519
+ *
16520
+ * See `RuntimeStateDurability`. Enforced by
16521
+ * `scripts/check-runtime-state-durability.ts`.
16522
+ */
16523
+ durability: "restored"
16524
+ };
16525
+ var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
16526
+ DeviceType.Camera, DeviceType.Camera;
16527
+ /** A slot's editable value, discriminated on `slot`. */
16528
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
16529
+ DeviceType.Camera;
16530
+ var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
16531
+ state: literal("unreachable"),
16532
+ reason: string()
16533
+ })]);
16534
+ /** One provider of slots — the D554 source-listing row. */
16535
+ var ExtensionSourceSchema = object({
16536
+ /** The routing prefix of every `slotRef` this provider serves. */
16537
+ source: string(),
16538
+ label: string(),
16539
+ /** Stamped by the dispatcher from the registry (D557). */
16540
+ addonId: string().optional(),
16541
+ availability: ExtensionSourceAvailabilitySchema
16542
+ });
16543
+ /**
16544
+ * How one picked source stands. `missing` — no such device (deleted, or an id
16545
+ * that never existed); `foreign` — a device the slot's owner cannot read from
16546
+ * (a source owned by another addon); `unavailable` — it exists but is not a
16547
+ * valid source now (a container, which is never a pick). A source in any of
16548
+ * these states is SHOWN, never silently dropped or re-pointed.
16549
+ */
16550
+ var ExtensionSourceHealthSchema = _enum([
16551
+ "ok",
16552
+ "missing",
16553
+ "foreign",
16554
+ "unavailable"
16555
+ ]);
16556
+ var ExtensionSlotSourceSchema = object({
16557
+ deviceId: number().int(),
16558
+ /** The device's name, or null when it could not be resolved (`missing`). */
16559
+ name: string().nullable(),
16560
+ health: ExtensionSourceHealthSchema,
16561
+ detail: string().optional()
16562
+ });
16563
+ /**
16564
+ * A DIFFERENT authority that gates whether the slot's sources do anything —
16565
+ * reported read-only, named, never written through this contract (D62). The
16566
+ * virtual doorbell's sources ring only while the wrapper is bound to the
16567
+ * camera, and that binding belongs to `deviceManager.setWrapperActive`.
16568
+ * `unknown` means the gate could not be read; it is not "inactive" (D315).
16569
+ */
16570
+ var ExtensionSlotActivationSchema = object({
16571
+ state: _enum([
16572
+ "active",
16573
+ "inactive",
16574
+ "unknown"
16575
+ ]),
16576
+ authority: string(),
16577
+ detail: string().optional()
16578
+ });
16579
+ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
16580
+ state: literal("ok"),
16581
+ /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
16582
+ slotRef: string(),
16583
+ slot: ExtensionSlotIdSchema,
16584
+ /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
16585
+ authority: string(),
16586
+ activation: ExtensionSlotActivationSchema.nullable(),
16587
+ value: ExtensionSlotValueSchema,
16588
+ sources: array(ExtensionSlotSourceSchema),
16589
+ /**
16590
+ * Devices the owner links to the host ON ITS OWN, by structure, and that
16591
+ * are therefore not in `value` (D655): a camera's device-tree children, and
16592
+ * the child a picked container stands for (D356 — a container is never a
16593
+ * pick, its children are). Read-only; the editor shows them and may offer
16594
+ * per-device options on them (the linked-devices tracked-event opt-in).
16595
+ * Absent when the owner links nothing beyond the picks, and from an owner
16596
+ * older than D655.
16597
+ */
16598
+ impliedSources: array(ExtensionSlotSourceSchema).optional()
16599
+ }), object({
16600
+ state: literal("unreachable"),
16601
+ addonId: string(),
16602
+ reason: string()
16603
+ })]);
16604
+ var ExtensionCandidatesSchema = object({ candidates: array(object({
16605
+ deviceId: number().int(),
16606
+ name: string(),
16607
+ type: string(),
16608
+ location: string().nullable(),
16609
+ /** The container a child belongs to — "Spotlight 2" alone does not say which. */
16610
+ parentName: string().nullable(),
16611
+ /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
16612
+ suggested: boolean(),
16613
+ /** Why it is suggested ("same location"), null when it is not. */
16614
+ reason: string().nullable()
16615
+ })) });
16616
+ /**
16617
+ * What a write did. `none` — applied in place. `host` / `parent` — the owner
16618
+ * reloaded the host (or, for an accessory child, its parent) because the
16619
+ * write changed what the host REGISTERS. A slot never adds a capability to its
16620
+ * host — that is a composition (D663) — so today's owners answer `none`.
16621
+ */
16622
+ var ExtensionSetResultSchema = object({
16623
+ applied: literal(true),
16624
+ reload: _enum([
16625
+ "none",
16626
+ "host",
16627
+ "parent"
16628
+ ])
16629
+ });
16630
+ var ExtensionSlotRefInputSchema = object({
16631
+ deviceId: number().int(),
16632
+ slotRef: string().min(1)
16633
+ });
16634
+ var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
16635
+ method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
16636
+ kind: "mutation",
16637
+ auth: "admin"
16638
+ });
16359
16639
  /**
16360
16640
  * Per-field ownership (D663). A composition may CLAIM fields of a native
16361
16641
  * cap's runtime-state slice on an existing device: `replace` overlays the
@@ -29670,219 +29950,6 @@ DeviceType.Camera, method(object({
29670
29950
  auth: "protected"
29671
29951
  });
29672
29952
  /**
29673
- * Doorbell button cap. Two kinds of providers coexist behind this cap
29674
- * name (same pattern as `snapshot`):
29675
- *
29676
- * - **Native** providers: registered per-device by device-driver
29677
- * addons via `ctx.registerNativeCap` — either on a
29678
- * `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
29679
- * or directly on the camera (Reolink registers at camera level).
29680
- * Emits an `onPressed` event every time the firmware pushes a
29681
- * ring; status tracks the last press and a pressCount since start
29682
- * (diagnostic).
29683
- *
29684
- * - **Wrapper** provider: the `virtual-doorbell` system builtin
29685
- * (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
29686
- * device (contact / switch / event-emitter …) into a doorbell for
29687
- * a camera. `defaultActive: false` — the operator explicitly binds
29688
- * it per camera in the device-bindings UI, then picks the source
29689
- * device + trigger in the per-device settings.
29690
- *
29691
- * The DeviceEventPropagator re-emits `onPressed` on the camera parent
29692
- * — subscribers listening at the camera level receive ring events
29693
- * with `via[]` populated. No code on the parent needed.
29694
- */
29695
- var DoorbellStatusSchema = object({
29696
- /** Ms epoch of the last press. null = never observed since this provider started. */
29697
- lastPressedAt: number().nullable(),
29698
- /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
29699
- pressCountSinceStart: number()
29700
- });
29701
- var DoorbellPressEventSchema = object({
29702
- deviceId: number(),
29703
- timestamp: number()
29704
- });
29705
- /**
29706
- * The `doorbell-source` extension slot's editable value (D648): the camera's
29707
- * virtual-doorbell trigger devices, exactly what the wrapper's
29708
- * `doorbellSources` persists (as `{ deviceId }` records).
29709
- */
29710
- var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
29711
- /**
29712
- * The `doorbell-source` slot — which devices ring this camera's VIRTUAL
29713
- * doorbell, owned by the `virtual-doorbell` wrapper over its
29714
- * `doorbellSources` store (D648). A source rings when one of its
29715
- * `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
29716
- * different authority (`deviceManager.setWrapperActive`, D62) — the slot
29717
- * reports it, it never writes it.
29718
- */
29719
- var DOORBELL_SOURCE_SLOT = {
29720
- id: "doorbell-source",
29721
- label: "Doorbell trigger devices",
29722
- 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.",
29723
- shape: "association",
29724
- hostDeviceTypes: [DeviceType.Camera],
29725
- sourceCaps: SOURCE_CAPS,
29726
- cardinality: "many",
29727
- value: DoorbellSourceSlotValueSchema
29728
- };
29729
- var doorbellCapability = {
29730
- name: "doorbell",
29731
- scope: "device",
29732
- deviceNative: true,
29733
- mode: "singleton",
29734
- kind: "wrapper",
29735
- defaultActive: false,
29736
- deviceTypes: [DeviceType.Button, DeviceType.Camera],
29737
- extensionSlots: [DOORBELL_SOURCE_SLOT],
29738
- methods: {},
29739
- events: {
29740
- /**
29741
- * Fires once per physical press. Reolink delivers via Baichuan
29742
- * push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
29743
- * release/duration — it's a pulse.
29744
- */
29745
- onPressed: {
29746
- data: DoorbellPressEventSchema,
29747
- fromState: {
29748
- field: "lastPressedAt",
29749
- on: "advance"
29750
- }
29751
- } },
29752
- status: {
29753
- schema: DoorbellStatusSchema,
29754
- kind: "push"
29755
- },
29756
- /**
29757
- * Runtime-state slice — last press timestamp + lifetime press count.
29758
- * Mirrored by the kernel and readable via
29759
- * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
29760
- * without subscribing.
29761
- */
29762
- runtimeState: DoorbellStatusSchema,
29763
- /**
29764
- * 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.
29765
- *
29766
- * See `RuntimeStateDurability`. Enforced by
29767
- * `scripts/check-runtime-state-durability.ts`.
29768
- */
29769
- durability: "restored"
29770
- };
29771
- var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
29772
- DeviceType.Camera, DeviceType.Camera;
29773
- /** A slot's editable value, discriminated on `slot`. */
29774
- var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
29775
- DeviceType.Camera;
29776
- var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
29777
- state: literal("unreachable"),
29778
- reason: string()
29779
- })]);
29780
- /** One provider of slots — the D554 source-listing row. */
29781
- var ExtensionSourceSchema = object({
29782
- /** The routing prefix of every `slotRef` this provider serves. */
29783
- source: string(),
29784
- label: string(),
29785
- /** Stamped by the dispatcher from the registry (D557). */
29786
- addonId: string().optional(),
29787
- availability: ExtensionSourceAvailabilitySchema
29788
- });
29789
- /**
29790
- * How one picked source stands. `missing` — no such device (deleted, or an id
29791
- * that never existed); `foreign` — a device the slot's owner cannot read from
29792
- * (a source owned by another addon); `unavailable` — it exists but is not a
29793
- * valid source now (a container, which is never a pick). A source in any of
29794
- * these states is SHOWN, never silently dropped or re-pointed.
29795
- */
29796
- var ExtensionSourceHealthSchema = _enum([
29797
- "ok",
29798
- "missing",
29799
- "foreign",
29800
- "unavailable"
29801
- ]);
29802
- var ExtensionSlotSourceSchema = object({
29803
- deviceId: number().int(),
29804
- /** The device's name, or null when it could not be resolved (`missing`). */
29805
- name: string().nullable(),
29806
- health: ExtensionSourceHealthSchema,
29807
- detail: string().optional()
29808
- });
29809
- /**
29810
- * A DIFFERENT authority that gates whether the slot's sources do anything —
29811
- * reported read-only, named, never written through this contract (D62). The
29812
- * virtual doorbell's sources ring only while the wrapper is bound to the
29813
- * camera, and that binding belongs to `deviceManager.setWrapperActive`.
29814
- * `unknown` means the gate could not be read; it is not "inactive" (D315).
29815
- */
29816
- var ExtensionSlotActivationSchema = object({
29817
- state: _enum([
29818
- "active",
29819
- "inactive",
29820
- "unknown"
29821
- ]),
29822
- authority: string(),
29823
- detail: string().optional()
29824
- });
29825
- var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
29826
- state: literal("ok"),
29827
- /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
29828
- slotRef: string(),
29829
- slot: ExtensionSlotIdSchema,
29830
- /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
29831
- authority: string(),
29832
- activation: ExtensionSlotActivationSchema.nullable(),
29833
- value: ExtensionSlotValueSchema,
29834
- sources: array(ExtensionSlotSourceSchema),
29835
- /**
29836
- * Devices the owner links to the host ON ITS OWN, by structure, and that
29837
- * are therefore not in `value` (D655): a camera's device-tree children, and
29838
- * the child a picked container stands for (D356 — a container is never a
29839
- * pick, its children are). Read-only; the editor shows them and may offer
29840
- * per-device options on them (the linked-devices tracked-event opt-in).
29841
- * Absent when the owner links nothing beyond the picks, and from an owner
29842
- * older than D655.
29843
- */
29844
- impliedSources: array(ExtensionSlotSourceSchema).optional()
29845
- }), object({
29846
- state: literal("unreachable"),
29847
- addonId: string(),
29848
- reason: string()
29849
- })]);
29850
- var ExtensionCandidatesSchema = object({ candidates: array(object({
29851
- deviceId: number().int(),
29852
- name: string(),
29853
- type: string(),
29854
- location: string().nullable(),
29855
- /** The container a child belongs to — "Spotlight 2" alone does not say which. */
29856
- parentName: string().nullable(),
29857
- /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
29858
- suggested: boolean(),
29859
- /** Why it is suggested ("same location"), null when it is not. */
29860
- reason: string().nullable()
29861
- })) });
29862
- /**
29863
- * What a write did. `none` — applied in place. `host` / `parent` — the owner
29864
- * reloaded the host (or, for an accessory child, its parent) because the
29865
- * write changed what the host REGISTERS. A slot never adds a capability to its
29866
- * host — that is a composition (D663) — so today's owners answer `none`.
29867
- */
29868
- var ExtensionSetResultSchema = object({
29869
- applied: literal(true),
29870
- reload: _enum([
29871
- "none",
29872
- "host",
29873
- "parent"
29874
- ])
29875
- });
29876
- var ExtensionSlotRefInputSchema = object({
29877
- deviceId: number().int(),
29878
- slotRef: string().min(1)
29879
- });
29880
- var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
29881
- method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
29882
- kind: "mutation",
29883
- auth: "admin"
29884
- });
29885
- /**
29886
29953
  * Optional client-side hints sent at session creation to help the provider
29887
29954
  * pick the best native source. All fields optional — a viewer that knows
29888
29955
  * nothing still gets a sane default. (Relocated from the retired `webrtc`
@@ -44845,6 +44912,18 @@ Object.freeze({
44845
44912
  addonId: null,
44846
44913
  access: "view"
44847
44914
  },
44915
+ "databaseSnapshot.listDatabases": {
44916
+ capName: "database-snapshot",
44917
+ capScope: "system",
44918
+ addonId: null,
44919
+ access: "view"
44920
+ },
44921
+ "databaseSnapshot.writeSnapshot": {
44922
+ capName: "database-snapshot",
44923
+ capScope: "system",
44924
+ addonId: null,
44925
+ access: "create"
44926
+ },
44848
44927
  "dataStoreProvider.aggregate": {
44849
44928
  capName: "data-store-provider",
44850
44929
  capScope: "system",
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_clip_model_registry = require("../clip-model-registry-C67UM_q_.js");
5
+ const require_clip_model_registry = require("../clip-model-registry-BqrTKyUe.js");
6
6
  let node_fs = require("node:fs");
7
7
  node_fs = require_clip_model_registry.__toESM(node_fs);
8
8
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Nt as PoolMemoryWatchdog, Or as normalizeNodeId, Sn as embeddingRequirementsUnavailableError, Un as parseProcStatus, Zn as resolvePoolMemoryPolicy, a as CLIP_EMBEDDING_STEP_ID, br as BaseAddon, c as resolveClusterModelPin, i as CLIP_TEXT_MODELS, n as DEFAULT_CLIP_MODEL, r as CLIP_IMAGE_MODELS, t as BUILTIN_CLIP_MODELS, vn as embeddingEncoderCapability, xn as embeddingRequirementsFailedError, yn as embeddingModelFailedError } from "../clip-model-registry-C9Aw4qkh.mjs";
1
+ import { Nt as PoolMemoryWatchdog, Or as normalizeNodeId, Sn as embeddingRequirementsUnavailableError, Un as parseProcStatus, Zn as resolvePoolMemoryPolicy, a as CLIP_EMBEDDING_STEP_ID, br as BaseAddon, c as resolveClusterModelPin, i as CLIP_TEXT_MODELS, n as DEFAULT_CLIP_MODEL, r as CLIP_IMAGE_MODELS, t as BUILTIN_CLIP_MODELS, vn as embeddingEncoderCapability, xn as embeddingRequirementsFailedError, yn as embeddingModelFailedError } from "../clip-model-registry-FGOIz3PZ.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import * as fs from "node:fs";
4
4
  import * as path$1 from "node:path";
@@ -2,7 +2,7 @@ import { a as e, i as t, n, o as r, r as i, t as a } from "./_virtual_mf___mfe_i
2
2
  import { t as o } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-B3Wx5J80.mjs";
3
3
  import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-B8qeS8Da.mjs";
4
4
  import { n as m, r as h, t as g } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-Bm-iyjmq.mjs";
5
- import { t as _ } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-MwQBD526.mjs";
5
+ import { t as _ } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C-9GoNIB.mjs";
6
6
  //#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
7
7
  var v = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), y = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), b = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), x = (e) => {
8
8
  let t = b(e);