@camstack/addon-provider-velux 0.2.39 → 0.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
@@ -13882,6 +13882,50 @@ var NodeProcessSchema = object({
13882
13882
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
13883
13883
  uptimeSec: number()
13884
13884
  });
13885
+ /**
13886
+ * One retained container-memory reading.
13887
+ *
13888
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
13889
+ * a second clock: that is what makes "processes sum to X, container says Y"
13890
+ * subtractable per point rather than an eyeballed comparison of two series
13891
+ * sampled at different instants.
13892
+ *
13893
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
13894
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
13895
+ * never coexisted, and a mean would smear away the peak this exists to find.
13896
+ */
13897
+ var ContainerMemoryPointSchema = object({
13898
+ /** Which hierarchy answered, so a reading is never ambiguous. */
13899
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
13900
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
13901
+ currentBytes: number(),
13902
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
13903
+ limitBytes: number().nullable(),
13904
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
13905
+ anonBytes: number().nullable(),
13906
+ /** Page cache. Charged to the cgroup, owned by no process. */
13907
+ fileBytes: number().nullable(),
13908
+ /**
13909
+ * Shared memory — and the field that explained the largest single surprise.
13910
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
13911
+ * hardware-decode session holding DRM objects is charged HERE and appears
13912
+ * nowhere in a `ps` scan.
13913
+ */
13914
+ shmemBytes: number().nullable(),
13915
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
13916
+ slabBytes: number().nullable(),
13917
+ /**
13918
+ * Shrinkable i915 GEM object bytes, from debugfs.
13919
+ *
13920
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
13921
+ * component of `currentBytes` and must not be subtracted from it; it says
13922
+ * what put the shmem there, where `shmemBytes` only says how much.
13923
+ *
13924
+ * `null` wherever debugfs is not mounted — which is inside every camstack
13925
+ * container today — and on any node with no Intel GPU.
13926
+ */
13927
+ gpuShmemBytes: number().nullable()
13928
+ }).extend({ atMs: number() });
13885
13929
  var DumpHeapSnapshotInputSchema = object({
13886
13930
  /** The addon whose runner should dump a heap snapshot. */
13887
13931
  addonId: string() });
@@ -13945,6 +13989,21 @@ var NodeLoadSeriesSchema = object({
13945
13989
  /** One entry per function seen in the window, heaviest-first. */
13946
13990
  series: array(LoadFunctionSeriesSchema).readonly(),
13947
13991
  /**
13992
+ * The CONTAINER's memory over the same window, oldest-first.
13993
+ *
13994
+ * Sits next to `series` rather than in a method of its own because the whole
13995
+ * question is a subtraction: the per-process rows in `series` sum to one
13996
+ * number and this one is another, and an operator who has to issue two calls
13997
+ * to compare them will compare two different instants. Same reader, same
13998
+ * `sinceMs`, same `bucketMs`, same timestamps.
13999
+ *
14000
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14001
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14002
+ * points at all. A zero here would be indistinguishable from a healthy
14003
+ * container and is precisely the lie this field exists to avoid.
14004
+ */
14005
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14006
+ /**
13948
14007
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
13949
14008
  * reduction was needed — so a caller can always say what one point covers
13950
14009
  * without having to know whether it was reduced.
@@ -24883,6 +24942,33 @@ var intercomCapability = {
24883
24942
  deviceNative: true,
24884
24943
  mode: "singleton",
24885
24944
  deviceTypes: [DeviceType.Camera],
24945
+ /**
24946
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
24947
+ *
24948
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
24949
+ * cap has no configuration surface at all: all six methods open, feed and
24950
+ * close one live audio session against one `deviceId`. That is the same
24951
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
24952
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
24953
+ * `admin` because they change what the device IS.
24954
+ *
24955
+ * `protected` does not mean ungated: `protectedProcedure` runs the
24956
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
24957
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
24958
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
24959
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
24960
+ * camera 7.
24961
+ *
24962
+ * Every method was `auth: 'admin'` from the initial commit, which made the
24963
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
24964
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
24965
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
24966
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
24967
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
24968
+ * snapshots" since that same commit; the promise could not be kept. Recorded
24969
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
24970
+ * preset promises a cap no row of that preset can reach.
24971
+ */
24886
24972
  methods: {
24887
24973
  /**
24888
24974
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -24895,7 +24981,7 @@ var intercomCapability = {
24895
24981
  sdpOffer: string()
24896
24982
  }), {
24897
24983
  kind: "mutation",
24898
- auth: "admin"
24984
+ auth: "protected"
24899
24985
  }),
24900
24986
  handleAnswer: method(object({
24901
24987
  deviceId: number(),
@@ -24903,7 +24989,7 @@ var intercomCapability = {
24903
24989
  sdpAnswer: string()
24904
24990
  }), _void(), {
24905
24991
  kind: "mutation",
24906
- auth: "admin"
24992
+ auth: "protected"
24907
24993
  }),
24908
24994
  /** Close explicitly. Server also auto-closes on 30s idle. */
24909
24995
  stopSession: method(object({
@@ -24911,7 +24997,7 @@ var intercomCapability = {
24911
24997
  sessionId: string()
24912
24998
  }), _void(), {
24913
24999
  kind: "mutation",
24914
- auth: "admin"
25000
+ auth: "protected"
24915
25001
  }),
24916
25002
  /**
24917
25003
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -24924,7 +25010,7 @@ var intercomCapability = {
24924
25010
  */
24925
25011
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
24926
25012
  kind: "mutation",
24927
- auth: "admin"
25013
+ auth: "protected"
24928
25014
  }),
24929
25015
  /**
24930
25016
  * Push one chunk of talk-back audio onto the active talk session.
@@ -24959,12 +25045,12 @@ var intercomCapability = {
24959
25045
  sequenceNumber: number().int()
24960
25046
  }), object({ accepted: boolean() }), {
24961
25047
  kind: "mutation",
24962
- auth: "admin"
25048
+ auth: "protected"
24963
25049
  }),
24964
25050
  /** Close the raw-PCM talk session. Idempotent. */
24965
25051
  endTalkSession: method(object({ deviceId: number() }), _void(), {
24966
25052
  kind: "mutation",
24967
- auth: "admin"
25053
+ auth: "protected"
24968
25054
  })
24969
25055
  },
24970
25056
  events: { onStatusChanged: { data: object({
@@ -27640,10 +27726,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27640
27726
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
27641
27727
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
27642
27728
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
27643
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
27644
- * annotations that are not exposed here and must not be treated as an event
27645
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
27646
- * (`interfaces/recording-config.ts`).
27729
+ * rows) and are the ONLY event surface — the recorder has none. The in-RAM
27730
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
27731
+ * ever read them. Event<->footage joins are by time, padded with the shared
27732
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
27647
27733
  */
27648
27734
  var RecordingStatusSchema = object({
27649
27735
  deviceId: number(),
package/dist/addon.mjs CHANGED
@@ -13881,6 +13881,50 @@ var NodeProcessSchema = object({
13881
13881
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
13882
13882
  uptimeSec: number()
13883
13883
  });
13884
+ /**
13885
+ * One retained container-memory reading.
13886
+ *
13887
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
13888
+ * a second clock: that is what makes "processes sum to X, container says Y"
13889
+ * subtractable per point rather than an eyeballed comparison of two series
13890
+ * sampled at different instants.
13891
+ *
13892
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
13893
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
13894
+ * never coexisted, and a mean would smear away the peak this exists to find.
13895
+ */
13896
+ var ContainerMemoryPointSchema = object({
13897
+ /** Which hierarchy answered, so a reading is never ambiguous. */
13898
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
13899
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
13900
+ currentBytes: number(),
13901
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
13902
+ limitBytes: number().nullable(),
13903
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
13904
+ anonBytes: number().nullable(),
13905
+ /** Page cache. Charged to the cgroup, owned by no process. */
13906
+ fileBytes: number().nullable(),
13907
+ /**
13908
+ * Shared memory — and the field that explained the largest single surprise.
13909
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
13910
+ * hardware-decode session holding DRM objects is charged HERE and appears
13911
+ * nowhere in a `ps` scan.
13912
+ */
13913
+ shmemBytes: number().nullable(),
13914
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
13915
+ slabBytes: number().nullable(),
13916
+ /**
13917
+ * Shrinkable i915 GEM object bytes, from debugfs.
13918
+ *
13919
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
13920
+ * component of `currentBytes` and must not be subtracted from it; it says
13921
+ * what put the shmem there, where `shmemBytes` only says how much.
13922
+ *
13923
+ * `null` wherever debugfs is not mounted — which is inside every camstack
13924
+ * container today — and on any node with no Intel GPU.
13925
+ */
13926
+ gpuShmemBytes: number().nullable()
13927
+ }).extend({ atMs: number() });
13884
13928
  var DumpHeapSnapshotInputSchema = object({
13885
13929
  /** The addon whose runner should dump a heap snapshot. */
13886
13930
  addonId: string() });
@@ -13944,6 +13988,21 @@ var NodeLoadSeriesSchema = object({
13944
13988
  /** One entry per function seen in the window, heaviest-first. */
13945
13989
  series: array(LoadFunctionSeriesSchema).readonly(),
13946
13990
  /**
13991
+ * The CONTAINER's memory over the same window, oldest-first.
13992
+ *
13993
+ * Sits next to `series` rather than in a method of its own because the whole
13994
+ * question is a subtraction: the per-process rows in `series` sum to one
13995
+ * number and this one is another, and an operator who has to issue two calls
13996
+ * to compare them will compare two different instants. Same reader, same
13997
+ * `sinceMs`, same `bucketMs`, same timestamps.
13998
+ *
13999
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14000
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14001
+ * points at all. A zero here would be indistinguishable from a healthy
14002
+ * container and is precisely the lie this field exists to avoid.
14003
+ */
14004
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14005
+ /**
13947
14006
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
13948
14007
  * reduction was needed — so a caller can always say what one point covers
13949
14008
  * without having to know whether it was reduced.
@@ -24882,6 +24941,33 @@ var intercomCapability = {
24882
24941
  deviceNative: true,
24883
24942
  mode: "singleton",
24884
24943
  deviceTypes: [DeviceType.Camera],
24944
+ /**
24945
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
24946
+ *
24947
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
24948
+ * cap has no configuration surface at all: all six methods open, feed and
24949
+ * close one live audio session against one `deviceId`. That is the same
24950
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
24951
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
24952
+ * `admin` because they change what the device IS.
24953
+ *
24954
+ * `protected` does not mean ungated: `protectedProcedure` runs the
24955
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
24956
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
24957
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
24958
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
24959
+ * camera 7.
24960
+ *
24961
+ * Every method was `auth: 'admin'` from the initial commit, which made the
24962
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
24963
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
24964
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
24965
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
24966
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
24967
+ * snapshots" since that same commit; the promise could not be kept. Recorded
24968
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
24969
+ * preset promises a cap no row of that preset can reach.
24970
+ */
24885
24971
  methods: {
24886
24972
  /**
24887
24973
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -24894,7 +24980,7 @@ var intercomCapability = {
24894
24980
  sdpOffer: string()
24895
24981
  }), {
24896
24982
  kind: "mutation",
24897
- auth: "admin"
24983
+ auth: "protected"
24898
24984
  }),
24899
24985
  handleAnswer: method(object({
24900
24986
  deviceId: number(),
@@ -24902,7 +24988,7 @@ var intercomCapability = {
24902
24988
  sdpAnswer: string()
24903
24989
  }), _void(), {
24904
24990
  kind: "mutation",
24905
- auth: "admin"
24991
+ auth: "protected"
24906
24992
  }),
24907
24993
  /** Close explicitly. Server also auto-closes on 30s idle. */
24908
24994
  stopSession: method(object({
@@ -24910,7 +24996,7 @@ var intercomCapability = {
24910
24996
  sessionId: string()
24911
24997
  }), _void(), {
24912
24998
  kind: "mutation",
24913
- auth: "admin"
24999
+ auth: "protected"
24914
25000
  }),
24915
25001
  /**
24916
25002
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -24923,7 +25009,7 @@ var intercomCapability = {
24923
25009
  */
24924
25010
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
24925
25011
  kind: "mutation",
24926
- auth: "admin"
25012
+ auth: "protected"
24927
25013
  }),
24928
25014
  /**
24929
25015
  * Push one chunk of talk-back audio onto the active talk session.
@@ -24958,12 +25044,12 @@ var intercomCapability = {
24958
25044
  sequenceNumber: number().int()
24959
25045
  }), object({ accepted: boolean() }), {
24960
25046
  kind: "mutation",
24961
- auth: "admin"
25047
+ auth: "protected"
24962
25048
  }),
24963
25049
  /** Close the raw-PCM talk session. Idempotent. */
24964
25050
  endTalkSession: method(object({ deviceId: number() }), _void(), {
24965
25051
  kind: "mutation",
24966
- auth: "admin"
25052
+ auth: "protected"
24967
25053
  })
24968
25054
  },
24969
25055
  events: { onStatusChanged: { data: object({
@@ -27639,10 +27725,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27639
27725
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
27640
27726
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
27641
27727
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
27642
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
27643
- * annotations that are not exposed here and must not be treated as an event
27644
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
27645
- * (`interfaces/recording-config.ts`).
27728
+ * rows) and are the ONLY event surface — the recorder has none. The in-RAM
27729
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
27730
+ * ever read them. Event<->footage joins are by time, padded with the shared
27731
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
27646
27732
  */
27647
27733
  var RecordingStatusSchema = object({
27648
27734
  deviceId: number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-velux",
3
- "version": "0.2.39",
3
+ "version": "0.2.42",
4
4
  "description": "Velux KLF-200 device-provider addon for CamStack — local-gateway window + shutter covers (positional, no tilt)",
5
5
  "keywords": [
6
6
  "camstack",