@camstack/addon-tailscale 1.1.23 → 1.1.24
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/client/tailscale.addon.js +1 -1
- package/dist/client/tailscale.addon.mjs +1 -1
- package/dist/{dist-BvokuPmb.mjs → dist-4pXP3j1Q.mjs} +176 -12
- package/dist/{dist-B9u_59gc.js → dist-j2Tcnvk4.js} +176 -12
- package/dist/ingress/tailscale-ingress.addon.js +1 -1
- package/dist/ingress/tailscale-ingress.addon.mjs +1 -1
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
enumerable: true
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
//#endregion
|
|
27
|
-
const require_dist = require("../dist-
|
|
27
|
+
const require_dist = require("../dist-j2Tcnvk4.js");
|
|
28
28
|
let node_child_process = require("node:child_process");
|
|
29
29
|
let node_util = require("node:util");
|
|
30
30
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as EventCategory, n as networkAccessCapability, r as BaseAddon, t as meshNetworkCapability } from "../dist-
|
|
1
|
+
import { i as EventCategory, n as networkAccessCapability, r as BaseAddon, t as meshNetworkCapability } from "../dist-4pXP3j1Q.mjs";
|
|
2
2
|
import { execFile, spawn } from "node:child_process";
|
|
3
3
|
import { promisify } from "node:util";
|
|
4
4
|
import * as fs from "node:fs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../types/dist/event-category-
|
|
1
|
+
//#region ../types/dist/event-category-H4AVePnn.mjs
|
|
2
2
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
3
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4
4
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -148,6 +148,9 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
148
148
|
EventCategory["RecordingSegmentWritten"] = "recording.segment.written";
|
|
149
149
|
EventCategory["RecordingPolicyFallback"] = "recording.policy.fallback";
|
|
150
150
|
EventCategory["RecordingRetentionCompleted"] = "recording.retention.completed";
|
|
151
|
+
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
152
|
+
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
153
|
+
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
151
154
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
152
155
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
153
156
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -9812,7 +9815,7 @@ object({
|
|
|
9812
9815
|
deviceId: number(),
|
|
9813
9816
|
timestamp: number()
|
|
9814
9817
|
});
|
|
9815
|
-
DeviceType.Button;
|
|
9818
|
+
DeviceType.Button, DeviceType.Camera;
|
|
9816
9819
|
/**
|
|
9817
9820
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
9818
9821
|
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
@@ -14182,6 +14185,14 @@ var ConfigEntrySchema = object({
|
|
|
14182
14185
|
value: unknown(),
|
|
14183
14186
|
description: string().optional()
|
|
14184
14187
|
});
|
|
14188
|
+
var DeviceLinkModeSchema = _enum(["auto", "manual"]);
|
|
14189
|
+
/** One resolved linked device — the compact projection consumers need. */
|
|
14190
|
+
var LinkedDeviceSchema = object({
|
|
14191
|
+
deviceId: number(),
|
|
14192
|
+
name: string(),
|
|
14193
|
+
location: string().nullable(),
|
|
14194
|
+
features: array(string())
|
|
14195
|
+
});
|
|
14185
14196
|
var SavedDeviceRowSchema = object({
|
|
14186
14197
|
/** Numeric id reserved at allocateDeviceId time. */
|
|
14187
14198
|
id: number(),
|
|
@@ -14403,7 +14414,10 @@ method(object({
|
|
|
14403
14414
|
}), _void(), {
|
|
14404
14415
|
kind: "mutation",
|
|
14405
14416
|
auth: "admin"
|
|
14406
|
-
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }),
|
|
14417
|
+
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
14418
|
+
mode: DeviceLinkModeSchema,
|
|
14419
|
+
devices: array(LinkedDeviceSchema)
|
|
14420
|
+
})), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
|
|
14407
14421
|
deviceId: number(),
|
|
14408
14422
|
values: record(string(), unknown())
|
|
14409
14423
|
}), object({ success: literal(true) }), {
|
|
@@ -15689,6 +15703,61 @@ var EventKindSchema = _enum([
|
|
|
15689
15703
|
"object",
|
|
15690
15704
|
"audio"
|
|
15691
15705
|
]);
|
|
15706
|
+
/**
|
|
15707
|
+
* Spatial filter for `listTracks` — the rect + polygon variants of the shared
|
|
15708
|
+
* MaskShape vocabulary (see `mask-shape.ts`). Coordinates are NORMALIZED 0..1
|
|
15709
|
+
* of the camera frame (top-left origin), matching the drawing-plane editor.
|
|
15710
|
+
*/
|
|
15711
|
+
var TrackZoneFilterSchema = discriminatedUnion("kind", [MaskRectShapeSchema, MaskPolygonShapeSchema]);
|
|
15712
|
+
/** Closed icon vocabulary so clients render a known glyph per kind. */
|
|
15713
|
+
var EventKindIconSchema = _enum([
|
|
15714
|
+
"motion",
|
|
15715
|
+
"audio",
|
|
15716
|
+
"person",
|
|
15717
|
+
"vehicle",
|
|
15718
|
+
"animal",
|
|
15719
|
+
"door",
|
|
15720
|
+
"pir",
|
|
15721
|
+
"smoke",
|
|
15722
|
+
"water",
|
|
15723
|
+
"button",
|
|
15724
|
+
"generic"
|
|
15725
|
+
]);
|
|
15726
|
+
var EventKindCategorySchema = _enum([
|
|
15727
|
+
"motion",
|
|
15728
|
+
"audio",
|
|
15729
|
+
"detection",
|
|
15730
|
+
"sensor",
|
|
15731
|
+
"custom"
|
|
15732
|
+
]);
|
|
15733
|
+
var EventKindDescriptorSchema = object({
|
|
15734
|
+
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
15735
|
+
kind: string(),
|
|
15736
|
+
label: string(),
|
|
15737
|
+
/** Hex color for timeline/legend rendering. */
|
|
15738
|
+
color: string(),
|
|
15739
|
+
icon: EventKindIconSchema,
|
|
15740
|
+
category: EventKindCategorySchema,
|
|
15741
|
+
/** Which cap + device contributes this kind. For built-ins the camera
|
|
15742
|
+
* itself; for sensor kinds the LINKED source device. */
|
|
15743
|
+
source: object({
|
|
15744
|
+
capName: string(),
|
|
15745
|
+
deviceId: number()
|
|
15746
|
+
})
|
|
15747
|
+
});
|
|
15748
|
+
var SensorEventSchema = object({
|
|
15749
|
+
id: string(),
|
|
15750
|
+
/** The CAMERA the event is attributed to (a sensor linked to N cameras
|
|
15751
|
+
* yields N rows, one per camera). */
|
|
15752
|
+
deviceId: number(),
|
|
15753
|
+
/** The linked sensor device whose state changed. */
|
|
15754
|
+
sourceDeviceId: number(),
|
|
15755
|
+
/** Event kind id — matches an `EventKindDescriptor.kind`. */
|
|
15756
|
+
kind: string(),
|
|
15757
|
+
/** Snapshot of the sensor cap's runtime-state slice at the change. */
|
|
15758
|
+
value: record(string(), unknown()).nullable(),
|
|
15759
|
+
timestamp: number()
|
|
15760
|
+
});
|
|
15692
15761
|
var TrackPositionSchema = object({
|
|
15693
15762
|
x: number(),
|
|
15694
15763
|
y: number(),
|
|
@@ -15702,6 +15771,30 @@ var TrackSnapshotSchema = object({
|
|
|
15702
15771
|
mediaKey: string()
|
|
15703
15772
|
});
|
|
15704
15773
|
/**
|
|
15774
|
+
* Normalized 0..1 trajectory envelope (min/max over every position bbox,
|
|
15775
|
+
* divided by the track's detection-frame dims), computed at persist time.
|
|
15776
|
+
* Absent when the frame dims were unknown when the track was persisted
|
|
15777
|
+
* (legacy rows / dims-less sources) and on active (in-RAM) tracks.
|
|
15778
|
+
*/
|
|
15779
|
+
var TrackEnvelopeSchema = object({
|
|
15780
|
+
minX: number(),
|
|
15781
|
+
minY: number(),
|
|
15782
|
+
maxX: number(),
|
|
15783
|
+
maxY: number()
|
|
15784
|
+
});
|
|
15785
|
+
/**
|
|
15786
|
+
* Row projection for track list queries. `full` (default) returns the
|
|
15787
|
+
* complete Track including the frame-rate `positions[]` history and the
|
|
15788
|
+
* `snapshots[]` references — megabytes across a page of tracks. `slim`
|
|
15789
|
+
* keeps every scalar the list surfaces actually render (ids, class(es),
|
|
15790
|
+
* label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
|
|
15791
|
+
* zonesVisited, bestEventId, envelope) and returns `positions` /
|
|
15792
|
+
* `snapshots` as EMPTY arrays — detail views re-fetch the full row via
|
|
15793
|
+
* `getTrack`. Mirrors the event-store `projection` convention
|
|
15794
|
+
* (`getObjectEvents` et al.).
|
|
15795
|
+
*/
|
|
15796
|
+
var TrackProjectionSchema = _enum(["full", "slim"]);
|
|
15797
|
+
/**
|
|
15705
15798
|
* One audio-classification label heard on the track's camera while the
|
|
15706
15799
|
* track was alive, aggregated per label. An "episode" is one persisted
|
|
15707
15800
|
* audio event (the confident-classification path: score ≥ the device's
|
|
@@ -15752,7 +15845,11 @@ var TrackSchema = object({
|
|
|
15752
15845
|
/** Audio-classification labels heard on the camera during the track's
|
|
15753
15846
|
* life (score ≥ device `classificationMinScore`), aggregated per label.
|
|
15754
15847
|
* Absent on legacy rows / tracks with no confident audio. */
|
|
15755
|
-
audioLabels: array(TrackAudioLabelSchema).readonly().optional()
|
|
15848
|
+
audioLabels: array(TrackAudioLabelSchema).readonly().optional(),
|
|
15849
|
+
/** Normalized 0..1 trajectory envelope (see {@link TrackEnvelopeSchema}).
|
|
15850
|
+
* Populated from the persisted envelope columns on historical reads;
|
|
15851
|
+
* absent on legacy rows, dims-less tracks and active (in-RAM) tracks. */
|
|
15852
|
+
envelope: TrackEnvelopeSchema.optional()
|
|
15756
15853
|
});
|
|
15757
15854
|
var BaseEventFields = {
|
|
15758
15855
|
id: string(),
|
|
@@ -15862,11 +15959,13 @@ var MediaFileSchema = object({
|
|
|
15862
15959
|
sizeBytes: number(),
|
|
15863
15960
|
timestamp: number()
|
|
15864
15961
|
});
|
|
15962
|
+
var DEFAULT_EVENT_QUERY_LIMIT = 1e3;
|
|
15963
|
+
var MAX_EVENT_QUERY_LIMIT = 5e3;
|
|
15865
15964
|
var DeviceEventQueryInput = object({
|
|
15866
15965
|
deviceId: number(),
|
|
15867
15966
|
since: number().optional(),
|
|
15868
15967
|
until: number().optional(),
|
|
15869
|
-
limit: number().int().min(1).max(
|
|
15968
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT),
|
|
15870
15969
|
/** `slim` drops heavy JSON fields (regions/bbox/zones) and carries an
|
|
15871
15970
|
* optional `mediaUrl` (populated by B5). `full` (default) keeps today's
|
|
15872
15971
|
* exact behaviour. Callers may omit this field — the store defaults to
|
|
@@ -15874,6 +15973,27 @@ var DeviceEventQueryInput = object({
|
|
|
15874
15973
|
projection: _enum(["full", "slim"]).optional()
|
|
15875
15974
|
});
|
|
15876
15975
|
var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
|
|
15976
|
+
var RecentTracksQueryInput = object({
|
|
15977
|
+
/** Devices to merge. An empty array yields `{ tracks: [], nextCursor: null }`. */
|
|
15978
|
+
deviceIds: array(number()),
|
|
15979
|
+
/** Window lower bound on `lastSeen` (inclusive). */
|
|
15980
|
+
since: number().optional(),
|
|
15981
|
+
/** Window upper bound on `lastSeen` (inclusive). */
|
|
15982
|
+
until: number().optional(),
|
|
15983
|
+
/** Page size. Default 200, max 1000. */
|
|
15984
|
+
limit: number().int().min(1).max(1e3).default(200),
|
|
15985
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`.
|
|
15986
|
+
* Encodes the (lastSeen, trackId) sort position — treat as opaque. */
|
|
15987
|
+
cursor: string().optional(),
|
|
15988
|
+
/** See {@link TrackProjectionSchema}. Default `full`. */
|
|
15989
|
+
projection: TrackProjectionSchema.optional()
|
|
15990
|
+
});
|
|
15991
|
+
var RecentTracksPageSchema = object({
|
|
15992
|
+
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
15993
|
+
tracks: array(TrackSchema).readonly(),
|
|
15994
|
+
/** Cursor for the next page, or null when this page is the last. */
|
|
15995
|
+
nextCursor: string().nullable()
|
|
15996
|
+
});
|
|
15877
15997
|
var KeyEventQueryInput = object({
|
|
15878
15998
|
deviceId: number(),
|
|
15879
15999
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
@@ -15956,11 +16076,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
15956
16076
|
deviceId: number(),
|
|
15957
16077
|
since: number().optional(),
|
|
15958
16078
|
until: number().optional(),
|
|
15959
|
-
limit: number().optional()
|
|
15960
|
-
|
|
15961
|
-
|
|
15962
|
-
|
|
15963
|
-
|
|
16079
|
+
limit: number().optional(),
|
|
16080
|
+
/** Spatial filter — only tracks whose trajectory intersects the zone
|
|
16081
|
+
* (normalized 0..1 rect or polygon). SQL-prefiltered on the persisted
|
|
16082
|
+
* envelope columns, then precisely tested per position. Tracks with
|
|
16083
|
+
* an unknown envelope (no frame dims at persist time) always match. */
|
|
16084
|
+
zone: TrackZoneFilterSchema.optional(),
|
|
16085
|
+
/** See {@link TrackProjectionSchema}. Default `full` (backward
|
|
16086
|
+
* compatible — omitting the field keeps today's exact behaviour). */
|
|
16087
|
+
projection: TrackProjectionSchema.optional()
|
|
16088
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
|
|
16089
|
+
kind: "mutation",
|
|
16090
|
+
auth: "admin"
|
|
16091
|
+
}), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({
|
|
16092
|
+
deviceId: number(),
|
|
16093
|
+
since: number().optional(),
|
|
16094
|
+
until: number().optional(),
|
|
16095
|
+
kinds: array(string()).optional(),
|
|
16096
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
16097
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
15964
16098
|
deviceId: number(),
|
|
15965
16099
|
since: number(),
|
|
15966
16100
|
until: number(),
|
|
@@ -19222,7 +19356,12 @@ var RecordingStorageUsageSchema = object({
|
|
|
19222
19356
|
/**
|
|
19223
19357
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
19224
19358
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
19225
|
-
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
19359
|
+
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
19360
|
+
* and the backward covered edge `prevEndMs` (exclusive end of the nearest
|
|
19361
|
+
* footage behind the epoch; `null` when none — optional so older providers
|
|
19362
|
+
* that omit it stay valid). `prevEndMs` lets a backward frame-step hop the
|
|
19363
|
+
* small inter-segment cracks (durMs under-covers the span to the next
|
|
19364
|
+
* startMs by ~11-17 ms) instead of no-opping at a segment head.
|
|
19226
19365
|
*/
|
|
19227
19366
|
var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
19228
19367
|
kind: literal("segment"),
|
|
@@ -19231,7 +19370,8 @@ var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
|
19231
19370
|
bytes: number()
|
|
19232
19371
|
}), object({
|
|
19233
19372
|
kind: literal("gap"),
|
|
19234
|
-
nearestEdgeMs: number().nullable()
|
|
19373
|
+
nearestEdgeMs: number().nullable(),
|
|
19374
|
+
prevEndMs: number().nullable().optional()
|
|
19235
19375
|
})]);
|
|
19236
19376
|
/** Raw bytes of one finalized footage segment (read off disk on the recording node). */
|
|
19237
19377
|
var ReadSegmentBytesResultSchema = object({ data: _instanceof(Uint8Array) });
|
|
@@ -20800,6 +20940,12 @@ Object.freeze({
|
|
|
20800
20940
|
addonId: null,
|
|
20801
20941
|
access: "view"
|
|
20802
20942
|
},
|
|
20943
|
+
"deviceManager.getLinkedDevices": {
|
|
20944
|
+
capName: "device-manager",
|
|
20945
|
+
capScope: "system",
|
|
20946
|
+
addonId: null,
|
|
20947
|
+
access: "view"
|
|
20948
|
+
},
|
|
20803
20949
|
"deviceManager.getRoleDisplayDefaults": {
|
|
20804
20950
|
capName: "device-manager",
|
|
20805
20951
|
capScope: "system",
|
|
@@ -22354,6 +22500,12 @@ Object.freeze({
|
|
|
22354
22500
|
addonId: null,
|
|
22355
22501
|
access: "view"
|
|
22356
22502
|
},
|
|
22503
|
+
"pipelineAnalytics.getSensorEvents": {
|
|
22504
|
+
capName: "pipeline-analytics",
|
|
22505
|
+
capScope: "device",
|
|
22506
|
+
addonId: null,
|
|
22507
|
+
access: "view"
|
|
22508
|
+
},
|
|
22357
22509
|
"pipelineAnalytics.getTrack": {
|
|
22358
22510
|
capName: "pipeline-analytics",
|
|
22359
22511
|
capScope: "device",
|
|
@@ -22366,6 +22518,18 @@ Object.freeze({
|
|
|
22366
22518
|
addonId: null,
|
|
22367
22519
|
access: "view"
|
|
22368
22520
|
},
|
|
22521
|
+
"pipelineAnalytics.listEventKinds": {
|
|
22522
|
+
capName: "pipeline-analytics",
|
|
22523
|
+
capScope: "device",
|
|
22524
|
+
addonId: null,
|
|
22525
|
+
access: "view"
|
|
22526
|
+
},
|
|
22527
|
+
"pipelineAnalytics.listRecentTracks": {
|
|
22528
|
+
capName: "pipeline-analytics",
|
|
22529
|
+
capScope: "device",
|
|
22530
|
+
addonId: null,
|
|
22531
|
+
access: "view"
|
|
22532
|
+
},
|
|
22369
22533
|
"pipelineAnalytics.listTracks": {
|
|
22370
22534
|
capName: "pipeline-analytics",
|
|
22371
22535
|
capScope: "device",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../types/dist/event-category-
|
|
1
|
+
//#region ../types/dist/event-category-H4AVePnn.mjs
|
|
2
2
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
3
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4
4
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -148,6 +148,9 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
148
148
|
EventCategory["RecordingSegmentWritten"] = "recording.segment.written";
|
|
149
149
|
EventCategory["RecordingPolicyFallback"] = "recording.policy.fallback";
|
|
150
150
|
EventCategory["RecordingRetentionCompleted"] = "recording.retention.completed";
|
|
151
|
+
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
152
|
+
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
153
|
+
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
151
154
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
152
155
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
153
156
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -9812,7 +9815,7 @@ object({
|
|
|
9812
9815
|
deviceId: number(),
|
|
9813
9816
|
timestamp: number()
|
|
9814
9817
|
});
|
|
9815
|
-
DeviceType.Button;
|
|
9818
|
+
DeviceType.Button, DeviceType.Camera;
|
|
9816
9819
|
/**
|
|
9817
9820
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
9818
9821
|
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
@@ -14182,6 +14185,14 @@ var ConfigEntrySchema = object({
|
|
|
14182
14185
|
value: unknown(),
|
|
14183
14186
|
description: string().optional()
|
|
14184
14187
|
});
|
|
14188
|
+
var DeviceLinkModeSchema = _enum(["auto", "manual"]);
|
|
14189
|
+
/** One resolved linked device — the compact projection consumers need. */
|
|
14190
|
+
var LinkedDeviceSchema = object({
|
|
14191
|
+
deviceId: number(),
|
|
14192
|
+
name: string(),
|
|
14193
|
+
location: string().nullable(),
|
|
14194
|
+
features: array(string())
|
|
14195
|
+
});
|
|
14185
14196
|
var SavedDeviceRowSchema = object({
|
|
14186
14197
|
/** Numeric id reserved at allocateDeviceId time. */
|
|
14187
14198
|
id: number(),
|
|
@@ -14403,7 +14414,10 @@ method(object({
|
|
|
14403
14414
|
}), _void(), {
|
|
14404
14415
|
kind: "mutation",
|
|
14405
14416
|
auth: "admin"
|
|
14406
|
-
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }),
|
|
14417
|
+
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
14418
|
+
mode: DeviceLinkModeSchema,
|
|
14419
|
+
devices: array(LinkedDeviceSchema)
|
|
14420
|
+
})), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
|
|
14407
14421
|
deviceId: number(),
|
|
14408
14422
|
values: record(string(), unknown())
|
|
14409
14423
|
}), object({ success: literal(true) }), {
|
|
@@ -15689,6 +15703,61 @@ var EventKindSchema = _enum([
|
|
|
15689
15703
|
"object",
|
|
15690
15704
|
"audio"
|
|
15691
15705
|
]);
|
|
15706
|
+
/**
|
|
15707
|
+
* Spatial filter for `listTracks` — the rect + polygon variants of the shared
|
|
15708
|
+
* MaskShape vocabulary (see `mask-shape.ts`). Coordinates are NORMALIZED 0..1
|
|
15709
|
+
* of the camera frame (top-left origin), matching the drawing-plane editor.
|
|
15710
|
+
*/
|
|
15711
|
+
var TrackZoneFilterSchema = discriminatedUnion("kind", [MaskRectShapeSchema, MaskPolygonShapeSchema]);
|
|
15712
|
+
/** Closed icon vocabulary so clients render a known glyph per kind. */
|
|
15713
|
+
var EventKindIconSchema = _enum([
|
|
15714
|
+
"motion",
|
|
15715
|
+
"audio",
|
|
15716
|
+
"person",
|
|
15717
|
+
"vehicle",
|
|
15718
|
+
"animal",
|
|
15719
|
+
"door",
|
|
15720
|
+
"pir",
|
|
15721
|
+
"smoke",
|
|
15722
|
+
"water",
|
|
15723
|
+
"button",
|
|
15724
|
+
"generic"
|
|
15725
|
+
]);
|
|
15726
|
+
var EventKindCategorySchema = _enum([
|
|
15727
|
+
"motion",
|
|
15728
|
+
"audio",
|
|
15729
|
+
"detection",
|
|
15730
|
+
"sensor",
|
|
15731
|
+
"custom"
|
|
15732
|
+
]);
|
|
15733
|
+
var EventKindDescriptorSchema = object({
|
|
15734
|
+
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
15735
|
+
kind: string(),
|
|
15736
|
+
label: string(),
|
|
15737
|
+
/** Hex color for timeline/legend rendering. */
|
|
15738
|
+
color: string(),
|
|
15739
|
+
icon: EventKindIconSchema,
|
|
15740
|
+
category: EventKindCategorySchema,
|
|
15741
|
+
/** Which cap + device contributes this kind. For built-ins the camera
|
|
15742
|
+
* itself; for sensor kinds the LINKED source device. */
|
|
15743
|
+
source: object({
|
|
15744
|
+
capName: string(),
|
|
15745
|
+
deviceId: number()
|
|
15746
|
+
})
|
|
15747
|
+
});
|
|
15748
|
+
var SensorEventSchema = object({
|
|
15749
|
+
id: string(),
|
|
15750
|
+
/** The CAMERA the event is attributed to (a sensor linked to N cameras
|
|
15751
|
+
* yields N rows, one per camera). */
|
|
15752
|
+
deviceId: number(),
|
|
15753
|
+
/** The linked sensor device whose state changed. */
|
|
15754
|
+
sourceDeviceId: number(),
|
|
15755
|
+
/** Event kind id — matches an `EventKindDescriptor.kind`. */
|
|
15756
|
+
kind: string(),
|
|
15757
|
+
/** Snapshot of the sensor cap's runtime-state slice at the change. */
|
|
15758
|
+
value: record(string(), unknown()).nullable(),
|
|
15759
|
+
timestamp: number()
|
|
15760
|
+
});
|
|
15692
15761
|
var TrackPositionSchema = object({
|
|
15693
15762
|
x: number(),
|
|
15694
15763
|
y: number(),
|
|
@@ -15702,6 +15771,30 @@ var TrackSnapshotSchema = object({
|
|
|
15702
15771
|
mediaKey: string()
|
|
15703
15772
|
});
|
|
15704
15773
|
/**
|
|
15774
|
+
* Normalized 0..1 trajectory envelope (min/max over every position bbox,
|
|
15775
|
+
* divided by the track's detection-frame dims), computed at persist time.
|
|
15776
|
+
* Absent when the frame dims were unknown when the track was persisted
|
|
15777
|
+
* (legacy rows / dims-less sources) and on active (in-RAM) tracks.
|
|
15778
|
+
*/
|
|
15779
|
+
var TrackEnvelopeSchema = object({
|
|
15780
|
+
minX: number(),
|
|
15781
|
+
minY: number(),
|
|
15782
|
+
maxX: number(),
|
|
15783
|
+
maxY: number()
|
|
15784
|
+
});
|
|
15785
|
+
/**
|
|
15786
|
+
* Row projection for track list queries. `full` (default) returns the
|
|
15787
|
+
* complete Track including the frame-rate `positions[]` history and the
|
|
15788
|
+
* `snapshots[]` references — megabytes across a page of tracks. `slim`
|
|
15789
|
+
* keeps every scalar the list surfaces actually render (ids, class(es),
|
|
15790
|
+
* label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
|
|
15791
|
+
* zonesVisited, bestEventId, envelope) and returns `positions` /
|
|
15792
|
+
* `snapshots` as EMPTY arrays — detail views re-fetch the full row via
|
|
15793
|
+
* `getTrack`. Mirrors the event-store `projection` convention
|
|
15794
|
+
* (`getObjectEvents` et al.).
|
|
15795
|
+
*/
|
|
15796
|
+
var TrackProjectionSchema = _enum(["full", "slim"]);
|
|
15797
|
+
/**
|
|
15705
15798
|
* One audio-classification label heard on the track's camera while the
|
|
15706
15799
|
* track was alive, aggregated per label. An "episode" is one persisted
|
|
15707
15800
|
* audio event (the confident-classification path: score ≥ the device's
|
|
@@ -15752,7 +15845,11 @@ var TrackSchema = object({
|
|
|
15752
15845
|
/** Audio-classification labels heard on the camera during the track's
|
|
15753
15846
|
* life (score ≥ device `classificationMinScore`), aggregated per label.
|
|
15754
15847
|
* Absent on legacy rows / tracks with no confident audio. */
|
|
15755
|
-
audioLabels: array(TrackAudioLabelSchema).readonly().optional()
|
|
15848
|
+
audioLabels: array(TrackAudioLabelSchema).readonly().optional(),
|
|
15849
|
+
/** Normalized 0..1 trajectory envelope (see {@link TrackEnvelopeSchema}).
|
|
15850
|
+
* Populated from the persisted envelope columns on historical reads;
|
|
15851
|
+
* absent on legacy rows, dims-less tracks and active (in-RAM) tracks. */
|
|
15852
|
+
envelope: TrackEnvelopeSchema.optional()
|
|
15756
15853
|
});
|
|
15757
15854
|
var BaseEventFields = {
|
|
15758
15855
|
id: string(),
|
|
@@ -15862,11 +15959,13 @@ var MediaFileSchema = object({
|
|
|
15862
15959
|
sizeBytes: number(),
|
|
15863
15960
|
timestamp: number()
|
|
15864
15961
|
});
|
|
15962
|
+
var DEFAULT_EVENT_QUERY_LIMIT = 1e3;
|
|
15963
|
+
var MAX_EVENT_QUERY_LIMIT = 5e3;
|
|
15865
15964
|
var DeviceEventQueryInput = object({
|
|
15866
15965
|
deviceId: number(),
|
|
15867
15966
|
since: number().optional(),
|
|
15868
15967
|
until: number().optional(),
|
|
15869
|
-
limit: number().int().min(1).max(
|
|
15968
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT),
|
|
15870
15969
|
/** `slim` drops heavy JSON fields (regions/bbox/zones) and carries an
|
|
15871
15970
|
* optional `mediaUrl` (populated by B5). `full` (default) keeps today's
|
|
15872
15971
|
* exact behaviour. Callers may omit this field — the store defaults to
|
|
@@ -15874,6 +15973,27 @@ var DeviceEventQueryInput = object({
|
|
|
15874
15973
|
projection: _enum(["full", "slim"]).optional()
|
|
15875
15974
|
});
|
|
15876
15975
|
var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
|
|
15976
|
+
var RecentTracksQueryInput = object({
|
|
15977
|
+
/** Devices to merge. An empty array yields `{ tracks: [], nextCursor: null }`. */
|
|
15978
|
+
deviceIds: array(number()),
|
|
15979
|
+
/** Window lower bound on `lastSeen` (inclusive). */
|
|
15980
|
+
since: number().optional(),
|
|
15981
|
+
/** Window upper bound on `lastSeen` (inclusive). */
|
|
15982
|
+
until: number().optional(),
|
|
15983
|
+
/** Page size. Default 200, max 1000. */
|
|
15984
|
+
limit: number().int().min(1).max(1e3).default(200),
|
|
15985
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`.
|
|
15986
|
+
* Encodes the (lastSeen, trackId) sort position — treat as opaque. */
|
|
15987
|
+
cursor: string().optional(),
|
|
15988
|
+
/** See {@link TrackProjectionSchema}. Default `full`. */
|
|
15989
|
+
projection: TrackProjectionSchema.optional()
|
|
15990
|
+
});
|
|
15991
|
+
var RecentTracksPageSchema = object({
|
|
15992
|
+
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
15993
|
+
tracks: array(TrackSchema).readonly(),
|
|
15994
|
+
/** Cursor for the next page, or null when this page is the last. */
|
|
15995
|
+
nextCursor: string().nullable()
|
|
15996
|
+
});
|
|
15877
15997
|
var KeyEventQueryInput = object({
|
|
15878
15998
|
deviceId: number(),
|
|
15879
15999
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
@@ -15956,11 +16076,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
15956
16076
|
deviceId: number(),
|
|
15957
16077
|
since: number().optional(),
|
|
15958
16078
|
until: number().optional(),
|
|
15959
|
-
limit: number().optional()
|
|
15960
|
-
|
|
15961
|
-
|
|
15962
|
-
|
|
15963
|
-
|
|
16079
|
+
limit: number().optional(),
|
|
16080
|
+
/** Spatial filter — only tracks whose trajectory intersects the zone
|
|
16081
|
+
* (normalized 0..1 rect or polygon). SQL-prefiltered on the persisted
|
|
16082
|
+
* envelope columns, then precisely tested per position. Tracks with
|
|
16083
|
+
* an unknown envelope (no frame dims at persist time) always match. */
|
|
16084
|
+
zone: TrackZoneFilterSchema.optional(),
|
|
16085
|
+
/** See {@link TrackProjectionSchema}. Default `full` (backward
|
|
16086
|
+
* compatible — omitting the field keeps today's exact behaviour). */
|
|
16087
|
+
projection: TrackProjectionSchema.optional()
|
|
16088
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
|
|
16089
|
+
kind: "mutation",
|
|
16090
|
+
auth: "admin"
|
|
16091
|
+
}), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({
|
|
16092
|
+
deviceId: number(),
|
|
16093
|
+
since: number().optional(),
|
|
16094
|
+
until: number().optional(),
|
|
16095
|
+
kinds: array(string()).optional(),
|
|
16096
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
16097
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
15964
16098
|
deviceId: number(),
|
|
15965
16099
|
since: number(),
|
|
15966
16100
|
until: number(),
|
|
@@ -19222,7 +19356,12 @@ var RecordingStorageUsageSchema = object({
|
|
|
19222
19356
|
/**
|
|
19223
19357
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
19224
19358
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
19225
|
-
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
19359
|
+
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
19360
|
+
* and the backward covered edge `prevEndMs` (exclusive end of the nearest
|
|
19361
|
+
* footage behind the epoch; `null` when none — optional so older providers
|
|
19362
|
+
* that omit it stay valid). `prevEndMs` lets a backward frame-step hop the
|
|
19363
|
+
* small inter-segment cracks (durMs under-covers the span to the next
|
|
19364
|
+
* startMs by ~11-17 ms) instead of no-opping at a segment head.
|
|
19226
19365
|
*/
|
|
19227
19366
|
var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
19228
19367
|
kind: literal("segment"),
|
|
@@ -19231,7 +19370,8 @@ var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
|
19231
19370
|
bytes: number()
|
|
19232
19371
|
}), object({
|
|
19233
19372
|
kind: literal("gap"),
|
|
19234
|
-
nearestEdgeMs: number().nullable()
|
|
19373
|
+
nearestEdgeMs: number().nullable(),
|
|
19374
|
+
prevEndMs: number().nullable().optional()
|
|
19235
19375
|
})]);
|
|
19236
19376
|
/** Raw bytes of one finalized footage segment (read off disk on the recording node). */
|
|
19237
19377
|
var ReadSegmentBytesResultSchema = object({ data: _instanceof(Uint8Array) });
|
|
@@ -20800,6 +20940,12 @@ Object.freeze({
|
|
|
20800
20940
|
addonId: null,
|
|
20801
20941
|
access: "view"
|
|
20802
20942
|
},
|
|
20943
|
+
"deviceManager.getLinkedDevices": {
|
|
20944
|
+
capName: "device-manager",
|
|
20945
|
+
capScope: "system",
|
|
20946
|
+
addonId: null,
|
|
20947
|
+
access: "view"
|
|
20948
|
+
},
|
|
20803
20949
|
"deviceManager.getRoleDisplayDefaults": {
|
|
20804
20950
|
capName: "device-manager",
|
|
20805
20951
|
capScope: "system",
|
|
@@ -22354,6 +22500,12 @@ Object.freeze({
|
|
|
22354
22500
|
addonId: null,
|
|
22355
22501
|
access: "view"
|
|
22356
22502
|
},
|
|
22503
|
+
"pipelineAnalytics.getSensorEvents": {
|
|
22504
|
+
capName: "pipeline-analytics",
|
|
22505
|
+
capScope: "device",
|
|
22506
|
+
addonId: null,
|
|
22507
|
+
access: "view"
|
|
22508
|
+
},
|
|
22357
22509
|
"pipelineAnalytics.getTrack": {
|
|
22358
22510
|
capName: "pipeline-analytics",
|
|
22359
22511
|
capScope: "device",
|
|
@@ -22366,6 +22518,18 @@ Object.freeze({
|
|
|
22366
22518
|
addonId: null,
|
|
22367
22519
|
access: "view"
|
|
22368
22520
|
},
|
|
22521
|
+
"pipelineAnalytics.listEventKinds": {
|
|
22522
|
+
capName: "pipeline-analytics",
|
|
22523
|
+
capScope: "device",
|
|
22524
|
+
addonId: null,
|
|
22525
|
+
access: "view"
|
|
22526
|
+
},
|
|
22527
|
+
"pipelineAnalytics.listRecentTracks": {
|
|
22528
|
+
capName: "pipeline-analytics",
|
|
22529
|
+
capScope: "device",
|
|
22530
|
+
addonId: null,
|
|
22531
|
+
access: "view"
|
|
22532
|
+
},
|
|
22369
22533
|
"pipelineAnalytics.listTracks": {
|
|
22370
22534
|
capName: "pipeline-analytics",
|
|
22371
22535
|
capScope: "device",
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
5
|
+
const require_dist = require("../dist-j2Tcnvk4.js");
|
|
6
6
|
let node_child_process = require("node:child_process");
|
|
7
7
|
let node_util = require("node:util");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as EventCategory, n as networkAccessCapability, r as BaseAddon } from "../dist-
|
|
1
|
+
import { i as EventCategory, n as networkAccessCapability, r as BaseAddon } from "../dist-4pXP3j1Q.mjs";
|
|
2
2
|
import { execFile } from "node:child_process";
|
|
3
3
|
import { promisify } from "node:util";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-tailscale",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.24",
|
|
4
4
|
"description": "Tailscale bundle for CamStack — joins the host to a tailnet (client) and exposes the hub via Serve/Funnel (ingress). Multi-entry npm package shipping 2 addons under a single bundle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|