@camstack/system 1.2.131 → 1.2.133

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.
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_manifest_python_deps = require("./manifest-python-deps-BTkFwAk_.js");
2
+ const require_manifest_python_deps = require("./manifest-python-deps-C9x9vrqt.js");
3
3
  const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { I as createUdsLoggerWithControl, L as LocalChildClient, Pt as startRunnerHeapWatch, at as setWorkerNativeCapsChangeListener, bt as installManifestNativeDeps, i as createUdsAddonContext, nt as getWorkerNativeCapProvider, rt as getWorkerNativeCapSnapshot, st as validateProviderRegistrations, t as installManifestPythonDeps, xt as resolveAddonClass } from "./manifest-python-deps-Dmcnb287.mjs";
1
+ import { I as createUdsLoggerWithControl, L as LocalChildClient, Pt as startRunnerHeapWatch, at as setWorkerNativeCapsChangeListener, bt as installManifestNativeDeps, i as createUdsAddonContext, nt as getWorkerNativeCapProvider, rt as getWorkerNativeCapSnapshot, st as validateProviderRegistrations, t as installManifestPythonDeps, xt as resolveAddonClass } from "./manifest-python-deps-08rqn6xN.mjs";
2
2
  import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
3
3
  import { register } from "node:module";
4
4
  import * as path$1 from "node:path";
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../../chunk-Cek0wNdY.js");
3
3
  const require_dist = require("../../dist-DqcaE-k1.js");
4
- const require_lan_http_bind = require("../../lan-http-bind-DmgpFP6_.js");
4
+ const require_tls = require("../../tls-u8QCJCFE.js");
5
5
  let node_fs_promises = require("node:fs/promises");
6
6
  let node_path = require("node:path");
7
7
  let node_os = require("node:os");
@@ -202,7 +202,7 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
202
202
  notificationBaseUrl: "",
203
203
  viewerBaseUrls: [],
204
204
  httpEnabled: true,
205
- httpPort: require_lan_http_bind.DEFAULT_LAN_HTTP_PORT,
205
+ httpPort: require_tls.DEFAULT_LAN_HTTP_PORT,
206
206
  localHostname: ""
207
207
  });
208
208
  }
@@ -237,7 +237,7 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
237
237
  const allow = this.config.allowedAddresses;
238
238
  const interfaces = applyAllowlist(this.enumerate(), allow);
239
239
  await this.reconcileMeshEndpoint();
240
- const httpState = require_lan_http_bind.readLanHttpState();
240
+ const httpState = require_tls.readLanHttpState();
241
241
  return buildEndpoints(interfaces, httpsPort, includeLoopback, ipv4Only, this.publicHostname, scheme, this.meshEndpoint, {
242
242
  enabled: this.config.httpEnabled !== false,
243
243
  listening: httpState.listening,
@@ -320,29 +320,29 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
320
320
  },
321
321
  getTlsStatus: async () => this.snapshotTls(false),
322
322
  regenerateCertificate: async (_input) => {
323
- if (require_lan_http_bind.readTlsMode(this.tlsDataDir()) === "uploaded") throw new Error("Cannot regenerate an uploaded certificate — revert to generated first.");
324
- const extraSans = [...require_lan_http_bind.readExtraSans(this.tlsDataDir())];
325
- await require_lan_http_bind.reissueTlsLeaf(this.tlsDataDir(), { extraSans });
323
+ if (require_tls.readTlsMode(this.tlsDataDir()) === "uploaded") throw new Error("Cannot regenerate an uploaded certificate — revert to generated first.");
324
+ const extraSans = [...require_tls.readExtraSans(this.tlsDataDir())];
325
+ await require_tls.reissueTlsLeaf(this.tlsDataDir(), { extraSans });
326
326
  return this.snapshotTls(true);
327
327
  },
328
328
  uploadCertificate: async ({ certPem, keyPem, caPem }) => {
329
- const valid = require_lan_http_bind.validateUploadedTls(certPem, keyPem);
329
+ const valid = require_tls.validateUploadedTls(certPem, keyPem);
330
330
  if (!valid.ok) throw new Error(valid.error);
331
331
  const dir = (0, node_path.join)(this.tlsDataDir(), "tls");
332
332
  await (0, node_fs_promises.mkdir)(dir, { recursive: true });
333
333
  await (0, node_fs_promises.writeFile)((0, node_path.join)(dir, "camstack.crt"), certPem.endsWith("\n") ? certPem : `${certPem}\n`);
334
334
  await (0, node_fs_promises.writeFile)((0, node_path.join)(dir, "camstack.key"), keyPem.endsWith("\n") ? keyPem : `${keyPem}\n`, { mode: 384 });
335
335
  if (caPem && caPem.trim() !== "") await (0, node_fs_promises.writeFile)((0, node_path.join)(dir, "camstack-ca.crt"), caPem.endsWith("\n") ? caPem : `${caPem}\n`);
336
- require_lan_http_bind.writeTlsMode(this.tlsDataDir(), "uploaded");
336
+ require_tls.writeTlsMode(this.tlsDataDir(), "uploaded");
337
337
  return this.snapshotTls(true);
338
338
  },
339
339
  downloadCa: async () => {
340
340
  return { pem: this.snapshotTls(false).caCertPem ?? "" };
341
341
  },
342
342
  revertToGeneratedCertificate: async () => {
343
- require_lan_http_bind.writeTlsMode(this.tlsDataDir(), "generated");
344
- const extraSans = [...require_lan_http_bind.readExtraSans(this.tlsDataDir())];
345
- await require_lan_http_bind.ensureTlsCert(this.tlsDataDir(), { extraSans });
343
+ require_tls.writeTlsMode(this.tlsDataDir(), "generated");
344
+ const extraSans = [...require_tls.readExtraSans(this.tlsDataDir())];
345
+ await require_tls.ensureTlsCert(this.tlsDataDir(), { extraSans });
346
346
  return this.snapshotTls(true);
347
347
  }
348
348
  };
@@ -403,7 +403,7 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
403
403
  min: 1,
404
404
  max: 65535,
405
405
  step: 1,
406
- default: require_lan_http_bind.DEFAULT_LAN_HTTP_PORT,
406
+ default: require_tls.DEFAULT_LAN_HTTP_PORT,
407
407
  showWhen: {
408
408
  field: "httpEnabled",
409
409
  equals: true
@@ -497,13 +497,13 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
497
497
  }
498
498
  resolvedHttpPort() {
499
499
  const port = this.config.httpPort;
500
- return Number.isInteger(port) && port >= 1 && port <= 65535 ? port : require_lan_http_bind.DEFAULT_LAN_HTTP_PORT;
500
+ return Number.isInteger(port) && port >= 1 && port <= 65535 ? port : require_tls.DEFAULT_LAN_HTTP_PORT;
501
501
  }
502
502
  tlsDataDir() {
503
503
  return this.ctx.nodeDataDir ?? this.ctx.dataDir;
504
504
  }
505
505
  snapshotTls(restartRequired) {
506
- const status = require_lan_http_bind.readTlsAccessStatus(this.tlsDataDir(), restartRequired);
506
+ const status = require_tls.readTlsAccessStatus(this.tlsDataDir(), restartRequired);
507
507
  return {
508
508
  ...status,
509
509
  sans: [...status.sans]
@@ -521,15 +521,15 @@ var LocalNetworkAddon = class extends require_dist.BaseAddon {
521
521
  const httpsPort = (await this.resolveAdvertisedListenPort(null)).port;
522
522
  const httpPort = this.resolvedHttpPort();
523
523
  if (this.config.httpEnabled !== false && httpPort === httpsPort) throw new Error(`HTTP port ${httpPort} cannot equal the HTTPS listen port`);
524
- await require_lan_http_bind.applyLanHttp({
524
+ await require_tls.applyLanHttp({
525
525
  enabled: this.config.httpEnabled !== false,
526
526
  port: httpPort,
527
527
  host: "0.0.0.0"
528
528
  });
529
529
  if (hostname !== "") {
530
- require_lan_http_bind.writeExtraSans(this.tlsDataDir(), [hostname]);
531
- if (require_lan_http_bind.readTlsMode(this.tlsDataDir()) === "generated") await require_lan_http_bind.ensureTlsCert(this.tlsDataDir(), { extraSans: [hostname] });
532
- } else require_lan_http_bind.writeExtraSans(this.tlsDataDir(), []);
530
+ require_tls.writeExtraSans(this.tlsDataDir(), [hostname]);
531
+ if (require_tls.readTlsMode(this.tlsDataDir()) === "generated") await require_tls.ensureTlsCert(this.tlsDataDir(), { extraSans: [hostname] });
532
+ } else require_tls.writeExtraSans(this.tlsDataDir(), []);
533
533
  }
534
534
  /**
535
535
  * The port this hub is actually listening on, plus the provenance of the
@@ -1,5 +1,5 @@
1
1
  import { Gt as EventCategory, Y as localNetworkCapability, yt as BaseAddon } from "../../dist-BUEU7B1V.mjs";
2
- import { c as readExtraSans, d as writeExtraSans, f as writeTlsMode, g as reissueTlsLeaf, l as readTlsAccessStatus, m as ensureTlsCert, o as readLanHttpState, p as validateUploadedTls, r as applyLanHttp, t as DEFAULT_LAN_HTTP_PORT, u as readTlsMode } from "../../lan-http-bind-jKrj6OjQ.mjs";
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-CQhPGSJm.mjs";
3
3
  import { mkdir, writeFile } from "node:fs/promises";
4
4
  import { join } from "node:path";
5
5
  import * as os from "node:os";
@@ -142,3 +142,27 @@ export interface SqliteOccupancy {
142
142
  * three header reads on a connection that is already open.
143
143
  */
144
144
  export declare function sqliteOccupancy(counters: SqlitePageCounters): SqliteOccupancy;
145
+ /**
146
+ * How often the connection re-checks whether the file has outgrown its map.
147
+ *
148
+ * The database grows by roughly 40 MB a day on this cluster, so five minutes is
149
+ * far finer than it needs to be — but the check is three arithmetic operations
150
+ * on a `stat`, and the failure it prevents is a node silently returning to
151
+ * 418 synchronous page-ins per second. Cheap insurance against a slow leak.
152
+ */
153
+ export declare const MAP_GROWTH_CHECK_INTERVAL_MS: number;
154
+ /**
155
+ * The new `mmap_size` when the file has outgrown the current one, or `null`.
156
+ *
157
+ * `sqliteMmapSizeFor` already autoscales to any user's database — but it is
158
+ * applied when the connection OPENS and never again, which is the same bug one
159
+ * level up: a file that grows during uptime keeps the map it had at boot. This
160
+ * node escaped it only because 130 MB → 858 MB spanned seventeen days of
161
+ * restarts; a node up for two months walks straight back into 70% of the file
162
+ * outside the map.
163
+ *
164
+ * GROWTH only. Shrinking after a delete buys nothing and costs a remap, and the
165
+ * file does not shrink without a `VACUUM` regardless — measured 2026-08-25,
166
+ * `freePct=1` on an 858 MB file that had been deleting rows for days.
167
+ */
168
+ export declare function resolveMapGrowth(currentMmapBytes: number, fileSizeBytes: number): number | null;
@@ -251,6 +251,20 @@ export declare class SqliteSettingsBackend implements ISettingsBackend {
251
251
  * enumerated. `unref` so it can never hold the process open, and
252
252
  * `CAMSTACK_SQLITE_STORAGE_REPORT=off` turns it off without a rebuild.
253
253
  */
254
+ /**
255
+ * Follow the file as it grows.
256
+ *
257
+ * The map is derived from the file at OPEN and never again, which is the same
258
+ * expiry one level up: a database that grows during uptime keeps the map it
259
+ * had at boot, and once the file passes it every read outside the window
260
+ * costs a synchronous page-in — 418 per second, measured 2026-08-25. This
261
+ * node escaped it only because 130 MB → 858 MB spanned seventeen days of
262
+ * restarts.
263
+ *
264
+ * `unref` so it never holds the process open, and the same kill switch as the
265
+ * storage report turns it off without a rebuild.
266
+ */
267
+ private scheduleMapGrowthCheck;
254
268
  private scheduleStorageReport;
255
269
  private logStorageReport;
256
270
  private readPragmaNumber;
@@ -21,3 +21,28 @@ export declare class DataPlaneRegistry {
21
21
  */
22
22
  match(addonId: string, subPath: string): DataPlaneMatch | null;
23
23
  }
24
+ /** What the hub knows about an addon when it re-evaluates its data-planes. */
25
+ export interface DataPlaneEligibility {
26
+ /** The addon still has an entry in the registry service. */
27
+ readonly hasEntry: boolean;
28
+ /** That entry is a FORKED addon — the only kind that serves a data-plane today. */
29
+ readonly isForked: boolean;
30
+ /** The child process is currently known to the child registry. */
31
+ readonly childKnown: boolean;
32
+ }
33
+ /**
34
+ * Whether an addon can serve a data-plane RIGHT NOW.
35
+ *
36
+ * Extracted as a predicate because the three ways of answering "no" used to be
37
+ * three early `return`s inside the mount path, and every one of them left the
38
+ * PREVIOUS registration standing. The registry then held a `baseUrl` pointing
39
+ * at the port of a process that no longer existed, and `/addon/:addonId/*` kept
40
+ * reverse-proxying to it — a 502 per request until a replacement child finished
41
+ * handshaking, and forever for an addon removed from disk. `unregisterAddon`
42
+ * existed for exactly this and had no call site anywhere in the repo.
43
+ *
44
+ * A `false` here means UNREGISTER, never "leave it alone". Dropping is the safe
45
+ * direction: an absent data-plane falls through to the control-route path,
46
+ * while a stale one sends live traffic at a dead socket.
47
+ */
48
+ export declare function canServeDataPlane(state: DataPlaneEligibility): boolean;
package/dist/index.d.ts CHANGED
@@ -39,10 +39,11 @@ export type { FeatureConfigReader, FeatureFlag, FeatureManifest, } from './featu
39
39
  export { FeatureManager } from './feature/feature-manager.js';
40
40
  export type { AuthenticatedFileServerOptions, ByteRange, FileResolveResult, FileServerHandle, FileServerTokenVerifier, } from './http/authenticated-file-server.js';
41
41
  export { contentTypeFor, createAuthenticatedFileServer, parseRangeHeader, parseTokenizedUrl, resolveFilePath, } from './http/authenticated-file-server.js';
42
- export type { DataPlaneMatch } from './http/data-plane-registry.js';
43
- export { DataPlaneRegistry } from './http/data-plane-registry.js';
42
+ export type { DataPlaneEligibility, DataPlaneMatch } from './http/data-plane-registry.js';
43
+ export { canServeDataPlane, DataPlaneRegistry } from './http/data-plane-registry.js';
44
44
  export type { FileDataPlaneOptions } from './http/file-data-plane.js';
45
45
  export { createFileDataPlaneHandler } from './http/file-data-plane.js';
46
+ export { allFamiliesListenHost, applyLanHttp, bindPendingLanHttp, closeLanHttp, DEFAULT_LAN_HTTP_PORT, readLanHttpState, registerLanHttpHandler, } from './http/lan-http-bind.js';
46
47
  export type { ReverseProxyOptions } from './http/reverse-proxy.js';
47
48
  export { proxyToUpstream } from './http/reverse-proxy.js';
48
49
  export type { HeapReclaimer, HeapReclaimOptions, HeapSample, HeapWatchSink, RunnerHeapWatchOptions, } from './kernel/heap-watch.js';
@@ -80,7 +81,6 @@ export { StorageLocationManager } from './storage/storage-location-manager.js';
80
81
  export type { IFileStorage, IStorageLocation, IStorageProvider as ICoreStorageProvider, IStructuredStorage, QueryFilter, StorageRecord, } from './storage/storage-manager.js';
81
82
  export { StorageManager } from './storage/storage-manager.js';
82
83
  export * from './tls/index.js';
83
- export { applyLanHttp, allFamiliesListenHost, bindPendingLanHttp, closeLanHttp, DEFAULT_LAN_HTTP_PORT, readLanHttpState, registerLanHttpHandler, } from './http/lan-http-bind.js';
84
84
  export { IntegrationRegistry } from './builtins/sqlite-storage/integration-registry.js';
85
85
  export { type EnsureAddonNativePrebuildsOptions, ensureAddonNativePrebuilds, type NativeEnsureOutcome, type NativeEnsureResult, } from './kernel/deps/ensure-addon-natives.js';
86
86
  export { type EnsureNativePrebuildsOptions, ensureNativePrebuilds, hasDotNode, NATIVE_SCAN_DEPTH, type PrebuildFetchFn, type PrebuildTarget, TRADITIONAL_NATIVE_PACKAGES, } from './kernel/deps/ensure-native-prebuilds.js';
package/dist/index.js CHANGED
@@ -25,9 +25,9 @@ const require_builtins_system_config_system_config_addon = require("./builtins/s
25
25
  require("./builtins/system-config/index.js");
26
26
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
27
27
  const require_file_data_plane = require("./file-data-plane-DO8KbxCe.js");
28
- const require_manifest_python_deps = require("./manifest-python-deps-BTkFwAk_.js");
28
+ const require_tls$1 = require("./tls-u8QCJCFE.js");
29
+ const require_manifest_python_deps = require("./manifest-python-deps-C9x9vrqt.js");
29
30
  const require_resource_monitor = require("./resource-monitor-CdnzxBLP.js");
30
- const require_lan_http_bind = require("./lan-http-bind-DmgpFP6_.js");
31
31
  const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
32
32
  let zod = require("zod");
33
33
  let node_crypto = require("node:crypto");
@@ -373,6 +373,24 @@ var DataPlaneRegistry = class {
373
373
  };
374
374
  }
375
375
  };
376
+ /**
377
+ * Whether an addon can serve a data-plane RIGHT NOW.
378
+ *
379
+ * Extracted as a predicate because the three ways of answering "no" used to be
380
+ * three early `return`s inside the mount path, and every one of them left the
381
+ * PREVIOUS registration standing. The registry then held a `baseUrl` pointing
382
+ * at the port of a process that no longer existed, and `/addon/:addonId/*` kept
383
+ * reverse-proxying to it — a 502 per request until a replacement child finished
384
+ * handshaking, and forever for an addon removed from disk. `unregisterAddon`
385
+ * existed for exactly this and had no call site anywhere in the repo.
386
+ *
387
+ * A `false` here means UNREGISTER, never "leave it alone". Dropping is the safe
388
+ * direction: an absent data-plane falls through to the control-route path,
389
+ * while a stale one sends live traffic at a dead socket.
390
+ */
391
+ function canServeDataPlane(state) {
392
+ return state.hasEntry && state.isForked && state.childKnown;
393
+ }
376
394
  //#endregion
377
395
  //#region src/http/reverse-proxy.ts
378
396
  /**
@@ -94004,6 +94022,34 @@ function positiveInt(raw, fallback) {
94004
94022
  const n = Number.parseInt(raw, 10);
94005
94023
  return Number.isFinite(n) && n > 0 ? n : fallback;
94006
94024
  }
94025
+ /**
94026
+ * The child's environment, with the allocator pair applied or REMOVED.
94027
+ *
94028
+ * `runnerNativeAllocatorEnv` returns what to add. That was sufficient while the
94029
+ * parent had nothing to inherit: omitting a key meant the child never saw it.
94030
+ * Once the image entrypoint welds the pair into the container environment — the
94031
+ * change that lets an operator drop them from the Unraid template — the child
94032
+ * INHERITS them, and a kill switch that only omits is a kill switch that does
94033
+ * nothing.
94034
+ *
94035
+ * So `CAMSTACK_RUNNER_NATIVE_ALLOCATOR=off` DELETES. And only that: the
94036
+ * non-linux path returns nothing to add for its own reasons (the pin is a pure
94037
+ * throughput cut there — measured `sharp.concurrency()` 6 on the darwin agent
94038
+ * against 1 on the linux hub) and must not be read as "remove what the operator
94039
+ * chose". Deletion is the switch's job, not absence's.
94040
+ */
94041
+ function applyRunnerNativeAllocator(parentEnv, platform = process.platform) {
94042
+ const next = { ...parentEnv };
94043
+ if (parentEnv["CAMSTACK_RUNNER_NATIVE_ALLOCATOR"] === "off") {
94044
+ delete next["MALLOC_ARENA_MAX"];
94045
+ delete next["VIPS_CONCURRENCY"];
94046
+ return next;
94047
+ }
94048
+ return {
94049
+ ...next,
94050
+ ...runnerNativeAllocatorEnv(parentEnv, platform)
94051
+ };
94052
+ }
94007
94053
  //#endregion
94008
94054
  //#region src/kernel/moleculer/process-service.ts
94009
94055
  /**
@@ -94301,7 +94347,7 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
94301
94347
  CAMSTACK_LOG_LEVEL: process.env["CAMSTACK_LOG_LEVEL"] ?? "info",
94302
94348
  ...parentTcpPort !== void 0 ? { CAMSTACK_PARENT_TCP_PORT: String(parentTcpPort) } : {},
94303
94349
  ...parentUdsPath !== void 0 ? { CAMSTACK_PARENT_UDS_PATH: parentUdsPath } : {},
94304
- ...runnerNativeAllocatorEnv(process.env),
94350
+ ...applyRunnerNativeAllocator(process.env),
94305
94351
  ...env
94306
94352
  };
94307
94353
  const heapFlags = runnerHeapFlags(addons);
@@ -95060,8 +95106,8 @@ exports.AddonRouteRegistry = AddonRouteRegistry;
95060
95106
  exports.AlertCenterAddon = require_builtins_alerts_alerts_addon.AlertCenterAddon;
95061
95107
  exports.ApiKeyManager = require_builtins_local_auth_local_auth_addon.ApiKeyManager;
95062
95108
  exports.AuthManager = require_builtins_local_auth_local_auth_addon.AuthManager;
95063
- exports.CA_COMMON_NAME = require_lan_http_bind.CA_COMMON_NAME;
95064
- exports.CA_VALIDITY_DAYS = require_lan_http_bind.CA_VALIDITY_DAYS;
95109
+ exports.CA_COMMON_NAME = require_tls$1.CA_COMMON_NAME;
95110
+ exports.CA_VALIDITY_DAYS = require_tls$1.CA_VALIDITY_DAYS;
95065
95111
  exports.CLUSTER_SECRET_MISMATCH_TYPE = CLUSTER_SECRET_MISMATCH_TYPE;
95066
95112
  exports.CLUSTER_SECRET_REJECTED_EXIT_CODE = CLUSTER_SECRET_REJECTED_EXIT_CODE;
95067
95113
  exports.CORE_CAP_SERVICE_NAME = CORE_CAP_SERVICE_NAME;
@@ -95078,7 +95124,7 @@ exports.ConsoleLoggingAddon = require_builtins_console_logging_index.ConsoleLogg
95078
95124
  exports.CoreBlocksAddon = require_builtins_core_blocks_core_blocks_addon.CoreBlocksAddon;
95079
95125
  exports.CustomActionRegistry = require_custom_action_registry.CustomActionRegistry;
95080
95126
  exports.DEFAULT_DATA_PATH = DEFAULT_DATA_PATH;
95081
- exports.DEFAULT_LAN_HTTP_PORT = require_lan_http_bind.DEFAULT_LAN_HTTP_PORT;
95127
+ exports.DEFAULT_LAN_HTTP_PORT = require_tls$1.DEFAULT_LAN_HTTP_PORT;
95082
95128
  exports.DEVICE_SETTINGS_CONTRIBUTION_METHODS = require_dist.DEVICE_SETTINGS_CONTRIBUTION_METHODS;
95083
95129
  exports.DEVICE_STATUS_METHOD = require_dist.DEVICE_STATUS_METHOD;
95084
95130
  exports.DataPlaneRegistry = DataPlaneRegistry;
@@ -95109,7 +95155,7 @@ exports.HubNodeRegistry = HubNodeRegistry;
95109
95155
  exports.INFRA_CAPABILITIES = INFRA_CAPABILITIES;
95110
95156
  exports.IntegrationRegistry = IntegrationRegistry;
95111
95157
  exports.JobJournal = JobJournal;
95112
- exports.LEAF_RENEWAL_WINDOW_DAYS = require_lan_http_bind.LEAF_RENEWAL_WINDOW_DAYS;
95158
+ exports.LEAF_RENEWAL_WINDOW_DAYS = require_tls$1.LEAF_RENEWAL_WINDOW_DAYS;
95113
95159
  exports.LifecycleJobEngine = LifecycleJobEngine;
95114
95160
  exports.LifecycleStateMachine = LifecycleStateMachine;
95115
95161
  exports.LivenessMonitorAddon = require_builtins_liveness_monitor_liveness_monitor_addon.LivenessMonitorAddon;
@@ -95120,7 +95166,7 @@ exports.LogManager = LogManager;
95120
95166
  exports.LogRingBuffer = LogRingBuffer;
95121
95167
  exports.LokiDestination = require_builtins_loki_logging_index.LokiDestination$1;
95122
95168
  exports.LokiLoggingAddon = require_builtins_loki_logging_index.LokiLoggingAddon$1;
95123
- exports.MAX_LEAF_VALIDITY_DAYS = require_lan_http_bind.MAX_LEAF_VALIDITY_DAYS;
95169
+ exports.MAX_LEAF_VALIDITY_DAYS = require_tls$1.MAX_LEAF_VALIDITY_DAYS;
95124
95170
  exports.METHOD_ACCESS_MAP = require_dist.METHOD_ACCESS_MAP;
95125
95171
  exports.ModelDownloadService = require_file_data_plane.ModelDownloadService;
95126
95172
  exports.NATIVE_PROVIDER_SERVICE_INFIX = require_manifest_python_deps.NATIVE_PROVIDER_SERVICE_INFIX;
@@ -95146,7 +95192,7 @@ exports.ReadinessRegistry = require_dist.ReadinessRegistry;
95146
95192
  exports.ReadinessTimeoutError = require_dist.ReadinessTimeoutError;
95147
95193
  exports.ReplEngine = ReplEngine;
95148
95194
  exports.RingBuffer = RingBuffer;
95149
- exports.SERVER_AUTH_OID = require_lan_http_bind.SERVER_AUTH_OID;
95195
+ exports.SERVER_AUTH_OID = require_tls$1.SERVER_AUTH_OID;
95150
95196
  exports.ScopedLogger = ScopedLogger;
95151
95197
  exports.ScopedTokenManager = require_builtins_local_auth_local_auth_addon.ScopedTokenManager;
95152
95198
  exports.SocketChannel = require_manifest_python_deps.SocketChannel;
@@ -95170,9 +95216,9 @@ exports.WinstonLoggingAddon = require_builtins_winston_logging_index.WinstonLogg
95170
95216
  exports.__resetCapUsageRegistryForTests = require_manifest_python_deps.__resetCapUsageRegistryForTests;
95171
95217
  exports.adaptBrokerToCluster = require_manifest_python_deps.adaptBrokerToCluster;
95172
95218
  exports.addonSettingsCapability = require_dist.addonSettingsCapability;
95173
- exports.allFamiliesListenHost = require_lan_http_bind.allFamiliesListenHost;
95174
- exports.applyLanHttp = require_lan_http_bind.applyLanHttp;
95175
- exports.bindPendingLanHttp = require_lan_http_bind.bindPendingLanHttp;
95219
+ exports.allFamiliesListenHost = require_tls$1.allFamiliesListenHost;
95220
+ exports.applyLanHttp = require_tls$1.applyLanHttp;
95221
+ exports.bindPendingLanHttp = require_tls$1.bindPendingLanHttp;
95176
95222
  exports.bootstrapSchema = bootstrapSchema;
95177
95223
  exports.brokerCallForCap = require_manifest_python_deps.brokerCallForCap;
95178
95224
  exports.brokerTransportLink = require_manifest_python_deps.brokerTransportLink;
@@ -95192,6 +95238,7 @@ exports.buildUdsNativeCapProxy = require_manifest_python_deps.buildUdsNativeCapP
95192
95238
  exports.builderMountedCapNames = builderMountedCapNames;
95193
95239
  exports.callRegisterNodeWithRetry = callRegisterNodeWithRetry;
95194
95240
  exports.callWithServiceDiscovery = require_manifest_python_deps.callWithServiceDiscovery;
95241
+ exports.canServeDataPlane = canServeDataPlane;
95195
95242
  exports.capActionName = require_manifest_python_deps.capActionName;
95196
95243
  exports.capActionSuffix = require_manifest_python_deps.capActionSuffix;
95197
95244
  exports.capBareAction = require_manifest_python_deps.capBareAction;
@@ -95199,10 +95246,10 @@ exports.capServiceName = require_manifest_python_deps.capServiceName;
95199
95246
  exports.classifyAddonDir = classifyAddonDir;
95200
95247
  exports.classifyCapRoute = require_manifest_python_deps.classifyCapRoute;
95201
95248
  exports.clearPendingRestart = clearPendingRestart;
95202
- exports.closeLanHttp = require_lan_http_bind.closeLanHttp;
95249
+ exports.closeLanHttp = require_tls$1.closeLanHttp;
95203
95250
  exports.clusterEventTopic = require_manifest_python_deps.clusterEventTopic;
95204
95251
  exports.clusterSecretMatches = clusterSecretMatches;
95205
- exports.collectCertIdentity = require_lan_http_bind.collectCertIdentity;
95252
+ exports.collectCertIdentity = require_tls$1.collectCertIdentity;
95206
95253
  exports.collectModelFiles = require_file_data_plane.collectModelFiles;
95207
95254
  exports.contentTypeFor = require_file_data_plane.contentTypeFor;
95208
95255
  exports.copyDirRecursive = copyDirRecursive;
@@ -95269,8 +95316,8 @@ Object.defineProperty(exports, "ensurePython", {
95269
95316
  return _camstack_types_node.ensurePython;
95270
95317
  }
95271
95318
  });
95272
- exports.ensureTlsCert = require_lan_http_bind.ensureTlsCert;
95273
- exports.evaluateExistingCert = require_lan_http_bind.evaluateExistingCert;
95319
+ exports.ensureTlsCert = require_tls$1.ensureTlsCert;
95320
+ exports.evaluateExistingCert = require_tls$1.evaluateExistingCert;
95274
95321
  exports.expandCapMethods = require_dist.expandCapMethods;
95275
95322
  exports.fetchJson = require_file_data_plane.fetchJson;
95276
95323
  Object.defineProperty(exports, "findInPath", {
@@ -95335,7 +95382,7 @@ exports.isInfraCapability = isInfraCapability;
95335
95382
  exports.isModelDownloaded = require_file_data_plane.isModelDownloaded;
95336
95383
  exports.isSourceNewer = isSourceNewer;
95337
95384
  exports.isolatedBuiltinPhase = isolatedBuiltinPhase;
95338
- exports.loadTlsCert = require_lan_http_bind.loadTlsCert;
95385
+ exports.loadTlsCert = require_tls$1.loadTlsCert;
95339
95386
  exports.localEndpointPath = require_manifest_python_deps.localEndpointPath;
95340
95387
  exports.localProviderLink = require_manifest_python_deps.localProviderLink;
95341
95388
  exports.mountNativeCapService = require_manifest_python_deps.mountNativeCapService;
@@ -95345,15 +95392,15 @@ exports.parseTokenizedUrl = require_file_data_plane.parseTokenizedUrl;
95345
95392
  exports.partitionIsolatedBuiltinIds = partitionIsolatedBuiltinIds;
95346
95393
  exports.proxyToUpstream = proxyToUpstream;
95347
95394
  exports.quarantineAddonResidue = quarantineAddonResidue;
95348
- exports.readExtraSans = require_lan_http_bind.readExtraSans;
95349
- exports.readLanHttpState = require_lan_http_bind.readLanHttpState;
95395
+ exports.readExtraSans = require_tls$1.readExtraSans;
95396
+ exports.readLanHttpState = require_tls$1.readLanHttpState;
95350
95397
  exports.readPendingRestart = readPendingRestart;
95351
- exports.readTlsAccessStatus = require_lan_http_bind.readTlsAccessStatus;
95352
- exports.readTlsMode = require_lan_http_bind.readTlsMode;
95398
+ exports.readTlsAccessStatus = require_tls$1.readTlsAccessStatus;
95399
+ exports.readTlsMode = require_tls$1.readTlsMode;
95353
95400
  exports.readinessKey = require_dist.readinessKey;
95354
95401
  exports.registerEventBusService = require_manifest_python_deps.registerEventBusService;
95355
- exports.registerLanHttpHandler = require_lan_http_bind.registerLanHttpHandler;
95356
- exports.reissueTlsLeaf = require_lan_http_bind.reissueTlsLeaf;
95402
+ exports.registerLanHttpHandler = require_tls$1.registerLanHttpHandler;
95403
+ exports.reissueTlsLeaf = require_tls$1.reissueTlsLeaf;
95357
95404
  exports.resolveFilePath = require_file_data_plane.resolveFilePath;
95358
95405
  exports.resolveHwAccel = require_manifest_python_deps.resolveHwAccel;
95359
95406
  exports.resolveNpmInvocation = require_manifest_python_deps.resolveNpmInvocation;
@@ -95375,8 +95422,8 @@ exports.stripCamstackDeps = stripCamstackDeps;
95375
95422
  exports.subscribePassthrough = require_manifest_python_deps.subscribePassthrough;
95376
95423
  exports.udsChildLogToWorkerEntry = require_manifest_python_deps.udsChildLogToWorkerEntry;
95377
95424
  exports.validateProviderRegistrations = require_manifest_python_deps.validateProviderRegistrations;
95378
- exports.validateUploadedTls = require_lan_http_bind.validateUploadedTls;
95425
+ exports.validateUploadedTls = require_tls$1.validateUploadedTls;
95379
95426
  exports.waitUntilReady = waitUntilReady;
95380
- exports.writeExtraSans = require_lan_http_bind.writeExtraSans;
95427
+ exports.writeExtraSans = require_tls$1.writeExtraSans;
95381
95428
  exports.writePendingRestart = writePendingRestart;
95382
- exports.writeTlsMode = require_lan_http_bind.writeTlsMode;
95429
+ exports.writeTlsMode = require_tls$1.writeTlsMode;
package/dist/index.mjs CHANGED
@@ -24,9 +24,9 @@ import { SystemConfigAddon } from "./builtins/system-config/system-config.addon.
24
24
  import "./builtins/system-config/index.mjs";
25
25
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
26
26
  import { a as parseTokenizedUrl, c as collectModelFiles, d as downloadModel, f as ensureModel, h as isModelDownloaded, i as parseRangeHeader, l as deleteModelFromDisk, m as getModelFilePath, n as contentTypeFor, o as resolveFilePath, p as fetchJson, r as createAuthenticatedFileServer, s as ModelDownloadService, t as createFileDataPlaneHandler, u as downloadFile } from "./file-data-plane-BhKdxJgf.mjs";
27
- import { $ as buildNativeCapProxy, A as createHubCapForwardService, At as buildHeapSample, B as AGENT_CAP_FWD_ACTION, C as brokerTransportLink, Ct as runNpm, D as localProviderLink, Dt as HEAP_WATCH_INTERVAL_MS, E as ipcParentLink, Et as HEAP_RECLAIM_TRIGGER_MB, F as createUdsLogger, Ft as strandedMb, G as callWithServiceDiscovery, H as CapRouteResolver, I as createUdsLoggerWithControl, J as UdsLocalTransportServer, K as createLocalTransport, L as LocalChildClient, M as createUdsEventBridge, Mt as shouldReclaim, N as createUdsEventBus, Nt as startHeapWatch, O as HUB_CAP_FWD_ACTION, Ot as HEAP_WATCH_WARN_RATIO, P as udsChildLogToWorkerEntry, Pt as startRunnerHeapWatch, Q as encodeFrame, R as LocalChildRegistry, S as brokerCallForCap, St as resolveNpmInvocation, T as ipcChildLink, Tt as HEAP_RECLAIM_MIN_INTERVAL_MS, U as CapRouteError, V as AGENT_CAP_FWD_SERVICE, W as classifyCapRoute, X as localEndpointPath, Y as SocketChannel, Z as FrameDecoder, _ as createKernelHwAccel, _t as CapabilityHandle, a as getWorkerDeviceRegistry, b as __resetCapUsageRegistryForTests, bt as installManifestNativeDeps, c as setHubConnected, ct as NATIVE_PROVIDER_SERVICE_INFIX, d as getBrokerEventBus, dt as capBareAction, et as buildUdsNativeCapProxy, f as getMoleculerEventStats, ft as capServiceName, g as AddonDepsManager, gt as DeviceRegistry, h as subscribePassthrough, ht as serializeTypedArrays, i as createUdsAddonContext, it as mountNativeCapService, j as createParentUnownedCallHandler, jt as createV8Reclaimer, k as HUB_CAP_FWD_SERVICE, kt as RUNNER_HEAP_WATCH_INTERVAL_MS, l as EVENT_TOPIC_PREFIX, lt as capActionName, m as setNodeEventInterest, mt as deserializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as createAddonService, p as registerEventBusService, pt as parseCapAction, q as UdsLocalTransportClient, r as createAddonContext, s as getOrInitReadinessRegistryForClient, st as validateProviderRegistrations, t as installManifestPythonDeps, tt as createBrokerDeviceManagerApi, u as clusterEventTopic, ut as capActionSuffix, v as resolveHwAccel, vt as CapabilityUnavailableError, w as buildLinkChain, wt as createAddonDataPlaneFacility, x as getCapUsageRegistry, xt as resolveAddonClass, y as CapUsageRegistry, yt as copyBundledNativeModules, z as UDS_NO_ROUTE_PREFIX } from "./manifest-python-deps-Dmcnb287.mjs";
27
+ import { C as registerLanHttpHandler, S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, b as bindPendingLanHttp, c as loadTlsCert, d as collectCertIdentity, f as CA_VALIDITY_DAYS, g as evaluateExistingCert, h as SERVER_AUTH_OID, i as writeExtraSans, l as reissueTlsLeaf, m as MAX_LEAF_VALIDITY_DAYS, n as readTlsAccessStatus, o as validateUploadedTls, p as LEAF_RENEWAL_WINDOW_DAYS, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, u as CA_COMMON_NAME, v as allFamiliesListenHost, x as closeLanHttp, y as applyLanHttp } from "./tls-CQhPGSJm.mjs";
28
+ import { $ as buildNativeCapProxy, A as createHubCapForwardService, At as buildHeapSample, B as AGENT_CAP_FWD_ACTION, C as brokerTransportLink, Ct as runNpm, D as localProviderLink, Dt as HEAP_WATCH_INTERVAL_MS, E as ipcParentLink, Et as HEAP_RECLAIM_TRIGGER_MB, F as createUdsLogger, Ft as strandedMb, G as callWithServiceDiscovery, H as CapRouteResolver, I as createUdsLoggerWithControl, J as UdsLocalTransportServer, K as createLocalTransport, L as LocalChildClient, M as createUdsEventBridge, Mt as shouldReclaim, N as createUdsEventBus, Nt as startHeapWatch, O as HUB_CAP_FWD_ACTION, Ot as HEAP_WATCH_WARN_RATIO, P as udsChildLogToWorkerEntry, Pt as startRunnerHeapWatch, Q as encodeFrame, R as LocalChildRegistry, S as brokerCallForCap, St as resolveNpmInvocation, T as ipcChildLink, Tt as HEAP_RECLAIM_MIN_INTERVAL_MS, U as CapRouteError, V as AGENT_CAP_FWD_SERVICE, W as classifyCapRoute, X as localEndpointPath, Y as SocketChannel, Z as FrameDecoder, _ as createKernelHwAccel, _t as CapabilityHandle, a as getWorkerDeviceRegistry, b as __resetCapUsageRegistryForTests, bt as installManifestNativeDeps, c as setHubConnected, ct as NATIVE_PROVIDER_SERVICE_INFIX, d as getBrokerEventBus, dt as capBareAction, et as buildUdsNativeCapProxy, f as getMoleculerEventStats, ft as capServiceName, g as AddonDepsManager, gt as DeviceRegistry, h as subscribePassthrough, ht as serializeTypedArrays, i as createUdsAddonContext, it as mountNativeCapService, j as createParentUnownedCallHandler, jt as createV8Reclaimer, k as HUB_CAP_FWD_SERVICE, kt as RUNNER_HEAP_WATCH_INTERVAL_MS, l as EVENT_TOPIC_PREFIX, lt as capActionName, m as setNodeEventInterest, mt as deserializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as createAddonService, p as registerEventBusService, pt as parseCapAction, q as UdsLocalTransportClient, r as createAddonContext, s as getOrInitReadinessRegistryForClient, st as validateProviderRegistrations, t as installManifestPythonDeps, tt as createBrokerDeviceManagerApi, u as clusterEventTopic, ut as capActionSuffix, v as resolveHwAccel, vt as CapabilityUnavailableError, w as buildLinkChain, wt as createAddonDataPlaneFacility, x as getCapUsageRegistry, xt as resolveAddonClass, y as CapUsageRegistry, yt as copyBundledNativeModules, z as UDS_NO_ROUTE_PREFIX } from "./manifest-python-deps-08rqn6xN.mjs";
28
29
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-BWmQ5i-o.mjs";
29
- import { C as evaluateExistingCert, S as SERVER_AUTH_OID, _ as CA_COMMON_NAME, a as closeLanHttp, b as LEAF_RENEWAL_WINDOW_DAYS, c as readExtraSans, d as writeExtraSans, f as writeTlsMode, g as reissueTlsLeaf, h as loadTlsCert, i as bindPendingLanHttp, l as readTlsAccessStatus, m as ensureTlsCert, n as allFamiliesListenHost, o as readLanHttpState, p as validateUploadedTls, r as applyLanHttp, s as registerLanHttpHandler, t as DEFAULT_LAN_HTTP_PORT, u as readTlsMode, v as collectCertIdentity, x as MAX_LEAF_VALIDITY_DAYS, y as CA_VALIDITY_DAYS } from "./lan-http-bind-jKrj6OjQ.mjs";
30
30
  import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
31
31
  import { z } from "zod";
32
32
  import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
@@ -366,6 +366,24 @@ var DataPlaneRegistry = class {
366
366
  };
367
367
  }
368
368
  };
369
+ /**
370
+ * Whether an addon can serve a data-plane RIGHT NOW.
371
+ *
372
+ * Extracted as a predicate because the three ways of answering "no" used to be
373
+ * three early `return`s inside the mount path, and every one of them left the
374
+ * PREVIOUS registration standing. The registry then held a `baseUrl` pointing
375
+ * at the port of a process that no longer existed, and `/addon/:addonId/*` kept
376
+ * reverse-proxying to it — a 502 per request until a replacement child finished
377
+ * handshaking, and forever for an addon removed from disk. `unregisterAddon`
378
+ * existed for exactly this and had no call site anywhere in the repo.
379
+ *
380
+ * A `false` here means UNREGISTER, never "leave it alone". Dropping is the safe
381
+ * direction: an absent data-plane falls through to the control-route path,
382
+ * while a stale one sends live traffic at a dead socket.
383
+ */
384
+ function canServeDataPlane(state) {
385
+ return state.hasEntry && state.isForked && state.childKnown;
386
+ }
369
387
  //#endregion
370
388
  //#region src/http/reverse-proxy.ts
371
389
  /**
@@ -93997,6 +94015,34 @@ function positiveInt(raw, fallback) {
93997
94015
  const n = Number.parseInt(raw, 10);
93998
94016
  return Number.isFinite(n) && n > 0 ? n : fallback;
93999
94017
  }
94018
+ /**
94019
+ * The child's environment, with the allocator pair applied or REMOVED.
94020
+ *
94021
+ * `runnerNativeAllocatorEnv` returns what to add. That was sufficient while the
94022
+ * parent had nothing to inherit: omitting a key meant the child never saw it.
94023
+ * Once the image entrypoint welds the pair into the container environment — the
94024
+ * change that lets an operator drop them from the Unraid template — the child
94025
+ * INHERITS them, and a kill switch that only omits is a kill switch that does
94026
+ * nothing.
94027
+ *
94028
+ * So `CAMSTACK_RUNNER_NATIVE_ALLOCATOR=off` DELETES. And only that: the
94029
+ * non-linux path returns nothing to add for its own reasons (the pin is a pure
94030
+ * throughput cut there — measured `sharp.concurrency()` 6 on the darwin agent
94031
+ * against 1 on the linux hub) and must not be read as "remove what the operator
94032
+ * chose". Deletion is the switch's job, not absence's.
94033
+ */
94034
+ function applyRunnerNativeAllocator(parentEnv, platform = process.platform) {
94035
+ const next = { ...parentEnv };
94036
+ if (parentEnv["CAMSTACK_RUNNER_NATIVE_ALLOCATOR"] === "off") {
94037
+ delete next["MALLOC_ARENA_MAX"];
94038
+ delete next["VIPS_CONCURRENCY"];
94039
+ return next;
94040
+ }
94041
+ return {
94042
+ ...next,
94043
+ ...runnerNativeAllocatorEnv(parentEnv, platform)
94044
+ };
94045
+ }
94000
94046
  //#endregion
94001
94047
  //#region src/kernel/moleculer/process-service.ts
94002
94048
  /**
@@ -94294,7 +94340,7 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
94294
94340
  CAMSTACK_LOG_LEVEL: process.env["CAMSTACK_LOG_LEVEL"] ?? "info",
94295
94341
  ...parentTcpPort !== void 0 ? { CAMSTACK_PARENT_TCP_PORT: String(parentTcpPort) } : {},
94296
94342
  ...parentUdsPath !== void 0 ? { CAMSTACK_PARENT_UDS_PATH: parentUdsPath } : {},
94297
- ...runnerNativeAllocatorEnv(process.env),
94343
+ ...applyRunnerNativeAllocator(process.env),
94298
94344
  ...env
94299
94345
  };
94300
94346
  const heapFlags = runnerHeapFlags(addons);
@@ -95038,4 +95084,4 @@ var LifecycleJobEngine = class {
95038
95084
  }
95039
95085
  };
95040
95086
  //#endregion
95041
- export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_READINESS_SERVICE_NAME, ALL_CAPABILITY_DEFINITIONS, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRouteRegistry, AlertCenterAddon, ApiKeyManager, AuthManager, CA_COMMON_NAME, CA_VALIDITY_DAYS, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DEFAULT_DATA_PATH, DEFAULT_LAN_HTTP_PORT, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LokiDestination, LokiLoggingAddon, MAX_LEAF_VALIDITY_DAYS, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, RESTART_MARKER_FILE, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, SERVER_AUTH_OID, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, __resetCapUsageRegistryForTests, adaptBrokerToCluster, addonSettingsCapability, allFamiliesListenHost, applyLanHttp, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, closeLanHttp, clusterEventTopic, clusterSecretMatches, collectCertIdentity, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonService, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCoreCapService, createDoorSettingsView, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createKernelHwAccel, createLocalTransport, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, detectWorkspacePackagesDir, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, fetchJson, findInPath, formatLogLine, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, installManifestNativeDeps, installManifestPythonDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcChildLink, ipcParentLink, isAddonDeploySource, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, isolatedBuiltinPhase, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, parseCapAction, parseRangeHeader, parseTokenizedUrl, partitionIsolatedBuiltinIds, proxyToUpstream, quarantineAddonResidue, readExtraSans, readLanHttpState, readPendingRestart, readTlsAccessStatus, readTlsMode, readinessKey, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runHubAddonBoot, runNpm, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, serializeTypedArrays, setHubConnected, setNodeEventInterest, shouldReclaim, startHeapWatch, startRunnerHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
95087
+ export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_READINESS_SERVICE_NAME, ALL_CAPABILITY_DEFINITIONS, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRouteRegistry, AlertCenterAddon, ApiKeyManager, AuthManager, CA_COMMON_NAME, CA_VALIDITY_DAYS, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DEFAULT_DATA_PATH, DEFAULT_LAN_HTTP_PORT, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LokiDestination, LokiLoggingAddon, MAX_LEAF_VALIDITY_DAYS, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, RESTART_MARKER_FILE, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, SERVER_AUTH_OID, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, __resetCapUsageRegistryForTests, adaptBrokerToCluster, addonSettingsCapability, allFamiliesListenHost, applyLanHttp, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, closeLanHttp, clusterEventTopic, clusterSecretMatches, collectCertIdentity, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonService, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCoreCapService, createDoorSettingsView, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createKernelHwAccel, createLocalTransport, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, detectWorkspacePackagesDir, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, fetchJson, findInPath, formatLogLine, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, installManifestNativeDeps, installManifestPythonDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcChildLink, ipcParentLink, isAddonDeploySource, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, isolatedBuiltinPhase, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, parseCapAction, parseRangeHeader, parseTokenizedUrl, partitionIsolatedBuiltinIds, proxyToUpstream, quarantineAddonResidue, readExtraSans, readLanHttpState, readPendingRestart, readTlsAccessStatus, readTlsMode, readinessKey, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runHubAddonBoot, runNpm, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, serializeTypedArrays, setHubConnected, setNodeEventInterest, shouldReclaim, startHeapWatch, startRunnerHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
@@ -93,3 +93,20 @@ export interface RunnerNativeAllocatorEnv {
93
93
  * exists to leave.
94
94
  */
95
95
  export declare function runnerNativeAllocatorEnv(parentEnv: NodeJS.ProcessEnv, platform?: NodeJS.Platform): RunnerNativeAllocatorEnv;
96
+ /**
97
+ * The child's environment, with the allocator pair applied or REMOVED.
98
+ *
99
+ * `runnerNativeAllocatorEnv` returns what to add. That was sufficient while the
100
+ * parent had nothing to inherit: omitting a key meant the child never saw it.
101
+ * Once the image entrypoint welds the pair into the container environment — the
102
+ * change that lets an operator drop them from the Unraid template — the child
103
+ * INHERITS them, and a kill switch that only omits is a kill switch that does
104
+ * nothing.
105
+ *
106
+ * So `CAMSTACK_RUNNER_NATIVE_ALLOCATOR=off` DELETES. And only that: the
107
+ * non-linux path returns nothing to add for its own reasons (the pin is a pure
108
+ * throughput cut there — measured `sharp.concurrency()` 6 on the darwin agent
109
+ * against 1 on the linux hub) and must not be read as "remove what the operator
110
+ * chose". Deletion is the switch's job, not absence's.
111
+ */
112
+ export declare function applyRunnerNativeAllocator(parentEnv: NodeJS.ProcessEnv, platform?: NodeJS.Platform): NodeJS.ProcessEnv;