camstack 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.
@@ -14522,7 +14522,7 @@ function date4(params) {
14522
14522
  // ../../node_modules/zod/v4/classic/external.js
14523
14523
  config(en_default());
14524
14524
 
14525
- // ../types/dist/sleep-DJaTV2D7.mjs
14525
+ // ../types/dist/sleep-BC9Yqte7.mjs
14526
14526
  var WELL_KNOWN_TABS = [
14527
14527
  {
14528
14528
  id: "overview",
@@ -15132,6 +15132,12 @@ function method(input, output, options) {
15132
15132
  timeoutMs: options?.timeoutMs
15133
15133
  };
15134
15134
  }
15135
+ function systemMethod(input, output, options) {
15136
+ return {
15137
+ ...method(input, output, options),
15138
+ systemOnly: true
15139
+ };
15140
+ }
15135
15141
  function event(data) {
15136
15142
  return { data };
15137
15143
  }
@@ -19232,6 +19238,7 @@ var PipelineAddonSchemaSchema = external_exports.object({
19232
19238
  defaultModelId: external_exports.string(),
19233
19239
  defaultModelIdByFormat: external_exports.record(external_exports.string(), external_exports.string()).optional(),
19234
19240
  enabledByDefault: external_exports.boolean().optional(),
19241
+ backfillIntoExistingOverrides: external_exports.boolean().optional(),
19235
19242
  defaultConfidence: external_exports.number(),
19236
19243
  group: external_exports.string().optional(),
19237
19244
  configSchema: external_exports.array(ConfigFieldBridge).readonly().optional()
@@ -19671,6 +19678,18 @@ var zonesCapability = {
19671
19678
  */
19672
19679
  runtimeState: external_exports.object({ zones: external_exports.array(ZoneSchema).readonly() })
19673
19680
  };
19681
+ var NativeCropBboxSchema = external_exports.object({
19682
+ x: external_exports.number(),
19683
+ y: external_exports.number(),
19684
+ w: external_exports.number(),
19685
+ h: external_exports.number()
19686
+ });
19687
+ var NativeCropResultSchema = external_exports.object({
19688
+ /** Packed rgb (24-bit) pixels of the crop. */
19689
+ bytes: external_exports.instanceof(Uint8Array),
19690
+ width: external_exports.number().int().positive(),
19691
+ height: external_exports.number().int().positive()
19692
+ });
19674
19693
  var motionCooldownMsField = {
19675
19694
  min: 0,
19676
19695
  max: 6e4,
@@ -19996,7 +20015,22 @@ var pipelineRunnerCapability = {
19996
20015
  /** All per-camera metrics in one round-trip. */
19997
20016
  getAllCameraMetrics: method(external_exports.void(), external_exports.array(CameraMetricsWithDeviceIdSchema).readonly()),
19998
20017
  /** List the deviceIds currently attached to this runner. */
19999
- getLocalCameras: method(external_exports.void(), external_exports.array(external_exports.number()).readonly())
20018
+ getLocalCameras: method(external_exports.void(), external_exports.array(external_exports.number()).readonly()),
20019
+ /**
20020
+ * Best-effort NATIVE-resolution crop of a retention-ring frame. Given the
20021
+ * `FrameHandle` that rode an inference-result event and a normalized `bbox`,
20022
+ * the runner asks the decode worker still holding that frame's NATIVE
20023
+ * surface to GPU/CPU-crop ONLY the ROI at native res and download just the
20024
+ * crop. Returns `null` on a miss (handle not registered, or the worker's
20025
+ * tiny native-retention ring already evicted the frame) — the caller falls
20026
+ * back to a detection-frame crop. Routed to the frame's owning node by
20027
+ * `handle.nodeId`; NEVER ships a full native frame.
20028
+ */
20029
+ getNativeCrop: method(external_exports.object({
20030
+ handle: FrameHandleSchema,
20031
+ bbox: NativeCropBboxSchema,
20032
+ maxWidth: external_exports.number().int().positive().optional()
20033
+ }), NativeCropResultSchema.nullable())
20000
20034
  }
20001
20035
  };
20002
20036
  var MotionStatusSchema = external_exports.object({
@@ -24985,7 +25019,17 @@ var TrackSchema = external_exports.object({
24985
25019
  /** Cumulative normalized distance travelled (0..1 units = full frame width). */
24986
25020
  totalDistance: external_exports.number(),
24987
25021
  state: TrackStateSchema,
24988
- active: external_exports.boolean()
25022
+ active: external_exports.boolean(),
25023
+ /** Deterministic key-event importance score in [0,1] (server-computed at
25024
+ * track expiry, recomputed on late label). Absent on legacy rows written
25025
+ * before scoring shipped — consumers degrade to absence / compute-on-read. */
25026
+ importance: external_exports.number().optional(),
25027
+ /** Id of the track's highest-confidence ObjectEvent (its representative
25028
+ * "best" frame). Absent when the track produced no object events. */
25029
+ bestEventId: external_exports.string().optional(),
25030
+ /** Tag of the importance sub-signal that dominated the score
25031
+ * (identity|dwell|proximity|class|confidence|travel|zone). */
25032
+ importanceReason: external_exports.string().optional()
24989
25033
  });
24990
25034
  var BaseEventFields = {
24991
25035
  id: external_exports.string(),
@@ -25042,8 +25086,18 @@ var ObjectEventSchema = external_exports.object({
25042
25086
  frameHeight: external_exports.number().optional(),
25043
25087
  /** MediaStore key for the crop attached to this event (if any). */
25044
25088
  mediaKey: external_exports.string().optional(),
25089
+ /** Design B: MediaStore key of the track's native-resolution key frame (the
25090
+ * best-detection full frame). Resolve via the event-media data-plane
25091
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
25092
+ * draws `bbox` over the native frame. Absent on legacy rows / non-decoded
25093
+ * sources — consumers fall back to `mediaKey` (the tight crop). */
25094
+ keyFrameMediaKey: external_exports.string().optional(),
25045
25095
  /** Populated by B5 (recording playback URL for this event). */
25046
- mediaUrl: external_exports.string().optional()
25096
+ mediaUrl: external_exports.string().optional(),
25097
+ /** The parent track's key-event importance [0,1], propagated to every object
25098
+ * event of the track (so an event row can be sorted by importance without a
25099
+ * track join). Absent on legacy rows / before the track was scored. */
25100
+ importance: external_exports.number().optional()
25047
25101
  });
25048
25102
  var AudioEventSchema = external_exports.object({
25049
25103
  ...BaseEventFields,
@@ -25067,7 +25121,8 @@ var MediaFileKindEnum = external_exports.enum([
25067
25121
  "fullFrame",
25068
25122
  "fullFrameBoxed",
25069
25123
  "faceCrop",
25070
- "plateCrop"
25124
+ "plateCrop",
25125
+ "keyFrame"
25071
25126
  ]);
25072
25127
  var MediaFileSchema = external_exports.object({
25073
25128
  key: external_exports.string(),
@@ -25088,6 +25143,32 @@ var DeviceEventQueryInput = external_exports.object({
25088
25143
  projection: external_exports.enum(["full", "slim"]).optional()
25089
25144
  });
25090
25145
  var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: external_exports.string().optional() });
25146
+ var KeyEventQueryInput = external_exports.object({
25147
+ deviceId: external_exports.number(),
25148
+ /** Window lower bound (track firstSeen ≥ since). */
25149
+ since: external_exports.number(),
25150
+ /** Window upper bound (track firstSeen ≤ until). */
25151
+ until: external_exports.number(),
25152
+ limit: external_exports.number().int().min(1).max(200).default(50),
25153
+ /** Drop tracks scoring below this importance. */
25154
+ minImportance: external_exports.number().min(0).max(1).optional(),
25155
+ /** Restrict to a single class (e.g. 'person'). */
25156
+ classFilter: external_exports.string().optional()
25157
+ });
25158
+ var KeyEventSchema = external_exports.object({
25159
+ /** The representative event id (the track's best ObjectEvent, else its trackId). */
25160
+ id: external_exports.string(),
25161
+ trackId: external_exports.string(),
25162
+ /** Track start time (firstSeen). */
25163
+ timestamp: external_exports.number(),
25164
+ className: external_exports.string(),
25165
+ label: external_exports.string().optional(),
25166
+ importance: external_exports.number(),
25167
+ /** Highest-confidence ObjectEvent id for the track (empty when none). */
25168
+ bestEventId: external_exports.string(),
25169
+ /** Track lifetime in ms (lastSeen - firstSeen). */
25170
+ windowMs: external_exports.number().optional()
25171
+ });
25091
25172
  var TrackedDetectionSchema = external_exports.object({
25092
25173
  trackId: external_exports.string(),
25093
25174
  className: external_exports.string(),
@@ -25136,6 +25217,15 @@ var pipelineAnalyticsCapability = {
25136
25217
  getMotionEvents: method(DeviceEventQueryInput, external_exports.array(MotionEventSchema).readonly()),
25137
25218
  getObjectEvents: method(ObjectEventQueryInput, external_exports.array(ObjectEventSchema).readonly()),
25138
25219
  getAudioEvents: method(DeviceEventQueryInput, external_exports.array(AudioEventSchema).readonly()),
25220
+ /**
25221
+ * Importance-ranked highlights for a device+window. Queries completed
25222
+ * tracks by (deviceId, firstSeen ∈ [since,until]), scores each (or reuses
25223
+ * the persisted score), filters by minImportance/classFilter, orders by
25224
+ * importance desc, and returns up to `limit` compact key events mapped to
25225
+ * each track's best event. Legacy tracks lacking a persisted score are
25226
+ * scored on-read (no write). Degrades to `[]` on error.
25227
+ */
25228
+ getKeyEvents: method(KeyEventQueryInput, external_exports.array(KeyEventSchema).readonly()),
25139
25229
  /** Server-side bucketed event counts for the 24-hour timeline.
25140
25230
  * Returns one entry per non-empty bucket; empty buckets are omitted. */
25141
25231
  getEventDensity: method(external_exports.object({
@@ -26102,7 +26192,20 @@ var snapshotCapability = {
26102
26192
  invalidateCache: method(external_exports.object({ deviceId: external_exports.number() }), external_exports.void(), {
26103
26193
  kind: "mutation",
26104
26194
  auth: "admin"
26105
- })
26195
+ }),
26196
+ /**
26197
+ * Cache-only batch overview — answers from the wrapper's in-memory cache in
26198
+ * O(n) and NEVER triggers a capture. Lets a grid skip requesting images for
26199
+ * devices that never produced a frame, and gives it an ETag per device for
26200
+ * conditional (304-able) image fetches. `lastCapturedAt`/`cacheAgeMs`/`etag`
26201
+ * are null for a device with no cached frame.
26202
+ */
26203
+ getSnapshotOverview: systemMethod(external_exports.object({ deviceIds: external_exports.array(external_exports.number()).min(1).max(200) }), external_exports.array(external_exports.object({
26204
+ deviceId: external_exports.number(),
26205
+ lastCapturedAt: external_exports.number().nullable(),
26206
+ cacheAgeMs: external_exports.number().nullable(),
26207
+ etag: external_exports.string().nullable()
26208
+ })))
26106
26209
  },
26107
26210
  status: {
26108
26211
  schema: SnapshotStatusSchema,
@@ -27500,7 +27603,17 @@ var FaceInfoSchema = external_exports.object({
27500
27603
  recognizedIdentityId: external_exports.string().optional(),
27501
27604
  identityName: external_exports.string().optional(),
27502
27605
  assigned: external_exports.boolean(),
27503
- base64: external_exports.string().optional()
27606
+ base64: external_exports.string().optional(),
27607
+ /** Design B: the face bbox (pixel space) on the key frame — lets a detail
27608
+ * view draw the box over the native `keyFrameMediaKey` frame. Absent on
27609
+ * legacy rows written before design B. */
27610
+ faceBbox: BoundingBoxSchema.optional(),
27611
+ /** Design B: MediaStore key of the track's native-resolution key frame.
27612
+ * Fetch the native JPEG via the event-media data-plane
27613
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
27614
+ * track produced no key frame (e.g. native/onboard source) — the UI falls
27615
+ * back to the inline `base64` face crop. */
27616
+ keyFrameMediaKey: external_exports.string().optional()
27504
27617
  });
27505
27618
  var FaceFilterEnum = external_exports.enum([
27506
27619
  "unassigned",
@@ -31888,6 +32001,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
31888
32001
  addonId: null,
31889
32002
  access: "view"
31890
32003
  },
32004
+ "pipelineAnalytics.getKeyEvents": {
32005
+ capName: "pipeline-analytics",
32006
+ capScope: "device",
32007
+ addonId: null,
32008
+ access: "view"
32009
+ },
31891
32010
  "pipelineAnalytics.getMotionEvents": {
31892
32011
  capName: "pipeline-analytics",
31893
32012
  capScope: "device",
@@ -32416,6 +32535,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
32416
32535
  addonId: null,
32417
32536
  access: "view"
32418
32537
  },
32538
+ "pipelineRunner.getNativeCrop": {
32539
+ capName: "pipeline-runner",
32540
+ capScope: "system",
32541
+ addonId: null,
32542
+ access: "view"
32543
+ },
32419
32544
  "pipelineRunner.reportMotion": {
32420
32545
  capName: "pipeline-runner",
32421
32546
  capScope: "system",
@@ -32782,6 +32907,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
32782
32907
  addonId: null,
32783
32908
  access: "view"
32784
32909
  },
32910
+ "snapshot.getSnapshotOverview": {
32911
+ capName: "snapshot",
32912
+ capScope: "device",
32913
+ addonId: null,
32914
+ access: "view"
32915
+ },
32785
32916
  "snapshot.invalidateCache": {
32786
32917
  capName: "snapshot",
32787
32918
  capScope: "device",
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runDiscover
4
- } from "./chunk-ODEV2JIB.js";
4
+ } from "./chunk-R6QWXRMA.js";
5
5
  import "./chunk-K3NQKI34.js";
6
6
 
7
7
  // src/cli.ts
@@ -1079,7 +1079,7 @@ function isUnknown(_value) {
1079
1079
  return true;
1080
1080
  }
1081
1081
  async function resolveServerInteractive(presetNamespace) {
1082
- const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-VNCOKFC2.js");
1082
+ const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-LJUQ34P5.js");
1083
1083
  if (presetNamespace) {
1084
1084
  const spinner4 = clack.spinner();
1085
1085
  spinner4.start(`Discovering hub on LAN (namespace "${presetNamespace}")`);
@@ -5,7 +5,7 @@ import {
5
5
  filterHubNodes,
6
6
  resolveHubFromDiscovered,
7
7
  runDiscover
8
- } from "./chunk-ODEV2JIB.js";
8
+ } from "./chunk-R6QWXRMA.js";
9
9
  import "./chunk-K3NQKI34.js";
10
10
  export {
11
11
  DEFAULT_HUB_HTTPS_PORT,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstack",
3
- "version": "1.1.23",
3
+ "version": "1.1.24",
4
4
  "description": "CLI tool for managing and running CamStack server",
5
5
  "keywords": [
6
6
  "camstack",