@camstack/system 1.2.345 → 1.2.346

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,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-CqafgUSr.js");
4
- const require_tls = require("../../tls-D_wUeOTD.js");
4
+ const require_tls = require("../../tls-DEjOOARt.js");
5
5
  let node_fs_promises = require("node:fs/promises");
6
6
  let node_path = require("node:path");
7
7
  let node_fs = require("node:fs");
@@ -1,5 +1,5 @@
1
1
  import { Bt as localNetworkCapability, Gn as BaseAddon, gr as EventCategory } from "../../dist-0zO6jHkf.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-IM-v7JV4.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-DAtaKVUT.mjs";
3
3
  import { mkdir, writeFile } from "node:fs/promises";
4
4
  import { join } from "node:path";
5
5
  import { readFileSync } from "node:fs";
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ const require_builtins_system_config_system_config_addon = require("./builtins/s
30
30
  require("./builtins/system-config/index.js");
31
31
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
32
32
  const require_event_loop_stall_monitor = require("./event-loop-stall-monitor-ey4mbofz.js");
33
- const require_tls$1 = require("./tls-D_wUeOTD.js");
33
+ const require_tls$1 = require("./tls-DEjOOARt.js");
34
34
  const require_child_cap_dispatch = require("./child-cap-dispatch-Bm4Kpo7v.js");
35
35
  const require_resource_monitor = require("./resource-monitor-DzNn_IZK.js");
36
36
  const require_custom_action_registry = require("./custom-action-registry-acBY3mHA.js");
package/dist/index.mjs CHANGED
@@ -29,7 +29,7 @@ import { SystemConfigAddon } from "./builtins/system-config/system-config.addon.
29
29
  import "./builtins/system-config/index.mjs";
30
30
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
31
31
  import { _ as ensureModel, a as createFileDataPlaneHandler, c as parseRangeHeader, d as ModelDownloadService, g as downloadModel, h as downloadFile, i as startEventLoopStallMonitor, l as parseTokenizedUrl, m as deleteModelFromDisk, n as STALL_TICK_MS, o as contentTypeFor, p as collectModelFiles, r as attributeStall, s as createAuthenticatedFileServer, t as STALL_REPORT_MS, u as resolveFilePath, v as fetchJson, x as isModelDownloaded, y as getModelFilePath } from "./event-loop-stall-monitor-EXjzIxDz.mjs";
32
- 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-IM-v7JV4.mjs";
32
+ 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-DAtaKVUT.mjs";
33
33
  import { $ as CapRouteError, $n as CAP_ACTION_UNLABELLED, $t as RUNNER_HEAP_WATCH_INTERVAL_MS, A as resolveHwAccel, An as OUTBOUND_QUEUE_COOLDOWN_MS, At as serializeTypedArrays, B as udsChildLogToWorkerEntry, Bn as SOCKET_QUEUE_TOP_N, Bt as createAddonPeerBytesFacility, C as getBrokerEventBus, Cn as DECISIVE_HEAP_SPACES, Ct as NATIVE_PROVIDER_SERVICE_INFIX, D as subscribePassthrough, Dn as heapSpaceField, Dt as capServiceName, E as setNodeEventInterest, En as formatHeapSpaces, Et as capBareAction, F as ipcParentLink, Fn as MESH_QUEUE_TOP_N, Ft as installManifestNativeDeps, G as UDS_NO_ROUTE_PREFIX, Gn as readSocketQueues, Gt as HEAP_RECLAIM_TRIGGER_MB, H as createUdsLoggerWithControl, Hn as createSocketPlaneReader, Ht as createAddonDataPlaneFacility, I as localProviderLink, In as createMeshQueueReader, It as resolveAddonClass, J as answerClaimedGetStatus, Jn as recordSocketFrame, Jt as HUB_MAIN_HEAP_WATCH_LABEL, K as afterWorkerOnlineAnnounce, Kn as EMPTY_SOCKET_DIRECTION, Kt as HEAP_WATCH_INTERVAL_MS, L as createParentUnownedCallHandler, Ln as formatMeshQueue, Lt as buildNpmChildEnv, M as brokerTransportLink, Mn as OUTBOUND_QUEUE_THRESHOLD_BYTES, Mt as CapabilityHandle, N as buildLinkChain, Nn as createOutboundQueueGate, Nt as CapabilityUnavailableError, O as AddonDepsManager, On as readHeapSpaces, Ot as parseCapAction, P as deviceCapResolverLink, Pn as formatOutboundQueueVerdict, Pt as copyBundledNativeModules, Q as CapRouteResolver, Qn as CAP_ACTION_OVERFLOW_LABEL, Qt as RSS_BUDGET_RELEASE_RATIO, R as createUdsEventBridge, Rn as EMPTY_SOCKET_PLANE_BASELINE, Rt as resolveNpmInvocation, S as clusterEventTopic, Sn as isArrayBufferCensusReport, St as validateProviderRegistrations, T as registerEventBusService, Tn as emitHeapDiagnosticReport, Tt as capActionSuffix, U as LocalChildClient, Un as diffSocketPlane, Ut as HEAP_RECLAIM_MIN_INTERVAL_MS, V as createUdsLogger, Vn as createSocketPlaneMeter, Vt as hostNodeIdOf, W as LocalChildRegistry, Wn as formatSocketPlane, Wt as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, X as AGENT_CAP_FWD_ACTION, Xn as socketDirectionBytes, Xt as HUB_RSS_BUDGET_ENV, Y as deviceOfGetStatus, Yn as sampleSocketDirection, Yt as HUB_MAIN_RSS_BUDGET_MB, Z as AGENT_CAP_FWD_SERVICE, Zn as socketDirectionMessages, Zt as RSS_BUDGET_REANNOUNCE_MIN_MS, _ as getWorkerDeviceRegistry, _n as ARRAY_BUFFER_CENSUS_THRESHOLD_MB, a as reapProcessGroup, an as createV8Reclaimer, ar as EVENT_PLANE_TOP_N, at as __resetCapUsageRegistryForTests, b as setHubConnected, bn as createInspectorArrayBufferCensus, c as runnerOwnsProcessGroup, cn as nextRssBudgetState, cr as diffEventPlane, ct as UdsLocalTransportClient, d as summarizeMembers, dn as shouldReclaim, dt as PeerAnsweredError, en as RUNNER_RSS_BUDGET_ENV, er as EMPTY_CAP_ACTION_READING, et as classifyCapRoute, f as installManifestSystemDeps, fn as startHeapWatch, ft as localEndpointPath, g as createUdsAddonContext, gn as ARRAY_BUFFER_CENSUS_SUSTAIN_MS, gt as createBrokerDeviceManagerApi, h as createAddonContext, hn as ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ht as buildNativeCapProxy, in as createLoopDelayMeter, ir as diffCapActionCensus, it as PARENT_ROUTED_PROVIDER_ADDON_ID, j as brokerCallForCap, jn as OUTBOUND_QUEUE_SUSTAIN_MS, jt as DeviceRegistry, k as createKernelHwAccel, kn as selectReportedSpaces, kt as deserializeTypedArrays, l as signalAllRunnerGroups, ln as parseRssBudgetMb, lr as formatEventPlane, lt as UdsLocalTransportServer, m as adaptBrokerToCluster, mn as strandedMb, mt as encodeFrame, nn as buildHeapSample, nr as capActionLabel, nt as readMoleculerFanoutMode, o as registerRunnerGroup, on as describeRss, or as createEventPlaneMeter, ot as getCapUsageRegistry, p as installManifestPythonDeps, pn as startRunnerHeapWatch, pt as FrameDecoder, q as GET_STATUS_METHOD, qn as createSocketDirectionCounters, qt as HEAP_WATCH_WARN_RATIO, r as defaultProcessGroupOps, rn as createDeferredHeapWatchSink, rr as createCapActionCensus, rt as CapUsageRegistry, s as releaseRunnerGroup, sn as hubMainRssBudget, sr as createEventPlaneReader, st as createLocalTransport, t as CAP_METHOD_NOT_IMPLEMENTED, tn as ZERO_LOOP_DELAY, tr as MAX_CAP_ACTIONS_PER_PEER, tt as callWithServiceDiscovery, un as reclaimIntervalMs, ut as SocketChannel, v as getOrInitReadinessRegistry, vn as ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, w as getMoleculerEventStats, wn as HEAP_SPACE_REPORT_MIN_MB, wt as capActionName, x as EVENT_TOPIC_PREFIX, xn as formatArrayBufferCensus, xt as createAddonService, y as getOrInitReadinessRegistryForClient, yn as createArrayBufferCensusGate, yt as mountNativeCapService, z as createUdsEventBus, zn as SOCKET_PLANE_TOP_N, zt as runNpm } from "./child-cap-dispatch-B52e2Bcw.mjs";
34
34
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-B1v6E07R.mjs";
35
35
  import { t as CustomActionRegistry } from "./custom-action-registry-B4Cf4O_X.mjs";
@@ -24,9 +24,10 @@ export declare function systemHostFacts(): HostFacts;
24
24
  *
25
25
  * The two are deliberately different sizes. Everything plausible is
26
26
  * certified — costs nothing. Only a **stable** identity gates
27
- * regeneration, because a gate that fires on a rotating address rewrites
28
- * the certificate on every boot, which is a worse bug than the one the
29
- * gate exists to fix.
27
+ * regeneration (IPv4 + DNS + operator `extraSans`), because a gate that
28
+ * fires on a rotating address rewrites the certificate on every boot,
29
+ * which is a worse bug than the one the gate exists to fix. IPv6 never
30
+ * gates — ULA proved as unstable as global SLAAC on the live hub.
30
31
  */
31
32
  export interface CertIdentity {
32
33
  readonly dnsNames: readonly string[];
@@ -68,8 +68,9 @@ export interface CertOptions {
68
68
  *
69
69
  * And explicitly NOT when: the certificate names an address the machine
70
70
  * no longer has (a superset still works — the check is one-directional),
71
- * a volatile interface (docker/VPN/mesh) or a global-scope IPv6 address
72
- * changed (SLAAC privacy addresses rotate daily), or a new build shipped.
71
+ * a volatile interface (docker/VPN/mesh) or **any** IPv6 address changed
72
+ * (global and ULA both rotate under privacy extensions / interface-id
73
+ * churn — `os` cannot tell temporary from permanent), or a new build shipped.
73
74
  *
74
75
  * Every trigger is derived from the files plus the machine, so once a
75
76
  * reissue clears them it clears them for good: the next boot returns
@@ -277,27 +277,21 @@ function isLinkLocal(value) {
277
277
  const parsed = Number.parseInt(firstGroup, 16);
278
278
  return Number.isFinite(parsed) && (parsed & 65472) === 65152;
279
279
  }
280
- /** `fc00::/7` — the IPv6 range that behaves like RFC 1918 does for v4. */
281
- function isUniqueLocalIpv6(value) {
282
- if (!isIpv6(value)) return false;
283
- const firstGroup = value.split(":")[0] ?? "";
284
- const parsed = Number.parseInt(firstGroup, 16);
285
- return Number.isFinite(parsed) && (parsed & 65024) === 64512;
286
- }
287
280
  function isVolatileInterface(name) {
288
281
  const lower = name.toLowerCase();
289
282
  return VOLATILE_INTERFACE_PREFIXES.some((prefix) => lower.startsWith(prefix));
290
283
  }
291
284
  /**
292
- * A global-scope IPv6 address is NOT a stable identity: SLAAC privacy
293
- * extensions rotate temporary addresses roughly daily, and `os` gives us
294
- * no way to tell a temporary address from a permanent one. Gating on
295
- * one would reissue the certificate every day.
285
+ * Only IPv4 gates a reissue. Every IPv6 address we see — global **or**
286
+ * ULA — is certified but never required: `os` cannot tell a temporary
287
+ * address from a permanent one, and the live hub's ULA interface-id
288
+ * rotated on every restart (eight leaf reissues in one day under
289
+ * `san-coverage-gap`). Gating on ULA reproduced the churn D227 exists
290
+ * to prevent. Operators who need a fixed IPv6 declare it via `extraSans`.
296
291
  */
297
292
  function isStableGateAddress(address) {
298
293
  if (isLinkLocal(address)) return false;
299
- if (isIpv4(address)) return true;
300
- return isUniqueLocalIpv6(address);
294
+ return isIpv4(address);
301
295
  }
302
296
  function addSan(dns, ips, value) {
303
297
  const trimmed = value.trim();
@@ -11711,8 +11705,9 @@ var DEFAULT_COMMON_NAME = "camstack.local";
11711
11705
  *
11712
11706
  * And explicitly NOT when: the certificate names an address the machine
11713
11707
  * no longer has (a superset still works — the check is one-directional),
11714
- * a volatile interface (docker/VPN/mesh) or a global-scope IPv6 address
11715
- * changed (SLAAC privacy addresses rotate daily), or a new build shipped.
11708
+ * a volatile interface (docker/VPN/mesh) or **any** IPv6 address changed
11709
+ * (global and ULA both rotate under privacy extensions / interface-id
11710
+ * churn — `os` cannot tell temporary from permanent), or a new build shipped.
11716
11711
  *
11717
11712
  * Every trigger is derived from the files plus the machine, so once a
11718
11713
  * reissue clears them it clears them for good: the next boot returns
@@ -278,27 +278,21 @@ function isLinkLocal(value) {
278
278
  const parsed = Number.parseInt(firstGroup, 16);
279
279
  return Number.isFinite(parsed) && (parsed & 65472) === 65152;
280
280
  }
281
- /** `fc00::/7` — the IPv6 range that behaves like RFC 1918 does for v4. */
282
- function isUniqueLocalIpv6(value) {
283
- if (!isIpv6(value)) return false;
284
- const firstGroup = value.split(":")[0] ?? "";
285
- const parsed = Number.parseInt(firstGroup, 16);
286
- return Number.isFinite(parsed) && (parsed & 65024) === 64512;
287
- }
288
281
  function isVolatileInterface(name) {
289
282
  const lower = name.toLowerCase();
290
283
  return VOLATILE_INTERFACE_PREFIXES.some((prefix) => lower.startsWith(prefix));
291
284
  }
292
285
  /**
293
- * A global-scope IPv6 address is NOT a stable identity: SLAAC privacy
294
- * extensions rotate temporary addresses roughly daily, and `os` gives us
295
- * no way to tell a temporary address from a permanent one. Gating on
296
- * one would reissue the certificate every day.
286
+ * Only IPv4 gates a reissue. Every IPv6 address we see — global **or**
287
+ * ULA — is certified but never required: `os` cannot tell a temporary
288
+ * address from a permanent one, and the live hub's ULA interface-id
289
+ * rotated on every restart (eight leaf reissues in one day under
290
+ * `san-coverage-gap`). Gating on ULA reproduced the churn D227 exists
291
+ * to prevent. Operators who need a fixed IPv6 declare it via `extraSans`.
297
292
  */
298
293
  function isStableGateAddress(address) {
299
294
  if (isLinkLocal(address)) return false;
300
- if (isIpv4(address)) return true;
301
- return isUniqueLocalIpv6(address);
295
+ return isIpv4(address);
302
296
  }
303
297
  function addSan(dns, ips, value) {
304
298
  const trimmed = value.trim();
@@ -11712,8 +11706,9 @@ var DEFAULT_COMMON_NAME = "camstack.local";
11712
11706
  *
11713
11707
  * And explicitly NOT when: the certificate names an address the machine
11714
11708
  * no longer has (a superset still works — the check is one-directional),
11715
- * a volatile interface (docker/VPN/mesh) or a global-scope IPv6 address
11716
- * changed (SLAAC privacy addresses rotate daily), or a new build shipped.
11709
+ * a volatile interface (docker/VPN/mesh) or **any** IPv6 address changed
11710
+ * (global and ULA both rotate under privacy extensions / interface-id
11711
+ * churn — `os` cannot tell temporary from permanent), or a new build shipped.
11717
11712
  *
11718
11713
  * Every trigger is derived from the files plus the machine, so once a
11719
11714
  * reissue clears them it clears them for good: the next boot returns
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.345",
3
+ "version": "1.2.346",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",