@camstack/system 1.2.87 → 1.2.89

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 (52) hide show
  1. package/dist/addon-runner.js +52 -6
  2. package/dist/addon-runner.mjs +52 -6
  3. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  11. package/dist/builtins/console-logging/index.js +1 -1
  12. package/dist/builtins/console-logging/index.mjs +1 -1
  13. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  14. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  15. package/dist/builtins/device-manager/device-manager.addon.js +1 -1
  16. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  17. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  18. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  19. package/dist/builtins/hub-forwarder/index.js +1 -1
  20. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  21. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  22. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  23. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  24. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  25. package/dist/builtins/local-network/local-network.addon.js +1 -1
  26. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  27. package/dist/builtins/loki-logging/index.js +1 -1
  28. package/dist/builtins/loki-logging/index.mjs +1 -1
  29. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  30. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  31. package/dist/builtins/platform-probe/index.js +1 -1
  32. package/dist/builtins/platform-probe/index.mjs +1 -1
  33. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  34. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  35. package/dist/builtins/snapshot/index.js +1 -1
  36. package/dist/builtins/snapshot/index.mjs +1 -1
  37. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  38. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  39. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +1 -1
  40. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
  41. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  42. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  43. package/dist/builtins/system-config/system-config.addon.js +1 -1
  44. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  45. package/dist/builtins/winston-logging/index.js +1 -1
  46. package/dist/builtins/winston-logging/index.mjs +1 -1
  47. package/dist/{dist-CuAaqtdt.mjs → dist-Bij6agsS.mjs} +1968 -38
  48. package/dist/{dist-D4nuaPdd.js → dist-Dq0ebOuS.js} +1968 -38
  49. package/dist/index.js +1 -1
  50. package/dist/index.mjs +1 -1
  51. package/dist/kernel/moleculer/init-watchdog.d.ts +60 -0
  52. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-Cek0wNdY.js");
3
- const require_dist = require("./dist-D4nuaPdd.js");
3
+ const require_dist = require("./dist-Dq0ebOuS.js");
4
4
  const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
5
5
  require("./builtins/alerts/index.js");
6
6
  const require_formatter = require("./formatter-DqAKDlvN.js");
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM$1, r as __exportAll, t as __commonJSMin$1 } from "./chunk-CNf5ZN-e.mjs";
2
- import { $ as objectInputDeclaresAddonId, At as createEvent, B as isArrayOutputSchema, Bt as resolveCapMount, Dt as asJsonObject$1, G as kebabToCamel, H as isObjectInput, K as lifecycleJobSchema, Lt as parseJsonObject, Nt as expandCapMethods, Ot as asNumber, R as extractNestedAddonId, Rt as parseJsonUnknown$1, Tt as ReadinessTimeoutError, Ut as EventCategory$1, V as isCollectionArrayMethod, Vt as scopeKey, W as isVoidInput, X as looseSchema, Y as logLevelAtMost, at as scopesAllowDeviceCap, bt as DEVICE_STATUS_METHOD, d as METHOD_ACCESS_MAP, f as RUNTIME_DEFAULTS, gt as errMsg$1, it as scopesAllowAddon, jt as emitDownForOwnedCaps, kt as asString$1, nt as procedureAuthKey, t as ALL_CAPABILITY_DEFINITIONS, vt as DATAPLANE_SECRET_HEADER$1, wt as ReadinessRegistry, y as addonSettingsCapability, yt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, zt as readinessKey } from "./dist-CuAaqtdt.mjs";
2
+ import { $ as objectInputDeclaresAddonId, At as createEvent, B as isArrayOutputSchema, Bt as resolveCapMount, Dt as asJsonObject$1, G as kebabToCamel, H as isObjectInput, K as lifecycleJobSchema, Lt as parseJsonObject, Nt as expandCapMethods, Ot as asNumber, R as extractNestedAddonId, Rt as parseJsonUnknown$1, Tt as ReadinessTimeoutError, Ut as EventCategory$1, V as isCollectionArrayMethod, Vt as scopeKey, W as isVoidInput, X as looseSchema, Y as logLevelAtMost, at as scopesAllowDeviceCap, bt as DEVICE_STATUS_METHOD, d as METHOD_ACCESS_MAP, f as RUNTIME_DEFAULTS, gt as errMsg$1, it as scopesAllowAddon, jt as emitDownForOwnedCaps, kt as asString$1, nt as procedureAuthKey, t as ALL_CAPABILITY_DEFINITIONS, vt as DATAPLANE_SECRET_HEADER$1, wt as ReadinessRegistry, y as addonSettingsCapability, yt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, zt as readinessKey } from "./dist-Bij6agsS.mjs";
3
3
  import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
4
4
  import "./builtins/alerts/index.mjs";
5
5
  import { t as formatLogLine } from "./formatter-B7qW8bPJ.mjs";
@@ -0,0 +1,60 @@
1
+ /**
2
+ * The initialize() stall watchdog.
3
+ *
4
+ * ## What it is guarding
5
+ *
6
+ * A runner publishes its capability manifest ONLY once every hosted addon's
7
+ * `initialize()` has returned: `addon-runner.ts` appends to `runnerManifest`
8
+ * AFTER the await, and `refreshChildCaps('post-init')` runs after the whole
9
+ * loop. So an `initialize()` that does not return is not a slow feature — it
10
+ * takes every capability that addon owns OFF the cluster. Callers get
11
+ * `no provider registered for cap "…"`, and the admin UI renders "provider not
12
+ * available".
13
+ *
14
+ * ## Why a log line and not a bound
15
+ *
16
+ * 2026-08-14: `pipeline-analytics` awaited a timelapse back-fill render inside
17
+ * `initialize()`. The window was 19:00→05:00, the export rendered for over half
18
+ * an hour, and for that whole time `notification-rules`, `pipeline-analytics`,
19
+ * `zone-analytics`, `audio-metrics`, `videoclips`, `face-gallery`,
20
+ * `plate-gallery` and `addon-widgets-source` had ZERO providers cluster-wide.
21
+ * The runner was healthy and chatty throughout — its 30 s tick kept logging —
22
+ * which is exactly why nothing looked wrong. Not one line said the manifest had
23
+ * never been published, and the diagnosis cost hours of log correlation.
24
+ *
25
+ * Killing the runner mid-init would be worse than the stall (a half-initialised
26
+ * addon respawning in a loop), so this does not bound anything. It makes the
27
+ * stall NAMED, periodic, and attributable to the addon and the exact
28
+ * capabilities it is holding hostage — which is the one thing that was missing.
29
+ */
30
+ /** First warning after this long without `initialize()` returning. */
31
+ export declare const INIT_WATCHDOG_FIRST_MS = 60000;
32
+ /** And every this often afterwards, for as long as it stays stuck. */
33
+ export declare const INIT_WATCHDOG_REPEAT_MS = 300000;
34
+ /** The warn sink — narrow on purpose, so this module needs no logger type. */
35
+ export type InitWatchdogWarn = (message: string, meta: Record<string, unknown>) => void;
36
+ export interface InitWatchdogOptions {
37
+ /** The addon whose `initialize()` is being awaited. */
38
+ readonly addonId: string;
39
+ /**
40
+ * The capability names the addon's manifest declares. They are what the
41
+ * cluster is missing while the stall lasts, so they belong in the line — a
42
+ * reader must not have to open the manifest to learn what is offline.
43
+ */
44
+ readonly declaredCapabilities: readonly string[];
45
+ readonly warn: InitWatchdogWarn;
46
+ readonly now?: () => number;
47
+ readonly firstMs?: number;
48
+ readonly repeatMs?: number;
49
+ }
50
+ export interface InitWatchdogHandle {
51
+ /** Stop warning. Safe to call more than once, and after the last warning. */
52
+ clear(): void;
53
+ }
54
+ /**
55
+ * Start warning if `initialize()` has not returned within `firstMs`.
56
+ *
57
+ * The caller MUST `clear()` in a `finally`, so a throwing initialize (which the
58
+ * runner turns into `process.exit(1)`) does not keep the timer alive.
59
+ */
60
+ export declare function startInitWatchdog(options: InitWatchdogOptions): InitWatchdogHandle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.87",
3
+ "version": "1.2.89",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",