@camstack/server 1.2.718 → 1.2.720

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 (970) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/addon-root-inventory.js +1 -1
  3. package/dist/agent/addon-scan.js +11 -7
  4. package/dist/agent/agent-addon-updates.js +1 -1
  5. package/dist/agent/agent-cap-dispatch-service.js +1 -1
  6. package/dist/agent/agent-heap-watch.js +1 -1
  7. package/dist/agent/agent-http.js +1 -1
  8. package/dist/agent/agent-hub-addon-update.js +1 -1
  9. package/dist/agent/agent-hub-registration.js +1 -1
  10. package/dist/agent/agent-infra-capabilities.js +2 -2
  11. package/dist/agent/agent-mesh-gate.js +1 -1
  12. package/dist/agent/agent-node-certificates.js +1 -1
  13. package/dist/agent/agent-pairing-routes.js +1 -1
  14. package/dist/agent/agent-pairing-store.js +1 -1
  15. package/dist/agent/agent-service.js +6 -2
  16. package/dist/agent/agent-update-service.js +3 -1
  17. package/dist/agent/hub-membership-client.js +1 -1
  18. package/dist/agent/infra-boot-guard.js +2 -2
  19. package/dist/agent/main.js +9 -9
  20. package/dist/api/addon-upload.js +1 -1
  21. package/dist/api/core/addon-settings.router.js +1 -1
  22. package/dist/api/core/agent-pairing.router.js +1 -1
  23. package/dist/api/core/auth-device-cert.procedures.js +1 -1
  24. package/dist/api/core/cap-providers.js +6 -6
  25. package/dist/api/core/certificates.router.js +1 -1
  26. package/dist/api/core/lifecycle-job-runner.js +1 -1
  27. package/dist/api/core/logging-settings.js +1 -1
  28. package/dist/api/core/logs.router.js +2 -2
  29. package/dist/api/core/notifications.router.js +1 -1
  30. package/dist/api/core/preferences.router.js +1 -1
  31. package/dist/api/core/repl.router.js +1 -1
  32. package/dist/api/cors/cors-policy.js +1 -1
  33. package/dist/api/mesh-membership-routes.js +1 -1
  34. package/dist/api/model-distributor.js +1 -1
  35. package/dist/api/trpc/cap-route-error-formatter.js +1 -1
  36. package/dist/api/trpc/cap-router-runtime.js +2 -2
  37. package/dist/api/trpc/core-cap-bridge.js +1 -1
  38. package/dist/api/trpc/device-collection-dispatch.js +1 -1
  39. package/dist/api/trpc/generated-cap-routers.js +1 -1
  40. package/dist/api/trpc/principal-authorization.js +1 -1
  41. package/dist/api/trpc/principal-visibility.js +1 -1
  42. package/dist/api/trpc/scope-access.js +1 -1
  43. package/dist/api/trpc/trpc.context.js +1 -1
  44. package/dist/api/trpc/trpc.middleware.js +1 -1
  45. package/dist/api/trpc/trpc.router.js +3 -3
  46. package/dist/auth/auth-network-policy.js +1 -1
  47. package/dist/auth/client-address.js +1 -1
  48. package/dist/auth/hub-sessions.js +1 -1
  49. package/dist/auth/session-lifetimes.js +1 -1
  50. package/dist/auth/sso-finish-deps.js +1 -1
  51. package/dist/boot/boot-config.js +53 -133
  52. package/dist/boot/platform-keychain-key.js +1 -1
  53. package/dist/boot/post-boot.service.js +1 -1
  54. package/dist/bootstrap-packages.js +3 -3
  55. package/dist/core/addon/addon-call-gateway.js +1 -1
  56. package/dist/core/addon/addon-package.service.js +140 -21
  57. package/dist/core/addon/addon-registry.service.js +36 -32
  58. package/dist/core/addon/addon-requirements.js +81 -0
  59. package/dist/core/addon/hub-addon-api.js +1 -1
  60. package/dist/core/addon/installed-addon-versions.js +82 -0
  61. package/dist/core/addon/package-dir-utils.js +11 -1
  62. package/dist/core/addon/settings-door-wiring.js +1 -1
  63. package/dist/core/addon-bridge/addon-bridge.service.js +3 -3
  64. package/dist/core/addon-pages/addon-pages.service.js +1 -1
  65. package/dist/core/agent/agent-desired-set.js +1 -1
  66. package/dist/core/agent/agent-pairing-http.js +1 -1
  67. package/dist/core/agent/agent-registry.service.js +41 -7
  68. package/dist/core/agent/cluster-node-history-store.js +1 -1
  69. package/dist/core/agent/delivery-requirements.js +36 -0
  70. package/dist/core/agent/forgotten-node-revoker.js +1 -1
  71. package/dist/core/agent/node-removal-hooks.js +6 -2
  72. package/dist/core/auth/auth.service.js +1 -1
  73. package/dist/core/config/config.schema.js +2 -2
  74. package/dist/core/config/config.service.js +1 -1
  75. package/dist/core/events/event-bus.service.js +1 -1
  76. package/dist/core/feature/feature.service.js +1 -1
  77. package/dist/core/lifecycle/lifecycle-state-machine.js +2 -2
  78. package/dist/core/logging/log-history.js +1 -1
  79. package/dist/core/logging/log-ring-buffer.js +2 -2
  80. package/dist/core/logging/logging.service.js +2 -2
  81. package/dist/core/logging/scoped-logger.js +2 -2
  82. package/dist/core/moleculer/cap-route-authority.js +2 -2
  83. package/dist/core/moleculer/hub-mesh-guard.js +1 -1
  84. package/dist/core/moleculer/moleculer.service.js +1 -1
  85. package/dist/core/network/network-quality.service.js +1 -1
  86. package/dist/core/notification/notification-wrapper.service.js +1 -1
  87. package/dist/core/notification/toast-wrapper.service.js +1 -1
  88. package/dist/core/repl/repl-engine.service.js +1 -1
  89. package/dist/core/server-update/server-update.service.js +3 -0
  90. package/dist/core/server-update/system-ensure-prebuilds.js +3 -3
  91. package/dist/core/server-update/system-exec-npm.js +2 -2
  92. package/dist/core/storage/fs-storage-backend.js +2 -2
  93. package/dist/core/storage/storage-location-manager.js +2 -2
  94. package/dist/core/storage/storage.service.js +1 -1
  95. package/dist/framework-nodepath.js +14 -1
  96. package/dist/launcher.js +23 -23
  97. package/dist/legacy-package-names.js +15 -0
  98. package/dist/main.js +2 -2
  99. package/dist/manual-boot.js +4 -3
  100. package/dist/package-inventory.js +6 -3
  101. package/dist/server-root/index.js +182 -30
  102. package/dist/single-copy-cleanup-runner.js +3 -3
  103. package/dist/single-copy-cleanup.js +19 -14
  104. package/package.json +53 -19
  105. package/scripts/closure-postinstall.mjs +1 -1
  106. package/system/assets/addon-pages-aggregator/icon.svg +5 -0
  107. package/system/assets/addon-widgets-aggregator/icon.svg +6 -0
  108. package/system/assets/alert-center/icon.svg +5 -0
  109. package/system/assets/autotrack/icon.svg +5 -0
  110. package/system/assets/backup-orchestrator/icon.svg +5 -0
  111. package/system/assets/calendars/icon.svg +5 -0
  112. package/system/assets/camera-grid/icon.svg +10 -0
  113. package/system/assets/composer/icon.svg +7 -0
  114. package/system/assets/console-logging/icon.svg +4 -0
  115. package/system/assets/core-blocks/icon.svg +6 -0
  116. package/system/assets/device-history/icon.svg +4 -0
  117. package/system/assets/device-manager/icon.svg +6 -0
  118. package/system/assets/filesystem-storage/icon.svg +6 -0
  119. package/system/assets/hub-forwarder/icon.svg +7 -0
  120. package/system/assets/keychain/icon.svg +6 -0
  121. package/system/assets/liveness-monitor/icon.svg +4 -0
  122. package/system/assets/local-auth/icon.svg +5 -0
  123. package/system/assets/local-network/icon.svg +7 -0
  124. package/system/assets/loki-logging/icon.svg +7 -0
  125. package/system/assets/metrics-native/icon.svg +3 -0
  126. package/system/assets/platform-probe/icon.svg +5 -0
  127. package/system/assets/record-entries/icon.svg +8 -0
  128. package/system/assets/remote-access-orchestrator/icon.svg +5 -0
  129. package/system/assets/snapshot/icon.svg +4 -0
  130. package/system/assets/sqlite-settings/icon.svg +5 -0
  131. package/system/assets/storage-orchestrator/icon.svg +8 -0
  132. package/system/assets/system-config/icon.svg +4 -0
  133. package/system/assets/winston-logging/icon.svg +6 -0
  134. package/system/dist/addon/addon-api-factory.d.ts +35 -0
  135. package/system/dist/addon-routes/addon-route-registry.d.ts +37 -0
  136. package/system/dist/addon-runner.js +11894 -0
  137. package/system/dist/addon-runner.mjs +11840 -0
  138. package/system/dist/addon-utils.d.ts +23 -0
  139. package/system/dist/addon-utils.js +27 -0
  140. package/system/dist/addon-utils.mjs +3 -0
  141. package/system/dist/agent-https-BMbnmX5u.mjs +1042 -0
  142. package/system/dist/agent-https-DslXCDRW.js +1289 -0
  143. package/system/dist/amd-accelerators-CEuPFBBK.js +36 -0
  144. package/system/dist/amd-accelerators-U_RsoEDd.mjs +35 -0
  145. package/system/dist/auth/auth-audit-log.d.ts +45 -0
  146. package/system/dist/auth/auth-manager.d.ts +155 -0
  147. package/system/dist/auth/cidr.d.ts +22 -0
  148. package/system/dist/auth/device-ca-store.d.ts +57 -0
  149. package/system/dist/auth/device-ca.d.ts +65 -0
  150. package/system/dist/auth/device-credential-manager.d.ts +158 -0
  151. package/system/dist/auth/external-identity-manager.d.ts +42 -0
  152. package/system/dist/auth/jwt-signing-key.d.ts +42 -0
  153. package/system/dist/auth/legacy-token-tables.d.ts +16 -0
  154. package/system/dist/auth/login-session-manager.d.ts +140 -0
  155. package/system/dist/auth/origin.d.ts +34 -0
  156. package/system/dist/auth/parse-record.d.ts +18 -0
  157. package/system/dist/auth/scope-matcher.d.ts +8 -0
  158. package/system/dist/auth/session-revocation-bus.d.ts +32 -0
  159. package/system/dist/auth/token-expiry.d.ts +62 -0
  160. package/system/dist/auth/totp-manager.d.ts +107 -0
  161. package/system/dist/auth/user-management-internal.d.ts +90 -0
  162. package/system/dist/auth/user-manager.d.ts +69 -0
  163. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.d.ts +57 -0
  164. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +271 -0
  165. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +263 -0
  166. package/system/dist/builtins/addon-pages-aggregator/dedupe-pages.d.ts +24 -0
  167. package/system/dist/builtins/addon-pages-aggregator/index.d.ts +1 -0
  168. package/system/dist/builtins/addon-pages-aggregator/index.js +8 -0
  169. package/system/dist/builtins/addon-pages-aggregator/index.mjs +2 -0
  170. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.d.ts +57 -0
  171. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +257 -0
  172. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +249 -0
  173. package/system/dist/builtins/addon-widgets-aggregator/index.d.ts +1 -0
  174. package/system/dist/builtins/addon-widgets-aggregator/index.js +8 -0
  175. package/system/dist/builtins/addon-widgets-aggregator/index.mjs +2 -0
  176. package/system/dist/builtins/alerts/alert-episode-policy.d.ts +39 -0
  177. package/system/dist/builtins/alerts/alert-store.d.ts +32 -0
  178. package/system/dist/builtins/alerts/alerts.addon.d.ts +148 -0
  179. package/system/dist/builtins/alerts/alerts.addon.js +1566 -0
  180. package/system/dist/builtins/alerts/alerts.addon.mjs +1559 -0
  181. package/system/dist/builtins/alerts/device-label.d.ts +8 -0
  182. package/system/dist/builtins/alerts/emit-alert-policy.d.ts +15 -0
  183. package/system/dist/builtins/alerts/index.d.ts +1 -0
  184. package/system/dist/builtins/alerts/index.js +4 -0
  185. package/system/dist/builtins/alerts/index.mjs +2 -0
  186. package/system/dist/builtins/alerts/migration-alerts.d.ts +13 -0
  187. package/system/dist/builtins/alerts/prune-policy.d.ts +44 -0
  188. package/system/dist/builtins/alerts/record-kinds.d.ts +15 -0
  189. package/system/dist/builtins/alerts/runner-alert.d.ts +58 -0
  190. package/system/dist/builtins/autotrack/autotrack-cameras.d.ts +125 -0
  191. package/system/dist/builtins/autotrack/autotrack-config.d.ts +89 -0
  192. package/system/dist/builtins/autotrack/autotrack-decision.d.ts +86 -0
  193. package/system/dist/builtins/autotrack/autotrack-loop.d.ts +95 -0
  194. package/system/dist/builtins/autotrack/autotrack.addon.d.ts +108 -0
  195. package/system/dist/builtins/autotrack/frame-error.d.ts +50 -0
  196. package/system/dist/builtins/autotrack/frame-measurements.d.ts +97 -0
  197. package/system/dist/builtins/autotrack/index.d.ts +2 -0
  198. package/system/dist/builtins/autotrack/index.js +1018 -0
  199. package/system/dist/builtins/autotrack/index.mjs +1012 -0
  200. package/system/dist/builtins/autotrack/ptz-mirror.d.ts +54 -0
  201. package/system/dist/builtins/autotrack/target-selection.d.ts +46 -0
  202. package/system/dist/builtins/backup-orchestrator/backup-databases.d.ts +51 -0
  203. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts +291 -0
  204. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +3213 -0
  205. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +3204 -0
  206. package/system/dist/builtins/backup-orchestrator/cron-helpers.d.ts +23 -0
  207. package/system/dist/builtins/backup-orchestrator/destination-policy.d.ts +91 -0
  208. package/system/dist/builtins/backup-orchestrator/download-helpers.d.ts +12 -0
  209. package/system/dist/builtins/backup-orchestrator/encryption-key-store.d.ts +49 -0
  210. package/system/dist/builtins/backup-orchestrator/index.d.ts +2 -0
  211. package/system/dist/builtins/backup-orchestrator/index.js +8 -0
  212. package/system/dist/builtins/backup-orchestrator/index.mjs +2 -0
  213. package/system/dist/builtins/backup-orchestrator/manifest-store.d.ts +134 -0
  214. package/system/dist/builtins/backup-orchestrator/record-kinds.d.ts +56 -0
  215. package/system/dist/builtins/backup-orchestrator/restore-archive.d.ts +24 -0
  216. package/system/dist/builtins/backup-orchestrator/run-queue.d.ts +106 -0
  217. package/system/dist/builtins/backup-orchestrator/schedule-store.d.ts +59 -0
  218. package/system/dist/builtins/backup-orchestrator/seed-marker-store.d.ts +26 -0
  219. package/system/dist/builtins/backup-orchestrator/staging-paths.d.ts +36 -0
  220. package/system/dist/builtins/backup-orchestrator/write-targets.d.ts +63 -0
  221. package/system/dist/builtins/calendars/calendar-color.d.ts +9 -0
  222. package/system/dist/builtins/calendars/calendar-prefs-store.d.ts +34 -0
  223. package/system/dist/builtins/calendars/calendars.addon.d.ts +19 -0
  224. package/system/dist/builtins/calendars/calendars.addon.js +227 -0
  225. package/system/dist/builtins/calendars/calendars.addon.mjs +220 -0
  226. package/system/dist/builtins/calendars/index.d.ts +1 -0
  227. package/system/dist/builtins/calendars/index.js +8 -0
  228. package/system/dist/builtins/calendars/index.mjs +2 -0
  229. package/system/dist/builtins/calendars/record-kinds.d.ts +18 -0
  230. package/system/dist/builtins/camera-grid/acquire-retry.d.ts +30 -0
  231. package/system/dist/builtins/camera-grid/addon.d.ts +205 -0
  232. package/system/dist/builtins/camera-grid/flv-join.d.ts +40 -0
  233. package/system/dist/builtins/camera-grid/grid-activity-mirror.d.ts +42 -0
  234. package/system/dist/builtins/camera-grid/grid-activity.d.ts +91 -0
  235. package/system/dist/builtins/camera-grid/grid-camera-declarations.d.ts +59 -0
  236. package/system/dist/builtins/camera-grid/grid-camera-device.d.ts +68 -0
  237. package/system/dist/builtins/camera-grid/grid-canvas-derivation.d.ts +54 -0
  238. package/system/dist/builtins/camera-grid/grid-canvas-seed.d.ts +112 -0
  239. package/system/dist/builtins/camera-grid/grid-canvas.d.ts +85 -0
  240. package/system/dist/builtins/camera-grid/grid-child.d.ts +32 -0
  241. package/system/dist/builtins/camera-grid/grid-compositor-child.d.ts +3 -0
  242. package/system/dist/builtins/camera-grid/grid-compositor-invocation.d.ts +47 -0
  243. package/system/dist/builtins/camera-grid/grid-compositor.d.ts +54 -0
  244. package/system/dist/builtins/camera-grid/grid-detection-mapping.d.ts +61 -0
  245. package/system/dist/builtins/camera-grid/grid-device-settings.d.ts +35 -0
  246. package/system/dist/builtins/camera-grid/grid-filter-graph.d.ts +53 -0
  247. package/system/dist/builtins/camera-grid/grid-frame-sample.d.ts +53 -0
  248. package/system/dist/builtins/camera-grid/grid-instances.d.ts +22 -0
  249. package/system/dist/builtins/camera-grid/grid-last-frame-store.d.ts +58 -0
  250. package/system/dist/builtins/camera-grid/grid-layout-native-provider.d.ts +34 -0
  251. package/system/dist/builtins/camera-grid/grid-plan.d.ts +34 -0
  252. package/system/dist/builtins/camera-grid/grid-profiles.d.ts +104 -0
  253. package/system/dist/builtins/camera-grid/grid-row-normalization.d.ts +10 -0
  254. package/system/dist/builtins/camera-grid/grid-sentry-sources.d.ts +64 -0
  255. package/system/dist/builtins/camera-grid/grid-snapshot.d.ts +62 -0
  256. package/system/dist/builtins/camera-grid/grid-stream-descriptor.d.ts +53 -0
  257. package/system/dist/builtins/camera-grid/grid-stream-invocation.d.ts +44 -0
  258. package/system/dist/builtins/camera-grid/grid-stream-relay.d.ts +35 -0
  259. package/system/dist/builtins/camera-grid/grid-stream-session.d.ts +143 -0
  260. package/system/dist/builtins/camera-grid/grid-tile-feed.d.ts +50 -0
  261. package/system/dist/builtins/camera-grid/grid-tile-plan.d.ts +66 -0
  262. package/system/dist/builtins/camera-grid/grid-wire-format.d.ts +30 -0
  263. package/system/dist/builtins/camera-grid/index.d.ts +45 -0
  264. package/system/dist/builtins/camera-grid/index.js +3994 -0
  265. package/system/dist/builtins/camera-grid/index.mjs +3961 -0
  266. package/system/dist/builtins/camera-grid/silence-analysis.d.ts +37 -0
  267. package/system/dist/builtins/cluster-agent/record-kinds.d.ts +49 -0
  268. package/system/dist/builtins/composer/actuator-dispatch.d.ts +13 -0
  269. package/system/dist/builtins/composer/actuator-groups.d.ts +68 -0
  270. package/system/dist/builtins/composer/actuator-invoke.d.ts +32 -0
  271. package/system/dist/builtins/composer/claim-gate.d.ts +59 -0
  272. package/system/dist/builtins/composer/composed-device-set.d.ts +52 -0
  273. package/system/dist/builtins/composer/composed-device.d.ts +57 -0
  274. package/system/dist/builtins/composer/composer-apply-waits.d.ts +28 -0
  275. package/system/dist/builtins/composer/composer-grafts.d.ts +73 -0
  276. package/system/dist/builtins/composer/composer-live-set.d.ts +30 -0
  277. package/system/dist/builtins/composer/composer-plan.d.ts +112 -0
  278. package/system/dist/builtins/composer/composer-runtime-factory.d.ts +30 -0
  279. package/system/dist/builtins/composer/composer-seeds.d.ts +28 -0
  280. package/system/dist/builtins/composer/composer-verdict.d.ts +33 -0
  281. package/system/dist/builtins/composer/composer.addon.d.ts +26 -0
  282. package/system/dist/builtins/composer/composer.addon.js +6229 -0
  283. package/system/dist/builtins/composer/composer.addon.mjs +6223 -0
  284. package/system/dist/builtins/composer/composer.d.ts +208 -0
  285. package/system/dist/builtins/composer/composition-declarations.d.ts +64 -0
  286. package/system/dist/builtins/composer/composition-evaluation.d.ts +53 -0
  287. package/system/dist/builtins/composer/composition-runtime.d.ts +203 -0
  288. package/system/dist/builtins/composer/composition-target.d.ts +60 -0
  289. package/system/dist/builtins/composer/confirmed-seed.d.ts +44 -0
  290. package/system/dist/builtins/composer/deadline-timer.d.ts +18 -0
  291. package/system/dist/builtins/composer/existing-target.d.ts +131 -0
  292. package/system/dist/builtins/composer/field-record.d.ts +64 -0
  293. package/system/dist/builtins/composer/forward-commands.d.ts +61 -0
  294. package/system/dist/builtins/composer/graft-host.d.ts +71 -0
  295. package/system/dist/builtins/composer/held-claims.d.ts +29 -0
  296. package/system/dist/builtins/composer/history-helpers.d.ts +67 -0
  297. package/system/dist/builtins/composer/index.d.ts +1 -0
  298. package/system/dist/builtins/composer/index.js +8 -0
  299. package/system/dist/builtins/composer/index.mjs +2 -0
  300. package/system/dist/builtins/composer/math-quantity.d.ts +20 -0
  301. package/system/dist/builtins/composer/own-field-reads.d.ts +30 -0
  302. package/system/dist/builtins/composer/owned-fields-target.d.ts +95 -0
  303. package/system/dist/builtins/composer/pulse-seed-resolve.d.ts +59 -0
  304. package/system/dist/builtins/composer/pulse-seed.d.ts +75 -0
  305. package/system/dist/builtins/composer/slice-assembler.d.ts +26 -0
  306. package/system/dist/builtins/composer/source-readings.d.ts +128 -0
  307. package/system/dist/builtins/composer/source-tracker.d.ts +135 -0
  308. package/system/dist/builtins/console-logging/console-destination.d.ts +19 -0
  309. package/system/dist/builtins/console-logging/console-logging.addon.d.ts +26 -0
  310. package/system/dist/builtins/console-logging/index.d.ts +3 -0
  311. package/system/dist/builtins/console-logging/index.js +108 -0
  312. package/system/dist/builtins/console-logging/index.mjs +99 -0
  313. package/system/dist/builtins/core-blocks/actions-service.d.ts +113 -0
  314. package/system/dist/builtins/core-blocks/actions-store.d.ts +32 -0
  315. package/system/dist/builtins/core-blocks/actions-wiring.d.ts +32 -0
  316. package/system/dist/builtins/core-blocks/block-package.d.ts +54 -0
  317. package/system/dist/builtins/core-blocks/block-settings-store.d.ts +93 -0
  318. package/system/dist/builtins/core-blocks/block-supervisor.d.ts +176 -0
  319. package/system/dist/builtins/core-blocks/block-type-defs.d.ts +29 -0
  320. package/system/dist/builtins/core-blocks/blocks-integration.d.ts +89 -0
  321. package/system/dist/builtins/core-blocks/compile-block.d.ts +52 -0
  322. package/system/dist/builtins/core-blocks/composition-api.d.ts +50 -0
  323. package/system/dist/builtins/core-blocks/composition-peers.d.ts +31 -0
  324. package/system/dist/builtins/core-blocks/composition-sources.d.ts +40 -0
  325. package/system/dist/builtins/core-blocks/core-block-store.d.ts +120 -0
  326. package/system/dist/builtins/core-blocks/core-blocks.addon.d.ts +108 -0
  327. package/system/dist/builtins/core-blocks/core-blocks.addon.js +6374 -0
  328. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +6355 -0
  329. package/system/dist/builtins/core-blocks/extract-settings-schema.d.ts +6 -0
  330. package/system/dist/builtins/core-blocks/index.d.ts +8 -0
  331. package/system/dist/builtins/core-blocks/index.js +21 -0
  332. package/system/dist/builtins/core-blocks/index.mjs +2 -0
  333. package/system/dist/builtins/core-blocks/lock-door-gate.d.ts +31 -0
  334. package/system/dist/builtins/core-blocks/lock-door-sensor.d.ts +35 -0
  335. package/system/dist/builtins/core-blocks/power-source-service.d.ts +70 -0
  336. package/system/dist/builtins/core-blocks/record-kinds.d.ts +83 -0
  337. package/system/dist/builtins/core-blocks/remote-call-redirect.d.ts +23 -0
  338. package/system/dist/builtins/core-blocks/remote-components-service.d.ts +10 -0
  339. package/system/dist/builtins/core-blocks/remote-service.d.ts +85 -0
  340. package/system/dist/builtins/core-blocks/remote-wiring.d.ts +49 -0
  341. package/system/dist/builtins/core-blocks/runs-api.d.ts +30 -0
  342. package/system/dist/builtins/core-blocks/runs-ledger.d.ts +64 -0
  343. package/system/dist/builtins/core-blocks/scheduler/scheduler-engine.d.ts +91 -0
  344. package/system/dist/builtins/core-blocks/scheduler/scheduler-holds.d.ts +54 -0
  345. package/system/dist/builtins/core-blocks/scheduler/scheduler-service.d.ts +76 -0
  346. package/system/dist/builtins/core-blocks/scheduler/scheduler-store.d.ts +23 -0
  347. package/system/dist/builtins/core-blocks/scheduler/scheduler-timeline.d.ts +53 -0
  348. package/system/dist/builtins/core-blocks/scheduler/scheduler-trace.d.ts +17 -0
  349. package/system/dist/builtins/core-blocks/scheduler/scheduler-types.d.ts +20 -0
  350. package/system/dist/builtins/core-blocks/scheduler/scheduler-wiring.d.ts +41 -0
  351. package/system/dist/builtins/core-blocks/templates-service.d.ts +24 -0
  352. package/system/dist/builtins/device-history/capture/capture-engine.d.ts +113 -0
  353. package/system/dist/builtins/device-history/capture/capture-filter.d.ts +37 -0
  354. package/system/dist/builtins/device-history/capture/device-directory.d.ts +47 -0
  355. package/system/dist/builtins/device-history/capture/field-path.d.ts +10 -0
  356. package/system/dist/builtins/device-history/capture/point-writer.d.ts +63 -0
  357. package/system/dist/builtins/device-history/device-history.addon.d.ts +53 -0
  358. package/system/dist/builtins/device-history/device-history.addon.js +2885 -0
  359. package/system/dist/builtins/device-history/device-history.addon.mjs +2878 -0
  360. package/system/dist/builtins/device-history/index.d.ts +3 -0
  361. package/system/dist/builtins/device-history/ingest/producer-ingest.d.ts +99 -0
  362. package/system/dist/builtins/device-history/query/history-query.d.ts +116 -0
  363. package/system/dist/builtins/device-history/query/point-shape.d.ts +31 -0
  364. package/system/dist/builtins/device-history/retention/departure-tracker.d.ts +33 -0
  365. package/system/dist/builtins/device-history/retention/orphans.d.ts +50 -0
  366. package/system/dist/builtins/device-history/retention/retention.d.ts +74 -0
  367. package/system/dist/builtins/device-history/rollup/rollup-engine.d.ts +74 -0
  368. package/system/dist/builtins/device-history/rollup/rollup-math.d.ts +50 -0
  369. package/system/dist/builtins/device-history/runtime/history-runtime.d.ts +118 -0
  370. package/system/dist/builtins/device-history/status/counters.d.ts +55 -0
  371. package/system/dist/builtins/device-history/store/history-door.d.ts +7 -0
  372. package/system/dist/builtins/device-history/store/history-schema.d.ts +28 -0
  373. package/system/dist/builtins/device-history/store/history-store.d.ts +109 -0
  374. package/system/dist/builtins/device-history/store/row-readers.d.ts +11 -0
  375. package/system/dist/builtins/device-history/store/series-registry.d.ts +64 -0
  376. package/system/dist/builtins/device-history/store/series-scale.d.ts +37 -0
  377. package/system/dist/builtins/device-history/time/bucket-time.d.ts +25 -0
  378. package/system/dist/builtins/device-manager/adoption-job-engine.d.ts +153 -0
  379. package/system/dist/builtins/device-manager/claimed-status-overlay.d.ts +45 -0
  380. package/system/dist/builtins/device-manager/contribution-cache.d.ts +85 -0
  381. package/system/dist/builtins/device-manager/day-night-config-schema.d.ts +30 -0
  382. package/system/dist/builtins/device-manager/device-aggregation-merge.d.ts +22 -0
  383. package/system/dist/builtins/device-manager/device-aggregation.d.ts +335 -0
  384. package/system/dist/builtins/device-manager/device-bindings-store.d.ts +278 -0
  385. package/system/dist/builtins/device-manager/device-config-contribution.d.ts +45 -0
  386. package/system/dist/builtins/device-manager/device-config-secrets.d.ts +40 -0
  387. package/system/dist/builtins/device-manager/device-event-propagator.d.ts +26 -0
  388. package/system/dist/builtins/device-manager/device-extension-linked-slot.d.ts +27 -0
  389. package/system/dist/builtins/device-manager/device-form-secrets.d.ts +25 -0
  390. package/system/dist/builtins/device-manager/device-linked-devices.d.ts +201 -0
  391. package/system/dist/builtins/device-manager/device-manager.addon.d.ts +234 -0
  392. package/system/dist/builtins/device-manager/device-manager.addon.js +11369 -0
  393. package/system/dist/builtins/device-manager/device-manager.addon.mjs +11358 -0
  394. package/system/dist/builtins/device-manager/device-meta-actions.d.ts +338 -0
  395. package/system/dist/builtins/device-manager/device-meta-store.d.ts +103 -0
  396. package/system/dist/builtins/device-manager/device-meta-types.d.ts +277 -0
  397. package/system/dist/builtins/device-manager/device-online-fallback.d.ts +35 -0
  398. package/system/dist/builtins/device-manager/device-projection.d.ts +71 -0
  399. package/system/dist/builtins/device-manager/device-provider-context.d.ts +126 -0
  400. package/system/dist/builtins/device-manager/device-queries.d.ts +67 -0
  401. package/system/dist/builtins/device-manager/device-removal-hooks.d.ts +92 -0
  402. package/system/dist/builtins/device-manager/device-row-store.d.ts +449 -0
  403. package/system/dist/builtins/device-manager/device-source-activation.d.ts +103 -0
  404. package/system/dist/builtins/device-manager/device-state-claim-views.d.ts +92 -0
  405. package/system/dist/builtins/device-manager/device-state-claims.d.ts +66 -0
  406. package/system/dist/builtins/device-manager/device-state-mirror.d.ts +267 -0
  407. package/system/dist/builtins/device-manager/device-sync-resolvers.d.ts +30 -0
  408. package/system/dist/builtins/device-manager/device-tombstone-store.d.ts +29 -0
  409. package/system/dist/builtins/device-manager/discovery-orchestrator.d.ts +45 -0
  410. package/system/dist/builtins/device-manager/field-claims-index.d.ts +96 -0
  411. package/system/dist/builtins/device-manager/field-ownership.d.ts +71 -0
  412. package/system/dist/builtins/device-manager/fleet-read-census.d.ts +104 -0
  413. package/system/dist/builtins/device-manager/image-settings-config-schema.d.ts +22 -0
  414. package/system/dist/builtins/device-manager/index.d.ts +2 -0
  415. package/system/dist/builtins/device-manager/index.js +8 -0
  416. package/system/dist/builtins/device-manager/index.mjs +2 -0
  417. package/system/dist/builtins/device-manager/linked-devices-manual-backfill.d.ts +27 -0
  418. package/system/dist/builtins/device-manager/location-alignment.d.ts +61 -0
  419. package/system/dist/builtins/device-manager/migrate-device.d.ts +192 -0
  420. package/system/dist/builtins/device-manager/migrate-guard.d.ts +78 -0
  421. package/system/dist/builtins/device-manager/migrate-hardware-state.d.ts +79 -0
  422. package/system/dist/builtins/device-manager/migrate-reload.d.ts +46 -0
  423. package/system/dist/builtins/device-manager/migration-refused.d.ts +23 -0
  424. package/system/dist/builtins/device-manager/mirror-row-writer.d.ts +222 -0
  425. package/system/dist/builtins/device-manager/record-kinds.d.ts +14 -0
  426. package/system/dist/builtins/device-manager/recording-onboard-config-schema.d.ts +65 -0
  427. package/system/dist/builtins/device-manager/removal-cleanup.d.ts +50 -0
  428. package/system/dist/builtins/device-manager/removal-fence.d.ts +58 -0
  429. package/system/dist/builtins/device-manager/running-flip.d.ts +11 -0
  430. package/system/dist/builtins/device-manager/runtime-state-persist-gate.d.ts +64 -0
  431. package/system/dist/builtins/device-manager/secret-config-paths.d.ts +24 -0
  432. package/system/dist/builtins/device-manager/stale-wrapper-activations.d.ts +59 -0
  433. package/system/dist/builtins/device-manager/write-lock.d.ts +17 -0
  434. package/system/dist/builtins/hub-forwarder/hub-forwarder-destination.d.ts +43 -0
  435. package/system/dist/builtins/hub-forwarder/hub-forwarder.addon.d.ts +16 -0
  436. package/system/dist/builtins/hub-forwarder/index.d.ts +3 -0
  437. package/system/dist/builtins/hub-forwarder/index.js +151 -0
  438. package/system/dist/builtins/hub-forwarder/index.mjs +142 -0
  439. package/system/dist/builtins/keychain/index.d.ts +1 -0
  440. package/system/dist/builtins/keychain/index.js +2059 -0
  441. package/system/dist/builtins/keychain/index.mjs +2052 -0
  442. package/system/dist/builtins/keychain/key-sources.d.ts +37 -0
  443. package/system/dist/builtins/keychain/keychain-crypto.d.ts +28 -0
  444. package/system/dist/builtins/keychain/keychain-reset-trigger.d.ts +25 -0
  445. package/system/dist/builtins/keychain/keychain-service.d.ts +180 -0
  446. package/system/dist/builtins/keychain/keychain-store.d.ts +125 -0
  447. package/system/dist/builtins/keychain/keychain-usage.d.ts +17 -0
  448. package/system/dist/builtins/keychain/keychain.addon.d.ts +36 -0
  449. package/system/dist/builtins/keychain/platform-key-source.d.ts +24 -0
  450. package/system/dist/builtins/keychain/record-kinds.d.ts +16 -0
  451. package/system/dist/builtins/keychain/system-held-secrets.d.ts +25 -0
  452. package/system/dist/builtins/liveness-monitor/index.d.ts +2 -0
  453. package/system/dist/builtins/liveness-monitor/index.js +6 -0
  454. package/system/dist/builtins/liveness-monitor/index.mjs +2 -0
  455. package/system/dist/builtins/liveness-monitor/liveness-checks.d.ts +85 -0
  456. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.d.ts +46 -0
  457. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +443 -0
  458. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +437 -0
  459. package/system/dist/builtins/liveness-monitor/liveness-reporter.d.ts +28 -0
  460. package/system/dist/builtins/liveness-monitor/storage-root-access.d.ts +53 -0
  461. package/system/dist/builtins/local-auth/admin-account-boot.d.ts +27 -0
  462. package/system/dist/builtins/local-auth/auth-config-reader.d.ts +39 -0
  463. package/system/dist/builtins/local-auth/auth-schema.d.ts +93 -0
  464. package/system/dist/builtins/local-auth/index.d.ts +1 -0
  465. package/system/dist/builtins/local-auth/index.js +4 -0
  466. package/system/dist/builtins/local-auth/index.mjs +2 -0
  467. package/system/dist/builtins/local-auth/jwt-signing-key-keeper.d.ts +30 -0
  468. package/system/dist/builtins/local-auth/local-auth.addon.d.ts +48 -0
  469. package/system/dist/builtins/local-auth/local-auth.addon.js +12418 -0
  470. package/system/dist/builtins/local-auth/local-auth.addon.mjs +12388 -0
  471. package/system/dist/builtins/local-auth/oauth-grants.d.ts +71 -0
  472. package/system/dist/builtins/local-auth/oauth-session-manager.d.ts +44 -0
  473. package/system/dist/builtins/local-auth/person-scopes.d.ts +7 -0
  474. package/system/dist/builtins/local-auth/preferences-record-kinds.d.ts +27 -0
  475. package/system/dist/builtins/local-auth/record-kinds.d.ts +137 -0
  476. package/system/dist/builtins/local-auth/user-preferences-store.d.ts +56 -0
  477. package/system/dist/builtins/local-network/address-book.d.ts +128 -0
  478. package/system/dist/builtins/local-network/agent-mdns.d.ts +56 -0
  479. package/system/dist/builtins/local-network/hub-mdns-ciao.d.ts +7 -0
  480. package/system/dist/builtins/local-network/hub-mdns.d.ts +58 -0
  481. package/system/dist/builtins/local-network/index.d.ts +1 -0
  482. package/system/dist/builtins/local-network/index.js +10 -0
  483. package/system/dist/builtins/local-network/index.mjs +2 -0
  484. package/system/dist/builtins/local-network/ipv6-lan.d.ts +21 -0
  485. package/system/dist/builtins/local-network/local-hostname.d.ts +15 -0
  486. package/system/dist/builtins/local-network/local-network.addon.d.ts +334 -0
  487. package/system/dist/builtins/local-network/local-network.addon.js +2487 -0
  488. package/system/dist/builtins/local-network/local-network.addon.mjs +2466 -0
  489. package/system/dist/builtins/local-network/scan/dns-wire.d.ts +17 -0
  490. package/system/dist/builtins/local-network/scan/scan-engine.d.ts +31 -0
  491. package/system/dist/builtins/local-network/scan/scan-io-node.d.ts +2 -0
  492. package/system/dist/builtins/local-network/scan/scan-io.d.ts +56 -0
  493. package/system/dist/builtins/local-network/scan/subnets.d.ts +57 -0
  494. package/system/dist/builtins/loki-logging/index.d.ts +4 -0
  495. package/system/dist/builtins/loki-logging/index.js +915 -0
  496. package/system/dist/builtins/loki-logging/index.mjs +901 -0
  497. package/system/dist/builtins/loki-logging/loki-destination.d.ts +142 -0
  498. package/system/dist/builtins/loki-logging/loki-logging.addon.d.ts +66 -0
  499. package/system/dist/builtins/loki-logging/loki-payload.d.ts +100 -0
  500. package/system/dist/builtins/loki-logging/loki-read.d.ts +51 -0
  501. package/system/dist/builtins/loki-logging/retire-enabled-flag.d.ts +48 -0
  502. package/system/dist/builtins/native-metrics/cgroup-memory.d.ts +240 -0
  503. package/system/dist/builtins/native-metrics/cgroup-pids.d.ts +159 -0
  504. package/system/dist/builtins/native-metrics/container-memory-ring.d.ts +18 -0
  505. package/system/dist/builtins/native-metrics/darwin-memory.d.ts +26 -0
  506. package/system/dist/builtins/native-metrics/gpu-probe.d.ts +18 -0
  507. package/system/dist/builtins/native-metrics/index.d.ts +2 -0
  508. package/system/dist/builtins/native-metrics/load-series-config.d.ts +83 -0
  509. package/system/dist/builtins/native-metrics/load-series-reader.d.ts +63 -0
  510. package/system/dist/builtins/native-metrics/load-series-types.d.ts +14 -0
  511. package/system/dist/builtins/native-metrics/native-metrics-provider.d.ts +49 -0
  512. package/system/dist/builtins/native-metrics/native-metrics.addon.d.ts +233 -0
  513. package/system/dist/builtins/native-metrics/native-metrics.addon.js +3116 -0
  514. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +3106 -0
  515. package/system/dist/builtins/native-metrics/node-load-ring.d.ts +212 -0
  516. package/system/dist/builtins/native-metrics/node-metrics-history-recorder.d.ts +155 -0
  517. package/system/dist/builtins/native-metrics/proc-process-table.d.ts +25 -0
  518. package/system/dist/builtins/native-metrics/process-classification.d.ts +110 -0
  519. package/system/dist/builtins/native-metrics/thread-cpu-sampler.d.ts +116 -0
  520. package/system/dist/builtins/platform-probe/accelerator-facts-probe.d.ts +24 -0
  521. package/system/dist/builtins/platform-probe/accelerator-reprobe.d.ts +23 -0
  522. package/system/dist/builtins/platform-probe/amd-accelerators.d.ts +15 -0
  523. package/system/dist/builtins/platform-probe/amd-npu.d.ts +35 -0
  524. package/system/dist/builtins/platform-probe/coral-accelerators.d.ts +87 -0
  525. package/system/dist/builtins/platform-probe/index.d.ts +57 -0
  526. package/system/dist/builtins/platform-probe/index.js +1151 -0
  527. package/system/dist/builtins/platform-probe/index.mjs +1140 -0
  528. package/system/dist/builtins/platform-probe/inference-config-resolver.d.ts +29 -0
  529. package/system/dist/builtins/platform-probe/intel-accelerators.d.ts +14 -0
  530. package/system/dist/builtins/platform-probe/intel-npu.d.ts +38 -0
  531. package/system/dist/builtins/platform-probe/platform-scorer.d.ts +66 -0
  532. package/system/dist/builtins/platform-probe/runtime-packages.d.ts +6 -0
  533. package/system/dist/builtins/platform-probe/windows-hardware.d.ts +77 -0
  534. package/system/dist/builtins/record-entries/entries-service.d.ts +42 -0
  535. package/system/dist/builtins/record-entries/index.d.ts +1 -0
  536. package/system/dist/builtins/record-entries/index.js +162 -0
  537. package/system/dist/builtins/record-entries/index.mjs +156 -0
  538. package/system/dist/builtins/record-entries/record-entries.addon.d.ts +13 -0
  539. package/system/dist/builtins/records-isolated.d.ts +10 -0
  540. package/system/dist/builtins/remote-access-orchestrator/enabled-providers-reconcile.d.ts +96 -0
  541. package/system/dist/builtins/remote-access-orchestrator/index.d.ts +1 -0
  542. package/system/dist/builtins/remote-access-orchestrator/index.js +8 -0
  543. package/system/dist/builtins/remote-access-orchestrator/index.mjs +2 -0
  544. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.d.ts +71 -0
  545. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +214 -0
  546. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +208 -0
  547. package/system/dist/builtins/shared/device-state-changed.d.ts +16 -0
  548. package/system/dist/builtins/shared/settle-sources.d.ts +22 -0
  549. package/system/dist/builtins/snapshot/index.d.ts +2 -0
  550. package/system/dist/builtins/snapshot/index.js +2720 -0
  551. package/system/dist/builtins/snapshot/index.mjs +2713 -0
  552. package/system/dist/builtins/snapshot/snapshot-cache.d.ts +108 -0
  553. package/system/dist/builtins/snapshot/snapshot-coalescing.d.ts +135 -0
  554. package/system/dist/builtins/snapshot/snapshot-courtesy.d.ts +68 -0
  555. package/system/dist/builtins/snapshot/snapshot-durable-store.d.ts +36 -0
  556. package/system/dist/builtins/snapshot/snapshot-fatigue.d.ts +41 -0
  557. package/system/dist/builtins/snapshot/snapshot-grab-pick.d.ts +20 -0
  558. package/system/dist/builtins/snapshot/snapshot-link-url.d.ts +66 -0
  559. package/system/dist/builtins/snapshot/snapshot-media-handler.d.ts +121 -0
  560. package/system/dist/builtins/snapshot/snapshot-resize.d.ts +75 -0
  561. package/system/dist/builtins/snapshot/snapshot.addon.d.ts +581 -0
  562. package/system/dist/builtins/sqlite-storage/analyze-stats.d.ts +83 -0
  563. package/system/dist/builtins/sqlite-storage/config-store.d.ts +8 -0
  564. package/system/dist/builtins/sqlite-storage/database-snapshot-provider.d.ts +18 -0
  565. package/system/dist/builtins/sqlite-storage/device-store.d.ts +23 -0
  566. package/system/dist/builtins/sqlite-storage/file-host-client.d.ts +75 -0
  567. package/system/dist/builtins/sqlite-storage/file-host-handlers.d.ts +27 -0
  568. package/system/dist/builtins/sqlite-storage/file-host-protocol.d.ts +167 -0
  569. package/system/dist/builtins/sqlite-storage/file-host-worker.d.ts +1 -0
  570. package/system/dist/builtins/sqlite-storage/filesystem-browse-provider.d.ts +25 -0
  571. package/system/dist/builtins/sqlite-storage/filesystem-storage-provider.d.ts +83 -0
  572. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.d.ts +33 -0
  573. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +419 -0
  574. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +411 -0
  575. package/system/dist/builtins/sqlite-storage/filter-compiler.d.ts +126 -0
  576. package/system/dist/builtins/sqlite-storage/index.d.ts +12 -0
  577. package/system/dist/builtins/sqlite-storage/index.js +82 -0
  578. package/system/dist/builtins/sqlite-storage/index.mjs +50 -0
  579. package/system/dist/builtins/sqlite-storage/integration-record-kinds.d.ts +31 -0
  580. package/system/dist/builtins/sqlite-storage/integration-registry.d.ts +34 -0
  581. package/system/dist/builtins/sqlite-storage/migrations/migration-actions.d.ts +12 -0
  582. package/system/dist/builtins/sqlite-storage/migrations/migration-edits.d.ts +35 -0
  583. package/system/dist/builtins/sqlite-storage/migrations/migration-engine.d.ts +125 -0
  584. package/system/dist/builtins/sqlite-storage/migrations/migration-hold.d.ts +23 -0
  585. package/system/dist/builtins/sqlite-storage/migrations/migration-pass.d.ts +48 -0
  586. package/system/dist/builtins/sqlite-storage/migrations/migration-restore-marker.d.ts +3 -0
  587. package/system/dist/builtins/sqlite-storage/migrations/migration-types.d.ts +151 -0
  588. package/system/dist/builtins/sqlite-storage/migrations/migrations-provider.d.ts +61 -0
  589. package/system/dist/builtins/sqlite-storage/owned-sqlite-file.d.ts +173 -0
  590. package/system/dist/builtins/sqlite-storage/path-guard.d.ts +11 -0
  591. package/system/dist/builtins/sqlite-storage/placement-errors.d.ts +60 -0
  592. package/system/dist/builtins/sqlite-storage/placement-router.d.ts +85 -0
  593. package/system/dist/builtins/sqlite-storage/prefix-range.d.ts +50 -0
  594. package/system/dist/builtins/sqlite-storage/query-bounds.d.ts +110 -0
  595. package/system/dist/builtins/sqlite-storage/query-profiler.d.ts +242 -0
  596. package/system/dist/builtins/sqlite-storage/records/records-catalog.d.ts +27 -0
  597. package/system/dist/builtins/sqlite-storage/records/records-engine-types.d.ts +48 -0
  598. package/system/dist/builtins/sqlite-storage/records/records-engine.d.ts +115 -0
  599. package/system/dist/builtins/sqlite-storage/records/records-explain.d.ts +18 -0
  600. package/system/dist/builtins/sqlite-storage/records/records-plan.d.ts +95 -0
  601. package/system/dist/builtins/sqlite-storage/records/records-probe.d.ts +33 -0
  602. package/system/dist/builtins/sqlite-storage/records/records-provider.d.ts +72 -0
  603. package/system/dist/builtins/sqlite-storage/records/records-rows.d.ts +46 -0
  604. package/system/dist/builtins/sqlite-storage/records/records-sql.d.ts +39 -0
  605. package/system/dist/builtins/sqlite-storage/retired-settings-keys.d.ts +276 -0
  606. package/system/dist/builtins/sqlite-storage/shm-lock-canary.d.ts +60 -0
  607. package/system/dist/builtins/sqlite-storage/sqlite-pragmas.d.ts +191 -0
  608. package/system/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +583 -0
  609. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +52 -0
  610. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2960 -0
  611. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2952 -0
  612. package/system/dist/builtins/sqlite-storage/sqlite-snapshot-protocol.d.ts +54 -0
  613. package/system/dist/builtins/sqlite-storage/sqlite-snapshot-worker.d.ts +33 -0
  614. package/system/dist/builtins/sqlite-storage/sqlite-snapshotter.d.ts +118 -0
  615. package/system/dist/builtins/sqlite-storage/stale-data/stale-data-audit.d.ts +81 -0
  616. package/system/dist/builtins/sqlite-storage/stale-data/stale-data-ports.d.ts +17 -0
  617. package/system/dist/builtins/sqlite-storage/statement-shape.d.ts +64 -0
  618. package/system/dist/builtins/sqlite-storage/storage-admin-provider.d.ts +33 -0
  619. package/system/dist/builtins/sqlite-storage/table-sizes.d.ts +95 -0
  620. package/system/dist/builtins/sqlite-storage/vector-index-shared.d.ts +81 -0
  621. package/system/dist/builtins/sqlite-storage/vector-index-vec.d.ts +143 -0
  622. package/system/dist/builtins/sqlite-storage/vector-provider.d.ts +30 -0
  623. package/system/dist/builtins/sqlite-storage/wal-checkpoint-policy.d.ts +196 -0
  624. package/system/dist/builtins/sqlite-storage/wal-checkpoint-worker.d.ts +1 -0
  625. package/system/dist/builtins/sqlite-storage/wal-checkpointer.d.ts +76 -0
  626. package/system/dist/builtins/sqlite-storage/wal-maintenance.d.ts +130 -0
  627. package/system/dist/builtins/storage-orchestrator/access-guards.d.ts +43 -0
  628. package/system/dist/builtins/storage-orchestrator/data-store-dispatch.d.ts +39 -0
  629. package/system/dist/builtins/storage-orchestrator/drain-ratchet.d.ts +104 -0
  630. package/system/dist/builtins/storage-orchestrator/drain-state-store.d.ts +26 -0
  631. package/system/dist/builtins/storage-orchestrator/hub-settings-forward.d.ts +128 -0
  632. package/system/dist/builtins/storage-orchestrator/index.d.ts +7 -0
  633. package/system/dist/builtins/storage-orchestrator/index.js +11 -0
  634. package/system/dist/builtins/storage-orchestrator/index.mjs +2 -0
  635. package/system/dist/builtins/storage-orchestrator/location-class-paths.d.ts +13 -0
  636. package/system/dist/builtins/storage-orchestrator/location-history-recorder.d.ts +76 -0
  637. package/system/dist/builtins/storage-orchestrator/location-occupancy-slice.d.ts +71 -0
  638. package/system/dist/builtins/storage-orchestrator/location-occupancy.d.ts +19 -0
  639. package/system/dist/builtins/storage-orchestrator/location-protection.d.ts +20 -0
  640. package/system/dist/builtins/storage-orchestrator/location-repoint-move.d.ts +57 -0
  641. package/system/dist/builtins/storage-orchestrator/location-repointer.d.ts +97 -0
  642. package/system/dist/builtins/storage-orchestrator/location-root-collision.d.ts +80 -0
  643. package/system/dist/builtins/storage-orchestrator/location-secrets.d.ts +114 -0
  644. package/system/dist/builtins/storage-orchestrator/location-store.d.ts +82 -0
  645. package/system/dist/builtins/storage-orchestrator/location-volume-capacity.d.ts +58 -0
  646. package/system/dist/builtins/storage-orchestrator/provider-discovery.d.ts +24 -0
  647. package/system/dist/builtins/storage-orchestrator/record-kinds.d.ts +43 -0
  648. package/system/dist/builtins/storage-orchestrator/storage-cleanup-coordinator.d.ts +68 -0
  649. package/system/dist/builtins/storage-orchestrator/storage-location-band-monitor.d.ts +77 -0
  650. package/system/dist/builtins/storage-orchestrator/storage-migration-coordinator.d.ts +241 -0
  651. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +318 -0
  652. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +5280 -0
  653. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +5264 -0
  654. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +475 -0
  655. package/system/dist/builtins/storage-orchestrator/storage-pressure-manager.d.ts +115 -0
  656. package/system/dist/builtins/system-backup/backup-encryption.d.ts +94 -0
  657. package/system/dist/builtins/system-backup/system-backup.service.d.ts +308 -0
  658. package/system/dist/builtins/system-config/index.d.ts +2 -0
  659. package/system/dist/builtins/system-config/index.js +10 -0
  660. package/system/dist/builtins/system-config/index.mjs +2 -0
  661. package/system/dist/builtins/system-config/mesh-actions.d.ts +3 -0
  662. package/system/dist/builtins/system-config/record-kinds.d.ts +32 -0
  663. package/system/dist/builtins/system-config/system-config.addon.d.ts +56 -0
  664. package/system/dist/builtins/system-config/system-config.addon.js +89334 -0
  665. package/system/dist/builtins/system-config/system-config.addon.mjs +89233 -0
  666. package/system/dist/builtins/winston-logging/index.d.ts +3 -0
  667. package/system/dist/builtins/winston-logging/index.js +324 -0
  668. package/system/dist/builtins/winston-logging/index.mjs +313 -0
  669. package/system/dist/builtins/winston-logging/log-file-cursor.d.ts +12 -0
  670. package/system/dist/builtins/winston-logging/log-file-index-store.d.ts +11 -0
  671. package/system/dist/builtins/winston-logging/log-file-index.d.ts +77 -0
  672. package/system/dist/builtins/winston-logging/log-file-read-client.d.ts +44 -0
  673. package/system/dist/builtins/winston-logging/log-file-read-protocol.d.ts +41 -0
  674. package/system/dist/builtins/winston-logging/log-file-read-worker.d.ts +1 -0
  675. package/system/dist/builtins/winston-logging/log-file-reader.d.ts +51 -0
  676. package/system/dist/builtins/winston-logging/winston-destination.d.ts +39 -0
  677. package/system/dist/builtins/winston-logging/winston-logging.addon.d.ts +20 -0
  678. package/system/dist/chunk-CNf5ZN-e.mjs +37 -0
  679. package/system/dist/chunk-Cek0wNdY.js +64 -0
  680. package/system/dist/composition-sources-C14epb_m.js +155 -0
  681. package/system/dist/composition-sources-EXNuxmGQ.mjs +132 -0
  682. package/system/dist/constants-DIGWBiNC.mjs +20 -0
  683. package/system/dist/constants-M7NtSiRo.js +66 -0
  684. package/system/dist/coral-accelerators-BSVsBVzt.js +250 -0
  685. package/system/dist/coral-accelerators-DBlgWB8k.mjs +231 -0
  686. package/system/dist/custom-action-registry-JuMHGKEc.js +1638 -0
  687. package/system/dist/custom-action-registry-oHl1xltx.mjs +1482 -0
  688. package/system/dist/device-ca-3vmBP1i0.js +474 -0
  689. package/system/dist/device-ca-DZlvNBWU.mjs +367 -0
  690. package/system/dist/dist-DcMqHB_N.mjs +108095 -0
  691. package/system/dist/dist-M9yHiIY7.js +110554 -0
  692. package/system/dist/download/hosted-model-revisions.d.ts +10 -0
  693. package/system/dist/download/model-download-service.d.ts +35 -0
  694. package/system/dist/download/model-downloader.d.ts +156 -0
  695. package/system/dist/events/event-bus.d.ts +10 -0
  696. package/system/dist/events/system-event-bus.d.ts +14 -0
  697. package/system/dist/feature/feature-manager.d.ts +11 -0
  698. package/system/dist/file-host-worker.js +160 -0
  699. package/system/dist/file-host-worker.mjs +160 -0
  700. package/system/dist/formatter-DkYZ4LXp.mjs +162 -0
  701. package/system/dist/formatter-xbxeV4GD.js +167 -0
  702. package/system/dist/framework-resolver-hook.mjs +49 -0
  703. package/system/dist/http/asset-compression.d.ts +55 -0
  704. package/system/dist/http/authenticated-file-server.d.ts +53 -0
  705. package/system/dist/http/data-plane-registry.d.ts +58 -0
  706. package/system/dist/http/file-data-plane.d.ts +18 -0
  707. package/system/dist/http/lan-http-bind.d.ts +41 -0
  708. package/system/dist/http/reverse-proxy.d.ts +42 -0
  709. package/system/dist/hub-mdns-ciao-CpCKuQnK.js +1163 -0
  710. package/system/dist/hub-mdns-ciao-Czz2ssit.mjs +942 -0
  711. package/system/dist/i18n/catalog-registry.d.ts +35 -0
  712. package/system/dist/i18n/index.d.ts +2 -0
  713. package/system/dist/index.d.ts +156 -0
  714. package/system/dist/index.js +28736 -0
  715. package/system/dist/index.mjs +28065 -0
  716. package/system/dist/intel-accelerators-BvBjZn4j.js +16 -0
  717. package/system/dist/intel-accelerators-idEumqk1.mjs +15 -0
  718. package/system/dist/intel-npu-C8HKvRQF.mjs +27 -0
  719. package/system/dist/intel-npu-DYF5hO5K.js +28 -0
  720. package/system/dist/kernel/addon-class-resolver.d.ts +4 -0
  721. package/system/dist/kernel/addon-engine-manager.d.ts +22 -0
  722. package/system/dist/kernel/addon-health-monitor.d.ts +163 -0
  723. package/system/dist/kernel/addon-installer.d.ts +651 -0
  724. package/system/dist/kernel/addon-loader.d.ts +144 -0
  725. package/system/dist/kernel/addon-manifest.d.ts +128 -0
  726. package/system/dist/kernel/addon-refused-error.d.ts +30 -0
  727. package/system/dist/kernel/addon-residue.d.ts +45 -0
  728. package/system/dist/kernel/addon-settings-store.d.ts +43 -0
  729. package/system/dist/kernel/addon-version-policy.d.ts +34 -0
  730. package/system/dist/kernel/anon-rss.d.ts +12 -0
  731. package/system/dist/kernel/array-buffer-census.d.ts +118 -0
  732. package/system/dist/kernel/bootstrap-config.d.ts +7 -0
  733. package/system/dist/kernel/cap-router-builder.d.ts +180 -0
  734. package/system/dist/kernel/capability-handle.d.ts +46 -0
  735. package/system/dist/kernel/capability-registry.d.ts +621 -0
  736. package/system/dist/kernel/config-manager.d.ts +174 -0
  737. package/system/dist/kernel/config-schema.d.ts +37 -0
  738. package/system/dist/kernel/custom-action-registry.d.ts +32 -0
  739. package/system/dist/kernel/deps/addon-deps-manager.d.ts +28 -0
  740. package/system/dist/kernel/deps/closure-dedupe.d.ts +105 -0
  741. package/system/dist/kernel/deps/ensure-addon-natives.d.ts +41 -0
  742. package/system/dist/kernel/deps/ensure-native-prebuilds.d.ts +40 -0
  743. package/system/dist/kernel/deps/manifest-native-deps.d.ts +42 -0
  744. package/system/dist/kernel/deps/manifest-python-deps.d.ts +20 -0
  745. package/system/dist/kernel/deps/manifest-system-deps.d.ts +18 -0
  746. package/system/dist/kernel/deps/npm-command.d.ts +60 -0
  747. package/system/dist/kernel/deps/system-package-allowlist.d.ts +12 -0
  748. package/system/dist/kernel/deps/system-package-broker.d.ts +31 -0
  749. package/system/dist/kernel/deps/system-package-client.d.ts +9 -0
  750. package/system/dist/kernel/device-call-redirect.d.ts +18 -0
  751. package/system/dist/kernel/device-registry.d.ts +29 -0
  752. package/system/dist/kernel/device-settings-store.d.ts +74 -0
  753. package/system/dist/kernel/event-loop-stall-monitor.d.ts +41 -0
  754. package/system/dist/kernel/event-plane-report.d.ts +225 -0
  755. package/system/dist/kernel/fs-utils.d.ts +88 -0
  756. package/system/dist/kernel/gc-census.d.ts +161 -0
  757. package/system/dist/kernel/heap-spaces.d.ts +112 -0
  758. package/system/dist/kernel/heap-watch.d.ts +816 -0
  759. package/system/dist/kernel/host-externals.d.ts +12 -0
  760. package/system/dist/kernel/hwaccel/hwaccel-resolver.d.ts +56 -0
  761. package/system/dist/kernel/hwaccel/vaapi-init-probe.d.ts +29 -0
  762. package/system/dist/kernel/index.d.ts +116 -0
  763. package/system/dist/kernel/inference/inference-resolver.d.ts +22 -0
  764. package/system/dist/kernel/inference/local-python-runtimes.d.ts +2 -0
  765. package/system/dist/kernel/infra-capabilities.d.ts +13 -0
  766. package/system/dist/kernel/isolated-builtin-phase.d.ts +57 -0
  767. package/system/dist/kernel/lifecycle/job-journal.d.ts +19 -0
  768. package/system/dist/kernel/lifecycle/lifecycle-job-engine.d.ts +106 -0
  769. package/system/dist/kernel/lifecycle/staging-area.d.ts +31 -0
  770. package/system/dist/kernel/moleculer/accessory-prune-gate.d.ts +55 -0
  771. package/system/dist/kernel/moleculer/addon-context-factory.d.ts +104 -0
  772. package/system/dist/kernel/moleculer/addon-data-plane-facility.d.ts +19 -0
  773. package/system/dist/kernel/moleculer/addon-deploy-source.d.ts +16 -0
  774. package/system/dist/kernel/moleculer/addon-peer-bytes-facility.d.ts +25 -0
  775. package/system/dist/kernel/moleculer/addon-runner.d.ts +1 -0
  776. package/system/dist/kernel/moleculer/addon-service-factory.d.ts +50 -0
  777. package/system/dist/kernel/moleculer/agent-event-scope.d.ts +49 -0
  778. package/system/dist/kernel/moleculer/agent-ui-unlock.d.ts +67 -0
  779. package/system/dist/kernel/moleculer/broker-factory.d.ts +95 -0
  780. package/system/dist/kernel/moleculer/broker-transport-swap.d.ts +60 -0
  781. package/system/dist/kernel/moleculer/cap-usage-registry.d.ts +126 -0
  782. package/system/dist/kernel/moleculer/capabilities-access.d.ts +21 -0
  783. package/system/dist/kernel/moleculer/child-addon-call-dispatch.d.ts +53 -0
  784. package/system/dist/kernel/moleculer/child-cap-descriptors.d.ts +34 -0
  785. package/system/dist/kernel/moleculer/child-cap-dispatch.d.ts +59 -0
  786. package/system/dist/kernel/moleculer/children-batch-loader.d.ts +98 -0
  787. package/system/dist/kernel/moleculer/core-cap-service.d.ts +65 -0
  788. package/system/dist/kernel/moleculer/crash-supervisor.d.ts +50 -0
  789. package/system/dist/kernel/moleculer/device-cap-proxy.d.ts +70 -0
  790. package/system/dist/kernel/moleculer/device-event-ring.d.ts +155 -0
  791. package/system/dist/kernel/moleculer/event-bus-core.d.ts +198 -0
  792. package/system/dist/kernel/moleculer/event-bus.d.ts +106 -0
  793. package/system/dist/kernel/moleculer/hub-log-forwarder.d.ts +36 -0
  794. package/system/dist/kernel/moleculer/hub-service.d.ts +39 -0
  795. package/system/dist/kernel/moleculer/init-watchdog.d.ts +60 -0
  796. package/system/dist/kernel/moleculer/mesh-access-middleware.d.ts +42 -0
  797. package/system/dist/kernel/moleculer/mesh-identity.d.ts +57 -0
  798. package/system/dist/kernel/moleculer/mesh-mtls/constants.d.ts +17 -0
  799. package/system/dist/kernel/moleculer/mesh-mtls/index.d.ts +12 -0
  800. package/system/dist/kernel/moleculer/mesh-mtls/mesh-ca-keeper.d.ts +60 -0
  801. package/system/dist/kernel/moleculer/mesh-mtls/mesh-ca.d.ts +49 -0
  802. package/system/dist/kernel/moleculer/mesh-mtls/mesh-certificate-registry.d.ts +105 -0
  803. package/system/dist/kernel/moleculer/mesh-mtls/mesh-crl.d.ts +16 -0
  804. package/system/dist/kernel/moleculer/mesh-mtls/mesh-membership.d.ts +64 -0
  805. package/system/dist/kernel/moleculer/mesh-mtls/mesh-peer-transport.d.ts +47 -0
  806. package/system/dist/kernel/moleculer/mesh-mtls/mesh-renewal.d.ts +135 -0
  807. package/system/dist/kernel/moleculer/mesh-mtls/mesh-tls-enabler.d.ts +9 -0
  808. package/system/dist/kernel/moleculer/mesh-mtls/mesh-tls-gate.d.ts +40 -0
  809. package/system/dist/kernel/moleculer/mesh-mtls/pairing/agent-pairing.d.ts +214 -0
  810. package/system/dist/kernel/moleculer/mesh-mtls/pairing/hub-pairing.d.ts +115 -0
  811. package/system/dist/kernel/moleculer/mesh-mtls/pairing/index.d.ts +3 -0
  812. package/system/dist/kernel/moleculer/mesh-mtls/pairing/pairing-protocol.d.ts +107 -0
  813. package/system/dist/kernel/moleculer/mesh-mtls/tls-tcp-transporter.d.ts +242 -0
  814. package/system/dist/kernel/moleculer/mesh-queue-report.d.ts +51 -0
  815. package/system/dist/kernel/moleculer/node-registry.d.ts +146 -0
  816. package/system/dist/kernel/moleculer/process-context.d.ts +4 -0
  817. package/system/dist/kernel/moleculer/process-service.d.ts +92 -0
  818. package/system/dist/kernel/moleculer/provider-registry.d.ts +28 -0
  819. package/system/dist/kernel/moleculer/readiness-context.d.ts +67 -0
  820. package/system/dist/kernel/moleculer/readiness-service.d.ts +37 -0
  821. package/system/dist/kernel/moleculer/records-api-transport.d.ts +9 -0
  822. package/system/dist/kernel/moleculer/register-framework-resolver.d.ts +8 -0
  823. package/system/dist/kernel/moleculer/register-node-client.d.ts +49 -0
  824. package/system/dist/kernel/moleculer/remote-logger.d.ts +43 -0
  825. package/system/dist/kernel/moleculer/resilient-cap-call.d.ts +28 -0
  826. package/system/dist/kernel/moleculer/runner-addon-settings.d.ts +29 -0
  827. package/system/dist/kernel/moleculer/runner-device-settings.d.ts +39 -0
  828. package/system/dist/kernel/moleculer/runner-heap-flags.d.ts +228 -0
  829. package/system/dist/kernel/moleculer/runner-native-allocator.d.ts +107 -0
  830. package/system/dist/kernel/moleculer/runner-process-group.d.ts +96 -0
  831. package/system/dist/kernel/moleculer/runner-refusal.d.ts +27 -0
  832. package/system/dist/kernel/moleculer/runtime-state-load.d.ts +29 -0
  833. package/system/dist/kernel/moleculer/settings-read-guard.d.ts +49 -0
  834. package/system/dist/kernel/moleculer/stream-probe-service.d.ts +28 -0
  835. package/system/dist/kernel/moleculer/trpc-links.d.ts +244 -0
  836. package/system/dist/kernel/moleculer/typed-array-serde.d.ts +14 -0
  837. package/system/dist/kernel/moleculer/worker-device-restore.d.ts +10 -0
  838. package/system/dist/kernel/outbound-queue-watch.d.ts +94 -0
  839. package/system/dist/kernel/prefix-walk.d.ts +39 -0
  840. package/system/dist/kernel/process-cpu-census.d.ts +74 -0
  841. package/system/dist/kernel/provider-kind-drift.d.ts +21 -0
  842. package/system/dist/kernel/restart-coordinator.d.ts +90 -0
  843. package/system/dist/kernel/sections-store.d.ts +20 -0
  844. package/system/dist/kernel/settings-door-view.d.ts +41 -0
  845. package/system/dist/kernel/settings-read-error.d.ts +35 -0
  846. package/system/dist/kernel/settings-view-types.d.ts +80 -0
  847. package/system/dist/kernel/socket-plane-report.d.ts +268 -0
  848. package/system/dist/kernel/status-overlay.d.ts +38 -0
  849. package/system/dist/kernel/storage-location-registry.d.ts +55 -0
  850. package/system/dist/kernel/store-settings-view.d.ts +14 -0
  851. package/system/dist/kernel/system-settings-mirror.d.ts +46 -0
  852. package/system/dist/kernel/system-settings-policy.d.ts +28 -0
  853. package/system/dist/kernel/transport/cap-action-census.d.ts +218 -0
  854. package/system/dist/kernel/transport/cap-action-name.d.ts +100 -0
  855. package/system/dist/kernel/transport/cap-child-index.d.ts +49 -0
  856. package/system/dist/kernel/transport/cap-route-resolver.d.ts +231 -0
  857. package/system/dist/kernel/transport/cap-route.d.ts +168 -0
  858. package/system/dist/kernel/transport/cap-routing-hints.d.ts +42 -0
  859. package/system/dist/kernel/transport/child-cap-protocol.d.ts +307 -0
  860. package/system/dist/kernel/transport/claimed-get-status.d.ts +39 -0
  861. package/system/dist/kernel/transport/create-local-transport.d.ts +7 -0
  862. package/system/dist/kernel/transport/device-call-redirect.d.ts +39 -0
  863. package/system/dist/kernel/transport/frame-codec.d.ts +122 -0
  864. package/system/dist/kernel/transport/hub-cap-forward.d.ts +96 -0
  865. package/system/dist/kernel/transport/index.d.ts +38 -0
  866. package/system/dist/kernel/transport/local-child-client.d.ts +199 -0
  867. package/system/dist/kernel/transport/local-child-registry.d.ts +654 -0
  868. package/system/dist/kernel/transport/local-endpoint-path.d.ts +6 -0
  869. package/system/dist/kernel/transport/local-transport.d.ts +122 -0
  870. package/system/dist/kernel/transport/parent-unowned-call.d.ts +283 -0
  871. package/system/dist/kernel/transport/peer-answered-error.d.ts +21 -0
  872. package/system/dist/kernel/transport/socket-channel.d.ts +116 -0
  873. package/system/dist/kernel/transport/socket-traffic.d.ts +118 -0
  874. package/system/dist/kernel/transport/uds-event-bridge.d.ts +85 -0
  875. package/system/dist/kernel/transport/uds-event-bus.d.ts +93 -0
  876. package/system/dist/kernel/transport/uds-local-transport.d.ts +18 -0
  877. package/system/dist/kernel/transport/uds-log-ingest.d.ts +43 -0
  878. package/system/dist/kernel/transport/uds-logger.d.ts +44 -0
  879. package/system/dist/kernel/utils/ring-buffer.d.ts +15 -0
  880. package/system/dist/kernel/workspace-detect.d.ts +9 -0
  881. package/system/dist/lib-5THG9eKz.mjs +15545 -0
  882. package/system/dist/lib-C3U1yluo.js +7110 -0
  883. package/system/dist/lib-CZ3g2WTS.js +15549 -0
  884. package/system/dist/lib-DFZblCIu.mjs +7106 -0
  885. package/system/dist/lifecycle/lifecycle-state-machine.d.ts +28 -0
  886. package/system/dist/log-file-read-protocol-B7M3X3bT.mjs +785 -0
  887. package/system/dist/log-file-read-protocol-D0WcLbIV.js +817 -0
  888. package/system/dist/log-file-read-worker.js +64 -0
  889. package/system/dist/log-file-read-worker.mjs +64 -0
  890. package/system/dist/log-read-filter-Bi066jwU.js +134 -0
  891. package/system/dist/log-read-filter-D7Ev3zm-.mjs +93 -0
  892. package/system/dist/logging/formatter.d.ts +57 -0
  893. package/system/dist/logging/log-manager.d.ts +145 -0
  894. package/system/dist/logging/log-read-filter.d.ts +43 -0
  895. package/system/dist/logging/log-redactor.d.ts +30 -0
  896. package/system/dist/logging/log-ring-buffer.d.ts +62 -0
  897. package/system/dist/logging/logging-gate.d.ts +76 -0
  898. package/system/dist/logging/logging-gate.singleton.d.ts +16 -0
  899. package/system/dist/logging/partitioned-log-buffer.d.ts +169 -0
  900. package/system/dist/logging/scoped-logger.d.ts +17 -0
  901. package/system/dist/migrations/hub/index.d.ts +11 -0
  902. package/system/dist/ms-CgH2OFlD.mjs +120 -0
  903. package/system/dist/ms-LB3giGoU.js +124 -0
  904. package/system/dist/network/network-quality.d.ts +11 -0
  905. package/system/dist/notification/notification-service.d.ts +43 -0
  906. package/system/dist/notification/toast-service.d.ts +22 -0
  907. package/system/dist/pipeline/engine-manager-resolver.d.ts +15 -0
  908. package/system/dist/pipeline/pipeline-runner.d.ts +8 -0
  909. package/system/dist/pipeline/pipeline-validator.d.ts +13 -0
  910. package/system/dist/platform-key-source-BWlq0jjn.mjs +23 -0
  911. package/system/dist/platform-key-source-Di7HrlGR.js +40 -0
  912. package/system/dist/prefix-range-D_KueXbQ.js +27 -0
  913. package/system/dist/prefix-range-Dl0znowN.mjs +22 -0
  914. package/system/dist/prefix-walk-DAOBSyH1.mjs +88 -0
  915. package/system/dist/prefix-walk-Dv6MLZlM.js +99 -0
  916. package/system/dist/process/proc-stat.d.ts +75 -0
  917. package/system/dist/process/resource-monitor.d.ts +28 -0
  918. package/system/dist/python/python-env-manager.d.ts +12 -0
  919. package/system/dist/read-all-rows-CVoO1ONM.js +29 -0
  920. package/system/dist/read-all-rows-TaPqdWNF.mjs +25 -0
  921. package/system/dist/records/read-all-rows.d.ts +6 -0
  922. package/system/dist/repl/interfaces.d.ts +31 -0
  923. package/system/dist/repl/repl-engine.d.ts +8 -0
  924. package/system/dist/resource-monitor-Di9daRwI.mjs +96 -0
  925. package/system/dist/resource-monitor-mio9dSCT.js +113 -0
  926. package/system/dist/restore-archive-Cy7jGqiD.js +4325 -0
  927. package/system/dist/restore-archive-DS4nvQ43.mjs +4213 -0
  928. package/system/dist/retention-Dqm_EiVq.mjs +893 -0
  929. package/system/dist/retention-Ufa2fci-.js +1024 -0
  930. package/system/dist/retired-settings-keys-C8nOOr5H.js +381 -0
  931. package/system/dist/retired-settings-keys-u6xQA6r7.mjs +364 -0
  932. package/system/dist/safe-buffer-B1OjL1I9.mjs +42 -0
  933. package/system/dist/safe-buffer-D3aoa-7X.js +46 -0
  934. package/system/dist/settle-sources-Bhsy57y-.js +38 -0
  935. package/system/dist/settle-sources-CDtNC8ub.mjs +33 -0
  936. package/system/dist/snapshot-courtesy-CyFs1M3I.mjs +167 -0
  937. package/system/dist/snapshot-courtesy-D_C5-nC0.js +192 -0
  938. package/system/dist/sqlite-snapshot-protocol-2QaTouWV.mjs +34 -0
  939. package/system/dist/sqlite-snapshot-protocol-B9OndqZv.js +51 -0
  940. package/system/dist/sqlite-snapshot-worker.js +185 -0
  941. package/system/dist/sqlite-snapshot-worker.mjs +179 -0
  942. package/system/dist/src-CnAqG6EF.js +714 -0
  943. package/system/dist/src-hG4grMU4.mjs +709 -0
  944. package/system/dist/storage/fs-storage-backend.d.ts +40 -0
  945. package/system/dist/storage/storage-location-manager.d.ts +23 -0
  946. package/system/dist/storage/storage-manager.d.ts +83 -0
  947. package/system/dist/tls/agent-https-names.d.ts +25 -0
  948. package/system/dist/tls/agent-https.d.ts +111 -0
  949. package/system/dist/tls/boot-tls.d.ts +35 -0
  950. package/system/dist/tls/cert-backdate.d.ts +10 -0
  951. package/system/dist/tls/cert-evaluation.d.ts +41 -0
  952. package/system/dist/tls/cert-identity.d.ts +60 -0
  953. package/system/dist/tls/cert-issue.d.ts +57 -0
  954. package/system/dist/tls/cert-manager.d.ts +124 -0
  955. package/system/dist/tls/cert-name-constraints.d.ts +53 -0
  956. package/system/dist/tls/cert-utc-time.d.ts +1 -0
  957. package/system/dist/tls/https-listener.d.ts +30 -0
  958. package/system/dist/tls/index.d.ts +12 -0
  959. package/system/dist/tls/tls-actions.d.ts +49 -0
  960. package/system/dist/tls/tls-status.d.ts +57 -0
  961. package/system/dist/tls/uploaded-cert.d.ts +46 -0
  962. package/system/dist/wal-checkpoint-policy-BahrTtyD.mjs +186 -0
  963. package/system/dist/wal-checkpoint-policy-d2z2qPqx.js +233 -0
  964. package/system/dist/wal-checkpoint-worker.js +144 -0
  965. package/system/dist/wal-checkpoint-worker.mjs +143 -0
  966. package/system/dist/wal-maintenance-BmugbgS7.js +0 -0
  967. package/system/dist/wal-maintenance-Bnb2QzYG.mjs +0 -0
  968. package/system/dist/x509.es-BRiJgOvu.mjs +11939 -0
  969. package/system/dist/x509.es-WtnRNyYS.js +12076 -0
  970. package/system/package.json +516 -0
@@ -0,0 +1,1140 @@
1
+ import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
2
+ import { Ms as EventCategory, Qa as BaseAddon, Ui as scoreRuntimes, Zn as enumerateInferenceDevices, ci as parseAcceleratorFactsJson, js as errMsg, pi as platformProbeCapability, qo as emitReadiness } from "../../dist-DcMqHB_N.mjs";
3
+ import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-DBlgWB8k.mjs";
4
+ import * as path$1 from "node:path";
5
+ import { promisify } from "node:util";
6
+ import * as os$1 from "node:os";
7
+ import * as fs$1 from "node:fs";
8
+ import { execFile } from "node:child_process";
9
+ //#region src/builtins/platform-probe/accelerator-reprobe.ts
10
+ /**
11
+ * The accelerator part of the platform probe, re-run on its own (D919).
12
+ *
13
+ * The full probe runs once per process. A Coral is the one accelerator that is
14
+ * plugged in, pulled out and moved between nodes while the process runs, so
15
+ * its part (USB ids, PCIe apex units — reads of `/sys` and `/dev`, no model
16
+ * load) is re-run periodically and on demand, and the node's inference device
17
+ * list is rebuilt from the new answer. Pure: the scorer owns the cache.
18
+ */
19
+ /** A stable signature of a Coral answer — what decides "did it change". */
20
+ function coralSignature(coral) {
21
+ if (coral == null) return "none";
22
+ return `units=${(coral.units ?? []).map((u) => `${u.bus}:${u.count}`).join(",")};unavailable=${(coral.unavailable ?? []).map((u) => `${u.bus}:${u.count}:${u.reason}`).join(",")}`;
23
+ }
24
+ /** Which device keys a new probe added and removed. */
25
+ function diffInferenceDevices(previous, next) {
26
+ const before = new Set(previous.map((d) => d.key));
27
+ const after = new Set(next.map((d) => d.key));
28
+ return {
29
+ appeared: [...after].filter((k) => !before.has(k)).toSorted(),
30
+ disappeared: [...before].filter((k) => !after.has(k)).toSorted()
31
+ };
32
+ }
33
+ /**
34
+ * The capabilities with a new Coral answer: hardware, scores and the device
35
+ * enumeration are all derived again from it, so the edgetpu runtime and its
36
+ * devices follow the hardware rather than the boot-time snapshot.
37
+ */
38
+ function withCoral(caps, coral) {
39
+ const hardware = {
40
+ ...caps.hardware,
41
+ coral
42
+ };
43
+ const { scores, best } = scoreRuntimes(hardware);
44
+ return {
45
+ ...caps,
46
+ hardware,
47
+ scores: [...scores],
48
+ bestScore: best,
49
+ devices: enumerateInferenceDevices(hardware)
50
+ };
51
+ }
52
+ //#endregion
53
+ //#region src/builtins/platform-probe/amd-npu.ts
54
+ var amd_npu_exports = /* @__PURE__ */ __exportAll({
55
+ classifyAmdNpu: () => classifyAmdNpu,
56
+ xdnaInfoForDevice: () => xdnaInfoForDevice
57
+ });
58
+ var ACCEL_CLASS = "/sys/class/accel";
59
+ var ACCEL_DEV = "/dev/accel";
60
+ var AMD_PCI_VENDOR = "0x1022";
61
+ /** Phoenix / Hawk Point XDNA1. */
62
+ var XDNA1_DEVICES = new Set(["0x1502"]);
63
+ /** Strix / Krackan XDNA2. */
64
+ var XDNA2_DEVICES = new Set(["0x17f0"]);
65
+ function normalizePciId(raw) {
66
+ const t = raw.trim().toLowerCase();
67
+ if (t.startsWith("0x")) return t;
68
+ if (t.length > 0 && [...t].every((c) => "0123456789abcdef".includes(c))) return "0x" + t;
69
+ return t;
70
+ }
71
+ function hasAccelCharDevice(fsx) {
72
+ if (fsx.listDir(ACCEL_DEV).some((n) => n.startsWith("accel"))) return true;
73
+ return fsx.exists("/dev/accel/accel0");
74
+ }
75
+ /**
76
+ * Detect an AMD XDNA NPU and report it as **present only**.
77
+ *
78
+ * Inference is NOT offered until P2 (Ryzen AI on Linux is Strix-first;
79
+ * Phoenix is not a production path today). The probe still names the
80
+ * generation so the UI and fleet census can show the hardware.
81
+ */
82
+ function classifyAmdNpu(ctx, fsx) {
83
+ if (ctx.platform !== "linux" || ctx.arch !== "x64" || !ctx.amdPresent) return null;
84
+ if (!hasAccelCharDevice(fsx)) return null;
85
+ for (const name of fsx.listDir(ACCEL_CLASS)) {
86
+ if (!name.startsWith("accel")) continue;
87
+ const vendor = normalizePciId(fsx.readFile("/sys/class/accel/" + name + "/device/vendor"));
88
+ const device = normalizePciId(fsx.readFile("/sys/class/accel/" + name + "/device/device"));
89
+ if (vendor !== AMD_PCI_VENDOR) continue;
90
+ return xdnaInfoForDevice(device);
91
+ }
92
+ return null;
93
+ }
94
+ /**
95
+ * The NPU descriptor for an AMD PCI device id (`0x1502` or `1502`). Shared by
96
+ * the Linux sysfs probe and the Windows PnP probe so both name the same
97
+ * silicon the same way.
98
+ */
99
+ function xdnaInfoForDevice(rawDeviceId) {
100
+ const device = normalizePciId(rawDeviceId);
101
+ if (XDNA1_DEVICES.has(device)) return {
102
+ type: "amd-xdna",
103
+ name: "AMD XDNA1 NPU",
104
+ generation: "xdna1"
105
+ };
106
+ if (XDNA2_DEVICES.has(device)) return {
107
+ type: "amd-xdna",
108
+ name: "AMD XDNA2 NPU",
109
+ generation: "xdna2"
110
+ };
111
+ return {
112
+ type: "amd-xdna",
113
+ name: "AMD XDNA NPU"
114
+ };
115
+ }
116
+ //#endregion
117
+ //#region src/builtins/platform-probe/windows-hardware.ts
118
+ var PCI_VENDOR_NVIDIA = "10DE";
119
+ var PCI_VENDOR_INTEL = "8086";
120
+ /** Radeon graphics are 1002; the XDNA NPU is a 1022 device. */
121
+ var PCI_VENDORS_AMD = new Set(["1002", "1022"]);
122
+ /** Adapters that are not hardware: RDP, hypervisor, capture and spoofing drivers. */
123
+ var VIRTUAL_ADAPTER = /basic display|basic render|remote display|hyper-v|vmware|virtualbox|parallels|citrix|parsec|indirect display|displaylink|mirror driver|virtual/i;
124
+ /** One PowerShell process answers both: video controllers and AMD PCI devices. */
125
+ var POWERSHELL_SCRIPT = [
126
+ "$ErrorActionPreference = 'SilentlyContinue'",
127
+ "$gpu = @(Get-CimInstance Win32_VideoController | Select-Object Name, PNPDeviceID)",
128
+ "$npu = @(Get-CimInstance Win32_PnPEntity | Where-Object { $_.PNPDeviceID -match 'VEN_1022&DEV_(1502|17F0)' } | Select-Object Name, PNPDeviceID)",
129
+ "@{ gpu = $gpu; npu = $npu } | ConvertTo-Json -Compress -Depth 3"
130
+ ].join("; ");
131
+ function powershellInvocation(systemRoot) {
132
+ return [`${systemRoot ?? "C:\\Windows"}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`, [
133
+ "-NoProfile",
134
+ "-NonInteractive",
135
+ "-ExecutionPolicy",
136
+ "Bypass",
137
+ "-Command",
138
+ POWERSHELL_SCRIPT
139
+ ]];
140
+ }
141
+ var WMIC_VIDEO_ARGS = [
142
+ "path",
143
+ "Win32_VideoController",
144
+ "get",
145
+ "Name,PNPDeviceID",
146
+ "/format:csv"
147
+ ];
148
+ var WMIC_AMD_PNP_ARGS = [
149
+ "path",
150
+ "Win32_PnPEntity",
151
+ "where",
152
+ "PNPDeviceID like 'PCI\\\\VEN_1022&DEV_%'",
153
+ "get",
154
+ "Name,PNPDeviceID",
155
+ "/format:csv"
156
+ ];
157
+ function asRecordList(value) {
158
+ if (Array.isArray(value)) return value.filter((v) => v !== null && typeof v === "object" && !Array.isArray(v));
159
+ return value !== null && typeof value === "object" ? [Object.fromEntries(Object.entries(value))] : [];
160
+ }
161
+ function str(value) {
162
+ return typeof value === "string" ? value : "";
163
+ }
164
+ /** PowerShell prepends a BOM on some hosts, which `JSON.parse` rejects. */
165
+ function parseJson(text) {
166
+ return JSON.parse(text.replace(/^\uFEFF/, "").trim());
167
+ }
168
+ /**
169
+ * `{"gpu":[...],"npu":[...]}` as the script emits it. A single result comes
170
+ * back as an object rather than a one-element array, and an empty one as
171
+ * `null` — all three are handled.
172
+ */
173
+ function parsePowershellOutput(text) {
174
+ const root = parseJson(text);
175
+ const gpu = root !== null && typeof root === "object" ? Reflect.get(root, "gpu") : void 0;
176
+ const npu = root !== null && typeof root === "object" ? Reflect.get(root, "npu") : void 0;
177
+ const toDevice = (r) => ({
178
+ name: str(r["Name"]),
179
+ pnpDeviceId: str(r["PNPDeviceID"])
180
+ });
181
+ return {
182
+ controllers: asRecordList(gpu).map(toDevice),
183
+ pnp: asRecordList(npu).map(toDevice)
184
+ };
185
+ }
186
+ /**
187
+ * `wmic ... /format:csv` — a blank line, then `Node,<cols alphabetical>`, then
188
+ * one row per object. The device name can contain commas, so only the FIRST
189
+ * column boundaries are trusted: columns after `Node` are `Name,PNPDeviceID`
190
+ * and the PNP id (no commas) is taken from the END of the row.
191
+ */
192
+ function parseWmicCsv(text) {
193
+ const lines = text.split(/\r?\n/).map((l) => l.trim()).filter((l) => l.length > 0);
194
+ const headerIndex = lines.findIndex((l) => /^node,/i.test(l));
195
+ if (headerIndex < 0) return [];
196
+ const out = [];
197
+ for (const line of lines.slice(headerIndex + 1)) {
198
+ const parts = line.split(",");
199
+ if (parts.length < 3) continue;
200
+ const pnpDeviceId = (parts[parts.length - 1] ?? "").trim();
201
+ const name = parts.slice(1, -1).join(",").trim();
202
+ if (pnpDeviceId.length > 0) out.push({
203
+ name,
204
+ pnpDeviceId
205
+ });
206
+ }
207
+ return out;
208
+ }
209
+ /** The PCI vendor id (`10DE`) out of a PnP id like `PCI\VEN_10DE&DEV_2504&...`. */
210
+ function pciVendorOf(pnpDeviceId) {
211
+ const m = /VEN_([0-9A-F]{4})/i.exec(pnpDeviceId);
212
+ return m?.[1] ? m[1].toUpperCase() : null;
213
+ }
214
+ function pciDeviceOf(pnpDeviceId) {
215
+ const m = /DEV_([0-9A-F]{4})/i.exec(pnpDeviceId);
216
+ return m?.[1] ? m[1].toLowerCase() : null;
217
+ }
218
+ function gpuVendor(c) {
219
+ const vendor = pciVendorOf(c.pnpDeviceId);
220
+ if (vendor === PCI_VENDOR_NVIDIA) return "nvidia";
221
+ if (vendor === PCI_VENDOR_INTEL) return "intel";
222
+ if (vendor !== null && PCI_VENDORS_AMD.has(vendor)) return "amd";
223
+ if (/nvidia|geforce|quadro|rtx/i.test(c.name)) return "nvidia";
224
+ if (/intel/i.test(c.name)) return "intel";
225
+ if (/amd|radeon/i.test(c.name)) return "amd";
226
+ return null;
227
+ }
228
+ /**
229
+ * The accelerator the node should treat as its GPU. Same preference as the
230
+ * Linux probe — NVIDIA, then Intel, then AMD — so a laptop with an Intel iGPU
231
+ * and a discrete card is described the way the rest of the system already
232
+ * expects. Virtual adapters never count.
233
+ */
234
+ function classifyWindowsGpu(controllers) {
235
+ const real = controllers.filter((c) => c.name.length > 0 && !VIRTUAL_ADAPTER.test(c.name));
236
+ for (const wanted of [
237
+ "nvidia",
238
+ "intel",
239
+ "amd"
240
+ ]) {
241
+ const hit = real.find((c) => gpuVendor(c) === wanted);
242
+ if (hit) return {
243
+ type: wanted,
244
+ name: hit.name
245
+ };
246
+ }
247
+ return null;
248
+ }
249
+ /**
250
+ * An AMD XDNA NPU from PnP ids: `PCI\VEN_1022&DEV_1502` (Phoenix / Hawk Point)
251
+ * or `DEV_17F0` (Strix / Krackan). Present-only, exactly like the Linux probe.
252
+ */
253
+ function classifyWindowsAmdNpu(devices) {
254
+ for (const d of devices) {
255
+ if (pciVendorOf(d.pnpDeviceId) !== "1022") continue;
256
+ const device = pciDeviceOf(d.pnpDeviceId);
257
+ if (device === "1502" || device === "17f0") return xdnaInfoForDevice(device);
258
+ }
259
+ return null;
260
+ }
261
+ async function viaPowershell(run, systemRoot) {
262
+ const [file, args] = powershellInvocation(systemRoot);
263
+ const parsed = parsePowershellOutput(await run(file, args));
264
+ return {
265
+ gpu: classifyWindowsGpu(parsed.controllers),
266
+ npu: classifyWindowsAmdNpu(parsed.pnp),
267
+ source: "powershell"
268
+ };
269
+ }
270
+ async function viaWmic(run) {
271
+ const [video, amd] = await Promise.all([run("wmic", WMIC_VIDEO_ARGS), run("wmic", WMIC_AMD_PNP_ARGS).catch(() => "")]);
272
+ return {
273
+ gpu: classifyWindowsGpu(parseWmicCsv(video)),
274
+ npu: classifyWindowsAmdNpu(parseWmicCsv(amd)),
275
+ source: "wmic"
276
+ };
277
+ }
278
+ /**
279
+ * GPU + AMD NPU on a Windows host. NEVER throws: a probe that cannot run is
280
+ * `{ gpu: null, npu: null, source: 'none' }` and boot goes on — the node then
281
+ * scores as a CPU node, which is correct for hardware we could not see.
282
+ */
283
+ async function probeWindowsHardware(run, options = {}) {
284
+ try {
285
+ return await viaPowershell(run, options.systemRoot);
286
+ } catch (powershellError) {
287
+ options.onFallback?.(`PowerShell probe failed (${powershellError instanceof Error ? powershellError.message : String(powershellError)}); trying wmic`);
288
+ }
289
+ try {
290
+ return await viaWmic(run);
291
+ } catch (wmicError) {
292
+ options.onFallback?.(`wmic probe failed (${wmicError instanceof Error ? wmicError.message : String(wmicError)}); hardware unknown`);
293
+ return {
294
+ gpu: null,
295
+ npu: null,
296
+ source: "none"
297
+ };
298
+ }
299
+ }
300
+ //#endregion
301
+ //#region src/builtins/platform-probe/platform-scorer.ts
302
+ /** WMI can be slow on a cold machine, but never worth stalling boot for. */
303
+ var WINDOWS_PROBE_TIMEOUT_MS = 15e3;
304
+ /**
305
+ * Promisified `execFile`. Used across the scorer so every subprocess
306
+ * spawn yields the event loop — critical at boot because a single sync
307
+ * spawn of a missing Python module hits its 30s timeout and freezes the
308
+ * entire Node process (WS handshakes, tRPC subscriptions, metrics — all
309
+ * stalled). Keeping it async turns the probe into a true background task.
310
+ */
311
+ var execFileAsync$1 = promisify(execFile);
312
+ /** Minimal no-op logger for default parameter */
313
+ var noopLogger = {
314
+ debug() {},
315
+ info() {},
316
+ warn() {},
317
+ error() {},
318
+ child() {
319
+ return noopLogger;
320
+ },
321
+ withTags() {
322
+ return noopLogger;
323
+ }
324
+ };
325
+ /**
326
+ * Get reliable "available" RAM in MB, cross-platform.
327
+ * os.freemem() is unreliable on macOS (reports ~200MB on a 36GB system).
328
+ * Uses systeminformation when available, falls back to native commands.
329
+ */
330
+ async function getAvailableRAM_MB() {
331
+ try {
332
+ const mem = await (await import("../../lib-5THG9eKz.mjs").then((m) => /* @__PURE__ */ __toESM(m.default))).mem();
333
+ return Math.round(mem.available / 1024 / 1024);
334
+ } catch (err) {
335
+ console.debug(`systeminformation not available, using platform-specific RAM probe: ${errMsg(err)}`);
336
+ const platform = os$1.platform();
337
+ try {
338
+ if (platform === "darwin") {
339
+ const { stdout: output } = await execFileAsync$1("vm_stat", [], {
340
+ encoding: "utf8",
341
+ timeout: 3e3
342
+ });
343
+ const pageSize = parseInt(output.match(/page size of (\d+)/)?.[1] ?? "16384");
344
+ const free = parseInt(output.match(/Pages free:\s+(\d+)/)?.[1] ?? "0");
345
+ const inactive = parseInt(output.match(/Pages inactive:\s+(\d+)/)?.[1] ?? "0");
346
+ const purgeable = parseInt(output.match(/Pages purgeable:\s+(\d+)/)?.[1] ?? "0");
347
+ return Math.round((free + inactive + purgeable) * pageSize / 1024 / 1024);
348
+ } else if (platform === "linux") {
349
+ const { readFileSync } = await import("node:fs");
350
+ const match = readFileSync("/proc/meminfo", "utf8").match(/MemAvailable:\s+(\d+)\s+kB/);
351
+ if (match) return Math.round(parseInt(match[1]) / 1024);
352
+ }
353
+ } catch (probeErr) {
354
+ console.debug(`RAM probe failed, using total RAM fallback: ${errMsg(probeErr)}`);
355
+ }
356
+ return Math.round(os$1.totalmem() / 1024 / 1024);
357
+ }
358
+ }
359
+ var PlatformScorer = class {
360
+ cached = null;
361
+ logger;
362
+ /**
363
+ * Path to the embedded portable Python (from `ctx.deps.ensurePython()`).
364
+ * The Docker hub ships NO system `python3` — inference runs on the
365
+ * downloaded portable build — so probing system `python3`/`python` would
366
+ * wrongly report "Python not found". When set, the interpreter lookup
367
+ * tries THIS binary first; `null` falls back to a system `python3`/`python`
368
+ * lookup (dev / agent environments where Python is on PATH).
369
+ */
370
+ embeddedPythonPath;
371
+ /** Where the Coral scan reads `/sys` and `/dev` (the host's, unless a spec fakes one). */
372
+ coralFs;
373
+ /**
374
+ * Asks OpenVINO / WebGPU for compute (D930). Null in tests and when this
375
+ * process has no embedded interpreter — the pool's published file is the
376
+ * other way the same facts arrive.
377
+ */
378
+ readAcceleratorFacts;
379
+ constructor(logger = noopLogger, embeddedPythonPath = null, coralFs = nodeCoralFs, readAcceleratorFacts = null) {
380
+ this.logger = logger;
381
+ this.embeddedPythonPath = embeddedPythonPath;
382
+ this.coralFs = coralFs;
383
+ this.readAcceleratorFacts = readAcceleratorFacts;
384
+ }
385
+ /**
386
+ * Probe hardware + derive scores from pure rules and score all backend combos.
387
+ *
388
+ * An optional `onPhase` callback is invoked at each step so consumers
389
+ * (e.g. the platform-probe addon) can emit live progress events on
390
+ * the event bus. The callback takes a phase id + a typed payload; all
391
+ * phases fire in strict order: `started` → `hardware` → `scored` → `done`.
392
+ * On failure, `error` fires once with the exception. Cached after first call.
393
+ *
394
+ * Scores are hardware-driven only (no Python module import subprocess):
395
+ * `scoreRuntimes` from `@camstack/types` is the single source of truth.
396
+ */
397
+ async probe(onPhase) {
398
+ if (this.cached) return this.cached;
399
+ const start = Date.now();
400
+ onPhase?.("started", {});
401
+ this.logger.info("Probing hardware...");
402
+ const hardware = await this.probeHardware();
403
+ this.logger.info("Hardware detected", { meta: {
404
+ platform: hardware.platform,
405
+ arch: hardware.arch,
406
+ cpuModel: hardware.cpuModel,
407
+ cpuCores: hardware.cpuCores,
408
+ ramGB: Math.round(hardware.totalRAM_MB / 1024)
409
+ } });
410
+ if (hardware.gpu) this.logger.info("GPU detected", { meta: { name: hardware.gpu.name } });
411
+ if (hardware.npu) this.logger.info("NPU detected", { meta: { type: hardware.npu.type } });
412
+ onPhase?.("hardware", { hardware });
413
+ const { scores, best: bestScore } = scoreRuntimes(hardware);
414
+ const pythonPath = await this.resolvePythonPath();
415
+ if (pythonPath) this.logger.info("Python interpreter located", { meta: { pythonPath } });
416
+ else this.logger.info("Python: not found");
417
+ const elapsed = Date.now() - start;
418
+ this.logger.info("Scoring complete", { meta: {
419
+ elapsedMs: elapsed,
420
+ combos: scores.length
421
+ } });
422
+ this.logger.info("Best backend selected", { meta: {
423
+ runtime: bestScore.runtime,
424
+ backend: bestScore.backend,
425
+ format: bestScore.format,
426
+ reason: bestScore.reason,
427
+ score: bestScore.score
428
+ } });
429
+ for (const s of scores) this.logger.debug("Score entry", { meta: {
430
+ available: s.available,
431
+ runtime: s.runtime,
432
+ backend: s.backend,
433
+ format: s.format,
434
+ score: s.score,
435
+ reason: s.reason
436
+ } });
437
+ this.cached = {
438
+ hardware,
439
+ scores: [...scores],
440
+ bestScore,
441
+ pythonPath,
442
+ devices: enumerateInferenceDevices(hardware)
443
+ };
444
+ onPhase?.("scored", {
445
+ scores,
446
+ bestScore,
447
+ elapsedMs: elapsed
448
+ });
449
+ onPhase?.("done", { capabilities: this.cached });
450
+ return this.cached;
451
+ }
452
+ async probeHardware() {
453
+ const platform = os$1.platform();
454
+ const arch = os$1.arch();
455
+ const cpus = os$1.cpus();
456
+ const cpuModel = cpus[0]?.model ?? "unknown";
457
+ const cpuCores = cpus.length;
458
+ const totalRAM_MB = Math.round(os$1.totalmem() / 1024 / 1024);
459
+ const availableRAM_MB = await getAvailableRAM_MB();
460
+ this.logger.debug("RAM probed", { meta: {
461
+ totalRAM_MB,
462
+ availableRAM_MB
463
+ } });
464
+ let gpu = null;
465
+ let npu = null;
466
+ const coral = this.probeCoral().info;
467
+ if (platform === "darwin" && arch === "arm64") {
468
+ gpu = {
469
+ type: "apple",
470
+ name: "Apple Silicon GPU"
471
+ };
472
+ npu = { type: "apple-ane" };
473
+ }
474
+ if (platform === "win32") {
475
+ const nvidia = await this.probeNvidiaSmi();
476
+ const win = await this.probeWindowsHardwareSafely();
477
+ gpu = nvidia ?? win.gpu;
478
+ npu = win.npu;
479
+ if (gpu) this.logger.info("Windows GPU detected", { meta: {
480
+ type: gpu.type,
481
+ name: gpu.name
482
+ } });
483
+ if (npu && win.source !== "none") this.logger.info("AMD XDNA NPU detected (present only)", { meta: {
484
+ type: npu.type,
485
+ name: npu.name,
486
+ generation: npu.generation,
487
+ source: win.source
488
+ } });
489
+ }
490
+ if (platform === "linux") {
491
+ const nvidia = await this.probeNvidiaSmi();
492
+ if (nvidia) gpu = nvidia;
493
+ const listRenderNodes = () => {
494
+ try {
495
+ return fs$1.readdirSync("/dev/dri").filter((n) => n.startsWith("renderD")).map((n) => `/dev/dri/${n}`);
496
+ } catch {
497
+ return [];
498
+ }
499
+ };
500
+ const readDrmAttr = (node, attr) => {
501
+ try {
502
+ return fs$1.readFileSync(`/sys/class/drm/${node.split("/").pop()}/device/${attr}`, "utf8");
503
+ } catch {
504
+ return "";
505
+ }
506
+ };
507
+ if (!gpu) {
508
+ const { classifyIntelAccelerators } = await import("../../intel-accelerators-idEumqk1.mjs");
509
+ const intel = classifyIntelAccelerators({
510
+ listRenderNodes,
511
+ readVendor: (node) => readDrmAttr(node, "vendor")
512
+ });
513
+ gpu = gpu ?? intel.gpu;
514
+ if (intel.gpu) this.logger.info("Intel iGPU detected", { meta: { name: intel.gpu.name } });
515
+ }
516
+ if (!gpu) {
517
+ const { classifyAmdAccelerators } = await import("../../amd-accelerators-U_RsoEDd.mjs");
518
+ const amd = classifyAmdAccelerators({
519
+ listRenderNodes,
520
+ readVendor: (node) => readDrmAttr(node, "vendor"),
521
+ readDevice: (node) => readDrmAttr(node, "device")
522
+ });
523
+ gpu = gpu ?? amd.gpu;
524
+ if (amd.gpu) this.logger.info("AMD iGPU detected", { meta: { name: amd.gpu.name } });
525
+ }
526
+ const listDir = (p) => {
527
+ try {
528
+ return fs$1.readdirSync(p);
529
+ } catch {
530
+ return [];
531
+ }
532
+ };
533
+ const exists = (p) => fs$1.existsSync(p);
534
+ if (!npu) {
535
+ const { classifyIntelNpu } = await import("../../intel-npu-C8HKvRQF.mjs");
536
+ npu = classifyIntelNpu({
537
+ platform,
538
+ arch,
539
+ intelPresent: gpu?.type === "intel" || /intel/i.test(cpuModel)
540
+ }, {
541
+ listDir,
542
+ exists
543
+ });
544
+ if (npu) this.logger.info("Intel NPU detected", { meta: {
545
+ type: npu.type,
546
+ name: npu.name,
547
+ device: "/dev/accel/accel*"
548
+ } });
549
+ }
550
+ if (!npu) {
551
+ const { classifyAmdNpu } = await Promise.resolve().then(() => amd_npu_exports);
552
+ npu = classifyAmdNpu({
553
+ platform,
554
+ arch,
555
+ amdPresent: gpu?.type === "amd" || /amd|ryzen/i.test(cpuModel)
556
+ }, {
557
+ listDir,
558
+ exists,
559
+ readFile: (p) => {
560
+ try {
561
+ return fs$1.readFileSync(p, "utf8");
562
+ } catch {
563
+ return "";
564
+ }
565
+ }
566
+ });
567
+ if (npu) this.logger.info("AMD XDNA NPU detected (present only)", { meta: {
568
+ type: npu.type,
569
+ name: npu.name,
570
+ generation: npu.generation
571
+ } });
572
+ }
573
+ }
574
+ const hardware = {
575
+ platform,
576
+ arch,
577
+ cpuModel,
578
+ cpuCores,
579
+ totalRAM_MB,
580
+ availableRAM_MB,
581
+ gpu,
582
+ npu,
583
+ coral
584
+ };
585
+ const accelerators = await this.readAcceleratorCompute();
586
+ return accelerators === null ? hardware : {
587
+ ...hardware,
588
+ accelerators
589
+ };
590
+ }
591
+ /** Compute facts, or null when the probe did not run or could not ask. */
592
+ async readAcceleratorCompute() {
593
+ const read = this.readAcceleratorFacts;
594
+ if (read === null) return null;
595
+ try {
596
+ const facts = await read();
597
+ if (facts === null) return null;
598
+ this.logger.info("accelerator compute probed", { meta: { devices: facts.map((row) => row.deviceKey) } });
599
+ return facts;
600
+ } catch (err) {
601
+ this.logger.warn("accelerator compute probe failed", { meta: { error: errMsg(err) } });
602
+ return null;
603
+ }
604
+ }
605
+ /**
606
+ * The Coral part of the probe, with the evidence that decided it logged —
607
+ * a node that reports a Coral, or stops reporting one, says WHY (D919).
608
+ */
609
+ probeCoral() {
610
+ const detection = detectCoralAccelerator(this.coralFs);
611
+ const coral = detection.info;
612
+ this.logger.info("Coral Edge TPU probe", { meta: {
613
+ usbBus: detection.usbBus,
614
+ decidedBy: detection.decidedBy,
615
+ units: coral?.units ?? [],
616
+ inaccessibleUsbNodes: detection.inaccessibleUsbNodes
617
+ } });
618
+ if (coral) {
619
+ if ((coral.units ?? []).length > 0) this.logger.info("Coral Edge TPU detected", { meta: {
620
+ units: coral.units,
621
+ decidedBy: detection.decidedBy
622
+ } });
623
+ for (const unavailable of coral.unavailable ?? []) this.logger.warn("Coral Edge TPU present but unusable", { meta: {
624
+ bus: unavailable.bus,
625
+ count: unavailable.count,
626
+ reason: unavailable.reason,
627
+ ...unavailable.bus === "usb" ? { nodes: detection.inaccessibleUsbNodes } : {}
628
+ } });
629
+ }
630
+ return detection;
631
+ }
632
+ /**
633
+ * Re-run ONLY the accelerator part (Coral USB ids + PCIe apex units: `/sys`
634
+ * and `/dev` reads, no model load) against the cached probe, and rebuild the
635
+ * device list from it when it changed. `null` before the first full probe
636
+ * completed — there is nothing to compare against yet. Logs the evidence
637
+ * only when the answer changed, so a 60 s cadence stays quiet.
638
+ */
639
+ reprobeAccelerators() {
640
+ const cached = this.cached;
641
+ if (cached === null) return null;
642
+ const detection = detectCoralAccelerator(this.coralFs);
643
+ if (coralSignature(detection.info) === coralSignature(cached.hardware.coral)) return {
644
+ caps: cached,
645
+ change: {
646
+ appeared: [],
647
+ disappeared: []
648
+ },
649
+ detection
650
+ };
651
+ this.logger.info("Coral Edge TPU probe changed", { meta: {
652
+ usbBus: detection.usbBus,
653
+ decidedBy: detection.decidedBy,
654
+ before: coralSignature(cached.hardware.coral),
655
+ after: coralSignature(detection.info),
656
+ inaccessibleUsbNodes: detection.inaccessibleUsbNodes
657
+ } });
658
+ const next = withCoral(cached, detection.info);
659
+ this.cached = next;
660
+ return {
661
+ caps: next,
662
+ change: diffInferenceDevices(cached.devices, next.devices),
663
+ detection
664
+ };
665
+ }
666
+ /** NVIDIA's own tool: exact model and VRAM. Null when absent or failing. */
667
+ async probeNvidiaSmi() {
668
+ try {
669
+ const { stdout } = await execFileAsync$1("nvidia-smi", ["--query-gpu=name,memory.total", "--format=csv,noheader"], {
670
+ encoding: "utf8",
671
+ timeout: 5e3,
672
+ windowsHide: true
673
+ });
674
+ const output = stdout.trim();
675
+ if (!output) return null;
676
+ const [name, mem] = output.split(",").map((s) => s.trim());
677
+ return {
678
+ type: "nvidia",
679
+ name: name ?? "NVIDIA GPU",
680
+ memoryMB: parseInt(mem ?? "0")
681
+ };
682
+ } catch (err) {
683
+ this.logger.debug("NVIDIA GPU detection failed", { meta: { error: errMsg(err) } });
684
+ return null;
685
+ }
686
+ }
687
+ /** Windows WMI probe; bounded, and a failure is a log line, never a boot failure. */
688
+ async probeWindowsHardwareSafely() {
689
+ const run = async (file, args) => {
690
+ const { stdout } = await execFileAsync$1(file, [...args], {
691
+ encoding: "utf8",
692
+ timeout: WINDOWS_PROBE_TIMEOUT_MS,
693
+ windowsHide: true,
694
+ maxBuffer: 4 * 1024 * 1024
695
+ });
696
+ return stdout;
697
+ };
698
+ const systemRoot = process.env["SystemRoot"];
699
+ try {
700
+ return await probeWindowsHardware(run, {
701
+ ...systemRoot === void 0 ? {} : { systemRoot },
702
+ onFallback: (reason) => this.logger.warn("Windows hardware probe degraded", { meta: { reason } })
703
+ });
704
+ } catch (err) {
705
+ this.logger.warn("Windows hardware probe failed — scoring as a CPU node", { meta: { error: errMsg(err) } });
706
+ return {
707
+ gpu: null,
708
+ npu: null,
709
+ source: "none"
710
+ };
711
+ }
712
+ }
713
+ /**
714
+ * Locates a Python interpreter without importing any module.
715
+ *
716
+ * Tries: embedded path (if configured) → `python3` → `python`.
717
+ * Returns the first executable found, or `null` if none respond.
718
+ * MUST NOT run `-c "import ..."` — interpreter location only.
719
+ */
720
+ async resolvePythonPath() {
721
+ const candidates = [
722
+ ...this.embeddedPythonPath ? [this.embeddedPythonPath] : [],
723
+ "python3",
724
+ "python"
725
+ ];
726
+ for (const cmd of candidates) try {
727
+ await execFileAsync$1(cmd, ["--version"], { timeout: 5e3 });
728
+ return cmd;
729
+ } catch (err) {
730
+ this.logger.debug(`Python command "${cmd}" not found`, { meta: { error: errMsg(err) } });
731
+ }
732
+ return null;
733
+ }
734
+ };
735
+ //#endregion
736
+ //#region src/builtins/platform-probe/inference-config-resolver.ts
737
+ var InferenceConfigResolver = class {
738
+ scores;
739
+ hardware;
740
+ constructor(scores, hardware) {
741
+ this.scores = scores;
742
+ this.hardware = hardware;
743
+ }
744
+ /**
745
+ * Compute accuracy/backend weights based on available system RAM.
746
+ * availableRAM_MB is now sourced from systeminformation (reliable cross-platform),
747
+ * not os.freemem() which is broken on macOS.
748
+ *
749
+ * - > 16 GB available: prefer larger, more accurate models (accuracy 0.6, backend 0.4)
750
+ * - > 8 GB available: balanced (accuracy 0.5, backend 0.5)
751
+ * - <= 8 GB available: prefer speed (accuracy 0.4, backend 0.6)
752
+ */
753
+ getWeights() {
754
+ const ramMB = this.hardware.availableRAM_MB;
755
+ if (ramMB > 16384) return {
756
+ accuracyWeight: .6,
757
+ backendWeight: .4
758
+ };
759
+ if (ramMB > 8192) return {
760
+ accuracyWeight: .5,
761
+ backendWeight: .5
762
+ };
763
+ return {
764
+ accuracyWeight: .4,
765
+ backendWeight: .6
766
+ };
767
+ }
768
+ /**
769
+ * Given an addon's model requirements, pick the best model + runtime + backend.
770
+ *
771
+ * Algorithm:
772
+ * 1. Filter models by available RAM (minRAM_MB < 25% of available RAM)
773
+ * 2. For each remaining model, find the best platform score whose format
774
+ * is available in the model's formats
775
+ * 3. Pick the model with the highest combined score using RAM-adaptive weights:
776
+ * - High RAM (>16 GB): accuracy × 0.6 + backend × 0.4 (prefer accuracy)
777
+ * - Mid RAM (>8 GB): accuracy × 0.5 + backend × 0.5 (balanced)
778
+ * - Low RAM (<=8 GB): accuracy × 0.4 + backend × 0.6 (prefer speed)
779
+ */
780
+ resolve(requirements) {
781
+ if (requirements.length === 0) return {
782
+ modelId: "",
783
+ runtime: "python",
784
+ backend: "cpu",
785
+ format: "onnx",
786
+ reason: "No models declared"
787
+ };
788
+ const ramBudget = this.hardware.availableRAM_MB * .25;
789
+ const { accuracyWeight, backendWeight } = this.getWeights();
790
+ console.log(`[InferenceConfigResolver] availableRAM: ${this.hardware.availableRAM_MB}MB, budget: ${Math.round(ramBudget)}MB, weights: accuracy=${accuracyWeight}, backend=${backendWeight}`);
791
+ const fits = requirements.filter((m) => m.minRAM_MB < ramBudget);
792
+ const candidates = fits.length > 0 ? fits : [requirements[0]];
793
+ console.log(`[InferenceConfigResolver] ${candidates.length}/${requirements.length} models fit RAM budget`);
794
+ let bestCombo = null;
795
+ for (const model of candidates) for (const score of this.scores) {
796
+ if (!score.available) continue;
797
+ if (!model.formats.includes(score.format)) continue;
798
+ const combined = model.accuracyScore * accuracyWeight + score.score * backendWeight;
799
+ if (!bestCombo || combined > bestCombo.combined) {
800
+ console.log(`[InferenceConfigResolver] New best: ${model.modelId} (accuracy=${model.accuracyScore}) + ${score.backend}/${score.format} (score=${score.score}) → combined=${Math.round(combined)}`);
801
+ bestCombo = {
802
+ model,
803
+ score,
804
+ combined
805
+ };
806
+ }
807
+ }
808
+ if (!bestCombo) return {
809
+ modelId: candidates[0].modelId,
810
+ runtime: "python",
811
+ backend: "cpu",
812
+ format: "onnx",
813
+ reason: "No compatible backend — CPU fallback"
814
+ };
815
+ return {
816
+ modelId: bestCombo.model.modelId,
817
+ runtime: bestCombo.score.runtime,
818
+ backend: bestCombo.score.backend,
819
+ format: bestCombo.score.format,
820
+ reason: `${bestCombo.model.name} on ${bestCombo.score.reason} (score: ${Math.round(bestCombo.combined)})`
821
+ };
822
+ }
823
+ };
824
+ //#endregion
825
+ //#region src/builtins/platform-probe/accelerator-facts-probe.ts
826
+ /**
827
+ * Read the accelerator compute the inference worker published (D930), or ask
828
+ * the same script once when this process has the embedded interpreter.
829
+ *
830
+ * A missing file and a failed probe are `null` — not an empty list, and not
831
+ * zeros. `getHardware` overlays a published file onto the cached probe so a
832
+ * pool that starts later still reaches Auto tune.
833
+ */
834
+ /** Same name `accelerator_facts.FACTS_FILENAME` writes under the system temp dir. */
835
+ var ACCELERATOR_FACTS_FILENAME = "camstack-accelerator-facts.json";
836
+ var execFileAsync = promisify(execFile);
837
+ function publishedAcceleratorFactsPath() {
838
+ return path$1.join(os$1.tmpdir(), ACCELERATOR_FACTS_FILENAME);
839
+ }
840
+ function jsonValue(text) {
841
+ return JSON.parse(text);
842
+ }
843
+ /** `null` when the file is absent, unreadable, or not a facts payload. */
844
+ function readPublishedAcceleratorFacts(filePath) {
845
+ let text;
846
+ try {
847
+ text = fs$1.readFileSync(filePath, "utf8");
848
+ } catch {
849
+ return null;
850
+ }
851
+ try {
852
+ return parseAcceleratorFactsJson(jsonValue(text));
853
+ } catch {
854
+ return null;
855
+ }
856
+ }
857
+ /** Where `accelerator_facts.py` lives, or null when this process cannot see the addon. */
858
+ function findAcceleratorFactsScript(dataDir, cwd = process.cwd()) {
859
+ const candidates = [];
860
+ if (typeof dataDir === "string" && dataDir !== "") candidates.push(path$1.join(dataDir, "addons", "@camstack", "addon-pipeline", "python", "accelerator_facts.py"));
861
+ candidates.push(path$1.join(cwd, "packages", "addon-pipeline", "python", "accelerator_facts.py"));
862
+ for (const candidate of candidates) if (fs$1.existsSync(candidate)) return candidate;
863
+ return null;
864
+ }
865
+ async function defaultExec(command, args, timeoutMs) {
866
+ const { stdout } = await execFileAsync(command, [...args], {
867
+ encoding: "utf8",
868
+ timeout: timeoutMs,
869
+ windowsHide: true
870
+ });
871
+ return stdout;
872
+ }
873
+ /**
874
+ * Run the facts script. `null` when there is no interpreter, no script, or
875
+ * the script could not ask the device (it prints `{"accelerators": null}`).
876
+ */
877
+ async function runAcceleratorFactsProbe(input) {
878
+ if (input.pythonPath === null || input.scriptPath === null) return null;
879
+ const exec = input.exec ?? defaultExec;
880
+ try {
881
+ return parseAcceleratorFactsJson(jsonValue(await exec(input.pythonPath, [input.scriptPath], input.timeoutMs ?? 8e3)));
882
+ } catch {
883
+ return null;
884
+ }
885
+ }
886
+ //#endregion
887
+ //#region src/builtins/platform-probe/index.ts
888
+ /**
889
+ * The decode-hwaccel backends `ctx.kernel.hwaccel.resolve` accepts. The cap
890
+ * input enum is WIDER (it also carries EP-only names — coreml/openvino/… —
891
+ * shared with other probe surfaces), so the provider param must stay
892
+ * `string`-typed to satisfy the `InferProvider` contract. We narrow it here
893
+ * with a type guard instead of a cast: any value that is not a known decode
894
+ * backend (or the `'none'` sentinel) resolves to `null` → auto-probe.
895
+ */
896
+ var HWACCEL_DECODE_BACKENDS = [
897
+ "videotoolbox",
898
+ "cuda",
899
+ "nvdec",
900
+ "vaapi",
901
+ "qsv",
902
+ "d3d11va",
903
+ "dxva2",
904
+ "amf",
905
+ "vdpau",
906
+ "drm"
907
+ ];
908
+ function isHwAccelBackend(value) {
909
+ return HWACCEL_DECODE_BACKENDS.includes(value);
910
+ }
911
+ function narrowHwAccelPrefer(value) {
912
+ if (value === "none") return "none";
913
+ if (typeof value === "string" && isHwAccelBackend(value)) return value;
914
+ return null;
915
+ }
916
+ /** How often the accelerator part of the probe is re-run (D919). Cheap: `/sys` + `/dev` reads. */
917
+ var ACCELERATOR_REPROBE_INTERVAL_MS = 6e4;
918
+ var PlatformProbeNativeAddon = class extends BaseAddon {
919
+ scorer = null;
920
+ cachedCaps = null;
921
+ /** The periodic accelerator re-probe; started once the full probe completed. */
922
+ reprobeTimer = null;
923
+ /**
924
+ * Per-boot generation stamp for the manual readiness emissions below.
925
+ * Constant for the lifetime of this addon instance (== one process boot);
926
+ * consumer-side registries derive a monotonic epoch from generation
927
+ * transitions. Mirrors `BaseAddon._readinessGeneration` (private there).
928
+ */
929
+ readinessGeneration = typeof crypto !== "undefined" && crypto.randomUUID ? crypto.randomUUID() : Math.random().toString(36).slice(2, 14);
930
+ constructor() {
931
+ super({});
932
+ }
933
+ /**
934
+ * Manual readiness protocol. The provider registers synchronously from
935
+ * `onInitialize`, but the REAL hardware + EP scoring is the async
936
+ * `probePromise` (embedded-Python install included). The BaseAddon
937
+ * auto-emit would flip `ready` at registration time — BEFORE any
938
+ * accelerator is visible — so probe-gated consumers (detection-pipeline
939
+ * engine auto-pick) would read accelerator-blind results and stick on
940
+ * onnx-CPU. Instead: `starting` at init, the single authoritative
941
+ * `ready` once the probe resolves, `down` on shutdown.
942
+ */
943
+ get autoEmitReadiness() {
944
+ return false;
945
+ }
946
+ /** Bare cluster node id — readiness is scoped `{type:'node', nodeId}`. */
947
+ bareLocalNodeId() {
948
+ const raw = this.ctx.kernel?.localNodeId ?? "hub";
949
+ return raw.includes("/") ? raw.split("/")[0] : raw;
950
+ }
951
+ /** Emit a `system.ready-state` transition for the platform-probe cap. */
952
+ emitProbeReadiness(state) {
953
+ const ctx = this.ctxIfReady;
954
+ if (!ctx) return;
955
+ const nodeId = this.bareLocalNodeId();
956
+ try {
957
+ emitReadiness(ctx.eventBus, {
958
+ capName: platformProbeCapability.name,
959
+ scope: {
960
+ type: "node",
961
+ nodeId
962
+ },
963
+ state,
964
+ generation: this.readinessGeneration,
965
+ sourceNodeId: nodeId
966
+ });
967
+ } catch {}
968
+ }
969
+ async onInitialize() {
970
+ this.emitProbeReadiness("starting");
971
+ const embeddedPython = await this.ctx.deps.ensurePython().catch((err) => {
972
+ this.ctx.logger.debug("ensurePython unavailable for platform probe", { meta: { error: errMsg(err) } });
973
+ return null;
974
+ });
975
+ const factsScript = findAcceleratorFactsScript(this.ctx.dataDir);
976
+ this.scorer = new PlatformScorer(this.ctx.logger.withTags({ nodeId: this.bareLocalNodeId() }), embeddedPython, nodeCoralFs, embeddedPython === null || factsScript === null ? null : () => runAcceleratorFactsProbe({
977
+ pythonPath: embeddedPython,
978
+ scriptPath: factsScript
979
+ }));
980
+ const emitPhase = (phase, payload) => {
981
+ this.ctx.eventBus?.emit({
982
+ id: `platform-probe-${phase}-${Date.now()}`,
983
+ timestamp: /* @__PURE__ */ new Date(),
984
+ source: {
985
+ type: "core",
986
+ id: "platform-probe-native"
987
+ },
988
+ category: EventCategory.PlatformProbePhase,
989
+ data: {
990
+ type: "platform-probe.phase",
991
+ phase,
992
+ ...payload
993
+ }
994
+ });
995
+ };
996
+ const probePromise = this.scorer.probe(emitPhase).then((caps) => {
997
+ this.cachedCaps = caps;
998
+ this.ctx.logger.info("Platform probe complete", { meta: {
999
+ cpuModel: caps.hardware.cpuModel,
1000
+ arch: caps.hardware.arch,
1001
+ totalRAM_MB: caps.hardware.totalRAM_MB,
1002
+ gpu: caps.hardware.gpu?.name ?? "none",
1003
+ bestReason: caps.bestScore.reason,
1004
+ bestScore: caps.bestScore.score
1005
+ } });
1006
+ this.emitProbeReadiness("ready");
1007
+ this.startAcceleratorReprobe();
1008
+ return caps;
1009
+ }).catch((err) => {
1010
+ const msg = errMsg(err);
1011
+ this.ctx.logger.error("Platform probe failed", { meta: { error: msg } });
1012
+ emitPhase("error", { message: msg });
1013
+ throw err;
1014
+ });
1015
+ const getCaps = async () => {
1016
+ return this.cachedCaps ?? probePromise;
1017
+ };
1018
+ return [{
1019
+ capability: platformProbeCapability,
1020
+ provider: {
1021
+ getCapabilities: async () => {
1022
+ return getCaps();
1023
+ },
1024
+ getHardware: async () => {
1025
+ const caps = await getCaps();
1026
+ const published = readPublishedAcceleratorFacts(publishedAcceleratorFactsPath());
1027
+ if (published === null) return caps.hardware;
1028
+ return {
1029
+ ...caps.hardware,
1030
+ accelerators: published
1031
+ };
1032
+ },
1033
+ resolveInferenceConfig: async (input) => {
1034
+ const caps = await getCaps();
1035
+ return new InferenceConfigResolver(caps.scores, caps.hardware).resolve(input.requirements);
1036
+ },
1037
+ resolveHwAccel: async (input) => {
1038
+ const hwaccel = this.ctx.kernel.hwaccel;
1039
+ if (!hwaccel) return {
1040
+ preferred: [],
1041
+ rationale: "kernel hwaccel unavailable"
1042
+ };
1043
+ const res = await hwaccel.resolve(narrowHwAccelPrefer(input.prefer));
1044
+ return {
1045
+ preferred: res.preferred,
1046
+ rationale: res.rationale
1047
+ };
1048
+ },
1049
+ rescanAccelerators: async () => {
1050
+ await getCaps();
1051
+ const rescan = this.reprobeAccelerators("operator");
1052
+ if (rescan === null) throw new Error("platform-probe: the probe is shutting down");
1053
+ return rescan;
1054
+ }
1055
+ }
1056
+ }];
1057
+ }
1058
+ /** Start the periodic accelerator re-probe (idempotent). */
1059
+ startAcceleratorReprobe() {
1060
+ if (this.reprobeTimer !== null) return;
1061
+ this.reprobeTimer = setInterval(() => {
1062
+ this.reprobeAccelerators("periodic");
1063
+ }, ACCELERATOR_REPROBE_INTERVAL_MS);
1064
+ this.reprobeTimer.unref?.();
1065
+ }
1066
+ /**
1067
+ * Re-run the accelerator part of the probe and serve its answer from now on.
1068
+ * Every device that appeared or disappeared is logged, naming the node and
1069
+ * what triggered the re-probe; the orchestrator sees the new list on its next
1070
+ * `getCapabilities` read and re-elects through its device-set-change path.
1071
+ * `null` when the scorer is gone or has not completed its first probe.
1072
+ */
1073
+ reprobeAccelerators(trigger) {
1074
+ const scorer = this.scorer;
1075
+ if (scorer === null) return null;
1076
+ let result;
1077
+ try {
1078
+ result = scorer.reprobeAccelerators();
1079
+ } catch (err) {
1080
+ this.ctx.logger.warn("accelerator re-probe failed — last device list kept", {
1081
+ tags: { nodeId: this.bareLocalNodeId() },
1082
+ meta: {
1083
+ nodeId: this.bareLocalNodeId(),
1084
+ trigger,
1085
+ error: errMsg(err)
1086
+ }
1087
+ });
1088
+ return null;
1089
+ }
1090
+ if (result === null) return null;
1091
+ this.cachedCaps = result.caps;
1092
+ const nodeId = this.bareLocalNodeId();
1093
+ for (const deviceKey of result.change.appeared) this.ctx.logger.info("inference device appeared", {
1094
+ tags: { nodeId },
1095
+ meta: {
1096
+ nodeId,
1097
+ deviceKey,
1098
+ trigger,
1099
+ decidedBy: result.detection.decidedBy
1100
+ }
1101
+ });
1102
+ for (const deviceKey of result.change.disappeared) this.ctx.logger.info("inference device disappeared", {
1103
+ tags: { nodeId },
1104
+ meta: {
1105
+ nodeId,
1106
+ deviceKey,
1107
+ trigger,
1108
+ decidedBy: result.detection.decidedBy
1109
+ }
1110
+ });
1111
+ if (trigger === "operator") this.ctx.logger.info("inference devices rescanned", {
1112
+ tags: { nodeId },
1113
+ meta: {
1114
+ nodeId,
1115
+ usbBus: result.detection.usbBus,
1116
+ decidedBy: result.detection.decidedBy,
1117
+ appeared: result.change.appeared,
1118
+ disappeared: result.change.disappeared
1119
+ }
1120
+ });
1121
+ return {
1122
+ devices: result.caps.devices,
1123
+ appeared: result.change.appeared,
1124
+ disappeared: result.change.disappeared,
1125
+ usbBus: result.detection.usbBus,
1126
+ decidedBy: result.detection.decidedBy
1127
+ };
1128
+ }
1129
+ async onShutdown() {
1130
+ if (this.reprobeTimer !== null) {
1131
+ clearInterval(this.reprobeTimer);
1132
+ this.reprobeTimer = null;
1133
+ }
1134
+ this.emitProbeReadiness("down");
1135
+ this.scorer = null;
1136
+ this.cachedCaps = null;
1137
+ }
1138
+ };
1139
+ //#endregion
1140
+ export { ACCELERATOR_REPROBE_INTERVAL_MS, InferenceConfigResolver, PlatformProbeNativeAddon, PlatformProbeNativeAddon as default, PlatformScorer };