@camstack/addon-provider-homeassistant 1.2.6 → 1.2.7
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 +378 -78
- package/dist/addon.mjs +378 -78
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7318,35 +7318,22 @@ function buildCapturingReply(envelope) {
|
|
|
7318
7318
|
*/
|
|
7319
7319
|
var RecordingWeekdaySchema = number().int().min(0).max(6);
|
|
7320
7320
|
var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
7321
|
-
var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
|
|
7322
|
-
kind: literal("timeOfDay"),
|
|
7323
|
-
start: string().regex(HHMM),
|
|
7324
|
-
end: string().regex(HHMM),
|
|
7325
|
-
/** Restrict to these weekdays; omit = every day. */
|
|
7326
|
-
days: array(RecordingWeekdaySchema).optional()
|
|
7327
|
-
})]);
|
|
7328
|
-
var RecordingModeSchema = _enum([
|
|
7329
|
-
"continuous",
|
|
7330
|
-
"onMotion",
|
|
7331
|
-
"onAudioThreshold"
|
|
7332
|
-
]);
|
|
7333
7321
|
/**
|
|
7334
|
-
*
|
|
7335
|
-
*
|
|
7336
|
-
* - `off` —
|
|
7337
|
-
* - `events` —
|
|
7338
|
-
*
|
|
7339
|
-
* - `continuous` — record 24/7 within the schedule.
|
|
7322
|
+
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7323
|
+
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7324
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7325
|
+
* - `events` — every band records around triggers only.
|
|
7326
|
+
* - `continuous` — at least one band records continuously.
|
|
7340
7327
|
*
|
|
7341
|
-
*
|
|
7342
|
-
*
|
|
7328
|
+
* NEVER authored: the recorder stamps it from the authoritative `bands` on
|
|
7329
|
+
* every save (`activeModeForConfig`). Writing it has no effect.
|
|
7343
7330
|
*/
|
|
7344
7331
|
var RecordingStorageModeSchema = _enum([
|
|
7345
7332
|
"off",
|
|
7346
7333
|
"events",
|
|
7347
7334
|
"continuous"
|
|
7348
7335
|
]);
|
|
7349
|
-
/** Which detectors trigger an `events`-mode
|
|
7336
|
+
/** Which detectors trigger an `events`-mode band. */
|
|
7350
7337
|
var RecordingTriggersSchema = object({
|
|
7351
7338
|
motion: boolean().optional(),
|
|
7352
7339
|
audioThresholdDbfs: number().optional()
|
|
@@ -7382,18 +7369,6 @@ var RecordingBandSchema = object({
|
|
|
7382
7369
|
preBufferSec: number().min(0).optional(),
|
|
7383
7370
|
postBufferSec: number().min(0).optional()
|
|
7384
7371
|
});
|
|
7385
|
-
var RecordingRuleSchema = object({
|
|
7386
|
-
schedule: RecordingScheduleSchema,
|
|
7387
|
-
mode: RecordingModeSchema,
|
|
7388
|
-
/** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
|
|
7389
|
-
preBufferSec: number().min(0).default(0),
|
|
7390
|
-
/** Keep recording until this many seconds after the last trigger. */
|
|
7391
|
-
postBufferSec: number().min(0).default(0),
|
|
7392
|
-
/** Each new trigger restarts the post-buffer window. */
|
|
7393
|
-
resetTimeoutOnNewEvent: boolean().default(true),
|
|
7394
|
-
/** onAudioThreshold only — dBFS level that counts as a trigger. */
|
|
7395
|
-
thresholdDbfs: number().optional()
|
|
7396
|
-
});
|
|
7397
7372
|
/**
|
|
7398
7373
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
7399
7374
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -7427,40 +7402,28 @@ var ScrubThumbnailPresetSchema = _enum([
|
|
|
7427
7402
|
/**
|
|
7428
7403
|
* The full per-camera recording intent — the wire shape of a RecordingTarget.
|
|
7429
7404
|
*
|
|
7430
|
-
* `
|
|
7431
|
-
*
|
|
7432
|
-
*
|
|
7433
|
-
*
|
|
7405
|
+
* `bands` is the ONLY authored recording intent: what to record, when, and on
|
|
7406
|
+
* which trigger. `mode` is a derived summary the recorder stamps on save; every
|
|
7407
|
+
* other field is a storage knob (profiles, segment length, retention, scrub).
|
|
7408
|
+
*
|
|
7409
|
+
* STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
|
|
7410
|
+
* `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
|
|
7411
|
+
* A stale caller must fail loudly — silently stripping its legacy intent would
|
|
7412
|
+
* persist a band-less config, i.e. silently stop recording the camera.
|
|
7434
7413
|
*/
|
|
7435
7414
|
var RecordingConfigSchema = object({
|
|
7436
7415
|
enabled: boolean(),
|
|
7437
|
-
/**
|
|
7438
|
-
*
|
|
7416
|
+
/** DERIVED summary of `bands`, stamped by the recorder on every save.
|
|
7417
|
+
* Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
|
|
7439
7418
|
mode: RecordingStorageModeSchema.optional(),
|
|
7440
7419
|
profiles: array(CamProfileSchema).optional(),
|
|
7441
7420
|
segmentSeconds: number().int().positive().optional(),
|
|
7442
|
-
/** Shared recording time-bands for `events` & `continuous` — record only when
|
|
7443
|
-
* the wall-clock falls inside one of these windows. Omit or empty = always.
|
|
7444
|
-
* `continuous` compiles to one rule per band; `events` to band × trigger. */
|
|
7445
|
-
schedules: array(RecordingScheduleSchema).optional(),
|
|
7446
|
-
/** Legacy single-band predecessor of `schedules`. Read-compat only — it is
|
|
7447
|
-
* normalized into `schedules` on read and never written going forward. (Not
|
|
7448
|
-
* tagged `@deprecated`: the normalization paths must read it cast-free.) */
|
|
7449
|
-
schedule: RecordingScheduleSchema.optional(),
|
|
7450
|
-
/** `events`-mode only — which detectors trigger a recording. */
|
|
7451
|
-
triggers: RecordingTriggersSchema.optional(),
|
|
7452
|
-
/** `events`-mode only — seconds retained before / after a trigger. */
|
|
7453
|
-
preBufferSec: number().min(0).optional(),
|
|
7454
|
-
postBufferSec: number().min(0).optional(),
|
|
7455
|
-
/** DEPRECATED authoring input; retained for migration/transition. */
|
|
7456
|
-
rules: array(RecordingRuleSchema).optional(),
|
|
7457
7421
|
/**
|
|
7458
|
-
* AUTHORITATIVE mode-per-band recording model
|
|
7459
|
-
*
|
|
7460
|
-
*
|
|
7461
|
-
* derived into bands once via `migrateConfigToBands`.
|
|
7422
|
+
* AUTHORITATIVE mode-per-band recording model — the single source of truth
|
|
7423
|
+
* the recorder's band engine consumes. An empty array = record nothing;
|
|
7424
|
+
* "off" is the absence of a covering band, never a band value.
|
|
7462
7425
|
*/
|
|
7463
|
-
bands: array(RecordingBandSchema).
|
|
7426
|
+
bands: array(RecordingBandSchema).default([]),
|
|
7464
7427
|
retention: RecordingRetentionSchema.optional(),
|
|
7465
7428
|
/**
|
|
7466
7429
|
* Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
|
|
@@ -7468,8 +7431,15 @@ var RecordingConfigSchema = object({
|
|
|
7468
7431
|
* windows only — existing sheets are immutable, and each window's index
|
|
7469
7432
|
* carries its own tile dims so mixed-preset history renders correctly.
|
|
7470
7433
|
*/
|
|
7471
|
-
scrubThumbnails: ScrubThumbnailPresetSchema.optional()
|
|
7472
|
-
|
|
7434
|
+
scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
|
|
7435
|
+
/**
|
|
7436
|
+
* OPT-IN thumbnail-strip generation for this camera: every keyframe of the
|
|
7437
|
+
* low recording saved as a JPEG (the fast-drag scrub depth), a derived
|
|
7438
|
+
* cache that eviction reclaims with the footage. Absent/false = no strips
|
|
7439
|
+
* are written and scrub reads exact keyframes at every velocity.
|
|
7440
|
+
*/
|
|
7441
|
+
stripsEnabled: boolean().optional()
|
|
7442
|
+
}).strict();
|
|
7473
7443
|
/**
|
|
7474
7444
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7475
7445
|
* recordings and events management surfaces.
|
|
@@ -7488,7 +7458,8 @@ var OpsLogOpSchema = _enum([
|
|
|
7488
7458
|
"prune",
|
|
7489
7459
|
"manual-delete",
|
|
7490
7460
|
"rescan",
|
|
7491
|
-
"retention-run"
|
|
7461
|
+
"retention-run",
|
|
7462
|
+
"relocate"
|
|
7492
7463
|
]);
|
|
7493
7464
|
/** Why the operation ran. */
|
|
7494
7465
|
var OpsLogReasonSchema = _enum([
|
|
@@ -7527,6 +7498,55 @@ var OpsLogQueryInputSchema = object({
|
|
|
7527
7498
|
limit: number().int().min(1).max(1e3).optional()
|
|
7528
7499
|
});
|
|
7529
7500
|
/**
|
|
7501
|
+
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
7502
|
+
*
|
|
7503
|
+
* One shape shared by the recorder's `relocateFootage` (segments + strips) and
|
|
7504
|
+
* pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
|
|
7505
|
+
* page renders both movers with one component. Jobs are in-RAM (a restart
|
|
7506
|
+
* forgets them — re-running is safe by construction: copy-if-absent, delete
|
|
7507
|
+
* after verify) and each completed/failed run also lands one durable ops-log
|
|
7508
|
+
* row on the owning addon's surface.
|
|
7509
|
+
*/
|
|
7510
|
+
var RelocateJobStateSchema = _enum([
|
|
7511
|
+
"running",
|
|
7512
|
+
"done",
|
|
7513
|
+
"failed",
|
|
7514
|
+
"cancelled"
|
|
7515
|
+
]);
|
|
7516
|
+
var RelocateJobSchema = object({
|
|
7517
|
+
jobId: string(),
|
|
7518
|
+
state: RelocateJobStateSchema,
|
|
7519
|
+
/** Source location — for media relocation this is informational ('*': rows
|
|
7520
|
+
* move from wherever they are to the target). */
|
|
7521
|
+
fromLocationId: string(),
|
|
7522
|
+
toLocationId: string(),
|
|
7523
|
+
/** Scoped device, or null = every device. */
|
|
7524
|
+
deviceId: number().nullable(),
|
|
7525
|
+
/** What the job moves (owner-addon specific: segments/strips or media). */
|
|
7526
|
+
entities: array(string()),
|
|
7527
|
+
filesMoved: number().int(),
|
|
7528
|
+
bytesMoved: number().int(),
|
|
7529
|
+
/** Total files discovered up front; null while (or when) unknown. */
|
|
7530
|
+
filesTotal: number().int().nullable(),
|
|
7531
|
+
startedAt: number(),
|
|
7532
|
+
finishedAt: number().nullable(),
|
|
7533
|
+
error: string().nullable()
|
|
7534
|
+
});
|
|
7535
|
+
var RelocateFootageInputSchema = object({
|
|
7536
|
+
deviceId: number().optional(),
|
|
7537
|
+
fromLocationId: string(),
|
|
7538
|
+
toLocationId: string(),
|
|
7539
|
+
entities: array(_enum(["segments", "strips"])).optional(),
|
|
7540
|
+
/** Copy throttle in MB/s (default 40) — the drain is a background chore,
|
|
7541
|
+
* never allowed to starve live writers. */
|
|
7542
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7543
|
+
});
|
|
7544
|
+
var RelocateMediaInputSchema = object({
|
|
7545
|
+
deviceId: number().optional(),
|
|
7546
|
+
toLocationId: string(),
|
|
7547
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
7548
|
+
});
|
|
7549
|
+
/**
|
|
7530
7550
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
7531
7551
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
7532
7552
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -7576,6 +7596,13 @@ var StorageLocationSchema = object({
|
|
|
7576
7596
|
nodeId: string().optional(),
|
|
7577
7597
|
isDefault: boolean().default(false),
|
|
7578
7598
|
isSystem: boolean().default(false),
|
|
7599
|
+
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
7600
|
+
* for node-local locations it can reach) — never persisted, absent when the
|
|
7601
|
+
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
7602
|
+
capacity: object({
|
|
7603
|
+
totalBytes: number(),
|
|
7604
|
+
availableBytes: number()
|
|
7605
|
+
}).nullable().optional(),
|
|
7579
7606
|
createdAt: number(),
|
|
7580
7607
|
updatedAt: number()
|
|
7581
7608
|
});
|
|
@@ -8343,7 +8370,8 @@ var NcTaxonomyEntrySchema = object({
|
|
|
8343
8370
|
/** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
|
|
8344
8371
|
parentKind: string().nullable()
|
|
8345
8372
|
});
|
|
8346
|
-
|
|
8373
|
+
/** The complete NC picker taxonomy — three grouped buckets. */
|
|
8374
|
+
var NcTaxonomySchema = object({
|
|
8347
8375
|
videoClasses: array(NcTaxonomyEntrySchema),
|
|
8348
8376
|
audioKinds: array(NcTaxonomyEntrySchema),
|
|
8349
8377
|
labels: array(NcTaxonomyEntrySchema)
|
|
@@ -9309,9 +9337,20 @@ var DEGRADE_ORDER = {
|
|
|
9309
9337
|
"markdown"
|
|
9310
9338
|
]
|
|
9311
9339
|
};
|
|
9312
|
-
/**
|
|
9340
|
+
/**
|
|
9341
|
+
* Pick the best target format the kind supports for a given source format.
|
|
9342
|
+
*
|
|
9343
|
+
* TOLERANT of a source outside the union. `NotificationSchema.format` carries
|
|
9344
|
+
* `.default('text')`, but that default only runs where the schema is PARSED —
|
|
9345
|
+
* the tRPC router. A cap call arriving from another addon (`ctx.api`) skips
|
|
9346
|
+
* that parse, so `format` reaches here `undefined`, and the bare
|
|
9347
|
+
* `DEGRADE_ORDER[source]` threw `is not iterable`. That broke the one promise
|
|
9348
|
+
* the degrade path makes ("never throws — degradation is reported, never
|
|
9349
|
+
* surfaced as an error") and dead-lettered every Notification-Center delivery
|
|
9350
|
+
* for a day (2026-07-30). An unknown source degrades like `text`.
|
|
9351
|
+
*/
|
|
9313
9352
|
function resolveFormat(source, supported) {
|
|
9314
|
-
for (const candidate of DEGRADE_ORDER[source]) if (supported.includes(candidate)) return candidate;
|
|
9353
|
+
for (const candidate of DEGRADE_ORDER[source] ?? DEGRADE_ORDER.text) if (supported.includes(candidate)) return candidate;
|
|
9315
9354
|
return supported[0] ?? "text";
|
|
9316
9355
|
}
|
|
9317
9356
|
/** Transcode a body between formats. */
|
|
@@ -9356,7 +9395,7 @@ function resolveLevel(levels, n) {
|
|
|
9356
9395
|
})[0]);
|
|
9357
9396
|
}
|
|
9358
9397
|
function splitBody(body, maxLen) {
|
|
9359
|
-
if (maxLen <= 0 || body.length <= maxLen) return [body];
|
|
9398
|
+
if (!Number.isFinite(maxLen) || maxLen <= 0 || body.length <= maxLen) return [body];
|
|
9360
9399
|
const parts = [];
|
|
9361
9400
|
for (let i = 0; i < body.length; i += maxLen) parts.push(body.slice(i, i + maxLen));
|
|
9362
9401
|
return parts;
|
|
@@ -9439,6 +9478,7 @@ function prepareNotification(caps, n) {
|
|
|
9439
9478
|
renderedAs
|
|
9440
9479
|
};
|
|
9441
9480
|
}
|
|
9481
|
+
new Set(["devices", "classes"]);
|
|
9442
9482
|
/**
|
|
9443
9483
|
* Shared geometry vocabulary for on-frame shape caps — privacy-mask,
|
|
9444
9484
|
* motion-zones, and the detection zones/lines editor all speak this one
|
|
@@ -9755,12 +9795,60 @@ var NcRuleTargetSchema = object({
|
|
|
9755
9795
|
* - `keyFrame` — the clean scene frame (no subject box).
|
|
9756
9796
|
* - `none` — no attachment.
|
|
9757
9797
|
*/
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9798
|
+
/**
|
|
9799
|
+
* WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
|
|
9800
|
+
* conflate it with the selection strategy and betray the request: asking for
|
|
9801
|
+
* the clean scene frame on an object-event owner used to start at
|
|
9802
|
+
* `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
|
|
9803
|
+
* - `cropped` — the subject, tight. What "who is at the door" wants.
|
|
9804
|
+
* - `full` — the clean scene, no annotation. What "what is going on" wants.
|
|
9805
|
+
* - `boxed` — the scene WITH the detection boxes drawn, for verifying what
|
|
9806
|
+
* the pipeline actually saw.
|
|
9807
|
+
*/
|
|
9808
|
+
var NcMediaFrameSchema = _enum([
|
|
9809
|
+
"cropped",
|
|
9810
|
+
"full",
|
|
9811
|
+
"boxed"
|
|
9812
|
+
]);
|
|
9813
|
+
var NcMediaPolicySchema = object({
|
|
9814
|
+
attach: _enum([
|
|
9815
|
+
"best",
|
|
9816
|
+
"best-matching",
|
|
9817
|
+
"keyFrame",
|
|
9818
|
+
"none"
|
|
9819
|
+
]).default("best"),
|
|
9820
|
+
/** What the still shows. Absent = `cropped` (the historical `best` shape). */
|
|
9821
|
+
frame: NcMediaFrameSchema.optional(),
|
|
9822
|
+
/** Crop the attached still to the rule's condition-zone bbox (padded) —
|
|
9823
|
+
* "show me the ZONE", not the whole scene or the subject crop. */
|
|
9824
|
+
zoneCrop: boolean().optional(),
|
|
9825
|
+
/**
|
|
9826
|
+
* Also attach a short GIF cut from the stream broker's clip ring around the
|
|
9827
|
+
* event — NOT from the recording, so the camera does not have to be
|
|
9828
|
+
* recording, and the window sits AROUND the moment instead of a segment
|
|
9829
|
+
* behind it. Fail-closed: a window the ring does not cover contributes no
|
|
9830
|
+
* gif, never a failed notification.
|
|
9831
|
+
*/
|
|
9832
|
+
gif: boolean().optional(),
|
|
9833
|
+
/**
|
|
9834
|
+
* Also attach a short MP4 CLIP of the same cut. Same source and the same
|
|
9835
|
+
* fail-closed rule as `gif`. Prefer it where the backend takes video
|
|
9836
|
+
* (telegram, discord, zentik, webhook); backends that do not are handled by
|
|
9837
|
+
* the degrade engine, which drops the video and keeps the still.
|
|
9838
|
+
*/
|
|
9839
|
+
clip: boolean().optional(),
|
|
9840
|
+
/** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
|
|
9841
|
+
clipPreRollSec: number().int().min(0).max(30).optional(),
|
|
9842
|
+
clipPostRollSec: number().int().min(0).max(30).optional(),
|
|
9843
|
+
/**
|
|
9844
|
+
* Which stream profile the footage is cut from. Absent = the CHEAPEST
|
|
9845
|
+
* assigned profile: a notification is watched on a phone, so the 4K
|
|
9846
|
+
* rendition would burn CPU to produce a file the client downscales anyway.
|
|
9847
|
+
* A profile that is not assigned falls back to the cheapest, and the render
|
|
9848
|
+
* reports which one actually ran.
|
|
9849
|
+
*/
|
|
9850
|
+
profile: CamProfileSchema.optional()
|
|
9851
|
+
});
|
|
9764
9852
|
/** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
|
|
9765
9853
|
var NcThrottleSchema = object({
|
|
9766
9854
|
cooldownSec: number().int().min(0).max(86400).default(60),
|
|
@@ -9774,7 +9862,19 @@ var NcRuleInputSchema = object({
|
|
|
9774
9862
|
delivery: NcDeliverySchema,
|
|
9775
9863
|
conditions: NcConditionsSchema.default({}),
|
|
9776
9864
|
schedule: NcScheduleSchema.optional(),
|
|
9777
|
-
|
|
9865
|
+
/** May be empty when `targetUsers` addresses at least one user — the
|
|
9866
|
+
* "at least one addressee" invariant is enforced by the provider, because
|
|
9867
|
+
* a cross-field refine here would break `NcRulePatchSchema.partial()`. */
|
|
9868
|
+
targets: array(NcRuleTargetSchema),
|
|
9869
|
+
/**
|
|
9870
|
+
* USERS this rule addresses in addition to `targets` (Phase 4). At fire
|
|
9871
|
+
* time each user fans out to the personal targets they own
|
|
9872
|
+
* (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
|
|
9873
|
+
* firing camera — a user is never notified about a device they cannot open.
|
|
9874
|
+
* Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
|
|
9875
|
+
* targets.
|
|
9876
|
+
*/
|
|
9877
|
+
targetUsers: array(string()).optional(),
|
|
9778
9878
|
media: NcMediaPolicySchema.default({ attach: "best" }),
|
|
9779
9879
|
throttle: NcThrottleSchema.default({
|
|
9780
9880
|
cooldownSec: 60,
|
|
@@ -9987,7 +10087,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
9987
10087
|
}), object({ results: array(NcTestResultSchema) }), {
|
|
9988
10088
|
kind: "mutation",
|
|
9989
10089
|
auth: "admin"
|
|
9990
|
-
}), method(object({}), object({
|
|
10090
|
+
}), method(object({}), object({
|
|
10091
|
+
catalog: array(NcConditionDescriptorSchema),
|
|
10092
|
+
taxonomy: NcTaxonomySchema.optional()
|
|
10093
|
+
})), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
|
|
9991
10094
|
/**
|
|
9992
10095
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
9993
10096
|
*
|
|
@@ -10996,6 +11099,28 @@ method(object({
|
|
|
10996
11099
|
}), object({ success: literal(true) }), {
|
|
10997
11100
|
kind: "mutation",
|
|
10998
11101
|
auth: "admin"
|
|
11102
|
+
}), method(object({
|
|
11103
|
+
deviceId: number(),
|
|
11104
|
+
/** Absent = the LOWEST assigned profile — a notification attachment is
|
|
11105
|
+
* watched on a phone, and the cheap rendition is the right default. */
|
|
11106
|
+
profile: CamProfileSchema.optional(),
|
|
11107
|
+
aroundMs: number(),
|
|
11108
|
+
preRollSec: number().min(0).max(20).default(3),
|
|
11109
|
+
postRollSec: number().min(0).max(20).default(5),
|
|
11110
|
+
format: _enum(["gif", "mp4"]).default("gif"),
|
|
11111
|
+
maxWidth: number().int().min(120).max(1920).default(480),
|
|
11112
|
+
/** GIF only — MP4 keeps the source cadence. */
|
|
11113
|
+
fps: number().int().min(1).max(15).default(5)
|
|
11114
|
+
}), object({
|
|
11115
|
+
base64: string(),
|
|
11116
|
+
mime: string(),
|
|
11117
|
+
bytes: number().int(),
|
|
11118
|
+
/** The profile actually rendered (what the default resolved to). */
|
|
11119
|
+
profile: CamProfileSchema,
|
|
11120
|
+
durationMs: number()
|
|
11121
|
+
}), {
|
|
11122
|
+
kind: "mutation",
|
|
11123
|
+
auth: "admin"
|
|
10999
11124
|
}), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
|
|
11000
11125
|
probed: boolean(),
|
|
11001
11126
|
summary: string()
|
|
@@ -20119,6 +20244,36 @@ var TargetKindSchema = object({
|
|
|
20119
20244
|
icon: string(),
|
|
20120
20245
|
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
20121
20246
|
addonId: string(),
|
|
20247
|
+
/**
|
|
20248
|
+
* URL of the kind's bundled BRAND icon, served by the providing addon over
|
|
20249
|
+
* its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
|
|
20250
|
+
* when the addon bundles no icon for that kind — the client then falls back
|
|
20251
|
+
* to a neutral glyph rather than rendering the raw `icon` NAME as text.
|
|
20252
|
+
*
|
|
20253
|
+
* Root-relative on purpose: it resolves against whatever origin serves a web
|
|
20254
|
+
* client, and a native client joins it onto its own hub base.
|
|
20255
|
+
*
|
|
20256
|
+
* DECLARED here deliberately. It used to travel as an undeclared passthrough
|
|
20257
|
+
* field that survived only because the runtime cap-router forwards provider
|
|
20258
|
+
* output verbatim — so every consumer had to re-declare it by hand to stop
|
|
20259
|
+
* its own Zod parse from stripping it, and the whole arrangement would have
|
|
20260
|
+
* broken silently the moment output validation was tightened anywhere.
|
|
20261
|
+
*/
|
|
20262
|
+
iconUrl: string().optional(),
|
|
20263
|
+
/**
|
|
20264
|
+
* Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
|
|
20265
|
+
*
|
|
20266
|
+
* The server knows this and therefore says it, because the client cannot
|
|
20267
|
+
* safely guess: a React-Native client renders SVG and raster through two
|
|
20268
|
+
* DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
|
|
20269
|
+
* not decode SVG on iOS/Android), so without this it silently fell back to a
|
|
20270
|
+
* placeholder glyph for every vector icon while the web build looked fine.
|
|
20271
|
+
*
|
|
20272
|
+
* Absent when {@link iconUrl} is absent, or for a legacy provider that has
|
|
20273
|
+
* not been updated — a client that cannot determine the type should prefer
|
|
20274
|
+
* its raster path, which is the safe default for an unknown image.
|
|
20275
|
+
*/
|
|
20276
|
+
iconMediaType: string().optional(),
|
|
20122
20277
|
configSchema: ConfigSchemaPassthrough,
|
|
20123
20278
|
supportsDiscovery: boolean(),
|
|
20124
20279
|
caps: TargetKindCapsSchema
|
|
@@ -20864,6 +21019,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20864
21019
|
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
20865
21020
|
kind: "mutation",
|
|
20866
21021
|
auth: "admin"
|
|
21022
|
+
}), method(RelocateMediaInputSchema, object({ jobId: string() }), {
|
|
21023
|
+
kind: "mutation",
|
|
21024
|
+
auth: "admin"
|
|
21025
|
+
}), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
21026
|
+
kind: "query",
|
|
21027
|
+
auth: "admin"
|
|
21028
|
+
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
21029
|
+
kind: "mutation",
|
|
21030
|
+
auth: "admin"
|
|
20867
21031
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
20868
21032
|
kind: "query",
|
|
20869
21033
|
auth: "admin"
|
|
@@ -23432,6 +23596,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
|
|
|
23432
23596
|
*/
|
|
23433
23597
|
priority: number()
|
|
23434
23598
|
})).readonly() });
|
|
23599
|
+
/**
|
|
23600
|
+
* The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
|
|
23601
|
+
* AUTO (resolved from the candidate ranking at send time); `resolved` reports
|
|
23602
|
+
* what AUTO currently picks, so the UI can show the effective value either way.
|
|
23603
|
+
*/
|
|
23604
|
+
var NotificationEndpointSchema = object({
|
|
23605
|
+
/** The operator's explicit choice, or null for AUTO. */
|
|
23606
|
+
baseUrl: string().nullable(),
|
|
23607
|
+
/** What the ranking currently resolves to (null when nothing is reachable). */
|
|
23608
|
+
resolved: string().nullable()
|
|
23609
|
+
});
|
|
23435
23610
|
var AllowedAddressesSchema = object({
|
|
23436
23611
|
/**
|
|
23437
23612
|
* Allowlist of interface addresses operators have explicitly opted
|
|
@@ -23454,7 +23629,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
|
|
|
23454
23629
|
* to avoid mixed-content blocks in the browser. The public
|
|
23455
23630
|
* tunnel always emits `https://` regardless. */
|
|
23456
23631
|
scheme: _enum(["http", "https"]).optional()
|
|
23457
|
-
}), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
|
|
23632
|
+
}), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
|
|
23458
23633
|
/**
|
|
23459
23634
|
* mesh-network — collection cap for mesh-VPN providers.
|
|
23460
23635
|
*
|
|
@@ -24253,7 +24428,12 @@ var RecordingDeviceUsageSchema = object({
|
|
|
24253
24428
|
var RecordingLocationUsageSchema = object({
|
|
24254
24429
|
/** StorageLocation id; null for the legacy/degraded single-root fallback. */
|
|
24255
24430
|
locationId: string().nullable(),
|
|
24256
|
-
/**
|
|
24431
|
+
/** Every location id sharing this row's PHYSICAL volume (aliases). One row
|
|
24432
|
+
* is emitted per physical disk (2026-07-29): two locations on one root
|
|
24433
|
+
* previously rendered as two identical "disks" with a nonsensical used
|
|
24434
|
+
* split — hydrate attribution across aliases is arbitrary by nature. */
|
|
24435
|
+
locationIds: array(string()).optional(),
|
|
24436
|
+
/** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
|
|
24257
24437
|
usedBytes: number(),
|
|
24258
24438
|
/** Free bytes on the location's volume; null when capacity is unknown (remote). */
|
|
24259
24439
|
availableBytes: number().nullable(),
|
|
@@ -24365,6 +24545,44 @@ method(object({
|
|
|
24365
24545
|
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
24366
24546
|
kind: "query",
|
|
24367
24547
|
auth: "admin"
|
|
24548
|
+
}), method(object({
|
|
24549
|
+
deviceId: number(),
|
|
24550
|
+
aroundMs: number(),
|
|
24551
|
+
preRollSec: number().min(0).max(30).default(2),
|
|
24552
|
+
postRollSec: number().min(0).max(30).default(5),
|
|
24553
|
+
maxWidth: number().int().min(120).max(1280).default(480),
|
|
24554
|
+
fps: number().int().min(1).max(15).default(5)
|
|
24555
|
+
}), object({
|
|
24556
|
+
gifBase64: string(),
|
|
24557
|
+
fromMs: number(),
|
|
24558
|
+
toMs: number()
|
|
24559
|
+
}), {
|
|
24560
|
+
kind: "mutation",
|
|
24561
|
+
auth: "admin"
|
|
24562
|
+
}), method(object({
|
|
24563
|
+
deviceId: number(),
|
|
24564
|
+
aroundMs: number(),
|
|
24565
|
+
preRollSec: number().min(0).max(30).default(3),
|
|
24566
|
+
postRollSec: number().min(0).max(30).default(7),
|
|
24567
|
+
maxWidth: number().int().min(160).max(1920).default(640)
|
|
24568
|
+
}), object({
|
|
24569
|
+
clipBase64: string(),
|
|
24570
|
+
mime: string(),
|
|
24571
|
+
fromMs: number(),
|
|
24572
|
+
toMs: number(),
|
|
24573
|
+
bytes: number().int()
|
|
24574
|
+
}), {
|
|
24575
|
+
kind: "mutation",
|
|
24576
|
+
auth: "admin"
|
|
24577
|
+
}), method(RelocateFootageInputSchema, object({ jobId: string() }), {
|
|
24578
|
+
kind: "mutation",
|
|
24579
|
+
auth: "admin"
|
|
24580
|
+
}), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
24581
|
+
kind: "query",
|
|
24582
|
+
auth: "admin"
|
|
24583
|
+
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
24584
|
+
kind: "mutation",
|
|
24585
|
+
auth: "admin"
|
|
24368
24586
|
});
|
|
24369
24587
|
/**
|
|
24370
24588
|
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
@@ -26850,6 +27068,12 @@ Object.freeze({
|
|
|
26850
27068
|
addonId: null,
|
|
26851
27069
|
access: "view"
|
|
26852
27070
|
},
|
|
27071
|
+
"localNetwork.getNotificationEndpoint": {
|
|
27072
|
+
capName: "local-network",
|
|
27073
|
+
capScope: "system",
|
|
27074
|
+
addonId: null,
|
|
27075
|
+
access: "view"
|
|
27076
|
+
},
|
|
26853
27077
|
"localNetwork.getPreferred": {
|
|
26854
27078
|
capName: "local-network",
|
|
26855
27079
|
capScope: "system",
|
|
@@ -26874,6 +27098,12 @@ Object.freeze({
|
|
|
26874
27098
|
addonId: null,
|
|
26875
27099
|
access: "create"
|
|
26876
27100
|
},
|
|
27101
|
+
"localNetwork.setNotificationEndpoint": {
|
|
27102
|
+
capName: "local-network",
|
|
27103
|
+
capScope: "system",
|
|
27104
|
+
addonId: null,
|
|
27105
|
+
access: "create"
|
|
27106
|
+
},
|
|
26877
27107
|
"lockControl.lock": {
|
|
26878
27108
|
capName: "lock-control",
|
|
26879
27109
|
capScope: "device",
|
|
@@ -27516,6 +27746,12 @@ Object.freeze({
|
|
|
27516
27746
|
addonId: null,
|
|
27517
27747
|
access: "create"
|
|
27518
27748
|
},
|
|
27749
|
+
"pipelineAnalytics.cancelMediaRelocate": {
|
|
27750
|
+
capName: "pipeline-analytics",
|
|
27751
|
+
capScope: "device",
|
|
27752
|
+
addonId: null,
|
|
27753
|
+
access: "create"
|
|
27754
|
+
},
|
|
27519
27755
|
"pipelineAnalytics.clearTracks": {
|
|
27520
27756
|
capName: "pipeline-analytics",
|
|
27521
27757
|
capScope: "device",
|
|
@@ -27570,6 +27806,12 @@ Object.freeze({
|
|
|
27570
27806
|
addonId: null,
|
|
27571
27807
|
access: "view"
|
|
27572
27808
|
},
|
|
27809
|
+
"pipelineAnalytics.getMediaRelocateStatus": {
|
|
27810
|
+
capName: "pipeline-analytics",
|
|
27811
|
+
capScope: "device",
|
|
27812
|
+
addonId: null,
|
|
27813
|
+
access: "view"
|
|
27814
|
+
},
|
|
27573
27815
|
"pipelineAnalytics.getMotionEvents": {
|
|
27574
27816
|
capName: "pipeline-analytics",
|
|
27575
27817
|
capScope: "device",
|
|
@@ -27642,6 +27884,12 @@ Object.freeze({
|
|
|
27642
27884
|
addonId: null,
|
|
27643
27885
|
access: "create"
|
|
27644
27886
|
},
|
|
27887
|
+
"pipelineAnalytics.relocateMedia": {
|
|
27888
|
+
capName: "pipeline-analytics",
|
|
27889
|
+
capScope: "device",
|
|
27890
|
+
addonId: null,
|
|
27891
|
+
access: "create"
|
|
27892
|
+
},
|
|
27645
27893
|
"pipelineAnalytics.searchObjectEvents": {
|
|
27646
27894
|
capName: "pipeline-analytics",
|
|
27647
27895
|
capScope: "device",
|
|
@@ -28404,6 +28652,12 @@ Object.freeze({
|
|
|
28404
28652
|
addonId: null,
|
|
28405
28653
|
access: "create"
|
|
28406
28654
|
},
|
|
28655
|
+
"recording.cancelRelocate": {
|
|
28656
|
+
capName: "recording",
|
|
28657
|
+
capScope: "system",
|
|
28658
|
+
addonId: null,
|
|
28659
|
+
access: "create"
|
|
28660
|
+
},
|
|
28407
28661
|
"recording.deleteFootprint": {
|
|
28408
28662
|
capName: "recording",
|
|
28409
28663
|
capScope: "system",
|
|
@@ -28434,6 +28688,12 @@ Object.freeze({
|
|
|
28434
28688
|
addonId: null,
|
|
28435
28689
|
access: "view"
|
|
28436
28690
|
},
|
|
28691
|
+
"recording.getRelocateStatus": {
|
|
28692
|
+
capName: "recording",
|
|
28693
|
+
capScope: "system",
|
|
28694
|
+
addonId: null,
|
|
28695
|
+
access: "view"
|
|
28696
|
+
},
|
|
28437
28697
|
"recording.getStorageUsage": {
|
|
28438
28698
|
capName: "recording",
|
|
28439
28699
|
capScope: "system",
|
|
@@ -28464,6 +28724,24 @@ Object.freeze({
|
|
|
28464
28724
|
addonId: null,
|
|
28465
28725
|
access: "view"
|
|
28466
28726
|
},
|
|
28727
|
+
"recording.relocateFootage": {
|
|
28728
|
+
capName: "recording",
|
|
28729
|
+
capScope: "system",
|
|
28730
|
+
addonId: null,
|
|
28731
|
+
access: "create"
|
|
28732
|
+
},
|
|
28733
|
+
"recording.renderClip": {
|
|
28734
|
+
capName: "recording",
|
|
28735
|
+
capScope: "system",
|
|
28736
|
+
addonId: null,
|
|
28737
|
+
access: "create"
|
|
28738
|
+
},
|
|
28739
|
+
"recording.renderGif": {
|
|
28740
|
+
capName: "recording",
|
|
28741
|
+
capScope: "system",
|
|
28742
|
+
addonId: null,
|
|
28743
|
+
access: "create"
|
|
28744
|
+
},
|
|
28467
28745
|
"recording.rescanStorage": {
|
|
28468
28746
|
capName: "recording",
|
|
28469
28747
|
capScope: "system",
|
|
@@ -29058,6 +29336,12 @@ Object.freeze({
|
|
|
29058
29336
|
addonId: null,
|
|
29059
29337
|
access: "create"
|
|
29060
29338
|
},
|
|
29339
|
+
"streamBroker.renderPreBufferClip": {
|
|
29340
|
+
capName: "stream-broker",
|
|
29341
|
+
capScope: "system",
|
|
29342
|
+
addonId: null,
|
|
29343
|
+
access: "create"
|
|
29344
|
+
},
|
|
29061
29345
|
"streamBroker.restartProfile": {
|
|
29062
29346
|
capName: "stream-broker",
|
|
29063
29347
|
capScope: "system",
|
|
@@ -36053,6 +36337,17 @@ var HOME_ASSISTANT_SVG = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0
|
|
|
36053
36337
|
* the admin UI is served from.
|
|
36054
36338
|
*/
|
|
36055
36339
|
var HA_NOTIFICATION_ICON_URL = `/addon/${HA_ROUTE_ID}/icons/${HA_ICON_KIND}`;
|
|
36340
|
+
/**
|
|
36341
|
+
* Media type of {@link HA_NOTIFICATION_ICON_URL}, stamped onto the kind
|
|
36342
|
+
* descriptor beside the URL.
|
|
36343
|
+
*
|
|
36344
|
+
* Not decoration: a React-Native client renders SVG and raster through
|
|
36345
|
+
* DIFFERENT components (`react-native-svg` vs `expo-image`, and expo-image does
|
|
36346
|
+
* not decode SVG on iOS/Android), and it cannot infer the type from the URL
|
|
36347
|
+
* because the route path carries no file extension. Without this the viewer
|
|
36348
|
+
* treats the icon as raster and falls back to a placeholder glyph.
|
|
36349
|
+
*/
|
|
36350
|
+
var HA_NOTIFICATION_ICON_MEDIA_TYPE = "image/svg+xml";
|
|
36056
36351
|
/** The icon's identity bytes plus every content coding we may serve, computed
|
|
36057
36352
|
* once at module load (the icon is immutable). */
|
|
36058
36353
|
var HA_ICON_IDENTITY = Buffer.from(HOME_ASSISTANT_SVG, "utf8");
|
|
@@ -36489,10 +36784,14 @@ function createHaNotificationOutputProvider(deps) {
|
|
|
36489
36784
|
}
|
|
36490
36785
|
return {
|
|
36491
36786
|
listTargetKinds: async () => {
|
|
36492
|
-
return [deps.iconUrl !== void 0 ? {
|
|
36787
|
+
return [deps.iconUrl === void 0 ? descriptor : deps.iconMediaType !== void 0 ? {
|
|
36788
|
+
...descriptor,
|
|
36789
|
+
iconUrl: deps.iconUrl,
|
|
36790
|
+
iconMediaType: deps.iconMediaType
|
|
36791
|
+
} : {
|
|
36493
36792
|
...descriptor,
|
|
36494
36793
|
iconUrl: deps.iconUrl
|
|
36495
|
-
}
|
|
36794
|
+
}];
|
|
36496
36795
|
},
|
|
36497
36796
|
listTargets: async () => {
|
|
36498
36797
|
return (await store.list()).map((target) => ({
|
|
@@ -37076,6 +37375,7 @@ var HaProviderAddon = class HaProviderAddon extends BaseDeviceProvider {
|
|
|
37076
37375
|
return createHaNotificationOutputProvider({
|
|
37077
37376
|
addonId: this.ctx.id,
|
|
37078
37377
|
iconUrl: HA_NOTIFICATION_ICON_URL,
|
|
37378
|
+
iconMediaType: HA_NOTIFICATION_ICON_MEDIA_TYPE,
|
|
37079
37379
|
store,
|
|
37080
37380
|
publish: async (brokerId, service, serviceData) => {
|
|
37081
37381
|
await this.requireRegistry().publish(brokerId, {
|