@camstack/addon-agent-ui 1.2.159 → 1.2.160
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.
- package/dist/addon.js +308 -190
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -11571,6 +11571,68 @@ method(object({
|
|
|
11571
11571
|
password: string()
|
|
11572
11572
|
}), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
|
|
11573
11573
|
/**
|
|
11574
|
+
* How long one snapshot may take end to end: the pinned copy of the whole
|
|
11575
|
+
* database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
|
|
11576
|
+
* disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
|
|
11577
|
+
* generous because a timeout fails the whole backup run.
|
|
11578
|
+
*/
|
|
11579
|
+
var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
|
|
11580
|
+
/**
|
|
11581
|
+
* The databases an owner snapshots — declared by the OWNER, so a caller never
|
|
11582
|
+
* guesses which file is live from what sits beside it (a cleanly closed
|
|
11583
|
+
* database has no sidecars and is just as owned). Paths are absolute on the
|
|
11584
|
+
* owner's host.
|
|
11585
|
+
*/
|
|
11586
|
+
var DatabaseSnapshotTargetsSchema = object({ databases: array(object({ livePath: string() })) });
|
|
11587
|
+
/** One b-tree table of the snapshot and the rows it holds. */
|
|
11588
|
+
var DatabaseSnapshotTableSchema = object({
|
|
11589
|
+
name: string(),
|
|
11590
|
+
rows: number().int().nonnegative()
|
|
11591
|
+
});
|
|
11592
|
+
/**
|
|
11593
|
+
* What the owner wrote. Every path is ABSOLUTE on the owner's host — the
|
|
11594
|
+
* caller pins the call to its own node, so it can read the file; a caller
|
|
11595
|
+
* that finds the path outside its own data root refuses it rather than
|
|
11596
|
+
* archiving something it cannot place.
|
|
11597
|
+
*/
|
|
11598
|
+
var DatabaseSnapshotResultSchema = object({
|
|
11599
|
+
/** The live database the snapshot copies. Never to be copied as a file. */
|
|
11600
|
+
livePath: string(),
|
|
11601
|
+
/** The verified copy: `<livePath>` + {@link DATABASE_SNAPSHOT_SUFFIX}. */
|
|
11602
|
+
snapshotPath: string(),
|
|
11603
|
+
sizeBytes: number().int().nonnegative(),
|
|
11604
|
+
pageCount: number().int().nonnegative(),
|
|
11605
|
+
pageSize: number().int().positive(),
|
|
11606
|
+
/**
|
|
11607
|
+
* Every b-tree table with its row count. Read inside the SAME read
|
|
11608
|
+
* transaction the copy was taken from, and found EQUAL on the copy — so
|
|
11609
|
+
* this is the content of the snapshot, not an estimate of the source.
|
|
11610
|
+
*/
|
|
11611
|
+
tables: array(DatabaseSnapshotTableSchema),
|
|
11612
|
+
/** Wall time of the pinned copy (row counts included). */
|
|
11613
|
+
copyMs: number().nonnegative(),
|
|
11614
|
+
/** Wall time of the checks on the copy (`integrity_check`, row counts). */
|
|
11615
|
+
verifyMs: number().nonnegative(),
|
|
11616
|
+
/** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
|
|
11617
|
+
takenAt: number()
|
|
11618
|
+
});
|
|
11619
|
+
/**
|
|
11620
|
+
* A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
|
|
11621
|
+
* the same facts, with both paths relative to the archive root (the node's
|
|
11622
|
+
* data dir), because an archive outlives the host that made it.
|
|
11623
|
+
*/
|
|
11624
|
+
var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
|
|
11625
|
+
/** Archive-relative path of the live database the archive does NOT carry. */
|
|
11626
|
+
livePath: string(),
|
|
11627
|
+
/** Archive-relative path of the verified copy it carries in its place. */
|
|
11628
|
+
snapshotPath: string()
|
|
11629
|
+
});
|
|
11630
|
+
method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(object({}), DatabaseSnapshotResultSchema, {
|
|
11631
|
+
kind: "mutation",
|
|
11632
|
+
auth: "admin",
|
|
11633
|
+
timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
|
|
11634
|
+
});
|
|
11635
|
+
/**
|
|
11574
11636
|
* Orchestrator-side destination metadata. The orchestrator computes
|
|
11575
11637
|
* `id = <addonId>:<subId>` from its provider lookup so consumers
|
|
11576
11638
|
* (admin UI, restore flow) see one canonical key.
|
|
@@ -11681,7 +11743,12 @@ var ArchiveManifestSchema = object({
|
|
|
11681
11743
|
locations: array(string()),
|
|
11682
11744
|
entries: array(ArchiveEntrySchema),
|
|
11683
11745
|
totalBytes: number(),
|
|
11684
|
-
totalFiles: number()
|
|
11746
|
+
totalFiles: number(),
|
|
11747
|
+
/**
|
|
11748
|
+
* Live SQLite databases this archive carries as their OWNER's verified
|
|
11749
|
+
* snapshot instead of as files (D693). Absent on archives made before.
|
|
11750
|
+
*/
|
|
11751
|
+
sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional()
|
|
11685
11752
|
});
|
|
11686
11753
|
var LocationStatSchema = object({
|
|
11687
11754
|
name: string(),
|
|
@@ -13105,6 +13172,52 @@ var CompositionBlockStateSchema = object({
|
|
|
13105
13172
|
reason: string().optional(),
|
|
13106
13173
|
fields: array(CompositionFieldStateSchema)
|
|
13107
13174
|
});
|
|
13175
|
+
var ComposerBlockSchema = object({
|
|
13176
|
+
id: string().min(1),
|
|
13177
|
+
name: string().min(1).max(120),
|
|
13178
|
+
enabled: boolean(),
|
|
13179
|
+
updatedAt: number(),
|
|
13180
|
+
composition: CompositionSchema
|
|
13181
|
+
});
|
|
13182
|
+
/**
|
|
13183
|
+
* A stored composition row that no longer PARSES — a schema a release
|
|
13184
|
+
* tightened, a row written by a newer build. Sent by id so the composer keeps
|
|
13185
|
+
* its device as a placeholder and reports the block `failed` naming the parse
|
|
13186
|
+
* error. Leaving it out would read, twice, exactly like a delete (D49).
|
|
13187
|
+
*/
|
|
13188
|
+
var ComposerUnreadableBlockSchema = object({
|
|
13189
|
+
id: string().min(1),
|
|
13190
|
+
/** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
|
|
13191
|
+
name: string().nullable(),
|
|
13192
|
+
/** The parse error, in the operator's words. */
|
|
13193
|
+
error: string()
|
|
13194
|
+
});
|
|
13195
|
+
method(object({
|
|
13196
|
+
/** The shared Blocks integration; null until `core-blocks` has reconciled it. */
|
|
13197
|
+
integrationId: string().nullable(),
|
|
13198
|
+
/** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
|
|
13199
|
+
storeLoaded: boolean(),
|
|
13200
|
+
blocks: array(ComposerBlockSchema),
|
|
13201
|
+
/** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
|
|
13202
|
+
restartBlockIds: array(string()),
|
|
13203
|
+
/** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
|
|
13204
|
+
unreadableBlocks: array(ComposerUnreadableBlockSchema)
|
|
13205
|
+
}), object({
|
|
13206
|
+
blocks: array(object({
|
|
13207
|
+
blockId: string(),
|
|
13208
|
+
status: CompositionRunStatusSchema,
|
|
13209
|
+
reason: string().optional()
|
|
13210
|
+
})),
|
|
13211
|
+
/**
|
|
13212
|
+
* False when the composer declared and withdrew NOTHING (store not loaded,
|
|
13213
|
+
* integration unknown, its own rows unread or read empty once). An empty
|
|
13214
|
+
* apply the caller owes is paid off only by one the composer acted on (D49).
|
|
13215
|
+
*/
|
|
13216
|
+
acted: boolean()
|
|
13217
|
+
}), {
|
|
13218
|
+
kind: "mutation",
|
|
13219
|
+
auth: "admin"
|
|
13220
|
+
}), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
|
|
13108
13221
|
var NUMBER = {
|
|
13109
13222
|
kind: "fixed",
|
|
13110
13223
|
result: ["number"]
|
|
@@ -13341,52 +13454,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
13341
13454
|
auth: "admin",
|
|
13342
13455
|
access: "view"
|
|
13343
13456
|
});
|
|
13344
|
-
var ComposerBlockSchema = object({
|
|
13345
|
-
id: string().min(1),
|
|
13346
|
-
name: string().min(1).max(120),
|
|
13347
|
-
enabled: boolean(),
|
|
13348
|
-
updatedAt: number(),
|
|
13349
|
-
composition: CompositionSchema
|
|
13350
|
-
});
|
|
13351
|
-
/**
|
|
13352
|
-
* A stored composition row that no longer PARSES — a schema a release
|
|
13353
|
-
* tightened, a row written by a newer build. Sent by id so the composer keeps
|
|
13354
|
-
* its device as a placeholder and reports the block `failed` naming the parse
|
|
13355
|
-
* error. Leaving it out would read, twice, exactly like a delete (D49).
|
|
13356
|
-
*/
|
|
13357
|
-
var ComposerUnreadableBlockSchema = object({
|
|
13358
|
-
id: string().min(1),
|
|
13359
|
-
/** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
|
|
13360
|
-
name: string().nullable(),
|
|
13361
|
-
/** The parse error, in the operator's words. */
|
|
13362
|
-
error: string()
|
|
13363
|
-
});
|
|
13364
|
-
method(object({
|
|
13365
|
-
/** The shared Blocks integration; null until `core-blocks` has reconciled it. */
|
|
13366
|
-
integrationId: string().nullable(),
|
|
13367
|
-
/** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
|
|
13368
|
-
storeLoaded: boolean(),
|
|
13369
|
-
blocks: array(ComposerBlockSchema),
|
|
13370
|
-
/** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
|
|
13371
|
-
restartBlockIds: array(string()),
|
|
13372
|
-
/** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
|
|
13373
|
-
unreadableBlocks: array(ComposerUnreadableBlockSchema)
|
|
13374
|
-
}), object({
|
|
13375
|
-
blocks: array(object({
|
|
13376
|
-
blockId: string(),
|
|
13377
|
-
status: CompositionRunStatusSchema,
|
|
13378
|
-
reason: string().optional()
|
|
13379
|
-
})),
|
|
13380
|
-
/**
|
|
13381
|
-
* False when the composer declared and withdrew NOTHING (store not loaded,
|
|
13382
|
-
* integration unknown, its own rows unread or read empty once). An empty
|
|
13383
|
-
* apply the caller owes is paid off only by one the composer acted on (D49).
|
|
13384
|
-
*/
|
|
13385
|
-
acted: boolean()
|
|
13386
|
-
}), {
|
|
13387
|
-
kind: "mutation",
|
|
13388
|
-
auth: "admin"
|
|
13389
|
-
}), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
|
|
13390
13457
|
/**
|
|
13391
13458
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
13392
13459
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -15235,6 +15302,138 @@ method(object({
|
|
|
15235
15302
|
deviceIds: array(number()).readonly(),
|
|
15236
15303
|
caps: array(string()).readonly().optional()
|
|
15237
15304
|
}), record(string(), record(string(), unknown().nullable())));
|
|
15305
|
+
object({
|
|
15306
|
+
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
15307
|
+
lastPressedAt: number().nullable(),
|
|
15308
|
+
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
15309
|
+
pressCountSinceStart: number()
|
|
15310
|
+
});
|
|
15311
|
+
object({
|
|
15312
|
+
deviceId: number(),
|
|
15313
|
+
timestamp: number()
|
|
15314
|
+
});
|
|
15315
|
+
/**
|
|
15316
|
+
* The `doorbell-source` extension slot's editable value (D648): the camera's
|
|
15317
|
+
* virtual-doorbell trigger devices, exactly what the wrapper's
|
|
15318
|
+
* `doorbellSources` persists (as `{ deviceId }` records).
|
|
15319
|
+
*/
|
|
15320
|
+
var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
|
|
15321
|
+
DeviceType.Camera;
|
|
15322
|
+
DeviceType.Button, DeviceType.Camera;
|
|
15323
|
+
var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
|
|
15324
|
+
DeviceType.Camera, DeviceType.Camera;
|
|
15325
|
+
/** A slot's editable value, discriminated on `slot`. */
|
|
15326
|
+
var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
|
|
15327
|
+
DeviceType.Camera;
|
|
15328
|
+
var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
|
|
15329
|
+
state: literal("unreachable"),
|
|
15330
|
+
reason: string()
|
|
15331
|
+
})]);
|
|
15332
|
+
/** One provider of slots — the D554 source-listing row. */
|
|
15333
|
+
var ExtensionSourceSchema = object({
|
|
15334
|
+
/** The routing prefix of every `slotRef` this provider serves. */
|
|
15335
|
+
source: string(),
|
|
15336
|
+
label: string(),
|
|
15337
|
+
/** Stamped by the dispatcher from the registry (D557). */
|
|
15338
|
+
addonId: string().optional(),
|
|
15339
|
+
availability: ExtensionSourceAvailabilitySchema
|
|
15340
|
+
});
|
|
15341
|
+
/**
|
|
15342
|
+
* How one picked source stands. `missing` — no such device (deleted, or an id
|
|
15343
|
+
* that never existed); `foreign` — a device the slot's owner cannot read from
|
|
15344
|
+
* (a source owned by another addon); `unavailable` — it exists but is not a
|
|
15345
|
+
* valid source now (a container, which is never a pick). A source in any of
|
|
15346
|
+
* these states is SHOWN, never silently dropped or re-pointed.
|
|
15347
|
+
*/
|
|
15348
|
+
var ExtensionSourceHealthSchema = _enum([
|
|
15349
|
+
"ok",
|
|
15350
|
+
"missing",
|
|
15351
|
+
"foreign",
|
|
15352
|
+
"unavailable"
|
|
15353
|
+
]);
|
|
15354
|
+
var ExtensionSlotSourceSchema = object({
|
|
15355
|
+
deviceId: number().int(),
|
|
15356
|
+
/** The device's name, or null when it could not be resolved (`missing`). */
|
|
15357
|
+
name: string().nullable(),
|
|
15358
|
+
health: ExtensionSourceHealthSchema,
|
|
15359
|
+
detail: string().optional()
|
|
15360
|
+
});
|
|
15361
|
+
/**
|
|
15362
|
+
* A DIFFERENT authority that gates whether the slot's sources do anything —
|
|
15363
|
+
* reported read-only, named, never written through this contract (D62). The
|
|
15364
|
+
* virtual doorbell's sources ring only while the wrapper is bound to the
|
|
15365
|
+
* camera, and that binding belongs to `deviceManager.setWrapperActive`.
|
|
15366
|
+
* `unknown` means the gate could not be read; it is not "inactive" (D315).
|
|
15367
|
+
*/
|
|
15368
|
+
var ExtensionSlotActivationSchema = object({
|
|
15369
|
+
state: _enum([
|
|
15370
|
+
"active",
|
|
15371
|
+
"inactive",
|
|
15372
|
+
"unknown"
|
|
15373
|
+
]),
|
|
15374
|
+
authority: string(),
|
|
15375
|
+
detail: string().optional()
|
|
15376
|
+
});
|
|
15377
|
+
var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
|
|
15378
|
+
state: literal("ok"),
|
|
15379
|
+
/** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
|
|
15380
|
+
slotRef: string(),
|
|
15381
|
+
slot: ExtensionSlotIdSchema,
|
|
15382
|
+
/** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
|
|
15383
|
+
authority: string(),
|
|
15384
|
+
activation: ExtensionSlotActivationSchema.nullable(),
|
|
15385
|
+
value: ExtensionSlotValueSchema,
|
|
15386
|
+
sources: array(ExtensionSlotSourceSchema),
|
|
15387
|
+
/**
|
|
15388
|
+
* Devices the owner links to the host ON ITS OWN, by structure, and that
|
|
15389
|
+
* are therefore not in `value` (D655): a camera's device-tree children, and
|
|
15390
|
+
* the child a picked container stands for (D356 — a container is never a
|
|
15391
|
+
* pick, its children are). Read-only; the editor shows them and may offer
|
|
15392
|
+
* per-device options on them (the linked-devices tracked-event opt-in).
|
|
15393
|
+
* Absent when the owner links nothing beyond the picks, and from an owner
|
|
15394
|
+
* older than D655.
|
|
15395
|
+
*/
|
|
15396
|
+
impliedSources: array(ExtensionSlotSourceSchema).optional()
|
|
15397
|
+
}), object({
|
|
15398
|
+
state: literal("unreachable"),
|
|
15399
|
+
addonId: string(),
|
|
15400
|
+
reason: string()
|
|
15401
|
+
})]);
|
|
15402
|
+
var ExtensionCandidatesSchema = object({ candidates: array(object({
|
|
15403
|
+
deviceId: number().int(),
|
|
15404
|
+
name: string(),
|
|
15405
|
+
type: string(),
|
|
15406
|
+
location: string().nullable(),
|
|
15407
|
+
/** The container a child belongs to — "Spotlight 2" alone does not say which. */
|
|
15408
|
+
parentName: string().nullable(),
|
|
15409
|
+
/** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
|
|
15410
|
+
suggested: boolean(),
|
|
15411
|
+
/** Why it is suggested ("same location"), null when it is not. */
|
|
15412
|
+
reason: string().nullable()
|
|
15413
|
+
})) });
|
|
15414
|
+
/**
|
|
15415
|
+
* What a write did. `none` — applied in place. `host` / `parent` — the owner
|
|
15416
|
+
* reloaded the host (or, for an accessory child, its parent) because the
|
|
15417
|
+
* write changed what the host REGISTERS. A slot never adds a capability to its
|
|
15418
|
+
* host — that is a composition (D663) — so today's owners answer `none`.
|
|
15419
|
+
*/
|
|
15420
|
+
var ExtensionSetResultSchema = object({
|
|
15421
|
+
applied: literal(true),
|
|
15422
|
+
reload: _enum([
|
|
15423
|
+
"none",
|
|
15424
|
+
"host",
|
|
15425
|
+
"parent"
|
|
15426
|
+
])
|
|
15427
|
+
});
|
|
15428
|
+
var ExtensionSlotRefInputSchema = object({
|
|
15429
|
+
deviceId: number().int(),
|
|
15430
|
+
slotRef: string().min(1)
|
|
15431
|
+
});
|
|
15432
|
+
var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
|
|
15433
|
+
method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
|
|
15434
|
+
kind: "mutation",
|
|
15435
|
+
auth: "admin"
|
|
15436
|
+
});
|
|
15238
15437
|
/**
|
|
15239
15438
|
* Per-field ownership (D663). A composition may CLAIM fields of a native
|
|
15240
15439
|
* cap's runtime-state slice on an existing device: `replace` overlays the
|
|
@@ -18207,17 +18406,25 @@ var NcScheduleSchema = object({
|
|
|
18207
18406
|
*/
|
|
18208
18407
|
var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
|
|
18209
18408
|
/**
|
|
18409
|
+
* How a summary window is SENT (D698): `rule` (absent) = ONE notification with
|
|
18410
|
+
* every section; `section` = one notification per section with something to
|
|
18411
|
+
* say (an unavailable section included), each titled by its section.
|
|
18412
|
+
*/
|
|
18413
|
+
var NcStateSummarySplitSchema = _enum(["rule", "section"]);
|
|
18414
|
+
/**
|
|
18210
18415
|
* `summary`: the rule sends NOTHING per event. When a window of `schedule`
|
|
18211
18416
|
* CLOSES, it sends one notification with the current state of its kinds
|
|
18212
18417
|
* (low batteries, consumables to replace, devices offline, updates
|
|
18213
|
-
* available, ...), after its own filters
|
|
18418
|
+
* available, ...), after its own filters — or, with `split: 'section'`
|
|
18419
|
+
* (D698), one notification per section. Nothing to report sends nothing.
|
|
18214
18420
|
* The schedule is the ordinary `NcSchedule` (weekly windows, IANA timezone,
|
|
18215
18421
|
* midnight crossing); the send time is each window's END. Refused on the
|
|
18216
18422
|
* `alarm` family, which stays instant (`systemEventDeliveryProblems`).
|
|
18217
18423
|
*/
|
|
18218
18424
|
var NcSystemEventDeliverySchema = discriminatedUnion("mode", [object({ mode: literal("instant") }), object({
|
|
18219
18425
|
mode: literal("summary"),
|
|
18220
|
-
schedule: NcScheduleSchema
|
|
18426
|
+
schedule: NcScheduleSchema,
|
|
18427
|
+
split: NcStateSummarySplitSchema.optional()
|
|
18221
18428
|
})]);
|
|
18222
18429
|
/** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
|
|
18223
18430
|
var NcPlateMatcherSchema = object({
|
|
@@ -18868,10 +19075,12 @@ var NcMediaPolicySchema = object({
|
|
|
18868
19075
|
/**
|
|
18869
19076
|
* Cooldown GRANULARITY over the subject's class — how much a fired
|
|
18870
19077
|
* notification suppresses.
|
|
18871
|
-
* - `
|
|
18872
|
-
*
|
|
18873
|
-
*
|
|
18874
|
-
*
|
|
19078
|
+
* - `per-class` (default, and the absent value since 2026-10-01 — D36) — an
|
|
19079
|
+
* independent window per detected class: cat→dog fires at once, cat→cat
|
|
19080
|
+
* still waits.
|
|
19081
|
+
* - `shared` — one window for the whole rule/scope: a cat silences the next
|
|
19082
|
+
* dog for `cooldownSec`. Only written when an operator picks it; it is no
|
|
19083
|
+
* longer what an unset rule means.
|
|
18875
19084
|
*
|
|
18876
19085
|
* AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
|
|
18877
19086
|
* must not be swallowed by a bark's window (the precedent this generalizes —
|
|
@@ -18886,8 +19095,11 @@ var NcThrottleSchema = object({
|
|
|
18886
19095
|
/**
|
|
18887
19096
|
* Class granularity of the cooldown key. Optional rather than defaulted:
|
|
18888
19097
|
* a Zod default does NOT run on the addon→addon cap path, so a persisted
|
|
18889
|
-
* rule authored before this field simply carries none
|
|
18890
|
-
*
|
|
19098
|
+
* rule authored before this field simply carries none. The engine used to
|
|
19099
|
+
* read absent as `shared` (D36); since 2026-10-01 it reads absent as
|
|
19100
|
+
* `per-class` — the operator's default — and only an explicit `shared`
|
|
19101
|
+
* still means `shared`. See `cooldownKey` / `keysPerClass` in the rule
|
|
19102
|
+
* engine, and D36's dated note.
|
|
18891
19103
|
*/
|
|
18892
19104
|
granularity: NcThrottleGranularitySchema.optional()
|
|
18893
19105
|
});
|
|
@@ -19211,11 +19423,23 @@ var NcStateSummaryPreviewSectionSchema = object({
|
|
|
19211
19423
|
reason: string().optional()
|
|
19212
19424
|
});
|
|
19213
19425
|
/**
|
|
19426
|
+
* One notification a previewed summary would send (D698): the whole summary on
|
|
19427
|
+
* a `rule` split (no `section`), one section's on a `section` split.
|
|
19428
|
+
*/
|
|
19429
|
+
var NcStateSummaryPreviewRowSchema = object({
|
|
19430
|
+
section: string().optional(),
|
|
19431
|
+
/** The section's name on a per-section row; every reported section's, joined, on a combined one. */
|
|
19432
|
+
title: string(),
|
|
19433
|
+
text: string(),
|
|
19434
|
+
count: number().int().nonnegative()
|
|
19435
|
+
});
|
|
19436
|
+
/**
|
|
19214
19437
|
* The summary a rule would send now. `empty` = nothing to report and every
|
|
19215
19438
|
* section read: such a summary is NOT sent. `dropped` counts the open states
|
|
19216
19439
|
* the rule's own filters (or a camera mute) left out, by reason.
|
|
19217
19440
|
* `excludedGroups` names the kind groups selected that have no state to report
|
|
19218
|
-
* (backups & exports).
|
|
19441
|
+
* (backups & exports). `split` and `rows` (D698) say how it would be sent —
|
|
19442
|
+
* optional, so an older hub's answer still parses.
|
|
19219
19443
|
*/
|
|
19220
19444
|
var NcStateSummaryPreviewSchema = object({
|
|
19221
19445
|
empty: boolean(),
|
|
@@ -19223,7 +19447,9 @@ var NcStateSummaryPreviewSchema = object({
|
|
|
19223
19447
|
text: string(),
|
|
19224
19448
|
sections: array(NcStateSummaryPreviewSectionSchema),
|
|
19225
19449
|
dropped: record(string(), number().int().nonnegative()),
|
|
19226
|
-
excludedGroups: array(string())
|
|
19450
|
+
excludedGroups: array(string()),
|
|
19451
|
+
split: NcStateSummarySplitSchema.optional(),
|
|
19452
|
+
rows: array(NcStateSummaryPreviewRowSchema).optional()
|
|
19227
19453
|
});
|
|
19228
19454
|
var NcTestResultSchema = object({
|
|
19229
19455
|
recordId: string(),
|
|
@@ -26702,138 +26928,6 @@ DeviceType.Camera, method(object({
|
|
|
26702
26928
|
kind: "query",
|
|
26703
26929
|
auth: "protected"
|
|
26704
26930
|
});
|
|
26705
|
-
object({
|
|
26706
|
-
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
26707
|
-
lastPressedAt: number().nullable(),
|
|
26708
|
-
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
26709
|
-
pressCountSinceStart: number()
|
|
26710
|
-
});
|
|
26711
|
-
object({
|
|
26712
|
-
deviceId: number(),
|
|
26713
|
-
timestamp: number()
|
|
26714
|
-
});
|
|
26715
|
-
/**
|
|
26716
|
-
* The `doorbell-source` extension slot's editable value (D648): the camera's
|
|
26717
|
-
* virtual-doorbell trigger devices, exactly what the wrapper's
|
|
26718
|
-
* `doorbellSources` persists (as `{ deviceId }` records).
|
|
26719
|
-
*/
|
|
26720
|
-
var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
|
|
26721
|
-
DeviceType.Camera;
|
|
26722
|
-
DeviceType.Button, DeviceType.Camera;
|
|
26723
|
-
var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
|
|
26724
|
-
DeviceType.Camera, DeviceType.Camera;
|
|
26725
|
-
/** A slot's editable value, discriminated on `slot`. */
|
|
26726
|
-
var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
|
|
26727
|
-
DeviceType.Camera;
|
|
26728
|
-
var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
|
|
26729
|
-
state: literal("unreachable"),
|
|
26730
|
-
reason: string()
|
|
26731
|
-
})]);
|
|
26732
|
-
/** One provider of slots — the D554 source-listing row. */
|
|
26733
|
-
var ExtensionSourceSchema = object({
|
|
26734
|
-
/** The routing prefix of every `slotRef` this provider serves. */
|
|
26735
|
-
source: string(),
|
|
26736
|
-
label: string(),
|
|
26737
|
-
/** Stamped by the dispatcher from the registry (D557). */
|
|
26738
|
-
addonId: string().optional(),
|
|
26739
|
-
availability: ExtensionSourceAvailabilitySchema
|
|
26740
|
-
});
|
|
26741
|
-
/**
|
|
26742
|
-
* How one picked source stands. `missing` — no such device (deleted, or an id
|
|
26743
|
-
* that never existed); `foreign` — a device the slot's owner cannot read from
|
|
26744
|
-
* (a source owned by another addon); `unavailable` — it exists but is not a
|
|
26745
|
-
* valid source now (a container, which is never a pick). A source in any of
|
|
26746
|
-
* these states is SHOWN, never silently dropped or re-pointed.
|
|
26747
|
-
*/
|
|
26748
|
-
var ExtensionSourceHealthSchema = _enum([
|
|
26749
|
-
"ok",
|
|
26750
|
-
"missing",
|
|
26751
|
-
"foreign",
|
|
26752
|
-
"unavailable"
|
|
26753
|
-
]);
|
|
26754
|
-
var ExtensionSlotSourceSchema = object({
|
|
26755
|
-
deviceId: number().int(),
|
|
26756
|
-
/** The device's name, or null when it could not be resolved (`missing`). */
|
|
26757
|
-
name: string().nullable(),
|
|
26758
|
-
health: ExtensionSourceHealthSchema,
|
|
26759
|
-
detail: string().optional()
|
|
26760
|
-
});
|
|
26761
|
-
/**
|
|
26762
|
-
* A DIFFERENT authority that gates whether the slot's sources do anything —
|
|
26763
|
-
* reported read-only, named, never written through this contract (D62). The
|
|
26764
|
-
* virtual doorbell's sources ring only while the wrapper is bound to the
|
|
26765
|
-
* camera, and that binding belongs to `deviceManager.setWrapperActive`.
|
|
26766
|
-
* `unknown` means the gate could not be read; it is not "inactive" (D315).
|
|
26767
|
-
*/
|
|
26768
|
-
var ExtensionSlotActivationSchema = object({
|
|
26769
|
-
state: _enum([
|
|
26770
|
-
"active",
|
|
26771
|
-
"inactive",
|
|
26772
|
-
"unknown"
|
|
26773
|
-
]),
|
|
26774
|
-
authority: string(),
|
|
26775
|
-
detail: string().optional()
|
|
26776
|
-
});
|
|
26777
|
-
var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
|
|
26778
|
-
state: literal("ok"),
|
|
26779
|
-
/** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
|
|
26780
|
-
slotRef: string(),
|
|
26781
|
-
slot: ExtensionSlotIdSchema,
|
|
26782
|
-
/** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
|
|
26783
|
-
authority: string(),
|
|
26784
|
-
activation: ExtensionSlotActivationSchema.nullable(),
|
|
26785
|
-
value: ExtensionSlotValueSchema,
|
|
26786
|
-
sources: array(ExtensionSlotSourceSchema),
|
|
26787
|
-
/**
|
|
26788
|
-
* Devices the owner links to the host ON ITS OWN, by structure, and that
|
|
26789
|
-
* are therefore not in `value` (D655): a camera's device-tree children, and
|
|
26790
|
-
* the child a picked container stands for (D356 — a container is never a
|
|
26791
|
-
* pick, its children are). Read-only; the editor shows them and may offer
|
|
26792
|
-
* per-device options on them (the linked-devices tracked-event opt-in).
|
|
26793
|
-
* Absent when the owner links nothing beyond the picks, and from an owner
|
|
26794
|
-
* older than D655.
|
|
26795
|
-
*/
|
|
26796
|
-
impliedSources: array(ExtensionSlotSourceSchema).optional()
|
|
26797
|
-
}), object({
|
|
26798
|
-
state: literal("unreachable"),
|
|
26799
|
-
addonId: string(),
|
|
26800
|
-
reason: string()
|
|
26801
|
-
})]);
|
|
26802
|
-
var ExtensionCandidatesSchema = object({ candidates: array(object({
|
|
26803
|
-
deviceId: number().int(),
|
|
26804
|
-
name: string(),
|
|
26805
|
-
type: string(),
|
|
26806
|
-
location: string().nullable(),
|
|
26807
|
-
/** The container a child belongs to — "Spotlight 2" alone does not say which. */
|
|
26808
|
-
parentName: string().nullable(),
|
|
26809
|
-
/** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
|
|
26810
|
-
suggested: boolean(),
|
|
26811
|
-
/** Why it is suggested ("same location"), null when it is not. */
|
|
26812
|
-
reason: string().nullable()
|
|
26813
|
-
})) });
|
|
26814
|
-
/**
|
|
26815
|
-
* What a write did. `none` — applied in place. `host` / `parent` — the owner
|
|
26816
|
-
* reloaded the host (or, for an accessory child, its parent) because the
|
|
26817
|
-
* write changed what the host REGISTERS. A slot never adds a capability to its
|
|
26818
|
-
* host — that is a composition (D663) — so today's owners answer `none`.
|
|
26819
|
-
*/
|
|
26820
|
-
var ExtensionSetResultSchema = object({
|
|
26821
|
-
applied: literal(true),
|
|
26822
|
-
reload: _enum([
|
|
26823
|
-
"none",
|
|
26824
|
-
"host",
|
|
26825
|
-
"parent"
|
|
26826
|
-
])
|
|
26827
|
-
});
|
|
26828
|
-
var ExtensionSlotRefInputSchema = object({
|
|
26829
|
-
deviceId: number().int(),
|
|
26830
|
-
slotRef: string().min(1)
|
|
26831
|
-
});
|
|
26832
|
-
var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
|
|
26833
|
-
method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
|
|
26834
|
-
kind: "mutation",
|
|
26835
|
-
auth: "admin"
|
|
26836
|
-
});
|
|
26837
26931
|
/**
|
|
26838
26932
|
* Optional client-side hints sent at session creation to help the provider
|
|
26839
26933
|
* pick the best native source. All fields optional — a viewer that knows
|
|
@@ -37933,6 +38027,18 @@ Object.freeze({
|
|
|
37933
38027
|
addonId: null,
|
|
37934
38028
|
access: "view"
|
|
37935
38029
|
},
|
|
38030
|
+
"databaseSnapshot.listDatabases": {
|
|
38031
|
+
capName: "database-snapshot",
|
|
38032
|
+
capScope: "system",
|
|
38033
|
+
addonId: null,
|
|
38034
|
+
access: "view"
|
|
38035
|
+
},
|
|
38036
|
+
"databaseSnapshot.writeSnapshot": {
|
|
38037
|
+
capName: "database-snapshot",
|
|
38038
|
+
capScope: "system",
|
|
38039
|
+
addonId: null,
|
|
38040
|
+
access: "create"
|
|
38041
|
+
},
|
|
37936
38042
|
"dataStoreProvider.aggregate": {
|
|
37937
38043
|
capName: "data-store-provider",
|
|
37938
38044
|
capScope: "system",
|
|
@@ -46461,6 +46567,18 @@ var STATE_SUMMARY_VARS = [
|
|
|
46461
46567
|
systemEventKinds: [...SUMMARISABLE],
|
|
46462
46568
|
systemEventDeliveries: ["summary"]
|
|
46463
46569
|
},
|
|
46570
|
+
{
|
|
46571
|
+
name: "summarySection",
|
|
46572
|
+
label: "Summary: this section",
|
|
46573
|
+
description: "The section a per-section summary row is about (D698); on a summary sent as one message, every section it reports, comma-separated.",
|
|
46574
|
+
example: "Batterie scariche",
|
|
46575
|
+
group: "system",
|
|
46576
|
+
families: ["rule"],
|
|
46577
|
+
fields: [...RULE_TEXT],
|
|
46578
|
+
kinds: ["system"],
|
|
46579
|
+
systemEventKinds: [...SUMMARISABLE],
|
|
46580
|
+
systemEventDeliveries: ["summary"]
|
|
46581
|
+
},
|
|
46464
46582
|
...STATE_SUMMARY_SECTION_VARS.map((v) => ({
|
|
46465
46583
|
name: v.name,
|
|
46466
46584
|
label: v.label,
|
|
@@ -47002,7 +47120,7 @@ var AgentUIAddon = class extends BaseAddon {
|
|
|
47002
47120
|
capability: adminUiCapability,
|
|
47003
47121
|
provider: {
|
|
47004
47122
|
getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
|
|
47005
|
-
getVersion: async () => ({ version: "1.2.
|
|
47123
|
+
getVersion: async () => ({ version: "1.2.160" })
|
|
47006
47124
|
}
|
|
47007
47125
|
}];
|
|
47008
47126
|
}
|