@camstack/addon-provider-petkit 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
@@ -26069,6 +26069,33 @@ var intercomCapability = {
26069
26069
  deviceNative: true,
26070
26070
  mode: "singleton",
26071
26071
  deviceTypes: [DeviceType.Camera],
26072
+ /**
26073
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
26074
+ *
26075
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
26076
+ * cap has no configuration surface at all: all six methods open, feed and
26077
+ * close one live audio session against one `deviceId`. That is the same
26078
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
26079
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
26080
+ * `admin` because they change what the device IS.
26081
+ *
26082
+ * `protected` does not mean ungated: `protectedProcedure` runs the
26083
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
26084
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
26085
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
26086
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
26087
+ * camera 7.
26088
+ *
26089
+ * Every method was `auth: 'admin'` from the initial commit, which made the
26090
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
26091
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
26092
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
26093
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
26094
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
26095
+ * snapshots" since that same commit; the promise could not be kept. Recorded
26096
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
26097
+ * preset promises a cap no row of that preset can reach.
26098
+ */
26072
26099
  methods: {
26073
26100
  /**
26074
26101
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -26081,7 +26108,7 @@ var intercomCapability = {
26081
26108
  sdpOffer: string()
26082
26109
  }), {
26083
26110
  kind: "mutation",
26084
- auth: "admin"
26111
+ auth: "protected"
26085
26112
  }),
26086
26113
  handleAnswer: method(object({
26087
26114
  deviceId: number(),
@@ -26089,7 +26116,7 @@ var intercomCapability = {
26089
26116
  sdpAnswer: string()
26090
26117
  }), _void(), {
26091
26118
  kind: "mutation",
26092
- auth: "admin"
26119
+ auth: "protected"
26093
26120
  }),
26094
26121
  /** Close explicitly. Server also auto-closes on 30s idle. */
26095
26122
  stopSession: method(object({
@@ -26097,7 +26124,7 @@ var intercomCapability = {
26097
26124
  sessionId: string()
26098
26125
  }), _void(), {
26099
26126
  kind: "mutation",
26100
- auth: "admin"
26127
+ auth: "protected"
26101
26128
  }),
26102
26129
  /**
26103
26130
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -26110,7 +26137,7 @@ var intercomCapability = {
26110
26137
  */
26111
26138
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
26112
26139
  kind: "mutation",
26113
- auth: "admin"
26140
+ auth: "protected"
26114
26141
  }),
26115
26142
  /**
26116
26143
  * Push one chunk of talk-back audio onto the active talk session.
@@ -26145,12 +26172,12 @@ var intercomCapability = {
26145
26172
  sequenceNumber: number().int()
26146
26173
  }), object({ accepted: boolean() }), {
26147
26174
  kind: "mutation",
26148
- auth: "admin"
26175
+ auth: "protected"
26149
26176
  }),
26150
26177
  /** Close the raw-PCM talk session. Idempotent. */
26151
26178
  endTalkSession: method(object({ deviceId: number() }), _void(), {
26152
26179
  kind: "mutation",
26153
- auth: "admin"
26180
+ auth: "protected"
26154
26181
  })
26155
26182
  },
26156
26183
  events: { onStatusChanged: { data: object({
package/dist/addon.mjs CHANGED
@@ -26068,6 +26068,33 @@ var intercomCapability = {
26068
26068
  deviceNative: true,
26069
26069
  mode: "singleton",
26070
26070
  deviceTypes: [DeviceType.Camera],
26071
+ /**
26072
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
26073
+ *
26074
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
26075
+ * cap has no configuration surface at all: all six methods open, feed and
26076
+ * close one live audio session against one `deviceId`. That is the same
26077
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
26078
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
26079
+ * `admin` because they change what the device IS.
26080
+ *
26081
+ * `protected` does not mean ungated: `protectedProcedure` runs the
26082
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
26083
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
26084
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
26085
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
26086
+ * camera 7.
26087
+ *
26088
+ * Every method was `auth: 'admin'` from the initial commit, which made the
26089
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
26090
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
26091
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
26092
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
26093
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
26094
+ * snapshots" since that same commit; the promise could not be kept. Recorded
26095
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
26096
+ * preset promises a cap no row of that preset can reach.
26097
+ */
26071
26098
  methods: {
26072
26099
  /**
26073
26100
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -26080,7 +26107,7 @@ var intercomCapability = {
26080
26107
  sdpOffer: string()
26081
26108
  }), {
26082
26109
  kind: "mutation",
26083
- auth: "admin"
26110
+ auth: "protected"
26084
26111
  }),
26085
26112
  handleAnswer: method(object({
26086
26113
  deviceId: number(),
@@ -26088,7 +26115,7 @@ var intercomCapability = {
26088
26115
  sdpAnswer: string()
26089
26116
  }), _void(), {
26090
26117
  kind: "mutation",
26091
- auth: "admin"
26118
+ auth: "protected"
26092
26119
  }),
26093
26120
  /** Close explicitly. Server also auto-closes on 30s idle. */
26094
26121
  stopSession: method(object({
@@ -26096,7 +26123,7 @@ var intercomCapability = {
26096
26123
  sessionId: string()
26097
26124
  }), _void(), {
26098
26125
  kind: "mutation",
26099
- auth: "admin"
26126
+ auth: "protected"
26100
26127
  }),
26101
26128
  /**
26102
26129
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -26109,7 +26136,7 @@ var intercomCapability = {
26109
26136
  */
26110
26137
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
26111
26138
  kind: "mutation",
26112
- auth: "admin"
26139
+ auth: "protected"
26113
26140
  }),
26114
26141
  /**
26115
26142
  * Push one chunk of talk-back audio onto the active talk session.
@@ -26144,12 +26171,12 @@ var intercomCapability = {
26144
26171
  sequenceNumber: number().int()
26145
26172
  }), object({ accepted: boolean() }), {
26146
26173
  kind: "mutation",
26147
- auth: "admin"
26174
+ auth: "protected"
26148
26175
  }),
26149
26176
  /** Close the raw-PCM talk session. Idempotent. */
26150
26177
  endTalkSession: method(object({ deviceId: number() }), _void(), {
26151
26178
  kind: "mutation",
26152
- auth: "admin"
26179
+ auth: "protected"
26153
26180
  })
26154
26181
  },
26155
26182
  events: { onStatusChanged: { data: object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-petkit",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "description": "PetKit smart-feeder device-provider addon for CamStack — wraps the @apocaliss92/nodepetkit PetKit cloud client",
5
5
  "keywords": [
6
6
  "camstack",