@camstack/system 1.2.354 → 1.2.356
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.
- package/dist/addon-runner.js +1 -1
- package/dist/addon-runner.mjs +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/calendars/calendar-prefs-store.d.ts +7 -0
- package/dist/builtins/calendars/calendars.addon.js +3 -2
- package/dist/builtins/calendars/calendars.addon.mjs +3 -2
- package/dist/builtins/camera-grid/grid-activity-mirror.d.ts +12 -2
- package/dist/builtins/camera-grid/index.js +15 -3
- package/dist/builtins/camera-grid/index.mjs +15 -3
- package/dist/builtins/composer/composer.addon.js +53 -12
- package/dist/builtins/composer/composer.addon.mjs +53 -12
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/block-settings-store.d.ts +5 -0
- package/dist/builtins/core-blocks/core-blocks.addon.js +7 -2
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +7 -2
- package/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/analyze-stats.d.ts +0 -2
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +9 -11
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{child-cap-dispatch-C1x1kNJK.mjs → child-cap-dispatch-BcRHQBKW.mjs} +28 -81
- package/dist/{child-cap-dispatch-CRqYKHAb.js → child-cap-dispatch-wbIQJctP.js} +27 -86
- package/dist/{composition-sources-DzkEFd8q.mjs → composition-sources-BBfqepyT.mjs} +1 -1
- package/dist/{composition-sources-0nuWOdNd.js → composition-sources-CeO0K2cl.js} +1 -1
- package/dist/{dist-DVyXxn41.mjs → dist-B7WRgEZY.mjs} +82 -49
- package/dist/{dist-DePB7uwU.js → dist-CFVOy8VT.js} +87 -48
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -46
- package/dist/index.mjs +19 -46
- package/dist/kernel/event-plane-report.d.ts +7 -36
- package/dist/kernel/fs-utils.d.ts +1 -5
- package/dist/kernel/heap-spaces.d.ts +2 -23
- package/dist/kernel/index.d.ts +0 -2
- package/dist/kernel/moleculer/event-bus-core.d.ts +6 -28
- package/dist/kernel/moleculer/process-service.d.ts +2 -5
- package/dist/kernel/moleculer/runner-native-allocator.d.ts +1 -6
- package/dist/kernel/transport/index.d.ts +1 -1
- package/dist/kernel/transport/local-child-registry.d.ts +8 -41
- package/dist/kernel/transport/uds-event-bridge.d.ts +2 -2
- package/dist/{retired-settings-keys-BTKZdPn6.js → retired-settings-keys-CRlTzxaS.js} +1 -1
- package/dist/{retired-settings-keys-DFur4hJF.mjs → retired-settings-keys-DKRjfz0U.mjs} +1 -1
- package/package.json +1 -1
- package/dist/kernel/heap-allocation-sample.d.ts +0 -107
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Cr as EventCategory, Qn as BaseAddon, Ut as localNetworkCapability, an as pickAppLinkHub, s as CAMSTACK_APP_LINK_ORIGIN } from "../../dist-B7WRgEZY.mjs";
|
|
2
2
|
import { S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, i as writeExtraSans, l as reissueTlsLeaf, n as readTlsAccessStatus, o as validateUploadedTls, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, y as applyLanHttp } from "../../tls-DTlVWwAI.mjs";
|
|
3
3
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CFVOy8VT.js");
|
|
7
7
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
8
8
|
/**
|
|
9
9
|
* Loki rejects a label name that is not a valid Prometheus label
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Gt as logDestinationCapability, Qn as BaseAddon } from "../../dist-B7WRgEZY.mjs";
|
|
2
2
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
3
3
|
/**
|
|
4
4
|
* Loki rejects a label name that is not a valid Prometheus label
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CFVOy8VT.js");
|
|
7
7
|
const require_proc_stat = require("../../proc-stat-DL-WUOhl.js");
|
|
8
8
|
let node_fs_promises = require("node:fs/promises");
|
|
9
9
|
let node_os = require("node:os");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Cr as EventCategory, Qn as BaseAddon, Zn as errMsg, Zt as metricsProviderCapability, cr as createEvent, fn as resolveBucketMs, jt as foldSnapshotByFunction, un as reducePoints } from "../../dist-B7WRgEZY.mjs";
|
|
2
2
|
import { a as parseProcStat, i as nodeProcReader, n as elapsedSecSince, o as parseProcStatusRss, r as lifetimeCpuPercent, t as commandFromCmdline } from "../../proc-stat-CbC55Kqi.mjs";
|
|
3
3
|
import { access, readFile, readdir } from "node:fs/promises";
|
|
4
4
|
import * as os from "node:os";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CFVOy8VT.js");
|
|
7
7
|
let node_os = require("node:os");
|
|
8
8
|
node_os = require_chunk.__toESM(node_os);
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { Cr as EventCategory, Qn as BaseAddon, St as enumerateInferenceDevices, Zn as errMsg, bn as scoreRuntimes, sn as platformProbeCapability, ur as emitReadiness } from "../../dist-B7WRgEZY.mjs";
|
|
3
3
|
import * as os from "node:os";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import { execFile } from "node:child_process";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CFVOy8VT.js");
|
|
7
7
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
8
8
|
/**
|
|
9
9
|
* Reconcile the durable `enabledProviders` set against authoritative
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Cr as EventCategory, Qn as BaseAddon } from "../../dist-B7WRgEZY.mjs";
|
|
2
2
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
3
3
|
/**
|
|
4
4
|
* Reconcile the durable `enabledProviders` set against authoritative
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CFVOy8VT.js");
|
|
7
7
|
const require_snapshot_courtesy = require("../../snapshot-courtesy-D_C5-nC0.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Cn as snapshotCapability, Cr as EventCategory, Jn as DeviceFeature, Qn as BaseAddon, X as batteryCapability, Xn as DeviceType, Xt as memoizePinnedFfmpeg, Y as bareAddonId, Zn as errMsg, a as BatteryStatusSchema, gt as deriveBatteryPresence, hr as nodePin, kn as streamQualityLabel } from "../../dist-B7WRgEZY.mjs";
|
|
2
2
|
import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg } from "../../snapshot-courtesy-CyFs1M3I.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -8,8 +8,6 @@ import { Database } from 'better-sqlite3';
|
|
|
8
8
|
* the cluster is serving before the engine goes quiet.
|
|
9
9
|
*/
|
|
10
10
|
export declare const ANALYZE_DELAY_MS = 120000;
|
|
11
|
-
/** Env var that disables the one-shot analysis. `off` is the only value read. */
|
|
12
|
-
export declare const ANALYZE_ENV_VAR = "CAMSTACK_SQLITE_ANALYZE";
|
|
13
11
|
/** What {@link runAnalyzeIfMissing} did, for the caller to log. */
|
|
14
12
|
export type AnalyzeOutcome = {
|
|
15
13
|
readonly kind: 'already-present';
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CFVOy8VT.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let node_fs_promises = require("node:fs/promises");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as filesystemBrowseCapability, Dn as storageProviderCapability, Qn as BaseAddon } from "../../dist-B7WRgEZY.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -369,15 +369,6 @@ export declare class SqliteSettingsBackend implements ISettingsBackend {
|
|
|
369
369
|
* with a number yields 0, which `sqliteOccupancy` reads as "unknown" and
|
|
370
370
|
* reports as an empty file rather than inventing a ratio.
|
|
371
371
|
*/
|
|
372
|
-
/**
|
|
373
|
-
* Name the biggest tables, once, a minute after the connection opens.
|
|
374
|
-
*
|
|
375
|
-
* `dbSizeMb` says how big the file is and `freePct` says how much of it is
|
|
376
|
-
* live; neither says WHOSE. Per-addon scoped collections are created on first
|
|
377
|
-
* write and declared nowhere, so this is the only place the real set can be
|
|
378
|
-
* enumerated. `unref` so it can never hold the process open, and
|
|
379
|
-
* `CAMSTACK_SQLITE_STORAGE_REPORT=off` turns it off without a rebuild.
|
|
380
|
-
*/
|
|
381
372
|
/**
|
|
382
373
|
* Follow the file as it grows.
|
|
383
374
|
*
|
|
@@ -388,8 +379,7 @@ export declare class SqliteSettingsBackend implements ISettingsBackend {
|
|
|
388
379
|
* node escaped it only because 130 MB → 858 MB spanned seventeen days of
|
|
389
380
|
* restarts.
|
|
390
381
|
*
|
|
391
|
-
* `unref` so it never holds the process open
|
|
392
|
-
* storage report turns it off without a rebuild.
|
|
382
|
+
* `unref` so it never holds the process open.
|
|
393
383
|
*/
|
|
394
384
|
private scheduleMapGrowthCheck;
|
|
395
385
|
/**
|
|
@@ -402,6 +392,14 @@ export declare class SqliteSettingsBackend implements ISettingsBackend {
|
|
|
402
392
|
* one thread the cluster reads configuration through.
|
|
403
393
|
*/
|
|
404
394
|
private scheduleIndexAnalysis;
|
|
395
|
+
/**
|
|
396
|
+
* Name the biggest tables, once, a minute after the connection opens.
|
|
397
|
+
*
|
|
398
|
+
* `dbSizeMb` says how big the file is and `freePct` says how much of it is
|
|
399
|
+
* live; neither says WHOSE. Per-addon scoped collections are created on first
|
|
400
|
+
* write and declared nowhere, so this is the only place the real set can be
|
|
401
|
+
* enumerated. `unref` so it can never hold the process open.
|
|
402
|
+
*/
|
|
405
403
|
private scheduleStorageReport;
|
|
406
404
|
private logStorageReport;
|
|
407
405
|
private readPragmaNumber;
|
|
Binary file
|
|
Binary file
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CFVOy8VT.js");
|
|
7
7
|
const require_hub_cap_forward = require("../../hub-cap-forward-DmHNjbB0.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as StorageLocationTypeSchema,
|
|
1
|
+
import { B as StorageLocationTypeSchema, Cr as EventCategory, E as LegacyStorageLocationDefaultSchema, Et as evictionPolicyOfLocation, Fn as withLocationMode, It as isLocationEnabled, Jt as mayReadLocation, M as REDACTED_SECRET, Nt as gbToBytes, Qn as BaseAddon, Qt as modeMayWrite, R as StorageCleanupJobSchema, Tn as storageMigrationCapability, V as StorageMigrationJobSchema, Vt as legacyModeOf, Yt as mayWriteToLocation, gr as parseJsonObject, hn as resolveLocationMode, tt as collectSecretConfigKeys, wn as storageCapability, xn as settingsStoreCapability, z as StorageLocationModeSchema } from "../../dist-B7WRgEZY.mjs";
|
|
2
2
|
import { t as HUB_CAP_FWD_ACTION } from "../../hub-cap-forward-BdT320dq.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CFVOy8VT.js");
|
|
7
7
|
//#region src/builtins/system-config/system-config.addon.ts
|
|
8
8
|
/**
|
|
9
9
|
* Built-in `system-config` addon — Phase 4 of the settings redesign.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Qn as BaseAddon, Zn as errMsg, fr as hydrateSchema } from "../../dist-B7WRgEZY.mjs";
|
|
2
2
|
//#region src/builtins/system-config/system-config.addon.ts
|
|
3
3
|
/**
|
|
4
4
|
* Built-in `system-config` addon — Phase 4 of the settings redesign.
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CFVOy8VT.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Gt as logDestinationCapability, Qn as BaseAddon } from "../../dist-B7WRgEZY.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
import * as path$1 from "node:path";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Cr as EventCategory$1, cr as createEvent } from "./dist-B7WRgEZY.mjs";
|
|
2
2
|
import { a as parseProcStat, i as nodeProcReader } from "./proc-stat-CbC55Kqi.mjs";
|
|
3
3
|
import "./hub-cap-forward-BdT320dq.mjs";
|
|
4
4
|
import * as crypto$1 from "node:crypto";
|
|
@@ -53,8 +53,6 @@ function createEventPlaneReader(sources) {
|
|
|
53
53
|
}
|
|
54
54
|
const crossNode = sources.crossNodeStats();
|
|
55
55
|
return {
|
|
56
|
-
udsMode: registry.eventFanoutMode,
|
|
57
|
-
crossNodeMode: sources.crossNodeMode(),
|
|
58
56
|
children,
|
|
59
57
|
childrenConnected: listed.length,
|
|
60
58
|
childrenUndeclared: registry.undeclaredChildCount(),
|
|
@@ -129,8 +127,6 @@ function diffEventPlane(baseline, current, topN = 5) {
|
|
|
129
127
|
}
|
|
130
128
|
const byBroadcasts = categoryDeltas.toSorted((a, b) => b.broadcasts - a.broadcasts || a.category.localeCompare(b.category));
|
|
131
129
|
return {
|
|
132
|
-
udsMode: current.udsMode,
|
|
133
|
-
crossNodeMode: current.crossNodeMode,
|
|
134
130
|
childrenConnected: current.childrenConnected,
|
|
135
131
|
childrenUndeclared: current.childrenUndeclared,
|
|
136
132
|
fanoutSent,
|
|
@@ -182,7 +178,7 @@ function formatEventPlane(window) {
|
|
|
182
178
|
const top = window.top.map((d) => `${d.childId}:${d.sent}/${d.suppressed}`).join(",");
|
|
183
179
|
const cats = window.topCategories.map((c) => `${c.category}:${c.broadcasts}/${c.wanted}`).join(",");
|
|
184
180
|
const orphans = window.topOrphans.map((c) => `${c.category}:${c.broadcasts}`).join(",");
|
|
185
|
-
return `
|
|
181
|
+
return ` children=${window.childrenConnected} childrenUndeclared=${window.childrenUndeclared} fanoutSent=${window.fanoutSent} fanoutSuppressed=${window.fanoutSuppressed} crossNodeDelivered=${window.crossNodeDelivered} crossNodeSuppressed=${window.crossNodeSuppressed} fanoutEvents=${window.categoryBroadcasts} fanoutOrphans=${window.orphanBroadcasts} fanoutCatsDropped=${window.categoryOverflow}` + (top.length === 0 ? "" : ` fanoutTop=${top}`) + (cats.length === 0 ? "" : ` fanoutCats=${cats}`) + (orphans.length === 0 ? "" : ` fanoutOrphanTop=${orphans}`);
|
|
186
182
|
}
|
|
187
183
|
//#endregion
|
|
188
184
|
//#region src/kernel/transport/cap-action-census.ts
|
|
@@ -1081,21 +1077,16 @@ function formatHeapSpaces(spaces, minMb = 32) {
|
|
|
1081
1077
|
}
|
|
1082
1078
|
var defaultDeps = {
|
|
1083
1079
|
readMemory: () => process.memoryUsage(),
|
|
1084
|
-
readSpaces: readHeapSpaces
|
|
1085
|
-
env: process.env
|
|
1080
|
+
readSpaces: readHeapSpaces
|
|
1086
1081
|
};
|
|
1087
1082
|
/**
|
|
1088
|
-
* The SIGUSR2 report — memory + the FULL per-space breakdown
|
|
1089
|
-
* snapshot
|
|
1083
|
+
* The SIGUSR2 report — memory + the FULL per-space breakdown; never a heap
|
|
1084
|
+
* snapshot (D718) — see the note in the body.
|
|
1090
1085
|
*
|
|
1091
1086
|
* The breakdown here keeps every non-empty space at 0.1 MB, unlike the
|
|
1092
1087
|
* heartbeat's filtered whole-MB pair: this is a hand-fired diagnostic read once
|
|
1093
1088
|
* by a human who asked for it, so completeness costs nothing. The heartbeat runs
|
|
1094
1089
|
* unattended on every runner forever, so it pays for every field it prints.
|
|
1095
|
-
*
|
|
1096
|
-
* A refused snapshot SAYS SO. A branch that drops work silently reads as "it was
|
|
1097
|
-
* never requested", and this one is fired by an operator who is standing there
|
|
1098
|
-
* waiting for a file.
|
|
1099
1090
|
*/
|
|
1100
1091
|
function emitHeapDiagnosticReport(request, deps = defaultDeps) {
|
|
1101
1092
|
try {
|
|
@@ -7939,25 +7930,16 @@ function isHighFrequencyCategory(category) {
|
|
|
7939
7930
|
for (const pattern of RING_BUFFER_DENY_PATTERNS) if (matchesPattern(pattern, category)) return true;
|
|
7940
7931
|
return false;
|
|
7941
7932
|
}
|
|
7942
|
-
function readMoleculerFanoutMode() {
|
|
7943
|
-
const raw = process.env.CAMSTACK_MOLECULER_EVENT_FANOUT;
|
|
7944
|
-
if (raw === "shadow" || raw === "broadcast") return raw;
|
|
7945
|
-
return "filter";
|
|
7946
|
-
}
|
|
7947
7933
|
/**
|
|
7948
7934
|
* Does this node want to accept an inbound cross-node event in `category`?
|
|
7949
7935
|
* The receiving-side mirror of `LocalChildRegistry.childWantsEvent`:
|
|
7950
|
-
* - `broadcast` mode → always (gate disabled).
|
|
7951
7936
|
* - a retaining bus (hub main) → always (it serves `getRecent` + admin-ui;
|
|
7952
7937
|
* its interest is genuinely everything).
|
|
7953
7938
|
* - undeclared interest (`null`) → always (fail-open).
|
|
7954
7939
|
* - else the declared union must match via `matchesPattern` — the SAME
|
|
7955
7940
|
* function the local subscriber map-key gate uses, giving delivery parity.
|
|
7956
|
-
* `shadow` is handled by the caller (it counts the would-suppress but still
|
|
7957
|
-
* delivers), exactly like the UDS fan-out.
|
|
7958
7941
|
*/
|
|
7959
|
-
function crossNodeAcceptsCategory(
|
|
7960
|
-
if (mode === "broadcast") return true;
|
|
7942
|
+
function crossNodeAcceptsCategory(snapshot, category) {
|
|
7961
7943
|
if (snapshot.retainRecent) return true;
|
|
7962
7944
|
if (snapshot.interest === null) return true;
|
|
7963
7945
|
return snapshot.interest.some((p) => matchesPattern(p, category));
|
|
@@ -8530,11 +8512,6 @@ var LIFECYCLE_SOURCE = {
|
|
|
8530
8512
|
type: "core",
|
|
8531
8513
|
id: "local-child-registry"
|
|
8532
8514
|
};
|
|
8533
|
-
function readFanoutMode() {
|
|
8534
|
-
const raw = process.env.CAMSTACK_UDS_EVENT_FANOUT;
|
|
8535
|
-
if (raw === "shadow" || raw === "broadcast") return raw;
|
|
8536
|
-
return "filter";
|
|
8537
|
-
}
|
|
8538
8515
|
/**
|
|
8539
8516
|
* Sentinel prefix used in the no-route error thrown when `cap-call-out` has no
|
|
8540
8517
|
* local sibling and no `onUnownedCall` fallback. `ipcParentLink` detects this
|
|
@@ -8597,8 +8574,6 @@ var LocalChildRegistry = class {
|
|
|
8597
8574
|
capUsageObserver;
|
|
8598
8575
|
/** Tracks capNames already logged as UDS-routed; one INFO line per capName per process. */
|
|
8599
8576
|
egressRoutedCaps = /* @__PURE__ */ new Set();
|
|
8600
|
-
/** Active event fan-out mode, read once from `CAMSTACK_UDS_EVENT_FANOUT`. */
|
|
8601
|
-
fanoutMode = readFanoutMode();
|
|
8602
8577
|
/** Per-child event fan-out counters (sent / suppressed). */
|
|
8603
8578
|
childEventStats = /* @__PURE__ */ new Map();
|
|
8604
8579
|
/** D467: per-category production census (cumulative). See {@link CategoryFanoutSample}. */
|
|
@@ -8647,14 +8622,13 @@ var LocalChildRegistry = class {
|
|
|
8647
8622
|
}
|
|
8648
8623
|
}
|
|
8649
8624
|
async start() {
|
|
8650
|
-
this.logger?.info("UDS event fan-out mode", { mode: this.fanoutMode });
|
|
8651
8625
|
this.server.onConnection((channel) => this.onConnection(channel));
|
|
8652
8626
|
await this.server.listen();
|
|
8653
8627
|
}
|
|
8654
8628
|
/**
|
|
8655
8629
|
* Per-child event fan-out counters (`{ sent, suppressed }`) or `null` if the
|
|
8656
8630
|
* child has no recorded events yet. Exposed for the starvation-verification
|
|
8657
|
-
* surface (
|
|
8631
|
+
* surface (operator debug).
|
|
8658
8632
|
*/
|
|
8659
8633
|
getChildEventStats(childId) {
|
|
8660
8634
|
const s = this.childEventStats.get(childId);
|
|
@@ -8732,18 +8706,6 @@ var LocalChildRegistry = class {
|
|
|
8732
8706
|
return this.actionCensus.read();
|
|
8733
8707
|
}
|
|
8734
8708
|
/**
|
|
8735
|
-
* The regime the counters above were produced under, read once from
|
|
8736
|
-
* `CAMSTACK_UDS_EVENT_FANOUT` at construction.
|
|
8737
|
-
*
|
|
8738
|
-
* A suppressed count means "nothing WAS dropped" under `filter` and "nothing
|
|
8739
|
-
* WOULD have been dropped" under `shadow`. Those are different claims, and
|
|
8740
|
-
* until this getter existed the mode was invisible at runtime — the counters
|
|
8741
|
-
* were readable and the regime that produced them was not.
|
|
8742
|
-
*/
|
|
8743
|
-
get eventFanoutMode() {
|
|
8744
|
-
return this.fanoutMode;
|
|
8745
|
-
}
|
|
8746
|
-
/**
|
|
8747
8709
|
* Connected children that never declared a subscription pattern set.
|
|
8748
8710
|
*
|
|
8749
8711
|
* Each one is a fail-open on BOTH planes: `childWantsEvent` returns true for
|
|
@@ -8760,30 +8722,18 @@ var LocalChildRegistry = class {
|
|
|
8760
8722
|
return count;
|
|
8761
8723
|
}
|
|
8762
8724
|
/**
|
|
8763
|
-
* Does `entry` want to receive an event in `category`?
|
|
8764
|
-
*
|
|
8765
|
-
*
|
|
8766
|
-
*
|
|
8767
|
-
*
|
|
8768
|
-
*
|
|
8725
|
+
* Does `entry` want to receive an event in `category`? Undeclared patterns
|
|
8726
|
+
* (`null`) → always (fail-open, counted by {@link undeclaredChildCount});
|
|
8727
|
+
* else the child's declared set must match via `matchesPattern` — the SAME
|
|
8728
|
+
* function the child's own `deliverShared` map-key gate uses, giving provable
|
|
8729
|
+
* delivery parity. The parent always filters: the `CAMSTACK_UDS_EVENT_FANOUT`
|
|
8730
|
+
* shadow/broadcast modes were removed on 2026-10-06.
|
|
8769
8731
|
*
|
|
8770
8732
|
* NOTE: this gate must NOT consult `RING_BUFFER_DENY_PATTERNS` /
|
|
8771
8733
|
* `isHighFrequencyCategory` — those are ring-buffer STORAGE policy; a child
|
|
8772
8734
|
* that explicitly subscribes to a ring-denied category must still RECEIVE it.
|
|
8773
8735
|
*/
|
|
8774
8736
|
childWantsEvent(entry, category) {
|
|
8775
|
-
if (this.fanoutMode === "broadcast") return true;
|
|
8776
|
-
return this.childSubscribesTo(entry, category);
|
|
8777
|
-
}
|
|
8778
|
-
/**
|
|
8779
|
-
* The SUBSCRIPTION answer alone, with no fan-out-mode override.
|
|
8780
|
-
*
|
|
8781
|
-
* {@link childWantsEvent} answers "will this child be sent the event", which
|
|
8782
|
-
* under `broadcast` is `true` for everything and therefore cannot say whether
|
|
8783
|
-
* anyone actually asked. The D467 census needs the second question, so the
|
|
8784
|
-
* two are separate functions and `broadcast` mode overrides only the first.
|
|
8785
|
-
*/
|
|
8786
|
-
childSubscribesTo(entry, category) {
|
|
8787
8737
|
if (entry.eventPatterns === null) return true;
|
|
8788
8738
|
return entry.eventPatterns.some((p) => matchesPattern(p, category));
|
|
8789
8739
|
}
|
|
@@ -9088,14 +9038,15 @@ var LocalChildRegistry = class {
|
|
|
9088
9038
|
let subscribed = 0;
|
|
9089
9039
|
for (const entry of this.children.values()) {
|
|
9090
9040
|
if (entry.childId === exceptChildId) continue;
|
|
9091
|
-
if (this.childSubscribesTo(entry, event.category)) subscribed += 1;
|
|
9092
9041
|
const wants = this.childWantsEvent(entry, event.category);
|
|
9093
9042
|
const stats = this.statsFor(entry.childId);
|
|
9094
|
-
if (!wants)
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
entry.channel.emit(msg);
|
|
9043
|
+
if (!wants) {
|
|
9044
|
+
stats.suppressed++;
|
|
9045
|
+
continue;
|
|
9098
9046
|
}
|
|
9047
|
+
subscribed += 1;
|
|
9048
|
+
stats.sent++;
|
|
9049
|
+
entry.channel.emit(msg);
|
|
9099
9050
|
}
|
|
9100
9051
|
this.recordCategoryBroadcast(event.category, subscribed);
|
|
9101
9052
|
}
|
|
@@ -11031,19 +10982,16 @@ function nodeInterestSnapshot(broker) {
|
|
|
11031
10982
|
}
|
|
11032
10983
|
/**
|
|
11033
10984
|
* Decide + account for an inbound cross-node event on `broker`. Returns whether
|
|
11034
|
-
* the event should be delivered to the local bus
|
|
11035
|
-
*
|
|
11036
|
-
* but records the would-suppress; in `filter` it drops unwanted categories.
|
|
11037
|
-
* The interest is the UNION of forked-child AND in-process subscribers — the
|
|
10985
|
+
* the event should be delivered to the local bus: unwanted categories are
|
|
10986
|
+
* dropped and counted as `suppressed`. The interest is the UNION of forked-child AND in-process subscribers — the
|
|
11038
10987
|
* gate never starves a live local subscriber of either kind.
|
|
11039
10988
|
*/
|
|
11040
|
-
function acceptInboundCrossNode(broker,
|
|
11041
|
-
const wants = crossNodeAcceptsCategory(
|
|
10989
|
+
function acceptInboundCrossNode(broker, category) {
|
|
10990
|
+
const wants = crossNodeAcceptsCategory(nodeInterestSnapshot(broker), category);
|
|
11042
10991
|
const stats = crossNodeStatsFor(broker);
|
|
11043
|
-
if (
|
|
11044
|
-
|
|
11045
|
-
|
|
11046
|
-
return deliver;
|
|
10992
|
+
if (wants) stats.delivered++;
|
|
10993
|
+
else stats.suppressed++;
|
|
10994
|
+
return wants;
|
|
11047
10995
|
}
|
|
11048
10996
|
/**
|
|
11049
10997
|
* Register the `$event-bus` service on a broker. MUST be called BEFORE
|
|
@@ -11069,7 +11017,6 @@ function registerEventBusService(broker) {
|
|
|
11069
11017
|
if (eventBusServiceInstalled.has(broker)) return;
|
|
11070
11018
|
eventBusServiceInstalled.add(broker);
|
|
11071
11019
|
const bkr = broker;
|
|
11072
|
-
const fanoutMode = readMoleculerFanoutMode();
|
|
11073
11020
|
try {
|
|
11074
11021
|
bkr.createService({
|
|
11075
11022
|
name: "$event-bus",
|
|
@@ -11077,7 +11024,7 @@ function registerEventBusService(broker) {
|
|
|
11077
11024
|
const event = ctx.params;
|
|
11078
11025
|
if (!event) return;
|
|
11079
11026
|
if (event.sourceNodeId === bkr.nodeID) return;
|
|
11080
|
-
if (!acceptInboundCrossNode(broker,
|
|
11027
|
+
if (!acceptInboundCrossNode(broker, event.category)) return;
|
|
11081
11028
|
deliverShared(getSharedBusState(broker), event);
|
|
11082
11029
|
} }
|
|
11083
11030
|
});
|
|
@@ -12803,4 +12750,4 @@ function createChildCapDispatch(deps) {
|
|
|
12803
12750
|
};
|
|
12804
12751
|
}
|
|
12805
12752
|
//#endregion
|
|
12806
|
-
export { CapRouteError as $,
|
|
12753
|
+
export { CapRouteError as $, EMPTY_CAP_ACTION_READING as $n, RUNNER_RSS_BUDGET_ENV as $t, resolveHwAccel as A, OUTBOUND_QUEUE_SUSTAIN_MS as An, DeviceRegistry as At, udsChildLogToWorkerEntry as B, createSocketPlaneMeter as Bn, hostNodeIdOf as Bt, getBrokerEventBus as C, HEAP_SPACE_REPORT_MIN_MB as Cn, capActionName as Ct, subscribePassthrough as D, readHeapSpaces as Dn, parseCapAction as Dt, setNodeEventInterest as E, heapSpaceField as En, capServiceName as Et, ipcParentLink as F, createMeshQueueReader as Fn, resolveAddonClass as Ft, UDS_NO_ROUTE_PREFIX as G, EMPTY_SOCKET_DIRECTION as Gn, HEAP_WATCH_INTERVAL_MS as Gt, createUdsLoggerWithControl as H, diffSocketPlane as Hn, HEAP_RECLAIM_MIN_INTERVAL_MS as Ht, localProviderLink as I, formatMeshQueue as In, buildNpmChildEnv as It, answerClaimedGetStatus as J, sampleSocketDirection as Jn, HUB_MAIN_RSS_BUDGET_MB as Jt, afterWorkerOnlineAnnounce as K, createSocketDirectionCounters as Kn, HEAP_WATCH_WARN_RATIO as Kt, createParentUnownedCallHandler as L, EMPTY_SOCKET_PLANE_BASELINE as Ln, resolveNpmInvocation as Lt, brokerTransportLink as M, createOutboundQueueGate as Mn, CapabilityUnavailableError as Mt, buildLinkChain as N, formatOutboundQueueVerdict as Nn, copyBundledNativeModules as Nt, AddonDepsManager as O, selectReportedSpaces as On, deserializeTypedArrays as Ot, deviceCapResolverLink as P, MESH_QUEUE_TOP_N as Pn, installManifestNativeDeps as Pt, CapRouteResolver as Q, CAP_ACTION_UNLABELLED as Qn, RUNNER_HEAP_WATCH_INTERVAL_MS as Qt, createUdsEventBridge as R, SOCKET_PLANE_TOP_N as Rn, runNpm as Rt, clusterEventTopic as S, DECISIVE_HEAP_SPACES as Sn, NATIVE_PROVIDER_SERVICE_INFIX as St, registerEventBusService as T, formatHeapSpaces as Tn, capBareAction as Tt, LocalChildClient as U, formatSocketPlane as Un, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS as Ut, createUdsLogger as V, createSocketPlaneReader as Vn, createAddonDataPlaneFacility as Vt, LocalChildRegistry as W, readSocketQueues as Wn, HEAP_RECLAIM_TRIGGER_MB as Wt, AGENT_CAP_FWD_ACTION as X, socketDirectionMessages as Xn, RSS_BUDGET_REANNOUNCE_MIN_MS as Xt, deviceOfGetStatus as Y, socketDirectionBytes as Yn, HUB_RSS_BUDGET_ENV as Yt, AGENT_CAP_FWD_SERVICE as Z, CAP_ACTION_OVERFLOW_LABEL as Zn, RSS_BUDGET_RELEASE_RATIO as Zt, getWorkerDeviceRegistry as _, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO as _n, getWorkerNativeCapSnapshot as _t, reapProcessGroup as a, describeRss as an, createEventPlaneMeter as ar, getCapUsageRegistry as at, setHubConnected as b, formatArrayBufferCensus as bn, createAddonService as bt, runnerOwnsProcessGroup as c, parseRssBudgetMb as cn, formatEventPlane as cr, UdsLocalTransportServer as ct, summarizeMembers as d, startHeapWatch as dn, localEndpointPath as dt, ZERO_LOOP_DELAY as en, MAX_CAP_ACTIONS_PER_PEER as er, classifyCapRoute as et, installManifestSystemDeps as f, startRunnerHeapWatch as fn, FrameDecoder as ft, createUdsAddonContext as g, ARRAY_BUFFER_CENSUS_THRESHOLD_MB as gn, getWorkerNativeCapProvider as gt, createAddonContext as h, ARRAY_BUFFER_CENSUS_SUSTAIN_MS as hn, createBrokerDeviceManagerApi as ht, killOwnRunnerGroupAfterParentLoss as i, createV8Reclaimer as in, EVENT_PLANE_TOP_N as ir, __resetCapUsageRegistryForTests as it, brokerCallForCap as j, OUTBOUND_QUEUE_THRESHOLD_BYTES as jn, CapabilityHandle as jt, createKernelHwAccel as k, OUTBOUND_QUEUE_COOLDOWN_MS as kn, serializeTypedArrays as kt, signalAllRunnerGroups as l, reclaimIntervalMs as ln, SocketChannel as lt, adaptBrokerToCluster as m, ARRAY_BUFFER_CENSUS_COOLDOWN_MS as mn, buildNativeCapProxy as mt, createChildCapDispatch as n, createDeferredHeapWatchSink as nn, createCapActionCensus as nr, CapUsageRegistry as nt, registerRunnerGroup as o, hubMainRssBudget as on, createEventPlaneReader as or, createLocalTransport as ot, installManifestPythonDeps as p, strandedMb as pn, encodeFrame as pt, GET_STATUS_METHOD as q, recordSocketFrame as qn, HUB_MAIN_HEAP_WATCH_LABEL as qt, defaultProcessGroupOps as r, createLoopDelayMeter as rn, diffCapActionCensus as rr, PARENT_ROUTED_PROVIDER_ADDON_ID as rt, releaseRunnerGroup as s, nextRssBudgetState as sn, diffEventPlane as sr, UdsLocalTransportClient as st, CAP_METHOD_NOT_IMPLEMENTED as t, buildHeapSample as tn, capActionLabel as tr, callWithServiceDiscovery as tt, startRunnerParentDeathWatchdog as u, shouldReclaim as un, PeerAnsweredError as ut, getOrInitReadinessRegistry as v, createArrayBufferCensusGate as vn, mountNativeCapService as vt, getMoleculerEventStats as w, emitHeapDiagnosticReport as wn, capActionSuffix as wt, EVENT_TOPIC_PREFIX as x, isArrayBufferCensusReport as xn, validateProviderRegistrations as xt, getOrInitReadinessRegistryForClient as y, createInspectorArrayBufferCensus as yn, setWorkerNativeCapsChangeListener as yt, createUdsEventBus as z, SOCKET_QUEUE_TOP_N as zn, createAddonPeerBytesFacility as zt };
|