@camstack/addon-matter-broker 0.2.40 → 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 +154 -19
- package/dist/addon.mjs +154 -19
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -8053,18 +8053,61 @@ var RelocateFootageInputSchema = object({
|
|
|
8053
8053
|
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
8054
8054
|
var StorageMigrationLeaseInputSchema = object({ leaseId: string$2().min(1) });
|
|
8055
8055
|
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string$2().min(1) });
|
|
8056
|
+
/**
|
|
8057
|
+
* What a `relocateMedia` pass DOES. One engine, three passes — never a second
|
|
8058
|
+
* mover (the engine already walks both collections with a timestamp cursor and
|
|
8059
|
+
* already has a stamp-without-copy path).
|
|
8060
|
+
*
|
|
8061
|
+
* - `move` — the default and the historical behaviour: event-media and
|
|
8062
|
+
* retrain blobs move to `toLocationId` and their rows are
|
|
8063
|
+
* stamped. The enrolled gallery is skipped (D197).
|
|
8064
|
+
* - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
|
|
8065
|
+
* stamped with `toLocationId`. `toLocationId` here is the id the
|
|
8066
|
+
* bytes ALREADY sit on — today's `eventMedia` default — because
|
|
8067
|
+
* a NULL row means "wherever `eventMedia` points *now*", and the
|
|
8068
|
+
* instant a repoint moves that pointer the row reads from the
|
|
8069
|
+
* new disk while its bytes are on the old one.
|
|
8070
|
+
* - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
|
|
8071
|
+
* (enrolled-gallery) rows, which `move` deliberately skips.
|
|
8072
|
+
* `galleryMedia` is `cardinality: 'single'`, so this pass can
|
|
8073
|
+
* never run beside a live second location: it is stop-the-world
|
|
8074
|
+
* by construction, which is acceptable only because the gallery
|
|
8075
|
+
* is a few KB per enrolled sample.
|
|
8076
|
+
*/
|
|
8077
|
+
var MediaRelocateModeSchema = _enum([
|
|
8078
|
+
"move",
|
|
8079
|
+
"seal",
|
|
8080
|
+
"gallery"
|
|
8081
|
+
]);
|
|
8056
8082
|
var RelocateMediaInputSchema = object({
|
|
8057
8083
|
toLocationId: string$2(),
|
|
8058
|
-
throttleMbps: number().min(1).max(1e3).optional()
|
|
8084
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
8085
|
+
/** Omitted = `move`, the pre-existing behaviour. */
|
|
8086
|
+
mode: MediaRelocateModeSchema.optional()
|
|
8087
|
+
});
|
|
8088
|
+
/** How many rows still carry NO `locationId` — the population a repoint would
|
|
8089
|
+
* silently re-aim at a disk that does not hold their bytes. Zero is the only
|
|
8090
|
+
* value that permits a non-blocking `eventMedia` cutover. */
|
|
8091
|
+
var UnstampedEventMediaCountSchema = object({
|
|
8092
|
+
media: number().int().nonnegative(),
|
|
8093
|
+
retrainFrames: number().int().nonnegative(),
|
|
8094
|
+
total: number().int().nonnegative()
|
|
8059
8095
|
});
|
|
8060
8096
|
var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string$2().min(1) });
|
|
8061
|
-
/** The independently selectable logical storage classes
|
|
8062
|
-
*
|
|
8063
|
-
*
|
|
8097
|
+
/** The independently selectable logical storage classes — every class
|
|
8098
|
+
* `storage.listLocationDeclarations` reports, so an operator never meets a
|
|
8099
|
+
* Zod enum error where they should meet an explanation.
|
|
8100
|
+
*
|
|
8101
|
+
* `recordings` encompasses the high and mid segment profiles; `recordingsLow`
|
|
8102
|
+
* is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
|
|
8103
|
+
* enrolled gallery; `backups` is the system backup archive. The last two have
|
|
8104
|
+
* their own rules — see {@link StorageMigrationFindingCodeSchema}. */
|
|
8064
8105
|
var StorageMigrationClassSchema = _enum([
|
|
8065
8106
|
"recordings",
|
|
8066
8107
|
"recordingsLow",
|
|
8067
|
-
"eventMedia"
|
|
8108
|
+
"eventMedia",
|
|
8109
|
+
"backups",
|
|
8110
|
+
"galleryMedia"
|
|
8068
8111
|
]);
|
|
8069
8112
|
/** A destination is always an existing, fully-qualified location id. The
|
|
8070
8113
|
* migration API intentionally never changes a source location's `basePath`:
|
|
@@ -8072,20 +8115,56 @@ var StorageMigrationClassSchema = _enum([
|
|
|
8072
8115
|
var StorageMigrationDestinationsSchema = object({
|
|
8073
8116
|
recordings: string$2().min(1).optional(),
|
|
8074
8117
|
recordingsLow: string$2().min(1).optional(),
|
|
8075
|
-
eventMedia: string$2().min(1).optional()
|
|
8118
|
+
eventMedia: string$2().min(1).optional(),
|
|
8119
|
+
backups: string$2().min(1).optional(),
|
|
8120
|
+
galleryMedia: string$2().min(1).optional()
|
|
8076
8121
|
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
8122
|
+
/**
|
|
8123
|
+
* How a migration sequences the cutover against the byte move.
|
|
8124
|
+
*
|
|
8125
|
+
* - `blocking` — the historical order: pause, move every byte, repoint,
|
|
8126
|
+
* resume. Recording is stopped for the whole move. Right
|
|
8127
|
+
* for a small or a cold class, and the only legal mode for
|
|
8128
|
+
* a `cardinality: 'single'` class.
|
|
8129
|
+
* - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
|
|
8130
|
+
* refresh, resume, then move the past with everything
|
|
8131
|
+
* running. The pause is three bounded instants (a detach +
|
|
8132
|
+
* attach round, a write-gate drain, a lease) instead of one
|
|
8133
|
+
* bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
|
|
8134
|
+
* stopped recording under `blocking`; the same move is
|
|
8135
|
+
* seconds of stopped recording under `nonBlocking`.
|
|
8136
|
+
*
|
|
8137
|
+
* The mode is on the JOB, not only on the input, because `status` is where an
|
|
8138
|
+
* operator finds out which one is running.
|
|
8139
|
+
*/
|
|
8140
|
+
var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
|
|
8077
8141
|
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
8078
8142
|
var StorageMigrationInputSchema = object({
|
|
8079
8143
|
destinations: StorageMigrationDestinationsSchema,
|
|
8080
|
-
throttleMbps: number().min(1).max(1e3).optional()
|
|
8144
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
8145
|
+
/** Omitted = `blocking`, which stays the default. */
|
|
8146
|
+
mode: StorageMigrationModeSchema.optional()
|
|
8081
8147
|
});
|
|
8082
|
-
/**
|
|
8083
|
-
*
|
|
8084
|
-
*
|
|
8148
|
+
/**
|
|
8149
|
+
* The durable coordinator state machine.
|
|
8150
|
+
*
|
|
8151
|
+
* `blocking`:
|
|
8152
|
+
* planning → pausing → moving → verifying → repointing → refreshing → resuming → done
|
|
8153
|
+
*
|
|
8154
|
+
* `nonBlocking`:
|
|
8155
|
+
* planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
|
|
8156
|
+
*
|
|
8157
|
+
* Same phases, different order plus two new ones — not a second mover.
|
|
8158
|
+
* `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
|
|
8159
|
+
* `draining` runs the same movers UNLEASED, after every writer is back up.
|
|
8160
|
+
* `repointing` is still the only phase that changes a default location.
|
|
8161
|
+
*/
|
|
8085
8162
|
var StorageMigrationPhaseSchema = _enum([
|
|
8086
8163
|
"planning",
|
|
8164
|
+
"sealing",
|
|
8087
8165
|
"pausing",
|
|
8088
8166
|
"moving",
|
|
8167
|
+
"draining",
|
|
8089
8168
|
"verifying",
|
|
8090
8169
|
"repointing",
|
|
8091
8170
|
"refreshing",
|
|
@@ -8110,6 +8189,9 @@ var StorageMigrationMoveSchema = object({
|
|
|
8110
8189
|
var StorageMigrationJobSchema = object({
|
|
8111
8190
|
jobId: string$2(),
|
|
8112
8191
|
phase: StorageMigrationPhaseSchema,
|
|
8192
|
+
/** Which order this job is running. `status` is the only place an operator
|
|
8193
|
+
* can tell a seconds-long cutover from a thirty-hour one. */
|
|
8194
|
+
mode: StorageMigrationModeSchema,
|
|
8113
8195
|
destinations: StorageMigrationDestinationsSchema,
|
|
8114
8196
|
throttleMbps: number(),
|
|
8115
8197
|
moves: array(StorageMigrationMoveSchema),
|
|
@@ -8122,13 +8204,30 @@ var StorageMigrationJobSchema = object({
|
|
|
8122
8204
|
finishedAt: number().nullable(),
|
|
8123
8205
|
error: string$2().nullable()
|
|
8124
8206
|
});
|
|
8207
|
+
var StorageMigrationFindingSchema = object({
|
|
8208
|
+
code: _enum([
|
|
8209
|
+
"sharesDeviceWithSource",
|
|
8210
|
+
"deviceIdentityUnknown",
|
|
8211
|
+
"unstampedEventMediaRows",
|
|
8212
|
+
"blockingOnly",
|
|
8213
|
+
"noMover"
|
|
8214
|
+
]),
|
|
8215
|
+
storageClass: StorageMigrationClassSchema,
|
|
8216
|
+
/** Human-readable, already carrying the ids and counts. */
|
|
8217
|
+
message: string$2()
|
|
8218
|
+
});
|
|
8125
8219
|
var StorageMigrationPlanSchema = object({
|
|
8126
8220
|
destinations: StorageMigrationDestinationsSchema,
|
|
8221
|
+
/** The mode this plan was built for. A plan is only valid for its mode: the
|
|
8222
|
+
* `eventMedia` seal gate and the single-cardinality refusal both depend on
|
|
8223
|
+
* it. */
|
|
8224
|
+
mode: StorageMigrationModeSchema,
|
|
8127
8225
|
moves: array(object({
|
|
8128
8226
|
storageClass: StorageMigrationClassSchema,
|
|
8129
8227
|
fromLocationId: string$2(),
|
|
8130
8228
|
toLocationId: string$2()
|
|
8131
|
-
}))
|
|
8229
|
+
})),
|
|
8230
|
+
findings: array(StorageMigrationFindingSchema)
|
|
8132
8231
|
});
|
|
8133
8232
|
/**
|
|
8134
8233
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -19047,7 +19146,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19047
19146
|
}), method(RelocateMediaInputSchema, object({ jobId: string$2() }), {
|
|
19048
19147
|
kind: "mutation",
|
|
19049
19148
|
auth: "admin"
|
|
19050
|
-
}), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
19149
|
+
}), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
19051
19150
|
kind: "query",
|
|
19052
19151
|
auth: "admin"
|
|
19053
19152
|
}), method(object({ jobId: string$2() }), object({ cancelled: boolean() }), {
|
|
@@ -20954,7 +21053,10 @@ method(object({
|
|
|
20954
21053
|
}), StorageLocationSchema, {
|
|
20955
21054
|
kind: "mutation",
|
|
20956
21055
|
auth: "admin"
|
|
20957
|
-
}), method(object({
|
|
21056
|
+
}), method(object({
|
|
21057
|
+
id: string$2(),
|
|
21058
|
+
force: boolean().optional()
|
|
21059
|
+
}), _void(), {
|
|
20958
21060
|
kind: "mutation",
|
|
20959
21061
|
auth: "admin"
|
|
20960
21062
|
}), method(object({ id: string$2() }), object({
|
|
@@ -25039,6 +25141,33 @@ var intercomCapability = {
|
|
|
25039
25141
|
deviceNative: true,
|
|
25040
25142
|
mode: "singleton",
|
|
25041
25143
|
deviceTypes: [DeviceType.Camera],
|
|
25144
|
+
/**
|
|
25145
|
+
* **Auth tier: `protected` on every method — deliberate, and load-bearing.**
|
|
25146
|
+
*
|
|
25147
|
+
* Talking through a camera is an OPERATE action, not a CONFIGURE one. This
|
|
25148
|
+
* cap has no configuration surface at all: all six methods open, feed and
|
|
25149
|
+
* close one live audio session against one `deviceId`. That is the same
|
|
25150
|
+
* authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
|
|
25151
|
+
* the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
|
|
25152
|
+
* `admin` because they change what the device IS.
|
|
25153
|
+
*
|
|
25154
|
+
* `protected` does not mean ungated: `protectedProcedure` runs the
|
|
25155
|
+
* `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
|
|
25156
|
+
* with `access: 'create'` and a `deviceId` in its input. So a caller needs a
|
|
25157
|
+
* grant that covers THAT camera at `create` — a `camera-viewer` (`view`
|
|
25158
|
+
* only) still cannot talk, and a grant on camera 5 cannot talk through
|
|
25159
|
+
* camera 7.
|
|
25160
|
+
*
|
|
25161
|
+
* Every method was `auth: 'admin'` from the initial commit, which made the
|
|
25162
|
+
* cap unreachable by every non-admin principal — `adminProcedure` throws
|
|
25163
|
+
* `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
|
|
25164
|
+
* machinery generated for this cap (`METHOD_ACCESS_MAP`,
|
|
25165
|
+
* `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
|
|
25166
|
+
* `camera-operator` scope preset has promised "PTZ control, intercom,
|
|
25167
|
+
* snapshots" since that same commit; the promise could not be kept. Recorded
|
|
25168
|
+
* as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
|
|
25169
|
+
* preset promises a cap no row of that preset can reach.
|
|
25170
|
+
*/
|
|
25042
25171
|
methods: {
|
|
25043
25172
|
/**
|
|
25044
25173
|
* Open a server-side WebRTC audio-only session. Returns an SDP
|
|
@@ -25051,7 +25180,7 @@ var intercomCapability = {
|
|
|
25051
25180
|
sdpOffer: string$2()
|
|
25052
25181
|
}), {
|
|
25053
25182
|
kind: "mutation",
|
|
25054
|
-
auth: "
|
|
25183
|
+
auth: "protected"
|
|
25055
25184
|
}),
|
|
25056
25185
|
handleAnswer: method(object({
|
|
25057
25186
|
deviceId: number(),
|
|
@@ -25059,7 +25188,7 @@ var intercomCapability = {
|
|
|
25059
25188
|
sdpAnswer: string$2()
|
|
25060
25189
|
}), _void(), {
|
|
25061
25190
|
kind: "mutation",
|
|
25062
|
-
auth: "
|
|
25191
|
+
auth: "protected"
|
|
25063
25192
|
}),
|
|
25064
25193
|
/** Close explicitly. Server also auto-closes on 30s idle. */
|
|
25065
25194
|
stopSession: method(object({
|
|
@@ -25067,7 +25196,7 @@ var intercomCapability = {
|
|
|
25067
25196
|
sessionId: string$2()
|
|
25068
25197
|
}), _void(), {
|
|
25069
25198
|
kind: "mutation",
|
|
25070
|
-
auth: "
|
|
25199
|
+
auth: "protected"
|
|
25071
25200
|
}),
|
|
25072
25201
|
/**
|
|
25073
25202
|
* Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
|
|
@@ -25080,7 +25209,7 @@ var intercomCapability = {
|
|
|
25080
25209
|
*/
|
|
25081
25210
|
startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string$2() }), {
|
|
25082
25211
|
kind: "mutation",
|
|
25083
|
-
auth: "
|
|
25212
|
+
auth: "protected"
|
|
25084
25213
|
}),
|
|
25085
25214
|
/**
|
|
25086
25215
|
* Push one chunk of talk-back audio onto the active talk session.
|
|
@@ -25115,12 +25244,12 @@ var intercomCapability = {
|
|
|
25115
25244
|
sequenceNumber: number().int()
|
|
25116
25245
|
}), object({ accepted: boolean() }), {
|
|
25117
25246
|
kind: "mutation",
|
|
25118
|
-
auth: "
|
|
25247
|
+
auth: "protected"
|
|
25119
25248
|
}),
|
|
25120
25249
|
/** Close the raw-PCM talk session. Idempotent. */
|
|
25121
25250
|
endTalkSession: method(object({ deviceId: number() }), _void(), {
|
|
25122
25251
|
kind: "mutation",
|
|
25123
|
-
auth: "
|
|
25252
|
+
auth: "protected"
|
|
25124
25253
|
})
|
|
25125
25254
|
},
|
|
25126
25255
|
events: { onStatusChanged: { data: object({
|
|
@@ -34801,6 +34930,12 @@ Object.freeze({
|
|
|
34801
34930
|
addonId: null,
|
|
34802
34931
|
access: "create"
|
|
34803
34932
|
},
|
|
34933
|
+
"pipelineAnalytics.countUnstampedEventMedia": {
|
|
34934
|
+
capName: "pipeline-analytics",
|
|
34935
|
+
capScope: "device",
|
|
34936
|
+
addonId: null,
|
|
34937
|
+
access: "view"
|
|
34938
|
+
},
|
|
34804
34939
|
"pipelineAnalytics.deleteDeviceEvents": {
|
|
34805
34940
|
capName: "pipeline-analytics",
|
|
34806
34941
|
capScope: "device",
|
package/dist/addon.mjs
CHANGED
|
@@ -8051,18 +8051,61 @@ var RelocateFootageInputSchema = object({
|
|
|
8051
8051
|
* `RecordingConfig.enabled` or camera wrapper bindings. */
|
|
8052
8052
|
var StorageMigrationLeaseInputSchema = object({ leaseId: string$2().min(1) });
|
|
8053
8053
|
var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string$2().min(1) });
|
|
8054
|
+
/**
|
|
8055
|
+
* What a `relocateMedia` pass DOES. One engine, three passes — never a second
|
|
8056
|
+
* mover (the engine already walks both collections with a timestamp cursor and
|
|
8057
|
+
* already has a stamp-without-copy path).
|
|
8058
|
+
*
|
|
8059
|
+
* - `move` — the default and the historical behaviour: event-media and
|
|
8060
|
+
* retrain blobs move to `toLocationId` and their rows are
|
|
8061
|
+
* stamped. The enrolled gallery is skipped (D197).
|
|
8062
|
+
* - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
|
|
8063
|
+
* stamped with `toLocationId`. `toLocationId` here is the id the
|
|
8064
|
+
* bytes ALREADY sit on — today's `eventMedia` default — because
|
|
8065
|
+
* a NULL row means "wherever `eventMedia` points *now*", and the
|
|
8066
|
+
* instant a repoint moves that pointer the row reads from the
|
|
8067
|
+
* new disk while its bytes are on the old one.
|
|
8068
|
+
* - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
|
|
8069
|
+
* (enrolled-gallery) rows, which `move` deliberately skips.
|
|
8070
|
+
* `galleryMedia` is `cardinality: 'single'`, so this pass can
|
|
8071
|
+
* never run beside a live second location: it is stop-the-world
|
|
8072
|
+
* by construction, which is acceptable only because the gallery
|
|
8073
|
+
* is a few KB per enrolled sample.
|
|
8074
|
+
*/
|
|
8075
|
+
var MediaRelocateModeSchema = _enum([
|
|
8076
|
+
"move",
|
|
8077
|
+
"seal",
|
|
8078
|
+
"gallery"
|
|
8079
|
+
]);
|
|
8054
8080
|
var RelocateMediaInputSchema = object({
|
|
8055
8081
|
toLocationId: string$2(),
|
|
8056
|
-
throttleMbps: number().min(1).max(1e3).optional()
|
|
8082
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
8083
|
+
/** Omitted = `move`, the pre-existing behaviour. */
|
|
8084
|
+
mode: MediaRelocateModeSchema.optional()
|
|
8085
|
+
});
|
|
8086
|
+
/** How many rows still carry NO `locationId` — the population a repoint would
|
|
8087
|
+
* silently re-aim at a disk that does not hold their bytes. Zero is the only
|
|
8088
|
+
* value that permits a non-blocking `eventMedia` cutover. */
|
|
8089
|
+
var UnstampedEventMediaCountSchema = object({
|
|
8090
|
+
media: number().int().nonnegative(),
|
|
8091
|
+
retrainFrames: number().int().nonnegative(),
|
|
8092
|
+
total: number().int().nonnegative()
|
|
8057
8093
|
});
|
|
8058
8094
|
var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string$2().min(1) });
|
|
8059
|
-
/** The independently selectable logical storage classes
|
|
8060
|
-
*
|
|
8061
|
-
*
|
|
8095
|
+
/** The independently selectable logical storage classes — every class
|
|
8096
|
+
* `storage.listLocationDeclarations` reports, so an operator never meets a
|
|
8097
|
+
* Zod enum error where they should meet an explanation.
|
|
8098
|
+
*
|
|
8099
|
+
* `recordings` encompasses the high and mid segment profiles; `recordingsLow`
|
|
8100
|
+
* is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
|
|
8101
|
+
* enrolled gallery; `backups` is the system backup archive. The last two have
|
|
8102
|
+
* their own rules — see {@link StorageMigrationFindingCodeSchema}. */
|
|
8062
8103
|
var StorageMigrationClassSchema = _enum([
|
|
8063
8104
|
"recordings",
|
|
8064
8105
|
"recordingsLow",
|
|
8065
|
-
"eventMedia"
|
|
8106
|
+
"eventMedia",
|
|
8107
|
+
"backups",
|
|
8108
|
+
"galleryMedia"
|
|
8066
8109
|
]);
|
|
8067
8110
|
/** A destination is always an existing, fully-qualified location id. The
|
|
8068
8111
|
* migration API intentionally never changes a source location's `basePath`:
|
|
@@ -8070,20 +8113,56 @@ var StorageMigrationClassSchema = _enum([
|
|
|
8070
8113
|
var StorageMigrationDestinationsSchema = object({
|
|
8071
8114
|
recordings: string$2().min(1).optional(),
|
|
8072
8115
|
recordingsLow: string$2().min(1).optional(),
|
|
8073
|
-
eventMedia: string$2().min(1).optional()
|
|
8116
|
+
eventMedia: string$2().min(1).optional(),
|
|
8117
|
+
backups: string$2().min(1).optional(),
|
|
8118
|
+
galleryMedia: string$2().min(1).optional()
|
|
8074
8119
|
}).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
|
|
8120
|
+
/**
|
|
8121
|
+
* How a migration sequences the cutover against the byte move.
|
|
8122
|
+
*
|
|
8123
|
+
* - `blocking` — the historical order: pause, move every byte, repoint,
|
|
8124
|
+
* resume. Recording is stopped for the whole move. Right
|
|
8125
|
+
* for a small or a cold class, and the only legal mode for
|
|
8126
|
+
* a `cardinality: 'single'` class.
|
|
8127
|
+
* - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
|
|
8128
|
+
* refresh, resume, then move the past with everything
|
|
8129
|
+
* running. The pause is three bounded instants (a detach +
|
|
8130
|
+
* attach round, a write-gate drain, a lease) instead of one
|
|
8131
|
+
* bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
|
|
8132
|
+
* stopped recording under `blocking`; the same move is
|
|
8133
|
+
* seconds of stopped recording under `nonBlocking`.
|
|
8134
|
+
*
|
|
8135
|
+
* The mode is on the JOB, not only on the input, because `status` is where an
|
|
8136
|
+
* operator finds out which one is running.
|
|
8137
|
+
*/
|
|
8138
|
+
var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
|
|
8075
8139
|
/** Shared input for planning and starting an orchestrated storage migration. */
|
|
8076
8140
|
var StorageMigrationInputSchema = object({
|
|
8077
8141
|
destinations: StorageMigrationDestinationsSchema,
|
|
8078
|
-
throttleMbps: number().min(1).max(1e3).optional()
|
|
8142
|
+
throttleMbps: number().min(1).max(1e3).optional(),
|
|
8143
|
+
/** Omitted = `blocking`, which stays the default. */
|
|
8144
|
+
mode: StorageMigrationModeSchema.optional()
|
|
8079
8145
|
});
|
|
8080
|
-
/**
|
|
8081
|
-
*
|
|
8082
|
-
*
|
|
8146
|
+
/**
|
|
8147
|
+
* The durable coordinator state machine.
|
|
8148
|
+
*
|
|
8149
|
+
* `blocking`:
|
|
8150
|
+
* planning → pausing → moving → verifying → repointing → refreshing → resuming → done
|
|
8151
|
+
*
|
|
8152
|
+
* `nonBlocking`:
|
|
8153
|
+
* planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
|
|
8154
|
+
*
|
|
8155
|
+
* Same phases, different order plus two new ones — not a second mover.
|
|
8156
|
+
* `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
|
|
8157
|
+
* `draining` runs the same movers UNLEASED, after every writer is back up.
|
|
8158
|
+
* `repointing` is still the only phase that changes a default location.
|
|
8159
|
+
*/
|
|
8083
8160
|
var StorageMigrationPhaseSchema = _enum([
|
|
8084
8161
|
"planning",
|
|
8162
|
+
"sealing",
|
|
8085
8163
|
"pausing",
|
|
8086
8164
|
"moving",
|
|
8165
|
+
"draining",
|
|
8087
8166
|
"verifying",
|
|
8088
8167
|
"repointing",
|
|
8089
8168
|
"refreshing",
|
|
@@ -8108,6 +8187,9 @@ var StorageMigrationMoveSchema = object({
|
|
|
8108
8187
|
var StorageMigrationJobSchema = object({
|
|
8109
8188
|
jobId: string$2(),
|
|
8110
8189
|
phase: StorageMigrationPhaseSchema,
|
|
8190
|
+
/** Which order this job is running. `status` is the only place an operator
|
|
8191
|
+
* can tell a seconds-long cutover from a thirty-hour one. */
|
|
8192
|
+
mode: StorageMigrationModeSchema,
|
|
8111
8193
|
destinations: StorageMigrationDestinationsSchema,
|
|
8112
8194
|
throttleMbps: number(),
|
|
8113
8195
|
moves: array(StorageMigrationMoveSchema),
|
|
@@ -8120,13 +8202,30 @@ var StorageMigrationJobSchema = object({
|
|
|
8120
8202
|
finishedAt: number().nullable(),
|
|
8121
8203
|
error: string$2().nullable()
|
|
8122
8204
|
});
|
|
8205
|
+
var StorageMigrationFindingSchema = object({
|
|
8206
|
+
code: _enum([
|
|
8207
|
+
"sharesDeviceWithSource",
|
|
8208
|
+
"deviceIdentityUnknown",
|
|
8209
|
+
"unstampedEventMediaRows",
|
|
8210
|
+
"blockingOnly",
|
|
8211
|
+
"noMover"
|
|
8212
|
+
]),
|
|
8213
|
+
storageClass: StorageMigrationClassSchema,
|
|
8214
|
+
/** Human-readable, already carrying the ids and counts. */
|
|
8215
|
+
message: string$2()
|
|
8216
|
+
});
|
|
8123
8217
|
var StorageMigrationPlanSchema = object({
|
|
8124
8218
|
destinations: StorageMigrationDestinationsSchema,
|
|
8219
|
+
/** The mode this plan was built for. A plan is only valid for its mode: the
|
|
8220
|
+
* `eventMedia` seal gate and the single-cardinality refusal both depend on
|
|
8221
|
+
* it. */
|
|
8222
|
+
mode: StorageMigrationModeSchema,
|
|
8125
8223
|
moves: array(object({
|
|
8126
8224
|
storageClass: StorageMigrationClassSchema,
|
|
8127
8225
|
fromLocationId: string$2(),
|
|
8128
8226
|
toLocationId: string$2()
|
|
8129
|
-
}))
|
|
8227
|
+
})),
|
|
8228
|
+
findings: array(StorageMigrationFindingSchema)
|
|
8130
8229
|
});
|
|
8131
8230
|
/**
|
|
8132
8231
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -19045,7 +19144,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19045
19144
|
}), method(RelocateMediaInputSchema, object({ jobId: string$2() }), {
|
|
19046
19145
|
kind: "mutation",
|
|
19047
19146
|
auth: "admin"
|
|
19048
|
-
}), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
19147
|
+
}), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
19049
19148
|
kind: "query",
|
|
19050
19149
|
auth: "admin"
|
|
19051
19150
|
}), method(object({ jobId: string$2() }), object({ cancelled: boolean() }), {
|
|
@@ -20952,7 +21051,10 @@ method(object({
|
|
|
20952
21051
|
}), StorageLocationSchema, {
|
|
20953
21052
|
kind: "mutation",
|
|
20954
21053
|
auth: "admin"
|
|
20955
|
-
}), method(object({
|
|
21054
|
+
}), method(object({
|
|
21055
|
+
id: string$2(),
|
|
21056
|
+
force: boolean().optional()
|
|
21057
|
+
}), _void(), {
|
|
20956
21058
|
kind: "mutation",
|
|
20957
21059
|
auth: "admin"
|
|
20958
21060
|
}), method(object({ id: string$2() }), object({
|
|
@@ -25037,6 +25139,33 @@ var intercomCapability = {
|
|
|
25037
25139
|
deviceNative: true,
|
|
25038
25140
|
mode: "singleton",
|
|
25039
25141
|
deviceTypes: [DeviceType.Camera],
|
|
25142
|
+
/**
|
|
25143
|
+
* **Auth tier: `protected` on every method — deliberate, and load-bearing.**
|
|
25144
|
+
*
|
|
25145
|
+
* Talking through a camera is an OPERATE action, not a CONFIGURE one. This
|
|
25146
|
+
* cap has no configuration surface at all: all six methods open, feed and
|
|
25147
|
+
* close one live audio session against one `deviceId`. That is the same
|
|
25148
|
+
* authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
|
|
25149
|
+
* the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
|
|
25150
|
+
* `admin` because they change what the device IS.
|
|
25151
|
+
*
|
|
25152
|
+
* `protected` does not mean ungated: `protectedProcedure` runs the
|
|
25153
|
+
* `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
|
|
25154
|
+
* with `access: 'create'` and a `deviceId` in its input. So a caller needs a
|
|
25155
|
+
* grant that covers THAT camera at `create` — a `camera-viewer` (`view`
|
|
25156
|
+
* only) still cannot talk, and a grant on camera 5 cannot talk through
|
|
25157
|
+
* camera 7.
|
|
25158
|
+
*
|
|
25159
|
+
* Every method was `auth: 'admin'` from the initial commit, which made the
|
|
25160
|
+
* cap unreachable by every non-admin principal — `adminProcedure` throws
|
|
25161
|
+
* `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
|
|
25162
|
+
* machinery generated for this cap (`METHOD_ACCESS_MAP`,
|
|
25163
|
+
* `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
|
|
25164
|
+
* `camera-operator` scope preset has promised "PTZ control, intercom,
|
|
25165
|
+
* snapshots" since that same commit; the promise could not be kept. Recorded
|
|
25166
|
+
* as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
|
|
25167
|
+
* preset promises a cap no row of that preset can reach.
|
|
25168
|
+
*/
|
|
25040
25169
|
methods: {
|
|
25041
25170
|
/**
|
|
25042
25171
|
* Open a server-side WebRTC audio-only session. Returns an SDP
|
|
@@ -25049,7 +25178,7 @@ var intercomCapability = {
|
|
|
25049
25178
|
sdpOffer: string$2()
|
|
25050
25179
|
}), {
|
|
25051
25180
|
kind: "mutation",
|
|
25052
|
-
auth: "
|
|
25181
|
+
auth: "protected"
|
|
25053
25182
|
}),
|
|
25054
25183
|
handleAnswer: method(object({
|
|
25055
25184
|
deviceId: number(),
|
|
@@ -25057,7 +25186,7 @@ var intercomCapability = {
|
|
|
25057
25186
|
sdpAnswer: string$2()
|
|
25058
25187
|
}), _void(), {
|
|
25059
25188
|
kind: "mutation",
|
|
25060
|
-
auth: "
|
|
25189
|
+
auth: "protected"
|
|
25061
25190
|
}),
|
|
25062
25191
|
/** Close explicitly. Server also auto-closes on 30s idle. */
|
|
25063
25192
|
stopSession: method(object({
|
|
@@ -25065,7 +25194,7 @@ var intercomCapability = {
|
|
|
25065
25194
|
sessionId: string$2()
|
|
25066
25195
|
}), _void(), {
|
|
25067
25196
|
kind: "mutation",
|
|
25068
|
-
auth: "
|
|
25197
|
+
auth: "protected"
|
|
25069
25198
|
}),
|
|
25070
25199
|
/**
|
|
25071
25200
|
* Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
|
|
@@ -25078,7 +25207,7 @@ var intercomCapability = {
|
|
|
25078
25207
|
*/
|
|
25079
25208
|
startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string$2() }), {
|
|
25080
25209
|
kind: "mutation",
|
|
25081
|
-
auth: "
|
|
25210
|
+
auth: "protected"
|
|
25082
25211
|
}),
|
|
25083
25212
|
/**
|
|
25084
25213
|
* Push one chunk of talk-back audio onto the active talk session.
|
|
@@ -25113,12 +25242,12 @@ var intercomCapability = {
|
|
|
25113
25242
|
sequenceNumber: number().int()
|
|
25114
25243
|
}), object({ accepted: boolean() }), {
|
|
25115
25244
|
kind: "mutation",
|
|
25116
|
-
auth: "
|
|
25245
|
+
auth: "protected"
|
|
25117
25246
|
}),
|
|
25118
25247
|
/** Close the raw-PCM talk session. Idempotent. */
|
|
25119
25248
|
endTalkSession: method(object({ deviceId: number() }), _void(), {
|
|
25120
25249
|
kind: "mutation",
|
|
25121
|
-
auth: "
|
|
25250
|
+
auth: "protected"
|
|
25122
25251
|
})
|
|
25123
25252
|
},
|
|
25124
25253
|
events: { onStatusChanged: { data: object({
|
|
@@ -34799,6 +34928,12 @@ Object.freeze({
|
|
|
34799
34928
|
addonId: null,
|
|
34800
34929
|
access: "create"
|
|
34801
34930
|
},
|
|
34931
|
+
"pipelineAnalytics.countUnstampedEventMedia": {
|
|
34932
|
+
capName: "pipeline-analytics",
|
|
34933
|
+
capScope: "device",
|
|
34934
|
+
addonId: null,
|
|
34935
|
+
access: "view"
|
|
34936
|
+
},
|
|
34802
34937
|
"pipelineAnalytics.deleteDeviceEvents": {
|
|
34803
34938
|
capName: "pipeline-analytics",
|
|
34804
34939
|
capScope: "device",
|
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.42",
|
|
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",
|