@camstack/server 1.2.928 → 1.2.930

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 (241) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.json +10 -10
  3. package/system/dist/addon-id-CVg1_r5E.mjs +39 -0
  4. package/system/dist/addon-id-Di0lNJ89.js +50 -0
  5. package/system/dist/addon-pages.cap-Df9FQwN1.js +49 -0
  6. package/system/dist/addon-pages.cap-DksUlE8j.mjs +44 -0
  7. package/system/dist/addon-settings.cap-3-TIIMq_.mjs +592 -0
  8. package/system/dist/addon-settings.cap-DAiE0Nb0.js +651 -0
  9. package/system/dist/addon-utils.mjs +1 -1
  10. package/system/dist/addon-widgets.cap-C4jxflbF.js +200 -0
  11. package/system/dist/addon-widgets.cap-D9m48X78.mjs +183 -0
  12. package/system/dist/base-addon-DD5dIfcZ.js +4624 -0
  13. package/system/dist/base-addon-Md14i7pe.mjs +4505 -0
  14. package/system/dist/base-device-2sL1DMm1.js +1103 -0
  15. package/system/dist/base-device-IuM1AwXZ.mjs +1098 -0
  16. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +8 -6
  17. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +6 -4
  18. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +8 -6
  19. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +7 -5
  20. package/system/dist/builtins/alerts/alerts.addon.js +113 -56
  21. package/system/dist/builtins/alerts/alerts.addon.mjs +60 -3
  22. package/system/dist/builtins/autotrack/index.js +21 -17
  23. package/system/dist/builtins/autotrack/index.mjs +5 -1
  24. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +14 -11
  25. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +8 -5
  26. package/system/dist/builtins/calendars/calendars.addon.js +8 -6
  27. package/system/dist/builtins/calendars/calendars.addon.mjs +3 -1
  28. package/system/dist/builtins/camera-grid/index.js +615 -58
  29. package/system/dist/builtins/camera-grid/index.mjs +558 -1
  30. package/system/dist/builtins/composer/composer.addon.js +788 -209
  31. package/system/dist/builtins/composer/composer.addon.mjs +583 -4
  32. package/system/dist/builtins/console-logging/index.js +4 -3
  33. package/system/dist/builtins/console-logging/index.mjs +2 -1
  34. package/system/dist/builtins/core-blocks/actions-service.d.ts +18 -1
  35. package/system/dist/builtins/core-blocks/core-blocks.addon.js +8670 -386
  36. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +8294 -11
  37. package/system/dist/builtins/core-blocks/tcp-connect.d.ts +3 -0
  38. package/system/dist/builtins/core-notifier/core-notifier.addon.js +250 -21
  39. package/system/dist/builtins/core-notifier/core-notifier.addon.mjs +230 -1
  40. package/system/dist/builtins/device-history/device-history.addon.js +110 -31
  41. package/system/dist/builtins/device-history/device-history.addon.mjs +81 -2
  42. package/system/dist/builtins/device-manager/device-manager.addon.js +12806 -227
  43. package/system/dist/builtins/device-manager/device-manager.addon.mjs +12583 -5
  44. package/system/dist/builtins/hub-forwarder/index.js +4 -3
  45. package/system/dist/builtins/hub-forwarder/index.mjs +2 -1
  46. package/system/dist/builtins/keychain/index.js +31 -28
  47. package/system/dist/builtins/keychain/index.mjs +7 -4
  48. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +15 -12
  49. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +4 -1
  50. package/system/dist/builtins/local-auth/local-auth.addon.js +140 -39
  51. package/system/dist/builtins/local-auth/local-auth.addon.mjs +106 -6
  52. package/system/dist/builtins/local-network/local-network.addon.js +43 -39
  53. package/system/dist/builtins/local-network/local-network.addon.mjs +7 -3
  54. package/system/dist/builtins/loki-logging/index.js +23 -17
  55. package/system/dist/builtins/loki-logging/index.mjs +7 -1
  56. package/system/dist/builtins/native-metrics/native-metrics.addon.js +156 -15
  57. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +151 -10
  58. package/system/dist/builtins/platform-probe/index.js +25 -23
  59. package/system/dist/builtins/platform-probe/index.mjs +12 -10
  60. package/system/dist/builtins/record-entries/index.js +9 -7
  61. package/system/dist/builtins/record-entries/index.mjs +3 -1
  62. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +4 -4
  63. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  64. package/system/dist/builtins/snapshot/index.js +97 -44
  65. package/system/dist/builtins/snapshot/index.mjs +54 -1
  66. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +5 -4
  67. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +21 -20
  68. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  69. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  70. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +87 -61
  71. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +29 -3
  72. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +81 -72
  73. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +10 -1
  74. package/system/dist/builtins/system-config/system-config.addon.js +17 -14
  75. package/system/dist/builtins/system-config/system-config.addon.mjs +118 -115
  76. package/system/dist/builtins/winston-logging/index.js +7 -5
  77. package/system/dist/builtins/winston-logging/index.mjs +3 -1
  78. package/system/dist/calendars.cap-CaFlShS9.js +155 -0
  79. package/system/dist/calendars.cap-_C4eD4fi.mjs +138 -0
  80. package/system/dist/camstack-error-DJ-TUAi1.js +23 -0
  81. package/system/dist/camstack-error-viZYfcj9.mjs +18 -0
  82. package/system/dist/cap-call-context-Bd76CbOW.js +95 -0
  83. package/system/dist/cap-call-context-DNwdgGSQ.mjs +78 -0
  84. package/system/dist/capability-definition-C2rJdVeX.mjs +177 -0
  85. package/system/dist/capability-definition-HCmTem8c.js +242 -0
  86. package/system/dist/{capture-engine-BcuwOSXv.js → capture-engine-DZ0LIUqA.js} +5 -4
  87. package/system/dist/{capture-engine-Bz7eXFjT.mjs → capture-engine-DiwbjoWp.mjs} +2 -1
  88. package/system/dist/command-origin-claim-Cief660O.js +35 -0
  89. package/system/dist/command-origin-claim-D1Wy7Qld.mjs +24 -0
  90. package/system/dist/composition-sources-BEUWn2s_.mjs +391 -0
  91. package/system/dist/composition-sources-acfR4hDq.js +408 -0
  92. package/system/dist/{constants-D2etJ02O.js → constants-Ba3FTIHl.js} +1 -1
  93. package/system/dist/constants-C860Y6U4.js +26 -0
  94. package/system/dist/{constants-BcUTQd1M.mjs → constants-DB4piTD5.mjs} +1 -1
  95. package/system/dist/constants-DCLpoF4L.mjs +21 -0
  96. package/system/dist/coral-accelerators-7o8hqvcN.js +564 -0
  97. package/system/dist/coral-accelerators-BKcXP59c.mjs +521 -0
  98. package/system/dist/core-blocks.cap-BMeMCBrx.js +18733 -0
  99. package/system/dist/core-blocks.cap-BRPsLAij.mjs +18008 -0
  100. package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
  101. package/system/dist/custom-actions-BFUSalC9.mjs +25 -0
  102. package/system/dist/custom-actions-D92NRi2c.js +36 -0
  103. package/system/dist/database-snapshot.cap-DF38e-0P.js +162 -0
  104. package/system/dist/database-snapshot.cap-dhrc9xnY.mjs +133 -0
  105. package/system/dist/declared-device-BWphj9WE.js +303 -0
  106. package/system/dist/declared-device-CKERA1Hi.mjs +286 -0
  107. package/system/dist/{device-ca-ExMN3xW3.mjs → device-ca-BLM6fccc.mjs} +2 -1
  108. package/system/dist/{device-ca-CU8zh9Pi.js → device-ca-C5kJE6mL.js} +7 -6
  109. package/system/dist/device-certificate-Cddm4Idn.mjs +91 -0
  110. package/system/dist/device-certificate-CguVACQO.js +162 -0
  111. package/system/dist/device-identifiers-BQg9EQi1.js +600 -0
  112. package/system/dist/device-identifiers-iSuQCKmK.mjs +529 -0
  113. package/system/dist/device-kind-BJ2pfsjw.mjs +78 -0
  114. package/system/dist/device-kind-CsSiv_YF.js +101 -0
  115. package/system/dist/device-manager.cap-2abwVLCM.js +2874 -0
  116. package/system/dist/device-manager.cap-CFZSPfUh.mjs +2749 -0
  117. package/system/dist/device-provider.cap-3Uvk6f5-.mjs +331 -0
  118. package/system/dist/device-provider.cap-D7TV2kVH.js +366 -0
  119. package/system/dist/{device-row-store-CeW_GWh9.mjs → device-row-store-YF3jtmkk.mjs} +4 -1
  120. package/system/dist/{device-row-store-BMIR-n3m.js → device-row-store-doTfMOqn.js} +12 -9
  121. package/system/dist/device-transitions.cap-B5w5PYU_.js +860 -0
  122. package/system/dist/device-transitions.cap-DojcwEuX.mjs +819 -0
  123. package/system/dist/device-type-CbQsnFdC.js +477 -0
  124. package/system/dist/device-type-DgEvK3ch.mjs +454 -0
  125. package/system/dist/entry-kind-D9MuVJCK.mjs +44 -0
  126. package/system/dist/entry-kind-cq90c--V.js +55 -0
  127. package/system/dist/error.cap-CSM_SRfR.mjs +3423 -0
  128. package/system/dist/error.cap-DBhgPeWK.js +3848 -0
  129. package/system/dist/file-host-worker.js +1 -1
  130. package/system/dist/file-host-worker.mjs +1 -1
  131. package/system/dist/history-catalog-BKRarIL_.js +831 -0
  132. package/system/dist/history-catalog-BwTeQ4Mr.mjs +802 -0
  133. package/system/dist/{hub-identity-Csxx2Q8k.js → hub-identity-BMdR3Mw9.js} +2 -2
  134. package/system/dist/{hub-identity-CYC1820R.mjs → hub-identity-DjMN9Ac2.mjs} +10 -10
  135. package/system/dist/{hub-mdns-ciao-By5577HM.js → hub-mdns-ciao--0v1TKME.js} +5 -5
  136. package/system/dist/{hub-mdns-ciao-CCDxM5qz.mjs → hub-mdns-ciao-DBrtHOcc.mjs} +2 -2
  137. package/system/dist/index.js +763 -151
  138. package/system/dist/index.mjs +832 -220
  139. package/system/dist/integration-instances.cap-Cl9O-k4h.mjs +538 -0
  140. package/system/dist/integration-instances.cap-dJIxg2_s.js +549 -0
  141. package/system/dist/keychain-admin.cap-Db_oFX4H.js +425 -0
  142. package/system/dist/keychain-admin.cap-GtM7gVGG.mjs +396 -0
  143. package/system/dist/l10n-Bu6aUvSY.mjs +10 -0
  144. package/system/dist/l10n-CGMvp7NF.js +15 -0
  145. package/system/dist/labels-DX5S8deC.js +81 -0
  146. package/system/dist/labels-DsBcU7md.mjs +64 -0
  147. package/system/dist/{legacy-integration-rows-door-CVwOo5aq.js → legacy-integration-rows-door-B1nzxxr5.js} +2 -2
  148. package/system/dist/{legacy-integration-rows-door-D9tQOUzh.mjs → legacy-integration-rows-door-nTvo_6jQ.mjs} +1 -1
  149. package/system/dist/log-destination.cap-CxZzAVaR.mjs +143 -0
  150. package/system/dist/log-destination.cap-DELPJkZ0.js +148 -0
  151. package/system/dist/low-power-sleep.cap-7lfVU41N.js +103 -0
  152. package/system/dist/low-power-sleep.cap-tGPmaZ_V.mjs +92 -0
  153. package/system/dist/mask-shape-Ci8Co9w0.mjs +57 -0
  154. package/system/dist/mask-shape-CmPA2fst.js +92 -0
  155. package/system/dist/metrics-provider.cap-BNmcHDkQ.mjs +405 -0
  156. package/system/dist/metrics-provider.cap-BcmQUt6l.js +410 -0
  157. package/system/dist/migration-BMjgkyG2.js +380 -0
  158. package/system/dist/migration-DRJAtdy7.mjs +321 -0
  159. package/system/dist/network-access.cap-B5TWLDCC.js +1099 -0
  160. package/system/dist/network-access.cap-BJnGbE6n.mjs +1004 -0
  161. package/system/dist/notification-rules.cap-BDh0LDhV.js +3428 -0
  162. package/system/dist/notification-rules.cap-DUmiMBQB.mjs +3357 -0
  163. package/system/dist/notification-targets-CRH-9Dy5.js +509 -0
  164. package/system/dist/notification-targets-DaNE-pIt.mjs +486 -0
  165. package/system/dist/ops-log-CB4pIdqi.mjs +64 -0
  166. package/system/dist/ops-log-pxt9176Z.js +81 -0
  167. package/system/dist/pinned-binary-BOhOSNff.js +28 -0
  168. package/system/dist/pinned-binary-CrIRAi4G.mjs +23 -0
  169. package/system/dist/platform-probe.cap-1WrMhWHx.js +250 -0
  170. package/system/dist/platform-probe.cap-BFeqFLtQ.mjs +233 -0
  171. package/system/dist/prefix-walk-BkMxoXpL.js +843 -0
  172. package/system/dist/prefix-walk-ifwg_ukx.mjs +790 -0
  173. package/system/dist/ptz-autotrack.cap-BW7w0zHD.js +229 -0
  174. package/system/dist/ptz-autotrack.cap-DT2GypXw.mjs +224 -0
  175. package/system/dist/quantity-D3g5SxsZ.mjs +114 -0
  176. package/system/dist/quantity-lY1KiTSZ.js +143 -0
  177. package/system/dist/raw-secret-migration-DxuBFtvi.js +50 -0
  178. package/system/dist/raw-secret-migration-iv88mLoc.mjs +39 -0
  179. package/system/dist/record-entries.cap-sMUhTvTU.mjs +75 -0
  180. package/system/dist/record-entries.cap-ti1C046R.js +80 -0
  181. package/system/dist/record-kind-DoBfYHCs.js +203 -0
  182. package/system/dist/record-kind-ub6NXqfh.mjs +162 -0
  183. package/system/dist/recording-archive.cap-7OrIn9e5.mjs +1299 -0
  184. package/system/dist/recording-archive.cap-D7bo-QSM.js +1328 -0
  185. package/system/dist/records.cap-ClcWV64i.js +329 -0
  186. package/system/dist/records.cap-CwLT2ByG.mjs +294 -0
  187. package/system/dist/relocate-CdVQAk-w.js +804 -0
  188. package/system/dist/relocate-CoZZTui1.mjs +661 -0
  189. package/system/dist/rename-composition-block-BJsL58Ih.js +34798 -0
  190. package/system/dist/rename-composition-block-OAtErZgq.mjs +33631 -0
  191. package/system/dist/{restore-archive-BJfyu0sG.mjs → restore-archive-CjAyKpgX.mjs} +96 -94
  192. package/system/dist/{restore-archive-CIFvqOze.js → restore-archive-CkTkv3Ss.js} +6 -4
  193. package/system/dist/scoped-settings-CylSSq_8.js +955 -0
  194. package/system/dist/scoped-settings-DVWUIP7Z.mjs +650 -0
  195. package/system/dist/server-name-BIhLuHvX.mjs +35 -0
  196. package/system/dist/server-name-OALNvpqC.js +52 -0
  197. package/system/dist/settings-store.cap-Ci4F2zul.mjs +569 -0
  198. package/system/dist/settings-store.cap-wlJhCspr.js +640 -0
  199. package/system/dist/snapshot.cap-3suPdBHV.js +250 -0
  200. package/system/dist/snapshot.cap-Bs8Oyaqh.mjs +245 -0
  201. package/system/dist/source-info-DGB7SdB_.mjs +190 -0
  202. package/system/dist/source-info-DtWf4k2j.js +225 -0
  203. package/system/dist/storage-admin.cap-BSv1NjKJ.mjs +883 -0
  204. package/system/dist/storage-admin.cap-he0OqvVM.js +906 -0
  205. package/system/dist/storage-location-CBT8GCD6.mjs +163 -0
  206. package/system/dist/storage-location-CTweDMZf.js +198 -0
  207. package/system/dist/storage-location-mode-B21UVRRX.mjs +167 -0
  208. package/system/dist/storage-location-mode-CS4sMzo-.js +232 -0
  209. package/system/dist/storage-migration.cap-CyyATY_p.js +330 -0
  210. package/system/dist/storage-migration.cap-D7QqGobp.mjs +313 -0
  211. package/system/dist/storage-occupancy.cap-2rmnS58Z.js +622 -0
  212. package/system/dist/storage-occupancy.cap-CqBztTl9.mjs +611 -0
  213. package/system/dist/storage-provider.cap-Bw0CfxVc.js +213 -0
  214. package/system/dist/storage-provider.cap-CMeck2w4.mjs +202 -0
  215. package/system/dist/stream-catalog.cap-Bp7SkgIf.mjs +6560 -0
  216. package/system/dist/stream-catalog.cap-D3uwePiA.js +6763 -0
  217. package/system/dist/streaming-shared-B8cXatuU.mjs +431 -0
  218. package/system/dist/streaming-shared-DQwFZOSi.js +526 -0
  219. package/system/dist/system-reasons-Be_k1W8g.js +25 -0
  220. package/system/dist/system-reasons-CYj4qwyS.mjs +20 -0
  221. package/system/dist/tag-BxLazvVb.js +2138 -0
  222. package/system/dist/tag-uZBAq6ox.mjs +2073 -0
  223. package/system/dist/user-management.cap-B9QDu8NE.js +825 -0
  224. package/system/dist/user-management.cap-DBIi77sB.mjs +766 -0
  225. package/system/dist/vector-store.cap-DnyfrYDn.js +330 -0
  226. package/system/dist/vector-store.cap-h2GHWQ1t.mjs +319 -0
  227. package/system/dist/{wal-maintenance-CTrCPzds.mjs → wal-maintenance-BG01rOn9.mjs} +0 -0
  228. package/system/dist/{wal-maintenance-dq7T3quB.js → wal-maintenance-DyrebYKF.js} +0 -0
  229. package/system/dist/zod-secret-DS7mj1bk.js +78 -0
  230. package/system/dist/zod-secret-zY4nM61M.mjs +73 -0
  231. package/system/package.json +1 -1
  232. package/system/dist/composition-sources-BI614LJx.mjs +0 -141
  233. package/system/dist/composition-sources-v_kkb8A9.js +0 -152
  234. package/system/dist/coral-accelerators-BSVsBVzt.js +0 -250
  235. package/system/dist/coral-accelerators-BW3OcrLD.mjs +0 -231
  236. package/system/dist/dist-BCHMSqzc.mjs +0 -143467
  237. package/system/dist/dist-BZfvhfS1.js +0 -146970
  238. package/system/dist/prefix-walk-DAOBSyH1.mjs +0 -88
  239. package/system/dist/prefix-walk-Dv6MLZlM.js +0 -99
  240. package/system/dist/rename-composition-block-C9HuBrKS.js +0 -112
  241. package/system/dist/rename-composition-block-DtaYmYAR.mjs +0 -101
@@ -0,0 +1,405 @@
1
+ import { c as method } from "./capability-definition-C2rJdVeX.mjs";
2
+ import { t as NOT_A_DEVICE } from "./system-reasons-CYj4qwyS.mjs";
3
+ import { z } from "zod";
4
+ //#region ../types/dist/esm/capabilities/metrics-provider.cap.mjs
5
+ var CpuBreakdownSchema = /* @__PURE__ */ z.object({
6
+ total: /* @__PURE__ */ z.number(),
7
+ user: /* @__PURE__ */ z.number(),
8
+ system: /* @__PURE__ */ z.number(),
9
+ irq: /* @__PURE__ */ z.number(),
10
+ nice: /* @__PURE__ */ z.number(),
11
+ loadAvg: /* @__PURE__ */ z.tuple([
12
+ /* @__PURE__ */ z.number(),
13
+ /* @__PURE__ */ z.number(),
14
+ /* @__PURE__ */ z.number()
15
+ ]),
16
+ cores: /* @__PURE__ */ z.number()
17
+ });
18
+ var MemoryInfoSchema = /* @__PURE__ */ z.object({
19
+ percent: /* @__PURE__ */ z.number().nullable(),
20
+ totalBytes: /* @__PURE__ */ z.number(),
21
+ usedBytes: /* @__PURE__ */ z.number().nullable(),
22
+ availableBytes: /* @__PURE__ */ z.number().nullable(),
23
+ swapUsedBytes: /* @__PURE__ */ z.number(),
24
+ swapTotalBytes: /* @__PURE__ */ z.number()
25
+ });
26
+ var DiskIoSnapshotSchema = /* @__PURE__ */ z.object({
27
+ readBytes: /* @__PURE__ */ z.number(),
28
+ writeBytes: /* @__PURE__ */ z.number(),
29
+ readOps: /* @__PURE__ */ z.number(),
30
+ writeOps: /* @__PURE__ */ z.number(),
31
+ timestampMs: /* @__PURE__ */ z.number()
32
+ });
33
+ var NetworkIoSnapshotSchema = /* @__PURE__ */ z.object({
34
+ rxBytes: /* @__PURE__ */ z.number(),
35
+ txBytes: /* @__PURE__ */ z.number(),
36
+ rxPackets: /* @__PURE__ */ z.number(),
37
+ txPackets: /* @__PURE__ */ z.number(),
38
+ rxErrors: /* @__PURE__ */ z.number(),
39
+ txErrors: /* @__PURE__ */ z.number(),
40
+ timestampMs: /* @__PURE__ */ z.number()
41
+ });
42
+ var MetricsGpuInfoSchema = /* @__PURE__ */ z.object({
43
+ utilization: /* @__PURE__ */ z.number(),
44
+ model: /* @__PURE__ */ z.string(),
45
+ memoryUsedBytes: /* @__PURE__ */ z.number(),
46
+ memoryTotalBytes: /* @__PURE__ */ z.number(),
47
+ temperature: /* @__PURE__ */ z.number().nullable()
48
+ });
49
+ var ProcessResourceInfoSchema = /* @__PURE__ */ z.object({
50
+ openFds: /* @__PURE__ */ z.number(),
51
+ threadCount: /* @__PURE__ */ z.number(),
52
+ activeHandles: /* @__PURE__ */ z.number(),
53
+ activeRequests: /* @__PURE__ */ z.number()
54
+ });
55
+ var PressureAvgsSchema = /* @__PURE__ */ z.object({
56
+ avg10: /* @__PURE__ */ z.number(),
57
+ avg60: /* @__PURE__ */ z.number(),
58
+ avg300: /* @__PURE__ */ z.number()
59
+ });
60
+ var PressureInfoSchema = /* @__PURE__ */ z.object({
61
+ some: PressureAvgsSchema,
62
+ full: /* @__PURE__ */ PressureAvgsSchema.nullable()
63
+ });
64
+ var SystemResourceSnapshotSchema = /* @__PURE__ */ z.object({
65
+ cpu: CpuBreakdownSchema,
66
+ memory: MemoryInfoSchema,
67
+ gpu: /* @__PURE__ */ MetricsGpuInfoSchema.nullable(),
68
+ network: NetworkIoSnapshotSchema,
69
+ disk: DiskIoSnapshotSchema,
70
+ pressure: /* @__PURE__ */ z.object({
71
+ cpu: /* @__PURE__ */ PressureInfoSchema.nullable(),
72
+ memory: /* @__PURE__ */ PressureInfoSchema.nullable(),
73
+ io: /* @__PURE__ */ PressureInfoSchema.nullable()
74
+ }),
75
+ process: ProcessResourceInfoSchema,
76
+ cpuTemperature: /* @__PURE__ */ z.number().nullable(),
77
+ timestampMs: /* @__PURE__ */ z.number()
78
+ });
79
+ var DiskSpaceInfoSchema = /* @__PURE__ */ z.object({
80
+ path: /* @__PURE__ */ z.string(),
81
+ totalBytes: /* @__PURE__ */ z.number(),
82
+ usedBytes: /* @__PURE__ */ z.number(),
83
+ availableBytes: /* @__PURE__ */ z.number(),
84
+ percent: /* @__PURE__ */ z.number()
85
+ });
86
+ var PidResourceStatsSchema = /* @__PURE__ */ z.object({
87
+ pid: /* @__PURE__ */ z.number(),
88
+ cpu: /* @__PURE__ */ z.number(),
89
+ memory: /* @__PURE__ */ z.number(),
90
+ /**
91
+ * Private (anonymous) resident bytes — the per-process V8 heap + native
92
+ * allocations NOT shared with other processes (Linux RssAnon). This is the
93
+ * "real" per-runner cost; summing it across runners is meaningful, unlike
94
+ * `memory` (RSS), which double-counts the shared mmap'd framework code.
95
+ * Undefined where /proc is unavailable (e.g. macOS).
96
+ */
97
+ privateBytes: /* @__PURE__ */ z.number().optional(),
98
+ /**
99
+ * Shared file-backed resident bytes (Linux RssFile) — mmap'd framework/lib
100
+ * code shared copy-on-write across runners. Undefined on macOS.
101
+ */
102
+ sharedBytes: /* @__PURE__ */ z.number().optional()
103
+ });
104
+ var AddonInstanceSchema = /* @__PURE__ */ z.object({
105
+ addonId: /* @__PURE__ */ z.string(),
106
+ nodeId: /* @__PURE__ */ z.string(),
107
+ role: /* @__PURE__ */ z.enum(["hub", "worker"]),
108
+ pid: /* @__PURE__ */ z.number(),
109
+ state: /* @__PURE__ */ z.enum([
110
+ "starting",
111
+ "running",
112
+ "stopping",
113
+ "stopped",
114
+ "crashed"
115
+ ]),
116
+ uptimeSec: /* @__PURE__ */ z.number()
117
+ });
118
+ var NodeProcessSchema = /* @__PURE__ */ z.object({
119
+ pid: /* @__PURE__ */ z.number(),
120
+ ppid: /* @__PURE__ */ z.number(),
121
+ pgid: /* @__PURE__ */ z.number(),
122
+ classification: /* @__PURE__ */ z.enum([
123
+ "root",
124
+ "managed",
125
+ "system"
126
+ ]),
127
+ /** `$process` addon binding when `managed`, else null. */
128
+ addonId: /* @__PURE__ */ z.string().nullable(),
129
+ /** Kernel-reported nodeId when the process is a known agent/worker. */
130
+ nodeId: /* @__PURE__ */ z.string().nullable(),
131
+ /** Truncated command line. */
132
+ command: /* @__PURE__ */ z.string(),
133
+ /**
134
+ * `ps pcpu` — CPU averaged over the process's WHOLE LIFETIME, not a rate.
135
+ * On a runner up for days it barely moves. Fine as a column, useless as a
136
+ * series: use `cpuMainPercent + cpuGcPercent` for anything time-varying.
137
+ */
138
+ cpuPercent: /* @__PURE__ */ z.number(),
139
+ memoryRssBytes: /* @__PURE__ */ z.number(),
140
+ /**
141
+ * Instantaneous CPU% of the process's own threads over the last
142
+ * process-snapshot window, from a `/proc/<pid>/task/*` tick delta.
143
+ *
144
+ * `null` = UNKNOWN, never zero: no previous sample yet (first tick after
145
+ * boot), the pid was recycled, or this node is not Linux.
146
+ */
147
+ cpuMainPercent: /* @__PURE__ */ z.number().nullable(),
148
+ /**
149
+ * Instantaneous CPU% of V8's `V8Worker` platform pool over the same window.
150
+ *
151
+ * This is the number that rewrote the 2026-08-27 diagnosis — hub-main 73%,
152
+ * `stream-broker` 61% (`docs/architecture/load-ledger.md`). A CPU chart that
153
+ * does not separate it from `cpuMainPercent` shows "busy" where the truth is
154
+ * "allocating too much".
155
+ *
156
+ * Concurrent GC is the dominant tenant of that pool but not the only one
157
+ * (background compilation runs there too), so it is reported as
158
+ * "GC / V8 helpers" rather than as pure collection time. `null` has the same
159
+ * meaning as on `cpuMainPercent`.
160
+ */
161
+ cpuGcPercent: /* @__PURE__ */ z.number().nullable(),
162
+ /** Threads seen in the tick scan. `null` under the same conditions. */
163
+ threadCount: /* @__PURE__ */ z.number().nullable(),
164
+ /** Wall-clock uptime (seconds). Parsed from `ps etime`. */
165
+ uptimeSec: /* @__PURE__ */ z.number()
166
+ });
167
+ /**
168
+ * One retained container-memory reading.
169
+ *
170
+ * `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
171
+ * a second clock: that is what makes "processes sum to X, container says Y"
172
+ * subtractable per point rather than an eyeballed comparison of two series
173
+ * sampled at different instants.
174
+ *
175
+ * A reduced window keeps the sample with the LARGEST `currentBytes` in each
176
+ * bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
177
+ * never coexisted, and a mean would smear away the peak this exists to find.
178
+ */
179
+ var ContainerMemoryPointSchema = /* @__PURE__ */ (/* @__PURE__ */ z.object({
180
+ /** Which hierarchy answered, so a reading is never ambiguous. */
181
+ source: /* @__PURE__ */ z.enum(["cgroup-v2", "cgroup-v1"]),
182
+ /** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
183
+ currentBytes: /* @__PURE__ */ z.number(),
184
+ /** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
185
+ limitBytes: /* @__PURE__ */ z.number().nullable(),
186
+ /** Anonymous pages: the closest thing to "what the processes allocated". */
187
+ anonBytes: /* @__PURE__ */ z.number().nullable(),
188
+ /** Page cache. Charged to the cgroup, owned by no process. */
189
+ fileBytes: /* @__PURE__ */ z.number().nullable(),
190
+ /**
191
+ * Shared memory — and the field that explained the largest single surprise.
192
+ * The i915 driver backs GPU buffers with shmem, so an inference pool or a
193
+ * hardware-decode session holding DRM objects is charged HERE and appears
194
+ * nowhere in a `ps` scan.
195
+ */
196
+ shmemBytes: /* @__PURE__ */ z.number().nullable(),
197
+ /** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
198
+ slabBytes: /* @__PURE__ */ z.number().nullable(),
199
+ /**
200
+ * Shrinkable i915 GEM object bytes, from debugfs.
201
+ *
202
+ * **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
203
+ * component of `currentBytes` and must not be subtracted from it; it says
204
+ * what put the shmem there, where `shmemBytes` only says how much.
205
+ *
206
+ * `null` wherever debugfs is not mounted — which is inside every camstack
207
+ * container today — and on any node with no Intel GPU.
208
+ */
209
+ gpuShmemBytes: /* @__PURE__ */ z.number().nullable()
210
+ })).extend({ atMs: /* @__PURE__ */ z.number() });
211
+ /**
212
+ * One point of one function's series.
213
+ *
214
+ * The unsuffixed fields are the bucket's **MAXIMUM**, and that choice is the
215
+ * point of the whole surface. The two obvious reductions both lie: a mean per
216
+ * bucket smears a spike away, and taking every Nth sample skips it outright.
217
+ * Either would give us a tool built to find peaks that does not show peaks.
218
+ * `...Min` carries the other end, `samples` says how many raw snapshots folded
219
+ * into the bucket, and a mean stays derivable where it is wanted.
220
+ *
221
+ * An UNREDUCED point is a one-sample bucket: `samples === 1` and each `...Min`
222
+ * equals its unsuffixed twin. Reduced and unreduced are the same shape, so a
223
+ * caller cannot tell which it received — which is what "one reader" means.
224
+ */
225
+ var LoadPointSchema = /* @__PURE__ */ z.object({
226
+ /** Bucket START, or the snapshot's own timestamp when unreduced. */
227
+ atMs: /* @__PURE__ */ z.number(),
228
+ /** Raw snapshots in this bucket. Never 0 — AN EMPTY BUCKET IS ABSENT. */
229
+ samples: /* @__PURE__ */ z.number().int(),
230
+ /**
231
+ * `null` = UNKNOWN and it PROPAGATES: a bucket is null unless every process
232
+ * of every snapshot in it reported a thread split. A partial sum is a
233
+ * smaller number that looks exactly as real as a complete one.
234
+ */
235
+ cpuMainPercent: /* @__PURE__ */ z.number().nullable(),
236
+ cpuMainPercentMin: /* @__PURE__ */ z.number().nullable(),
237
+ cpuGcPercent: /* @__PURE__ */ z.number().nullable(),
238
+ cpuGcPercentMin: /* @__PURE__ */ z.number().nullable(),
239
+ /** Lifetime-average CPU%, summed. Always known — and never a rate. */
240
+ cpuLifetimePercent: /* @__PURE__ */ z.number(),
241
+ cpuLifetimePercentMin: /* @__PURE__ */ z.number(),
242
+ memoryRssBytes: /* @__PURE__ */ z.number(),
243
+ memoryRssBytesMin: /* @__PURE__ */ z.number(),
244
+ processCount: /* @__PURE__ */ z.number().int(),
245
+ processCountMin: /* @__PURE__ */ z.number().int()
246
+ });
247
+ /** One function's series. `key` is an addonId, `__root__` or `__unattributed__`. */
248
+ var LoadFunctionSeriesSchema = /* @__PURE__ */ z.object({
249
+ key: /* @__PURE__ */ z.string(),
250
+ kind: /* @__PURE__ */ z.enum([
251
+ "addon",
252
+ "root",
253
+ "unattributed"
254
+ ]),
255
+ /** Oldest-first. A missing interval is MISSING — never zero-filled. */
256
+ points: /* @__PURE__ */ z.array(LoadPointSchema).readonly()
257
+ });
258
+ var NodeLoadSeriesSchema = /* @__PURE__ */ z.object({
259
+ nodeId: /* @__PURE__ */ z.string(),
260
+ /** One entry per function seen in the window, heaviest-first. */
261
+ series: /* @__PURE__ */ z.array(LoadFunctionSeriesSchema).readonly(),
262
+ /**
263
+ * The CONTAINER's memory over the same window, oldest-first.
264
+ *
265
+ * Sits next to `series` rather than in a method of its own because the whole
266
+ * question is a subtraction: the per-process rows in `series` sum to one
267
+ * number and this one is another, and an operator who has to issue two calls
268
+ * to compare them will compare two different instants. Same reader, same
269
+ * `sinceMs`, same `bucketMs`, same timestamps.
270
+ *
271
+ * **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
272
+ * Mac, a bare-metal host, a container with the hierarchy hidden — reports no
273
+ * points at all. A zero here would be indistinguishable from a healthy
274
+ * container and is precisely the lie this field exists to avoid.
275
+ */
276
+ containerMemory: /* @__PURE__ */ z.array(ContainerMemoryPointSchema).readonly(),
277
+ /**
278
+ * Width of one returned bucket, in ms. Equals the sampling cadence when no
279
+ * reduction was needed — so a caller can always say what one point covers
280
+ * without having to know whether it was reduced.
281
+ */
282
+ bucketMs: /* @__PURE__ */ z.number(),
283
+ /** Raw snapshots that went into this answer, across both tiers. */
284
+ retainedSamples: /* @__PURE__ */ z.number(),
285
+ /** Oldest snapshot represented, or `null` when nothing is retained. */
286
+ oldestAtMs: /* @__PURE__ */ z.number().nullable(),
287
+ /** The fixed sampling cadence in force on the cluster, in ms. */
288
+ cadenceMs: /* @__PURE__ */ z.number(),
289
+ /**
290
+ * Did the DURABLE tier contribute? `false` means the answer is the hot ring
291
+ * alone — an agent (which holds no table), or a store that refused.
292
+ * Reported because "the last hour" and "the last six hours" are different
293
+ * questions and an operator must not have to guess which was answered.
294
+ */
295
+ durable: /* @__PURE__ */ z.boolean()
296
+ });
297
+ var GetLoadSeriesInputSchema = /* @__PURE__ */ z.object({
298
+ /**
299
+ * The node whose series is wanted.
300
+ *
301
+ * NOT named `nodeId`: the generated cap router strips a top-level
302
+ * `nodeId` from every method input and uses it to ROUTE the call to
303
+ * that node's provider (`generated-cap-routers.ts`). A series target
304
+ * called `nodeId` would silently become a routing pin and never reach
305
+ * the provider. The hub holds every node it hears from, so the
306
+ * ordinary call is unpinned — answered by the hub, for any node.
307
+ */
308
+ forNodeId: /* @__PURE__ */ z.string(),
309
+ /**
310
+ * EXCLUSIVE lower bound. A caller passes the newest `atMs` it already
311
+ * holds and receives only what it is missing, so seeding a live chart
312
+ * from this method cannot double a point already drawn.
313
+ */
314
+ sinceMs: /* @__PURE__ */ z.number().optional(),
315
+ /**
316
+ * Most points the caller wants PER FUNCTION. The window is reduced to fit,
317
+ * preserving min and max per bucket.
318
+ *
319
+ * Absent means NO reduction — legitimate for a short window and a trap for a
320
+ * long one, which is why a chart passes its own pixel width.
321
+ */
322
+ maxPoints: /* @__PURE__ */ z.number().int().positive().optional()
323
+ });
324
+ var SystemMetricsSchema = /* @__PURE__ */ z.object({
325
+ cpuPercent: /* @__PURE__ */ z.number(),
326
+ /** `null` when the memory sample failed or was not taken yet (D393). */
327
+ memoryPercent: /* @__PURE__ */ z.number().nullable(),
328
+ memoryUsedMB: /* @__PURE__ */ z.number().nullable(),
329
+ memoryTotalMB: /* @__PURE__ */ z.number(),
330
+ diskPercent: /* @__PURE__ */ z.number().optional(),
331
+ temperature: /* @__PURE__ */ z.number().optional(),
332
+ gpuPercent: /* @__PURE__ */ z.number().optional(),
333
+ gpuMemoryPercent: /* @__PURE__ */ z.number().optional()
334
+ });
335
+ var metricsProviderCapability = {
336
+ name: "metrics-provider",
337
+ scope: "system",
338
+ mode: "singleton",
339
+ methods: {
340
+ /** Fresh, full system snapshot (triggers OS-level collection). */
341
+ collectSnapshot: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), SystemResourceSnapshotSchema),
342
+ /** Most recent cached snapshot from the background sampler, or null pre-first-sample. */
343
+ getCached: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), /* @__PURE__ */ SystemResourceSnapshotSchema.nullable()),
344
+ /** Light-weight cached summary for heartbeats and list views. */
345
+ getCurrent: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), SystemMetricsSchema),
346
+ /** Disk space for the given mount/path. */
347
+ getDiskSpace: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ dirPath: /* @__PURE__ */ z.string() }), DiskSpaceInfoSchema),
348
+ /** GPU info (null if unavailable). */
349
+ getGpuInfo: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), /* @__PURE__ */ MetricsGpuInfoSchema.nullable()),
350
+ /** CPU temperature in °C (null if unavailable). */
351
+ getCpuTemperature: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), /* @__PURE__ */ z.number().nullable()),
352
+ /** Per-PID resource stats. Missing/dead PIDs are omitted from the result. */
353
+ getProcessStats: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ pids: /* @__PURE__ */ z.array(/* @__PURE__ */ z.number()) }), /* @__PURE__ */ z.array(PidResourceStatsSchema)),
354
+ /**
355
+ * List addon instances known to this node — one entry per forked worker
356
+ * plus a synthetic 'hub' entry representing the local hub process.
357
+ * Used by benchmarks/observability to detect whether a given addon runs
358
+ * in its own process (measurable independently) or inline with the hub.
359
+ */
360
+ listAddonInstances: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), /* @__PURE__ */ z.array(AddonInstanceSchema).readonly()),
361
+ /**
362
+ * Resource stats for the process hosting the given addon.
363
+ * Returns null when the addon runs in-process on the hub (can't measure
364
+ * independently — caller should detect via listAddonInstances). Returns
365
+ * hub process stats for addonId '$hub'.
366
+ */
367
+ getAddonStats: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ addonId: /* @__PURE__ */ z.string() }), /* @__PURE__ */ PidResourceStatsSchema.nullable()),
368
+ /**
369
+ * Snapshot of every camstack-related process on this node with a
370
+ * root/managed/system classification. Powers the Cluster → Agent →
371
+ * Processes tab: cross-references `$process.list` against a `ps` scan so
372
+ * per-addon CPU and RSS can be attributed, and so a process the cluster
373
+ * does not manage is still visible.
374
+ *
375
+ * **Read-only, by design.** This cap once carried a `killProcess`
376
+ * mutation; it was deleted on 2026-08-27. A runner's lifecycle belongs to
377
+ * `CrashSupervisor` and is driven through `addons.restartAddon` /
378
+ * `$process.restart` — signalling a raw pid went around the supervisor
379
+ * (D6), and the one class it was willing to signal turned out to be the
380
+ * container's own init and the operator's desktop app.
381
+ */
382
+ listNodeProcesses: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), /* @__PURE__ */ z.array(NodeProcessSchema).readonly()),
383
+ /**
384
+ * The retained per-node load series — the ONE reader over BOTH tiers.
385
+ *
386
+ * The in-memory ring is the HOT window (the last 180 snapshots, held by
387
+ * every node's `native-metrics`); the hub's `metrics:node-load-samples`
388
+ * table is the COLD one (the operator's retention, six hours by default).
389
+ * This method merges them and DEDUPES on `atMs`, so a snapshot present in
390
+ * both contributes once and the caller never learns which tier a point
391
+ * came from. There is deliberately no second read surface: two readers is
392
+ * how two charts start disagreeing about the same node.
393
+ *
394
+ * Reads only; nothing is sampled to answer it. Normally called UNPINNED —
395
+ * the hub hears every node's snapshot and holds every node's rows — and
396
+ * answers for any `forNodeId`. Pinned to an agent it answers from that
397
+ * agent's ring alone (`durable: false`). Empty is a legitimate answer: a
398
+ * node nobody has heard from has no series, and saying so is the truth.
399
+ */
400
+ getLoadSeries: /* @__PURE__ */ method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema)
401
+ },
402
+ vocabulary: { notOperatorFacing: NOT_A_DEVICE.CLUSTER }
403
+ };
404
+ //#endregion
405
+ export { metricsProviderCapability as t };