@camstack/addon-provider-wyze 0.2.43 → 0.2.46

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
@@ -13931,6 +13931,50 @@ var NodeProcessSchema = object({
13931
13931
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
13932
13932
  uptimeSec: number()
13933
13933
  });
13934
+ /**
13935
+ * One retained container-memory reading.
13936
+ *
13937
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
13938
+ * a second clock: that is what makes "processes sum to X, container says Y"
13939
+ * subtractable per point rather than an eyeballed comparison of two series
13940
+ * sampled at different instants.
13941
+ *
13942
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
13943
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
13944
+ * never coexisted, and a mean would smear away the peak this exists to find.
13945
+ */
13946
+ var ContainerMemoryPointSchema = object({
13947
+ /** Which hierarchy answered, so a reading is never ambiguous. */
13948
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
13949
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
13950
+ currentBytes: number(),
13951
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
13952
+ limitBytes: number().nullable(),
13953
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
13954
+ anonBytes: number().nullable(),
13955
+ /** Page cache. Charged to the cgroup, owned by no process. */
13956
+ fileBytes: number().nullable(),
13957
+ /**
13958
+ * Shared memory — and the field that explained the largest single surprise.
13959
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
13960
+ * hardware-decode session holding DRM objects is charged HERE and appears
13961
+ * nowhere in a `ps` scan.
13962
+ */
13963
+ shmemBytes: number().nullable(),
13964
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
13965
+ slabBytes: number().nullable(),
13966
+ /**
13967
+ * Shrinkable i915 GEM object bytes, from debugfs.
13968
+ *
13969
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
13970
+ * component of `currentBytes` and must not be subtracted from it; it says
13971
+ * what put the shmem there, where `shmemBytes` only says how much.
13972
+ *
13973
+ * `null` wherever debugfs is not mounted — which is inside every camstack
13974
+ * container today — and on any node with no Intel GPU.
13975
+ */
13976
+ gpuShmemBytes: number().nullable()
13977
+ }).extend({ atMs: number() });
13934
13978
  var DumpHeapSnapshotInputSchema = object({
13935
13979
  /** The addon whose runner should dump a heap snapshot. */
13936
13980
  addonId: string() });
@@ -13994,6 +14038,21 @@ var NodeLoadSeriesSchema = object({
13994
14038
  /** One entry per function seen in the window, heaviest-first. */
13995
14039
  series: array(LoadFunctionSeriesSchema).readonly(),
13996
14040
  /**
14041
+ * The CONTAINER's memory over the same window, oldest-first.
14042
+ *
14043
+ * Sits next to `series` rather than in a method of its own because the whole
14044
+ * question is a subtraction: the per-process rows in `series` sum to one
14045
+ * number and this one is another, and an operator who has to issue two calls
14046
+ * to compare them will compare two different instants. Same reader, same
14047
+ * `sinceMs`, same `bucketMs`, same timestamps.
14048
+ *
14049
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14050
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14051
+ * points at all. A zero here would be indistinguishable from a healthy
14052
+ * container and is precisely the lie this field exists to avoid.
14053
+ */
14054
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14055
+ /**
13997
14056
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
13998
14057
  * reduction was needed — so a caller can always say what one point covers
13999
14058
  * without having to know whether it was reduced.
@@ -25044,6 +25103,33 @@ var intercomCapability = {
25044
25103
  deviceNative: true,
25045
25104
  mode: "singleton",
25046
25105
  deviceTypes: [DeviceType.Camera],
25106
+ /**
25107
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25108
+ *
25109
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25110
+ * cap has no configuration surface at all: all six methods open, feed and
25111
+ * close one live audio session against one `deviceId`. That is the same
25112
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25113
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25114
+ * `admin` because they change what the device IS.
25115
+ *
25116
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25117
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25118
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25119
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25120
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25121
+ * camera 7.
25122
+ *
25123
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25124
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25125
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25126
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25127
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25128
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25129
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25130
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25131
+ * preset promises a cap no row of that preset can reach.
25132
+ */
25047
25133
  methods: {
25048
25134
  /**
25049
25135
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25056,7 +25142,7 @@ var intercomCapability = {
25056
25142
  sdpOffer: string()
25057
25143
  }), {
25058
25144
  kind: "mutation",
25059
- auth: "admin"
25145
+ auth: "protected"
25060
25146
  }),
25061
25147
  handleAnswer: method(object({
25062
25148
  deviceId: number(),
@@ -25064,7 +25150,7 @@ var intercomCapability = {
25064
25150
  sdpAnswer: string()
25065
25151
  }), _void(), {
25066
25152
  kind: "mutation",
25067
- auth: "admin"
25153
+ auth: "protected"
25068
25154
  }),
25069
25155
  /** Close explicitly. Server also auto-closes on 30s idle. */
25070
25156
  stopSession: method(object({
@@ -25072,7 +25158,7 @@ var intercomCapability = {
25072
25158
  sessionId: string()
25073
25159
  }), _void(), {
25074
25160
  kind: "mutation",
25075
- auth: "admin"
25161
+ auth: "protected"
25076
25162
  }),
25077
25163
  /**
25078
25164
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25085,7 +25171,7 @@ var intercomCapability = {
25085
25171
  */
25086
25172
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25087
25173
  kind: "mutation",
25088
- auth: "admin"
25174
+ auth: "protected"
25089
25175
  }),
25090
25176
  /**
25091
25177
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25120,12 +25206,12 @@ var intercomCapability = {
25120
25206
  sequenceNumber: number().int()
25121
25207
  }), object({ accepted: boolean() }), {
25122
25208
  kind: "mutation",
25123
- auth: "admin"
25209
+ auth: "protected"
25124
25210
  }),
25125
25211
  /** Close the raw-PCM talk session. Idempotent. */
25126
25212
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25127
25213
  kind: "mutation",
25128
- auth: "admin"
25214
+ auth: "protected"
25129
25215
  })
25130
25216
  },
25131
25217
  events: { onStatusChanged: { data: object({
@@ -27801,10 +27887,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27801
27887
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
27802
27888
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
27803
27889
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
27804
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
27805
- * annotations that are not exposed here and must not be treated as an event
27806
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
27807
- * (`interfaces/recording-config.ts`).
27890
+ * rows) and are the ONLY event surface — the recorder has none. The in-RAM
27891
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
27892
+ * ever read them. Event<->footage joins are by time, padded with the shared
27893
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
27808
27894
  */
27809
27895
  var RecordingStatusSchema = object({
27810
27896
  deviceId: number(),
package/dist/addon.mjs CHANGED
@@ -13910,6 +13910,50 @@ var NodeProcessSchema = object({
13910
13910
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
13911
13911
  uptimeSec: number()
13912
13912
  });
13913
+ /**
13914
+ * One retained container-memory reading.
13915
+ *
13916
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
13917
+ * a second clock: that is what makes "processes sum to X, container says Y"
13918
+ * subtractable per point rather than an eyeballed comparison of two series
13919
+ * sampled at different instants.
13920
+ *
13921
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
13922
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
13923
+ * never coexisted, and a mean would smear away the peak this exists to find.
13924
+ */
13925
+ var ContainerMemoryPointSchema = object({
13926
+ /** Which hierarchy answered, so a reading is never ambiguous. */
13927
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
13928
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
13929
+ currentBytes: number(),
13930
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
13931
+ limitBytes: number().nullable(),
13932
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
13933
+ anonBytes: number().nullable(),
13934
+ /** Page cache. Charged to the cgroup, owned by no process. */
13935
+ fileBytes: number().nullable(),
13936
+ /**
13937
+ * Shared memory — and the field that explained the largest single surprise.
13938
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
13939
+ * hardware-decode session holding DRM objects is charged HERE and appears
13940
+ * nowhere in a `ps` scan.
13941
+ */
13942
+ shmemBytes: number().nullable(),
13943
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
13944
+ slabBytes: number().nullable(),
13945
+ /**
13946
+ * Shrinkable i915 GEM object bytes, from debugfs.
13947
+ *
13948
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
13949
+ * component of `currentBytes` and must not be subtracted from it; it says
13950
+ * what put the shmem there, where `shmemBytes` only says how much.
13951
+ *
13952
+ * `null` wherever debugfs is not mounted — which is inside every camstack
13953
+ * container today — and on any node with no Intel GPU.
13954
+ */
13955
+ gpuShmemBytes: number().nullable()
13956
+ }).extend({ atMs: number() });
13913
13957
  var DumpHeapSnapshotInputSchema = object({
13914
13958
  /** The addon whose runner should dump a heap snapshot. */
13915
13959
  addonId: string() });
@@ -13973,6 +14017,21 @@ var NodeLoadSeriesSchema = object({
13973
14017
  /** One entry per function seen in the window, heaviest-first. */
13974
14018
  series: array(LoadFunctionSeriesSchema).readonly(),
13975
14019
  /**
14020
+ * The CONTAINER's memory over the same window, oldest-first.
14021
+ *
14022
+ * Sits next to `series` rather than in a method of its own because the whole
14023
+ * question is a subtraction: the per-process rows in `series` sum to one
14024
+ * number and this one is another, and an operator who has to issue two calls
14025
+ * to compare them will compare two different instants. Same reader, same
14026
+ * `sinceMs`, same `bucketMs`, same timestamps.
14027
+ *
14028
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14029
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14030
+ * points at all. A zero here would be indistinguishable from a healthy
14031
+ * container and is precisely the lie this field exists to avoid.
14032
+ */
14033
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14034
+ /**
13976
14035
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
13977
14036
  * reduction was needed — so a caller can always say what one point covers
13978
14037
  * without having to know whether it was reduced.
@@ -25023,6 +25082,33 @@ var intercomCapability = {
25023
25082
  deviceNative: true,
25024
25083
  mode: "singleton",
25025
25084
  deviceTypes: [DeviceType.Camera],
25085
+ /**
25086
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25087
+ *
25088
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25089
+ * cap has no configuration surface at all: all six methods open, feed and
25090
+ * close one live audio session against one `deviceId`. That is the same
25091
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25092
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25093
+ * `admin` because they change what the device IS.
25094
+ *
25095
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25096
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25097
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25098
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25099
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25100
+ * camera 7.
25101
+ *
25102
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25103
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25104
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25105
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25106
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25107
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25108
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25109
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25110
+ * preset promises a cap no row of that preset can reach.
25111
+ */
25026
25112
  methods: {
25027
25113
  /**
25028
25114
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25035,7 +25121,7 @@ var intercomCapability = {
25035
25121
  sdpOffer: string()
25036
25122
  }), {
25037
25123
  kind: "mutation",
25038
- auth: "admin"
25124
+ auth: "protected"
25039
25125
  }),
25040
25126
  handleAnswer: method(object({
25041
25127
  deviceId: number(),
@@ -25043,7 +25129,7 @@ var intercomCapability = {
25043
25129
  sdpAnswer: string()
25044
25130
  }), _void(), {
25045
25131
  kind: "mutation",
25046
- auth: "admin"
25132
+ auth: "protected"
25047
25133
  }),
25048
25134
  /** Close explicitly. Server also auto-closes on 30s idle. */
25049
25135
  stopSession: method(object({
@@ -25051,7 +25137,7 @@ var intercomCapability = {
25051
25137
  sessionId: string()
25052
25138
  }), _void(), {
25053
25139
  kind: "mutation",
25054
- auth: "admin"
25140
+ auth: "protected"
25055
25141
  }),
25056
25142
  /**
25057
25143
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25064,7 +25150,7 @@ var intercomCapability = {
25064
25150
  */
25065
25151
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25066
25152
  kind: "mutation",
25067
- auth: "admin"
25153
+ auth: "protected"
25068
25154
  }),
25069
25155
  /**
25070
25156
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25099,12 +25185,12 @@ var intercomCapability = {
25099
25185
  sequenceNumber: number().int()
25100
25186
  }), object({ accepted: boolean() }), {
25101
25187
  kind: "mutation",
25102
- auth: "admin"
25188
+ auth: "protected"
25103
25189
  }),
25104
25190
  /** Close the raw-PCM talk session. Idempotent. */
25105
25191
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25106
25192
  kind: "mutation",
25107
- auth: "admin"
25193
+ auth: "protected"
25108
25194
  })
25109
25195
  },
25110
25196
  events: { onStatusChanged: { data: object({
@@ -27780,10 +27866,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27780
27866
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
27781
27867
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
27782
27868
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
27783
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
27784
- * annotations that are not exposed here and must not be treated as an event
27785
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
27786
- * (`interfaces/recording-config.ts`).
27869
+ * rows) and are the ONLY event surface — the recorder has none. The in-RAM
27870
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
27871
+ * ever read them. Event<->footage joins are by time, padded with the shared
27872
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
27787
27873
  */
27788
27874
  var RecordingStatusSchema = object({
27789
27875
  deviceId: number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.2.43",
3
+ "version": "0.2.46",
4
4
  "description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
5
5
  "keywords": [
6
6
  "camstack",