@camstack/addon-provider-wyze 0.2.45 → 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
@@ -25103,6 +25103,33 @@ var intercomCapability = {
25103
25103
  deviceNative: true,
25104
25104
  mode: "singleton",
25105
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
+ */
25106
25133
  methods: {
25107
25134
  /**
25108
25135
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25115,7 +25142,7 @@ var intercomCapability = {
25115
25142
  sdpOffer: string()
25116
25143
  }), {
25117
25144
  kind: "mutation",
25118
- auth: "admin"
25145
+ auth: "protected"
25119
25146
  }),
25120
25147
  handleAnswer: method(object({
25121
25148
  deviceId: number(),
@@ -25123,7 +25150,7 @@ var intercomCapability = {
25123
25150
  sdpAnswer: string()
25124
25151
  }), _void(), {
25125
25152
  kind: "mutation",
25126
- auth: "admin"
25153
+ auth: "protected"
25127
25154
  }),
25128
25155
  /** Close explicitly. Server also auto-closes on 30s idle. */
25129
25156
  stopSession: method(object({
@@ -25131,7 +25158,7 @@ var intercomCapability = {
25131
25158
  sessionId: string()
25132
25159
  }), _void(), {
25133
25160
  kind: "mutation",
25134
- auth: "admin"
25161
+ auth: "protected"
25135
25162
  }),
25136
25163
  /**
25137
25164
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25144,7 +25171,7 @@ var intercomCapability = {
25144
25171
  */
25145
25172
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25146
25173
  kind: "mutation",
25147
- auth: "admin"
25174
+ auth: "protected"
25148
25175
  }),
25149
25176
  /**
25150
25177
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25179,12 +25206,12 @@ var intercomCapability = {
25179
25206
  sequenceNumber: number().int()
25180
25207
  }), object({ accepted: boolean() }), {
25181
25208
  kind: "mutation",
25182
- auth: "admin"
25209
+ auth: "protected"
25183
25210
  }),
25184
25211
  /** Close the raw-PCM talk session. Idempotent. */
25185
25212
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25186
25213
  kind: "mutation",
25187
- auth: "admin"
25214
+ auth: "protected"
25188
25215
  })
25189
25216
  },
25190
25217
  events: { onStatusChanged: { data: object({
package/dist/addon.mjs CHANGED
@@ -25082,6 +25082,33 @@ var intercomCapability = {
25082
25082
  deviceNative: true,
25083
25083
  mode: "singleton",
25084
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
+ */
25085
25112
  methods: {
25086
25113
  /**
25087
25114
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25094,7 +25121,7 @@ var intercomCapability = {
25094
25121
  sdpOffer: string()
25095
25122
  }), {
25096
25123
  kind: "mutation",
25097
- auth: "admin"
25124
+ auth: "protected"
25098
25125
  }),
25099
25126
  handleAnswer: method(object({
25100
25127
  deviceId: number(),
@@ -25102,7 +25129,7 @@ var intercomCapability = {
25102
25129
  sdpAnswer: string()
25103
25130
  }), _void(), {
25104
25131
  kind: "mutation",
25105
- auth: "admin"
25132
+ auth: "protected"
25106
25133
  }),
25107
25134
  /** Close explicitly. Server also auto-closes on 30s idle. */
25108
25135
  stopSession: method(object({
@@ -25110,7 +25137,7 @@ var intercomCapability = {
25110
25137
  sessionId: string()
25111
25138
  }), _void(), {
25112
25139
  kind: "mutation",
25113
- auth: "admin"
25140
+ auth: "protected"
25114
25141
  }),
25115
25142
  /**
25116
25143
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25123,7 +25150,7 @@ var intercomCapability = {
25123
25150
  */
25124
25151
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25125
25152
  kind: "mutation",
25126
- auth: "admin"
25153
+ auth: "protected"
25127
25154
  }),
25128
25155
  /**
25129
25156
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25158,12 +25185,12 @@ var intercomCapability = {
25158
25185
  sequenceNumber: number().int()
25159
25186
  }), object({ accepted: boolean() }), {
25160
25187
  kind: "mutation",
25161
- auth: "admin"
25188
+ auth: "protected"
25162
25189
  }),
25163
25190
  /** Close the raw-PCM talk session. Idempotent. */
25164
25191
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25165
25192
  kind: "mutation",
25166
- auth: "admin"
25193
+ auth: "protected"
25167
25194
  })
25168
25195
  },
25169
25196
  events: { onStatusChanged: { data: object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.2.45",
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",