@camstack/addon-provider-rtsp 1.2.39 → 1.2.42

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
@@ -13938,6 +13938,50 @@ var NodeProcessSchema = object({
13938
13938
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
13939
13939
  uptimeSec: number()
13940
13940
  });
13941
+ /**
13942
+ * One retained container-memory reading.
13943
+ *
13944
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
13945
+ * a second clock: that is what makes "processes sum to X, container says Y"
13946
+ * subtractable per point rather than an eyeballed comparison of two series
13947
+ * sampled at different instants.
13948
+ *
13949
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
13950
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
13951
+ * never coexisted, and a mean would smear away the peak this exists to find.
13952
+ */
13953
+ var ContainerMemoryPointSchema = object({
13954
+ /** Which hierarchy answered, so a reading is never ambiguous. */
13955
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
13956
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
13957
+ currentBytes: number(),
13958
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
13959
+ limitBytes: number().nullable(),
13960
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
13961
+ anonBytes: number().nullable(),
13962
+ /** Page cache. Charged to the cgroup, owned by no process. */
13963
+ fileBytes: number().nullable(),
13964
+ /**
13965
+ * Shared memory — and the field that explained the largest single surprise.
13966
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
13967
+ * hardware-decode session holding DRM objects is charged HERE and appears
13968
+ * nowhere in a `ps` scan.
13969
+ */
13970
+ shmemBytes: number().nullable(),
13971
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
13972
+ slabBytes: number().nullable(),
13973
+ /**
13974
+ * Shrinkable i915 GEM object bytes, from debugfs.
13975
+ *
13976
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
13977
+ * component of `currentBytes` and must not be subtracted from it; it says
13978
+ * what put the shmem there, where `shmemBytes` only says how much.
13979
+ *
13980
+ * `null` wherever debugfs is not mounted — which is inside every camstack
13981
+ * container today — and on any node with no Intel GPU.
13982
+ */
13983
+ gpuShmemBytes: number().nullable()
13984
+ }).extend({ atMs: number() });
13941
13985
  var DumpHeapSnapshotInputSchema = object({
13942
13986
  /** The addon whose runner should dump a heap snapshot. */
13943
13987
  addonId: string() });
@@ -14001,6 +14045,21 @@ var NodeLoadSeriesSchema = object({
14001
14045
  /** One entry per function seen in the window, heaviest-first. */
14002
14046
  series: array(LoadFunctionSeriesSchema).readonly(),
14003
14047
  /**
14048
+ * The CONTAINER's memory over the same window, oldest-first.
14049
+ *
14050
+ * Sits next to `series` rather than in a method of its own because the whole
14051
+ * question is a subtraction: the per-process rows in `series` sum to one
14052
+ * number and this one is another, and an operator who has to issue two calls
14053
+ * to compare them will compare two different instants. Same reader, same
14054
+ * `sinceMs`, same `bucketMs`, same timestamps.
14055
+ *
14056
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14057
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14058
+ * points at all. A zero here would be indistinguishable from a healthy
14059
+ * container and is precisely the lie this field exists to avoid.
14060
+ */
14061
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14062
+ /**
14004
14063
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
14005
14064
  * reduction was needed — so a caller can always say what one point covers
14006
14065
  * without having to know whether it was reduced.
@@ -25051,6 +25110,33 @@ var intercomCapability = {
25051
25110
  deviceNative: true,
25052
25111
  mode: "singleton",
25053
25112
  deviceTypes: [DeviceType.Camera],
25113
+ /**
25114
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25115
+ *
25116
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25117
+ * cap has no configuration surface at all: all six methods open, feed and
25118
+ * close one live audio session against one `deviceId`. That is the same
25119
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25120
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25121
+ * `admin` because they change what the device IS.
25122
+ *
25123
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25124
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25125
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25126
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25127
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25128
+ * camera 7.
25129
+ *
25130
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25131
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25132
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25133
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25134
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25135
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25136
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25137
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25138
+ * preset promises a cap no row of that preset can reach.
25139
+ */
25054
25140
  methods: {
25055
25141
  /**
25056
25142
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25063,7 +25149,7 @@ var intercomCapability = {
25063
25149
  sdpOffer: string()
25064
25150
  }), {
25065
25151
  kind: "mutation",
25066
- auth: "admin"
25152
+ auth: "protected"
25067
25153
  }),
25068
25154
  handleAnswer: method(object({
25069
25155
  deviceId: number(),
@@ -25071,7 +25157,7 @@ var intercomCapability = {
25071
25157
  sdpAnswer: string()
25072
25158
  }), _void(), {
25073
25159
  kind: "mutation",
25074
- auth: "admin"
25160
+ auth: "protected"
25075
25161
  }),
25076
25162
  /** Close explicitly. Server also auto-closes on 30s idle. */
25077
25163
  stopSession: method(object({
@@ -25079,7 +25165,7 @@ var intercomCapability = {
25079
25165
  sessionId: string()
25080
25166
  }), _void(), {
25081
25167
  kind: "mutation",
25082
- auth: "admin"
25168
+ auth: "protected"
25083
25169
  }),
25084
25170
  /**
25085
25171
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25092,7 +25178,7 @@ var intercomCapability = {
25092
25178
  */
25093
25179
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25094
25180
  kind: "mutation",
25095
- auth: "admin"
25181
+ auth: "protected"
25096
25182
  }),
25097
25183
  /**
25098
25184
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25127,12 +25213,12 @@ var intercomCapability = {
25127
25213
  sequenceNumber: number().int()
25128
25214
  }), object({ accepted: boolean() }), {
25129
25215
  kind: "mutation",
25130
- auth: "admin"
25216
+ auth: "protected"
25131
25217
  }),
25132
25218
  /** Close the raw-PCM talk session. Idempotent. */
25133
25219
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25134
25220
  kind: "mutation",
25135
- auth: "admin"
25221
+ auth: "protected"
25136
25222
  })
25137
25223
  },
25138
25224
  events: { onStatusChanged: { data: object({
@@ -27808,10 +27894,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27808
27894
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
27809
27895
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
27810
27896
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
27811
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
27812
- * annotations that are not exposed here and must not be treated as an event
27813
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
27814
- * (`interfaces/recording-config.ts`).
27897
+ * rows) and are the ONLY event surface the recorder has none. The in-RAM
27898
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
27899
+ * ever read them. Event<->footage joins are by time, padded with the shared
27900
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
27815
27901
  */
27816
27902
  var RecordingStatusSchema = object({
27817
27903
  deviceId: number(),
package/dist/addon.mjs CHANGED
@@ -13914,6 +13914,50 @@ var NodeProcessSchema = object({
13914
13914
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
13915
13915
  uptimeSec: number()
13916
13916
  });
13917
+ /**
13918
+ * One retained container-memory reading.
13919
+ *
13920
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
13921
+ * a second clock: that is what makes "processes sum to X, container says Y"
13922
+ * subtractable per point rather than an eyeballed comparison of two series
13923
+ * sampled at different instants.
13924
+ *
13925
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
13926
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
13927
+ * never coexisted, and a mean would smear away the peak this exists to find.
13928
+ */
13929
+ var ContainerMemoryPointSchema = object({
13930
+ /** Which hierarchy answered, so a reading is never ambiguous. */
13931
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
13932
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
13933
+ currentBytes: number(),
13934
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
13935
+ limitBytes: number().nullable(),
13936
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
13937
+ anonBytes: number().nullable(),
13938
+ /** Page cache. Charged to the cgroup, owned by no process. */
13939
+ fileBytes: number().nullable(),
13940
+ /**
13941
+ * Shared memory — and the field that explained the largest single surprise.
13942
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
13943
+ * hardware-decode session holding DRM objects is charged HERE and appears
13944
+ * nowhere in a `ps` scan.
13945
+ */
13946
+ shmemBytes: number().nullable(),
13947
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
13948
+ slabBytes: number().nullable(),
13949
+ /**
13950
+ * Shrinkable i915 GEM object bytes, from debugfs.
13951
+ *
13952
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
13953
+ * component of `currentBytes` and must not be subtracted from it; it says
13954
+ * what put the shmem there, where `shmemBytes` only says how much.
13955
+ *
13956
+ * `null` wherever debugfs is not mounted — which is inside every camstack
13957
+ * container today — and on any node with no Intel GPU.
13958
+ */
13959
+ gpuShmemBytes: number().nullable()
13960
+ }).extend({ atMs: number() });
13917
13961
  var DumpHeapSnapshotInputSchema = object({
13918
13962
  /** The addon whose runner should dump a heap snapshot. */
13919
13963
  addonId: string() });
@@ -13977,6 +14021,21 @@ var NodeLoadSeriesSchema = object({
13977
14021
  /** One entry per function seen in the window, heaviest-first. */
13978
14022
  series: array(LoadFunctionSeriesSchema).readonly(),
13979
14023
  /**
14024
+ * The CONTAINER's memory over the same window, oldest-first.
14025
+ *
14026
+ * Sits next to `series` rather than in a method of its own because the whole
14027
+ * question is a subtraction: the per-process rows in `series` sum to one
14028
+ * number and this one is another, and an operator who has to issue two calls
14029
+ * to compare them will compare two different instants. Same reader, same
14030
+ * `sinceMs`, same `bucketMs`, same timestamps.
14031
+ *
14032
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14033
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14034
+ * points at all. A zero here would be indistinguishable from a healthy
14035
+ * container and is precisely the lie this field exists to avoid.
14036
+ */
14037
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14038
+ /**
13980
14039
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
13981
14040
  * reduction was needed — so a caller can always say what one point covers
13982
14041
  * without having to know whether it was reduced.
@@ -25027,6 +25086,33 @@ var intercomCapability = {
25027
25086
  deviceNative: true,
25028
25087
  mode: "singleton",
25029
25088
  deviceTypes: [DeviceType.Camera],
25089
+ /**
25090
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25091
+ *
25092
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25093
+ * cap has no configuration surface at all: all six methods open, feed and
25094
+ * close one live audio session against one `deviceId`. That is the same
25095
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25096
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25097
+ * `admin` because they change what the device IS.
25098
+ *
25099
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25100
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25101
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25102
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25103
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25104
+ * camera 7.
25105
+ *
25106
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25107
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25108
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25109
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25110
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25111
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25112
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25113
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25114
+ * preset promises a cap no row of that preset can reach.
25115
+ */
25030
25116
  methods: {
25031
25117
  /**
25032
25118
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25039,7 +25125,7 @@ var intercomCapability = {
25039
25125
  sdpOffer: string()
25040
25126
  }), {
25041
25127
  kind: "mutation",
25042
- auth: "admin"
25128
+ auth: "protected"
25043
25129
  }),
25044
25130
  handleAnswer: method(object({
25045
25131
  deviceId: number(),
@@ -25047,7 +25133,7 @@ var intercomCapability = {
25047
25133
  sdpAnswer: string()
25048
25134
  }), _void(), {
25049
25135
  kind: "mutation",
25050
- auth: "admin"
25136
+ auth: "protected"
25051
25137
  }),
25052
25138
  /** Close explicitly. Server also auto-closes on 30s idle. */
25053
25139
  stopSession: method(object({
@@ -25055,7 +25141,7 @@ var intercomCapability = {
25055
25141
  sessionId: string()
25056
25142
  }), _void(), {
25057
25143
  kind: "mutation",
25058
- auth: "admin"
25144
+ auth: "protected"
25059
25145
  }),
25060
25146
  /**
25061
25147
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25068,7 +25154,7 @@ var intercomCapability = {
25068
25154
  */
25069
25155
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25070
25156
  kind: "mutation",
25071
- auth: "admin"
25157
+ auth: "protected"
25072
25158
  }),
25073
25159
  /**
25074
25160
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25103,12 +25189,12 @@ var intercomCapability = {
25103
25189
  sequenceNumber: number().int()
25104
25190
  }), object({ accepted: boolean() }), {
25105
25191
  kind: "mutation",
25106
- auth: "admin"
25192
+ auth: "protected"
25107
25193
  }),
25108
25194
  /** Close the raw-PCM talk session. Idempotent. */
25109
25195
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25110
25196
  kind: "mutation",
25111
- auth: "admin"
25197
+ auth: "protected"
25112
25198
  })
25113
25199
  },
25114
25200
  events: { onStatusChanged: { data: object({
@@ -27784,10 +27870,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27784
27870
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
27785
27871
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
27786
27872
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
27787
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
27788
- * annotations that are not exposed here and must not be treated as an event
27789
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
27790
- * (`interfaces/recording-config.ts`).
27873
+ * rows) and are the ONLY event surface the recorder has none. The in-RAM
27874
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
27875
+ * ever read them. Event<->footage joins are by time, padded with the shared
27876
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
27791
27877
  */
27792
27878
  var RecordingStatusSchema = object({
27793
27879
  deviceId: number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rtsp",
3
- "version": "1.2.39",
3
+ "version": "1.2.42",
4
4
  "description": "Generic RTSP camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",