@camstack/addon-matter-broker 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 +33 -6
- package/dist/addon.mjs +33 -6
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -25039,6 +25039,33 @@ var intercomCapability = {
|
|
|
25039
25039
|
deviceNative: true,
|
|
25040
25040
|
mode: "singleton",
|
|
25041
25041
|
deviceTypes: [DeviceType.Camera],
|
|
25042
|
+
/**
|
|
25043
|
+
* **Auth tier: `protected` on every method — deliberate, and load-bearing.**
|
|
25044
|
+
*
|
|
25045
|
+
* Talking through a camera is an OPERATE action, not a CONFIGURE one. This
|
|
25046
|
+
* cap has no configuration surface at all: all six methods open, feed and
|
|
25047
|
+
* close one live audio session against one `deviceId`. That is the same
|
|
25048
|
+
* authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
|
|
25049
|
+
* the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
|
|
25050
|
+
* `admin` because they change what the device IS.
|
|
25051
|
+
*
|
|
25052
|
+
* `protected` does not mean ungated: `protectedProcedure` runs the
|
|
25053
|
+
* `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
|
|
25054
|
+
* with `access: 'create'` and a `deviceId` in its input. So a caller needs a
|
|
25055
|
+
* grant that covers THAT camera at `create` — a `camera-viewer` (`view`
|
|
25056
|
+
* only) still cannot talk, and a grant on camera 5 cannot talk through
|
|
25057
|
+
* camera 7.
|
|
25058
|
+
*
|
|
25059
|
+
* Every method was `auth: 'admin'` from the initial commit, which made the
|
|
25060
|
+
* cap unreachable by every non-admin principal — `adminProcedure` throws
|
|
25061
|
+
* `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
|
|
25062
|
+
* machinery generated for this cap (`METHOD_ACCESS_MAP`,
|
|
25063
|
+
* `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
|
|
25064
|
+
* `camera-operator` scope preset has promised "PTZ control, intercom,
|
|
25065
|
+
* snapshots" since that same commit; the promise could not be kept. Recorded
|
|
25066
|
+
* as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
|
|
25067
|
+
* preset promises a cap no row of that preset can reach.
|
|
25068
|
+
*/
|
|
25042
25069
|
methods: {
|
|
25043
25070
|
/**
|
|
25044
25071
|
* Open a server-side WebRTC audio-only session. Returns an SDP
|
|
@@ -25051,7 +25078,7 @@ var intercomCapability = {
|
|
|
25051
25078
|
sdpOffer: string$2()
|
|
25052
25079
|
}), {
|
|
25053
25080
|
kind: "mutation",
|
|
25054
|
-
auth: "
|
|
25081
|
+
auth: "protected"
|
|
25055
25082
|
}),
|
|
25056
25083
|
handleAnswer: method(object({
|
|
25057
25084
|
deviceId: number(),
|
|
@@ -25059,7 +25086,7 @@ var intercomCapability = {
|
|
|
25059
25086
|
sdpAnswer: string$2()
|
|
25060
25087
|
}), _void(), {
|
|
25061
25088
|
kind: "mutation",
|
|
25062
|
-
auth: "
|
|
25089
|
+
auth: "protected"
|
|
25063
25090
|
}),
|
|
25064
25091
|
/** Close explicitly. Server also auto-closes on 30s idle. */
|
|
25065
25092
|
stopSession: method(object({
|
|
@@ -25067,7 +25094,7 @@ var intercomCapability = {
|
|
|
25067
25094
|
sessionId: string$2()
|
|
25068
25095
|
}), _void(), {
|
|
25069
25096
|
kind: "mutation",
|
|
25070
|
-
auth: "
|
|
25097
|
+
auth: "protected"
|
|
25071
25098
|
}),
|
|
25072
25099
|
/**
|
|
25073
25100
|
* Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
|
|
@@ -25080,7 +25107,7 @@ var intercomCapability = {
|
|
|
25080
25107
|
*/
|
|
25081
25108
|
startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string$2() }), {
|
|
25082
25109
|
kind: "mutation",
|
|
25083
|
-
auth: "
|
|
25110
|
+
auth: "protected"
|
|
25084
25111
|
}),
|
|
25085
25112
|
/**
|
|
25086
25113
|
* Push one chunk of talk-back audio onto the active talk session.
|
|
@@ -25115,12 +25142,12 @@ var intercomCapability = {
|
|
|
25115
25142
|
sequenceNumber: number().int()
|
|
25116
25143
|
}), object({ accepted: boolean() }), {
|
|
25117
25144
|
kind: "mutation",
|
|
25118
|
-
auth: "
|
|
25145
|
+
auth: "protected"
|
|
25119
25146
|
}),
|
|
25120
25147
|
/** Close the raw-PCM talk session. Idempotent. */
|
|
25121
25148
|
endTalkSession: method(object({ deviceId: number() }), _void(), {
|
|
25122
25149
|
kind: "mutation",
|
|
25123
|
-
auth: "
|
|
25150
|
+
auth: "protected"
|
|
25124
25151
|
})
|
|
25125
25152
|
},
|
|
25126
25153
|
events: { onStatusChanged: { data: object({
|
package/dist/addon.mjs
CHANGED
|
@@ -25037,6 +25037,33 @@ var intercomCapability = {
|
|
|
25037
25037
|
deviceNative: true,
|
|
25038
25038
|
mode: "singleton",
|
|
25039
25039
|
deviceTypes: [DeviceType.Camera],
|
|
25040
|
+
/**
|
|
25041
|
+
* **Auth tier: `protected` on every method — deliberate, and load-bearing.**
|
|
25042
|
+
*
|
|
25043
|
+
* Talking through a camera is an OPERATE action, not a CONFIGURE one. This
|
|
25044
|
+
* cap has no configuration surface at all: all six methods open, feed and
|
|
25045
|
+
* close one live audio session against one `deviceId`. That is the same
|
|
25046
|
+
* authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
|
|
25047
|
+
* the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
|
|
25048
|
+
* `admin` because they change what the device IS.
|
|
25049
|
+
*
|
|
25050
|
+
* `protected` does not mean ungated: `protectedProcedure` runs the
|
|
25051
|
+
* `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
|
|
25052
|
+
* with `access: 'create'` and a `deviceId` in its input. So a caller needs a
|
|
25053
|
+
* grant that covers THAT camera at `create` — a `camera-viewer` (`view`
|
|
25054
|
+
* only) still cannot talk, and a grant on camera 5 cannot talk through
|
|
25055
|
+
* camera 7.
|
|
25056
|
+
*
|
|
25057
|
+
* Every method was `auth: 'admin'` from the initial commit, which made the
|
|
25058
|
+
* cap unreachable by every non-admin principal — `adminProcedure` throws
|
|
25059
|
+
* `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
|
|
25060
|
+
* machinery generated for this cap (`METHOD_ACCESS_MAP`,
|
|
25061
|
+
* `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
|
|
25062
|
+
* `camera-operator` scope preset has promised "PTZ control, intercom,
|
|
25063
|
+
* snapshots" since that same commit; the promise could not be kept. Recorded
|
|
25064
|
+
* as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
|
|
25065
|
+
* preset promises a cap no row of that preset can reach.
|
|
25066
|
+
*/
|
|
25040
25067
|
methods: {
|
|
25041
25068
|
/**
|
|
25042
25069
|
* Open a server-side WebRTC audio-only session. Returns an SDP
|
|
@@ -25049,7 +25076,7 @@ var intercomCapability = {
|
|
|
25049
25076
|
sdpOffer: string$2()
|
|
25050
25077
|
}), {
|
|
25051
25078
|
kind: "mutation",
|
|
25052
|
-
auth: "
|
|
25079
|
+
auth: "protected"
|
|
25053
25080
|
}),
|
|
25054
25081
|
handleAnswer: method(object({
|
|
25055
25082
|
deviceId: number(),
|
|
@@ -25057,7 +25084,7 @@ var intercomCapability = {
|
|
|
25057
25084
|
sdpAnswer: string$2()
|
|
25058
25085
|
}), _void(), {
|
|
25059
25086
|
kind: "mutation",
|
|
25060
|
-
auth: "
|
|
25087
|
+
auth: "protected"
|
|
25061
25088
|
}),
|
|
25062
25089
|
/** Close explicitly. Server also auto-closes on 30s idle. */
|
|
25063
25090
|
stopSession: method(object({
|
|
@@ -25065,7 +25092,7 @@ var intercomCapability = {
|
|
|
25065
25092
|
sessionId: string$2()
|
|
25066
25093
|
}), _void(), {
|
|
25067
25094
|
kind: "mutation",
|
|
25068
|
-
auth: "
|
|
25095
|
+
auth: "protected"
|
|
25069
25096
|
}),
|
|
25070
25097
|
/**
|
|
25071
25098
|
* Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
|
|
@@ -25078,7 +25105,7 @@ var intercomCapability = {
|
|
|
25078
25105
|
*/
|
|
25079
25106
|
startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string$2() }), {
|
|
25080
25107
|
kind: "mutation",
|
|
25081
|
-
auth: "
|
|
25108
|
+
auth: "protected"
|
|
25082
25109
|
}),
|
|
25083
25110
|
/**
|
|
25084
25111
|
* Push one chunk of talk-back audio onto the active talk session.
|
|
@@ -25113,12 +25140,12 @@ var intercomCapability = {
|
|
|
25113
25140
|
sequenceNumber: number().int()
|
|
25114
25141
|
}), object({ accepted: boolean() }), {
|
|
25115
25142
|
kind: "mutation",
|
|
25116
|
-
auth: "
|
|
25143
|
+
auth: "protected"
|
|
25117
25144
|
}),
|
|
25118
25145
|
/** Close the raw-PCM talk session. Idempotent. */
|
|
25119
25146
|
endTalkSession: method(object({ deviceId: number() }), _void(), {
|
|
25120
25147
|
kind: "mutation",
|
|
25121
|
-
auth: "
|
|
25148
|
+
auth: "protected"
|
|
25122
25149
|
})
|
|
25123
25150
|
},
|
|
25124
25151
|
events: { onStatusChanged: { data: object({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-matter-broker",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.41",
|
|
4
4
|
"description": "Matter broker addon for CamStack — owns a Matter fabric (commissioning + the long-lived controller) via the matter.js controller and brokers commissioned Matter nodes into CamStack",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|