@camstack/system 1.2.435 → 1.2.437
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/{agent-https-B8lKYVtU.mjs → agent-https-BPfHrI4c.mjs} +3 -3
- package/dist/auth/login-session-manager.d.ts +2 -0
- package/dist/auth/session-revocation-bus.d.ts +32 -0
- 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 +2 -2
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/dist/builtins/calendars/calendars.addon.js +1 -1
- package/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/composer.addon.js +2 -2
- package/dist/builtins/composer/composer.addon.mjs +2 -2
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +5 -5
- 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/keychain/index.js +6 -7
- package/dist/builtins/keychain/index.mjs +6 -7
- package/dist/builtins/keychain/keychain-service.d.ts +1 -2
- package/dist/builtins/keychain/system-held-secrets.d.ts +5 -5
- 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 +43 -2
- package/dist/builtins/local-auth/local-auth.addon.mjs +43 -3
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +4 -4
- 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 +10 -10
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +8 -8
- 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/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/index.js +1 -1
- package/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- 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.d.ts +11 -23
- package/dist/builtins/system-config/system-config.addon.js +219 -1479
- package/dist/builtins/system-config/system-config.addon.mjs +222 -1472
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{composition-sources-Cm42mgbv.js → composition-sources-BIT8IUKm.js} +1 -1
- package/dist/{composition-sources-_7W2Ly9s.mjs → composition-sources-tpYR0f1x.mjs} +1 -1
- package/dist/constants-Bc6trhoW.mjs +20 -0
- package/dist/constants-CwRY32Nx.js +66 -0
- package/dist/{device-ca-B6YJZus6.mjs → device-ca-BhdBByGD.mjs} +1 -1
- package/dist/{device-ca-WXuKc8AX.js → device-ca-DImD8IzR.js} +1 -1
- package/dist/{dist-CnUtkSwN.js → dist-CEAyXW3Q.js} +42 -12
- package/dist/{dist-Bz4_y8Xy.mjs → dist-m5JkT8UN.mjs} +33 -3
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/{hub-mdns-ciao-DJRwtlA8.mjs → hub-mdns-ciao-DMlQTdPU.mjs} +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +135 -796
- package/dist/index.mjs +150 -769
- package/dist/kernel/index.d.ts +7 -21
- package/dist/kernel/moleculer/agent-ui-unlock.d.ts +7 -32
- package/dist/kernel/moleculer/broker-factory.d.ts +3 -9
- package/dist/kernel/moleculer/broker-transport-swap.d.ts +17 -0
- package/dist/kernel/moleculer/hub-service.d.ts +6 -16
- package/dist/kernel/moleculer/mesh-access-middleware.d.ts +7 -17
- package/dist/kernel/moleculer/mesh-identity.d.ts +57 -0
- package/dist/kernel/moleculer/mesh-mtls/constants.d.ts +1 -4
- package/dist/kernel/moleculer/mesh-mtls/index.d.ts +1 -4
- package/dist/kernel/moleculer/mesh-mtls/mesh-ca.d.ts +1 -1
- package/dist/kernel/moleculer/mesh-mtls/mesh-renewal.d.ts +1 -1
- package/dist/kernel/moleculer/node-registry.d.ts +0 -6
- package/dist/kernel/moleculer/register-node-client.d.ts +9 -7
- package/dist/{restore-archive-BNoFLAg8.js → restore-archive-C75srVbG.js} +1 -1
- package/dist/{restore-archive-DJYuznWP.mjs → restore-archive-DNxAStrJ.mjs} +1 -1
- package/dist/{retired-settings-keys-9nA85bwT.mjs → retired-settings-keys-C5qP9QIf.mjs} +1 -1
- package/dist/{retired-settings-keys-CO3RqsDw.js → retired-settings-keys-DNfV28R_.js} +1 -1
- package/dist/{wal-maintenance-D3gwRj1B.js → wal-maintenance-Ch79gy9S.js} +0 -0
- package/dist/{wal-maintenance-DLrbapzi.mjs → wal-maintenance-DvnVO5IK.mjs} +0 -0
- package/package.json +1 -1
- package/dist/builtins/system-config/cluster-secret-keeper.d.ts +0 -63
- package/dist/constants-DL87WgeN.js +0 -221
- package/dist/constants-DoiTA134.mjs +0 -102
- package/dist/kernel/moleculer/agent-mesh-authenticator.d.ts +0 -91
- package/dist/kernel/moleculer/cluster-secret.d.ts +0 -46
- package/dist/kernel/moleculer/mesh-auth-mode.d.ts +0 -58
- package/dist/kernel/moleculer/mesh-authenticator.d.ts +0 -77
- package/dist/kernel/moleculer/mesh-auto-enforce.d.ts +0 -46
- package/dist/kernel/moleculer/mesh-join-client.d.ts +0 -73
- package/dist/kernel/moleculer/mesh-join-hold.d.ts +0 -85
- package/dist/kernel/moleculer/mesh-join-proof.d.ts +0 -39
- package/dist/kernel/moleculer/mesh-mtls/mesh-enroll.d.ts +0 -34
- package/dist/kernel/moleculer/mesh-mtls/mesh-join-token.d.ts +0 -56
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { C as DEVICE_ENROLLMENT_TTL_MS, Cr as BaseAddon, G as ScopedTokenSchema, Kt as formatDeviceRevoker, Q as UserRecordSchema, a as ApiKeyRecordSchema, ct as buildDeviceEnrollmentLink, er as userManagementCapability, jt as deviceCredentialsCapability, lt as buildDeviceSignatureMessage, q as SsoBridgeClaimsSchema, rt as authProviderCapability, w as DEVICE_NONCE_TTL_MS } from "../../dist-m5JkT8UN.mjs";
|
|
3
3
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
4
4
|
import { t as require_ms } from "../../ms-CgH2OFlD.mjs";
|
|
5
|
-
import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-
|
|
5
|
+
import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-BhdBByGD.mjs";
|
|
6
6
|
import * as crypto$1 from "node:crypto";
|
|
7
7
|
import { X509Certificate, createHash, randomUUID, timingSafeEqual } from "node:crypto";
|
|
8
8
|
import nodeCrypto from "crypto";
|
|
@@ -6448,6 +6448,33 @@ var ScopedTokenManager = class {
|
|
|
6448
6448
|
}
|
|
6449
6449
|
};
|
|
6450
6450
|
//#endregion
|
|
6451
|
+
//#region src/auth/session-revocation-bus.ts
|
|
6452
|
+
var BUS_KEY = Symbol.for("camstack.login-sessions.revocation-bus");
|
|
6453
|
+
function listeners() {
|
|
6454
|
+
const existing = Reflect.get(globalThis, BUS_KEY);
|
|
6455
|
+
if (existing instanceof Set) return existing;
|
|
6456
|
+
const created = /* @__PURE__ */ new Set();
|
|
6457
|
+
Reflect.set(globalThis, BUS_KEY, created);
|
|
6458
|
+
return created;
|
|
6459
|
+
}
|
|
6460
|
+
/** Subscribe; returns the unsubscribe. */
|
|
6461
|
+
function onSessionsRevoked(listener) {
|
|
6462
|
+
const set = listeners();
|
|
6463
|
+
set.add(listener);
|
|
6464
|
+
return () => {
|
|
6465
|
+
set.delete(listener);
|
|
6466
|
+
};
|
|
6467
|
+
}
|
|
6468
|
+
/** Announce an ended batch. A listener that throws never reaches the revoke. */
|
|
6469
|
+
function announceSessionsRevoked(event, onListenerError) {
|
|
6470
|
+
if (event.sessionIds.length === 0 && !event.allOfUser) return;
|
|
6471
|
+
for (const listener of [...listeners()]) try {
|
|
6472
|
+
listener(event);
|
|
6473
|
+
} catch (error) {
|
|
6474
|
+
onListenerError?.(error);
|
|
6475
|
+
}
|
|
6476
|
+
}
|
|
6477
|
+
//#endregion
|
|
6451
6478
|
//#region src/auth/login-session-manager.ts
|
|
6452
6479
|
/**
|
|
6453
6480
|
* Login sessions — the server-side record behind every session token.
|
|
@@ -6797,6 +6824,7 @@ var LoginSessionManager = class {
|
|
|
6797
6824
|
revokedReason: reason
|
|
6798
6825
|
};
|
|
6799
6826
|
this.replace(session, updated);
|
|
6827
|
+
this.announce([updated.id], session.userId, false, null, reason);
|
|
6800
6828
|
await this.persist(updated);
|
|
6801
6829
|
return true;
|
|
6802
6830
|
}
|
|
@@ -6820,6 +6848,7 @@ var LoginSessionManager = class {
|
|
|
6820
6848
|
this.replace(session, updated);
|
|
6821
6849
|
ended.push(updated);
|
|
6822
6850
|
}
|
|
6851
|
+
this.announce(ended.map((s) => s.id), userId, true, options.exceptSessionId ?? null, options.reason);
|
|
6823
6852
|
await this.persistCutoff(userId, at);
|
|
6824
6853
|
for (const session of ended) await this.persist(session);
|
|
6825
6854
|
return ended.length;
|
|
@@ -6838,6 +6867,7 @@ var LoginSessionManager = class {
|
|
|
6838
6867
|
this.replace(session, updated);
|
|
6839
6868
|
ended.push(updated);
|
|
6840
6869
|
}
|
|
6870
|
+
this.announce(ended.map((s) => s.id), null, false, null, reason);
|
|
6841
6871
|
for (const session of ended) await this.persist(session);
|
|
6842
6872
|
return ended.length;
|
|
6843
6873
|
}
|
|
@@ -6863,6 +6893,16 @@ var LoginSessionManager = class {
|
|
|
6863
6893
|
}
|
|
6864
6894
|
return dead.length;
|
|
6865
6895
|
}
|
|
6896
|
+
/** Tell the hub which sessions just ended — right after the mirror, before the store write. */
|
|
6897
|
+
announce(sessionIds, userId, allOfUser, exceptSessionId, reason) {
|
|
6898
|
+
announceSessionsRevoked({
|
|
6899
|
+
sessionIds,
|
|
6900
|
+
userId,
|
|
6901
|
+
allOfUser,
|
|
6902
|
+
exceptSessionId,
|
|
6903
|
+
reason
|
|
6904
|
+
}, (error) => this.logger?.error("A session-revocation listener threw — the revoke stands", { meta: { error: error instanceof Error ? error.message : String(error) } }));
|
|
6905
|
+
}
|
|
6866
6906
|
newRefreshToken() {
|
|
6867
6907
|
return `${REFRESH_TOKEN_PREFIX}${crypto$1.randomBytes(32).toString("base64url")}`;
|
|
6868
6908
|
}
|
|
@@ -12061,4 +12101,4 @@ var LocalAuthAddon = class extends BaseAddon {
|
|
|
12061
12101
|
}
|
|
12062
12102
|
};
|
|
12063
12103
|
//#endregion
|
|
12064
|
-
export { LocalAuthAddon, LocalAuthAddon as default,
|
|
12104
|
+
export { LocalAuthAddon, LocalAuthAddon as default, ApiKeyManager as S, ScopedTokenManager as _, attachUserManagementInternal as a, SettingsReadUnavailableError as b, DeviceCredentialManager as c, ADMIN_TOKEN_MAX_LIFETIME_MS as d, ADMIN_TOKEN_PREFIX as f, onSessionsRevoked as g, REFRESH_TOKEN_PREFIX as h, USER_MANAGEMENT_INTERNAL as i, PREVIOUS_LEAF_GRACE_MS as l, LoginSessionManager as m, FIRST_BOOT_ADMIN_USERNAME as n, getUserManagementInternal as o, AdminTokenManager as p, UserManager as r, AuthAuditLog as s, FIRST_BOOT_ADMIN_PASSWORD as t, DeviceCaStore as u, AuthManager as v, isSettingsReadUnavailable as x, parseTokenExpiry as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-CEAyXW3Q.js");
|
|
4
4
|
const require_hub_mdns_ciao = require("../../hub-mdns-ciao-CBLvq2oj.js");
|
|
5
5
|
let zod = require("zod");
|
|
6
6
|
let node_net = require("node:net");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as DEFAULT_LAN_HTTP_PORT, O as readLanHttpState, T as applyLanHttp, a as storeUploadedCertificate, b as ensureTlsCert, d as servedHttpsLeafFingerprint, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, m as readExtraSans, n as applyCertificateToListener, r as regenerateCertificate, t as createCiaoPublisher, v as writeExtraSans } from "../../hub-mdns-ciao-
|
|
1
|
+
import { B as NetworkTunnelStartedDataSchema, Cr as BaseAddon, Fn as resolveHubAddressRoles, M as HUB_MDNS_SERVICE_TYPE, N as HUB_MDNS_TXT_KEYS, Qt as isDefaultAppConnectionEndpoint, Rn as resolveNotificationTapAddress, Yt as isAppLinkBase, cn as localNetworkCapability, jn as resolveAppConnections, l as CAMSTACK_APP_LINK_ORIGIN, mt as checkRoleAddress, nr as validateCustomAddress, pi as EventCategory, wn as pickAppLinkHub } from "../../dist-m5JkT8UN.mjs";
|
|
2
|
+
import { C as DEFAULT_LAN_HTTP_PORT, O as readLanHttpState, T as applyLanHttp, a as storeUploadedCertificate, b as ensureTlsCert, d as servedHttpsLeafFingerprint, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, m as readExtraSans, n as applyCertificateToListener, r as regenerateCertificate, t as createCiaoPublisher, v as writeExtraSans } from "../../hub-mdns-ciao-DMlQTdPU.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { isIP } from "node:net";
|
|
5
|
-
import * as os from "node:os";
|
|
5
|
+
import * as os$1 from "node:os";
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
7
7
|
//#region src/builtins/local-network/address-book.ts
|
|
8
8
|
/**
|
|
@@ -1186,7 +1186,7 @@ var LocalNetworkAddon = class extends BaseAddon {
|
|
|
1186
1186
|
}
|
|
1187
1187
|
}
|
|
1188
1188
|
enumerate() {
|
|
1189
|
-
return enumerateOsInterfaces(os.networkInterfaces(), readLinuxIpv6Flags());
|
|
1189
|
+
return enumerateOsInterfaces(os$1.networkInterfaces(), readLinuxIpv6Flags());
|
|
1190
1190
|
}
|
|
1191
1191
|
/**
|
|
1192
1192
|
* Replace rotated IPv6 and drop addresses that no longer exist, without
|
|
@@ -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-CEAyXW3Q.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 { Cr as BaseAddon, un as logDestinationCapability } from "../../dist-m5JkT8UN.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-CEAyXW3Q.js");
|
|
7
7
|
let node_fs_promises = require("node:fs/promises");
|
|
8
8
|
let node_os = require("node:os");
|
|
9
9
|
node_os = require_chunk.__toESM(node_os);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Cr as BaseAddon, Gt as foldSnapshotByFunction, Mn as resolveBucketMs, Sr as errMsg, gn as metricsProviderCapability, kn as reducePoints, pi as EventCategory, zr as createEvent } from "../../dist-m5JkT8UN.mjs";
|
|
2
2
|
import { access, readFile, readdir } from "node:fs/promises";
|
|
3
|
-
import * as os from "node:os";
|
|
3
|
+
import * as os$1 from "node:os";
|
|
4
4
|
import { platform } from "node:os";
|
|
5
5
|
import * as fs from "node:fs";
|
|
6
6
|
import { constants, readFileSync } from "node:fs";
|
|
@@ -2008,8 +2008,8 @@ async function readNvidiaGpu(deps) {
|
|
|
2008
2008
|
}
|
|
2009
2009
|
//#endregion
|
|
2010
2010
|
//#region src/builtins/native-metrics/native-metrics-provider.ts
|
|
2011
|
-
var IS_DARWIN = os.platform() === "darwin";
|
|
2012
|
-
var IS_LINUX = os.platform() === "linux";
|
|
2011
|
+
var IS_DARWIN = os$1.platform() === "darwin";
|
|
2012
|
+
var IS_LINUX = os$1.platform() === "linux";
|
|
2013
2013
|
var NativeMetricsProvider = class {
|
|
2014
2014
|
id = "native";
|
|
2015
2015
|
cachedSnapshot = null;
|
|
@@ -2149,14 +2149,14 @@ var NativeMetricsProvider = class {
|
|
|
2149
2149
|
system: pct(dSys),
|
|
2150
2150
|
irq: pct(dIrq),
|
|
2151
2151
|
nice: pct(dNice),
|
|
2152
|
-
loadAvg: os.loadavg(),
|
|
2153
|
-
cores: os.cpus().length
|
|
2152
|
+
loadAvg: os$1.loadavg(),
|
|
2153
|
+
cores: os$1.cpus().length
|
|
2154
2154
|
};
|
|
2155
2155
|
}
|
|
2156
2156
|
/** Cached macOS memory (set by sampleMacMemory timer). */
|
|
2157
2157
|
_cachedMacMem = null;
|
|
2158
2158
|
getMemoryInfo() {
|
|
2159
|
-
const total = os.totalmem();
|
|
2159
|
+
const total = os$1.totalmem();
|
|
2160
2160
|
if (total === 0) return {
|
|
2161
2161
|
percent: 0,
|
|
2162
2162
|
totalBytes: 0,
|
|
@@ -2166,7 +2166,7 @@ var NativeMetricsProvider = class {
|
|
|
2166
2166
|
swapTotalBytes: 0
|
|
2167
2167
|
};
|
|
2168
2168
|
if (IS_DARWIN && this._cachedMacMem !== null) return this._cachedMacMem;
|
|
2169
|
-
const free = os.freemem();
|
|
2169
|
+
const free = os$1.freemem();
|
|
2170
2170
|
const used = total - free;
|
|
2171
2171
|
let swapUsedBytes = 0;
|
|
2172
2172
|
let swapTotalBytes = 0;
|
|
@@ -2188,7 +2188,7 @@ var NativeMetricsProvider = class {
|
|
|
2188
2188
|
}
|
|
2189
2189
|
};
|
|
2190
2190
|
function aggregateCpuTimes() {
|
|
2191
|
-
const cpus = os.cpus();
|
|
2191
|
+
const cpus = os$1.cpus();
|
|
2192
2192
|
let user = 0, nice = 0, sys = 0, irq = 0, idle = 0;
|
|
2193
2193
|
for (const cpu of cpus) {
|
|
2194
2194
|
user += cpu.times.user;
|
|
@@ -2221,7 +2221,7 @@ function sampleMacMemory(provider) {
|
|
|
2221
2221
|
const purgeable = parse("Pages purgeable");
|
|
2222
2222
|
const speculative = parse("Pages speculative");
|
|
2223
2223
|
const available = free + inactive + purgeable + speculative;
|
|
2224
|
-
const total = os.totalmem();
|
|
2224
|
+
const total = os$1.totalmem();
|
|
2225
2225
|
const used = total - available;
|
|
2226
2226
|
let swapUsedBytes = 0;
|
|
2227
2227
|
let swapTotalBytes = 0;
|
|
@@ -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-CEAyXW3Q.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,6 +1,6 @@
|
|
|
1
1
|
import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import * as os from "node:os";
|
|
2
|
+
import { Cr as BaseAddon, En as platformProbeCapability, Hn as scoreRuntimes, It as enumerateInferenceDevices, Sr as errMsg, Ur as emitReadiness, pi as EventCategory } from "../../dist-m5JkT8UN.mjs";
|
|
3
|
+
import * as os$1 from "node:os";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import { execFile } from "node:child_process";
|
|
6
6
|
import { promisify } from "node:util";
|
|
@@ -336,7 +336,7 @@ async function getAvailableRAM_MB() {
|
|
|
336
336
|
return Math.round(mem.available / 1024 / 1024);
|
|
337
337
|
} catch (err) {
|
|
338
338
|
console.debug(`systeminformation not available, using platform-specific RAM probe: ${errMsg(err)}`);
|
|
339
|
-
const platform = os.platform();
|
|
339
|
+
const platform = os$1.platform();
|
|
340
340
|
try {
|
|
341
341
|
if (platform === "darwin") {
|
|
342
342
|
const { stdout: output } = await execFileAsync("vm_stat", [], {
|
|
@@ -356,7 +356,7 @@ async function getAvailableRAM_MB() {
|
|
|
356
356
|
} catch (probeErr) {
|
|
357
357
|
console.debug(`RAM probe failed, using total RAM fallback: ${errMsg(probeErr)}`);
|
|
358
358
|
}
|
|
359
|
-
return Math.round(os.totalmem() / 1024 / 1024);
|
|
359
|
+
return Math.round(os$1.totalmem() / 1024 / 1024);
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
var PlatformScorer = class {
|
|
@@ -443,12 +443,12 @@ var PlatformScorer = class {
|
|
|
443
443
|
return this.cached;
|
|
444
444
|
}
|
|
445
445
|
async probeHardware() {
|
|
446
|
-
const platform = os.platform();
|
|
447
|
-
const arch = os.arch();
|
|
448
|
-
const cpus = os.cpus();
|
|
446
|
+
const platform = os$1.platform();
|
|
447
|
+
const arch = os$1.arch();
|
|
448
|
+
const cpus = os$1.cpus();
|
|
449
449
|
const cpuModel = cpus[0]?.model ?? "unknown";
|
|
450
450
|
const cpuCores = cpus.length;
|
|
451
|
-
const totalRAM_MB = Math.round(os.totalmem() / 1024 / 1024);
|
|
451
|
+
const totalRAM_MB = Math.round(os$1.totalmem() / 1024 / 1024);
|
|
452
452
|
const availableRAM_MB = await getAvailableRAM_MB();
|
|
453
453
|
this.logger.debug("RAM probed", { meta: {
|
|
454
454
|
totalRAM_MB,
|
|
@@ -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-CEAyXW3Q.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 BaseAddon, pi as EventCategory } from "../../dist-m5JkT8UN.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-CEAyXW3Q.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 { $r as nodePin, Cr as BaseAddon, Kn as snapshotCapability, Qn as streamQualityLabel, Sr as errMsg, at as bareAddonId, hn as memoizePinnedFfmpeg, kt as deriveBatteryPresence, ot as batteryCapability, pi as EventCategory, s as BatteryStatusSchema, xr as DeviceType, yr as DeviceFeature } from "../../dist-m5JkT8UN.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";
|
|
@@ -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-CEAyXW3Q.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 { Cr as BaseAddon, Wt as filesystemBrowseCapability, Xn as storageProviderCapability } from "../../dist-m5JkT8UN.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";
|
|
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
|
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
6
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./filesystem-storage.addon.js");
|
|
7
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
7
|
+
const require_wal_maintenance = require("../../wal-maintenance-Ch79gy9S.js");
|
|
8
8
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./sqlite-settings.addon.js");
|
|
9
9
|
//#region src/builtins/sqlite-storage/config-store.ts
|
|
10
10
|
var ConfigStore = class {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./filesystem-storage.addon.mjs";
|
|
2
|
-
import { A as SQLITE_PAGE_CACHE_CEILING_KIB, B as sqliteEngineStorm, D as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, F as SQLITE_PROFILE_REPORT_FLOOR_MS, I as SQLITE_PROFILE_REPORT_INTERVAL_MS, L as SQLITE_PROFILE_TOP_N, M as sqliteMmapSizeFor, N as sqlitePageCacheKibFor, O as SQLITE_MMAP_CEILING_BYTES, P as SQLITE_ENGINE_STORM_WALL_SHARE, R as SQLITE_SLOW_CALL_MS, a as WalMaintenance, c as SqliteSettingsBackend, i as WAL_MAINTENANCE_INTERVAL_MS, j as SQLITE_PAGE_CACHE_FLOOR_KIB, k as SQLITE_MMAP_FLOOR_BYTES, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as SqliteOpProfiler } from "../../wal-maintenance-
|
|
2
|
+
import { A as SQLITE_PAGE_CACHE_CEILING_KIB, B as sqliteEngineStorm, D as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, F as SQLITE_PROFILE_REPORT_FLOOR_MS, I as SQLITE_PROFILE_REPORT_INTERVAL_MS, L as SQLITE_PROFILE_TOP_N, M as sqliteMmapSizeFor, N as sqlitePageCacheKibFor, O as SQLITE_MMAP_CEILING_BYTES, P as SQLITE_ENGINE_STORM_WALL_SHARE, R as SQLITE_SLOW_CALL_MS, a as WalMaintenance, c as SqliteSettingsBackend, i as WAL_MAINTENANCE_INTERVAL_MS, j as SQLITE_PAGE_CACHE_FLOOR_KIB, k as SQLITE_MMAP_FLOOR_BYTES, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as SqliteOpProfiler } from "../../wal-maintenance-DvnVO5IK.mjs";
|
|
3
3
|
import { SqliteSettingsAddon } from "./sqlite-settings.addon.mjs";
|
|
4
4
|
//#region src/builtins/sqlite-storage/config-store.ts
|
|
5
5
|
var ConfigStore = class {
|
|
@@ -3,9 +3,9 @@ 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-
|
|
7
|
-
const require_retired_settings_keys = require("../../retired-settings-keys-
|
|
8
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
6
|
+
const require_dist = require("../../dist-CEAyXW3Q.js");
|
|
7
|
+
const require_retired_settings_keys = require("../../retired-settings-keys-DNfV28R_.js");
|
|
8
|
+
const require_wal_maintenance = require("../../wal-maintenance-Ch79gy9S.js");
|
|
9
9
|
const require_sqlite_snapshot_protocol = require("../../sqlite-snapshot-protocol-B9OndqZv.js");
|
|
10
10
|
const require_wal_checkpoint_policy = require("../../wal-checkpoint-policy-d2z2qPqx.js");
|
|
11
11
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys-
|
|
3
|
-
import { C as callControl, E as controlTargetOf, S as trustResult, T as callVector, _ as collectTransferables, a as WalMaintenance, c as SqliteSettingsBackend, d as CrossDatabaseTransactError, f as DatabaseBusyError, m as rehydrateError, o as createVectorIndex, p as DuplicatePlacementError, s as vectorProviderOf, u as CollectionPlacementError, v as isFileHostMessage, w as callData } from "../../wal-maintenance-
|
|
1
|
+
import { Cr as BaseAddon, Or as RUNTIME_DEFAULTS, Sr as errMsg, Tt as databaseSnapshotCapability, _ as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, ar as vectorStoreCapability, at as bareAddonId, b as DATA_STORE_DATABASES, v as DATABASE_SNAPSHOT_SUFFIX, wt as dataStoreProviderCapability, y as DATABASE_SNAPSHOT_TIMEOUT_MS } from "../../dist-m5JkT8UN.mjs";
|
|
2
|
+
import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys-C5qP9QIf.mjs";
|
|
3
|
+
import { C as callControl, E as controlTargetOf, S as trustResult, T as callVector, _ as collectTransferables, a as WalMaintenance, c as SqliteSettingsBackend, d as CrossDatabaseTransactError, f as DatabaseBusyError, m as rehydrateError, o as createVectorIndex, p as DuplicatePlacementError, s as vectorProviderOf, u as CollectionPlacementError, v as isFileHostMessage, w as callData } from "../../wal-maintenance-DvnVO5IK.mjs";
|
|
4
4
|
import { r as isSnapshotWorkerMessage } from "../../sqlite-snapshot-protocol-2QaTouWV.mjs";
|
|
5
5
|
import { a as isWorkerMessage, t as WAL_CHECKPOINT_LARGE_PASS_FRAMES } from "../../wal-checkpoint-policy-BahrTtyD.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
@@ -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-CEAyXW3Q.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $t as isLocationEnabled, Bt as evictionPolicyOfLocation, Cr as BaseAddon, Dr as REDACTED_SECRET, I as LegacyStorageLocationDefaultSchema, In as resolveLocationMode, J as StorageCleanupJobSchema, Jn as storageMigrationCapability, Jt as gbToBytes, Lr as collectSecretConfigKeys, Un as settingsStoreCapability, X as StorageLocationTypeSchema, Y as StorageLocationModeSchema, Z as StorageMigrationJobSchema, Zr as isSecretMarker, _n as modeMayWrite, ci as secretTreeFromPaths, fi as transformSecretWrite, mn as mayWriteToLocation, oi as resolveSecretMarkers, on as legacyModeOf, or as withLocationMode, pi as EventCategory, pn as mayReadLocation, qn as storageCapability, ti as parseJsonObject } from "../../dist-m5JkT8UN.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { containsOrEquals, physicalRootOf } from "@camstack/types/node";
|
|
@@ -5,7 +5,6 @@ import { systemConfigMeshActions } from "./mesh-actions.js";
|
|
|
5
5
|
export declare const SYSTEM_CONFIG_CLUSTER_SECTION_ID = "system-config-cluster";
|
|
6
6
|
export declare class SystemConfigAddon extends BaseAddon {
|
|
7
7
|
readonly id = "system-config";
|
|
8
|
-
private clusterSecretKeeper;
|
|
9
8
|
private meshCaKeeper;
|
|
10
9
|
private meshReapTimer;
|
|
11
10
|
private readonly meshGateTimers;
|
|
@@ -29,40 +28,29 @@ export declare class SystemConfigAddon extends BaseAddon {
|
|
|
29
28
|
* empty CRL would accept a revoked leaf. Retries until the settings store answers.
|
|
30
29
|
*/
|
|
31
30
|
private onMeshCaReady;
|
|
32
|
-
private mintJoinToken;
|
|
33
31
|
/** D821 — short-lived ticket for the agent's `:4444` unlock session. */
|
|
34
32
|
private mintAgentUiUnlock;
|
|
35
33
|
private readAgentDashboardOrigins;
|
|
36
|
-
private resolveHubUrl;
|
|
37
|
-
private resolveHubMeshAddress;
|
|
38
34
|
/** The keychain handle for owner `system`; `null` where there is no door. */
|
|
39
35
|
private systemSecrets;
|
|
40
36
|
private buildGlobalSchema;
|
|
41
37
|
getGlobalSettings(): Promise<ConfigUISchemaWithValues>;
|
|
42
38
|
/**
|
|
43
39
|
* The admin UI / `addonSettings` cap prefer {@link BaseAddon.updateGlobalSettingsAsOperator}.
|
|
44
|
-
* That BaseAddon path writes the generic addon store and never reaches
|
|
45
|
-
*
|
|
46
|
-
*
|
|
40
|
+
* That BaseAddon path writes the generic addon store and never reaches the
|
|
41
|
+
* yml sections. Route the operator write through the same section-aware path
|
|
42
|
+
* as {@link updateGlobalSettings}.
|
|
47
43
|
*/
|
|
48
44
|
override updateGlobalSettingsAsOperator(patch: Record<string, unknown>, _nodeId?: string): Promise<void>;
|
|
49
|
-
updateGlobalSettings(patch: Record<string, unknown>): Promise<void>;
|
|
50
|
-
/**
|
|
51
|
-
* The cluster secret's save path: the value goes to the keychain (owner
|
|
52
|
-
* `system`), the row gets the marker; `''` / a view keeps. `$secretClear` is
|
|
53
|
-
* REFUSED: the secret is mandatory (D802). A value the keychain cannot store
|
|
54
|
-
* is REFUSED — never written inline (D787, P5). Mesh auth mode is always
|
|
55
|
-
* enforced (D821) — a legacy `meshAuth` in the patch is ignored.
|
|
56
|
-
*/
|
|
57
|
-
private writeClusterSection;
|
|
58
|
-
/** Persist + publish mesh auth mode (always `enforced` after D821). */
|
|
59
|
-
private writeMeshAuthMode;
|
|
60
45
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
46
|
+
* The value to store for a `name` in a save, or `undefined` for "leave the row
|
|
47
|
+
* alone". The whole form posts every field, so an empty box on a hub that was
|
|
48
|
+
* never named is the NORMAL case and must write nothing (D861: a seed never
|
|
49
|
+
* overwrites); an empty box over a stored name is the operator clearing it,
|
|
50
|
+
* which stores `''` (readers treat it as unset). Anything else must be a valid
|
|
51
|
+
* name — refused whole, like the network lists.
|
|
64
52
|
*/
|
|
65
|
-
private
|
|
66
|
-
|
|
53
|
+
private normalizeServerName;
|
|
54
|
+
updateGlobalSettings(patch: Record<string, unknown>): Promise<void>;
|
|
67
55
|
}
|
|
68
56
|
export default SystemConfigAddon;
|