@camstack/core 0.1.14 → 0.1.16

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 (352) hide show
  1. package/dist/addon/addon-api-factory.d.ts +36 -0
  2. package/dist/addon/addon-api-factory.d.ts.map +1 -0
  3. package/dist/addon-routes/addon-route-registry.d.ts +38 -0
  4. package/dist/addon-routes/addon-route-registry.d.ts.map +1 -0
  5. package/dist/auth/api-key-manager.d.ts +27 -0
  6. package/dist/auth/api-key-manager.d.ts.map +1 -0
  7. package/dist/auth/auth-manager.d.ts +47 -0
  8. package/dist/auth/auth-manager.d.ts.map +1 -0
  9. package/dist/auth/parse-record.d.ts +19 -0
  10. package/dist/auth/parse-record.d.ts.map +1 -0
  11. package/dist/auth/scoped-token-manager.d.ts +18 -0
  12. package/dist/auth/scoped-token-manager.d.ts.map +1 -0
  13. package/dist/auth/user-manager.d.ts +34 -0
  14. package/dist/auth/user-manager.d.ts.map +1 -0
  15. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.d.ts +54 -0
  16. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.d.ts.map +1 -0
  17. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +226 -0
  18. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js.map +1 -0
  19. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +218 -0
  20. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs.map +1 -0
  21. package/dist/builtins/addon-pages-aggregator/index.d.ts +2 -0
  22. package/dist/builtins/addon-pages-aggregator/index.d.ts.map +1 -0
  23. package/dist/builtins/addon-pages-aggregator/index.js +7 -0
  24. package/dist/builtins/addon-pages-aggregator/index.mjs +2 -0
  25. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.d.ts +33 -0
  26. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.d.ts.map +1 -0
  27. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +202 -0
  28. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js.map +1 -0
  29. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +194 -0
  30. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs.map +1 -0
  31. package/dist/builtins/addon-widgets-aggregator/index.d.ts +2 -0
  32. package/dist/builtins/addon-widgets-aggregator/index.d.ts.map +1 -0
  33. package/dist/builtins/addon-widgets-aggregator/index.js +7 -0
  34. package/dist/builtins/addon-widgets-aggregator/index.mjs +2 -0
  35. package/dist/builtins/alerts/alerts.addon.d.ts +82 -0
  36. package/dist/builtins/alerts/alerts.addon.d.ts.map +1 -0
  37. package/dist/builtins/alerts/alerts.addon.js +603 -0
  38. package/dist/builtins/alerts/alerts.addon.js.map +1 -0
  39. package/dist/builtins/alerts/alerts.addon.mjs +597 -0
  40. package/dist/builtins/alerts/alerts.addon.mjs.map +1 -0
  41. package/dist/builtins/alerts/index.d.ts +2 -0
  42. package/dist/builtins/alerts/index.d.ts.map +1 -0
  43. package/dist/builtins/alerts/index.js +3 -0
  44. package/dist/builtins/alerts/index.mjs +2 -0
  45. package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.d.ts +8 -0
  46. package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.d.ts.map +1 -0
  47. package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.js +56 -0
  48. package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.js.map +1 -0
  49. package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.mjs +50 -0
  50. package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.mjs.map +1 -0
  51. package/dist/builtins/auth-orchestrator/index.d.ts +2 -0
  52. package/dist/builtins/auth-orchestrator/index.d.ts.map +1 -0
  53. package/dist/builtins/auth-orchestrator/index.js +7 -0
  54. package/dist/builtins/auth-orchestrator/index.mjs +2 -0
  55. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts +148 -0
  56. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts.map +1 -0
  57. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +7639 -0
  58. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js.map +1 -0
  59. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +7627 -0
  60. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs.map +1 -0
  61. package/dist/builtins/backup-orchestrator/cron-helpers.d.ts +24 -0
  62. package/dist/builtins/backup-orchestrator/cron-helpers.d.ts.map +1 -0
  63. package/dist/builtins/backup-orchestrator/destination-policy.d.ts +73 -0
  64. package/dist/builtins/backup-orchestrator/destination-policy.d.ts.map +1 -0
  65. package/dist/builtins/backup-orchestrator/download-helpers.d.ts +13 -0
  66. package/dist/builtins/backup-orchestrator/download-helpers.d.ts.map +1 -0
  67. package/dist/builtins/backup-orchestrator/index.d.ts +3 -0
  68. package/dist/builtins/backup-orchestrator/index.d.ts.map +1 -0
  69. package/dist/builtins/backup-orchestrator/index.js +7 -0
  70. package/dist/builtins/backup-orchestrator/index.mjs +2 -0
  71. package/dist/builtins/backup-orchestrator/manifest-store.d.ts +78 -0
  72. package/dist/builtins/backup-orchestrator/manifest-store.d.ts.map +1 -0
  73. package/dist/builtins/console-logging/console-destination.d.ts +14 -0
  74. package/dist/builtins/console-logging/console-destination.d.ts.map +1 -0
  75. package/dist/builtins/console-logging/console-logging.addon.d.ts +26 -0
  76. package/dist/builtins/console-logging/console-logging.addon.d.ts.map +1 -0
  77. package/dist/builtins/console-logging/index.d.ts +4 -0
  78. package/dist/builtins/console-logging/index.d.ts.map +1 -0
  79. package/dist/builtins/console-logging/index.js +106 -0
  80. package/dist/builtins/console-logging/index.js.map +1 -0
  81. package/dist/builtins/console-logging/index.mjs +97 -0
  82. package/dist/builtins/console-logging/index.mjs.map +1 -0
  83. package/dist/builtins/device-manager/device-event-propagator.d.ts +27 -0
  84. package/dist/builtins/device-manager/device-event-propagator.d.ts.map +1 -0
  85. package/dist/builtins/device-manager/device-manager.addon.d.ts +259 -0
  86. package/dist/builtins/device-manager/device-manager.addon.d.ts.map +1 -0
  87. package/dist/builtins/device-manager/device-manager.addon.js +2153 -0
  88. package/dist/builtins/device-manager/device-manager.addon.js.map +1 -0
  89. package/dist/builtins/device-manager/device-manager.addon.mjs +2147 -0
  90. package/dist/builtins/device-manager/device-manager.addon.mjs.map +1 -0
  91. package/dist/builtins/device-manager/index.d.ts +3 -0
  92. package/dist/builtins/device-manager/index.d.ts.map +1 -0
  93. package/dist/builtins/device-manager/index.js +7 -0
  94. package/dist/builtins/device-manager/index.mjs +2 -0
  95. package/dist/builtins/hub-forwarder/hub-forwarder-destination.d.ts +45 -0
  96. package/dist/builtins/hub-forwarder/hub-forwarder-destination.d.ts.map +1 -0
  97. package/dist/builtins/hub-forwarder/hub-forwarder.addon.d.ts +16 -0
  98. package/dist/builtins/hub-forwarder/hub-forwarder.addon.d.ts.map +1 -0
  99. package/dist/builtins/hub-forwarder/index.d.ts +4 -0
  100. package/dist/builtins/hub-forwarder/index.d.ts.map +1 -0
  101. package/dist/builtins/hub-forwarder/index.js +156 -0
  102. package/dist/builtins/hub-forwarder/index.js.map +1 -0
  103. package/dist/builtins/hub-forwarder/index.mjs +147 -0
  104. package/dist/builtins/hub-forwarder/index.mjs.map +1 -0
  105. package/dist/builtins/local-auth/auth-schema.d.ts +12 -0
  106. package/dist/builtins/local-auth/auth-schema.d.ts.map +1 -0
  107. package/dist/builtins/local-auth/index.d.ts +2 -0
  108. package/dist/builtins/local-auth/index.d.ts.map +1 -0
  109. package/dist/builtins/local-auth/index.js +3 -0
  110. package/dist/builtins/local-auth/index.mjs +2 -0
  111. package/dist/builtins/local-auth/local-auth.addon.d.ts +17 -0
  112. package/dist/builtins/local-auth/local-auth.addon.d.ts.map +1 -0
  113. package/dist/builtins/local-auth/local-auth.addon.js +6895 -0
  114. package/dist/builtins/local-auth/local-auth.addon.js.map +1 -0
  115. package/dist/builtins/local-auth/local-auth.addon.mjs +6885 -0
  116. package/dist/builtins/local-auth/local-auth.addon.mjs.map +1 -0
  117. package/dist/builtins/local-network/index.d.ts +3 -0
  118. package/dist/builtins/local-network/index.d.ts.map +1 -0
  119. package/dist/builtins/local-network/index.js +9 -0
  120. package/dist/builtins/local-network/index.mjs +2 -0
  121. package/dist/builtins/local-network/local-network.addon.d.ts +102 -0
  122. package/dist/builtins/local-network/local-network.addon.d.ts.map +1 -0
  123. package/dist/builtins/local-network/local-network.addon.js +404 -0
  124. package/dist/builtins/local-network/local-network.addon.js.map +1 -0
  125. package/dist/builtins/local-network/local-network.addon.mjs +392 -0
  126. package/dist/builtins/local-network/local-network.addon.mjs.map +1 -0
  127. package/dist/builtins/mesh-orchestrator/index.d.ts +2 -0
  128. package/dist/builtins/mesh-orchestrator/index.d.ts.map +1 -0
  129. package/dist/builtins/mesh-orchestrator/index.js +7 -0
  130. package/dist/builtins/mesh-orchestrator/index.mjs +2 -0
  131. package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.d.ts +9 -0
  132. package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.d.ts.map +1 -0
  133. package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.js +83 -0
  134. package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.js.map +1 -0
  135. package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.mjs +77 -0
  136. package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.mjs.map +1 -0
  137. package/dist/builtins/native-metrics/index.d.ts +3 -0
  138. package/dist/builtins/native-metrics/index.d.ts.map +1 -0
  139. package/dist/builtins/native-metrics/native-metrics-provider.d.ts +49 -0
  140. package/dist/builtins/native-metrics/native-metrics-provider.d.ts.map +1 -0
  141. package/dist/builtins/native-metrics/native-metrics.addon.d.ts +74 -0
  142. package/dist/builtins/native-metrics/native-metrics.addon.d.ts.map +1 -0
  143. package/dist/builtins/native-metrics/native-metrics.addon.js +924 -0
  144. package/dist/builtins/native-metrics/native-metrics.addon.js.map +1 -0
  145. package/dist/builtins/native-metrics/native-metrics.addon.mjs +916 -0
  146. package/dist/builtins/native-metrics/native-metrics.addon.mjs.map +1 -0
  147. package/dist/builtins/platform-probe/index.d.ts +12 -0
  148. package/dist/builtins/platform-probe/index.d.ts.map +1 -0
  149. package/dist/builtins/platform-probe/index.js +539 -0
  150. package/dist/builtins/platform-probe/index.js.map +1 -0
  151. package/dist/builtins/platform-probe/index.mjs +530 -0
  152. package/dist/builtins/platform-probe/index.mjs.map +1 -0
  153. package/dist/builtins/platform-probe/inference-config-resolver.d.ts +30 -0
  154. package/dist/builtins/platform-probe/inference-config-resolver.d.ts.map +1 -0
  155. package/dist/builtins/platform-probe/platform-scorer.d.ts +22 -0
  156. package/dist/builtins/platform-probe/platform-scorer.d.ts.map +1 -0
  157. package/dist/builtins/remote-access-orchestrator/index.d.ts +2 -0
  158. package/dist/builtins/remote-access-orchestrator/index.d.ts.map +1 -0
  159. package/dist/builtins/remote-access-orchestrator/index.js +7 -0
  160. package/dist/builtins/remote-access-orchestrator/index.mjs +2 -0
  161. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.d.ts +9 -0
  162. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.d.ts.map +1 -0
  163. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +72 -0
  164. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js.map +1 -0
  165. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +66 -0
  166. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs.map +1 -0
  167. package/dist/builtins/snapshot/index.d.ts +3 -0
  168. package/dist/builtins/snapshot/index.d.ts.map +1 -0
  169. package/dist/builtins/snapshot/index.js +494 -0
  170. package/dist/builtins/snapshot/index.js.map +1 -0
  171. package/dist/builtins/snapshot/index.mjs +488 -0
  172. package/dist/builtins/snapshot/index.mjs.map +1 -0
  173. package/dist/builtins/snapshot/snapshot.addon.d.ts +121 -0
  174. package/dist/builtins/snapshot/snapshot.addon.d.ts.map +1 -0
  175. package/dist/builtins/sqlite-storage/config-store.d.ts +9 -0
  176. package/dist/builtins/sqlite-storage/config-store.d.ts.map +1 -0
  177. package/dist/builtins/sqlite-storage/device-store.d.ts +24 -0
  178. package/dist/builtins/sqlite-storage/device-store.d.ts.map +1 -0
  179. package/dist/builtins/sqlite-storage/filesystem-storage-provider.d.ts +87 -0
  180. package/dist/builtins/sqlite-storage/filesystem-storage-provider.d.ts.map +1 -0
  181. package/dist/builtins/sqlite-storage/filesystem-storage.addon.d.ts +32 -2
  182. package/dist/builtins/sqlite-storage/filesystem-storage.addon.d.ts.map +1 -0
  183. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +311 -205
  184. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js.map +1 -1
  185. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +305 -7
  186. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs.map +1 -1
  187. package/dist/builtins/sqlite-storage/index.d.ts +12 -4
  188. package/dist/builtins/sqlite-storage/index.d.ts.map +1 -0
  189. package/dist/builtins/sqlite-storage/index.js +258 -1097
  190. package/dist/builtins/sqlite-storage/index.js.map +1 -1
  191. package/dist/builtins/sqlite-storage/index.mjs +268 -28
  192. package/dist/builtins/sqlite-storage/index.mjs.map +1 -1
  193. package/dist/builtins/sqlite-storage/integration-registry.d.ts +28 -0
  194. package/dist/builtins/sqlite-storage/integration-registry.d.ts.map +1 -0
  195. package/dist/builtins/sqlite-storage/settings-store.d.ts +40 -0
  196. package/dist/builtins/sqlite-storage/settings-store.d.ts.map +1 -0
  197. package/dist/builtins/sqlite-storage/sql-schema.d.ts +33 -0
  198. package/dist/builtins/sqlite-storage/sql-schema.d.ts.map +1 -0
  199. package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +94 -0
  200. package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts.map +1 -0
  201. package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +15 -2
  202. package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts.map +1 -0
  203. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +588 -417
  204. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js.map +1 -1
  205. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +582 -7
  206. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs.map +1 -1
  207. package/dist/builtins/storage-orchestrator/index.d.ts +7 -0
  208. package/dist/builtins/storage-orchestrator/index.d.ts.map +1 -0
  209. package/dist/builtins/storage-orchestrator/index.js +9 -0
  210. package/dist/builtins/storage-orchestrator/index.mjs +2 -0
  211. package/dist/builtins/storage-orchestrator/location-store.d.ts +50 -0
  212. package/dist/builtins/storage-orchestrator/location-store.d.ts.map +1 -0
  213. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +60 -0
  214. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts.map +1 -0
  215. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +755 -0
  216. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js.map +1 -0
  217. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +746 -0
  218. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs.map +1 -0
  219. package/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +121 -0
  220. package/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts.map +1 -0
  221. package/dist/builtins/system-backup/system-backup.service.d.ts +138 -0
  222. package/dist/builtins/system-backup/system-backup.service.d.ts.map +1 -0
  223. package/dist/builtins/system-config/index.d.ts +2 -0
  224. package/dist/builtins/system-config/index.d.ts.map +1 -0
  225. package/dist/builtins/system-config/index.js +7 -0
  226. package/dist/builtins/system-config/index.mjs +2 -0
  227. package/dist/builtins/system-config/system-config.addon.d.ts +11 -0
  228. package/dist/builtins/system-config/system-config.addon.d.ts.map +1 -0
  229. package/dist/builtins/system-config/system-config.addon.js +234 -0
  230. package/dist/builtins/system-config/system-config.addon.js.map +1 -0
  231. package/dist/builtins/system-config/system-config.addon.mjs +228 -0
  232. package/dist/builtins/system-config/system-config.addon.mjs.map +1 -0
  233. package/dist/builtins/turn-orchestrator/index.d.ts +2 -0
  234. package/dist/builtins/turn-orchestrator/index.d.ts.map +1 -0
  235. package/dist/builtins/turn-orchestrator/index.js +7 -0
  236. package/dist/builtins/turn-orchestrator/index.mjs +2 -0
  237. package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.d.ts +10 -0
  238. package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.d.ts.map +1 -0
  239. package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.js +78 -0
  240. package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.js.map +1 -0
  241. package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.mjs +72 -0
  242. package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.mjs.map +1 -0
  243. package/dist/builtins/winston-logging/index.d.ts +4 -30
  244. package/dist/builtins/winston-logging/index.d.ts.map +1 -0
  245. package/dist/builtins/winston-logging/index.js +153 -180
  246. package/dist/builtins/winston-logging/index.js.map +1 -1
  247. package/dist/builtins/winston-logging/index.mjs +144 -8
  248. package/dist/builtins/winston-logging/index.mjs.map +1 -1
  249. package/dist/builtins/winston-logging/winston-destination.d.ts +22 -0
  250. package/dist/builtins/winston-logging/winston-destination.d.ts.map +1 -0
  251. package/dist/builtins/winston-logging/winston-logging.addon.d.ts +20 -0
  252. package/dist/builtins/winston-logging/winston-logging.addon.d.ts.map +1 -0
  253. package/dist/chunk-C13QxCFV.js +50 -0
  254. package/dist/chunk-hT5z_Zn9.mjs +35 -0
  255. package/dist/download/model-download-service.d.ts +42 -0
  256. package/dist/download/model-download-service.d.ts.map +1 -0
  257. package/dist/download/model-downloader.d.ts +32 -0
  258. package/dist/download/model-downloader.d.ts.map +1 -0
  259. package/dist/events/event-bus.d.ts +11 -0
  260. package/dist/events/event-bus.d.ts.map +1 -0
  261. package/dist/events/system-event-bus.d.ts +15 -0
  262. package/dist/events/system-event-bus.d.ts.map +1 -0
  263. package/dist/feature/feature-manager.d.ts +12 -0
  264. package/dist/feature/feature-manager.d.ts.map +1 -0
  265. package/dist/formatter-C-5An4Bl.mjs +164 -0
  266. package/dist/formatter-C-5An4Bl.mjs.map +1 -0
  267. package/dist/formatter-Dr_6NNZc.js +169 -0
  268. package/dist/formatter-Dr_6NNZc.js.map +1 -0
  269. package/dist/index.d.ts +76 -1137
  270. package/dist/index.d.ts.map +1 -0
  271. package/dist/index.js +7761 -7017
  272. package/dist/index.js.map +1 -1
  273. package/dist/index.mjs +7699 -3798
  274. package/dist/index.mjs.map +1 -1
  275. package/dist/lifecycle/lifecycle-state-machine.d.ts +29 -0
  276. package/dist/lifecycle/lifecycle-state-machine.d.ts.map +1 -0
  277. package/dist/logging/formatter.d.ts +31 -0
  278. package/dist/logging/formatter.d.ts.map +1 -0
  279. package/dist/logging/log-manager.d.ts +52 -0
  280. package/dist/logging/log-manager.d.ts.map +1 -0
  281. package/dist/logging/log-ring-buffer.d.ts +48 -0
  282. package/dist/logging/log-ring-buffer.d.ts.map +1 -0
  283. package/dist/logging/scoped-logger.d.ts +18 -0
  284. package/dist/logging/scoped-logger.d.ts.map +1 -0
  285. package/dist/network/network-quality.d.ts +12 -0
  286. package/dist/network/network-quality.d.ts.map +1 -0
  287. package/dist/notification/notification-service.d.ts +38 -0
  288. package/dist/notification/notification-service.d.ts.map +1 -0
  289. package/dist/notification/toast-service.d.ts +23 -0
  290. package/dist/notification/toast-service.d.ts.map +1 -0
  291. package/dist/pipeline/engine-manager-resolver.d.ts +16 -0
  292. package/dist/pipeline/engine-manager-resolver.d.ts.map +1 -0
  293. package/dist/pipeline/pipeline-runner.d.ts +9 -0
  294. package/dist/pipeline/pipeline-runner.d.ts.map +1 -0
  295. package/dist/pipeline/pipeline-validator.d.ts +14 -0
  296. package/dist/pipeline/pipeline-validator.d.ts.map +1 -0
  297. package/dist/process/resource-monitor.d.ts +12 -0
  298. package/dist/process/resource-monitor.d.ts.map +1 -0
  299. package/dist/python/python-env-manager.d.ts +13 -0
  300. package/dist/python/python-env-manager.d.ts.map +1 -0
  301. package/dist/repl/interfaces.d.ts +32 -0
  302. package/dist/repl/interfaces.d.ts.map +1 -0
  303. package/dist/repl/repl-engine.d.ts +9 -0
  304. package/dist/repl/repl-engine.d.ts.map +1 -0
  305. package/dist/resource-monitor-CmuWlmap.js +76 -0
  306. package/dist/resource-monitor-CmuWlmap.js.map +1 -0
  307. package/dist/resource-monitor-DcQdKGYU.mjs +59 -0
  308. package/dist/resource-monitor-DcQdKGYU.mjs.map +1 -0
  309. package/dist/storage/fs-storage-backend.d.ts +41 -0
  310. package/dist/storage/fs-storage-backend.d.ts.map +1 -0
  311. package/dist/storage/storage-location-manager.d.ts +24 -0
  312. package/dist/storage/storage-location-manager.d.ts.map +1 -0
  313. package/dist/storage/storage-manager.d.ts +77 -0
  314. package/dist/storage/storage-manager.d.ts.map +1 -0
  315. package/dist/tls/cert-manager.d.ts +27 -0
  316. package/dist/tls/cert-manager.d.ts.map +1 -0
  317. package/dist/tls/index.d.ts +2 -0
  318. package/dist/tls/index.d.ts.map +1 -0
  319. package/package.json +230 -13
  320. package/dist/builtins/local-backup/index.d.mts +0 -42
  321. package/dist/builtins/local-backup/index.d.ts +0 -42
  322. package/dist/builtins/local-backup/index.js +0 -188
  323. package/dist/builtins/local-backup/index.js.map +0 -1
  324. package/dist/builtins/local-backup/index.mjs +0 -10
  325. package/dist/builtins/local-backup/index.mjs.map +0 -1
  326. package/dist/builtins/sqlite-storage/filesystem-storage.addon.d.mts +0 -2
  327. package/dist/builtins/sqlite-storage/index.d.mts +0 -4
  328. package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.mts +0 -2
  329. package/dist/builtins/winston-logging/index.d.mts +0 -30
  330. package/dist/chunk-2F3XZYRW.mjs +0 -89
  331. package/dist/chunk-2F3XZYRW.mjs.map +0 -1
  332. package/dist/chunk-LQFPAEQF.mjs +0 -147
  333. package/dist/chunk-LQFPAEQF.mjs.map +0 -1
  334. package/dist/chunk-R3DIIBBX.mjs +0 -532
  335. package/dist/chunk-R3DIIBBX.mjs.map +0 -1
  336. package/dist/chunk-SMNR44VG.mjs +0 -386
  337. package/dist/chunk-SMNR44VG.mjs.map +0 -1
  338. package/dist/chunk-SO4LROOT.mjs +0 -150
  339. package/dist/chunk-SO4LROOT.mjs.map +0 -1
  340. package/dist/chunk-SPA4JBKN.mjs +0 -175
  341. package/dist/chunk-SPA4JBKN.mjs.map +0 -1
  342. package/dist/dist-3BY63UQ5.mjs +0 -2151
  343. package/dist/dist-3BY63UQ5.mjs.map +0 -1
  344. package/dist/filesystem-storage.addon-C42r589X.d.mts +0 -57
  345. package/dist/filesystem-storage.addon-C42r589X.d.ts +0 -57
  346. package/dist/index.d.mts +0 -1137
  347. package/dist/sql-schema-CKz78rId.d.mts +0 -97
  348. package/dist/sql-schema-CKz78rId.d.ts +0 -97
  349. package/dist/sqlite-settings.addon-KwG-uKMP.d.mts +0 -79
  350. package/dist/sqlite-settings.addon-KwG-uKMP.d.ts +0 -79
  351. package/dist/storage-location-manager-KKDQNAKA.mjs +0 -7
  352. package/dist/storage-location-manager-KKDQNAKA.mjs.map +0 -1
@@ -1,10 +1,146 @@
1
- import {
2
- WinstonDestination,
3
- WinstonLoggingAddon
4
- } from "../../chunk-LQFPAEQF.mjs";
5
- export {
6
- WinstonDestination,
7
- WinstonLoggingAddon,
8
- WinstonLoggingAddon as default
1
+ import { t as formatLogLine } from "../../formatter-C-5An4Bl.mjs";
2
+ import * as path from "node:path";
3
+ import { BaseAddon, logDestinationCapability } from "@camstack/types";
4
+ import * as winston from "winston";
5
+ import DailyRotateFile from "winston-daily-rotate-file";
6
+ //#region src/builtins/winston-logging/winston-destination.ts
7
+ /**
8
+ * Rotated-file log destination. Console output goes through the shared
9
+ * `formatLogLine` so every console sink (Winston, ConsoleDestination,
10
+ * HubForwarderDestination) emits identical lines. File output keeps a
11
+ * structured JSON shape so log tooling can query tags/meta.
12
+ */
13
+ var WinstonDestination = class {
14
+ logger = null;
15
+ async initialize(config) {
16
+ const { level = "info", retentionDays = 30, logsDir = path.join("camstack-data", "logs") } = config ?? {};
17
+ winston.format.printf((info) => {
18
+ const rendered = info._rendered;
19
+ return typeof rendered === "string" ? rendered : String(info.message);
20
+ });
21
+ const stripRendered = winston.format((info) => {
22
+ delete info["_rendered"];
23
+ return info;
24
+ });
25
+ const fileFormat = winston.format.combine(winston.format.timestamp(), stripRendered(), winston.format.json());
26
+ this.logger = winston.createLogger({
27
+ level,
28
+ transports: [new DailyRotateFile({
29
+ dirname: logsDir,
30
+ filename: "camstack-%DATE%.log",
31
+ datePattern: "YYYY-MM-DD",
32
+ maxFiles: `${retentionDays}d`,
33
+ format: fileFormat
34
+ })]
35
+ });
36
+ }
37
+ write(entry) {
38
+ if (!this.logger) return;
39
+ const ts = entry.timestamp instanceof Date ? entry.timestamp.toISOString() : String(entry.timestamp);
40
+ const rendered = formatLogLine(entry, { colorize: true });
41
+ this.logger.log({
42
+ level: entry.level,
43
+ message: entry.message,
44
+ _rendered: rendered,
45
+ timestamp: ts,
46
+ scope: entry.scope,
47
+ ...entry.tags ? { tags: entry.tags } : {},
48
+ ...entry.meta ? { meta: entry.meta } : {}
49
+ });
50
+ }
51
+ async query(_filter) {
52
+ return [];
53
+ }
54
+ async shutdown() {
55
+ if (!this.logger) return;
56
+ await new Promise((resolve) => {
57
+ this.logger.on("finish", resolve);
58
+ this.logger.end();
59
+ });
60
+ this.logger = null;
61
+ }
9
62
  };
63
+ //#endregion
64
+ //#region src/builtins/winston-logging/winston-logging.addon.ts
65
+ /**
66
+ * Winston logging addon — rotated log files + console output.
67
+ * Settings appear under Cluster → NodeDetail → Settings.
68
+ */
69
+ var WinstonLoggingAddon = class extends BaseAddon {
70
+ destination = null;
71
+ constructor() {
72
+ super({
73
+ level: "info",
74
+ retentionDays: 30
75
+ });
76
+ }
77
+ async onInitialize() {
78
+ const logsDir = await this.ctx.api.storage.resolve.query({
79
+ location: "logs",
80
+ relativePath: ""
81
+ }).catch(() => "camstack-data/logs");
82
+ this.destination = new WinstonDestination();
83
+ await this.destination.initialize({
84
+ ...this.config,
85
+ logsDir
86
+ });
87
+ this.ctx.logger.info("Winston logging initialized");
88
+ return [{
89
+ capability: logDestinationCapability,
90
+ provider: this.destination
91
+ }];
92
+ }
93
+ async onShutdown() {
94
+ await this.destination?.shutdown();
95
+ }
96
+ getDestination() {
97
+ if (!this.destination) throw new Error("Winston not initialized");
98
+ return this.destination;
99
+ }
100
+ globalSettingsSchema() {
101
+ return this.schema({ sections: [{
102
+ id: "winston-logging",
103
+ title: "Logging",
104
+ description: "Global log verbosity + retention for rotated log files on this node.",
105
+ columns: 2,
106
+ fields: [this.field({
107
+ type: "select",
108
+ key: "level",
109
+ label: "Log Level",
110
+ default: "info",
111
+ options: [
112
+ {
113
+ value: "debug",
114
+ label: "Debug"
115
+ },
116
+ {
117
+ value: "info",
118
+ label: "Info"
119
+ },
120
+ {
121
+ value: "warn",
122
+ label: "Warn"
123
+ },
124
+ {
125
+ value: "error",
126
+ label: "Error"
127
+ }
128
+ ]
129
+ }), this.field({
130
+ type: "number",
131
+ key: "retentionDays",
132
+ label: "Retention (days)",
133
+ description: "Number of days to keep rotated log files before deletion",
134
+ min: 1,
135
+ max: 365,
136
+ step: 1,
137
+ default: 30,
138
+ unit: "days"
139
+ })]
140
+ }] });
141
+ }
142
+ };
143
+ //#endregion
144
+ export { WinstonDestination, WinstonLoggingAddon, WinstonLoggingAddon as default };
145
+
10
146
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/builtins/winston-logging/winston-destination.ts","../../../src/builtins/winston-logging/winston-logging.addon.ts"],"sourcesContent":["import * as winston from 'winston'\nimport DailyRotateFile from 'winston-daily-rotate-file'\nimport * as path from 'node:path'\nimport type { ILogDestination, LogEntry, LogFilter } from '@camstack/types'\nimport { formatLogLine } from '../../logging/formatter.js'\n\ninterface WinstonConfig {\n readonly level: string\n readonly retentionDays: number\n /** Resolved absolute path to the logs directory (replaces the old dataPath field). */\n readonly logsDir: string\n}\n\n/**\n * Rotated-file log destination. Console output goes through the shared\n * `formatLogLine` so every console sink (Winston, ConsoleDestination,\n * HubForwarderDestination) emits identical lines. File output keeps a\n * structured JSON shape so log tooling can query tags/meta.\n */\nexport class WinstonDestination implements ILogDestination {\n private logger: winston.Logger | null = null\n\n async initialize(config?: WinstonConfig): Promise<void> {\n const {\n level = 'info',\n retentionDays = 30,\n logsDir = path.join('camstack-data', 'logs'),\n } = config ?? {}\n\n // Console: canonical single-line formatter — `_rendered` already\n // carries level-based ANSI colour codes (see `formatLogLine` in\n // `@camstack/core/logging/formatter.ts`). Using Winston's colorize\n // here would just decorate unused `info.level` and leave the\n // rendered line uncoloured.\n const consoleFormat = winston.format.printf((info) => {\n const rendered = (info as unknown as { _rendered?: string })._rendered\n return typeof rendered === 'string' ? rendered : String(info.message)\n })\n\n // File: structured JSON. Strip `_rendered` first — it carries ANSI\n // escape codes intended for the terminal and has no place in a\n // rotated-file store used for ops queries.\n const stripRendered = winston.format((info) => {\n delete (info as Record<string, unknown>)['_rendered']\n return info\n })\n const fileFormat = winston.format.combine(\n winston.format.timestamp(),\n stripRendered(),\n winston.format.json(),\n )\n\n // File-only winston. Stdout is owned by `ConsoleDestination`\n // (the `console-logging` builtin addon) — adding a Winston console\n // transport here would re-render every log line a second time on\n // the hub terminal, which is the historic cause of the duplicate\n // output operators have been seeing. The `consoleFormat` printf\n // above stays wired in so a future opt-in transport can use it\n // without re-deriving the layout.\n void consoleFormat\n this.logger = winston.createLogger({\n level,\n transports: [\n new DailyRotateFile({\n dirname: logsDir,\n filename: 'camstack-%DATE%.log',\n datePattern: 'YYYY-MM-DD',\n maxFiles: `${retentionDays}d`,\n format: fileFormat,\n }),\n ],\n })\n }\n\n write(entry: LogEntry): void {\n if (!this.logger) return\n\n // Moleculer JSON serialization converts Date → string; normalize back\n const ts = entry.timestamp instanceof Date\n ? entry.timestamp.toISOString()\n : String(entry.timestamp)\n // Render once with colours for the console transport; file transport\n // strips `_rendered` via the format chain above so disk stays plain.\n const rendered = formatLogLine(entry, { colorize: true })\n\n this.logger.log({\n level: entry.level,\n message: entry.message,\n _rendered: rendered,\n timestamp: ts,\n scope: entry.scope,\n ...(entry.tags ? { tags: entry.tags } : {}),\n ...(entry.meta ? { meta: entry.meta } : {}),\n })\n }\n\n async query(_filter: LogFilter): Promise<readonly LogEntry[]> {\n // File-based log querying is not implemented; use structured storage for log queries\n return []\n }\n\n async shutdown(): Promise<void> {\n if (!this.logger) return\n\n await new Promise<void>((resolve) => {\n this.logger!.on('finish', resolve)\n this.logger!.end()\n })\n this.logger = null\n }\n}\n","import type { ProviderRegistration } from '@camstack/types'\nimport { BaseAddon, logDestinationCapability } from '@camstack/types'\nimport { WinstonDestination } from './winston-destination.js'\n\ninterface WinstonConfig {\n readonly level: string\n readonly retentionDays: number\n}\n\n/**\n * Winston logging addon — rotated log files + console output.\n * Settings appear under Cluster → NodeDetail → Settings.\n */\nexport class WinstonLoggingAddon extends BaseAddon<WinstonConfig> {\n private destination: WinstonDestination | null = null\n\n constructor() {\n super({ level: 'info', retentionDays: 30 })\n }\n\n protected async onInitialize(): Promise<ProviderRegistration[]> {\n const logsDir = await this.ctx.api.storage.resolve.query({ location: 'logs', relativePath: '' })\n .catch(() => 'camstack-data/logs')\n this.destination = new WinstonDestination()\n await this.destination.initialize({ ...this.config, logsDir })\n this.ctx.logger.info('Winston logging initialized')\n return [{ capability: logDestinationCapability, provider: this.destination }]\n }\n\n protected async onShutdown(): Promise<void> {\n await this.destination?.shutdown()\n }\n\n getDestination(): WinstonDestination {\n if (!this.destination) throw new Error('Winston not initialized')\n return this.destination\n }\n\n protected globalSettingsSchema() {\n return this.schema({\n sections: [\n {\n id: 'winston-logging',\n title: 'Logging',\n description: 'Global log verbosity + retention for rotated log files on this node.',\n columns: 2,\n fields: [\n this.field({\n type: 'select',\n key: 'level',\n label: 'Log Level',\n default: 'info',\n options: [\n { value: 'debug', label: 'Debug' },\n { value: 'info', label: 'Info' },\n { value: 'warn', label: 'Warn' },\n { value: 'error', label: 'Error' },\n ],\n }),\n this.field({\n type: 'number',\n key: 'retentionDays',\n label: 'Retention (days)',\n description: 'Number of days to keep rotated log files before deletion',\n min: 1,\n max: 365,\n step: 1,\n default: 30,\n unit: 'days',\n }),\n ],\n },\n ],\n })\n }\n}\n"],"mappings":";;;;;;;;;;;;AAmBA,IAAa,qBAAb,MAA2D;CACzD,SAAwC;CAExC,MAAM,WAAW,QAAuC;EACtD,MAAM,EACJ,QAAQ,QACR,gBAAgB,IAChB,UAAU,KAAK,KAAK,iBAAiB,OAAO,KAC1C,UAAU,EAAE;EAOM,QAAQ,OAAO,QAAQ,SAAS;GACpD,MAAM,WAAY,KAA2C;GAC7D,OAAO,OAAO,aAAa,WAAW,WAAW,OAAO,KAAK,QAAQ;IACrE;EAKF,MAAM,gBAAgB,QAAQ,QAAQ,SAAS;GAC7C,OAAQ,KAAiC;GACzC,OAAO;IACP;EACF,MAAM,aAAa,QAAQ,OAAO,QAChC,QAAQ,OAAO,WAAW,EAC1B,eAAe,EACf,QAAQ,OAAO,MAAM,CACtB;EAUD,KAAK,SAAS,QAAQ,aAAa;GACjC;GACA,YAAY,CACV,IAAI,gBAAgB;IAClB,SAAS;IACT,UAAU;IACV,aAAa;IACb,UAAU,GAAG,cAAc;IAC3B,QAAQ;IACT,CAAC,CACH;GACF,CAAC;;CAGJ,MAAM,OAAuB;EAC3B,IAAI,CAAC,KAAK,QAAQ;EAGlB,MAAM,KAAK,MAAM,qBAAqB,OAClC,MAAM,UAAU,aAAa,GAC7B,OAAO,MAAM,UAAU;EAG3B,MAAM,WAAW,cAAc,OAAO,EAAE,UAAU,MAAM,CAAC;EAEzD,KAAK,OAAO,IAAI;GACd,OAAO,MAAM;GACb,SAAS,MAAM;GACf,WAAW;GACX,WAAW;GACX,OAAO,MAAM;GACb,GAAI,MAAM,OAAO,EAAE,MAAM,MAAM,MAAM,GAAG,EAAE;GAC1C,GAAI,MAAM,OAAO,EAAE,MAAM,MAAM,MAAM,GAAG,EAAE;GAC3C,CAAC;;CAGJ,MAAM,MAAM,SAAkD;EAE5D,OAAO,EAAE;;CAGX,MAAM,WAA0B;EAC9B,IAAI,CAAC,KAAK,QAAQ;EAElB,MAAM,IAAI,SAAe,YAAY;GACnC,KAAK,OAAQ,GAAG,UAAU,QAAQ;GAClC,KAAK,OAAQ,KAAK;IAClB;EACF,KAAK,SAAS;;;;;;;;;AC/FlB,IAAa,sBAAb,cAAyC,UAAyB;CAChE,cAAiD;CAEjD,cAAc;EACZ,MAAM;GAAE,OAAO;GAAQ,eAAe;GAAI,CAAC;;CAG7C,MAAgB,eAAgD;EAC9D,MAAM,UAAU,MAAM,KAAK,IAAI,IAAI,QAAQ,QAAQ,MAAM;GAAE,UAAU;GAAQ,cAAc;GAAI,CAAC,CAC7F,YAAY,qBAAqB;EACpC,KAAK,cAAc,IAAI,oBAAoB;EAC3C,MAAM,KAAK,YAAY,WAAW;GAAE,GAAG,KAAK;GAAQ;GAAS,CAAC;EAC9D,KAAK,IAAI,OAAO,KAAK,8BAA8B;EACnD,OAAO,CAAC;GAAE,YAAY;GAA0B,UAAU,KAAK;GAAa,CAAC;;CAG/E,MAAgB,aAA4B;EAC1C,MAAM,KAAK,aAAa,UAAU;;CAGpC,iBAAqC;EACnC,IAAI,CAAC,KAAK,aAAa,MAAM,IAAI,MAAM,0BAA0B;EACjE,OAAO,KAAK;;CAGd,uBAAiC;EAC/B,OAAO,KAAK,OAAO,EACjB,UAAU,CACR;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,SAAS;GACT,QAAQ,CACN,KAAK,MAAM;IACT,MAAM;IACN,KAAK;IACL,OAAO;IACP,SAAS;IACT,SAAS;KACP;MAAE,OAAO;MAAS,OAAO;MAAS;KAClC;MAAE,OAAO;MAAQ,OAAO;MAAQ;KAChC;MAAE,OAAO;MAAQ,OAAO;MAAQ;KAChC;MAAE,OAAO;MAAS,OAAO;MAAS;KACnC;IACF,CAAC,EACF,KAAK,MAAM;IACT,MAAM;IACN,KAAK;IACL,OAAO;IACP,aAAa;IACb,KAAK;IACL,KAAK;IACL,MAAM;IACN,SAAS;IACT,MAAM;IACP,CAAC,CACH;GACF,CACF,EACF,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { ILogDestination, LogEntry, LogFilter } from '@camstack/types';
2
+ interface WinstonConfig {
3
+ readonly level: string;
4
+ readonly retentionDays: number;
5
+ /** Resolved absolute path to the logs directory (replaces the old dataPath field). */
6
+ readonly logsDir: string;
7
+ }
8
+ /**
9
+ * Rotated-file log destination. Console output goes through the shared
10
+ * `formatLogLine` so every console sink (Winston, ConsoleDestination,
11
+ * HubForwarderDestination) emits identical lines. File output keeps a
12
+ * structured JSON shape so log tooling can query tags/meta.
13
+ */
14
+ export declare class WinstonDestination implements ILogDestination {
15
+ private logger;
16
+ initialize(config?: WinstonConfig): Promise<void>;
17
+ write(entry: LogEntry): void;
18
+ query(_filter: LogFilter): Promise<readonly LogEntry[]>;
19
+ shutdown(): Promise<void>;
20
+ }
21
+ export {};
22
+ //# sourceMappingURL=winston-destination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"winston-destination.d.ts","sourceRoot":"","sources":["../../../src/builtins/winston-logging/winston-destination.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAG3E,UAAU,aAAa;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,sFAAsF;IACtF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED;;;;;GAKG;AACH,qBAAa,kBAAmB,YAAW,eAAe;IACxD,OAAO,CAAC,MAAM,CAA8B;IAEtC,UAAU,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAoDvD,KAAK,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAsBtB,KAAK,CAAC,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,QAAQ,EAAE,CAAC;IAKvD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAShC"}
@@ -0,0 +1,20 @@
1
+ import { ProviderRegistration, BaseAddon } from '@camstack/types';
2
+ import { WinstonDestination } from './winston-destination.js';
3
+ interface WinstonConfig {
4
+ readonly level: string;
5
+ readonly retentionDays: number;
6
+ }
7
+ /**
8
+ * Winston logging addon — rotated log files + console output.
9
+ * Settings appear under Cluster → NodeDetail → Settings.
10
+ */
11
+ export declare class WinstonLoggingAddon extends BaseAddon<WinstonConfig> {
12
+ private destination;
13
+ constructor();
14
+ protected onInitialize(): Promise<ProviderRegistration[]>;
15
+ protected onShutdown(): Promise<void>;
16
+ getDestination(): WinstonDestination;
17
+ protected globalSettingsSchema(): import('@camstack/types').ConfigUISchema;
18
+ }
19
+ export {};
20
+ //# sourceMappingURL=winston-logging.addon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"winston-logging.addon.d.ts","sourceRoot":"","sources":["../../../src/builtins/winston-logging/winston-logging.addon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAA4B,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAE7D,UAAU,aAAa;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;CAC/B;AAED;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,SAAS,CAAC,aAAa,CAAC;IAC/D,OAAO,CAAC,WAAW,CAAkC;;cAMrC,YAAY,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;cAS/C,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3C,cAAc,IAAI,kBAAkB;IAKpC,SAAS,CAAC,oBAAoB;CAqC/B"}
@@ -0,0 +1,50 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
9
+ var __exportAll = (all, no_symbols) => {
10
+ let target = {};
11
+ for (var name in all) __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
15
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
16
+ return target;
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
20
+ key = keys[i];
21
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
22
+ get: ((k) => from[k]).bind(null, key),
23
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
24
+ });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
29
+ value: mod,
30
+ enumerable: true
31
+ }) : target, mod));
32
+ //#endregion
33
+ Object.defineProperty(exports, "__commonJSMin", {
34
+ enumerable: true,
35
+ get: function() {
36
+ return __commonJSMin;
37
+ }
38
+ });
39
+ Object.defineProperty(exports, "__exportAll", {
40
+ enumerable: true,
41
+ get: function() {
42
+ return __exportAll;
43
+ }
44
+ });
45
+ Object.defineProperty(exports, "__toESM", {
46
+ enumerable: true,
47
+ get: function() {
48
+ return __toESM;
49
+ }
50
+ });
@@ -0,0 +1,35 @@
1
+ import { createRequire } from "node:module";
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
+ var __exportAll = (all, no_symbols) => {
11
+ let target = {};
12
+ for (var name in all) __defProp(target, name, {
13
+ get: all[name],
14
+ enumerable: true
15
+ });
16
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
17
+ return target;
18
+ };
19
+ var __copyProps = (to, from, except, desc) => {
20
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
21
+ key = keys[i];
22
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
23
+ get: ((k) => from[k]).bind(null, key),
24
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
25
+ });
26
+ }
27
+ return to;
28
+ };
29
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
+ value: mod,
31
+ enumerable: true
32
+ }) : target, mod));
33
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
34
+ //#endregion
35
+ export { __toESM as i, __exportAll as n, __require as r, __commonJSMin as t };
@@ -0,0 +1,42 @@
1
+ import { ModelCatalogEntry, ModelFormat, IAddonModelManager } from '@camstack/types';
2
+ /**
3
+ * Unified model download service.
4
+ *
5
+ * Handles downloading model files and extra files (labels, dicts) from a
6
+ * catalog of ModelCatalogEntry items. Supports single-file models and
7
+ * directory bundles (e.g., .mlpackage for CoreML).
8
+ *
9
+ * Addons use this via `context.models.ensure(modelId, format)`.
10
+ */
11
+ export declare class ModelDownloadService implements IAddonModelManager {
12
+ private readonly modelsDir;
13
+ private readonly onProgress?;
14
+ private readonly catalog;
15
+ constructor(modelsDir: string, catalog: readonly ModelCatalogEntry[], onProgress?: ((modelId: string, downloaded: number, total: number) => void) | undefined);
16
+ /**
17
+ * Ensure a model (and its extra files) is downloaded.
18
+ * Returns the local filesystem path to the model file/directory.
19
+ */
20
+ ensure(modelId: string, format?: ModelFormat): Promise<string>;
21
+ /**
22
+ * Ensure extra files for a model are downloaded.
23
+ * Returns the local paths of all extra files.
24
+ */
25
+ ensureExtraFiles(modelId: string): Promise<readonly string[]>;
26
+ /** Absolute path to the shared models directory. */
27
+ getModelsDir(): string;
28
+ /** Check if a model file is already present on disk. */
29
+ isDownloaded(modelId: string, format?: ModelFormat): boolean;
30
+ /** Get the catalog entry for a model by ID. */
31
+ getEntry(modelId: string): ModelCatalogEntry | undefined;
32
+ private pickDefaultFormat;
33
+ private modelFilePath;
34
+ /**
35
+ * Download a directory bundle (e.g., .mlpackage) from HuggingFace.
36
+ * ATOMIC: downloads to temp dir, renames only on complete success.
37
+ */
38
+ private downloadDirectory;
39
+ /** Recursively list all files in a HuggingFace directory via API. */
40
+ private listHfFiles;
41
+ }
42
+ //# sourceMappingURL=model-download-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-download-service.d.ts","sourceRoot":"","sources":["../../src/download/model-download-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAKzF;;;;;;;;GAQG;AACH,qBAAa,oBAAqB,YAAW,kBAAkB;IAI3D,OAAO,CAAC,QAAQ,CAAC,SAAS;IAE1B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC;IAL9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwC;gBAG7C,SAAS,EAAE,MAAM,EAClC,OAAO,EAAE,SAAS,iBAAiB,EAAE,EACpB,UAAU,CAAC,GAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,aAAA;IAS5F;;;OAGG;IACG,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IAwDpE;;;OAGG;IACG,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC;IAkBnE,oDAAoD;IACpD,YAAY,IAAI,MAAM;IAItB,wDAAwD;IACxD,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO;IAmB5D,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAQxD,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,aAAa;IAUrB;;;OAGG;YACW,iBAAiB;IAgD/B,qEAAqE;YACvD,WAAW;CAwB1B"}
@@ -0,0 +1,32 @@
1
+ import { ModelCatalogEntry, ModelDownloadOptions, ModelDownloadResult, ModelFormat } from '@camstack/types';
2
+ /**
3
+ * Download a single file from a URL to a destination path.
4
+ * Uses native fetch() (Node 22+) which handles redirects natively.
5
+ * Streams to disk with optional progress callback.
6
+ * Returns the destination path. Skips download if file already exists.
7
+ */
8
+ export declare function downloadFile(url: string, destPath: string, onProgress?: (downloaded: number, total: number) => void): Promise<string>;
9
+ /**
10
+ * Fetch JSON from a URL using native fetch().
11
+ */
12
+ export declare function fetchJson(url: string): Promise<unknown>;
13
+ /**
14
+ * Download a model with fallback URLs and optional SHA256 verification.
15
+ * Legacy API preserved for backward compatibility -- delegates to downloadFile().
16
+ */
17
+ export declare function downloadModel(options: ModelDownloadOptions): Promise<ModelDownloadResult>;
18
+ /** Progress callback: (downloadedBytes, totalBytes | undefined) */
19
+ export type DownloadProgressCallback = (downloaded: number, total: number | undefined) => void;
20
+ /**
21
+ * Resolve a `ModelCatalogEntry` against `modelsDir`: download model file
22
+ * (or directory bundle) + extra files (labels JSON, charset dict, …),
23
+ * skip if already on disk. Returns the local model path.
24
+ */
25
+ export declare function ensureModel(modelsDir: string, entry: ModelCatalogEntry, format: ModelFormat, onProgress?: DownloadProgressCallback): Promise<string>;
26
+ /** Compute the on-disk path for a given model + format, even when not yet downloaded. */
27
+ export declare function getModelFilePath(modelsDir: string, entry: ModelCatalogEntry, format: ModelFormat): string | null;
28
+ /** True iff the model file (or `Manifest.json` for directory bundles) exists and is non-empty. */
29
+ export declare function isModelDownloaded(modelsDir: string, entry: ModelCatalogEntry, format: ModelFormat): boolean;
30
+ /** Remove the on-disk model file/directory. Returns true if something was deleted. */
31
+ export declare function deleteModelFromDisk(modelsDir: string, entry: ModelCatalogEntry, format: ModelFormat): boolean;
32
+ //# sourceMappingURL=model-downloader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-downloader.d.ts","sourceRoot":"","sources":["../../src/download/model-downloader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAehH;;;;;GAKG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GACvD,OAAO,CAAC,MAAM,CAAC,CAiDjB;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAS7D;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAsC/F;AAwBD,mEAAmE;AACnE,MAAM,MAAM,wBAAwB,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAA;AAkD9F;;;;GAIG;AACH,wBAAsB,WAAW,CAC/B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,WAAW,EACnB,UAAU,CAAC,EAAE,wBAAwB,GACpC,OAAO,CAAC,MAAM,CAAC,CAsCjB;AAED,yFAAyF;AACzF,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,WAAW,GAClB,MAAM,GAAG,IAAI,CAKf;AAED,kGAAkG;AAClG,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,WAAW,GAClB,OAAO,CAOT;AAED,sFAAsF;AACtF,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,WAAW,GAClB,OAAO,CAUT"}
@@ -0,0 +1,11 @@
1
+ type EventCallback<T = unknown> = (data: T) => void;
2
+ export declare class EventBus {
3
+ private listeners;
4
+ on<T = unknown>(event: string, callback: EventCallback<T>): () => void;
5
+ emit<T = unknown>(event: string, data: T): void;
6
+ once<T = unknown>(event: string, callback: EventCallback<T>): () => void;
7
+ removeAllListeners(event?: string): void;
8
+ listenerCount(event: string): number;
9
+ }
10
+ export {};
11
+ //# sourceMappingURL=event-bus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-bus.d.ts","sourceRoot":"","sources":["../../src/events/event-bus.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAA;AAEnD,qBAAa,QAAQ;IACnB,OAAO,CAAC,SAAS,CAAwC;IAEzD,EAAE,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IAOtE,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI;IAQ/C,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IAQxE,kBAAkB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAKxC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAGrC"}
@@ -0,0 +1,15 @@
1
+ import { EventSource, SystemEvent, EventFilter, IEventBus } from '@camstack/types';
2
+ export type { EventSource, SystemEvent, EventFilter };
3
+ export declare class SystemEventBus implements IEventBus {
4
+ private readonly ringBuffer;
5
+ private readonly subscribers;
6
+ constructor(bufferSize?: number);
7
+ emit(event: SystemEvent): void;
8
+ /**
9
+ * Subscribe to events matching a filter.
10
+ * When called with a typed category filter, the handler receives typed event data.
11
+ */
12
+ subscribe(filter: EventFilter, handler: (event: SystemEvent) => void): () => void;
13
+ getRecent(filter?: EventFilter, limit?: number): readonly SystemEvent[];
14
+ }
15
+ //# sourceMappingURL=system-event-bus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-event-bus.d.ts","sourceRoot":"","sources":["../../src/events/system-event-bus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,WAAW,EACX,SAAS,EACV,MAAM,iBAAiB,CAAA;AAExB,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,CAAA;AAsGrD,qBAAa,cAAe,YAAW,SAAS;IAC9C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAiB;IAC5C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmB;gBAEnC,UAAU,GAAE,MAAc;IAItC,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAgB9B;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GAAG,MAAM,IAAI;IAYjF,SAAS,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,WAAW,EAAE;CAGxE"}
@@ -0,0 +1,12 @@
1
+ import { FeatureManifest, FeatureFlag } from '@camstack/types';
2
+ export type { FeatureManifest, FeatureFlag };
3
+ export type FeatureConfigReader = {
4
+ readonly features: FeatureManifest;
5
+ };
6
+ export declare class FeatureManager {
7
+ private readonly configReader;
8
+ constructor(configReader: FeatureConfigReader);
9
+ isEnabled(flag: FeatureFlag): boolean;
10
+ getManifest(): FeatureManifest;
11
+ }
12
+ //# sourceMappingURL=feature-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-manager.d.ts","sourceRoot":"","sources":["../../src/feature/feature-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAEnE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,CAAA;AAE5C,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAA;CACnC,CAAA;AAED,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,mBAAmB;IAE9D,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO;IAIrC,WAAW,IAAI,eAAe;CAG/B"}
@@ -0,0 +1,164 @@
1
+ //#region src/logging/formatter.ts
2
+ var USE_COLOR = (() => {
3
+ try {
4
+ if (typeof process === "undefined") return false;
5
+ const env = process.env ?? {};
6
+ if (env["NO_COLOR"]) return false;
7
+ const force = env["FORCE_COLOR"];
8
+ if (force !== void 0) return force !== "" && force !== "0" && force !== "false";
9
+ return Boolean(process.stdout?.isTTY);
10
+ } catch {
11
+ return false;
12
+ }
13
+ })();
14
+ /** True when `NO_COLOR` is set — destinations that force colour on still honour this. */
15
+ var NO_COLOR = (() => {
16
+ try {
17
+ return Boolean(process?.env?.["NO_COLOR"]);
18
+ } catch {
19
+ return false;
20
+ }
21
+ })();
22
+ var RESET = "\x1B[0m";
23
+ var ANSI = {
24
+ green: "\x1B[32m",
25
+ yellow: "\x1B[33m",
26
+ red: "\x1B[31m",
27
+ cyan: "\x1B[36m",
28
+ gray: "\x1B[90m"
29
+ };
30
+ var COLOR_BY_LEVEL = {
31
+ debug: ANSI.gray,
32
+ info: ANSI.green,
33
+ warn: ANSI.yellow,
34
+ error: ANSI.red
35
+ };
36
+ function paint(color, text, enabled) {
37
+ return enabled ? `${color}${text}${RESET}` : text;
38
+ }
39
+ function colorizeLevel(level, text, enabled) {
40
+ if (!enabled) return text;
41
+ const code = COLOR_BY_LEVEL[level];
42
+ return code ? `${code}${text}${RESET}` : text;
43
+ }
44
+ /** Right-pad `value` to exactly `width` characters. */
45
+ function padRight(value, width) {
46
+ if (value.length >= width) return value.slice(0, width);
47
+ return value + " ".repeat(width - value.length);
48
+ }
49
+ /** Derive the agent — the top-level cluster node, never the forked-worker suffix. */
50
+ function resolveAgent(tags) {
51
+ const agentId = tags?.agentId;
52
+ if (typeof agentId === "string" && agentId.length > 0) return agentId;
53
+ const nodeId = tags?.nodeId;
54
+ if (typeof nodeId === "string" && nodeId.length > 0) return nodeId.includes("/") ? nodeId.split("/")[0] : nodeId;
55
+ return null;
56
+ }
57
+ /** Derive the addon — `tags.addonId` first; `system` when the tag is missing
58
+ * (scope is no longer a fallback — it's a sub-component label, not identity). */
59
+ function resolveAddon(entry) {
60
+ const addonId = entry.tags?.addonId;
61
+ if (typeof addonId === "string" && addonId.length > 0) return addonId;
62
+ return "system";
63
+ }
64
+ /** Device name (or `#id` fallback) — used inside the context bracket when present. */
65
+ function resolveDevice(tags) {
66
+ const name = tags?.deviceName;
67
+ if (typeof name === "string" && name.length > 0) return name;
68
+ const id = tags?.deviceId;
69
+ if (typeof id === "number" && Number.isFinite(id)) return `#${id}`;
70
+ return null;
71
+ }
72
+ /**
73
+ * Build the brand bracket content — `<agent>/<addonId>`. Agent is
74
+ * always shown (even `hub`) so operators never have to guess which
75
+ * node emitted a line. Falls back to `?/<addon>` when tags don't
76
+ * carry an agent id (pre-boot logs, test harnesses).
77
+ */
78
+ function buildBrand(entry) {
79
+ return `${resolveAgent(entry.tags) ?? "?"}/${resolveAddon(entry)}`;
80
+ }
81
+ /**
82
+ * Build the optional device-context bracket. Returns `null` when the
83
+ * line doesn't carry a device tag — renders as just the brand + message
84
+ * without the second bracket. With a device tag: `salone` / `#42`.
85
+ */
86
+ function buildDeviceContext(entry) {
87
+ return resolveDevice(entry.tags);
88
+ }
89
+ /**
90
+ * NestJS-style locale timestamp: `M/D/YYYY, H:MM:SS AM`. Built with
91
+ * `toLocaleString('en-US')` to match the default NestJS format that
92
+ * operators are used to from Nest boot output.
93
+ */
94
+ function formatTimestamp(value) {
95
+ return (value instanceof Date ? value : new Date(typeof value === "string" ? value : Date.now())).toLocaleString("en-US", {
96
+ month: "numeric",
97
+ day: "numeric",
98
+ year: "numeric",
99
+ hour: "numeric",
100
+ minute: "2-digit",
101
+ second: "2-digit",
102
+ hour12: true
103
+ });
104
+ }
105
+ /** Compact `{key=value key="with space"}` rendering of an arbitrary object. Empty → ''. */
106
+ function formatMeta(meta) {
107
+ if (!meta) return "";
108
+ const keys = Object.keys(meta);
109
+ if (keys.length === 0) return "";
110
+ const parts = [];
111
+ for (const key of keys) {
112
+ const value = meta[key];
113
+ parts.push(`${key}=${formatMetaValue(value)}`);
114
+ }
115
+ return `{${parts.join(" ")}}`;
116
+ }
117
+ function formatMetaValue(value) {
118
+ if (value === null) return "null";
119
+ if (value === void 0) return "undefined";
120
+ if (typeof value === "string") return /\s|"/.test(value) ? JSON.stringify(value) : value;
121
+ if (typeof value === "number" || typeof value === "boolean") return String(value);
122
+ if (value instanceof Error) return JSON.stringify(value.message);
123
+ try {
124
+ return JSON.stringify(value);
125
+ } catch {
126
+ return String(value);
127
+ }
128
+ }
129
+ /** Cached renderer PID — fallback when the entry doesn't carry its own `tags.pid`. */
130
+ var PID = typeof process !== "undefined" && typeof process.pid === "number" ? String(process.pid) : "?";
131
+ /**
132
+ * Render a `LogEntry` as one complete console line — no trailing newline.
133
+ * Caller appends `\n` (file sinks) or relies on `console.log` (stdout sink).
134
+ *
135
+ * PID column prefers `entry.tags.pid` when set (so forked-worker entries
136
+ * carry the worker's OS pid even when the hub renders them), falling back
137
+ * to the renderer's own `process.pid`.
138
+ *
139
+ * Colours (when enabled) follow the NestJS convention: the level token
140
+ * AND the message body share the level colour (green/yellow/red/gray for
141
+ * info/warn/error/debug). Brand, device context, scope and meta keep
142
+ * their fixed hues so the structural fields stay visually distinct from
143
+ * the message content.
144
+ */
145
+ function formatLogLine(entry, options) {
146
+ const colorize = (options?.colorize ?? USE_COLOR) && !NO_COLOR;
147
+ const levelColor = COLOR_BY_LEVEL[entry.level];
148
+ const brand = paint(ANSI.green, `[${buildBrand(entry)}]`, colorize);
149
+ const entryPid = entry.tags?.pid;
150
+ const pid = typeof entryPid === "number" ? String(entryPid) : PID;
151
+ const timestamp = formatTimestamp(entry.timestamp);
152
+ const level = colorizeLevel(entry.level, padRight(entry.level.toUpperCase(), 5), colorize);
153
+ const device = buildDeviceContext(entry);
154
+ const ctxPart = device ? " " + paint(ANSI.yellow, `[${device}]`, colorize) : "";
155
+ const scope = typeof entry.scope === "string" && entry.scope.length > 0 ? entry.scope : null;
156
+ const scopePart = scope ? " " + paint(ANSI.cyan, `(${scope})`, colorize) : "";
157
+ const metaText = formatMeta(entry.meta);
158
+ const metaPart = metaText ? " " + paint(ANSI.gray, metaText, colorize) : "";
159
+ return `${brand} ${pid} - ${timestamp} ${level}${ctxPart}${scopePart} ${colorize && levelColor ? `${levelColor}${entry.message}${RESET}` : entry.message}${metaPart}`;
160
+ }
161
+ //#endregion
162
+ export { formatLogLine as t };
163
+
164
+ //# sourceMappingURL=formatter-C-5An4Bl.mjs.map