@camstack/addon-provider-dreo 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
@@ -13935,6 +13935,50 @@ var NodeProcessSchema = object({
13935
13935
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
13936
13936
  uptimeSec: number()
13937
13937
  });
13938
+ /**
13939
+ * One retained container-memory reading.
13940
+ *
13941
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
13942
+ * a second clock: that is what makes "processes sum to X, container says Y"
13943
+ * subtractable per point rather than an eyeballed comparison of two series
13944
+ * sampled at different instants.
13945
+ *
13946
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
13947
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
13948
+ * never coexisted, and a mean would smear away the peak this exists to find.
13949
+ */
13950
+ var ContainerMemoryPointSchema = object({
13951
+ /** Which hierarchy answered, so a reading is never ambiguous. */
13952
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
13953
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
13954
+ currentBytes: number(),
13955
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
13956
+ limitBytes: number().nullable(),
13957
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
13958
+ anonBytes: number().nullable(),
13959
+ /** Page cache. Charged to the cgroup, owned by no process. */
13960
+ fileBytes: number().nullable(),
13961
+ /**
13962
+ * Shared memory — and the field that explained the largest single surprise.
13963
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
13964
+ * hardware-decode session holding DRM objects is charged HERE and appears
13965
+ * nowhere in a `ps` scan.
13966
+ */
13967
+ shmemBytes: number().nullable(),
13968
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
13969
+ slabBytes: number().nullable(),
13970
+ /**
13971
+ * Shrinkable i915 GEM object bytes, from debugfs.
13972
+ *
13973
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
13974
+ * component of `currentBytes` and must not be subtracted from it; it says
13975
+ * what put the shmem there, where `shmemBytes` only says how much.
13976
+ *
13977
+ * `null` wherever debugfs is not mounted — which is inside every camstack
13978
+ * container today — and on any node with no Intel GPU.
13979
+ */
13980
+ gpuShmemBytes: number().nullable()
13981
+ }).extend({ atMs: number() });
13938
13982
  var DumpHeapSnapshotInputSchema = object({
13939
13983
  /** The addon whose runner should dump a heap snapshot. */
13940
13984
  addonId: string() });
@@ -13998,6 +14042,21 @@ var NodeLoadSeriesSchema = object({
13998
14042
  /** One entry per function seen in the window, heaviest-first. */
13999
14043
  series: array(LoadFunctionSeriesSchema).readonly(),
14000
14044
  /**
14045
+ * The CONTAINER's memory over the same window, oldest-first.
14046
+ *
14047
+ * Sits next to `series` rather than in a method of its own because the whole
14048
+ * question is a subtraction: the per-process rows in `series` sum to one
14049
+ * number and this one is another, and an operator who has to issue two calls
14050
+ * to compare them will compare two different instants. Same reader, same
14051
+ * `sinceMs`, same `bucketMs`, same timestamps.
14052
+ *
14053
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14054
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14055
+ * points at all. A zero here would be indistinguishable from a healthy
14056
+ * container and is precisely the lie this field exists to avoid.
14057
+ */
14058
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14059
+ /**
14001
14060
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
14002
14061
  * reduction was needed — so a caller can always say what one point covers
14003
14062
  * without having to know whether it was reduced.
@@ -24944,6 +25003,33 @@ var intercomCapability = {
24944
25003
  deviceNative: true,
24945
25004
  mode: "singleton",
24946
25005
  deviceTypes: [DeviceType.Camera],
25006
+ /**
25007
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25008
+ *
25009
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25010
+ * cap has no configuration surface at all: all six methods open, feed and
25011
+ * close one live audio session against one `deviceId`. That is the same
25012
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25013
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25014
+ * `admin` because they change what the device IS.
25015
+ *
25016
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25017
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25018
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25019
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25020
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25021
+ * camera 7.
25022
+ *
25023
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25024
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25025
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25026
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25027
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25028
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25029
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25030
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25031
+ * preset promises a cap no row of that preset can reach.
25032
+ */
24947
25033
  methods: {
24948
25034
  /**
24949
25035
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -24956,7 +25042,7 @@ var intercomCapability = {
24956
25042
  sdpOffer: string()
24957
25043
  }), {
24958
25044
  kind: "mutation",
24959
- auth: "admin"
25045
+ auth: "protected"
24960
25046
  }),
24961
25047
  handleAnswer: method(object({
24962
25048
  deviceId: number(),
@@ -24964,7 +25050,7 @@ var intercomCapability = {
24964
25050
  sdpAnswer: string()
24965
25051
  }), _void(), {
24966
25052
  kind: "mutation",
24967
- auth: "admin"
25053
+ auth: "protected"
24968
25054
  }),
24969
25055
  /** Close explicitly. Server also auto-closes on 30s idle. */
24970
25056
  stopSession: method(object({
@@ -24972,7 +25058,7 @@ var intercomCapability = {
24972
25058
  sessionId: string()
24973
25059
  }), _void(), {
24974
25060
  kind: "mutation",
24975
- auth: "admin"
25061
+ auth: "protected"
24976
25062
  }),
24977
25063
  /**
24978
25064
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -24985,7 +25071,7 @@ var intercomCapability = {
24985
25071
  */
24986
25072
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
24987
25073
  kind: "mutation",
24988
- auth: "admin"
25074
+ auth: "protected"
24989
25075
  }),
24990
25076
  /**
24991
25077
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25020,12 +25106,12 @@ var intercomCapability = {
25020
25106
  sequenceNumber: number().int()
25021
25107
  }), object({ accepted: boolean() }), {
25022
25108
  kind: "mutation",
25023
- auth: "admin"
25109
+ auth: "protected"
25024
25110
  }),
25025
25111
  /** Close the raw-PCM talk session. Idempotent. */
25026
25112
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25027
25113
  kind: "mutation",
25028
- auth: "admin"
25114
+ auth: "protected"
25029
25115
  })
25030
25116
  },
25031
25117
  events: { onStatusChanged: { data: object({
@@ -27701,10 +27787,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27701
27787
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
27702
27788
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
27703
27789
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
27704
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
27705
- * annotations that are not exposed here and must not be treated as an event
27706
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
27707
- * (`interfaces/recording-config.ts`).
27790
+ * rows) and are the ONLY event surface — the recorder has none. The in-RAM
27791
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
27792
+ * ever read them. Event<->footage joins are by time, padded with the shared
27793
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
27708
27794
  */
27709
27795
  var RecordingStatusSchema = object({
27710
27796
  deviceId: number(),
package/dist/addon.mjs CHANGED
@@ -13936,6 +13936,50 @@ var NodeProcessSchema = object({
13936
13936
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
13937
13937
  uptimeSec: number()
13938
13938
  });
13939
+ /**
13940
+ * One retained container-memory reading.
13941
+ *
13942
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
13943
+ * a second clock: that is what makes "processes sum to X, container says Y"
13944
+ * subtractable per point rather than an eyeballed comparison of two series
13945
+ * sampled at different instants.
13946
+ *
13947
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
13948
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
13949
+ * never coexisted, and a mean would smear away the peak this exists to find.
13950
+ */
13951
+ var ContainerMemoryPointSchema = object({
13952
+ /** Which hierarchy answered, so a reading is never ambiguous. */
13953
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
13954
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
13955
+ currentBytes: number(),
13956
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
13957
+ limitBytes: number().nullable(),
13958
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
13959
+ anonBytes: number().nullable(),
13960
+ /** Page cache. Charged to the cgroup, owned by no process. */
13961
+ fileBytes: number().nullable(),
13962
+ /**
13963
+ * Shared memory — and the field that explained the largest single surprise.
13964
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
13965
+ * hardware-decode session holding DRM objects is charged HERE and appears
13966
+ * nowhere in a `ps` scan.
13967
+ */
13968
+ shmemBytes: number().nullable(),
13969
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
13970
+ slabBytes: number().nullable(),
13971
+ /**
13972
+ * Shrinkable i915 GEM object bytes, from debugfs.
13973
+ *
13974
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
13975
+ * component of `currentBytes` and must not be subtracted from it; it says
13976
+ * what put the shmem there, where `shmemBytes` only says how much.
13977
+ *
13978
+ * `null` wherever debugfs is not mounted — which is inside every camstack
13979
+ * container today — and on any node with no Intel GPU.
13980
+ */
13981
+ gpuShmemBytes: number().nullable()
13982
+ }).extend({ atMs: number() });
13939
13983
  var DumpHeapSnapshotInputSchema = object({
13940
13984
  /** The addon whose runner should dump a heap snapshot. */
13941
13985
  addonId: string() });
@@ -13999,6 +14043,21 @@ var NodeLoadSeriesSchema = object({
13999
14043
  /** One entry per function seen in the window, heaviest-first. */
14000
14044
  series: array(LoadFunctionSeriesSchema).readonly(),
14001
14045
  /**
14046
+ * The CONTAINER's memory over the same window, oldest-first.
14047
+ *
14048
+ * Sits next to `series` rather than in a method of its own because the whole
14049
+ * question is a subtraction: the per-process rows in `series` sum to one
14050
+ * number and this one is another, and an operator who has to issue two calls
14051
+ * to compare them will compare two different instants. Same reader, same
14052
+ * `sinceMs`, same `bucketMs`, same timestamps.
14053
+ *
14054
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14055
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14056
+ * points at all. A zero here would be indistinguishable from a healthy
14057
+ * container and is precisely the lie this field exists to avoid.
14058
+ */
14059
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14060
+ /**
14002
14061
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
14003
14062
  * reduction was needed — so a caller can always say what one point covers
14004
14063
  * without having to know whether it was reduced.
@@ -24945,6 +25004,33 @@ var intercomCapability = {
24945
25004
  deviceNative: true,
24946
25005
  mode: "singleton",
24947
25006
  deviceTypes: [DeviceType.Camera],
25007
+ /**
25008
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25009
+ *
25010
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25011
+ * cap has no configuration surface at all: all six methods open, feed and
25012
+ * close one live audio session against one `deviceId`. That is the same
25013
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25014
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25015
+ * `admin` because they change what the device IS.
25016
+ *
25017
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25018
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25019
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25020
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25021
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25022
+ * camera 7.
25023
+ *
25024
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25025
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25026
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25027
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25028
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25029
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25030
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25031
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25032
+ * preset promises a cap no row of that preset can reach.
25033
+ */
24948
25034
  methods: {
24949
25035
  /**
24950
25036
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -24957,7 +25043,7 @@ var intercomCapability = {
24957
25043
  sdpOffer: string()
24958
25044
  }), {
24959
25045
  kind: "mutation",
24960
- auth: "admin"
25046
+ auth: "protected"
24961
25047
  }),
24962
25048
  handleAnswer: method(object({
24963
25049
  deviceId: number(),
@@ -24965,7 +25051,7 @@ var intercomCapability = {
24965
25051
  sdpAnswer: string()
24966
25052
  }), _void(), {
24967
25053
  kind: "mutation",
24968
- auth: "admin"
25054
+ auth: "protected"
24969
25055
  }),
24970
25056
  /** Close explicitly. Server also auto-closes on 30s idle. */
24971
25057
  stopSession: method(object({
@@ -24973,7 +25059,7 @@ var intercomCapability = {
24973
25059
  sessionId: string()
24974
25060
  }), _void(), {
24975
25061
  kind: "mutation",
24976
- auth: "admin"
25062
+ auth: "protected"
24977
25063
  }),
24978
25064
  /**
24979
25065
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -24986,7 +25072,7 @@ var intercomCapability = {
24986
25072
  */
24987
25073
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
24988
25074
  kind: "mutation",
24989
- auth: "admin"
25075
+ auth: "protected"
24990
25076
  }),
24991
25077
  /**
24992
25078
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25021,12 +25107,12 @@ var intercomCapability = {
25021
25107
  sequenceNumber: number().int()
25022
25108
  }), object({ accepted: boolean() }), {
25023
25109
  kind: "mutation",
25024
- auth: "admin"
25110
+ auth: "protected"
25025
25111
  }),
25026
25112
  /** Close the raw-PCM talk session. Idempotent. */
25027
25113
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25028
25114
  kind: "mutation",
25029
- auth: "admin"
25115
+ auth: "protected"
25030
25116
  })
25031
25117
  },
25032
25118
  events: { onStatusChanged: { data: object({
@@ -27702,10 +27788,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27702
27788
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
27703
27789
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
27704
27790
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
27705
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
27706
- * annotations that are not exposed here and must not be treated as an event
27707
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
27708
- * (`interfaces/recording-config.ts`).
27791
+ * rows) and are the ONLY event surface — the recorder has none. The in-RAM
27792
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
27793
+ * ever read them. Event<->footage joins are by time, padded with the shared
27794
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
27709
27795
  */
27710
27796
  var RecordingStatusSchema = object({
27711
27797
  deviceId: number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreo",
3
- "version": "0.2.39",
3
+ "version": "0.2.42",
4
4
  "description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
5
5
  "keywords": [
6
6
  "camstack",