@camstack/system 1.2.151 → 1.2.154

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.
Files changed (66) hide show
  1. package/dist/addon-runner.js +14 -15
  2. package/dist/addon-runner.mjs +14 -14
  3. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  11. package/dist/builtins/console-logging/index.js +1 -1
  12. package/dist/builtins/console-logging/index.mjs +1 -1
  13. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  14. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  15. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  16. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  17. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  18. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  19. package/dist/builtins/hub-forwarder/index.js +1 -1
  20. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  21. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  22. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  23. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  24. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  25. package/dist/builtins/local-network/local-network.addon.js +3 -3
  26. package/dist/builtins/local-network/local-network.addon.mjs +3 -3
  27. package/dist/builtins/loki-logging/index.js +1 -1
  28. package/dist/builtins/loki-logging/index.mjs +1 -1
  29. package/dist/builtins/native-metrics/cgroup-memory.d.ts +193 -0
  30. package/dist/builtins/native-metrics/container-memory-series.d.ts +226 -0
  31. package/dist/builtins/native-metrics/native-metrics.addon.d.ts +26 -0
  32. package/dist/builtins/native-metrics/native-metrics.addon.js +1536 -661
  33. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1536 -660
  34. package/dist/builtins/platform-probe/index.js +3 -3
  35. package/dist/builtins/platform-probe/index.mjs +2 -2
  36. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  37. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  38. package/dist/builtins/snapshot/index.js +1 -1
  39. package/dist/builtins/snapshot/index.mjs +1 -1
  40. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +2 -2
  41. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +2 -2
  42. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  43. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  44. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  45. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  46. package/dist/builtins/system-config/system-config.addon.js +1 -1
  47. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  48. package/dist/builtins/winston-logging/index.js +1 -1
  49. package/dist/builtins/winston-logging/index.mjs +1 -1
  50. package/dist/{dist-CImxMt5h.js → dist-BPlfW-CG.js} +96 -10
  51. package/dist/{dist-CbRciAbu.mjs → dist-D_NyUV6Y.mjs} +96 -10
  52. package/dist/index.d.ts +6 -2
  53. package/dist/index.js +24 -5
  54. package/dist/index.mjs +5 -5
  55. package/dist/kernel/event-plane-report.d.ts +202 -0
  56. package/dist/kernel/heap-spaces.d.ts +138 -0
  57. package/dist/kernel/heap-watch.d.ts +142 -5
  58. package/dist/kernel/index.d.ts +2 -0
  59. package/dist/kernel/transport/local-child-registry.d.ts +22 -0
  60. package/dist/{manifest-python-deps-DuQ3Uqoq.mjs → manifest-python-deps-BILJm2mI.mjs} +522 -15
  61. package/dist/{manifest-python-deps-BqWrDjSN.js → manifest-python-deps-COeSr7el.js} +636 -15
  62. package/dist/{retired-settings-keys-DhFPXIRD.mjs → retired-settings-keys-Bq1Tb84I.mjs} +1 -1
  63. package/dist/{retired-settings-keys-C7gLUS3x.js → retired-settings-keys-DBY6ebwV.js} +1 -1
  64. package/package.json +1 -1
  65. package/dist/{tls-u8QCJCFE.js → tls-BxQlomxd.js} +1 -1
  66. package/dist/{tls-CQhPGSJm.mjs → tls-DOTmtLCW.mjs} +1 -1
@@ -3,13 +3,13 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CImxMt5h.js");
6
+ const require_dist = require("../../dist-BPlfW-CG.js");
7
7
  let node_child_process = require("node:child_process");
8
8
  let node_util = require("node:util");
9
- let node_os = require("node:os");
10
- node_os = require_chunk.__toESM(node_os);
11
9
  let node_fs = require("node:fs");
12
10
  node_fs = require_chunk.__toESM(node_fs);
11
+ let node_os = require("node:os");
12
+ node_os = require_chunk.__toESM(node_os);
13
13
  //#region src/builtins/platform-probe/coral-accelerators.ts
14
14
  /**
15
15
  * Coral USB Edge TPU USB identifiers.
@@ -1,9 +1,9 @@
1
1
  import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
2
- import { Ot as errMsg, V as enumerateInferenceDevices, Wt as emitReadiness, kt as BaseAddon, tn as EventCategory, ut as platformProbeCapability, vt as scoreRuntimes } from "../../dist-CbRciAbu.mjs";
2
+ import { Ot as errMsg, V as enumerateInferenceDevices, Wt as emitReadiness, kt as BaseAddon, tn as EventCategory, ut as platformProbeCapability, vt as scoreRuntimes } from "../../dist-D_NyUV6Y.mjs";
3
3
  import { execFile } from "node:child_process";
4
4
  import { promisify } from "node:util";
5
- import * as os from "node:os";
6
5
  import * as fs from "node:fs";
6
+ import * as os from "node:os";
7
7
  //#region src/builtins/platform-probe/coral-accelerators.ts
8
8
  /**
9
9
  * Coral USB Edge TPU USB identifiers.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CImxMt5h.js");
6
+ const require_dist = require("../../dist-BPlfW-CG.js");
7
7
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
8
8
  /**
9
9
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -1,4 +1,4 @@
1
- import { kt as BaseAddon, tn as EventCategory } from "../../dist-CbRciAbu.mjs";
1
+ import { kt as BaseAddon, tn as EventCategory } from "../../dist-D_NyUV6Y.mjs";
2
2
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
3
3
  /**
4
4
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CImxMt5h.js");
6
+ const require_dist = require("../../dist-BPlfW-CG.js");
7
7
  let zod = require("zod");
8
8
  let node_crypto = require("node:crypto");
9
9
  let _camstack_types_node = require("@camstack/types/node");
@@ -1,4 +1,4 @@
1
- import { Ft as DeviceType, I as deriveBatteryPresence, Jt as nodePin, Nt as DeviceFeature, O as bareAddonId, Ot as errMsg, bt as snapshotCapability, i as BatteryStatusSchema, k as batteryCapability, kt as BaseAddon, tn as EventCategory, wt as streamQualityLabel } from "../../dist-CbRciAbu.mjs";
1
+ import { Ft as DeviceType, I as deriveBatteryPresence, Jt as nodePin, Nt as DeviceFeature, O as bareAddonId, Ot as errMsg, bt as snapshotCapability, i as BatteryStatusSchema, k as batteryCapability, kt as BaseAddon, tn as EventCategory, wt as streamQualityLabel } from "../../dist-D_NyUV6Y.mjs";
2
2
  import { z } from "zod";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { signExpiringUrl, verifyExpiringUrl } from "@camstack/types/node";
@@ -3,14 +3,14 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CImxMt5h.js");
6
+ const require_dist = require("../../dist-BPlfW-CG.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  let node_path = require("node:path");
10
10
  node_path = require_chunk.__toESM(node_path);
11
- let node_os = require("node:os");
12
11
  let node_fs = require("node:fs");
13
12
  node_fs = require_chunk.__toESM(node_fs);
13
+ let node_os = require("node:os");
14
14
  //#region src/builtins/sqlite-storage/path-guard.ts
15
15
  /**
16
16
  * Guards for the filesystem-browse cap. Pure + synchronous so they are
@@ -1,10 +1,10 @@
1
- import { Ct as storageProviderCapability, K as filesystemBrowseCapability, kt as BaseAddon } from "../../dist-CbRciAbu.mjs";
1
+ import { Ct as storageProviderCapability, K as filesystemBrowseCapability, kt as BaseAddon } from "../../dist-D_NyUV6Y.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
4
4
  import * as path$1 from "node:path";
5
5
  import { basename, dirname, isAbsolute, join, resolve, sep } from "node:path";
6
- import { homedir } from "node:os";
7
6
  import * as fs from "node:fs";
7
+ import { homedir } from "node:os";
8
8
  //#region src/builtins/sqlite-storage/path-guard.ts
9
9
  /**
10
10
  * Guards for the filesystem-browse cap. Pure + synchronous so they are
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CImxMt5h.js");
6
+ const require_dist = require("../../dist-BPlfW-CG.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -1,4 +1,4 @@
1
- import { St as storageMigrationCapability, Yt as parseJsonObject, b as StorageMigrationJobSchema, kt as BaseAddon, xt as storageCapability, y as StorageLocationTypeSchema, yt as settingsStoreCapability } from "../../dist-CbRciAbu.mjs";
1
+ import { St as storageMigrationCapability, Yt as parseJsonObject, b as StorageMigrationJobSchema, kt as BaseAddon, xt as storageCapability, y as StorageLocationTypeSchema, yt as settingsStoreCapability } from "../../dist-D_NyUV6Y.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import * as fs from "node:fs/promises";
4
4
  import * as path$1 from "node:path";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CImxMt5h.js");
6
+ const require_dist = require("../../dist-BPlfW-CG.js");
7
7
  //#region src/builtins/system-config/system-config.addon.ts
8
8
  /**
9
9
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -1,4 +1,4 @@
1
- import { Kt as hydrateSchema, Ot as errMsg, kt as BaseAddon } from "../../dist-CbRciAbu.mjs";
1
+ import { Kt as hydrateSchema, Ot as errMsg, kt as BaseAddon } from "../../dist-D_NyUV6Y.mjs";
2
2
  //#region src/builtins/system-config/system-config.addon.ts
3
3
  /**
4
4
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CImxMt5h.js");
6
+ const require_dist = require("../../dist-BPlfW-CG.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  let node_path = require("node:path");
9
9
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { kt as BaseAddon, rt as logDestinationCapability } from "../../dist-CbRciAbu.mjs";
1
+ import { kt as BaseAddon, rt as logDestinationCapability } from "../../dist-D_NyUV6Y.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  import * as path$1 from "node:path";
4
4
  import path from "node:path";
@@ -12083,6 +12083,50 @@ var NodeProcessSchema = zod.z.object({
12083
12083
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
12084
12084
  uptimeSec: zod.z.number()
12085
12085
  });
12086
+ /**
12087
+ * One retained container-memory reading.
12088
+ *
12089
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
12090
+ * a second clock: that is what makes "processes sum to X, container says Y"
12091
+ * subtractable per point rather than an eyeballed comparison of two series
12092
+ * sampled at different instants.
12093
+ *
12094
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
12095
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
12096
+ * never coexisted, and a mean would smear away the peak this exists to find.
12097
+ */
12098
+ var ContainerMemoryPointSchema = zod.z.object({
12099
+ /** Which hierarchy answered, so a reading is never ambiguous. */
12100
+ source: zod.z.enum(["cgroup-v2", "cgroup-v1"]),
12101
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
12102
+ currentBytes: zod.z.number(),
12103
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
12104
+ limitBytes: zod.z.number().nullable(),
12105
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
12106
+ anonBytes: zod.z.number().nullable(),
12107
+ /** Page cache. Charged to the cgroup, owned by no process. */
12108
+ fileBytes: zod.z.number().nullable(),
12109
+ /**
12110
+ * Shared memory — and the field that explained the largest single surprise.
12111
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
12112
+ * hardware-decode session holding DRM objects is charged HERE and appears
12113
+ * nowhere in a `ps` scan.
12114
+ */
12115
+ shmemBytes: zod.z.number().nullable(),
12116
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
12117
+ slabBytes: zod.z.number().nullable(),
12118
+ /**
12119
+ * Shrinkable i915 GEM object bytes, from debugfs.
12120
+ *
12121
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
12122
+ * component of `currentBytes` and must not be subtracted from it; it says
12123
+ * what put the shmem there, where `shmemBytes` only says how much.
12124
+ *
12125
+ * `null` wherever debugfs is not mounted — which is inside every camstack
12126
+ * container today — and on any node with no Intel GPU.
12127
+ */
12128
+ gpuShmemBytes: zod.z.number().nullable()
12129
+ }).extend({ atMs: zod.z.number() });
12086
12130
  var DumpHeapSnapshotInputSchema = zod.z.object({
12087
12131
  /** The addon whose runner should dump a heap snapshot. */
12088
12132
  addonId: zod.z.string() });
@@ -12146,6 +12190,21 @@ var NodeLoadSeriesSchema = zod.z.object({
12146
12190
  /** One entry per function seen in the window, heaviest-first. */
12147
12191
  series: zod.z.array(LoadFunctionSeriesSchema).readonly(),
12148
12192
  /**
12193
+ * The CONTAINER's memory over the same window, oldest-first.
12194
+ *
12195
+ * Sits next to `series` rather than in a method of its own because the whole
12196
+ * question is a subtraction: the per-process rows in `series` sum to one
12197
+ * number and this one is another, and an operator who has to issue two calls
12198
+ * to compare them will compare two different instants. Same reader, same
12199
+ * `sinceMs`, same `bucketMs`, same timestamps.
12200
+ *
12201
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
12202
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
12203
+ * points at all. A zero here would be indistinguishable from a healthy
12204
+ * container and is precisely the lie this field exists to avoid.
12205
+ */
12206
+ containerMemory: zod.z.array(ContainerMemoryPointSchema).readonly(),
12207
+ /**
12149
12208
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
12150
12209
  * reduction was needed — so a caller can always say what one point covers
12151
12210
  * without having to know whether it was reduced.
@@ -25443,6 +25502,33 @@ var intercomCapability = {
25443
25502
  deviceNative: true,
25444
25503
  mode: "singleton",
25445
25504
  deviceTypes: [DeviceType.Camera],
25505
+ /**
25506
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25507
+ *
25508
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25509
+ * cap has no configuration surface at all: all six methods open, feed and
25510
+ * close one live audio session against one `deviceId`. That is the same
25511
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25512
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25513
+ * `admin` because they change what the device IS.
25514
+ *
25515
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25516
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25517
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25518
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25519
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25520
+ * camera 7.
25521
+ *
25522
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25523
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25524
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25525
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25526
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25527
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25528
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25529
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25530
+ * preset promises a cap no row of that preset can reach.
25531
+ */
25446
25532
  methods: {
25447
25533
  /**
25448
25534
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25455,7 +25541,7 @@ var intercomCapability = {
25455
25541
  sdpOffer: zod.z.string()
25456
25542
  }), {
25457
25543
  kind: "mutation",
25458
- auth: "admin"
25544
+ auth: "protected"
25459
25545
  }),
25460
25546
  handleAnswer: method(zod.z.object({
25461
25547
  deviceId: zod.z.number(),
@@ -25463,7 +25549,7 @@ var intercomCapability = {
25463
25549
  sdpAnswer: zod.z.string()
25464
25550
  }), zod.z.void(), {
25465
25551
  kind: "mutation",
25466
- auth: "admin"
25552
+ auth: "protected"
25467
25553
  }),
25468
25554
  /** Close explicitly. Server also auto-closes on 30s idle. */
25469
25555
  stopSession: method(zod.z.object({
@@ -25471,7 +25557,7 @@ var intercomCapability = {
25471
25557
  sessionId: zod.z.string()
25472
25558
  }), zod.z.void(), {
25473
25559
  kind: "mutation",
25474
- auth: "admin"
25560
+ auth: "protected"
25475
25561
  }),
25476
25562
  /**
25477
25563
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25484,7 +25570,7 @@ var intercomCapability = {
25484
25570
  */
25485
25571
  startTalkSession: method(zod.z.object({ deviceId: zod.z.number() }), zod.z.object({ sessionId: zod.z.string() }), {
25486
25572
  kind: "mutation",
25487
- auth: "admin"
25573
+ auth: "protected"
25488
25574
  }),
25489
25575
  /**
25490
25576
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25519,12 +25605,12 @@ var intercomCapability = {
25519
25605
  sequenceNumber: zod.z.number().int()
25520
25606
  }), zod.z.object({ accepted: zod.z.boolean() }), {
25521
25607
  kind: "mutation",
25522
- auth: "admin"
25608
+ auth: "protected"
25523
25609
  }),
25524
25610
  /** Close the raw-PCM talk session. Idempotent. */
25525
25611
  endTalkSession: method(zod.z.object({ deviceId: zod.z.number() }), zod.z.void(), {
25526
25612
  kind: "mutation",
25527
- auth: "admin"
25613
+ auth: "protected"
25528
25614
  })
25529
25615
  },
25530
25616
  events: { onStatusChanged: { data: zod.z.object({
@@ -28693,10 +28779,10 @@ var rebootCapability = {
28693
28779
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
28694
28780
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
28695
28781
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
28696
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
28697
- * annotations that are not exposed here and must not be treated as an event
28698
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
28699
- * (`interfaces/recording-config.ts`).
28782
+ * rows) and are the ONLY event surface the recorder has none. The in-RAM
28783
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
28784
+ * ever read them. Event<->footage joins are by time, padded with the shared
28785
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
28700
28786
  */
28701
28787
  var RecordingStatusSchema = zod.z.object({
28702
28788
  deviceId: zod.z.number(),
@@ -12083,6 +12083,50 @@ var NodeProcessSchema = z.object({
12083
12083
  /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
12084
12084
  uptimeSec: z.number()
12085
12085
  });
12086
+ /**
12087
+ * One retained container-memory reading.
12088
+ *
12089
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
12090
+ * a second clock: that is what makes "processes sum to X, container says Y"
12091
+ * subtractable per point rather than an eyeballed comparison of two series
12092
+ * sampled at different instants.
12093
+ *
12094
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
12095
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
12096
+ * never coexisted, and a mean would smear away the peak this exists to find.
12097
+ */
12098
+ var ContainerMemoryPointSchema = z.object({
12099
+ /** Which hierarchy answered, so a reading is never ambiguous. */
12100
+ source: z.enum(["cgroup-v2", "cgroup-v1"]),
12101
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
12102
+ currentBytes: z.number(),
12103
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
12104
+ limitBytes: z.number().nullable(),
12105
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
12106
+ anonBytes: z.number().nullable(),
12107
+ /** Page cache. Charged to the cgroup, owned by no process. */
12108
+ fileBytes: z.number().nullable(),
12109
+ /**
12110
+ * Shared memory — and the field that explained the largest single surprise.
12111
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
12112
+ * hardware-decode session holding DRM objects is charged HERE and appears
12113
+ * nowhere in a `ps` scan.
12114
+ */
12115
+ shmemBytes: z.number().nullable(),
12116
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
12117
+ slabBytes: z.number().nullable(),
12118
+ /**
12119
+ * Shrinkable i915 GEM object bytes, from debugfs.
12120
+ *
12121
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
12122
+ * component of `currentBytes` and must not be subtracted from it; it says
12123
+ * what put the shmem there, where `shmemBytes` only says how much.
12124
+ *
12125
+ * `null` wherever debugfs is not mounted — which is inside every camstack
12126
+ * container today — and on any node with no Intel GPU.
12127
+ */
12128
+ gpuShmemBytes: z.number().nullable()
12129
+ }).extend({ atMs: z.number() });
12086
12130
  var DumpHeapSnapshotInputSchema = z.object({
12087
12131
  /** The addon whose runner should dump a heap snapshot. */
12088
12132
  addonId: z.string() });
@@ -12146,6 +12190,21 @@ var NodeLoadSeriesSchema = z.object({
12146
12190
  /** One entry per function seen in the window, heaviest-first. */
12147
12191
  series: z.array(LoadFunctionSeriesSchema).readonly(),
12148
12192
  /**
12193
+ * The CONTAINER's memory over the same window, oldest-first.
12194
+ *
12195
+ * Sits next to `series` rather than in a method of its own because the whole
12196
+ * question is a subtraction: the per-process rows in `series` sum to one
12197
+ * number and this one is another, and an operator who has to issue two calls
12198
+ * to compare them will compare two different instants. Same reader, same
12199
+ * `sinceMs`, same `bucketMs`, same timestamps.
12200
+ *
12201
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
12202
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
12203
+ * points at all. A zero here would be indistinguishable from a healthy
12204
+ * container and is precisely the lie this field exists to avoid.
12205
+ */
12206
+ containerMemory: z.array(ContainerMemoryPointSchema).readonly(),
12207
+ /**
12149
12208
  * Width of one returned bucket, in ms. Equals the sampling cadence when no
12150
12209
  * reduction was needed — so a caller can always say what one point covers
12151
12210
  * without having to know whether it was reduced.
@@ -25443,6 +25502,33 @@ var intercomCapability = {
25443
25502
  deviceNative: true,
25444
25503
  mode: "singleton",
25445
25504
  deviceTypes: [DeviceType.Camera],
25505
+ /**
25506
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25507
+ *
25508
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25509
+ * cap has no configuration surface at all: all six methods open, feed and
25510
+ * close one live audio session against one `deviceId`. That is the same
25511
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25512
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25513
+ * `admin` because they change what the device IS.
25514
+ *
25515
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25516
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25517
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25518
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25519
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25520
+ * camera 7.
25521
+ *
25522
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25523
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25524
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25525
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25526
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25527
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25528
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25529
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25530
+ * preset promises a cap no row of that preset can reach.
25531
+ */
25446
25532
  methods: {
25447
25533
  /**
25448
25534
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25455,7 +25541,7 @@ var intercomCapability = {
25455
25541
  sdpOffer: z.string()
25456
25542
  }), {
25457
25543
  kind: "mutation",
25458
- auth: "admin"
25544
+ auth: "protected"
25459
25545
  }),
25460
25546
  handleAnswer: method(z.object({
25461
25547
  deviceId: z.number(),
@@ -25463,7 +25549,7 @@ var intercomCapability = {
25463
25549
  sdpAnswer: z.string()
25464
25550
  }), z.void(), {
25465
25551
  kind: "mutation",
25466
- auth: "admin"
25552
+ auth: "protected"
25467
25553
  }),
25468
25554
  /** Close explicitly. Server also auto-closes on 30s idle. */
25469
25555
  stopSession: method(z.object({
@@ -25471,7 +25557,7 @@ var intercomCapability = {
25471
25557
  sessionId: z.string()
25472
25558
  }), z.void(), {
25473
25559
  kind: "mutation",
25474
- auth: "admin"
25560
+ auth: "protected"
25475
25561
  }),
25476
25562
  /**
25477
25563
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25484,7 +25570,7 @@ var intercomCapability = {
25484
25570
  */
25485
25571
  startTalkSession: method(z.object({ deviceId: z.number() }), z.object({ sessionId: z.string() }), {
25486
25572
  kind: "mutation",
25487
- auth: "admin"
25573
+ auth: "protected"
25488
25574
  }),
25489
25575
  /**
25490
25576
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25519,12 +25605,12 @@ var intercomCapability = {
25519
25605
  sequenceNumber: z.number().int()
25520
25606
  }), z.object({ accepted: z.boolean() }), {
25521
25607
  kind: "mutation",
25522
- auth: "admin"
25608
+ auth: "protected"
25523
25609
  }),
25524
25610
  /** Close the raw-PCM talk session. Idempotent. */
25525
25611
  endTalkSession: method(z.object({ deviceId: z.number() }), z.void(), {
25526
25612
  kind: "mutation",
25527
- auth: "admin"
25613
+ auth: "protected"
25528
25614
  })
25529
25615
  },
25530
25616
  events: { onStatusChanged: { data: z.object({
@@ -28693,10 +28779,10 @@ var rebootCapability = {
28693
28779
  * recording config. NOTE on events (source of truth, R5/C3): this cap carries
28694
28780
  * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
28695
28781
  * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
28696
- * rows); the recorder's internal EventMap markers are ephemeral in-RAM
28697
- * annotations that are not exposed here and must not be treated as an event
28698
- * feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
28699
- * (`interfaces/recording-config.ts`).
28782
+ * rows) and are the ONLY event surface the recorder has none. The in-RAM
28783
+ * playback markers it used to build were deleted on 2026-08-29 because nothing
28784
+ * ever read them. Event<->footage joins are by time, padded with the shared
28785
+ * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
28700
28786
  */
28701
28787
  var RecordingStatusSchema = z.object({
28702
28788
  deviceId: z.number(),
package/dist/index.d.ts CHANGED
@@ -46,8 +46,12 @@ export { createFileDataPlaneHandler } from './http/file-data-plane.js';
46
46
  export { allFamiliesListenHost, applyLanHttp, bindPendingLanHttp, closeLanHttp, DEFAULT_LAN_HTTP_PORT, readLanHttpState, registerLanHttpHandler, } from './http/lan-http-bind.js';
47
47
  export type { ReverseProxyOptions } from './http/reverse-proxy.js';
48
48
  export { proxyToUpstream } from './http/reverse-proxy.js';
49
- export type { DeferredHeapWatchSink, HeapReclaimer, HeapReclaimOptions, HeapSample, HeapWatchSink, RssBreakdown, RssBudgetOptions, RssBudgetState, RssGrowthShape, RunnerHeapWatchOptions, } from './kernel/heap-watch.js';
50
- export { buildHeapSample, createDeferredHeapWatchSink, createV8Reclaimer, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, hubMainRssBudget, describeRss, nextRssBudgetState, parseRssBudgetMb, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, shouldReclaim, startHeapWatch, startRunnerHeapWatch, strandedMb, } from './kernel/heap-watch.js';
49
+ export type { ChildFanoutDelta, ChildFanoutRegistry, ChildFanoutSample, CrossNodeEventStats, EventFanoutMode, EventPlaneCounters, EventPlaneReader, EventPlaneSources, EventPlaneWindow, } from './kernel/event-plane-report.js';
50
+ export { createEventPlaneMeter, createEventPlaneReader, diffEventPlane, EVENT_PLANE_TOP_N, formatEventPlane, } from './kernel/event-plane-report.js';
51
+ export type { HeapDiagnosticDeps, HeapDiagnosticRequest, HeapSpaceReader, HeapSpaceUsage, } from './kernel/heap-spaces.js';
52
+ export { DECISIVE_HEAP_SPACES, emitHeapDiagnosticReport, formatHeapSpaces, HEAP_SPACE_REPORT_MIN_MB, heapSnapshotAuthorised, heapSpaceField, readHeapSpaces, RUNNER_HEAP_SNAPSHOT_ENV, selectReportedSpaces, } from './kernel/heap-spaces.js';
53
+ export type { DeferredHeapWatchSink, HeapReclaimer, HeapReclaimOptions, HeapSample, HeapWatchProbes, HeapWatchSink, LoopDelayMeter, LoopDelaySample, RssBreakdown, RssBudgetOptions, RssBudgetState, RssGrowthShape, RunnerHeapWatchOptions, } from './kernel/heap-watch.js';
54
+ export { buildHeapSample, createDeferredHeapWatchSink, createLoopDelayMeter, createV8Reclaimer, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, hubMainRssBudget, describeRss, nextRssBudgetState, parseRssBudgetMb, reclaimIntervalMs, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, shouldReclaim, startHeapWatch, startRunnerHeapWatch, strandedMb, ZERO_LOOP_DELAY, } from './kernel/heap-watch.js';
51
55
  export type { AddonDataPlaneFacility, DataPlaneSink, } from './kernel/moleculer/addon-data-plane-facility.js';
52
56
  export { createAddonDataPlaneFacility } from './kernel/moleculer/addon-data-plane-facility.js';
53
57
  export type { ElementState, ElementStatus, } from './lifecycle/lifecycle-state-machine.js';