@camstack/system 1.2.417 → 1.2.419
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon-utils.js +1 -1
- package/dist/addon-utils.mjs +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +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 +2 -2
- package/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/keychain/index.js +7 -9
- package/dist/builtins/keychain/index.mjs +7 -9
- 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 +2 -2
- package/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/dist/builtins/local-network/local-network.addon.js +2 -2
- package/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/amd-npu.d.ts +6 -0
- package/dist/builtins/platform-probe/index.js +317 -19
- package/dist/builtins/platform-probe/index.mjs +318 -20
- package/dist/builtins/platform-probe/platform-scorer.d.ts +4 -0
- package/dist/builtins/platform-probe/windows-hardware.d.ts +77 -0
- 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/sqlite-settings.addon.js +0 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +2 -2
- package/dist/builtins/system-config/system-config.addon.mjs +279 -279
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{composition-sources-CndJVssc.mjs → composition-sources-562ib2dL.mjs} +1 -1
- package/dist/{composition-sources-ChAX2Kdo.js → composition-sources-OaDYklhR.js} +1 -1
- package/dist/{constants-BzxwnfDc.mjs → constants-BeQWXybC.mjs} +1 -1
- package/dist/{constants-VXvZkGgw.js → constants-ik5xtasS.js} +1 -1
- package/dist/{custom-action-registry-DHv0kYcT.mjs → custom-action-registry-BQnbN0DP.mjs} +1 -2
- package/dist/{custom-action-registry-Bb28ibZV.js → custom-action-registry-Bf_YnagS.js} +3 -4
- package/dist/{dist-H_RapIeM.mjs → dist-C0wYvAHC.mjs} +68 -55
- package/dist/{dist-BMOD9OyH.js → dist-DLHPmdoV.js} +67 -72
- package/dist/index.js +38 -10
- package/dist/index.mjs +38 -10
- package/dist/{jwt-signing-key-BiKHENST.js → jwt-signing-key-CWmNKLQi.js} +1 -1
- package/dist/{jwt-signing-key-xQxqpwMC.mjs → jwt-signing-key-dkTVfsLI.mjs} +1 -1
- package/dist/{restore-archive-BobsETEp.js → restore-archive-DZeFVS2l.js} +1 -1
- package/dist/{restore-archive-CCAQicV-.mjs → restore-archive-gGHgAZsz.mjs} +77 -77
- package/dist/{retired-settings-keys-CwL4zHLg.mjs → retired-settings-keys-BHlKEYNL.mjs} +1 -1
- package/dist/{retired-settings-keys-BMq2u4Wv.js → retired-settings-keys-DibNtLmU.js} +1 -1
- package/dist/{tls-C0TRPfqc.js → tls-BgImdxCO.js} +4 -11
- package/dist/{tls-D-2dPY-5.mjs → tls-CaOLZ09W.mjs} +5 -12
- package/package.json +2 -1
- package/dist/amd-npu-B-QyyMyF.js +0 -53
- package/dist/amd-npu-Db_SoSuL.mjs +0 -52
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __require } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { c as staticJwtSigningKey, i as getProcessJwtSigningKeyState, n as JwtSigningKeyUnavailableError, o as processJwtSigningKey, r as SYSTEM_SECRET_OWNER, t as JWT_SIGNING_KEY_REF } from "./jwt-signing-key-
|
|
2
|
+
import { At as extractNestedAddonId, Bt as isObjectInput, Cn as resolveMethodAuth, Dn as scopesAllowDeviceCap, Dr as emitDownForOwnedCaps, En as scopesAllowAddon, G as addonSettingsCapability, Gr as resolveCapMount, Hr as parseJsonUnknown, Ht as kebabToCamel$1, It as isArrayOutputSchema, Lt as isCollectionArrayMethod, O as LOG_LEVEL_RANK, Qt as looseSchema, Rn as supportedRuntimes, Vr as parseJsonObject, Vt as isVoidInput, Wr as readinessKey, Zt as logLevelAtMost, br as asString$1, cn as objectInputDeclaresRequiredDeviceId, dr as DEVICE_STATUS_METHOD, ei as EventCategory$1, hr as ReadinessTimeoutError, j as METHOD_ACCESS_MAP, kr as expandCapMethods, lr as DATAPLANE_SECRET_HEADER$1, mr as ReadinessRegistry, pn as procedureAuthKey, pr as RUNTIME_DEFAULTS, qr as scopeKey, qt as lifecycleJobSchema, sn as objectInputDeclaresAddonId, sr as errMsg$1, t as ALL_CAPABILITY_DEFINITIONS, ur as DEVICE_SETTINGS_CONTRIBUTION_METHODS, vr as asJsonObject$1, wr as createEvent$1, yr as asNumber } from "./dist-C0wYvAHC.mjs";
|
|
3
|
+
import { c as staticJwtSigningKey, i as getProcessJwtSigningKeyState, n as JwtSigningKeyUnavailableError, o as processJwtSigningKey, r as SYSTEM_SECRET_OWNER, t as JWT_SIGNING_KEY_REF } from "./jwt-signing-key-dkTVfsLI.mjs";
|
|
4
4
|
import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
|
|
5
5
|
import "./builtins/alerts/index.mjs";
|
|
6
6
|
import { CalendarsAddon } from "./builtins/calendars/calendars.addon.mjs";
|
|
@@ -25,15 +25,15 @@ import { SqliteSettingsAddon, o as SqliteSettingsBackend, s as prefixRange } fro
|
|
|
25
25
|
import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
|
|
26
26
|
import { StorageOrchestratorAddon, a as stripForwardedCaller, i as createHubCapForwardService, n as HUB_CAP_FWD_ACTION, o as buildStorageLocationRegistry, r as HUB_CAP_FWD_SERVICE, t as StorageOrchestratorService } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
|
|
27
27
|
import "./builtins/storage-orchestrator/index.mjs";
|
|
28
|
-
import { _ as getProcessClusterSecretGate, a as MESH_CA_KEY_REF, b as setProcessClusterSecretGate, d as CLUSTER_SECRET_REF, f as CLUSTER_SECRET_REJECTED_EXIT_CODE, g as clusterSecretMatches, h as checkClusterSecret, i as MESH_CA_FIELD, m as CLUSTER_SECRET_UNAVAILABLE_TYPE, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, p as CLUSTER_SECRET_SETTINGS_KEY, u as CLUSTER_SECRET_MISMATCH_TYPE, v as hashClusterSecret, y as isClusterSecretMismatchError } from "./constants-
|
|
28
|
+
import { _ as getProcessClusterSecretGate, a as MESH_CA_KEY_REF, b as setProcessClusterSecretGate, d as CLUSTER_SECRET_REF, f as CLUSTER_SECRET_REJECTED_EXIT_CODE, g as clusterSecretMatches, h as checkClusterSecret, i as MESH_CA_FIELD, m as CLUSTER_SECRET_UNAVAILABLE_TYPE, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, p as CLUSTER_SECRET_SETTINGS_KEY, u as CLUSTER_SECRET_MISMATCH_TYPE, v as hashClusterSecret, y as isClusterSecretMismatchError } from "./constants-BeQWXybC.mjs";
|
|
29
29
|
import { A as AGENT_UI_UNLOCK_VERSION, B as parseMeshAuthMode, C as generateMeshKeyPair, D as AGENT_DASHBOARD_ORIGINS_FIELD, E as loadMeshCa, F as verifyAgentUiUnlockTicket, G as createCidrMatcher, H as setProcessMeshAuthMode, I as MESH_AUTH_MODE_FIELD, J as readCidrSetting, K as normalizeIp, L as getProcessMeshAuthMode, M as isAllowedAgentDashboardReturnTo, N as mintAgentUiUnlockTicket, O as AGENT_UI_UNLOCK_DOMAIN, P as parseAgentDashboardOrigins, R as getProcessMeshAuthStatus, S as generateMeshCa, SystemConfigAddon, T as issueMeshLeafFromCsr, U as setProcessMeshAuthStatusSource, V as requestProcessMeshEnforcement, W as setProcessMeshEnforcer, _ as requireProcessMeshCa, a as setProcessMeshTlsEnabler, b as createMeshCsrPem, c as mintMeshJoinToken, d as getProcessNodeMeshTransport, f as setProcessMeshPeerTransportLookup, g as getProcessMeshCaState, h as MeshCaKeeper, i as ServiceBroker, j as UnlockTicketJtiStore, k as AGENT_UI_UNLOCK_TTL_MS, l as processJoinTokenJtiStore, m as processMeshCrl, n as TlsTcpTransporter, o as enrollMeshNode, p as MeshCrl, q as parseCidrList, r as Errors, s as JoinTokenJtiStore, u as verifyMeshJoinToken, v as caFingerprint, w as issueMeshLeafForNode, x as exportMeshPrivateKeyPem, y as caFingerprintCompact, z as isMeshAuthMode } from "./builtins/system-config/system-config.addon.mjs";
|
|
30
30
|
import "./builtins/system-config/index.mjs";
|
|
31
31
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
32
|
-
import { C as isModelDownloaded, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-
|
|
33
|
-
import { A as allFamiliesListenHost, C as collectCertIdentity, D as SERVER_AUTH_OID, E as MAX_LEAF_VALIDITY_DAYS, F as registerLanHttpHandler, M as bindPendingLanHttp, N as closeLanHttp, O as evaluateExistingCert, P as readLanHttpState, S as CA_COMMON_NAME, T as LEAF_RENEWAL_WINDOW_DAYS, _ as writeExtraSans, a as validateUploadedTls, b as loadTlsCert, c as registerHttpsListener, d as prepareBootTls, f as UPLOADED_CA_FILE, g as splitPemCertificates, h as readTlsMode, i as storeUploadedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, l as reloadHttpsListener, m as readTlsAccessStatus, n as regenerateCertificate, o as clearHttpsListener, p as readExtraSans, r as revertToGeneratedCertificate, s as leafFingerprintOf, t as applyCertificateToListener, u as servedHttpsLeafFingerprint, v as writeTlsMode, w as CA_VALIDITY_DAYS, x as reissueTlsLeaf, y as ensureTlsCert } from "./tls-
|
|
32
|
+
import { C as isModelDownloaded, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-BQnbN0DP.mjs";
|
|
33
|
+
import { A as allFamiliesListenHost, C as collectCertIdentity, D as SERVER_AUTH_OID, E as MAX_LEAF_VALIDITY_DAYS, F as registerLanHttpHandler, M as bindPendingLanHttp, N as closeLanHttp, O as evaluateExistingCert, P as readLanHttpState, S as CA_COMMON_NAME, T as LEAF_RENEWAL_WINDOW_DAYS, _ as writeExtraSans, a as validateUploadedTls, b as loadTlsCert, c as registerHttpsListener, d as prepareBootTls, f as UPLOADED_CA_FILE, g as splitPemCertificates, h as readTlsMode, i as storeUploadedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, l as reloadHttpsListener, m as readTlsAccessStatus, n as regenerateCertificate, o as clearHttpsListener, p as readExtraSans, r as revertToGeneratedCertificate, s as leafFingerprintOf, t as applyCertificateToListener, u as servedHttpsLeafFingerprint, v as writeTlsMode, w as CA_VALIDITY_DAYS, x as reissueTlsLeaf, y as ensureTlsCert } from "./tls-CaOLZ09W.mjs";
|
|
34
34
|
import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
|
|
35
35
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
|
|
36
|
-
import { c as BackupKeyFormatError, d as generateBackupKeyPair, l as BackupKeyMismatchError, m as readBackupEncryptionHeader, o as SystemBackupService, r as prepareRestoreArchive, s as BackupDecryptError, t as BackupKeyRequiredError } from "./restore-archive-
|
|
36
|
+
import { c as BackupKeyFormatError, d as generateBackupKeyPair, l as BackupKeyMismatchError, m as readBackupEncryptionHeader, o as SystemBackupService, r as prepareRestoreArchive, s as BackupDecryptError, t as BackupKeyRequiredError } from "./restore-archive-gGHgAZsz.mjs";
|
|
37
37
|
import { z } from "zod";
|
|
38
38
|
import * as crypto$1 from "node:crypto";
|
|
39
39
|
import { createHash, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -51,12 +51,12 @@ import { execFile, spawn } from "node:child_process";
|
|
|
51
51
|
import * as util from "node:util";
|
|
52
52
|
import { promisify } from "node:util";
|
|
53
53
|
import { once } from "node:events";
|
|
54
|
+
import { BOOT_RECOVERY_BACKOFF_MS, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATCH_MAX, DeviceType, DisposerChain, EventCategory, PEER_BYTES_CHUNK_BYTES, PEER_BYTES_MAX_OUTSTANDING, PEER_BYTES_STALL_MS, PEER_BYTES_TICKET_TTL_MS, ReadinessRegistry as ReadinessRegistry$1, asJsonObject, asString, collectZodSecretPaths, createDeviceProxy, createEvent, createEventBusSliceSource, createSecretsAccess, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods as expandCapMethods$1, maskUrlCredentials, readNodePin, scopeKey as scopeKey$1, scrubKnownSecrets, sleep, withCapInputDefaults } from "@camstack/types/addon";
|
|
54
55
|
import { createServer as createServer$1, request } from "node:http";
|
|
55
56
|
import * as v8 from "node:v8";
|
|
56
57
|
import { Session } from "node:inspector/promises";
|
|
57
58
|
import { monitorEventLoopDelay } from "node:perf_hooks";
|
|
58
59
|
import * as vm from "node:vm";
|
|
59
|
-
import { BOOT_RECOVERY_BACKOFF_MS, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATCH_MAX, DeviceType, DisposerChain, EventCategory, PEER_BYTES_CHUNK_BYTES, PEER_BYTES_MAX_OUTSTANDING, PEER_BYTES_STALL_MS, PEER_BYTES_TICKET_TTL_MS, ReadinessRegistry as ReadinessRegistry$1, asJsonObject, asString, collectZodSecretPaths, createDeviceProxy, createEvent, createEventBusSliceSource, createSecretsAccess, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods as expandCapMethods$1, maskUrlCredentials, readNodePin, scopeKey as scopeKey$1, scrubKnownSecrets, sleep, withCapInputDefaults } from "@camstack/types/addon";
|
|
60
60
|
import { TRPCClientError, createTRPCClient } from "@trpc/client";
|
|
61
61
|
//#region src/addon/addon-api-factory.ts
|
|
62
62
|
/**
|
|
@@ -24062,6 +24062,8 @@ function stripForgedIdentity(action, params) {
|
|
|
24062
24062
|
}
|
|
24063
24063
|
return withoutIdentity(params);
|
|
24064
24064
|
}
|
|
24065
|
+
/** Minimum gap between two "mesh event refused" lines for one sender. */
|
|
24066
|
+
var DROPPED_EVENT_LOG_INTERVAL_MS = 6e4;
|
|
24065
24067
|
function senderOf(ctx) {
|
|
24066
24068
|
const nodeID = ctx.nodeID;
|
|
24067
24069
|
return typeof nodeID === "string" && nodeID.length > 0 ? nodeID : null;
|
|
@@ -24075,6 +24077,29 @@ function paramNodeId(params) {
|
|
|
24075
24077
|
*/
|
|
24076
24078
|
function createMeshAccessMiddleware(options) {
|
|
24077
24079
|
const { ownNodeId, authenticator, logger } = options;
|
|
24080
|
+
const dropped = /* @__PURE__ */ new Map();
|
|
24081
|
+
const noteDroppedEvent = (sender, eventName) => {
|
|
24082
|
+
const now = Date.now();
|
|
24083
|
+
const entry = dropped.get(sender) ?? {
|
|
24084
|
+
lastLogAt: 0,
|
|
24085
|
+
count: 0
|
|
24086
|
+
};
|
|
24087
|
+
const count = entry.count + 1;
|
|
24088
|
+
if (now - entry.lastLogAt >= DROPPED_EVENT_LOG_INTERVAL_MS) {
|
|
24089
|
+
logger?.warn("mesh event refused", {
|
|
24090
|
+
sender,
|
|
24091
|
+
event: eventName,
|
|
24092
|
+
droppedSinceLastLog: count
|
|
24093
|
+
});
|
|
24094
|
+
dropped.set(sender, {
|
|
24095
|
+
lastLogAt: now,
|
|
24096
|
+
count: 0
|
|
24097
|
+
});
|
|
24098
|
+
} else dropped.set(sender, {
|
|
24099
|
+
lastLogAt: entry.lastLogAt,
|
|
24100
|
+
count
|
|
24101
|
+
});
|
|
24102
|
+
};
|
|
24078
24103
|
return {
|
|
24079
24104
|
name: "CamstackMeshAccess",
|
|
24080
24105
|
localAction(next, action) {
|
|
@@ -24100,9 +24125,12 @@ function createMeshAccessMiddleware(options) {
|
|
|
24100
24125
|
const name = event.name ?? "";
|
|
24101
24126
|
return function meshGatedEvent(ctx) {
|
|
24102
24127
|
const sender = senderOf(ctx);
|
|
24103
|
-
if (sender === null || sender === ownNodeId) return next.call(this, ctx);
|
|
24104
|
-
if (authenticator.admitEvent(sender, name).verdict === "deny")
|
|
24105
|
-
|
|
24128
|
+
if (sender === null || sender === ownNodeId) return Promise.resolve(next.call(this, ctx));
|
|
24129
|
+
if (authenticator.admitEvent(sender, name).verdict === "deny") {
|
|
24130
|
+
noteDroppedEvent(sender, name);
|
|
24131
|
+
return Promise.resolve();
|
|
24132
|
+
}
|
|
24133
|
+
return Promise.resolve(next.call(this, ctx));
|
|
24106
24134
|
};
|
|
24107
24135
|
}
|
|
24108
24136
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-DLHPmdoV.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let buffer = require("buffer");
|
|
5
5
|
let node_fs_promises = require("node:fs/promises");
|