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