@camstack/system 1.2.218 → 1.2.220

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 (97) hide show
  1. package/dist/addon-runner.js +2 -2
  2. package/dist/addon-runner.mjs +2 -2
  3. package/dist/addon-utils.js +2 -2
  4. package/dist/addon-utils.mjs +2 -2
  5. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  9. package/dist/builtins/alerts/alerts.addon.js +1 -1
  10. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  11. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  12. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  13. package/dist/builtins/console-logging/index.js +1 -1
  14. package/dist/builtins/console-logging/index.mjs +1 -1
  15. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  16. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  17. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  18. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  19. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  20. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  21. package/dist/builtins/hub-forwarder/index.js +1 -1
  22. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  23. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  24. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  25. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  26. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  27. package/dist/builtins/local-network/local-network.addon.js +2 -2
  28. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  29. package/dist/builtins/loki-logging/index.js +1 -1
  30. package/dist/builtins/loki-logging/index.mjs +1 -1
  31. package/dist/builtins/native-metrics/gpu-probe.d.ts +18 -0
  32. package/dist/builtins/native-metrics/native-metrics-provider.d.ts +1 -1
  33. package/dist/builtins/native-metrics/native-metrics.addon.d.ts +26 -3
  34. package/dist/builtins/native-metrics/native-metrics.addon.js +1320 -1093
  35. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1320 -1096
  36. package/dist/builtins/native-metrics/proc-process-table.d.ts +25 -0
  37. package/dist/builtins/platform-probe/index.js +3 -3
  38. package/dist/builtins/platform-probe/index.mjs +3 -3
  39. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  40. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  41. package/dist/builtins/snapshot/index.js +1 -1
  42. package/dist/builtins/snapshot/index.mjs +1 -1
  43. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  44. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  45. package/dist/builtins/sqlite-storage/sqlite-pragmas.d.ts +23 -0
  46. package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +1 -1
  47. package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +1 -0
  48. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  49. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  50. package/dist/builtins/sqlite-storage/wal-checkpoint-policy.d.ts +115 -0
  51. package/dist/builtins/sqlite-storage/wal-checkpoint-worker.d.ts +1 -0
  52. package/dist/builtins/sqlite-storage/wal-checkpointer.d.ts +70 -0
  53. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  54. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  55. package/dist/builtins/system-config/system-config.addon.js +1 -1
  56. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  57. package/dist/builtins/winston-logging/index.js +1 -1
  58. package/dist/builtins/winston-logging/index.mjs +1 -1
  59. package/dist/{custom-action-registry-BDwM5qAK.js → custom-action-registry-B42MC_Pv.js} +1 -1
  60. package/dist/{custom-action-registry-CsONUlhC.mjs → custom-action-registry-CpR58DXT.mjs} +1 -1
  61. package/dist/{dist-DigmGsQS.mjs → dist-Ca_jaxXs.mjs} +232 -4
  62. package/dist/{dist-BOlMCOeT.js → dist-CllKpcTd.js} +232 -4
  63. package/dist/index.d.ts +6 -1
  64. package/dist/index.js +99 -65
  65. package/dist/index.mjs +84 -67
  66. package/dist/kernel/gc-census.d.ts +144 -0
  67. package/dist/kernel/heap-watch.d.ts +32 -1
  68. package/dist/kernel/moleculer/mesh-queue-report.d.ts +51 -0
  69. package/dist/kernel/outbound-queue-watch.d.ts +94 -0
  70. package/dist/kernel/socket-plane-report.d.ts +112 -4
  71. package/dist/kernel/transport/cap-action-census.d.ts +218 -0
  72. package/dist/kernel/transport/cap-child-index.d.ts +49 -0
  73. package/dist/kernel/transport/cap-routing-hints.d.ts +21 -0
  74. package/dist/kernel/transport/child-cap-protocol.d.ts +28 -2
  75. package/dist/kernel/transport/frame-codec.d.ts +49 -0
  76. package/dist/kernel/transport/index.d.ts +2 -0
  77. package/dist/kernel/transport/local-child-client.d.ts +7 -0
  78. package/dist/kernel/transport/local-child-registry.d.ts +99 -5
  79. package/dist/kernel/transport/local-transport.d.ts +54 -2
  80. package/dist/kernel/transport/socket-channel.d.ts +40 -1
  81. package/dist/{manifest-system-deps-Bo92lg5u.js → manifest-system-deps-DfpwaXkh.js} +1725 -614
  82. package/dist/{manifest-system-deps-D--wyMD9.mjs → manifest-system-deps-iadzxSBr.mjs} +1850 -841
  83. package/dist/process/proc-stat.d.ts +75 -0
  84. package/dist/process/resource-monitor.d.ts +9 -1
  85. package/dist/{resource-monitor-CdnzxBLP.js → resource-monitor-LVE1BoLs.js} +42 -23
  86. package/dist/{resource-monitor-BWmQ5i-o.mjs → resource-monitor-Vp0bPV3U.mjs} +42 -22
  87. package/dist/{retired-settings-keys-xEAlYnv7.js → retired-settings-keys-7iEsSzmD.js} +1 -1
  88. package/dist/{retired-settings-keys-vK_U-CG2.mjs → retired-settings-keys-DQnfr__p.mjs} +1 -1
  89. package/dist/wal-checkpoint-policy-CAcg63o-.mjs +92 -0
  90. package/dist/wal-checkpoint-policy-CCJZngds.js +127 -0
  91. package/dist/wal-checkpoint-worker.js +138 -0
  92. package/dist/wal-checkpoint-worker.mjs +137 -0
  93. package/package.json +1 -1
  94. package/dist/{event-loop-stall-monitor-DM9OAzy8.js → event-loop-stall-monitor-CAsHdMwP.js} +1 -1
  95. package/dist/{event-loop-stall-monitor-B3CFd9tM.mjs → event-loop-stall-monitor-GPrVvx14.mjs} +1 -1
  96. package/dist/{tls-DOTmtLCW.mjs → tls-2xbgg78V.mjs} +2 -2
  97. package/dist/{tls-BxQlomxd.js → tls-BFs4PzoW.js} +2 -2
@@ -1,5 +1,6 @@
1
1
  import { Socket } from 'node:net';
2
- import { LocalChannel, RequestHandler, EventHandler } from './local-transport.js';
2
+ import { CapActionChannelObserver } from './cap-action-census.js';
3
+ import { EventHandler, LocalChannel, RequestHandler } from './local-transport.js';
3
4
  import { SocketTrafficSample } from './socket-traffic.js';
4
5
  /**
5
6
  * Default bound on one UDS request, when the caller names none.
@@ -16,6 +17,8 @@ export declare const DEFAULT_UDS_REQUEST_TIMEOUT_MS = 60000;
16
17
  export interface SocketRequestOptions {
17
18
  /** Bound in ms; `0` or negative disables the timer entirely. */
18
19
  readonly timeoutMs?: number;
20
+ /** Opaque bytes carried beside the body — see `LocalRequestOptions.payload`. */
21
+ readonly payload?: Uint8Array;
19
22
  }
20
23
  export declare class SocketChannel implements LocalChannel {
21
24
  private readonly socket;
@@ -32,6 +35,8 @@ export declare class SocketChannel implements LocalChannel {
32
35
  private readonly txCounters;
33
36
  /** Frames read from the peer, cumulative, split by kind. */
34
37
  private readonly rxCounters;
38
+ /** See {@link CapActionChannelObserver}. Absent = no per-action census. */
39
+ private actionObserver;
35
40
  constructor(socket: Socket);
36
41
  /**
37
42
  * Send a request and wait for the peer's response.
@@ -46,6 +51,20 @@ export declare class SocketChannel implements LocalChannel {
46
51
  */
47
52
  request(body: unknown, opts?: SocketRequestOptions): Promise<unknown>;
48
53
  emit(body: unknown): void;
54
+ /**
55
+ * Wire the per-action census. Only one observer is active at a time; an
56
+ * unwired channel records nothing at all (never zeros).
57
+ */
58
+ observeActions(observer: CapActionChannelObserver): void;
59
+ /**
60
+ * The label for one envelope, or `undefined` when there is nothing to
61
+ * record. Wrapped: a broken labeller must never fail the call it watches —
62
+ * the same discipline `LocalChildRegistry.recordCapUsage` applies, and for
63
+ * the same reason.
64
+ */
65
+ private labelSafely;
66
+ /** Settle one request/response pair on the census. Never throws. */
67
+ private recordAction;
49
68
  /** Replace the request handler. Only one handler is active at a time. */
50
69
  onRequest(handler: RequestHandler): void;
51
70
  /** Replace the event handler. Only one handler is active at a time. */
@@ -61,6 +80,26 @@ export declare class SocketChannel implements LocalChannel {
61
80
  * 22 500 writes/s") and not a total since boot.
62
81
  */
63
82
  readTraffic(): SocketTrafficSample;
83
+ /**
84
+ * Bytes handed to the socket that the kernel has not taken yet — the
85
+ * `Writable` buffer plus the write in flight. Read LIVE, never cached: this
86
+ * is the number that says whether the peer is draining what we write, and
87
+ * it is read on every heartbeat probe (D446). An unref'd socket keeps it
88
+ * exactly like a ref'd one, which is why it is read here and not summed
89
+ * over `_getActiveHandles()`.
90
+ */
91
+ queuedBytes(): number;
92
+ /**
93
+ * Write one frame. With a payload the head and the tail are two `write`
94
+ * calls under `cork()` — the kernel sees one `writev`, and the payload bytes
95
+ * are never copied into the head. A forwarded payload is a view into the
96
+ * frame it arrived on, and that frame's buffer is never mutated, so handing
97
+ * the view to the socket is safe.
98
+ *
99
+ * Returns the on-the-wire bytes it charged — the same number the per-kind
100
+ * counter got, so the per-action census can never disagree with the per-peer
101
+ * one. `0` when the channel is closed and nothing was written.
102
+ */
64
103
  private send;
65
104
  private onData;
66
105
  /**