@camstack/addon-import-alexa 0.2.40 → 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
@@ -25202,6 +25202,33 @@ var intercomCapability = {
25202
25202
  deviceNative: true,
25203
25203
  mode: "singleton",
25204
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
+ */
25205
25232
  methods: {
25206
25233
  /**
25207
25234
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25214,7 +25241,7 @@ var intercomCapability = {
25214
25241
  sdpOffer: string()
25215
25242
  }), {
25216
25243
  kind: "mutation",
25217
- auth: "admin"
25244
+ auth: "protected"
25218
25245
  }),
25219
25246
  handleAnswer: method(object({
25220
25247
  deviceId: number(),
@@ -25222,7 +25249,7 @@ var intercomCapability = {
25222
25249
  sdpAnswer: string()
25223
25250
  }), _void(), {
25224
25251
  kind: "mutation",
25225
- auth: "admin"
25252
+ auth: "protected"
25226
25253
  }),
25227
25254
  /** Close explicitly. Server also auto-closes on 30s idle. */
25228
25255
  stopSession: method(object({
@@ -25230,7 +25257,7 @@ var intercomCapability = {
25230
25257
  sessionId: string()
25231
25258
  }), _void(), {
25232
25259
  kind: "mutation",
25233
- auth: "admin"
25260
+ auth: "protected"
25234
25261
  }),
25235
25262
  /**
25236
25263
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25243,7 +25270,7 @@ var intercomCapability = {
25243
25270
  */
25244
25271
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25245
25272
  kind: "mutation",
25246
- auth: "admin"
25273
+ auth: "protected"
25247
25274
  }),
25248
25275
  /**
25249
25276
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25278,12 +25305,12 @@ var intercomCapability = {
25278
25305
  sequenceNumber: number().int()
25279
25306
  }), object({ accepted: boolean() }), {
25280
25307
  kind: "mutation",
25281
- auth: "admin"
25308
+ auth: "protected"
25282
25309
  }),
25283
25310
  /** Close the raw-PCM talk session. Idempotent. */
25284
25311
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25285
25312
  kind: "mutation",
25286
- auth: "admin"
25313
+ auth: "protected"
25287
25314
  })
25288
25315
  },
25289
25316
  events: { onStatusChanged: { data: object({
package/dist/addon.mjs CHANGED
@@ -25202,6 +25202,33 @@ var intercomCapability = {
25202
25202
  deviceNative: true,
25203
25203
  mode: "singleton",
25204
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
+ */
25205
25232
  methods: {
25206
25233
  /**
25207
25234
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25214,7 +25241,7 @@ var intercomCapability = {
25214
25241
  sdpOffer: string()
25215
25242
  }), {
25216
25243
  kind: "mutation",
25217
- auth: "admin"
25244
+ auth: "protected"
25218
25245
  }),
25219
25246
  handleAnswer: method(object({
25220
25247
  deviceId: number(),
@@ -25222,7 +25249,7 @@ var intercomCapability = {
25222
25249
  sdpAnswer: string()
25223
25250
  }), _void(), {
25224
25251
  kind: "mutation",
25225
- auth: "admin"
25252
+ auth: "protected"
25226
25253
  }),
25227
25254
  /** Close explicitly. Server also auto-closes on 30s idle. */
25228
25255
  stopSession: method(object({
@@ -25230,7 +25257,7 @@ var intercomCapability = {
25230
25257
  sessionId: string()
25231
25258
  }), _void(), {
25232
25259
  kind: "mutation",
25233
- auth: "admin"
25260
+ auth: "protected"
25234
25261
  }),
25235
25262
  /**
25236
25263
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25243,7 +25270,7 @@ var intercomCapability = {
25243
25270
  */
25244
25271
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25245
25272
  kind: "mutation",
25246
- auth: "admin"
25273
+ auth: "protected"
25247
25274
  }),
25248
25275
  /**
25249
25276
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25278,12 +25305,12 @@ var intercomCapability = {
25278
25305
  sequenceNumber: number().int()
25279
25306
  }), object({ accepted: boolean() }), {
25280
25307
  kind: "mutation",
25281
- auth: "admin"
25308
+ auth: "protected"
25282
25309
  }),
25283
25310
  /** Close the raw-PCM talk session. Idempotent. */
25284
25311
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25285
25312
  kind: "mutation",
25286
- auth: "admin"
25313
+ auth: "protected"
25287
25314
  })
25288
25315
  },
25289
25316
  events: { onStatusChanged: { data: object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.40",
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",