@camstack/addon-import-alexa 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
@@ -14125,6 +14125,50 @@ var NodeProcessSchema = object({
14125
14125
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
14126
14126
  uptimeSec: number()
14127
14127
  });
14128
+ /**
14129
+ * One retained container-memory reading.
14130
+ *
14131
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
14132
+ * a second clock: that is what makes "processes sum to X, container says Y"
14133
+ * subtractable per point rather than an eyeballed comparison of two series
14134
+ * sampled at different instants.
14135
+ *
14136
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
14137
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
14138
+ * never coexisted, and a mean would smear away the peak this exists to find.
14139
+ */
14140
+ var ContainerMemoryPointSchema = object({
14141
+ /** Which hierarchy answered, so a reading is never ambiguous. */
14142
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
14143
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
14144
+ currentBytes: number(),
14145
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
14146
+ limitBytes: number().nullable(),
14147
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
14148
+ anonBytes: number().nullable(),
14149
+ /** Page cache. Charged to the cgroup, owned by no process. */
14150
+ fileBytes: number().nullable(),
14151
+ /**
14152
+ * Shared memory — and the field that explained the largest single surprise.
14153
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
14154
+ * hardware-decode session holding DRM objects is charged HERE and appears
14155
+ * nowhere in a `ps` scan.
14156
+ */
14157
+ shmemBytes: number().nullable(),
14158
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
14159
+ slabBytes: number().nullable(),
14160
+ /**
14161
+ * Shrinkable i915 GEM object bytes, from debugfs.
14162
+ *
14163
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
14164
+ * component of `currentBytes` and must not be subtracted from it; it says
14165
+ * what put the shmem there, where `shmemBytes` only says how much.
14166
+ *
14167
+ * `null` wherever debugfs is not mounted — which is inside every camstack
14168
+ * container today — and on any node with no Intel GPU.
14169
+ */
14170
+ gpuShmemBytes: number().nullable()
14171
+ }).extend({ atMs: number() });
14128
14172
  var DumpHeapSnapshotInputSchema = object({
14129
14173
  /** The addon whose runner should dump a heap snapshot. */
14130
14174
  addonId: string() });
@@ -14188,6 +14232,21 @@ var NodeLoadSeriesSchema = object({
14188
14232
  /** One entry per function seen in the window, heaviest-first. */
14189
14233
  series: array(LoadFunctionSeriesSchema).readonly(),
14190
14234
  /**
14235
+ * The CONTAINER's memory over the same window, oldest-first.
14236
+ *
14237
+ * Sits next to `series` rather than in a method of its own because the whole
14238
+ * question is a subtraction: the per-process rows in `series` sum to one
14239
+ * number and this one is another, and an operator who has to issue two calls
14240
+ * to compare them will compare two different instants. Same reader, same
14241
+ * `sinceMs`, same `bucketMs`, same timestamps.
14242
+ *
14243
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14244
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14245
+ * points at all. A zero here would be indistinguishable from a healthy
14246
+ * container and is precisely the lie this field exists to avoid.
14247
+ */
14248
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14249
+ /**
14191
14250
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
14192
14251
  * reduction was needed — so a caller can always say what one point covers
14193
14252
  * without having to know whether it was reduced.
@@ -25143,6 +25202,33 @@ var intercomCapability = {
25143
25202
  deviceNative: true,
25144
25203
  mode: "singleton",
25145
25204
  deviceTypes: [DeviceType.Camera],
25205
+ /**
25206
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25207
+ *
25208
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25209
+ * cap has no configuration surface at all: all six methods open, feed and
25210
+ * close one live audio session against one `deviceId`. That is the same
25211
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25212
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25213
+ * `admin` because they change what the device IS.
25214
+ *
25215
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25216
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25217
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25218
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25219
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25220
+ * camera 7.
25221
+ *
25222
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25223
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25224
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25225
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25226
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25227
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25228
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25229
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25230
+ * preset promises a cap no row of that preset can reach.
25231
+ */
25146
25232
  methods: {
25147
25233
  /**
25148
25234
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25155,7 +25241,7 @@ var intercomCapability = {
25155
25241
  sdpOffer: string()
25156
25242
  }), {
25157
25243
  kind: "mutation",
25158
- auth: "admin"
25244
+ auth: "protected"
25159
25245
  }),
25160
25246
  handleAnswer: method(object({
25161
25247
  deviceId: number(),
@@ -25163,7 +25249,7 @@ var intercomCapability = {
25163
25249
  sdpAnswer: string()
25164
25250
  }), _void(), {
25165
25251
  kind: "mutation",
25166
- auth: "admin"
25252
+ auth: "protected"
25167
25253
  }),
25168
25254
  /** Close explicitly. Server also auto-closes on 30s idle. */
25169
25255
  stopSession: method(object({
@@ -25171,7 +25257,7 @@ var intercomCapability = {
25171
25257
  sessionId: string()
25172
25258
  }), _void(), {
25173
25259
  kind: "mutation",
25174
- auth: "admin"
25260
+ auth: "protected"
25175
25261
  }),
25176
25262
  /**
25177
25263
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25184,7 +25270,7 @@ var intercomCapability = {
25184
25270
  */
25185
25271
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25186
25272
  kind: "mutation",
25187
- auth: "admin"
25273
+ auth: "protected"
25188
25274
  }),
25189
25275
  /**
25190
25276
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25219,12 +25305,12 @@ var intercomCapability = {
25219
25305
  sequenceNumber: number().int()
25220
25306
  }), object({ accepted: boolean() }), {
25221
25307
  kind: "mutation",
25222
- auth: "admin"
25308
+ auth: "protected"
25223
25309
  }),
25224
25310
  /** Close the raw-PCM talk session. Idempotent. */
25225
25311
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25226
25312
  kind: "mutation",
25227
- auth: "admin"
25313
+ auth: "protected"
25228
25314
  })
25229
25315
  },
25230
25316
  events: { onStatusChanged: { data: object({
@@ -27900,10 +27986,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27900
27986
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
27901
27987
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
27902
27988
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
27903
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
27904
- * annotations that are not exposed here and must not be treated as an event
27905
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
27906
- * (`interfaces/recording-config.ts`).
27989
+ * rows) and are the ONLY event surface — the recorder has none. The in-RAM
27990
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
27991
+ * ever read them. Event<->footage joins are by time, padded with the shared
27992
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
27907
27993
  */
27908
27994
  var RecordingStatusSchema = object({
27909
27995
  deviceId: number(),
package/dist/addon.mjs CHANGED
@@ -14125,6 +14125,50 @@ var NodeProcessSchema = object({
14125
14125
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
14126
14126
  uptimeSec: number()
14127
14127
  });
14128
+ /**
14129
+ * One retained container-memory reading.
14130
+ *
14131
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
14132
+ * a second clock: that is what makes "processes sum to X, container says Y"
14133
+ * subtractable per point rather than an eyeballed comparison of two series
14134
+ * sampled at different instants.
14135
+ *
14136
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
14137
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
14138
+ * never coexisted, and a mean would smear away the peak this exists to find.
14139
+ */
14140
+ var ContainerMemoryPointSchema = object({
14141
+ /** Which hierarchy answered, so a reading is never ambiguous. */
14142
+ source: _enum(["cgroup-v2", "cgroup-v1"]),
14143
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
14144
+ currentBytes: number(),
14145
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
14146
+ limitBytes: number().nullable(),
14147
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
14148
+ anonBytes: number().nullable(),
14149
+ /** Page cache. Charged to the cgroup, owned by no process. */
14150
+ fileBytes: number().nullable(),
14151
+ /**
14152
+ * Shared memory — and the field that explained the largest single surprise.
14153
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
14154
+ * hardware-decode session holding DRM objects is charged HERE and appears
14155
+ * nowhere in a `ps` scan.
14156
+ */
14157
+ shmemBytes: number().nullable(),
14158
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
14159
+ slabBytes: number().nullable(),
14160
+ /**
14161
+ * Shrinkable i915 GEM object bytes, from debugfs.
14162
+ *
14163
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
14164
+ * component of `currentBytes` and must not be subtracted from it; it says
14165
+ * what put the shmem there, where `shmemBytes` only says how much.
14166
+ *
14167
+ * `null` wherever debugfs is not mounted — which is inside every camstack
14168
+ * container today — and on any node with no Intel GPU.
14169
+ */
14170
+ gpuShmemBytes: number().nullable()
14171
+ }).extend({ atMs: number() });
14128
14172
  var DumpHeapSnapshotInputSchema = object({
14129
14173
  /** The addon whose runner should dump a heap snapshot. */
14130
14174
  addonId: string() });
@@ -14188,6 +14232,21 @@ var NodeLoadSeriesSchema = object({
14188
14232
  /** One entry per function seen in the window, heaviest-first. */
14189
14233
  series: array(LoadFunctionSeriesSchema).readonly(),
14190
14234
  /**
14235
+ * The CONTAINER's memory over the same window, oldest-first.
14236
+ *
14237
+ * Sits next to `series` rather than in a method of its own because the whole
14238
+ * question is a subtraction: the per-process rows in `series` sum to one
14239
+ * number and this one is another, and an operator who has to issue two calls
14240
+ * to compare them will compare two different instants. Same reader, same
14241
+ * `sinceMs`, same `bucketMs`, same timestamps.
14242
+ *
14243
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
14244
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
14245
+ * points at all. A zero here would be indistinguishable from a healthy
14246
+ * container and is precisely the lie this field exists to avoid.
14247
+ */
14248
+ containerMemory: array(ContainerMemoryPointSchema).readonly(),
14249
+ /**
14191
14250
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
14192
14251
  * reduction was needed — so a caller can always say what one point covers
14193
14252
  * without having to know whether it was reduced.
@@ -25143,6 +25202,33 @@ var intercomCapability = {
25143
25202
  deviceNative: true,
25144
25203
  mode: "singleton",
25145
25204
  deviceTypes: [DeviceType.Camera],
25205
+ /**
25206
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25207
+ *
25208
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25209
+ * cap has no configuration surface at all: all six methods open, feed and
25210
+ * close one live audio session against one `deviceId`. That is the same
25211
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25212
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25213
+ * `admin` because they change what the device IS.
25214
+ *
25215
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25216
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25217
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25218
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25219
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25220
+ * camera 7.
25221
+ *
25222
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25223
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25224
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25225
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25226
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25227
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25228
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25229
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25230
+ * preset promises a cap no row of that preset can reach.
25231
+ */
25146
25232
  methods: {
25147
25233
  /**
25148
25234
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25155,7 +25241,7 @@ var intercomCapability = {
25155
25241
  sdpOffer: string()
25156
25242
  }), {
25157
25243
  kind: "mutation",
25158
- auth: "admin"
25244
+ auth: "protected"
25159
25245
  }),
25160
25246
  handleAnswer: method(object({
25161
25247
  deviceId: number(),
@@ -25163,7 +25249,7 @@ var intercomCapability = {
25163
25249
  sdpAnswer: string()
25164
25250
  }), _void(), {
25165
25251
  kind: "mutation",
25166
- auth: "admin"
25252
+ auth: "protected"
25167
25253
  }),
25168
25254
  /** Close explicitly. Server also auto-closes on 30s idle. */
25169
25255
  stopSession: method(object({
@@ -25171,7 +25257,7 @@ var intercomCapability = {
25171
25257
  sessionId: string()
25172
25258
  }), _void(), {
25173
25259
  kind: "mutation",
25174
- auth: "admin"
25260
+ auth: "protected"
25175
25261
  }),
25176
25262
  /**
25177
25263
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25184,7 +25270,7 @@ var intercomCapability = {
25184
25270
  */
25185
25271
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25186
25272
  kind: "mutation",
25187
- auth: "admin"
25273
+ auth: "protected"
25188
25274
  }),
25189
25275
  /**
25190
25276
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25219,12 +25305,12 @@ var intercomCapability = {
25219
25305
  sequenceNumber: number().int()
25220
25306
  }), object({ accepted: boolean() }), {
25221
25307
  kind: "mutation",
25222
- auth: "admin"
25308
+ auth: "protected"
25223
25309
  }),
25224
25310
  /** Close the raw-PCM talk session. Idempotent. */
25225
25311
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25226
25312
  kind: "mutation",
25227
- auth: "admin"
25313
+ auth: "protected"
25228
25314
  })
25229
25315
  },
25230
25316
  events: { onStatusChanged: { data: object({
@@ -27900,10 +27986,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27900
27986
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
27901
27987
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
27902
27988
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
27903
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
27904
- * annotations that are not exposed here and must not be treated as an event
27905
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
27906
- * (`interfaces/recording-config.ts`).
27989
+ * rows) and are the ONLY event surface — the recorder has none. The in-RAM
27990
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
27991
+ * ever read them. Event<->footage joins are by time, padded with the shared
27992
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
27907
27993
  */
27908
27994
  var RecordingStatusSchema = object({
27909
27995
  deviceId: number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.38",
3
+ "version": "0.2.41",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",