@camstack/addon-provider-dreo 0.2.41 → 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
@@ -25003,6 +25003,33 @@ var intercomCapability = {
25003
25003
  deviceNative: true,
25004
25004
  mode: "singleton",
25005
25005
  deviceTypes: [DeviceType.Camera],
25006
+ /**
25007
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25008
+ *
25009
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25010
+ * cap has no configuration surface at all: all six methods open, feed and
25011
+ * close one live audio session against one `deviceId`. That is the same
25012
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25013
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25014
+ * `admin` because they change what the device IS.
25015
+ *
25016
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25017
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25018
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25019
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25020
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25021
+ * camera 7.
25022
+ *
25023
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25024
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25025
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25026
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25027
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25028
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25029
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25030
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25031
+ * preset promises a cap no row of that preset can reach.
25032
+ */
25006
25033
  methods: {
25007
25034
  /**
25008
25035
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25015,7 +25042,7 @@ var intercomCapability = {
25015
25042
  sdpOffer: string()
25016
25043
  }), {
25017
25044
  kind: "mutation",
25018
- auth: "admin"
25045
+ auth: "protected"
25019
25046
  }),
25020
25047
  handleAnswer: method(object({
25021
25048
  deviceId: number(),
@@ -25023,7 +25050,7 @@ var intercomCapability = {
25023
25050
  sdpAnswer: string()
25024
25051
  }), _void(), {
25025
25052
  kind: "mutation",
25026
- auth: "admin"
25053
+ auth: "protected"
25027
25054
  }),
25028
25055
  /** Close explicitly. Server also auto-closes on 30s idle. */
25029
25056
  stopSession: method(object({
@@ -25031,7 +25058,7 @@ var intercomCapability = {
25031
25058
  sessionId: string()
25032
25059
  }), _void(), {
25033
25060
  kind: "mutation",
25034
- auth: "admin"
25061
+ auth: "protected"
25035
25062
  }),
25036
25063
  /**
25037
25064
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25044,7 +25071,7 @@ var intercomCapability = {
25044
25071
  */
25045
25072
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25046
25073
  kind: "mutation",
25047
- auth: "admin"
25074
+ auth: "protected"
25048
25075
  }),
25049
25076
  /**
25050
25077
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25079,12 +25106,12 @@ var intercomCapability = {
25079
25106
  sequenceNumber: number().int()
25080
25107
  }), object({ accepted: boolean() }), {
25081
25108
  kind: "mutation",
25082
- auth: "admin"
25109
+ auth: "protected"
25083
25110
  }),
25084
25111
  /** Close the raw-PCM talk session. Idempotent. */
25085
25112
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25086
25113
  kind: "mutation",
25087
- auth: "admin"
25114
+ auth: "protected"
25088
25115
  })
25089
25116
  },
25090
25117
  events: { onStatusChanged: { data: object({
package/dist/addon.mjs CHANGED
@@ -25004,6 +25004,33 @@ var intercomCapability = {
25004
25004
  deviceNative: true,
25005
25005
  mode: "singleton",
25006
25006
  deviceTypes: [DeviceType.Camera],
25007
+ /**
25008
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25009
+ *
25010
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25011
+ * cap has no configuration surface at all: all six methods open, feed and
25012
+ * close one live audio session against one `deviceId`. That is the same
25013
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25014
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25015
+ * `admin` because they change what the device IS.
25016
+ *
25017
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25018
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25019
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25020
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25021
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25022
+ * camera 7.
25023
+ *
25024
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25025
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25026
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25027
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25028
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25029
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25030
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25031
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25032
+ * preset promises a cap no row of that preset can reach.
25033
+ */
25007
25034
  methods: {
25008
25035
  /**
25009
25036
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25016,7 +25043,7 @@ var intercomCapability = {
25016
25043
  sdpOffer: string()
25017
25044
  }), {
25018
25045
  kind: "mutation",
25019
- auth: "admin"
25046
+ auth: "protected"
25020
25047
  }),
25021
25048
  handleAnswer: method(object({
25022
25049
  deviceId: number(),
@@ -25024,7 +25051,7 @@ var intercomCapability = {
25024
25051
  sdpAnswer: string()
25025
25052
  }), _void(), {
25026
25053
  kind: "mutation",
25027
- auth: "admin"
25054
+ auth: "protected"
25028
25055
  }),
25029
25056
  /** Close explicitly. Server also auto-closes on 30s idle. */
25030
25057
  stopSession: method(object({
@@ -25032,7 +25059,7 @@ var intercomCapability = {
25032
25059
  sessionId: string()
25033
25060
  }), _void(), {
25034
25061
  kind: "mutation",
25035
- auth: "admin"
25062
+ auth: "protected"
25036
25063
  }),
25037
25064
  /**
25038
25065
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25045,7 +25072,7 @@ var intercomCapability = {
25045
25072
  */
25046
25073
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25047
25074
  kind: "mutation",
25048
- auth: "admin"
25075
+ auth: "protected"
25049
25076
  }),
25050
25077
  /**
25051
25078
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25080,12 +25107,12 @@ var intercomCapability = {
25080
25107
  sequenceNumber: number().int()
25081
25108
  }), object({ accepted: boolean() }), {
25082
25109
  kind: "mutation",
25083
- auth: "admin"
25110
+ auth: "protected"
25084
25111
  }),
25085
25112
  /** Close the raw-PCM talk session. Idempotent. */
25086
25113
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25087
25114
  kind: "mutation",
25088
- auth: "admin"
25115
+ auth: "protected"
25089
25116
  })
25090
25117
  },
25091
25118
  events: { onStatusChanged: { data: object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreo",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
5
5
  "keywords": [
6
6
  "camstack",