@camstack/types 1.2.173 → 1.2.176
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 +2 -2
- package/dist/addon.mjs +2 -2
- package/dist/capabilities/battery.cap.d.ts +2 -2
- package/dist/capabilities/camera-credentials.cap.d.ts +1 -1
- package/dist/capabilities/capability-definition.d.ts +2 -2
- package/dist/capabilities/device-manager.cap.d.ts +1 -1
- package/dist/capabilities/index.d.ts +2 -2
- package/dist/capabilities/notification-rules.cap.d.ts +11 -11
- package/dist/capabilities/pipeline-analytics.cap.d.ts +35 -0
- package/dist/capabilities/pipeline-runner.cap.d.ts +162 -0
- package/dist/capabilities/recording.cap.d.ts +40 -2
- package/dist/device/base-device-provider.d.ts +1 -1
- package/dist/device/device-runtime-state.d.ts +2 -2
- package/dist/device/device.d.ts +1 -1
- package/dist/device/source-info.d.ts +1 -1
- package/dist/enums/event-category.d.ts +0 -1
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-BVo6ta6_.js → event-category-BNJ9EE5B.js} +0 -1
- package/dist/{event-category-CnLqLOKs.mjs → event-category-DAXzJeTX.mjs} +0 -1
- package/dist/generated/addon-api.d.ts +21 -0
- package/dist/generated/device-proxy.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/index.js +288 -22
- package/dist/index.mjs +285 -23
- package/dist/interfaces/addon.d.ts +1 -1
- package/dist/interfaces/config-ui.d.ts +1 -1
- package/dist/interfaces/context.d.ts +2 -2
- package/dist/interfaces/device-provider.d.ts +1 -1
- package/dist/interfaces/event-bus.d.ts +1 -1
- package/dist/interfaces/pipeline-runner-capability.d.ts +28 -0
- package/dist/interfaces/stream-broker.d.ts +7 -7
- package/dist/notification/timelapse-rule.d.ts +1 -1
- package/dist/{sleep-Bo9cUOXp.js → sleep-CTHjJilA.js} +5 -2
- package/dist/{sleep-DMghvp8F.mjs → sleep-ox21Ig4I.mjs} +5 -2
- package/dist/types/detection.d.ts +3 -5
- package/package.json +1 -1
|
@@ -590,7 +590,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
590
590
|
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
591
591
|
*/
|
|
592
592
|
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
593
|
-
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
594
593
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
595
594
|
/**
|
|
596
595
|
* Stream-broker health watchdog. Per-broker (deviceId/profile) emission.
|
|
@@ -6209,6 +6209,27 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
6209
6209
|
output: z.infer<typeof pipelineRunnerCapability.methods.runStatelessStep.output>;
|
|
6210
6210
|
meta: object;
|
|
6211
6211
|
}>;
|
|
6212
|
+
parkTrackFrame: TRPCMutationProcedure<{
|
|
6213
|
+
input: {
|
|
6214
|
+
[x: string]: unknown;
|
|
6215
|
+
} & z.input<typeof pipelineRunnerCapability.methods.parkTrackFrame.input>;
|
|
6216
|
+
output: z.infer<typeof pipelineRunnerCapability.methods.parkTrackFrame.output>;
|
|
6217
|
+
meta: object;
|
|
6218
|
+
}>;
|
|
6219
|
+
getParkedTrackFrame: TRPCQueryProcedure<{
|
|
6220
|
+
input: {
|
|
6221
|
+
[x: string]: unknown;
|
|
6222
|
+
} & z.input<typeof pipelineRunnerCapability.methods.getParkedTrackFrame.input>;
|
|
6223
|
+
output: z.infer<typeof pipelineRunnerCapability.methods.getParkedTrackFrame.output>;
|
|
6224
|
+
meta: object;
|
|
6225
|
+
}>;
|
|
6226
|
+
releaseParkedTrackFrames: TRPCMutationProcedure<{
|
|
6227
|
+
input: {
|
|
6228
|
+
[x: string]: unknown;
|
|
6229
|
+
} & z.input<typeof pipelineRunnerCapability.methods.releaseParkedTrackFrames.input>;
|
|
6230
|
+
output: z.infer<typeof pipelineRunnerCapability.methods.releaseParkedTrackFrames.output>;
|
|
6231
|
+
meta: object;
|
|
6232
|
+
}>;
|
|
6212
6233
|
}>>;
|
|
6213
6234
|
plateGallery: TRPCBuiltRouter<{
|
|
6214
6235
|
ctx: TrpcContext;
|
|
@@ -289,7 +289,7 @@ export interface DeviceProxy {
|
|
|
289
289
|
readonly osdManager: Pick<InferDeviceProxyCap<typeof osdManagerCapability>, 'getDeviceOsd' | 'getSourceCatalog' | 'setSlotBinding' | 'clearSlotBinding' | 'previewSlot' | 'renderDevice'>;
|
|
290
290
|
readonly pipelineExecutor: Pick<InferDeviceProxyCap<typeof pipelineExecutorCapability>, 'runPipeline' | 'runPipelineBatch'>;
|
|
291
291
|
readonly pipelineOrchestrator: Pick<InferDeviceProxyCap<typeof pipelineOrchestratorCapability>, 'assignPipeline' | 'unassignPipeline' | 'setPipelineDevicePin' | 'getPipelineDevicePin' | 'getPipelineAssignment' | 'getCameraMetrics' | 'assignAudio' | 'unassignAudio' | 'getAudioAssignment' | 'getAudioAssignments' | 'getCameraSettings' | 'setCameraStepToggle' | 'getCameraStepOverrides' | 'setCameraStepOverride' | 'setCameraPipelineForAgent' | 'resolvePipeline' | 'getCameraSwitches' | 'setCameraSwitch' | 'getCameraStatus' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
|
|
292
|
-
readonly pipelineRunner: Pick<InferDeviceProxyCap<typeof pipelineRunnerCapability>, 'detachCamera' | 'getCameraMetrics' | 'runDetailSubtree'>;
|
|
292
|
+
readonly pipelineRunner: Pick<InferDeviceProxyCap<typeof pipelineRunnerCapability>, 'detachCamera' | 'getCameraMetrics' | 'runDetailSubtree' | 'parkTrackFrame' | 'getParkedTrackFrame' | 'releaseParkedTrackFrames'>;
|
|
293
293
|
readonly plateGallery: Pick<InferDeviceProxyCap<typeof plateGalleryCapability>, 'listPlates' | 'getPlateByTrack'>;
|
|
294
294
|
readonly recording: Pick<InferDeviceProxyCap<typeof recordingCapability>, 'getAvailability' | 'getDaysWithRecordings' | 'getPlaybackManifest' | 'getDeviceConfig' | 'locateSegment' | 'readSegmentBytes' | 'readGopBytes' | 'readWindowBytes' | 'setDeviceConfig' | 'rescanStorage' | 'pruneFootage' | 'deleteFootprint' | 'renderGif' | 'renderClip' | 'getStatus' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
|
|
295
295
|
readonly recordingExport: Pick<InferDeviceProxyCap<typeof recordingExportCapability>, 'listExports'>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* scope+access check inside `protectedProcedure` (see
|
|
7
7
|
* `server/backend/src/api/trpc/trpc.middleware.ts`).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
9
|
+
* Coverage: 1027 method paths across 129 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* system-scope cap that takes a deviceId was previously never device-filtered
|
|
7
7
|
* — see the generator header).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
10
|
-
*
|
|
9
|
+
* Coverage: 372 methods carry a device reference, of which
|
|
10
|
+
* 137 are on SYSTEM-scope caps.
|
|
11
11
|
*
|
|
12
12
|
* Top-level fields, number arrays, and one-level arrays of objects carrying
|
|
13
13
|
* a numeric device field (targets[].deviceId) are all mapped; the matcher
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_event_category = require("./event-category-
|
|
3
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_event_category = require("./event-category-BNJ9EE5B.js");
|
|
3
|
+
const require_sleep = require("./sleep-CTHjJilA.js");
|
|
4
4
|
const require_canonical_hash = require("./canonical-hash-DNV8S5ET.js");
|
|
5
5
|
const require_enums = require("./enums.js");
|
|
6
6
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
@@ -10202,7 +10202,7 @@ var detectionPipelineCapability = {
|
|
|
10202
10202
|
var SourceInfoSchema = zod.z.object({
|
|
10203
10203
|
/** Live dispatch key — mutable when the source system allows rename. */
|
|
10204
10204
|
id: zod.z.string(),
|
|
10205
|
-
/** Source system tag — e.g. 'homeassistant' | 'reolink' | '
|
|
10205
|
+
/** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
|
|
10206
10206
|
system: zod.z.string(),
|
|
10207
10207
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
10208
10208
|
* Used to detect rename when `id` changes. */
|
|
@@ -10215,7 +10215,7 @@ var SourceInfoSchema = zod.z.object({
|
|
|
10215
10215
|
/**
|
|
10216
10216
|
* Build the synthetic SourceInfo every existing provider falls back to
|
|
10217
10217
|
* when no upstream value has been persisted. Keeps non-migrated providers
|
|
10218
|
-
* (Reolink / Hikvision / ONVIF /
|
|
10218
|
+
* (Reolink / Hikvision / ONVIF / RTSP) functional without code
|
|
10219
10219
|
* changes — `id` reuses the CamStack stableId, `system` reuses the addon
|
|
10220
10220
|
* id. Real upstream identity replaces this once a provider migrates and
|
|
10221
10221
|
* calls `updateSourceInfo()` with concrete values.
|
|
@@ -10974,7 +10974,7 @@ var deviceProviderCapability = {
|
|
|
10974
10974
|
* - `device-management.router.ts` (deleted in Phase 2)
|
|
10975
10975
|
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
10976
10976
|
*
|
|
10977
|
-
* All device provider addons (rtsp, onvif,
|
|
10977
|
+
* All device provider addons (rtsp, onvif, …) are hub-local: they may
|
|
10978
10978
|
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
10979
10979
|
* - No nodeId routing needed — this is a pure hub singleton.
|
|
10980
10980
|
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
@@ -16517,7 +16517,7 @@ var NcRuleInputSchema = zod.z.object({
|
|
|
16517
16517
|
* The measured seven-person arrival on device 590 spans 110 s with every
|
|
16518
16518
|
* internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
|
|
16519
16519
|
* idle cutoff holds it as one and ends it when the arrival actually ends.
|
|
16520
|
-
* 30 is
|
|
16520
|
+
* 30 s is a widely shipped value for the same decision.
|
|
16521
16521
|
*
|
|
16522
16522
|
* ### What it replaces
|
|
16523
16523
|
*
|
|
@@ -19414,6 +19414,13 @@ var ZoneCrossingSchema = zod.z.object({
|
|
|
19414
19414
|
/** Zone display name at crossing time (falls back to the id). */
|
|
19415
19415
|
zoneName: zod.z.string().optional()
|
|
19416
19416
|
});
|
|
19417
|
+
/** One zone a box was stamped with, and how much of the BOX fell inside it. */
|
|
19418
|
+
var ZoneOverlapSchema = zod.z.object({
|
|
19419
|
+
zoneId: zod.z.string(),
|
|
19420
|
+
zoneName: zod.z.string().optional(),
|
|
19421
|
+
/** Percentage of the BOX area inside the zone, 0–100. */
|
|
19422
|
+
overlapPct: zod.z.number()
|
|
19423
|
+
});
|
|
19417
19424
|
var ObjectEventSchema = zod.z.object({
|
|
19418
19425
|
...BaseEventFields,
|
|
19419
19426
|
kind: zod.z.literal("object"),
|
|
@@ -19438,6 +19445,35 @@ var ObjectEventSchema = zod.z.object({
|
|
|
19438
19445
|
bbox: BoundingBoxSchema.optional(),
|
|
19439
19446
|
/** Heavy JSON — omitted in slim projection. */
|
|
19440
19447
|
zones: zod.z.array(zod.z.string()).readonly().optional(),
|
|
19448
|
+
/**
|
|
19449
|
+
* How far inside each stamped zone the box actually was, as a percentage of
|
|
19450
|
+
* the BOX area.
|
|
19451
|
+
*
|
|
19452
|
+
* Membership alone cannot express "at least a third of it inside", which is
|
|
19453
|
+
* the bar an operator argues with — and the number already existed: the
|
|
19454
|
+
* engine computed it, the pipeline logged it, and then discarded it. It
|
|
19455
|
+
* matters most on the events that carry no track, where a rule has nothing
|
|
19456
|
+
* else to judge by.
|
|
19457
|
+
*/
|
|
19458
|
+
zoneOverlaps: zod.z.array(ZoneOverlapSchema).readonly().optional(),
|
|
19459
|
+
/**
|
|
19460
|
+
* Present when this event describes a detection the TRACKER refused, so it
|
|
19461
|
+
* has no track and never will.
|
|
19462
|
+
*
|
|
19463
|
+
* A zone-scoped immediate rule asks "is there an animal in the flowerbed
|
|
19464
|
+
* NOW?"; tracking answers a different question ("is this the same subject as
|
|
19465
|
+
* before?") whose confirmation threshold presumes continuity. On 2026-09-09 a
|
|
19466
|
+
* dog at 0.7729, 100% inside a watched zone, was refused three times in six
|
|
19467
|
+
* seconds with three different candidate ids — seven analysed frames in the
|
|
19468
|
+
* window, the subject in a handful of them, metres apart — and produced no
|
|
19469
|
+
* event at all.
|
|
19470
|
+
*
|
|
19471
|
+
* It is NAMED rather than merely implied by a missing `trackId`: an event
|
|
19472
|
+
* with no track and no reason is indistinguishable from a track whose media
|
|
19473
|
+
* went missing, and a consumer that asks this one for a best shot or a
|
|
19474
|
+
* history is asking for something that never existed.
|
|
19475
|
+
*/
|
|
19476
|
+
spawnRefused: zod.z.string().optional(),
|
|
19441
19477
|
/** Omitted in slim projection. */
|
|
19442
19478
|
state: TrackStateSchema.optional(),
|
|
19443
19479
|
/**
|
|
@@ -19876,7 +19912,17 @@ var EventDensityBucketSchema = zod.z.object({
|
|
|
19876
19912
|
bucketStart: zod.z.number(),
|
|
19877
19913
|
motion: zod.z.number().int(),
|
|
19878
19914
|
object: zod.z.number().int(),
|
|
19879
|
-
audio: zod.z.number().int()
|
|
19915
|
+
audio: zod.z.number().int(),
|
|
19916
|
+
/**
|
|
19917
|
+
* Energy-weighted mean dBFS of the audio events in this bucket — the LEVEL,
|
|
19918
|
+
* as opposed to `audio`, which is their COUNT (D431).
|
|
19919
|
+
*
|
|
19920
|
+
* ABSENT when the bucket holds no audio event. Absence means "nothing was
|
|
19921
|
+
* measured", which is not the same claim as silence, and a lane that cannot
|
|
19922
|
+
* tell them apart paints a quiet hour at full scale — which is exactly what
|
|
19923
|
+
* the count-on-a-level-meter did.
|
|
19924
|
+
*/
|
|
19925
|
+
audioDbfs: zod.z.number().optional()
|
|
19880
19926
|
});
|
|
19881
19927
|
/**
|
|
19882
19928
|
* Most cameras one `getEventDensityBatch` may name.
|
|
@@ -21139,6 +21185,60 @@ var NativeCropResultSchema = zod.z.object({
|
|
|
21139
21185
|
*/
|
|
21140
21186
|
tier: zod.z.enum(["native", "ram-fullframe"]).optional()
|
|
21141
21187
|
});
|
|
21188
|
+
/**
|
|
21189
|
+
* What a PARKED frame is for — the `kind` half of the `(deviceId, trackId,
|
|
21190
|
+
* kind)` key ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
21191
|
+
*
|
|
21192
|
+
* - `keyFrame` — the track's clean best FULL frame at native width (capped by
|
|
21193
|
+
* the caller's `maxWidth`). What `keyFrame` + `keyFrameSmall` are written
|
|
21194
|
+
* from, and what the detail plane's full-frame rung cuts from.
|
|
21195
|
+
* - `thumbnail` — the best-shot subject slab: the caller's 16:9 central-square
|
|
21196
|
+
* window, cut by the runner at uncapped native resolution.
|
|
21197
|
+
*
|
|
21198
|
+
* The runner never interprets `trackId`; it is an opaque key the hub owns.
|
|
21199
|
+
*/
|
|
21200
|
+
var ParkedFrameKindSchema = zod.z.enum(["keyFrame", "thumbnail"]);
|
|
21201
|
+
/**
|
|
21202
|
+
* Why a park did NOT happen. Every one is logged on the runner with
|
|
21203
|
+
* `tags: { deviceId }` and the handle's measured age, because a handle already
|
|
21204
|
+
* gone at park time IS the defect the 150–500 ms window exists to prevent —
|
|
21205
|
+
* never a reason to retry in a loop.
|
|
21206
|
+
*
|
|
21207
|
+
* - `handle-gone` — the native surface no longer resolves this handle (never
|
|
21208
|
+
* registered, past the lease bound, or the worker released it). `detail`
|
|
21209
|
+
* carries the runner's own miss reason.
|
|
21210
|
+
* - `encode-failed` — pixels resolved and the JPEG encode threw.
|
|
21211
|
+
*/
|
|
21212
|
+
var ParkRefusalSchema = zod.z.enum(["handle-gone", "encode-failed"]);
|
|
21213
|
+
/** Answer to `parkTrackFrame` — a discriminated union, so "not parked" always names why. */
|
|
21214
|
+
var ParkTrackFrameResultSchema = zod.z.discriminatedUnion("parked", [zod.z.object({
|
|
21215
|
+
parked: zod.z.literal(true),
|
|
21216
|
+
/** The node holding the parcel — what a later retrieval must be pinned to. */
|
|
21217
|
+
nodeId: zod.z.string(),
|
|
21218
|
+
width: zod.z.number().int().positive(),
|
|
21219
|
+
height: zod.z.number().int().positive(),
|
|
21220
|
+
/** JPEG bytes the parcel costs on the node. */
|
|
21221
|
+
bytes: zod.z.number().int().nonnegative(),
|
|
21222
|
+
/** Whether this park replaced a parcel already held for the key. */
|
|
21223
|
+
replaced: zod.z.boolean()
|
|
21224
|
+
}), zod.z.object({
|
|
21225
|
+
parked: zod.z.literal(false),
|
|
21226
|
+
nodeId: zod.z.string(),
|
|
21227
|
+
reason: ParkRefusalSchema,
|
|
21228
|
+
/** Age of the handle at the park, on the runner's clock; null if unknown. */
|
|
21229
|
+
handleAgeMs: zod.z.number().nullable(),
|
|
21230
|
+
detail: zod.z.string().optional()
|
|
21231
|
+
})]);
|
|
21232
|
+
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
21233
|
+
var ParkedTrackFrameSchema = zod.z.object({
|
|
21234
|
+
jpeg: zod.z.string(),
|
|
21235
|
+
width: zod.z.number().int().positive(),
|
|
21236
|
+
height: zod.z.number().int().positive(),
|
|
21237
|
+
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
21238
|
+
timestamp: zod.z.number(),
|
|
21239
|
+
/** When the node stored it (the node's clock). */
|
|
21240
|
+
parkedAt: zod.z.number()
|
|
21241
|
+
});
|
|
21142
21242
|
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
21143
21243
|
* originating detection, in FRAME-space coordinates. Reuses
|
|
21144
21244
|
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
@@ -21528,7 +21628,7 @@ var RunnerCameraConfigSchema = zod.z.object({
|
|
|
21528
21628
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
21529
21629
|
* analyzer providers) running on decoded frames in this runner.
|
|
21530
21630
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
21531
|
-
* analytics
|
|
21631
|
+
* analytics). The provider emits ProviderMotion
|
|
21532
21632
|
* events; the orchestrator forwards to `reportMotion`.
|
|
21533
21633
|
*/
|
|
21534
21634
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
@@ -22098,7 +22198,60 @@ var pipelineRunnerCapability = {
|
|
|
22098
22198
|
className: zod.z.string(),
|
|
22099
22199
|
/** Camera the pixels came from. Diagnostics + log tags ONLY — never routing. */
|
|
22100
22200
|
sourceDeviceId: zod.z.number()
|
|
22101
|
-
}), RunStatelessStepResultSchema, { kind: "mutation" })
|
|
22201
|
+
}), RunStatelessStepResultSchema, { kind: "mutation" }),
|
|
22202
|
+
/**
|
|
22203
|
+
* PARK a frame for a track at the instant it is judged to matter
|
|
22204
|
+
* ([D422](../../../docs/decisions/adr-0422-a-relevant-frame-is-parked-when-it-becomes-relevant.md)).
|
|
22205
|
+
*
|
|
22206
|
+
* The hub's `BestDetectionTracker` — the single "best per track" policy —
|
|
22207
|
+
* concludes a frame is a track's best and calls this on the node that
|
|
22208
|
+
* owns `handle` (`nodePin(handle.nodeId)`), while the handle is young. The
|
|
22209
|
+
* runner cuts `bbox` from the native surface it already holds (a full
|
|
22210
|
+
* frame for `keyFrame`, the caller's subject window for `thumbnail`),
|
|
22211
|
+
* encodes ONE JPEG, and keeps it under `(deviceId, trackId, kind)`. Every
|
|
22212
|
+
* later consumer retrieves by that key (`getParkedTrackFrame`) — a lookup
|
|
22213
|
+
* that cannot miss on age. D52 holds: the rectangle is cut by the runner,
|
|
22214
|
+
* never a pre-cut tile the caller decided. D9/D18 hold: one compressed
|
|
22215
|
+
* encode at a decision point, never a stream.
|
|
22216
|
+
*
|
|
22217
|
+
* Idempotent per `(trackId, kind)`: a later park replaces (the ranking is
|
|
22218
|
+
* the hub's; this adds no second opinion), an out-of-order older instant
|
|
22219
|
+
* is ignored. Bounded per device and per node on the runner
|
|
22220
|
+
* (`parked-frame-store.ts`), oldest-first eviction, never a refusal for
|
|
22221
|
+
* space. A refusal names its reason and is logged on the runner with the
|
|
22222
|
+
* handle's measured age — it is never retried into a loop.
|
|
22223
|
+
*/
|
|
22224
|
+
parkTrackFrame: require_sleep.method(zod.z.object({
|
|
22225
|
+
deviceId: zod.z.number(),
|
|
22226
|
+
/** Opaque to the runner — the hub's track id. */
|
|
22227
|
+
trackId: zod.z.string(),
|
|
22228
|
+
kind: ParkedFrameKindSchema,
|
|
22229
|
+
handle: require_sleep.FrameHandleSchema,
|
|
22230
|
+
/** Normalized [0,1] window to cut. `{0,0,1,1}` for a full frame. */
|
|
22231
|
+
bbox: NativeCropBboxSchema,
|
|
22232
|
+
/** Width cap for a full-frame park (the `keyFrame` native cap). */
|
|
22233
|
+
maxWidth: zod.z.number().int().positive().optional(),
|
|
22234
|
+
/** The frame instant (caller's clock) — orders parks for one key. */
|
|
22235
|
+
timestamp: zod.z.number()
|
|
22236
|
+
}), ParkTrackFrameResultSchema, { kind: "mutation" }),
|
|
22237
|
+
/**
|
|
22238
|
+
* Retrieve a parked parcel by `(deviceId, trackId, kind)`. Pinned to the
|
|
22239
|
+
* node that answered the park (`ParkTrackFrameResult.nodeId`). `null` means
|
|
22240
|
+
* nothing was parked under that key on this node — never "too old".
|
|
22241
|
+
*/
|
|
22242
|
+
getParkedTrackFrame: require_sleep.method(zod.z.object({
|
|
22243
|
+
deviceId: zod.z.number(),
|
|
22244
|
+
trackId: zod.z.string(),
|
|
22245
|
+
kind: ParkedFrameKindSchema
|
|
22246
|
+
}), ParkedTrackFrameSchema.nullable()),
|
|
22247
|
+
/**
|
|
22248
|
+
* Drop every parcel of a track — the hub closed it. Idempotent. A track
|
|
22249
|
+
* whose release is lost ages out on the runner under a hard ceiling.
|
|
22250
|
+
*/
|
|
22251
|
+
releaseParkedTrackFrames: require_sleep.method(zod.z.object({
|
|
22252
|
+
deviceId: zod.z.number(),
|
|
22253
|
+
trackId: zod.z.string()
|
|
22254
|
+
}), zod.z.object({ released: zod.z.number().int().nonnegative() }), { kind: "mutation" })
|
|
22102
22255
|
}
|
|
22103
22256
|
};
|
|
22104
22257
|
//#endregion
|
|
@@ -26518,8 +26671,8 @@ onStatusChanged: { data: zod.z.object({
|
|
|
26518
26671
|
/**
|
|
26519
26672
|
* Runtime-state slice — every provider that registers this cap
|
|
26520
26673
|
* stores the same shape under `device.runtimeState[battery]`.
|
|
26521
|
-
* Cross-provider uniformity: a Reolink Argus, a
|
|
26522
|
-
*
|
|
26674
|
+
* Cross-provider uniformity: a Reolink Argus, a sensor proxy,
|
|
26675
|
+
* an ONVIF battery cam all read/write the same keys.
|
|
26523
26676
|
* Consumers (BatteryBadge, snapshot wrapper sleep gate) read once
|
|
26524
26677
|
* via `device.runtimeState.getCapState('battery')` regardless of
|
|
26525
26678
|
* the underlying driver.
|
|
@@ -26677,7 +26830,7 @@ var buttonCapability = {
|
|
|
26677
26830
|
*
|
|
26678
26831
|
* Implementations:
|
|
26679
26832
|
* - Each camera-providing addon registers this cap natively per
|
|
26680
|
-
* device (Reolink, Hikvision, RTSP,
|
|
26833
|
+
* device (Reolink, Hikvision, RTSP, ONVIF self).
|
|
26681
26834
|
* - Returns a snapshot from the persisted device config blob — no
|
|
26682
26835
|
* extra round-trip to the camera, no probing.
|
|
26683
26836
|
* - The cap is admin-only (`auth: 'admin'`) — credentials must not
|
|
@@ -29000,7 +29153,7 @@ var AvailableIntegrationTypeSchema = zod.z.object({
|
|
|
29000
29153
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
29001
29154
|
* branch on CAP — never on addon name. `device-adoption` integrations
|
|
29002
29155
|
* (Home Assistant, …) route through the broker step (Approach A);
|
|
29003
|
-
* `device-provider` integrations (Reolink/
|
|
29156
|
+
* `device-provider` integrations (Reolink/ONVIF) keep the
|
|
29004
29157
|
* legacy config → discovery flow.
|
|
29005
29158
|
*/
|
|
29006
29159
|
kind: zod.z.enum(["device-adoption", "device-provider"]),
|
|
@@ -33166,7 +33319,23 @@ var RecordingRangeSchema = zod.z.object({
|
|
|
33166
33319
|
});
|
|
33167
33320
|
var RecordingAvailabilitySchema = zod.z.object({
|
|
33168
33321
|
deviceId: zod.z.number(),
|
|
33169
|
-
ranges: zod.z.array(RecordingRangeSchema)
|
|
33322
|
+
ranges: zod.z.array(RecordingRangeSchema),
|
|
33323
|
+
/**
|
|
33324
|
+
* Every profile this camera has footage in — not only the one `ranges`
|
|
33325
|
+
* describes (D433).
|
|
33326
|
+
*
|
|
33327
|
+
* `ranges` answers for ONE profile by design: the timeline is a single bar,
|
|
33328
|
+
* and enumerating all of them triples the directory reads for a bar that
|
|
33329
|
+
* would look identical. But the answer used to say nothing about that, so a
|
|
33330
|
+
* caller asking "what can I export?" read the single preferred profile as
|
|
33331
|
+
* the only one that exists — on this deployment every camera records `high`
|
|
33332
|
+
* AND `low`, the low tree holding 14 GB for camera 615 alone, and the export
|
|
33333
|
+
* UI could not see it.
|
|
33334
|
+
*
|
|
33335
|
+
* Cheap: it is the same shallow directory read the profile CHOICE already
|
|
33336
|
+
* makes. Ask for a specific profile's ranges with the `profile` input.
|
|
33337
|
+
*/
|
|
33338
|
+
profilesWithFootage: zod.z.array(zod.z.string())
|
|
33170
33339
|
});
|
|
33171
33340
|
var RecordingDaysSchema = zod.z.object({
|
|
33172
33341
|
deviceId: zod.z.number(),
|
|
@@ -33207,7 +33376,11 @@ var RECORDING_TIMELINE_BATCH_MAX = 200;
|
|
|
33207
33376
|
var RecordingAvailabilityForDeviceSchema = zod.z.object({
|
|
33208
33377
|
deviceId: zod.z.number(),
|
|
33209
33378
|
read: zod.z.enum(["read", "unreadable"]),
|
|
33210
|
-
ranges: zod.z.array(RecordingRangeSchema).readonly()
|
|
33379
|
+
ranges: zod.z.array(RecordingRangeSchema).readonly(),
|
|
33380
|
+
/** Same field, same meaning, as the singular answer (D433). A row that
|
|
33381
|
+
* dropped it would tell a grid caller the archive holds one profile.
|
|
33382
|
+
* Empty on an `'unreadable'` row: nobody looked. */
|
|
33383
|
+
profilesWithFootage: zod.z.array(zod.z.string()).readonly()
|
|
33211
33384
|
});
|
|
33212
33385
|
/**
|
|
33213
33386
|
* One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
|
|
@@ -33237,13 +33410,31 @@ var RecordingManifestSchema = zod.z.object({
|
|
|
33237
33410
|
*/
|
|
33238
33411
|
playbackEndpoints: zod.z.array(zod.z.string())
|
|
33239
33412
|
});
|
|
33240
|
-
/**
|
|
33241
|
-
*
|
|
33413
|
+
/**
|
|
33414
|
+
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
33415
|
+
* across every profile and every resolvable location on this node.
|
|
33416
|
+
*
|
|
33417
|
+
* ## Archive vs residency, which is the whole point of this shape (D418)
|
|
33418
|
+
*
|
|
33419
|
+
* `usedBytes` / `oldestMs` / `segments` are the durable hour ledger's numbers:
|
|
33420
|
+
* the same quantity `RecordingLocationUsage.usedBytes` reports for the volume
|
|
33421
|
+
* this camera writes to, so the two can be added up and compared.
|
|
33422
|
+
*
|
|
33423
|
+
* They were not always. Until D418 this row came from the recorder's in-RAM
|
|
33424
|
+
* `RecordingIndex`, which since D287 holds only the live tail plus the hours
|
|
33425
|
+
* somebody hydrated — so a hub with 1.9 TB and 3.3 days of footage reported
|
|
33426
|
+
* 60.5 GB and "oldest: three hours ago" on the same page as the volume row
|
|
33427
|
+
* that said otherwise, and two people read it as retention eating recent
|
|
33428
|
+
* footage. Residency is still reported, under `residentBytes` /
|
|
33429
|
+
* `residentOldestMs`, which answer a different question and say so.
|
|
33430
|
+
*/
|
|
33242
33431
|
var RecordingDeviceUsageSchema = zod.z.object({
|
|
33243
33432
|
deviceId: zod.z.number(),
|
|
33433
|
+
/** Bytes the ARCHIVE holds for this camera on this node's resolvable
|
|
33434
|
+
* recordings locations. */
|
|
33244
33435
|
usedBytes: zod.z.number(),
|
|
33245
33436
|
/**
|
|
33246
|
-
* Start of this camera's OLDEST
|
|
33437
|
+
* Start of this camera's OLDEST ARCHIVED segment, across every profile and
|
|
33247
33438
|
* location — the "Oldest footage" column in Recordings → Storage, and the
|
|
33248
33439
|
* only honest answer to "is retention actually holding?" per camera.
|
|
33249
33440
|
*
|
|
@@ -33253,7 +33444,24 @@ var RecordingDeviceUsageSchema = zod.z.object({
|
|
|
33253
33444
|
* (types) and the addon ship on different trains, and the addon is usually
|
|
33254
33445
|
* the later of the two.
|
|
33255
33446
|
*/
|
|
33256
|
-
oldestMs: zod.z.number().nullable().optional()
|
|
33447
|
+
oldestMs: zod.z.number().nullable().optional(),
|
|
33448
|
+
/** Segments the archive holds for this camera — the "M" beside `usedBytes`.
|
|
33449
|
+
* OPTIONAL for the same train-skew reason as `oldestMs`. */
|
|
33450
|
+
segments: zod.z.number().optional(),
|
|
33451
|
+
/**
|
|
33452
|
+
* RESIDENCY, not the archive: bytes the recorder process currently holds in
|
|
33453
|
+
* its RAM index — the live tail plus the hours a reader hydrated.
|
|
33454
|
+
*
|
|
33455
|
+
* It answers "what can be served without touching the disk", never "how much
|
|
33456
|
+
* footage this camera has". A UI that renders it must label it as such, and
|
|
33457
|
+
* must never total it as storage. OPTIONAL: a recorder predating D418 omits
|
|
33458
|
+
* it, and so does a node whose ledger could not answer.
|
|
33459
|
+
*/
|
|
33460
|
+
residentBytes: zod.z.number().optional(),
|
|
33461
|
+
/** The residency counterpart of `oldestMs` — the oldest segment currently in
|
|
33462
|
+
* RAM, which on a healthy recorder is minutes ago and means nothing about
|
|
33463
|
+
* retention. `null` = nothing resident. */
|
|
33464
|
+
residentOldestMs: zod.z.number().nullable().optional()
|
|
33257
33465
|
});
|
|
33258
33466
|
/** Recording storage usage + capacity for one storage location. */
|
|
33259
33467
|
var RecordingLocationUsageSchema = zod.z.object({
|
|
@@ -33291,6 +33499,17 @@ var RecordingStorageUsageSchema = zod.z.object({
|
|
|
33291
33499
|
totalUsedBytes: zod.z.number(),
|
|
33292
33500
|
devices: zod.z.array(RecordingDeviceUsageSchema),
|
|
33293
33501
|
/**
|
|
33502
|
+
* WHERE `devices[]` came from, so an empty table is never mistaken for empty
|
|
33503
|
+
* disks (D418).
|
|
33504
|
+
*
|
|
33505
|
+
* `archive` = the durable hour ledger answered. `unavailable` = this node
|
|
33506
|
+
* declared no ledger and the recorder REFUSED rather than answering the
|
|
33507
|
+
* question with the resident index (D295 rule 3) — the rows are UNKNOWN, not
|
|
33508
|
+
* zero, and a UI must say so. OPTIONAL: a recorder predating D418 omits it,
|
|
33509
|
+
* and its rows are residency.
|
|
33510
|
+
*/
|
|
33511
|
+
devicesRead: zod.z.enum(["archive", "unavailable"]).optional(),
|
|
33512
|
+
/**
|
|
33294
33513
|
* Per-physical-volume capacity. OPTIONAL, and consumers must render the rest
|
|
33295
33514
|
* of the payload without it: the hub serves this method through a BAKED
|
|
33296
33515
|
* router, so a hub whose framework train predates a change to this array
|
|
@@ -33461,7 +33680,14 @@ var recordingCapability = {
|
|
|
33461
33680
|
getAvailability: require_sleep.method(zod.z.object({
|
|
33462
33681
|
deviceId: zod.z.number(),
|
|
33463
33682
|
fromMs: zod.z.number(),
|
|
33464
|
-
toMs: zod.z.number()
|
|
33683
|
+
toMs: zod.z.number(),
|
|
33684
|
+
/**
|
|
33685
|
+
* Answer for THIS profile instead of the preferred one (D433). Absent
|
|
33686
|
+
* keeps the timeline's behaviour — one bar, one profile, one set of
|
|
33687
|
+
* reads. `profilesWithFootage` on the answer says what may be asked
|
|
33688
|
+
* for.
|
|
33689
|
+
*/
|
|
33690
|
+
profile: zod.z.string().optional()
|
|
33465
33691
|
}), RecordingAvailabilitySchema, {
|
|
33466
33692
|
kind: "query",
|
|
33467
33693
|
auth: "protected"
|
|
@@ -38294,7 +38520,7 @@ function toDeviceSummary(device, addonId) {
|
|
|
38294
38520
|
};
|
|
38295
38521
|
}
|
|
38296
38522
|
/**
|
|
38297
|
-
* Base class for device-provider addons (rtsp, onvif
|
|
38523
|
+
* Base class for device-provider addons (rtsp, onvif).
|
|
38298
38524
|
*
|
|
38299
38525
|
* Provides default implementations for the common device-provider cap
|
|
38300
38526
|
* methods (`start`, `stop`, `getStatus`, `getDevices`, `supportsDiscovery`,
|
|
@@ -45750,6 +45976,24 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
45750
45976
|
addonId: null,
|
|
45751
45977
|
access: "view"
|
|
45752
45978
|
},
|
|
45979
|
+
"pipelineRunner.getParkedTrackFrame": {
|
|
45980
|
+
capName: "pipeline-runner",
|
|
45981
|
+
capScope: "system",
|
|
45982
|
+
addonId: null,
|
|
45983
|
+
access: "view"
|
|
45984
|
+
},
|
|
45985
|
+
"pipelineRunner.parkTrackFrame": {
|
|
45986
|
+
capName: "pipeline-runner",
|
|
45987
|
+
capScope: "system",
|
|
45988
|
+
addonId: null,
|
|
45989
|
+
access: "create"
|
|
45990
|
+
},
|
|
45991
|
+
"pipelineRunner.releaseParkedTrackFrames": {
|
|
45992
|
+
capName: "pipeline-runner",
|
|
45993
|
+
capScope: "system",
|
|
45994
|
+
addonId: null,
|
|
45995
|
+
access: "create"
|
|
45996
|
+
},
|
|
45753
45997
|
"pipelineRunner.reportMotion": {
|
|
45754
45998
|
capName: "pipeline-runner",
|
|
45755
45999
|
capScope: "system",
|
|
@@ -49296,6 +49540,21 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
49296
49540
|
form: "single",
|
|
49297
49541
|
optional: false
|
|
49298
49542
|
}],
|
|
49543
|
+
"pipelineRunner.getParkedTrackFrame": [{
|
|
49544
|
+
name: "deviceId",
|
|
49545
|
+
form: "single",
|
|
49546
|
+
optional: false
|
|
49547
|
+
}],
|
|
49548
|
+
"pipelineRunner.parkTrackFrame": [{
|
|
49549
|
+
name: "deviceId",
|
|
49550
|
+
form: "single",
|
|
49551
|
+
optional: false
|
|
49552
|
+
}],
|
|
49553
|
+
"pipelineRunner.releaseParkedTrackFrames": [{
|
|
49554
|
+
name: "deviceId",
|
|
49555
|
+
form: "single",
|
|
49556
|
+
optional: false
|
|
49557
|
+
}],
|
|
49299
49558
|
"pipelineRunner.reportMotion": [{
|
|
49300
49559
|
name: "deviceId",
|
|
49301
49560
|
form: "single",
|
|
@@ -49975,6 +50234,9 @@ var SYSTEM_SCOPE_DEVICE_METHODS = [
|
|
|
49975
50234
|
"pipelineRunner.attachCamera",
|
|
49976
50235
|
"pipelineRunner.detachCamera",
|
|
49977
50236
|
"pipelineRunner.getCameraMetrics",
|
|
50237
|
+
"pipelineRunner.getParkedTrackFrame",
|
|
50238
|
+
"pipelineRunner.parkTrackFrame",
|
|
50239
|
+
"pipelineRunner.releaseParkedTrackFrames",
|
|
49978
50240
|
"pipelineRunner.reportMotion",
|
|
49979
50241
|
"pipelineRunner.runDetailSubtree",
|
|
49980
50242
|
"pipelineRunner.runStatelessStep",
|
|
@@ -52239,7 +52501,7 @@ var PreviewTextField = zod.z.string().max(200);
|
|
|
52239
52501
|
* Whether the notification's preview is a STILL or a short animation.
|
|
52240
52502
|
*
|
|
52241
52503
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
52242
|
-
* rule)"* —
|
|
52504
|
+
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
52243
52505
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
52244
52506
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
52245
52507
|
* simply applies it to a dozen frames sampled across the render and assembles
|
|
@@ -55763,6 +56025,10 @@ exports.PROVIDER_KIND_CAP_NAMES = PROVIDER_KIND_CAP_NAMES;
|
|
|
55763
56025
|
exports.PYTHON_SCRIPT = PYTHON_SCRIPT;
|
|
55764
56026
|
exports.PackageUpdateSchema = PackageUpdateSchema;
|
|
55765
56027
|
exports.PackageVersionInfoSchema = PackageVersionInfoSchema;
|
|
56028
|
+
exports.ParkRefusalSchema = ParkRefusalSchema;
|
|
56029
|
+
exports.ParkTrackFrameResultSchema = ParkTrackFrameResultSchema;
|
|
56030
|
+
exports.ParkedFrameKindSchema = ParkedFrameKindSchema;
|
|
56031
|
+
exports.ParkedTrackFrameSchema = ParkedTrackFrameSchema;
|
|
55766
56032
|
exports.PasskeyLoginMethodSchema = PasskeyLoginMethodSchema;
|
|
55767
56033
|
exports.PasskeySummarySchema = PasskeySummarySchema;
|
|
55768
56034
|
exports.PcmSampleFormatSchema = PcmSampleFormatSchema;
|