@camstack/addon-provider-gree 0.2.38 → 0.2.41

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