@camstack/addon-provider-hikvision 1.1.26 → 1.1.27
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 +202 -7
- package/dist/addon.mjs +202 -7
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -6,7 +6,7 @@ let node_http = require("node:http");
|
|
|
6
6
|
let node_https = require("node:https");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let node_os = require("node:os");
|
|
9
|
-
//#region ../types/dist/event-category-
|
|
9
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
10
10
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
11
11
|
EventCategory["SystemBoot"] = "system.boot";
|
|
12
12
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -159,6 +159,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
159
159
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
160
160
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
161
161
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
162
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
163
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
164
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
165
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
166
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
162
167
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
163
168
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
164
169
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -448,6 +453,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
448
453
|
*/
|
|
449
454
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
450
455
|
/**
|
|
456
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
457
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
458
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
459
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
460
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
461
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
462
|
+
* this bus topic drives notifier rules + live UI. See
|
|
463
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
464
|
+
*/
|
|
465
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
466
|
+
/**
|
|
467
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
468
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
469
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
470
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
471
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
472
|
+
*/
|
|
473
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
474
|
+
/**
|
|
451
475
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
452
476
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
453
477
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5186,6 +5210,25 @@ function _instanceof(cls, params = {}) {
|
|
|
5186
5210
|
};
|
|
5187
5211
|
return inst;
|
|
5188
5212
|
}
|
|
5213
|
+
//#endregion
|
|
5214
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5215
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5216
|
+
var ZodIssueCode = {
|
|
5217
|
+
invalid_type: "invalid_type",
|
|
5218
|
+
too_big: "too_big",
|
|
5219
|
+
too_small: "too_small",
|
|
5220
|
+
invalid_format: "invalid_format",
|
|
5221
|
+
not_multiple_of: "not_multiple_of",
|
|
5222
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5223
|
+
invalid_union: "invalid_union",
|
|
5224
|
+
invalid_key: "invalid_key",
|
|
5225
|
+
invalid_element: "invalid_element",
|
|
5226
|
+
invalid_value: "invalid_value",
|
|
5227
|
+
custom: "custom"
|
|
5228
|
+
};
|
|
5229
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5230
|
+
var ZodFirstPartyTypeKind;
|
|
5231
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5189
5232
|
Object.fromEntries([
|
|
5190
5233
|
{
|
|
5191
5234
|
id: "overview",
|
|
@@ -14931,7 +14974,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
14931
14974
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
14932
14975
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
14933
14976
|
*/
|
|
14934
|
-
var ZoneRuleStageEnum = _enum([
|
|
14977
|
+
var ZoneRuleStageEnum = _enum([
|
|
14978
|
+
"motion",
|
|
14979
|
+
"detection",
|
|
14980
|
+
"package"
|
|
14981
|
+
]);
|
|
14935
14982
|
/**
|
|
14936
14983
|
* Runtime registry: cap-property-name → cap definition. `BaseDevice`'s
|
|
14937
14984
|
* `state` getter looks up the cap definition here to construct a
|
|
@@ -15025,16 +15072,24 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
15025
15072
|
})
|
|
15026
15073
|
},
|
|
15027
15074
|
/**
|
|
15028
|
-
* Runtime-state slice —
|
|
15075
|
+
* Runtime-state slice — every stage mirrored together so consumers
|
|
15029
15076
|
* see one reactive handle (`device.state.zoneRules.value`) instead
|
|
15030
|
-
* of
|
|
15031
|
-
* `{motion, detection}` shape, so subscribers always get the
|
|
15077
|
+
* of one per stage. Bulk-replace mutations on any stage write the full
|
|
15078
|
+
* `{motion, detection, package}` shape, so subscribers always get the
|
|
15032
15079
|
* complete current set. Consumers that only care about one stage
|
|
15033
15080
|
* just read the matching property.
|
|
15081
|
+
*
|
|
15082
|
+
* `package` backs the package-drop detector — a package zone is a
|
|
15083
|
+
* `ZoneRule` on the `'package'` stage referencing drawn polygons
|
|
15084
|
+
* (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
|
|
15085
|
+
* The orchestrator provider that writes this stage lands in a later
|
|
15086
|
+
* slice; until then the mirror carries only `{motion, detection}` and
|
|
15087
|
+
* consumers read `package` as absent (treat as `[]`).
|
|
15034
15088
|
*/
|
|
15035
15089
|
runtimeState: object({
|
|
15036
15090
|
motion: array(ZoneRuleSchema).readonly(),
|
|
15037
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
15091
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
15092
|
+
package: array(ZoneRuleSchema).readonly()
|
|
15038
15093
|
})
|
|
15039
15094
|
},
|
|
15040
15095
|
zones: zonesCapability
|
|
@@ -19008,6 +19063,7 @@ var EventKindIconSchema = _enum([
|
|
|
19008
19063
|
"smoke",
|
|
19009
19064
|
"water",
|
|
19010
19065
|
"button",
|
|
19066
|
+
"package",
|
|
19011
19067
|
"generic"
|
|
19012
19068
|
]);
|
|
19013
19069
|
var EventKindCategorySchema = _enum([
|
|
@@ -19015,7 +19071,8 @@ var EventKindCategorySchema = _enum([
|
|
|
19015
19071
|
"audio",
|
|
19016
19072
|
"detection",
|
|
19017
19073
|
"sensor",
|
|
19018
|
-
"custom"
|
|
19074
|
+
"custom",
|
|
19075
|
+
"package"
|
|
19019
19076
|
]);
|
|
19020
19077
|
var EventKindDescriptorSchema = object({
|
|
19021
19078
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -22876,6 +22933,108 @@ method(object({
|
|
|
22876
22933
|
auth: "admin"
|
|
22877
22934
|
});
|
|
22878
22935
|
/**
|
|
22936
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
22937
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
22938
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
22939
|
+
* delete-after-download.
|
|
22940
|
+
*
|
|
22941
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
22942
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
22943
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
22944
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
22945
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
22946
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
22947
|
+
* SQLite); history rows survive file deletion for audit.
|
|
22948
|
+
*/
|
|
22949
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
22950
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
22951
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
22952
|
+
var ExportTimelapseSchema = object({
|
|
22953
|
+
everyMs: number().int().positive(),
|
|
22954
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
22955
|
+
});
|
|
22956
|
+
/**
|
|
22957
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
22958
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
22959
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
22960
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
22961
|
+
*/
|
|
22962
|
+
var ExportOptionsSchema = object({
|
|
22963
|
+
speed: ExportSpeedSchema.optional(),
|
|
22964
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
22965
|
+
includeAudio: boolean(),
|
|
22966
|
+
maxLifeMs: number().int().positive(),
|
|
22967
|
+
deleteAfterDownload: boolean(),
|
|
22968
|
+
title: string().max(200).optional()
|
|
22969
|
+
}).superRefine((v, ctx) => {
|
|
22970
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
22971
|
+
code: ZodIssueCode.custom,
|
|
22972
|
+
message: "speed and timelapse are mutually exclusive",
|
|
22973
|
+
path: ["timelapse"]
|
|
22974
|
+
});
|
|
22975
|
+
});
|
|
22976
|
+
var ExportStateSchema = _enum([
|
|
22977
|
+
"queued",
|
|
22978
|
+
"rendering",
|
|
22979
|
+
"ready",
|
|
22980
|
+
"failed",
|
|
22981
|
+
"expired",
|
|
22982
|
+
"deleted"
|
|
22983
|
+
]);
|
|
22984
|
+
/** One export job / history row. */
|
|
22985
|
+
var ExportRecordSchema = object({
|
|
22986
|
+
id: string(),
|
|
22987
|
+
deviceId: number(),
|
|
22988
|
+
profile: string(),
|
|
22989
|
+
fromMs: number(),
|
|
22990
|
+
toMs: number(),
|
|
22991
|
+
options: ExportOptionsSchema,
|
|
22992
|
+
state: ExportStateSchema,
|
|
22993
|
+
/** 0–100 while rendering; null otherwise. */
|
|
22994
|
+
progressPct: number().nullable(),
|
|
22995
|
+
/** File size once ready; null before. */
|
|
22996
|
+
fileBytes: number().nullable(),
|
|
22997
|
+
expiresAt: number(),
|
|
22998
|
+
deleteAfterDownload: boolean(),
|
|
22999
|
+
/** Epoch of the first complete download; null until then. */
|
|
23000
|
+
downloadedAt: number().nullable(),
|
|
23001
|
+
createdAt: number(),
|
|
23002
|
+
/** User id/name that requested the export. */
|
|
23003
|
+
createdBy: string(),
|
|
23004
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
23005
|
+
error: string().nullable()
|
|
23006
|
+
});
|
|
23007
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
23008
|
+
var ExportDownloadSchema = object({
|
|
23009
|
+
url: string(),
|
|
23010
|
+
endpoints: array(string())
|
|
23011
|
+
});
|
|
23012
|
+
method(object({
|
|
23013
|
+
deviceId: number(),
|
|
23014
|
+
profile: string(),
|
|
23015
|
+
fromMs: number(),
|
|
23016
|
+
toMs: number(),
|
|
23017
|
+
options: ExportOptionsSchema
|
|
23018
|
+
}), ExportRecordSchema, {
|
|
23019
|
+
kind: "mutation",
|
|
23020
|
+
auth: "protected"
|
|
23021
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
23022
|
+
kind: "query",
|
|
23023
|
+
auth: "protected"
|
|
23024
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
23025
|
+
kind: "query",
|
|
23026
|
+
auth: "protected"
|
|
23027
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
23028
|
+
kind: "mutation",
|
|
23029
|
+
auth: "protected"
|
|
23030
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
23031
|
+
kind: "mutation",
|
|
23032
|
+
auth: "protected"
|
|
23033
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
23034
|
+
kind: "query",
|
|
23035
|
+
auth: "protected"
|
|
23036
|
+
});
|
|
23037
|
+
/**
|
|
22879
23038
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
22880
23039
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
22881
23040
|
* `deviceId`.
|
|
@@ -27010,6 +27169,42 @@ Object.freeze({
|
|
|
27010
27169
|
addonId: null,
|
|
27011
27170
|
access: "create"
|
|
27012
27171
|
},
|
|
27172
|
+
"recordingExport.cancelExport": {
|
|
27173
|
+
capName: "recordingExport",
|
|
27174
|
+
capScope: "system",
|
|
27175
|
+
addonId: null,
|
|
27176
|
+
access: "create"
|
|
27177
|
+
},
|
|
27178
|
+
"recordingExport.createExport": {
|
|
27179
|
+
capName: "recordingExport",
|
|
27180
|
+
capScope: "system",
|
|
27181
|
+
addonId: null,
|
|
27182
|
+
access: "create"
|
|
27183
|
+
},
|
|
27184
|
+
"recordingExport.deleteExport": {
|
|
27185
|
+
capName: "recordingExport",
|
|
27186
|
+
capScope: "system",
|
|
27187
|
+
addonId: null,
|
|
27188
|
+
access: "delete"
|
|
27189
|
+
},
|
|
27190
|
+
"recordingExport.getDownloadUrl": {
|
|
27191
|
+
capName: "recordingExport",
|
|
27192
|
+
capScope: "system",
|
|
27193
|
+
addonId: null,
|
|
27194
|
+
access: "view"
|
|
27195
|
+
},
|
|
27196
|
+
"recordingExport.getExport": {
|
|
27197
|
+
capName: "recordingExport",
|
|
27198
|
+
capScope: "system",
|
|
27199
|
+
addonId: null,
|
|
27200
|
+
access: "view"
|
|
27201
|
+
},
|
|
27202
|
+
"recordingExport.listExports": {
|
|
27203
|
+
capName: "recordingExport",
|
|
27204
|
+
capScope: "system",
|
|
27205
|
+
addonId: null,
|
|
27206
|
+
access: "view"
|
|
27207
|
+
},
|
|
27013
27208
|
"sceneMonitor.captureReference": {
|
|
27014
27209
|
capName: "scene-monitor",
|
|
27015
27210
|
capScope: "device",
|
package/dist/addon.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { networkInterfaces } from "node:os";
|
|
|
7
7
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
8
8
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
9
9
|
//#endregion
|
|
10
|
-
//#region ../types/dist/event-category-
|
|
10
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
11
11
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
12
12
|
EventCategory["SystemBoot"] = "system.boot";
|
|
13
13
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -160,6 +160,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
160
160
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
161
161
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
162
162
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
163
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
164
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
165
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
166
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
167
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
163
168
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
164
169
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
165
170
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -449,6 +454,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
449
454
|
*/
|
|
450
455
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
451
456
|
/**
|
|
457
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
458
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
459
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
460
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
461
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
462
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
463
|
+
* this bus topic drives notifier rules + live UI. See
|
|
464
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
465
|
+
*/
|
|
466
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
467
|
+
/**
|
|
468
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
469
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
470
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
471
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
472
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
473
|
+
*/
|
|
474
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
475
|
+
/**
|
|
452
476
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
453
477
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
454
478
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5187,6 +5211,25 @@ function _instanceof(cls, params = {}) {
|
|
|
5187
5211
|
};
|
|
5188
5212
|
return inst;
|
|
5189
5213
|
}
|
|
5214
|
+
//#endregion
|
|
5215
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5216
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5217
|
+
var ZodIssueCode = {
|
|
5218
|
+
invalid_type: "invalid_type",
|
|
5219
|
+
too_big: "too_big",
|
|
5220
|
+
too_small: "too_small",
|
|
5221
|
+
invalid_format: "invalid_format",
|
|
5222
|
+
not_multiple_of: "not_multiple_of",
|
|
5223
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5224
|
+
invalid_union: "invalid_union",
|
|
5225
|
+
invalid_key: "invalid_key",
|
|
5226
|
+
invalid_element: "invalid_element",
|
|
5227
|
+
invalid_value: "invalid_value",
|
|
5228
|
+
custom: "custom"
|
|
5229
|
+
};
|
|
5230
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5231
|
+
var ZodFirstPartyTypeKind;
|
|
5232
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5190
5233
|
Object.fromEntries([
|
|
5191
5234
|
{
|
|
5192
5235
|
id: "overview",
|
|
@@ -14932,7 +14975,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
14932
14975
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
14933
14976
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
14934
14977
|
*/
|
|
14935
|
-
var ZoneRuleStageEnum = _enum([
|
|
14978
|
+
var ZoneRuleStageEnum = _enum([
|
|
14979
|
+
"motion",
|
|
14980
|
+
"detection",
|
|
14981
|
+
"package"
|
|
14982
|
+
]);
|
|
14936
14983
|
/**
|
|
14937
14984
|
* Runtime registry: cap-property-name → cap definition. `BaseDevice`'s
|
|
14938
14985
|
* `state` getter looks up the cap definition here to construct a
|
|
@@ -15026,16 +15073,24 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
15026
15073
|
})
|
|
15027
15074
|
},
|
|
15028
15075
|
/**
|
|
15029
|
-
* Runtime-state slice —
|
|
15076
|
+
* Runtime-state slice — every stage mirrored together so consumers
|
|
15030
15077
|
* see one reactive handle (`device.state.zoneRules.value`) instead
|
|
15031
|
-
* of
|
|
15032
|
-
* `{motion, detection}` shape, so subscribers always get the
|
|
15078
|
+
* of one per stage. Bulk-replace mutations on any stage write the full
|
|
15079
|
+
* `{motion, detection, package}` shape, so subscribers always get the
|
|
15033
15080
|
* complete current set. Consumers that only care about one stage
|
|
15034
15081
|
* just read the matching property.
|
|
15082
|
+
*
|
|
15083
|
+
* `package` backs the package-drop detector — a package zone is a
|
|
15084
|
+
* `ZoneRule` on the `'package'` stage referencing drawn polygons
|
|
15085
|
+
* (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
|
|
15086
|
+
* The orchestrator provider that writes this stage lands in a later
|
|
15087
|
+
* slice; until then the mirror carries only `{motion, detection}` and
|
|
15088
|
+
* consumers read `package` as absent (treat as `[]`).
|
|
15035
15089
|
*/
|
|
15036
15090
|
runtimeState: object({
|
|
15037
15091
|
motion: array(ZoneRuleSchema).readonly(),
|
|
15038
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
15092
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
15093
|
+
package: array(ZoneRuleSchema).readonly()
|
|
15039
15094
|
})
|
|
15040
15095
|
},
|
|
15041
15096
|
zones: zonesCapability
|
|
@@ -19009,6 +19064,7 @@ var EventKindIconSchema = _enum([
|
|
|
19009
19064
|
"smoke",
|
|
19010
19065
|
"water",
|
|
19011
19066
|
"button",
|
|
19067
|
+
"package",
|
|
19012
19068
|
"generic"
|
|
19013
19069
|
]);
|
|
19014
19070
|
var EventKindCategorySchema = _enum([
|
|
@@ -19016,7 +19072,8 @@ var EventKindCategorySchema = _enum([
|
|
|
19016
19072
|
"audio",
|
|
19017
19073
|
"detection",
|
|
19018
19074
|
"sensor",
|
|
19019
|
-
"custom"
|
|
19075
|
+
"custom",
|
|
19076
|
+
"package"
|
|
19020
19077
|
]);
|
|
19021
19078
|
var EventKindDescriptorSchema = object({
|
|
19022
19079
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -22877,6 +22934,108 @@ method(object({
|
|
|
22877
22934
|
auth: "admin"
|
|
22878
22935
|
});
|
|
22879
22936
|
/**
|
|
22937
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
22938
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
22939
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
22940
|
+
* delete-after-download.
|
|
22941
|
+
*
|
|
22942
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
22943
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
22944
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
22945
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
22946
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
22947
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
22948
|
+
* SQLite); history rows survive file deletion for audit.
|
|
22949
|
+
*/
|
|
22950
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
22951
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
22952
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
22953
|
+
var ExportTimelapseSchema = object({
|
|
22954
|
+
everyMs: number().int().positive(),
|
|
22955
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
22956
|
+
});
|
|
22957
|
+
/**
|
|
22958
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
22959
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
22960
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
22961
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
22962
|
+
*/
|
|
22963
|
+
var ExportOptionsSchema = object({
|
|
22964
|
+
speed: ExportSpeedSchema.optional(),
|
|
22965
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
22966
|
+
includeAudio: boolean(),
|
|
22967
|
+
maxLifeMs: number().int().positive(),
|
|
22968
|
+
deleteAfterDownload: boolean(),
|
|
22969
|
+
title: string().max(200).optional()
|
|
22970
|
+
}).superRefine((v, ctx) => {
|
|
22971
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
22972
|
+
code: ZodIssueCode.custom,
|
|
22973
|
+
message: "speed and timelapse are mutually exclusive",
|
|
22974
|
+
path: ["timelapse"]
|
|
22975
|
+
});
|
|
22976
|
+
});
|
|
22977
|
+
var ExportStateSchema = _enum([
|
|
22978
|
+
"queued",
|
|
22979
|
+
"rendering",
|
|
22980
|
+
"ready",
|
|
22981
|
+
"failed",
|
|
22982
|
+
"expired",
|
|
22983
|
+
"deleted"
|
|
22984
|
+
]);
|
|
22985
|
+
/** One export job / history row. */
|
|
22986
|
+
var ExportRecordSchema = object({
|
|
22987
|
+
id: string(),
|
|
22988
|
+
deviceId: number(),
|
|
22989
|
+
profile: string(),
|
|
22990
|
+
fromMs: number(),
|
|
22991
|
+
toMs: number(),
|
|
22992
|
+
options: ExportOptionsSchema,
|
|
22993
|
+
state: ExportStateSchema,
|
|
22994
|
+
/** 0–100 while rendering; null otherwise. */
|
|
22995
|
+
progressPct: number().nullable(),
|
|
22996
|
+
/** File size once ready; null before. */
|
|
22997
|
+
fileBytes: number().nullable(),
|
|
22998
|
+
expiresAt: number(),
|
|
22999
|
+
deleteAfterDownload: boolean(),
|
|
23000
|
+
/** Epoch of the first complete download; null until then. */
|
|
23001
|
+
downloadedAt: number().nullable(),
|
|
23002
|
+
createdAt: number(),
|
|
23003
|
+
/** User id/name that requested the export. */
|
|
23004
|
+
createdBy: string(),
|
|
23005
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
23006
|
+
error: string().nullable()
|
|
23007
|
+
});
|
|
23008
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
23009
|
+
var ExportDownloadSchema = object({
|
|
23010
|
+
url: string(),
|
|
23011
|
+
endpoints: array(string())
|
|
23012
|
+
});
|
|
23013
|
+
method(object({
|
|
23014
|
+
deviceId: number(),
|
|
23015
|
+
profile: string(),
|
|
23016
|
+
fromMs: number(),
|
|
23017
|
+
toMs: number(),
|
|
23018
|
+
options: ExportOptionsSchema
|
|
23019
|
+
}), ExportRecordSchema, {
|
|
23020
|
+
kind: "mutation",
|
|
23021
|
+
auth: "protected"
|
|
23022
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
23023
|
+
kind: "query",
|
|
23024
|
+
auth: "protected"
|
|
23025
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
23026
|
+
kind: "query",
|
|
23027
|
+
auth: "protected"
|
|
23028
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
23029
|
+
kind: "mutation",
|
|
23030
|
+
auth: "protected"
|
|
23031
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
23032
|
+
kind: "mutation",
|
|
23033
|
+
auth: "protected"
|
|
23034
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
23035
|
+
kind: "query",
|
|
23036
|
+
auth: "protected"
|
|
23037
|
+
});
|
|
23038
|
+
/**
|
|
22880
23039
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
22881
23040
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
22882
23041
|
* `deviceId`.
|
|
@@ -27011,6 +27170,42 @@ Object.freeze({
|
|
|
27011
27170
|
addonId: null,
|
|
27012
27171
|
access: "create"
|
|
27013
27172
|
},
|
|
27173
|
+
"recordingExport.cancelExport": {
|
|
27174
|
+
capName: "recordingExport",
|
|
27175
|
+
capScope: "system",
|
|
27176
|
+
addonId: null,
|
|
27177
|
+
access: "create"
|
|
27178
|
+
},
|
|
27179
|
+
"recordingExport.createExport": {
|
|
27180
|
+
capName: "recordingExport",
|
|
27181
|
+
capScope: "system",
|
|
27182
|
+
addonId: null,
|
|
27183
|
+
access: "create"
|
|
27184
|
+
},
|
|
27185
|
+
"recordingExport.deleteExport": {
|
|
27186
|
+
capName: "recordingExport",
|
|
27187
|
+
capScope: "system",
|
|
27188
|
+
addonId: null,
|
|
27189
|
+
access: "delete"
|
|
27190
|
+
},
|
|
27191
|
+
"recordingExport.getDownloadUrl": {
|
|
27192
|
+
capName: "recordingExport",
|
|
27193
|
+
capScope: "system",
|
|
27194
|
+
addonId: null,
|
|
27195
|
+
access: "view"
|
|
27196
|
+
},
|
|
27197
|
+
"recordingExport.getExport": {
|
|
27198
|
+
capName: "recordingExport",
|
|
27199
|
+
capScope: "system",
|
|
27200
|
+
addonId: null,
|
|
27201
|
+
access: "view"
|
|
27202
|
+
},
|
|
27203
|
+
"recordingExport.listExports": {
|
|
27204
|
+
capName: "recordingExport",
|
|
27205
|
+
capScope: "system",
|
|
27206
|
+
addonId: null,
|
|
27207
|
+
access: "view"
|
|
27208
|
+
},
|
|
27014
27209
|
"sceneMonitor.captureReference": {
|
|
27015
27210
|
capName: "scene-monitor",
|
|
27016
27211
|
capScope: "device",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-hikvision",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.27",
|
|
4
4
|
"description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|