@camstack/addon-terminal 0.1.46 → 0.1.47
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
|
@@ -25134,6 +25134,33 @@ var intercomCapability = {
|
|
|
25134
25134
|
deviceNative: true,
|
|
25135
25135
|
mode: "singleton",
|
|
25136
25136
|
deviceTypes: [DeviceType.Camera],
|
|
25137
|
+
/**
|
|
25138
|
+
* **Auth tier: `protected` on every method — deliberate, and load-bearing.**
|
|
25139
|
+
*
|
|
25140
|
+
* Talking through a camera is an OPERATE action, not a CONFIGURE one. This
|
|
25141
|
+
* cap has no configuration surface at all: all six methods open, feed and
|
|
25142
|
+
* close one live audio session against one `deviceId`. That is the same
|
|
25143
|
+
* authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
|
|
25144
|
+
* the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
|
|
25145
|
+
* `admin` because they change what the device IS.
|
|
25146
|
+
*
|
|
25147
|
+
* `protected` does not mean ungated: `protectedProcedure` runs the
|
|
25148
|
+
* `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
|
|
25149
|
+
* with `access: 'create'` and a `deviceId` in its input. So a caller needs a
|
|
25150
|
+
* grant that covers THAT camera at `create` — a `camera-viewer` (`view`
|
|
25151
|
+
* only) still cannot talk, and a grant on camera 5 cannot talk through
|
|
25152
|
+
* camera 7.
|
|
25153
|
+
*
|
|
25154
|
+
* Every method was `auth: 'admin'` from the initial commit, which made the
|
|
25155
|
+
* cap unreachable by every non-admin principal — `adminProcedure` throws
|
|
25156
|
+
* `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
|
|
25157
|
+
* machinery generated for this cap (`METHOD_ACCESS_MAP`,
|
|
25158
|
+
* `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
|
|
25159
|
+
* `camera-operator` scope preset has promised "PTZ control, intercom,
|
|
25160
|
+
* snapshots" since that same commit; the promise could not be kept. Recorded
|
|
25161
|
+
* as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
|
|
25162
|
+
* preset promises a cap no row of that preset can reach.
|
|
25163
|
+
*/
|
|
25137
25164
|
methods: {
|
|
25138
25165
|
/**
|
|
25139
25166
|
* Open a server-side WebRTC audio-only session. Returns an SDP
|
|
@@ -25146,7 +25173,7 @@ var intercomCapability = {
|
|
|
25146
25173
|
sdpOffer: string()
|
|
25147
25174
|
}), {
|
|
25148
25175
|
kind: "mutation",
|
|
25149
|
-
auth: "
|
|
25176
|
+
auth: "protected"
|
|
25150
25177
|
}),
|
|
25151
25178
|
handleAnswer: method(object({
|
|
25152
25179
|
deviceId: number(),
|
|
@@ -25154,7 +25181,7 @@ var intercomCapability = {
|
|
|
25154
25181
|
sdpAnswer: string()
|
|
25155
25182
|
}), _void(), {
|
|
25156
25183
|
kind: "mutation",
|
|
25157
|
-
auth: "
|
|
25184
|
+
auth: "protected"
|
|
25158
25185
|
}),
|
|
25159
25186
|
/** Close explicitly. Server also auto-closes on 30s idle. */
|
|
25160
25187
|
stopSession: method(object({
|
|
@@ -25162,7 +25189,7 @@ var intercomCapability = {
|
|
|
25162
25189
|
sessionId: string()
|
|
25163
25190
|
}), _void(), {
|
|
25164
25191
|
kind: "mutation",
|
|
25165
|
-
auth: "
|
|
25192
|
+
auth: "protected"
|
|
25166
25193
|
}),
|
|
25167
25194
|
/**
|
|
25168
25195
|
* Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
|
|
@@ -25175,7 +25202,7 @@ var intercomCapability = {
|
|
|
25175
25202
|
*/
|
|
25176
25203
|
startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
|
|
25177
25204
|
kind: "mutation",
|
|
25178
|
-
auth: "
|
|
25205
|
+
auth: "protected"
|
|
25179
25206
|
}),
|
|
25180
25207
|
/**
|
|
25181
25208
|
* Push one chunk of talk-back audio onto the active talk session.
|
|
@@ -25210,12 +25237,12 @@ var intercomCapability = {
|
|
|
25210
25237
|
sequenceNumber: number().int()
|
|
25211
25238
|
}), object({ accepted: boolean() }), {
|
|
25212
25239
|
kind: "mutation",
|
|
25213
|
-
auth: "
|
|
25240
|
+
auth: "protected"
|
|
25214
25241
|
}),
|
|
25215
25242
|
/** Close the raw-PCM talk session. Idempotent. */
|
|
25216
25243
|
endTalkSession: method(object({ deviceId: number() }), _void(), {
|
|
25217
25244
|
kind: "mutation",
|
|
25218
|
-
auth: "
|
|
25245
|
+
auth: "protected"
|
|
25219
25246
|
})
|
|
25220
25247
|
},
|
|
25221
25248
|
events: { onStatusChanged: { data: object({
|
package/dist/addon.mjs
CHANGED
|
@@ -25111,6 +25111,33 @@ var intercomCapability = {
|
|
|
25111
25111
|
deviceNative: true,
|
|
25112
25112
|
mode: "singleton",
|
|
25113
25113
|
deviceTypes: [DeviceType.Camera],
|
|
25114
|
+
/**
|
|
25115
|
+
* **Auth tier: `protected` on every method — deliberate, and load-bearing.**
|
|
25116
|
+
*
|
|
25117
|
+
* Talking through a camera is an OPERATE action, not a CONFIGURE one. This
|
|
25118
|
+
* cap has no configuration surface at all: all six methods open, feed and
|
|
25119
|
+
* close one live audio session against one `deviceId`. That is the same
|
|
25120
|
+
* authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
|
|
25121
|
+
* the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
|
|
25122
|
+
* `admin` because they change what the device IS.
|
|
25123
|
+
*
|
|
25124
|
+
* `protected` does not mean ungated: `protectedProcedure` runs the
|
|
25125
|
+
* `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
|
|
25126
|
+
* with `access: 'create'` and a `deviceId` in its input. So a caller needs a
|
|
25127
|
+
* grant that covers THAT camera at `create` — a `camera-viewer` (`view`
|
|
25128
|
+
* only) still cannot talk, and a grant on camera 5 cannot talk through
|
|
25129
|
+
* camera 7.
|
|
25130
|
+
*
|
|
25131
|
+
* Every method was `auth: 'admin'` from the initial commit, which made the
|
|
25132
|
+
* cap unreachable by every non-admin principal — `adminProcedure` throws
|
|
25133
|
+
* `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
|
|
25134
|
+
* machinery generated for this cap (`METHOD_ACCESS_MAP`,
|
|
25135
|
+
* `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
|
|
25136
|
+
* `camera-operator` scope preset has promised "PTZ control, intercom,
|
|
25137
|
+
* snapshots" since that same commit; the promise could not be kept. Recorded
|
|
25138
|
+
* as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
|
|
25139
|
+
* preset promises a cap no row of that preset can reach.
|
|
25140
|
+
*/
|
|
25114
25141
|
methods: {
|
|
25115
25142
|
/**
|
|
25116
25143
|
* Open a server-side WebRTC audio-only session. Returns an SDP
|
|
@@ -25123,7 +25150,7 @@ var intercomCapability = {
|
|
|
25123
25150
|
sdpOffer: string()
|
|
25124
25151
|
}), {
|
|
25125
25152
|
kind: "mutation",
|
|
25126
|
-
auth: "
|
|
25153
|
+
auth: "protected"
|
|
25127
25154
|
}),
|
|
25128
25155
|
handleAnswer: method(object({
|
|
25129
25156
|
deviceId: number(),
|
|
@@ -25131,7 +25158,7 @@ var intercomCapability = {
|
|
|
25131
25158
|
sdpAnswer: string()
|
|
25132
25159
|
}), _void(), {
|
|
25133
25160
|
kind: "mutation",
|
|
25134
|
-
auth: "
|
|
25161
|
+
auth: "protected"
|
|
25135
25162
|
}),
|
|
25136
25163
|
/** Close explicitly. Server also auto-closes on 30s idle. */
|
|
25137
25164
|
stopSession: method(object({
|
|
@@ -25139,7 +25166,7 @@ var intercomCapability = {
|
|
|
25139
25166
|
sessionId: string()
|
|
25140
25167
|
}), _void(), {
|
|
25141
25168
|
kind: "mutation",
|
|
25142
|
-
auth: "
|
|
25169
|
+
auth: "protected"
|
|
25143
25170
|
}),
|
|
25144
25171
|
/**
|
|
25145
25172
|
* Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
|
|
@@ -25152,7 +25179,7 @@ var intercomCapability = {
|
|
|
25152
25179
|
*/
|
|
25153
25180
|
startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
|
|
25154
25181
|
kind: "mutation",
|
|
25155
|
-
auth: "
|
|
25182
|
+
auth: "protected"
|
|
25156
25183
|
}),
|
|
25157
25184
|
/**
|
|
25158
25185
|
* Push one chunk of talk-back audio onto the active talk session.
|
|
@@ -25187,12 +25214,12 @@ var intercomCapability = {
|
|
|
25187
25214
|
sequenceNumber: number().int()
|
|
25188
25215
|
}), object({ accepted: boolean() }), {
|
|
25189
25216
|
kind: "mutation",
|
|
25190
|
-
auth: "
|
|
25217
|
+
auth: "protected"
|
|
25191
25218
|
}),
|
|
25192
25219
|
/** Close the raw-PCM talk session. Idempotent. */
|
|
25193
25220
|
endTalkSession: method(object({ deviceId: number() }), _void(), {
|
|
25194
25221
|
kind: "mutation",
|
|
25195
|
-
auth: "
|
|
25222
|
+
auth: "protected"
|
|
25196
25223
|
})
|
|
25197
25224
|
},
|
|
25198
25225
|
events: { onStatusChanged: { data: object({
|