@camstack/addon-provider-homematic 1.2.40 → 1.2.43

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
@@ -13957,6 +13957,50 @@ var NodeProcessSchema = object({
13957
13957
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
13958
13958
  uptimeSec: number()
13959
13959
  });
13960
+ /**
13961
+ * One retained container-memory reading.
13962
+ *
13963
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
13964
+ * a second clock: that is what makes "processes sum to X, container says Y"
13965
+ * subtractable per point rather than an eyeballed comparison of two series
13966
+ * sampled at different instants.
13967
+ *
13968
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
13969
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
13970
+ * never coexisted, and a mean would smear away the peak this exists to find.
13971
+ */
13972
+ var ContainerMemoryPointSchema = object({
13973
+ /** Which hierarchy answered, so a reading is never ambiguous. */
13974
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
13975
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
13976
+ currentBytes: number(),
13977
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
13978
+ limitBytes: number().nullable(),
13979
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
13980
+ anonBytes: number().nullable(),
13981
+ /** Page cache. Charged to the cgroup, owned by no process. */
13982
+ fileBytes: number().nullable(),
13983
+ /**
13984
+ * Shared memory — and the field that explained the largest single surprise.
13985
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
13986
+ * hardware-decode session holding DRM objects is charged HERE and appears
13987
+ * nowhere in a `ps` scan.
13988
+ */
13989
+ shmemBytes: number().nullable(),
13990
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
13991
+ slabBytes: number().nullable(),
13992
+ /**
13993
+ * Shrinkable i915 GEM object bytes, from debugfs.
13994
+ *
13995
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
13996
+ * component of `currentBytes` and must not be subtracted from it; it says
13997
+ * what put the shmem there, where `shmemBytes` only says how much.
13998
+ *
13999
+ * `null` wherever debugfs is not mounted — which is inside every camstack
14000
+ * container today — and on any node with no Intel GPU.
14001
+ */
14002
+ gpuShmemBytes: number().nullable()
14003
+ }).extend({ atMs: number() });
13960
14004
  var DumpHeapSnapshotInputSchema = object({
13961
14005
  /** The addon whose runner should dump a heap snapshot. */
13962
14006
  addonId: string() });
@@ -14020,6 +14064,21 @@ var NodeLoadSeriesSchema = object({
14020
14064
  /** One entry per function seen in the window, heaviest-first. */
14021
14065
  series: array(LoadFunctionSeriesSchema).readonly(),
14022
14066
  /**
14067
+ * The CONTAINER's memory over the same window, oldest-first.
14068
+ *
14069
+ * Sits next to `series` rather than in a method of its own because the whole
14070
+ * question is a subtraction: the per-process rows in `series` sum to one
14071
+ * number and this one is another, and an operator who has to issue two calls
14072
+ * to compare them will compare two different instants. Same reader, same
14073
+ * `sinceMs`, same `bucketMs`, same timestamps.
14074
+ *
14075
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14076
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14077
+ * points at all. A zero here would be indistinguishable from a healthy
14078
+ * container and is precisely the lie this field exists to avoid.
14079
+ */
14080
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14081
+ /**
14023
14082
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
14024
14083
  * reduction was needed — so a caller can always say what one point covers
14025
14084
  * without having to know whether it was reduced.
@@ -24958,6 +25017,33 @@ var intercomCapability = {
24958
25017
  deviceNative: true,
24959
25018
  mode: "singleton",
24960
25019
  deviceTypes: [DeviceType.Camera],
25020
+ /**
25021
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25022
+ *
25023
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25024
+ * cap has no configuration surface at all: all six methods open, feed and
25025
+ * close one live audio session against one `deviceId`. That is the same
25026
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25027
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25028
+ * `admin` because they change what the device IS.
25029
+ *
25030
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25031
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25032
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25033
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25034
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25035
+ * camera 7.
25036
+ *
25037
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25038
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25039
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25040
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25041
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25042
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25043
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25044
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25045
+ * preset promises a cap no row of that preset can reach.
25046
+ */
24961
25047
  methods: {
24962
25048
  /**
24963
25049
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -24970,7 +25056,7 @@ var intercomCapability = {
24970
25056
  sdpOffer: string()
24971
25057
  }), {
24972
25058
  kind: "mutation",
24973
- auth: "admin"
25059
+ auth: "protected"
24974
25060
  }),
24975
25061
  handleAnswer: method(object({
24976
25062
  deviceId: number(),
@@ -24978,7 +25064,7 @@ var intercomCapability = {
24978
25064
  sdpAnswer: string()
24979
25065
  }), _void(), {
24980
25066
  kind: "mutation",
24981
- auth: "admin"
25067
+ auth: "protected"
24982
25068
  }),
24983
25069
  /** Close explicitly. Server also auto-closes on 30s idle. */
24984
25070
  stopSession: method(object({
@@ -24986,7 +25072,7 @@ var intercomCapability = {
24986
25072
  sessionId: string()
24987
25073
  }), _void(), {
24988
25074
  kind: "mutation",
24989
- auth: "admin"
25075
+ auth: "protected"
24990
25076
  }),
24991
25077
  /**
24992
25078
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -24999,7 +25085,7 @@ var intercomCapability = {
24999
25085
  */
25000
25086
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25001
25087
  kind: "mutation",
25002
- auth: "admin"
25088
+ auth: "protected"
25003
25089
  }),
25004
25090
  /**
25005
25091
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25034,12 +25120,12 @@ var intercomCapability = {
25034
25120
  sequenceNumber: number().int()
25035
25121
  }), object({ accepted: boolean() }), {
25036
25122
  kind: "mutation",
25037
- auth: "admin"
25123
+ auth: "protected"
25038
25124
  }),
25039
25125
  /** Close the raw-PCM talk session. Idempotent. */
25040
25126
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25041
25127
  kind: "mutation",
25042
- auth: "admin"
25128
+ auth: "protected"
25043
25129
  })
25044
25130
  },
25045
25131
  events: { onStatusChanged: { data: object({
@@ -27715,10 +27801,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27715
27801
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
27716
27802
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
27717
27803
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
27718
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
27719
- * annotations that are not exposed here and must not be treated as an event
27720
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
27721
- * (`interfaces/recording-config.ts`).
27804
+ * rows) and are the ONLY event surface — the recorder has none. The in-RAM
27805
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
27806
+ * ever read them. Event<->footage joins are by time, padded with the shared
27807
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
27722
27808
  */
27723
27809
  var RecordingStatusSchema = object({
27724
27810
  deviceId: number(),
package/dist/addon.mjs CHANGED
@@ -13958,6 +13958,50 @@ var NodeProcessSchema = object({
13958
13958
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
13959
13959
  uptimeSec: number()
13960
13960
  });
13961
+ /**
13962
+ * One retained container-memory reading.
13963
+ *
13964
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
13965
+ * a second clock: that is what makes "processes sum to X, container says Y"
13966
+ * subtractable per point rather than an eyeballed comparison of two series
13967
+ * sampled at different instants.
13968
+ *
13969
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
13970
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
13971
+ * never coexisted, and a mean would smear away the peak this exists to find.
13972
+ */
13973
+ var ContainerMemoryPointSchema = object({
13974
+ /** Which hierarchy answered, so a reading is never ambiguous. */
13975
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
13976
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
13977
+ currentBytes: number(),
13978
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
13979
+ limitBytes: number().nullable(),
13980
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
13981
+ anonBytes: number().nullable(),
13982
+ /** Page cache. Charged to the cgroup, owned by no process. */
13983
+ fileBytes: number().nullable(),
13984
+ /**
13985
+ * Shared memory — and the field that explained the largest single surprise.
13986
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
13987
+ * hardware-decode session holding DRM objects is charged HERE and appears
13988
+ * nowhere in a `ps` scan.
13989
+ */
13990
+ shmemBytes: number().nullable(),
13991
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
13992
+ slabBytes: number().nullable(),
13993
+ /**
13994
+ * Shrinkable i915 GEM object bytes, from debugfs.
13995
+ *
13996
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
13997
+ * component of `currentBytes` and must not be subtracted from it; it says
13998
+ * what put the shmem there, where `shmemBytes` only says how much.
13999
+ *
14000
+ * `null` wherever debugfs is not mounted — which is inside every camstack
14001
+ * container today — and on any node with no Intel GPU.
14002
+ */
14003
+ gpuShmemBytes: number().nullable()
14004
+ }).extend({ atMs: number() });
13961
14005
  var DumpHeapSnapshotInputSchema = object({
13962
14006
  /** The addon whose runner should dump a heap snapshot. */
13963
14007
  addonId: string() });
@@ -14021,6 +14065,21 @@ var NodeLoadSeriesSchema = object({
14021
14065
  /** One entry per function seen in the window, heaviest-first. */
14022
14066
  series: array(LoadFunctionSeriesSchema).readonly(),
14023
14067
  /**
14068
+ * The CONTAINER's memory over the same window, oldest-first.
14069
+ *
14070
+ * Sits next to `series` rather than in a method of its own because the whole
14071
+ * question is a subtraction: the per-process rows in `series` sum to one
14072
+ * number and this one is another, and an operator who has to issue two calls
14073
+ * to compare them will compare two different instants. Same reader, same
14074
+ * `sinceMs`, same `bucketMs`, same timestamps.
14075
+ *
14076
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14077
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14078
+ * points at all. A zero here would be indistinguishable from a healthy
14079
+ * container and is precisely the lie this field exists to avoid.
14080
+ */
14081
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14082
+ /**
14024
14083
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
14025
14084
  * reduction was needed — so a caller can always say what one point covers
14026
14085
  * without having to know whether it was reduced.
@@ -24959,6 +25018,33 @@ var intercomCapability = {
24959
25018
  deviceNative: true,
24960
25019
  mode: "singleton",
24961
25020
  deviceTypes: [DeviceType.Camera],
25021
+ /**
25022
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25023
+ *
25024
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25025
+ * cap has no configuration surface at all: all six methods open, feed and
25026
+ * close one live audio session against one `deviceId`. That is the same
25027
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25028
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25029
+ * `admin` because they change what the device IS.
25030
+ *
25031
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25032
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25033
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25034
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25035
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25036
+ * camera 7.
25037
+ *
25038
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25039
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25040
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25041
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25042
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25043
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25044
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25045
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25046
+ * preset promises a cap no row of that preset can reach.
25047
+ */
24962
25048
  methods: {
24963
25049
  /**
24964
25050
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -24971,7 +25057,7 @@ var intercomCapability = {
24971
25057
  sdpOffer: string()
24972
25058
  }), {
24973
25059
  kind: "mutation",
24974
- auth: "admin"
25060
+ auth: "protected"
24975
25061
  }),
24976
25062
  handleAnswer: method(object({
24977
25063
  deviceId: number(),
@@ -24979,7 +25065,7 @@ var intercomCapability = {
24979
25065
  sdpAnswer: string()
24980
25066
  }), _void(), {
24981
25067
  kind: "mutation",
24982
- auth: "admin"
25068
+ auth: "protected"
24983
25069
  }),
24984
25070
  /** Close explicitly. Server also auto-closes on 30s idle. */
24985
25071
  stopSession: method(object({
@@ -24987,7 +25073,7 @@ var intercomCapability = {
24987
25073
  sessionId: string()
24988
25074
  }), _void(), {
24989
25075
  kind: "mutation",
24990
- auth: "admin"
25076
+ auth: "protected"
24991
25077
  }),
24992
25078
  /**
24993
25079
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25000,7 +25086,7 @@ var intercomCapability = {
25000
25086
  */
25001
25087
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25002
25088
  kind: "mutation",
25003
- auth: "admin"
25089
+ auth: "protected"
25004
25090
  }),
25005
25091
  /**
25006
25092
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25035,12 +25121,12 @@ var intercomCapability = {
25035
25121
  sequenceNumber: number().int()
25036
25122
  }), object({ accepted: boolean() }), {
25037
25123
  kind: "mutation",
25038
- auth: "admin"
25124
+ auth: "protected"
25039
25125
  }),
25040
25126
  /** Close the raw-PCM talk session. Idempotent. */
25041
25127
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25042
25128
  kind: "mutation",
25043
- auth: "admin"
25129
+ auth: "protected"
25044
25130
  })
25045
25131
  },
25046
25132
  events: { onStatusChanged: { data: object({
@@ -27716,10 +27802,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27716
27802
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
27717
27803
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
27718
27804
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
27719
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
27720
- * annotations that are not exposed here and must not be treated as an event
27721
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
27722
- * (`interfaces/recording-config.ts`).
27805
+ * rows) and are the ONLY event surface — the recorder has none. The in-RAM
27806
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
27807
+ * ever read them. Event<->footage joins are by time, padded with the shared
27808
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
27723
27809
  */
27724
27810
  var RecordingStatusSchema = object({
27725
27811
  deviceId: number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homematic",
3
- "version": "1.2.40",
3
+ "version": "1.2.43",
4
4
  "description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
5
5
  "keywords": [
6
6
  "camstack",