@camstack/addon-provider-reolink 1.2.62 → 1.2.65

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
@@ -14505,6 +14505,50 @@ var NodeProcessSchema = object({
14505
14505
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
14506
14506
  uptimeSec: number()
14507
14507
  });
14508
+ /**
14509
+ * One retained container-memory reading.
14510
+ *
14511
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
14512
+ * a second clock: that is what makes "processes sum to X, container says Y"
14513
+ * subtractable per point rather than an eyeballed comparison of two series
14514
+ * sampled at different instants.
14515
+ *
14516
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
14517
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
14518
+ * never coexisted, and a mean would smear away the peak this exists to find.
14519
+ */
14520
+ var ContainerMemoryPointSchema = object({
14521
+ /** Which hierarchy answered, so a reading is never ambiguous. */
14522
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
14523
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
14524
+ currentBytes: number(),
14525
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
14526
+ limitBytes: number().nullable(),
14527
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
14528
+ anonBytes: number().nullable(),
14529
+ /** Page cache. Charged to the cgroup, owned by no process. */
14530
+ fileBytes: number().nullable(),
14531
+ /**
14532
+ * Shared memory — and the field that explained the largest single surprise.
14533
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
14534
+ * hardware-decode session holding DRM objects is charged HERE and appears
14535
+ * nowhere in a `ps` scan.
14536
+ */
14537
+ shmemBytes: number().nullable(),
14538
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
14539
+ slabBytes: number().nullable(),
14540
+ /**
14541
+ * Shrinkable i915 GEM object bytes, from debugfs.
14542
+ *
14543
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
14544
+ * component of `currentBytes` and must not be subtracted from it; it says
14545
+ * what put the shmem there, where `shmemBytes` only says how much.
14546
+ *
14547
+ * `null` wherever debugfs is not mounted — which is inside every camstack
14548
+ * container today — and on any node with no Intel GPU.
14549
+ */
14550
+ gpuShmemBytes: number().nullable()
14551
+ }).extend({ atMs: number() });
14508
14552
  var DumpHeapSnapshotInputSchema = object({
14509
14553
  /** The addon whose runner should dump a heap snapshot. */
14510
14554
  addonId: string() });
@@ -14568,6 +14612,21 @@ var NodeLoadSeriesSchema = object({
14568
14612
  /** One entry per function seen in the window, heaviest-first. */
14569
14613
  series: array(LoadFunctionSeriesSchema).readonly(),
14570
14614
  /**
14615
+ * The CONTAINER's memory over the same window, oldest-first.
14616
+ *
14617
+ * Sits next to `series` rather than in a method of its own because the whole
14618
+ * question is a subtraction: the per-process rows in `series` sum to one
14619
+ * number and this one is another, and an operator who has to issue two calls
14620
+ * to compare them will compare two different instants. Same reader, same
14621
+ * `sinceMs`, same `bucketMs`, same timestamps.
14622
+ *
14623
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14624
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14625
+ * points at all. A zero here would be indistinguishable from a healthy
14626
+ * container and is precisely the lie this field exists to avoid.
14627
+ */
14628
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14629
+ /**
14571
14630
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
14572
14631
  * reduction was needed — so a caller can always say what one point covers
14573
14632
  * without having to know whether it was reduced.
@@ -25610,6 +25669,33 @@ var intercomCapability = {
25610
25669
  deviceNative: true,
25611
25670
  mode: "singleton",
25612
25671
  deviceTypes: [DeviceType.Camera],
25672
+ /**
25673
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25674
+ *
25675
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25676
+ * cap has no configuration surface at all: all six methods open, feed and
25677
+ * close one live audio session against one `deviceId`. That is the same
25678
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25679
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25680
+ * `admin` because they change what the device IS.
25681
+ *
25682
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25683
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25684
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25685
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25686
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25687
+ * camera 7.
25688
+ *
25689
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25690
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25691
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25692
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25693
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25694
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25695
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25696
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25697
+ * preset promises a cap no row of that preset can reach.
25698
+ */
25613
25699
  methods: {
25614
25700
  /**
25615
25701
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25622,7 +25708,7 @@ var intercomCapability = {
25622
25708
  sdpOffer: string()
25623
25709
  }), {
25624
25710
  kind: "mutation",
25625
- auth: "admin"
25711
+ auth: "protected"
25626
25712
  }),
25627
25713
  handleAnswer: method(object({
25628
25714
  deviceId: number(),
@@ -25630,7 +25716,7 @@ var intercomCapability = {
25630
25716
  sdpAnswer: string()
25631
25717
  }), _void(), {
25632
25718
  kind: "mutation",
25633
- auth: "admin"
25719
+ auth: "protected"
25634
25720
  }),
25635
25721
  /** Close explicitly. Server also auto-closes on 30s idle. */
25636
25722
  stopSession: method(object({
@@ -25638,7 +25724,7 @@ var intercomCapability = {
25638
25724
  sessionId: string()
25639
25725
  }), _void(), {
25640
25726
  kind: "mutation",
25641
- auth: "admin"
25727
+ auth: "protected"
25642
25728
  }),
25643
25729
  /**
25644
25730
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25651,7 +25737,7 @@ var intercomCapability = {
25651
25737
  */
25652
25738
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25653
25739
  kind: "mutation",
25654
- auth: "admin"
25740
+ auth: "protected"
25655
25741
  }),
25656
25742
  /**
25657
25743
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25686,12 +25772,12 @@ var intercomCapability = {
25686
25772
  sequenceNumber: number().int()
25687
25773
  }), object({ accepted: boolean() }), {
25688
25774
  kind: "mutation",
25689
- auth: "admin"
25775
+ auth: "protected"
25690
25776
  }),
25691
25777
  /** Close the raw-PCM talk session. Idempotent. */
25692
25778
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25693
25779
  kind: "mutation",
25694
- auth: "admin"
25780
+ auth: "protected"
25695
25781
  })
25696
25782
  },
25697
25783
  events: { onStatusChanged: { data: object({
@@ -28454,10 +28540,10 @@ var rebootCapability = {
28454
28540
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
28455
28541
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
28456
28542
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
28457
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
28458
- * annotations that are not exposed here and must not be treated as an event
28459
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
28460
- * (`interfaces/recording-config.ts`).
28543
+ * rows) and are the ONLY event surface the recorder has none. The in-RAM
28544
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
28545
+ * ever read them. Event<->footage joins are by time, padded with the shared
28546
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
28461
28547
  */
28462
28548
  var RecordingStatusSchema = object({
28463
28549
  deviceId: number(),
package/dist/addon.mjs CHANGED
@@ -14500,6 +14500,50 @@ var NodeProcessSchema = object({
14500
14500
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
14501
14501
  uptimeSec: number()
14502
14502
  });
14503
+ /**
14504
+ * One retained container-memory reading.
14505
+ *
14506
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
14507
+ * a second clock: that is what makes "processes sum to X, container says Y"
14508
+ * subtractable per point rather than an eyeballed comparison of two series
14509
+ * sampled at different instants.
14510
+ *
14511
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
14512
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
14513
+ * never coexisted, and a mean would smear away the peak this exists to find.
14514
+ */
14515
+ var ContainerMemoryPointSchema = object({
14516
+ /** Which hierarchy answered, so a reading is never ambiguous. */
14517
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
14518
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
14519
+ currentBytes: number(),
14520
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
14521
+ limitBytes: number().nullable(),
14522
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
14523
+ anonBytes: number().nullable(),
14524
+ /** Page cache. Charged to the cgroup, owned by no process. */
14525
+ fileBytes: number().nullable(),
14526
+ /**
14527
+ * Shared memory — and the field that explained the largest single surprise.
14528
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
14529
+ * hardware-decode session holding DRM objects is charged HERE and appears
14530
+ * nowhere in a `ps` scan.
14531
+ */
14532
+ shmemBytes: number().nullable(),
14533
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
14534
+ slabBytes: number().nullable(),
14535
+ /**
14536
+ * Shrinkable i915 GEM object bytes, from debugfs.
14537
+ *
14538
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
14539
+ * component of `currentBytes` and must not be subtracted from it; it says
14540
+ * what put the shmem there, where `shmemBytes` only says how much.
14541
+ *
14542
+ * `null` wherever debugfs is not mounted — which is inside every camstack
14543
+ * container today — and on any node with no Intel GPU.
14544
+ */
14545
+ gpuShmemBytes: number().nullable()
14546
+ }).extend({ atMs: number() });
14503
14547
  var DumpHeapSnapshotInputSchema = object({
14504
14548
  /** The addon whose runner should dump a heap snapshot. */
14505
14549
  addonId: string() });
@@ -14563,6 +14607,21 @@ var NodeLoadSeriesSchema = object({
14563
14607
  /** One entry per function seen in the window, heaviest-first. */
14564
14608
  series: array(LoadFunctionSeriesSchema).readonly(),
14565
14609
  /**
14610
+ * The CONTAINER's memory over the same window, oldest-first.
14611
+ *
14612
+ * Sits next to `series` rather than in a method of its own because the whole
14613
+ * question is a subtraction: the per-process rows in `series` sum to one
14614
+ * number and this one is another, and an operator who has to issue two calls
14615
+ * to compare them will compare two different instants. Same reader, same
14616
+ * `sinceMs`, same `bucketMs`, same timestamps.
14617
+ *
14618
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14619
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14620
+ * points at all. A zero here would be indistinguishable from a healthy
14621
+ * container and is precisely the lie this field exists to avoid.
14622
+ */
14623
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14624
+ /**
14566
14625
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
14567
14626
  * reduction was needed — so a caller can always say what one point covers
14568
14627
  * without having to know whether it was reduced.
@@ -25605,6 +25664,33 @@ var intercomCapability = {
25605
25664
  deviceNative: true,
25606
25665
  mode: "singleton",
25607
25666
  deviceTypes: [DeviceType.Camera],
25667
+ /**
25668
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25669
+ *
25670
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25671
+ * cap has no configuration surface at all: all six methods open, feed and
25672
+ * close one live audio session against one `deviceId`. That is the same
25673
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25674
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25675
+ * `admin` because they change what the device IS.
25676
+ *
25677
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25678
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25679
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25680
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25681
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25682
+ * camera 7.
25683
+ *
25684
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25685
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25686
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25687
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25688
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25689
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25690
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25691
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25692
+ * preset promises a cap no row of that preset can reach.
25693
+ */
25608
25694
  methods: {
25609
25695
  /**
25610
25696
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25617,7 +25703,7 @@ var intercomCapability = {
25617
25703
  sdpOffer: string()
25618
25704
  }), {
25619
25705
  kind: "mutation",
25620
- auth: "admin"
25706
+ auth: "protected"
25621
25707
  }),
25622
25708
  handleAnswer: method(object({
25623
25709
  deviceId: number(),
@@ -25625,7 +25711,7 @@ var intercomCapability = {
25625
25711
  sdpAnswer: string()
25626
25712
  }), _void(), {
25627
25713
  kind: "mutation",
25628
- auth: "admin"
25714
+ auth: "protected"
25629
25715
  }),
25630
25716
  /** Close explicitly. Server also auto-closes on 30s idle. */
25631
25717
  stopSession: method(object({
@@ -25633,7 +25719,7 @@ var intercomCapability = {
25633
25719
  sessionId: string()
25634
25720
  }), _void(), {
25635
25721
  kind: "mutation",
25636
- auth: "admin"
25722
+ auth: "protected"
25637
25723
  }),
25638
25724
  /**
25639
25725
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25646,7 +25732,7 @@ var intercomCapability = {
25646
25732
  */
25647
25733
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25648
25734
  kind: "mutation",
25649
- auth: "admin"
25735
+ auth: "protected"
25650
25736
  }),
25651
25737
  /**
25652
25738
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25681,12 +25767,12 @@ var intercomCapability = {
25681
25767
  sequenceNumber: number().int()
25682
25768
  }), object({ accepted: boolean() }), {
25683
25769
  kind: "mutation",
25684
- auth: "admin"
25770
+ auth: "protected"
25685
25771
  }),
25686
25772
  /** Close the raw-PCM talk session. Idempotent. */
25687
25773
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25688
25774
  kind: "mutation",
25689
- auth: "admin"
25775
+ auth: "protected"
25690
25776
  })
25691
25777
  },
25692
25778
  events: { onStatusChanged: { data: object({
@@ -28449,10 +28535,10 @@ var rebootCapability = {
28449
28535
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
28450
28536
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
28451
28537
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
28452
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
28453
- * annotations that are not exposed here and must not be treated as an event
28454
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
28455
- * (`interfaces/recording-config.ts`).
28538
+ * rows) and are the ONLY event surface the recorder has none. The in-RAM
28539
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
28540
+ * ever read them. Event<->footage joins are by time, padded with the shared
28541
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
28456
28542
  */
28457
28543
  var RecordingStatusSchema = object({
28458
28544
  deviceId: number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-reolink",
3
- "version": "1.2.62",
3
+ "version": "1.2.65",
4
4
  "description": "Reolink camera device provider addon for CamStack — native Baichuan protocol",
5
5
  "keywords": [
6
6
  "camstack",