@camstack/addon-provider-hikvision 1.2.47 → 1.2.50

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 CHANGED
@@ -14189,6 +14189,50 @@ var NodeProcessSchema = object({
14189
14189
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
14190
14190
  uptimeSec: number()
14191
14191
  });
14192
+ /**
14193
+ * One retained container-memory reading.
14194
+ *
14195
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
14196
+ * a second clock: that is what makes "processes sum to X, container says Y"
14197
+ * subtractable per point rather than an eyeballed comparison of two series
14198
+ * sampled at different instants.
14199
+ *
14200
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
14201
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
14202
+ * never coexisted, and a mean would smear away the peak this exists to find.
14203
+ */
14204
+ var ContainerMemoryPointSchema = object({
14205
+ /** Which hierarchy answered, so a reading is never ambiguous. */
14206
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
14207
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
14208
+ currentBytes: number(),
14209
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
14210
+ limitBytes: number().nullable(),
14211
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
14212
+ anonBytes: number().nullable(),
14213
+ /** Page cache. Charged to the cgroup, owned by no process. */
14214
+ fileBytes: number().nullable(),
14215
+ /**
14216
+ * Shared memory — and the field that explained the largest single surprise.
14217
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
14218
+ * hardware-decode session holding DRM objects is charged HERE and appears
14219
+ * nowhere in a `ps` scan.
14220
+ */
14221
+ shmemBytes: number().nullable(),
14222
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
14223
+ slabBytes: number().nullable(),
14224
+ /**
14225
+ * Shrinkable i915 GEM object bytes, from debugfs.
14226
+ *
14227
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
14228
+ * component of `currentBytes` and must not be subtracted from it; it says
14229
+ * what put the shmem there, where `shmemBytes` only says how much.
14230
+ *
14231
+ * `null` wherever debugfs is not mounted — which is inside every camstack
14232
+ * container today — and on any node with no Intel GPU.
14233
+ */
14234
+ gpuShmemBytes: number().nullable()
14235
+ }).extend({ atMs: number() });
14192
14236
  var DumpHeapSnapshotInputSchema = object({
14193
14237
  /** The addon whose runner should dump a heap snapshot. */
14194
14238
  addonId: string() });
@@ -14252,6 +14296,21 @@ var NodeLoadSeriesSchema = object({
14252
14296
  /** One entry per function seen in the window, heaviest-first. */
14253
14297
  series: array(LoadFunctionSeriesSchema).readonly(),
14254
14298
  /**
14299
+ * The CONTAINER's memory over the same window, oldest-first.
14300
+ *
14301
+ * Sits next to `series` rather than in a method of its own because the whole
14302
+ * question is a subtraction: the per-process rows in `series` sum to one
14303
+ * number and this one is another, and an operator who has to issue two calls
14304
+ * to compare them will compare two different instants. Same reader, same
14305
+ * `sinceMs`, same `bucketMs`, same timestamps.
14306
+ *
14307
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14308
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14309
+ * points at all. A zero here would be indistinguishable from a healthy
14310
+ * container and is precisely the lie this field exists to avoid.
14311
+ */
14312
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14313
+ /**
14255
14314
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
14256
14315
  * reduction was needed — so a caller can always say what one point covers
14257
14316
  * without having to know whether it was reduced.
@@ -25294,6 +25353,33 @@ var intercomCapability = {
25294
25353
  deviceNative: true,
25295
25354
  mode: "singleton",
25296
25355
  deviceTypes: [DeviceType.Camera],
25356
+ /**
25357
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25358
+ *
25359
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25360
+ * cap has no configuration surface at all: all six methods open, feed and
25361
+ * close one live audio session against one `deviceId`. That is the same
25362
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25363
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25364
+ * `admin` because they change what the device IS.
25365
+ *
25366
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25367
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25368
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25369
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25370
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25371
+ * camera 7.
25372
+ *
25373
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25374
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25375
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25376
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25377
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25378
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25379
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25380
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25381
+ * preset promises a cap no row of that preset can reach.
25382
+ */
25297
25383
  methods: {
25298
25384
  /**
25299
25385
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25306,7 +25392,7 @@ var intercomCapability = {
25306
25392
  sdpOffer: string()
25307
25393
  }), {
25308
25394
  kind: "mutation",
25309
- auth: "admin"
25395
+ auth: "protected"
25310
25396
  }),
25311
25397
  handleAnswer: method(object({
25312
25398
  deviceId: number(),
@@ -25314,7 +25400,7 @@ var intercomCapability = {
25314
25400
  sdpAnswer: string()
25315
25401
  }), _void(), {
25316
25402
  kind: "mutation",
25317
- auth: "admin"
25403
+ auth: "protected"
25318
25404
  }),
25319
25405
  /** Close explicitly. Server also auto-closes on 30s idle. */
25320
25406
  stopSession: method(object({
@@ -25322,7 +25408,7 @@ var intercomCapability = {
25322
25408
  sessionId: string()
25323
25409
  }), _void(), {
25324
25410
  kind: "mutation",
25325
- auth: "admin"
25411
+ auth: "protected"
25326
25412
  }),
25327
25413
  /**
25328
25414
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25335,7 +25421,7 @@ var intercomCapability = {
25335
25421
  */
25336
25422
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25337
25423
  kind: "mutation",
25338
- auth: "admin"
25424
+ auth: "protected"
25339
25425
  }),
25340
25426
  /**
25341
25427
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25370,12 +25456,12 @@ var intercomCapability = {
25370
25456
  sequenceNumber: number().int()
25371
25457
  }), object({ accepted: boolean() }), {
25372
25458
  kind: "mutation",
25373
- auth: "admin"
25459
+ auth: "protected"
25374
25460
  }),
25375
25461
  /** Close the raw-PCM talk session. Idempotent. */
25376
25462
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25377
25463
  kind: "mutation",
25378
- auth: "admin"
25464
+ auth: "protected"
25379
25465
  })
25380
25466
  },
25381
25467
  events: { onStatusChanged: { data: object({
@@ -28184,10 +28270,10 @@ var rebootCapability = {
28184
28270
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
28185
28271
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
28186
28272
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
28187
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
28188
- * annotations that are not exposed here and must not be treated as an event
28189
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
28190
- * (`interfaces/recording-config.ts`).
28273
+ * rows) and are the ONLY event surface the recorder has none. The in-RAM
28274
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
28275
+ * ever read them. Event<->footage joins are by time, padded with the shared
28276
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
28191
28277
  */
28192
28278
  var RecordingStatusSchema = object({
28193
28279
  deviceId: number(),
package/dist/addon.mjs CHANGED
@@ -14190,6 +14190,50 @@ var NodeProcessSchema = object({
14190
14190
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
14191
14191
  uptimeSec: number()
14192
14192
  });
14193
+ /**
14194
+ * One retained container-memory reading.
14195
+ *
14196
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
14197
+ * a second clock: that is what makes "processes sum to X, container says Y"
14198
+ * subtractable per point rather than an eyeballed comparison of two series
14199
+ * sampled at different instants.
14200
+ *
14201
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
14202
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
14203
+ * never coexisted, and a mean would smear away the peak this exists to find.
14204
+ */
14205
+ var ContainerMemoryPointSchema = object({
14206
+ /** Which hierarchy answered, so a reading is never ambiguous. */
14207
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
14208
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
14209
+ currentBytes: number(),
14210
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
14211
+ limitBytes: number().nullable(),
14212
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
14213
+ anonBytes: number().nullable(),
14214
+ /** Page cache. Charged to the cgroup, owned by no process. */
14215
+ fileBytes: number().nullable(),
14216
+ /**
14217
+ * Shared memory — and the field that explained the largest single surprise.
14218
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
14219
+ * hardware-decode session holding DRM objects is charged HERE and appears
14220
+ * nowhere in a `ps` scan.
14221
+ */
14222
+ shmemBytes: number().nullable(),
14223
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
14224
+ slabBytes: number().nullable(),
14225
+ /**
14226
+ * Shrinkable i915 GEM object bytes, from debugfs.
14227
+ *
14228
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
14229
+ * component of `currentBytes` and must not be subtracted from it; it says
14230
+ * what put the shmem there, where `shmemBytes` only says how much.
14231
+ *
14232
+ * `null` wherever debugfs is not mounted — which is inside every camstack
14233
+ * container today — and on any node with no Intel GPU.
14234
+ */
14235
+ gpuShmemBytes: number().nullable()
14236
+ }).extend({ atMs: number() });
14193
14237
  var DumpHeapSnapshotInputSchema = object({
14194
14238
  /** The addon whose runner should dump a heap snapshot. */
14195
14239
  addonId: string() });
@@ -14253,6 +14297,21 @@ var NodeLoadSeriesSchema = object({
14253
14297
  /** One entry per function seen in the window, heaviest-first. */
14254
14298
  series: array(LoadFunctionSeriesSchema).readonly(),
14255
14299
  /**
14300
+ * The CONTAINER's memory over the same window, oldest-first.
14301
+ *
14302
+ * Sits next to `series` rather than in a method of its own because the whole
14303
+ * question is a subtraction: the per-process rows in `series` sum to one
14304
+ * number and this one is another, and an operator who has to issue two calls
14305
+ * to compare them will compare two different instants. Same reader, same
14306
+ * `sinceMs`, same `bucketMs`, same timestamps.
14307
+ *
14308
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14309
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14310
+ * points at all. A zero here would be indistinguishable from a healthy
14311
+ * container and is precisely the lie this field exists to avoid.
14312
+ */
14313
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14314
+ /**
14256
14315
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
14257
14316
  * reduction was needed — so a caller can always say what one point covers
14258
14317
  * without having to know whether it was reduced.
@@ -25295,6 +25354,33 @@ var intercomCapability = {
25295
25354
  deviceNative: true,
25296
25355
  mode: "singleton",
25297
25356
  deviceTypes: [DeviceType.Camera],
25357
+ /**
25358
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25359
+ *
25360
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25361
+ * cap has no configuration surface at all: all six methods open, feed and
25362
+ * close one live audio session against one `deviceId`. That is the same
25363
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25364
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25365
+ * `admin` because they change what the device IS.
25366
+ *
25367
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25368
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25369
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25370
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25371
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25372
+ * camera 7.
25373
+ *
25374
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25375
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25376
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25377
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25378
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25379
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25380
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25381
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25382
+ * preset promises a cap no row of that preset can reach.
25383
+ */
25298
25384
  methods: {
25299
25385
  /**
25300
25386
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25307,7 +25393,7 @@ var intercomCapability = {
25307
25393
  sdpOffer: string()
25308
25394
  }), {
25309
25395
  kind: "mutation",
25310
- auth: "admin"
25396
+ auth: "protected"
25311
25397
  }),
25312
25398
  handleAnswer: method(object({
25313
25399
  deviceId: number(),
@@ -25315,7 +25401,7 @@ var intercomCapability = {
25315
25401
  sdpAnswer: string()
25316
25402
  }), _void(), {
25317
25403
  kind: "mutation",
25318
- auth: "admin"
25404
+ auth: "protected"
25319
25405
  }),
25320
25406
  /** Close explicitly. Server also auto-closes on 30s idle. */
25321
25407
  stopSession: method(object({
@@ -25323,7 +25409,7 @@ var intercomCapability = {
25323
25409
  sessionId: string()
25324
25410
  }), _void(), {
25325
25411
  kind: "mutation",
25326
- auth: "admin"
25412
+ auth: "protected"
25327
25413
  }),
25328
25414
  /**
25329
25415
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25336,7 +25422,7 @@ var intercomCapability = {
25336
25422
  */
25337
25423
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25338
25424
  kind: "mutation",
25339
- auth: "admin"
25425
+ auth: "protected"
25340
25426
  }),
25341
25427
  /**
25342
25428
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25371,12 +25457,12 @@ var intercomCapability = {
25371
25457
  sequenceNumber: number().int()
25372
25458
  }), object({ accepted: boolean() }), {
25373
25459
  kind: "mutation",
25374
- auth: "admin"
25460
+ auth: "protected"
25375
25461
  }),
25376
25462
  /** Close the raw-PCM talk session. Idempotent. */
25377
25463
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25378
25464
  kind: "mutation",
25379
- auth: "admin"
25465
+ auth: "protected"
25380
25466
  })
25381
25467
  },
25382
25468
  events: { onStatusChanged: { data: object({
@@ -28185,10 +28271,10 @@ var rebootCapability = {
28185
28271
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
28186
28272
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
28187
28273
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
28188
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
28189
- * annotations that are not exposed here and must not be treated as an event
28190
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
28191
- * (`interfaces/recording-config.ts`).
28274
+ * rows) and are the ONLY event surface the recorder has none. The in-RAM
28275
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
28276
+ * ever read them. Event<->footage joins are by time, padded with the shared
28277
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
28192
28278
  */
28193
28279
  var RecordingStatusSchema = object({
28194
28280
  deviceId: number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.2.47",
3
+ "version": "1.2.50",
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",