@camstack/system 1.2.471 → 1.2.472

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 (90) hide show
  1. package/dist/addon-runner.js +202 -8
  2. package/dist/addon-runner.mjs +203 -9
  3. package/dist/addon-utils.mjs +1 -1
  4. package/dist/{agent-https-DHBvFZJS.mjs → agent-https-JhvY1axF.mjs} +1 -1
  5. package/dist/{agent-https-bH6bKDeK.js → agent-https-bnyFRK7Y.js} +1 -1
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  7. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  9. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
  10. package/dist/builtins/alerts/alerts.addon.js +1 -1
  11. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  12. package/dist/builtins/autotrack/index.js +1 -1
  13. package/dist/builtins/autotrack/index.mjs +1 -1
  14. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  15. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
  16. package/dist/builtins/calendars/calendars.addon.js +1 -1
  17. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  18. package/dist/builtins/camera-grid/index.js +1 -1
  19. package/dist/builtins/camera-grid/index.mjs +1 -1
  20. package/dist/builtins/composer/composer.addon.js +2 -2
  21. package/dist/builtins/composer/composer.addon.mjs +2 -2
  22. package/dist/builtins/console-logging/index.js +1 -1
  23. package/dist/builtins/console-logging/index.mjs +1 -1
  24. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  25. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  26. package/dist/builtins/device-history/device-history.addon.js +1 -1
  27. package/dist/builtins/device-history/device-history.addon.mjs +1 -1
  28. package/dist/builtins/device-manager/device-manager.addon.js +1 -1
  29. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  30. package/dist/builtins/hub-forwarder/index.js +1 -1
  31. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  32. package/dist/builtins/keychain/index.js +3 -3
  33. package/dist/builtins/keychain/index.mjs +3 -3
  34. package/dist/builtins/liveness-monitor/liveness-monitor.addon.d.ts +9 -25
  35. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +240 -39
  36. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +237 -38
  37. package/dist/builtins/liveness-monitor/liveness-reporter.d.ts +28 -0
  38. package/dist/builtins/liveness-monitor/storage-root-access.d.ts +53 -0
  39. package/dist/builtins/local-auth/local-auth.addon.js +2 -2
  40. package/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
  41. package/dist/builtins/local-network/local-network.addon.js +2 -2
  42. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  43. package/dist/builtins/loki-logging/index.js +1 -1
  44. package/dist/builtins/loki-logging/index.mjs +1 -1
  45. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  46. package/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  47. package/dist/builtins/platform-probe/index.js +1 -1
  48. package/dist/builtins/platform-probe/index.mjs +8 -8
  49. package/dist/builtins/record-entries/index.js +1 -1
  50. package/dist/builtins/record-entries/index.mjs +1 -1
  51. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  52. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  53. package/dist/builtins/snapshot/index.js +1 -1
  54. package/dist/builtins/snapshot/index.mjs +1 -1
  55. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  56. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  57. package/dist/builtins/sqlite-storage/index.js +1 -1
  58. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  59. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
  60. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
  61. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  62. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  63. package/dist/builtins/system-config/system-config.addon.js +3 -3
  64. package/dist/builtins/system-config/system-config.addon.mjs +115 -115
  65. package/dist/builtins/winston-logging/index.js +1 -1
  66. package/dist/builtins/winston-logging/index.mjs +1 -1
  67. package/dist/{composition-sources-DRw_vBKH.mjs → composition-sources-BY6rFuAE.mjs} +1 -1
  68. package/dist/{composition-sources-B5uJZXZ1.js → composition-sources-D3h-tNoJ.js} +1 -1
  69. package/dist/{constants-CToE4OFp.js → constants-CqbO6e9i.js} +1 -1
  70. package/dist/{constants-5lA8Z9d8.mjs → constants-zBiEodEM.mjs} +1 -1
  71. package/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
  72. package/dist/{custom-action-registry-BGYDjTqY.mjs → custom-action-registry-DZSCLBuT.mjs} +37 -37
  73. package/dist/{device-ca-URrs1lxK.mjs → device-ca-BWTWWBcc.mjs} +1 -1
  74. package/dist/{device-ca-nOCYVFS4.js → device-ca-CfiIg3a9.js} +1 -1
  75. package/dist/{dist-5XUG7iYJ.mjs → dist-CdFkkmXW.mjs} +100 -254
  76. package/dist/{dist-BjcWEfRy.js → dist-DX5Fu3mV.js} +100 -254
  77. package/dist/file-host-worker.js +1 -1
  78. package/dist/file-host-worker.mjs +1 -1
  79. package/dist/{hub-mdns-ciao-vEWhJ_SD.js → hub-mdns-ciao-C174UDzO.js} +2 -2
  80. package/dist/{hub-mdns-ciao-zD3JojB_.mjs → hub-mdns-ciao-CYp1Gipm.mjs} +2 -2
  81. package/dist/index.js +234 -16
  82. package/dist/index.mjs +453 -235
  83. package/dist/kernel/hwaccel/hwaccel-resolver.d.ts +24 -4
  84. package/dist/kernel/hwaccel/vaapi-init-probe.d.ts +29 -0
  85. package/dist/kernel/moleculer/runner-process-group.d.ts +4 -0
  86. package/dist/{restore-archive-B64m2nAj.js → restore-archive-B2jIFfu_.js} +1 -1
  87. package/dist/{restore-archive-CN1pJTRn.mjs → restore-archive-BX0gaKtG.mjs} +94 -94
  88. package/dist/{wal-maintenance-BNXVX-ot.js → wal-maintenance-Dxqd5igw.js} +0 -0
  89. package/dist/{wal-maintenance-Bl2I-ZcR.mjs → wal-maintenance-KHzJXlF2.mjs} +0 -0
  90. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
- import type { CoralInfo, HwAccelBackend, HwAccelResolution } from "@camstack/types";
1
+ import type { CoralInfo, HwAccelBackend, HwAccelResolution, IKernelHwAccel, IScopedLogger } from "@camstack/types";
2
+ import { type VaapiInitStatus } from "./vaapi-init-probe.js";
2
3
  export interface PlatformSignals {
3
4
  readonly platform: NodeJS.Platform;
4
5
  readonly arch: string;
@@ -17,6 +18,13 @@ export interface PlatformSignals {
17
18
  }
18
19
  export declare function probePlatform(): PlatformSignals;
19
20
  /**
21
+ * The preference list for these signals. A `vaapi` verdict of `init-failed`
22
+ * (libva cannot initialise the driver — D926) removes every libva-backed
23
+ * backend and names the cause in the rationale; `ok`, `unknown` or `null`
24
+ * change nothing.
25
+ */
26
+ export declare function pickBackendsForPlatform(signals: PlatformSignals, vaapi?: VaapiInitStatus | null): HwAccelResolution;
27
+ /**
20
28
  * Resolve the preferred hardware acceleration backend order for the
21
29
  * current host.
22
30
  *
@@ -28,9 +36,21 @@ export declare function probePlatform(): PlatformSignals;
28
36
  * When no override is set, platform signals drive the order.
29
37
  */
30
38
  export declare function resolveHwAccel(prefer?: HwAccelBackend | "none" | null): HwAccelResolution;
39
+ export interface VaapiReportOnce {
40
+ reported: boolean;
41
+ }
42
+ export interface KernelHwAccelOptions {
43
+ /** Where the one ERROR line about a VA driver libva cannot load goes. */
44
+ readonly logger?: IScopedLogger;
45
+ /** Test seams; default to the real host probes. */
46
+ readonly probeSignals?: () => PlatformSignals;
47
+ readonly probeVaapi?: (renderNode: string) => Promise<VaapiInitStatus>;
48
+ readonly reportOnce?: VaapiReportOnce;
49
+ }
31
50
  /**
32
51
  * Build the `IKernelHwAccel` provider used to populate `ctx.kernel.hwaccel`.
33
- * Thin async wrapper around the sync `resolveHwAccel` function so the
34
- * contract matches the per-node `$hwaccel.resolve` Moleculer action.
52
+ * An auto resolve on a Linux host with a render node asks libva ONCE per
53
+ * provider whether it can initialise the driver (D926); an explicit override
54
+ * is never second-guessed.
35
55
  */
36
- export declare function createKernelHwAccel(): import("@camstack/types").IKernelHwAccel;
56
+ export declare function createKernelHwAccel(options?: KernelHwAccelOptions): IKernelHwAccel;
@@ -0,0 +1,29 @@
1
+ export type VaapiInitState = "ok" | "init-failed" | "unknown";
2
+ export interface VaapiInitStatus {
3
+ readonly state: VaapiInitState;
4
+ /** One line for logs and the resolver rationale, e.g. `vaapi: init-failed (…)`. */
5
+ readonly summary: string;
6
+ /** The VA-API version libva speaks (`1.20`), when vainfo said so. */
7
+ readonly vaApiVersion: string | null;
8
+ /** The driver libva tried to open, when vainfo said so. */
9
+ readonly driverPath: string | null;
10
+ /** The newest VA-API the driver's exported init symbol asks for (`1.22`). */
11
+ readonly driverNeedsVaApi: string | null;
12
+ }
13
+ export interface VainfoRun {
14
+ readonly exitCode: number | null;
15
+ readonly output: string;
16
+ /** Set when vainfo could not be run at all (ENOENT, timeout). */
17
+ readonly spawnError: string | null;
18
+ }
19
+ /** Classify one vainfo run plus the driver's exported init symbols. Pure. */
20
+ export declare function classifyVainfo(run: VainfoRun, driverSymbols: readonly string[]): VaapiInitStatus;
21
+ /** Run `vainfo` against one render node; never throws. */
22
+ export declare function runVainfo(renderNode: string): Promise<VainfoRun>;
23
+ /**
24
+ * The `__vaDriverInit_N_M` names in a driver file, streamed (iHD is ~43 MB),
25
+ * with an overlap so a name split across two chunks is still found.
26
+ */
27
+ export declare function readDriverInitSymbols(driverPath: string): Promise<readonly string[]>;
28
+ /** Probe one render node: vainfo, and on failure the driver's init symbols. */
29
+ export declare function probeVaapiInit(renderNode: string): Promise<VaapiInitStatus>;
@@ -62,6 +62,10 @@ export declare function releaseRunnerGroup(pgid: number): void;
62
62
  * Returns how many groups were signalled.
63
63
  */
64
64
  export declare function signalAllRunnerGroups(signal: NodeJS.Signals): number;
65
+ export declare function beginRunnerShutdown(): void;
66
+ export declare function isRunnerShutdownInProgress(): boolean;
67
+ /** Test seam: forget a shutdown a previous case began (one process hosts every spec). */
68
+ export declare function resetRunnerShutdownForTests(): void;
65
69
  /** Test seam: the groups currently owned, by pgid. */
66
70
  export declare function ownedRunnerGroupIds(): readonly number[];
67
71
  export interface RunnerParentDeathWatchdogOptions {
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-BjcWEfRy.js");
2
+ const require_dist = require("./dist-DX5Fu3mV.js");
3
3
  let zod = require("zod");
4
4
  let node_crypto = require("node:crypto");
5
5
  let buffer = require("buffer");