@camstack/addon-matter-broker 0.2.38 → 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 +96 -10
- package/dist/addon.mjs +96 -10
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -13962,6 +13962,50 @@ var NodeProcessSchema = object({
|
|
|
13962
13962
|
/** Wall-clock uptime (seconds). Parsed from `ps etime`. */
|
|
13963
13963
|
uptimeSec: number()
|
|
13964
13964
|
});
|
|
13965
|
+
/**
|
|
13966
|
+
* One retained container-memory reading.
|
|
13967
|
+
*
|
|
13968
|
+
* `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
|
|
13969
|
+
* a second clock: that is what makes "processes sum to X, container says Y"
|
|
13970
|
+
* subtractable per point rather than an eyeballed comparison of two series
|
|
13971
|
+
* sampled at different instants.
|
|
13972
|
+
*
|
|
13973
|
+
* A reduced window keeps the sample with the LARGEST `currentBytes` in each
|
|
13974
|
+
* bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
|
|
13975
|
+
* never coexisted, and a mean would smear away the peak this exists to find.
|
|
13976
|
+
*/
|
|
13977
|
+
var ContainerMemoryPointSchema = object({
|
|
13978
|
+
/** Which hierarchy answered, so a reading is never ambiguous. */
|
|
13979
|
+
source: _enum(["cgroup-v2", "cgroup-v1"]),
|
|
13980
|
+
/** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
|
|
13981
|
+
currentBytes: number(),
|
|
13982
|
+
/** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
|
|
13983
|
+
limitBytes: number().nullable(),
|
|
13984
|
+
/** Anonymous pages: the closest thing to "what the processes allocated". */
|
|
13985
|
+
anonBytes: number().nullable(),
|
|
13986
|
+
/** Page cache. Charged to the cgroup, owned by no process. */
|
|
13987
|
+
fileBytes: number().nullable(),
|
|
13988
|
+
/**
|
|
13989
|
+
* Shared memory — and the field that explained the largest single surprise.
|
|
13990
|
+
* The i915 driver backs GPU buffers with shmem, so an inference pool or a
|
|
13991
|
+
* hardware-decode session holding DRM objects is charged HERE and appears
|
|
13992
|
+
* nowhere in a `ps` scan.
|
|
13993
|
+
*/
|
|
13994
|
+
shmemBytes: number().nullable(),
|
|
13995
|
+
/** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
|
|
13996
|
+
slabBytes: number().nullable(),
|
|
13997
|
+
/**
|
|
13998
|
+
* Shrinkable i915 GEM object bytes, from debugfs.
|
|
13999
|
+
*
|
|
14000
|
+
* **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
|
|
14001
|
+
* component of `currentBytes` and must not be subtracted from it; it says
|
|
14002
|
+
* what put the shmem there, where `shmemBytes` only says how much.
|
|
14003
|
+
*
|
|
14004
|
+
* `null` wherever debugfs is not mounted — which is inside every camstack
|
|
14005
|
+
* container today — and on any node with no Intel GPU.
|
|
14006
|
+
*/
|
|
14007
|
+
gpuShmemBytes: number().nullable()
|
|
14008
|
+
}).extend({ atMs: number() });
|
|
13965
14009
|
var DumpHeapSnapshotInputSchema = object({
|
|
13966
14010
|
/** The addon whose runner should dump a heap snapshot. */
|
|
13967
14011
|
addonId: string$2() });
|
|
@@ -14025,6 +14069,21 @@ var NodeLoadSeriesSchema = object({
|
|
|
14025
14069
|
/** One entry per function seen in the window, heaviest-first. */
|
|
14026
14070
|
series: array(LoadFunctionSeriesSchema).readonly(),
|
|
14027
14071
|
/**
|
|
14072
|
+
* The CONTAINER's memory over the same window, oldest-first.
|
|
14073
|
+
*
|
|
14074
|
+
* Sits next to `series` rather than in a method of its own because the whole
|
|
14075
|
+
* question is a subtraction: the per-process rows in `series` sum to one
|
|
14076
|
+
* number and this one is another, and an operator who has to issue two calls
|
|
14077
|
+
* to compare them will compare two different instants. Same reader, same
|
|
14078
|
+
* `sinceMs`, same `bucketMs`, same timestamps.
|
|
14079
|
+
*
|
|
14080
|
+
* **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
|
|
14081
|
+
* Mac, a bare-metal host, a container with the hierarchy hidden — reports no
|
|
14082
|
+
* points at all. A zero here would be indistinguishable from a healthy
|
|
14083
|
+
* container and is precisely the lie this field exists to avoid.
|
|
14084
|
+
*/
|
|
14085
|
+
containerMemory: array(ContainerMemoryPointSchema).readonly(),
|
|
14086
|
+
/**
|
|
14028
14087
|
* Width of one returned bucket, in ms. Equals the sampling cadence when no
|
|
14029
14088
|
* reduction was needed — so a caller can always say what one point covers
|
|
14030
14089
|
* without having to know whether it was reduced.
|
|
@@ -24980,6 +25039,33 @@ var intercomCapability = {
|
|
|
24980
25039
|
deviceNative: true,
|
|
24981
25040
|
mode: "singleton",
|
|
24982
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
|
+
*/
|
|
24983
25069
|
methods: {
|
|
24984
25070
|
/**
|
|
24985
25071
|
* Open a server-side WebRTC audio-only session. Returns an SDP
|
|
@@ -24992,7 +25078,7 @@ var intercomCapability = {
|
|
|
24992
25078
|
sdpOffer: string$2()
|
|
24993
25079
|
}), {
|
|
24994
25080
|
kind: "mutation",
|
|
24995
|
-
auth: "
|
|
25081
|
+
auth: "protected"
|
|
24996
25082
|
}),
|
|
24997
25083
|
handleAnswer: method(object({
|
|
24998
25084
|
deviceId: number(),
|
|
@@ -25000,7 +25086,7 @@ var intercomCapability = {
|
|
|
25000
25086
|
sdpAnswer: string$2()
|
|
25001
25087
|
}), _void(), {
|
|
25002
25088
|
kind: "mutation",
|
|
25003
|
-
auth: "
|
|
25089
|
+
auth: "protected"
|
|
25004
25090
|
}),
|
|
25005
25091
|
/** Close explicitly. Server also auto-closes on 30s idle. */
|
|
25006
25092
|
stopSession: method(object({
|
|
@@ -25008,7 +25094,7 @@ var intercomCapability = {
|
|
|
25008
25094
|
sessionId: string$2()
|
|
25009
25095
|
}), _void(), {
|
|
25010
25096
|
kind: "mutation",
|
|
25011
|
-
auth: "
|
|
25097
|
+
auth: "protected"
|
|
25012
25098
|
}),
|
|
25013
25099
|
/**
|
|
25014
25100
|
* Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
|
|
@@ -25021,7 +25107,7 @@ var intercomCapability = {
|
|
|
25021
25107
|
*/
|
|
25022
25108
|
startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string$2() }), {
|
|
25023
25109
|
kind: "mutation",
|
|
25024
|
-
auth: "
|
|
25110
|
+
auth: "protected"
|
|
25025
25111
|
}),
|
|
25026
25112
|
/**
|
|
25027
25113
|
* Push one chunk of talk-back audio onto the active talk session.
|
|
@@ -25056,12 +25142,12 @@ var intercomCapability = {
|
|
|
25056
25142
|
sequenceNumber: number().int()
|
|
25057
25143
|
}), object({ accepted: boolean() }), {
|
|
25058
25144
|
kind: "mutation",
|
|
25059
|
-
auth: "
|
|
25145
|
+
auth: "protected"
|
|
25060
25146
|
}),
|
|
25061
25147
|
/** Close the raw-PCM talk session. Idempotent. */
|
|
25062
25148
|
endTalkSession: method(object({ deviceId: number() }), _void(), {
|
|
25063
25149
|
kind: "mutation",
|
|
25064
|
-
auth: "
|
|
25150
|
+
auth: "protected"
|
|
25065
25151
|
})
|
|
25066
25152
|
},
|
|
25067
25153
|
events: { onStatusChanged: { data: object({
|
|
@@ -27737,10 +27823,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
27737
27823
|
* recording config. NOTE on events (source of truth, R5/C3): this cap carries
|
|
27738
27824
|
* NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
|
|
27739
27825
|
* events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
|
|
27740
|
-
* rows)
|
|
27741
|
-
*
|
|
27742
|
-
*
|
|
27743
|
-
* (`interfaces/recording-config.ts`).
|
|
27826
|
+
* rows) and are the ONLY event surface — the recorder has none. The in-RAM
|
|
27827
|
+
* playback markers it used to build were deleted on 2026-08-29 because nothing
|
|
27828
|
+
* ever read them. Event<->footage joins are by time, padded with the shared
|
|
27829
|
+
* `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
|
|
27744
27830
|
*/
|
|
27745
27831
|
var RecordingStatusSchema = object({
|
|
27746
27832
|
deviceId: number(),
|
package/dist/addon.mjs
CHANGED
|
@@ -13960,6 +13960,50 @@ var NodeProcessSchema = object({
|
|
|
13960
13960
|
/** Wall-clock uptime (seconds). Parsed from `ps etime`. */
|
|
13961
13961
|
uptimeSec: number()
|
|
13962
13962
|
});
|
|
13963
|
+
/**
|
|
13964
|
+
* One retained container-memory reading.
|
|
13965
|
+
*
|
|
13966
|
+
* `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
|
|
13967
|
+
* a second clock: that is what makes "processes sum to X, container says Y"
|
|
13968
|
+
* subtractable per point rather than an eyeballed comparison of two series
|
|
13969
|
+
* sampled at different instants.
|
|
13970
|
+
*
|
|
13971
|
+
* A reduced window keeps the sample with the LARGEST `currentBytes` in each
|
|
13972
|
+
* bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
|
|
13973
|
+
* never coexisted, and a mean would smear away the peak this exists to find.
|
|
13974
|
+
*/
|
|
13975
|
+
var ContainerMemoryPointSchema = object({
|
|
13976
|
+
/** Which hierarchy answered, so a reading is never ambiguous. */
|
|
13977
|
+
source: _enum(["cgroup-v2", "cgroup-v1"]),
|
|
13978
|
+
/** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
|
|
13979
|
+
currentBytes: number(),
|
|
13980
|
+
/** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
|
|
13981
|
+
limitBytes: number().nullable(),
|
|
13982
|
+
/** Anonymous pages: the closest thing to "what the processes allocated". */
|
|
13983
|
+
anonBytes: number().nullable(),
|
|
13984
|
+
/** Page cache. Charged to the cgroup, owned by no process. */
|
|
13985
|
+
fileBytes: number().nullable(),
|
|
13986
|
+
/**
|
|
13987
|
+
* Shared memory — and the field that explained the largest single surprise.
|
|
13988
|
+
* The i915 driver backs GPU buffers with shmem, so an inference pool or a
|
|
13989
|
+
* hardware-decode session holding DRM objects is charged HERE and appears
|
|
13990
|
+
* nowhere in a `ps` scan.
|
|
13991
|
+
*/
|
|
13992
|
+
shmemBytes: number().nullable(),
|
|
13993
|
+
/** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
|
|
13994
|
+
slabBytes: number().nullable(),
|
|
13995
|
+
/**
|
|
13996
|
+
* Shrinkable i915 GEM object bytes, from debugfs.
|
|
13997
|
+
*
|
|
13998
|
+
* **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
|
|
13999
|
+
* component of `currentBytes` and must not be subtracted from it; it says
|
|
14000
|
+
* what put the shmem there, where `shmemBytes` only says how much.
|
|
14001
|
+
*
|
|
14002
|
+
* `null` wherever debugfs is not mounted — which is inside every camstack
|
|
14003
|
+
* container today — and on any node with no Intel GPU.
|
|
14004
|
+
*/
|
|
14005
|
+
gpuShmemBytes: number().nullable()
|
|
14006
|
+
}).extend({ atMs: number() });
|
|
13963
14007
|
var DumpHeapSnapshotInputSchema = object({
|
|
13964
14008
|
/** The addon whose runner should dump a heap snapshot. */
|
|
13965
14009
|
addonId: string$2() });
|
|
@@ -14023,6 +14067,21 @@ var NodeLoadSeriesSchema = object({
|
|
|
14023
14067
|
/** One entry per function seen in the window, heaviest-first. */
|
|
14024
14068
|
series: array(LoadFunctionSeriesSchema).readonly(),
|
|
14025
14069
|
/**
|
|
14070
|
+
* The CONTAINER's memory over the same window, oldest-first.
|
|
14071
|
+
*
|
|
14072
|
+
* Sits next to `series` rather than in a method of its own because the whole
|
|
14073
|
+
* question is a subtraction: the per-process rows in `series` sum to one
|
|
14074
|
+
* number and this one is another, and an operator who has to issue two calls
|
|
14075
|
+
* to compare them will compare two different instants. Same reader, same
|
|
14076
|
+
* `sinceMs`, same `bucketMs`, same timestamps.
|
|
14077
|
+
*
|
|
14078
|
+
* **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
|
|
14079
|
+
* Mac, a bare-metal host, a container with the hierarchy hidden — reports no
|
|
14080
|
+
* points at all. A zero here would be indistinguishable from a healthy
|
|
14081
|
+
* container and is precisely the lie this field exists to avoid.
|
|
14082
|
+
*/
|
|
14083
|
+
containerMemory: array(ContainerMemoryPointSchema).readonly(),
|
|
14084
|
+
/**
|
|
14026
14085
|
* Width of one returned bucket, in ms. Equals the sampling cadence when no
|
|
14027
14086
|
* reduction was needed — so a caller can always say what one point covers
|
|
14028
14087
|
* without having to know whether it was reduced.
|
|
@@ -24978,6 +25037,33 @@ var intercomCapability = {
|
|
|
24978
25037
|
deviceNative: true,
|
|
24979
25038
|
mode: "singleton",
|
|
24980
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
|
+
*/
|
|
24981
25067
|
methods: {
|
|
24982
25068
|
/**
|
|
24983
25069
|
* Open a server-side WebRTC audio-only session. Returns an SDP
|
|
@@ -24990,7 +25076,7 @@ var intercomCapability = {
|
|
|
24990
25076
|
sdpOffer: string$2()
|
|
24991
25077
|
}), {
|
|
24992
25078
|
kind: "mutation",
|
|
24993
|
-
auth: "
|
|
25079
|
+
auth: "protected"
|
|
24994
25080
|
}),
|
|
24995
25081
|
handleAnswer: method(object({
|
|
24996
25082
|
deviceId: number(),
|
|
@@ -24998,7 +25084,7 @@ var intercomCapability = {
|
|
|
24998
25084
|
sdpAnswer: string$2()
|
|
24999
25085
|
}), _void(), {
|
|
25000
25086
|
kind: "mutation",
|
|
25001
|
-
auth: "
|
|
25087
|
+
auth: "protected"
|
|
25002
25088
|
}),
|
|
25003
25089
|
/** Close explicitly. Server also auto-closes on 30s idle. */
|
|
25004
25090
|
stopSession: method(object({
|
|
@@ -25006,7 +25092,7 @@ var intercomCapability = {
|
|
|
25006
25092
|
sessionId: string$2()
|
|
25007
25093
|
}), _void(), {
|
|
25008
25094
|
kind: "mutation",
|
|
25009
|
-
auth: "
|
|
25095
|
+
auth: "protected"
|
|
25010
25096
|
}),
|
|
25011
25097
|
/**
|
|
25012
25098
|
* Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
|
|
@@ -25019,7 +25105,7 @@ var intercomCapability = {
|
|
|
25019
25105
|
*/
|
|
25020
25106
|
startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string$2() }), {
|
|
25021
25107
|
kind: "mutation",
|
|
25022
|
-
auth: "
|
|
25108
|
+
auth: "protected"
|
|
25023
25109
|
}),
|
|
25024
25110
|
/**
|
|
25025
25111
|
* Push one chunk of talk-back audio onto the active talk session.
|
|
@@ -25054,12 +25140,12 @@ var intercomCapability = {
|
|
|
25054
25140
|
sequenceNumber: number().int()
|
|
25055
25141
|
}), object({ accepted: boolean() }), {
|
|
25056
25142
|
kind: "mutation",
|
|
25057
|
-
auth: "
|
|
25143
|
+
auth: "protected"
|
|
25058
25144
|
}),
|
|
25059
25145
|
/** Close the raw-PCM talk session. Idempotent. */
|
|
25060
25146
|
endTalkSession: method(object({ deviceId: number() }), _void(), {
|
|
25061
25147
|
kind: "mutation",
|
|
25062
|
-
auth: "
|
|
25148
|
+
auth: "protected"
|
|
25063
25149
|
})
|
|
25064
25150
|
},
|
|
25065
25151
|
events: { onStatusChanged: { data: object({
|
|
@@ -27735,10 +27821,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
27735
27821
|
* recording config. NOTE on events (source of truth, R5/C3): this cap carries
|
|
27736
27822
|
* NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
|
|
27737
27823
|
* events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
|
|
27738
|
-
* rows)
|
|
27739
|
-
*
|
|
27740
|
-
*
|
|
27741
|
-
* (`interfaces/recording-config.ts`).
|
|
27824
|
+
* rows) and are the ONLY event surface — the recorder has none. The in-RAM
|
|
27825
|
+
* playback markers it used to build were deleted on 2026-08-29 because nothing
|
|
27826
|
+
* ever read them. Event<->footage joins are by time, padded with the shared
|
|
27827
|
+
* `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
|
|
27742
27828
|
*/
|
|
27743
27829
|
var RecordingStatusSchema = object({
|
|
27744
27830
|
deviceId: number(),
|
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",
|