@camstack/addon-provider-dreame 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
@@ -64404,6 +64404,50 @@ var NodeProcessSchema = object({
64404
64404
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
64405
64405
  uptimeSec: number()
64406
64406
  });
64407
+ /**
64408
+ * One retained container-memory reading.
64409
+ *
64410
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
64411
+ * a second clock: that is what makes "processes sum to X, container says Y"
64412
+ * subtractable per point rather than an eyeballed comparison of two series
64413
+ * sampled at different instants.
64414
+ *
64415
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
64416
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
64417
+ * never coexisted, and a mean would smear away the peak this exists to find.
64418
+ */
64419
+ var ContainerMemoryPointSchema = object({
64420
+ /** Which hierarchy answered, so a reading is never ambiguous. */
64421
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
64422
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
64423
+ currentBytes: number(),
64424
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
64425
+ limitBytes: number().nullable(),
64426
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
64427
+ anonBytes: number().nullable(),
64428
+ /** Page cache. Charged to the cgroup, owned by no process. */
64429
+ fileBytes: number().nullable(),
64430
+ /**
64431
+ * Shared memory — and the field that explained the largest single surprise.
64432
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
64433
+ * hardware-decode session holding DRM objects is charged HERE and appears
64434
+ * nowhere in a `ps` scan.
64435
+ */
64436
+ shmemBytes: number().nullable(),
64437
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
64438
+ slabBytes: number().nullable(),
64439
+ /**
64440
+ * Shrinkable i915 GEM object bytes, from debugfs.
64441
+ *
64442
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
64443
+ * component of `currentBytes` and must not be subtracted from it; it says
64444
+ * what put the shmem there, where `shmemBytes` only says how much.
64445
+ *
64446
+ * `null` wherever debugfs is not mounted — which is inside every camstack
64447
+ * container today — and on any node with no Intel GPU.
64448
+ */
64449
+ gpuShmemBytes: number().nullable()
64450
+ }).extend({ atMs: number() });
64407
64451
  var DumpHeapSnapshotInputSchema = object({
64408
64452
  /** The addon whose runner should dump a heap snapshot. */
64409
64453
  addonId: string() });
@@ -64467,6 +64511,21 @@ var NodeLoadSeriesSchema = object({
64467
64511
  /** One entry per function seen in the window, heaviest-first. */
64468
64512
  series: array(LoadFunctionSeriesSchema).readonly(),
64469
64513
  /**
64514
+ * The CONTAINER's memory over the same window, oldest-first.
64515
+ *
64516
+ * Sits next to `series` rather than in a method of its own because the whole
64517
+ * question is a subtraction: the per-process rows in `series` sum to one
64518
+ * number and this one is another, and an operator who has to issue two calls
64519
+ * to compare them will compare two different instants. Same reader, same
64520
+ * `sinceMs`, same `bucketMs`, same timestamps.
64521
+ *
64522
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
64523
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
64524
+ * points at all. A zero here would be indistinguishable from a healthy
64525
+ * container and is precisely the lie this field exists to avoid.
64526
+ */
64527
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
64528
+ /**
64470
64529
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
64471
64530
  * reduction was needed — so a caller can always say what one point covers
64472
64531
  * without having to know whether it was reduced.
@@ -75430,6 +75489,33 @@ var intercomCapability = {
75430
75489
  deviceNative: true,
75431
75490
  mode: "singleton",
75432
75491
  deviceTypes: [DeviceType.Camera],
75492
+ /**
75493
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
75494
+ *
75495
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
75496
+ * cap has no configuration surface at all: all six methods open, feed and
75497
+ * close one live audio session against one `deviceId`. That is the same
75498
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
75499
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
75500
+ * `admin` because they change what the device IS.
75501
+ *
75502
+ * `protected` does not mean ungated: `protectedProcedure` runs the
75503
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
75504
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
75505
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
75506
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
75507
+ * camera 7.
75508
+ *
75509
+ * Every method was `auth: 'admin'` from the initial commit, which made the
75510
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
75511
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
75512
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
75513
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
75514
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
75515
+ * snapshots" since that same commit; the promise could not be kept. Recorded
75516
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
75517
+ * preset promises a cap no row of that preset can reach.
75518
+ */
75433
75519
  methods: {
75434
75520
  /**
75435
75521
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -75442,7 +75528,7 @@ var intercomCapability = {
75442
75528
  sdpOffer: string()
75443
75529
  }), {
75444
75530
  kind: "mutation",
75445
- auth: "admin"
75531
+ auth: "protected"
75446
75532
  }),
75447
75533
  handleAnswer: method(object({
75448
75534
  deviceId: number(),
@@ -75450,7 +75536,7 @@ var intercomCapability = {
75450
75536
  sdpAnswer: string()
75451
75537
  }), _void(), {
75452
75538
  kind: "mutation",
75453
- auth: "admin"
75539
+ auth: "protected"
75454
75540
  }),
75455
75541
  /** Close explicitly. Server also auto-closes on 30s idle. */
75456
75542
  stopSession: method(object({
@@ -75458,7 +75544,7 @@ var intercomCapability = {
75458
75544
  sessionId: string()
75459
75545
  }), _void(), {
75460
75546
  kind: "mutation",
75461
- auth: "admin"
75547
+ auth: "protected"
75462
75548
  }),
75463
75549
  /**
75464
75550
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -75471,7 +75557,7 @@ var intercomCapability = {
75471
75557
  */
75472
75558
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
75473
75559
  kind: "mutation",
75474
- auth: "admin"
75560
+ auth: "protected"
75475
75561
  }),
75476
75562
  /**
75477
75563
  * Push one chunk of talk-back audio onto the active talk session.
@@ -75506,12 +75592,12 @@ var intercomCapability = {
75506
75592
  sequenceNumber: number().int()
75507
75593
  }), object({ accepted: boolean() }), {
75508
75594
  kind: "mutation",
75509
- auth: "admin"
75595
+ auth: "protected"
75510
75596
  }),
75511
75597
  /** Close the raw-PCM talk session. Idempotent. */
75512
75598
  endTalkSession: method(object({ deviceId: number() }), _void(), {
75513
75599
  kind: "mutation",
75514
- auth: "admin"
75600
+ auth: "protected"
75515
75601
  })
75516
75602
  },
75517
75603
  events: { onStatusChanged: { data: object({
@@ -78187,10 +78273,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
78187
78273
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
78188
78274
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
78189
78275
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
78190
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
78191
- * annotations that are not exposed here and must not be treated as an event
78192
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
78193
- * (`interfaces/recording-config.ts`).
78276
+ * rows) and are the ONLY event surface — the recorder has none. The in-RAM
78277
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
78278
+ * ever read them. Event<->footage joins are by time, padded with the shared
78279
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
78194
78280
  */
78195
78281
  var RecordingStatusSchema = object({
78196
78282
  deviceId: number(),
package/dist/addon.mjs CHANGED
@@ -64404,6 +64404,50 @@ var NodeProcessSchema = object({
64404
64404
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
64405
64405
  uptimeSec: number()
64406
64406
  });
64407
+ /**
64408
+ * One retained container-memory reading.
64409
+ *
64410
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
64411
+ * a second clock: that is what makes "processes sum to X, container says Y"
64412
+ * subtractable per point rather than an eyeballed comparison of two series
64413
+ * sampled at different instants.
64414
+ *
64415
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
64416
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
64417
+ * never coexisted, and a mean would smear away the peak this exists to find.
64418
+ */
64419
+ var ContainerMemoryPointSchema = object({
64420
+ /** Which hierarchy answered, so a reading is never ambiguous. */
64421
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
64422
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
64423
+ currentBytes: number(),
64424
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
64425
+ limitBytes: number().nullable(),
64426
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
64427
+ anonBytes: number().nullable(),
64428
+ /** Page cache. Charged to the cgroup, owned by no process. */
64429
+ fileBytes: number().nullable(),
64430
+ /**
64431
+ * Shared memory — and the field that explained the largest single surprise.
64432
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
64433
+ * hardware-decode session holding DRM objects is charged HERE and appears
64434
+ * nowhere in a `ps` scan.
64435
+ */
64436
+ shmemBytes: number().nullable(),
64437
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
64438
+ slabBytes: number().nullable(),
64439
+ /**
64440
+ * Shrinkable i915 GEM object bytes, from debugfs.
64441
+ *
64442
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
64443
+ * component of `currentBytes` and must not be subtracted from it; it says
64444
+ * what put the shmem there, where `shmemBytes` only says how much.
64445
+ *
64446
+ * `null` wherever debugfs is not mounted — which is inside every camstack
64447
+ * container today — and on any node with no Intel GPU.
64448
+ */
64449
+ gpuShmemBytes: number().nullable()
64450
+ }).extend({ atMs: number() });
64407
64451
  var DumpHeapSnapshotInputSchema = object({
64408
64452
  /** The addon whose runner should dump a heap snapshot. */
64409
64453
  addonId: string() });
@@ -64467,6 +64511,21 @@ var NodeLoadSeriesSchema = object({
64467
64511
  /** One entry per function seen in the window, heaviest-first. */
64468
64512
  series: array(LoadFunctionSeriesSchema).readonly(),
64469
64513
  /**
64514
+ * The CONTAINER's memory over the same window, oldest-first.
64515
+ *
64516
+ * Sits next to `series` rather than in a method of its own because the whole
64517
+ * question is a subtraction: the per-process rows in `series` sum to one
64518
+ * number and this one is another, and an operator who has to issue two calls
64519
+ * to compare them will compare two different instants. Same reader, same
64520
+ * `sinceMs`, same `bucketMs`, same timestamps.
64521
+ *
64522
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
64523
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
64524
+ * points at all. A zero here would be indistinguishable from a healthy
64525
+ * container and is precisely the lie this field exists to avoid.
64526
+ */
64527
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
64528
+ /**
64470
64529
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
64471
64530
  * reduction was needed — so a caller can always say what one point covers
64472
64531
  * without having to know whether it was reduced.
@@ -75430,6 +75489,33 @@ var intercomCapability = {
75430
75489
  deviceNative: true,
75431
75490
  mode: "singleton",
75432
75491
  deviceTypes: [DeviceType.Camera],
75492
+ /**
75493
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
75494
+ *
75495
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
75496
+ * cap has no configuration surface at all: all six methods open, feed and
75497
+ * close one live audio session against one `deviceId`. That is the same
75498
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
75499
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
75500
+ * `admin` because they change what the device IS.
75501
+ *
75502
+ * `protected` does not mean ungated: `protectedProcedure` runs the
75503
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
75504
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
75505
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
75506
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
75507
+ * camera 7.
75508
+ *
75509
+ * Every method was `auth: 'admin'` from the initial commit, which made the
75510
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
75511
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
75512
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
75513
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
75514
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
75515
+ * snapshots" since that same commit; the promise could not be kept. Recorded
75516
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
75517
+ * preset promises a cap no row of that preset can reach.
75518
+ */
75433
75519
  methods: {
75434
75520
  /**
75435
75521
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -75442,7 +75528,7 @@ var intercomCapability = {
75442
75528
  sdpOffer: string()
75443
75529
  }), {
75444
75530
  kind: "mutation",
75445
- auth: "admin"
75531
+ auth: "protected"
75446
75532
  }),
75447
75533
  handleAnswer: method(object({
75448
75534
  deviceId: number(),
@@ -75450,7 +75536,7 @@ var intercomCapability = {
75450
75536
  sdpAnswer: string()
75451
75537
  }), _void(), {
75452
75538
  kind: "mutation",
75453
- auth: "admin"
75539
+ auth: "protected"
75454
75540
  }),
75455
75541
  /** Close explicitly. Server also auto-closes on 30s idle. */
75456
75542
  stopSession: method(object({
@@ -75458,7 +75544,7 @@ var intercomCapability = {
75458
75544
  sessionId: string()
75459
75545
  }), _void(), {
75460
75546
  kind: "mutation",
75461
- auth: "admin"
75547
+ auth: "protected"
75462
75548
  }),
75463
75549
  /**
75464
75550
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -75471,7 +75557,7 @@ var intercomCapability = {
75471
75557
  */
75472
75558
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
75473
75559
  kind: "mutation",
75474
- auth: "admin"
75560
+ auth: "protected"
75475
75561
  }),
75476
75562
  /**
75477
75563
  * Push one chunk of talk-back audio onto the active talk session.
@@ -75506,12 +75592,12 @@ var intercomCapability = {
75506
75592
  sequenceNumber: number().int()
75507
75593
  }), object({ accepted: boolean() }), {
75508
75594
  kind: "mutation",
75509
- auth: "admin"
75595
+ auth: "protected"
75510
75596
  }),
75511
75597
  /** Close the raw-PCM talk session. Idempotent. */
75512
75598
  endTalkSession: method(object({ deviceId: number() }), _void(), {
75513
75599
  kind: "mutation",
75514
- auth: "admin"
75600
+ auth: "protected"
75515
75601
  })
75516
75602
  },
75517
75603
  events: { onStatusChanged: { data: object({
@@ -78187,10 +78273,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
78187
78273
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
78188
78274
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
78189
78275
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
78190
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
78191
- * annotations that are not exposed here and must not be treated as an event
78192
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
78193
- * (`interfaces/recording-config.ts`).
78276
+ * rows) and are the ONLY event surface — the recorder has none. The in-RAM
78277
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
78278
+ * ever read them. Event<->footage joins are by time, padded with the shared
78279
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
78194
78280
  */
78195
78281
  var RecordingStatusSchema = object({
78196
78282
  deviceId: number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreame",
3
- "version": "0.2.39",
3
+ "version": "0.2.42",
4
4
  "description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
5
5
  "keywords": [
6
6
  "camstack",