@camstack/server 1.2.818 → 1.2.820
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/CHANGELOG.md +28 -0
- package/dist/api/core/cap-providers.js +32 -40
- package/dist/api/trpc/cap-route-error-formatter.js +19 -1
- package/dist/api/trpc/cap-router-runtime.js +23 -0
- package/dist/api/trpc/device-config-secret-redaction.js +1 -2
- package/dist/api/trpc/generated-cap-routers.js +13 -27
- package/dist/api/trpc/localized-schema-paths.js +1 -1
- package/dist/api/trpc/trpc.router.js +1 -1
- package/dist/core/addon/addon-registry.service.js +2 -2
- package/dist/core/addon/addon-settings-provider.js +0 -23
- package/dist/core/addon/instance-lifecycle.js +44 -7
- package/package.json +27 -14
- package/system/dist/addon-runner.js +0 -1
- package/system/dist/addon-runner.mjs +0 -1
- package/system/dist/{agent-https-ChriyNA8.js → agent-https-CbysxRlV.js} +1 -1
- package/system/dist/{agent-https-rhOY61af.mjs → agent-https-XHjvcSEq.mjs} +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +3 -3
- package/system/dist/builtins/composer/composer.addon.mjs +3 -3
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/blocks-instances.d.ts +2 -2
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +5 -5
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/local-network.addon.js +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{capture-engine-Cgt1r0h5.js → capture-engine-CKtkENOg.js} +1 -1
- package/system/dist/{capture-engine-CoK1n1F1.mjs → capture-engine-WSpdP-gE.mjs} +1 -1
- package/system/dist/{composition-sources-TkHq8DdF.js → composition-sources-6Qx72gmK.js} +1 -1
- package/system/dist/{composition-sources-DSU28FFP.mjs → composition-sources-Dr6uwBGw.mjs} +1 -1
- package/system/dist/{constants-D3mNibfv.js → constants-BchSDmTD.js} +1 -1
- package/system/dist/{constants-CCezBXPq.mjs → constants-URzk8siY.mjs} +1 -1
- package/system/dist/{device-ca-CjX1tQP7.mjs → device-ca-Bu1E5Vgr.mjs} +1 -1
- package/system/dist/{device-ca-CEzeY_zI.js → device-ca-kANxsBE5.js} +1 -1
- package/system/dist/{dist-BNBgsEk0.mjs → dist-C0Df8iJl.mjs} +91 -126
- package/system/dist/{dist-DX1gyM8o.js → dist-R_mOSFtH.js} +91 -126
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-DBHvpWvv.js → hub-mdns-ciao-2AZ3ucDO.js} +2 -2
- package/system/dist/{hub-mdns-ciao-BCfG7mv3.mjs → hub-mdns-ciao-pxgLcmqO.mjs} +2 -2
- package/system/dist/index.js +40 -11
- package/system/dist/index.mjs +40 -11
- package/system/dist/kernel/cap-router-builder.d.ts +9 -0
- package/system/dist/kernel/transport/child-cap-protocol.d.ts +1 -1
- package/system/dist/{legacy-integration-rows-door-C0X4Ijcr.mjs → legacy-integration-rows-door-Cj58BS60.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-7K4_MoAP.js → legacy-integration-rows-door-g4CeLJ9g.js} +1 -1
- package/system/dist/{restore-archive-WBDJlios.mjs → restore-archive-Bd7fgVo8.mjs} +1 -1
- package/system/dist/{restore-archive-DXlN0NYx.js → restore-archive-CAh7u-rY.js} +1 -1
- package/system/dist/{wal-maintenance-BPmo2JzY.js → wal-maintenance--0liHBxL.js} +0 -0
- package/system/dist/{wal-maintenance-BJ0vDek1.mjs → wal-maintenance-DMf2oEQ-.mjs} +0 -0
- package/system/package.json +1 -1
package/system/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __require } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Aa as scopesAllowDeviceCap, Cn as bareAddonId, D as CatalogFileSchema, Fc as scopeKey, Gc as withoutCallerStamp, Gs as collectSecretMarkerRefs, Ii as objectInputDeclaresAddonId, Is as asJsonObject$1, Kr as interpolate, Li as objectInputDeclaresRequiredDeviceId, Ls as asNumber, Mt as PackageRequiresSchema, Nc as resolveCapMount, Oc as parseJsonObject, Qi as procedureAuthKey, Rs as asString$1, Ss as ReadinessTimeoutError, Uc as userError, Un as compareVersions, Va as splitTranslationRef, Xa as supportedRuntimes, Xr as isArrayOutputSchema, Yc as errMsg$1, Ys as createEvent$1, Zc as EventCategory$1, Zr as isCollectionArrayMethod, _i as logLevelAtMost, a as AGENT_MDNS_SERVICE_TYPE, ai as kebabToCamel$1, b as CATALOG_LANGS, bs as RUNTIME_DEFAULTS, bt as LOG_LEVEL_RANK, dc as isDebugChannelName, dr as describeUnmet, ec as defineRecordKinds, ic as expandCapMethods, ii as isVoidInput, is as DEVICE_STATUS_METHOD, jc as readinessKey, ka as scopesAllowAddon, kc as parseJsonUnknown, kr as extractNestedAddonId, mn as addonSettingsCapability, ni as isObjectInput, ns as DATAPLANE_SECRET_HEADER$1, o as AGENT_MDNS_TXT_KEYS, oc as getDebugInterest, oo as unmetRequirements, rs as DEVICE_SETTINGS_CONTRIBUTION_METHODS, s as ALL_CAPABILITY_DEFINITIONS, tc as emitDownForOwnedCaps, ts as CALLER_STAMPED_CAPABILITIES$1, ui as lifecycleJobSchema, vi as looseSchema, xs as ReadinessRegistry, xt as METHOD_ACCESS_MAP, ya as resolveMethodAuth } from "./dist-
|
|
3
|
-
import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-
|
|
2
|
+
import { Aa as scopesAllowDeviceCap, Cn as bareAddonId, D as CatalogFileSchema, Fc as scopeKey, Gc as withoutCallerStamp, Gs as collectSecretMarkerRefs, Ii as objectInputDeclaresAddonId, Is as asJsonObject$1, Kr as interpolate, Li as objectInputDeclaresRequiredDeviceId, Ls as asNumber, Mt as PackageRequiresSchema, Nc as resolveCapMount, Oc as parseJsonObject, Qi as procedureAuthKey, Rs as asString$1, Ss as ReadinessTimeoutError, Uc as userError, Un as compareVersions, Va as splitTranslationRef, Xa as supportedRuntimes, Xr as isArrayOutputSchema, Yc as errMsg$1, Ys as createEvent$1, Zc as EventCategory$1, Zr as isCollectionArrayMethod, _i as logLevelAtMost, a as AGENT_MDNS_SERVICE_TYPE, ai as kebabToCamel$1, b as CATALOG_LANGS, bs as RUNTIME_DEFAULTS, bt as LOG_LEVEL_RANK, dc as isDebugChannelName, dr as describeUnmet, ec as defineRecordKinds, ic as expandCapMethods, ii as isVoidInput, is as DEVICE_STATUS_METHOD, jc as readinessKey, ka as scopesAllowAddon, kc as parseJsonUnknown, kr as extractNestedAddonId, mn as addonSettingsCapability, ni as isObjectInput, ns as DATAPLANE_SECRET_HEADER$1, o as AGENT_MDNS_TXT_KEYS, oc as getDebugInterest, oo as unmetRequirements, rs as DEVICE_SETTINGS_CONTRIBUTION_METHODS, s as ALL_CAPABILITY_DEFINITIONS, tc as emitDownForOwnedCaps, ts as CALLER_STAMPED_CAPABILITIES$1, ui as lifecycleJobSchema, vi as looseSchema, xs as ReadinessRegistry, xt as METHOD_ACCESS_MAP, ya as resolveMethodAuth } from "./dist-C0Df8iJl.mjs";
|
|
3
|
+
import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-Bu1E5Vgr.mjs";
|
|
4
4
|
import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
|
|
5
5
|
import { a as redactLogText, i as redactLogMeta, r as redactLogEntry, t as isCredentialKeyName } from "./log-redactor-XLDrPzOi.mjs";
|
|
6
6
|
import { AlertCenterAddon, n as lastCauseAfterChunk, r as readRunnerDisplayName, t as CRASH_BREAKER_ERROR_PREFIX } from "./builtins/alerts/alerts.addon.mjs";
|
|
@@ -26,22 +26,22 @@ import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index
|
|
|
26
26
|
import NativeMetricsAddon, { a as NativeMetricsProvider, i as parseProcStatusRss, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
|
|
27
27
|
import { DeviceHistoryAddon } from "./builtins/device-history/device-history.addon.mjs";
|
|
28
28
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
29
|
-
import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-
|
|
30
|
-
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-
|
|
29
|
+
import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-DMf2oEQ-.mjs";
|
|
30
|
+
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-Cj58BS60.mjs";
|
|
31
31
|
import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
32
32
|
import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
|
|
33
33
|
import { StorageOrchestratorAddon, a as createHubCapForwardService, i as HUB_CAP_FWD_SERVICE, o as stripForwardedCaller, r as HUB_CAP_FWD_ACTION, s as buildStorageLocationRegistry, t as StorageOrchestratorService, u as storageOrchestratorRecordKinds } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
|
|
34
34
|
import "./builtins/storage-orchestrator/index.mjs";
|
|
35
|
-
import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-
|
|
36
|
-
import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-
|
|
35
|
+
import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-XHjvcSEq.mjs";
|
|
36
|
+
import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-URzk8siY.mjs";
|
|
37
37
|
import { $ as caFingerprintCompact, A as getProcessNodeMeshTransport, B as MESH_NODE_CERTIFICATES_COLLECTION, C as MESH_TLS_PORT_HELLO_FIELD, Ct as readOriginSetting, D as setProcessMeshTlsEnabler, Dt as readCidrSetting, E as ServiceBroker, Et as parseCidrList, F as renewMeshCertificate, G as getProcessMeshCertificateRegistry, H as MeshCertificateRegistry, I as revokeMeshCertificate, J as processMeshCrl, K as setProcessMeshCertificateRegistry, L as getProcessMeshTlsListenerState, M as isProcessVerifiedMeshPeer, N as onProcessNodeRegistered, O as dropProcessPeer, P as setProcessMeshPeerTransportLookup, Q as caFingerprint, R as openMeshTlsWhenRevocationsLoaded, S as verifyMembershipAnswer, St as parseOriginList, SystemConfigAddon, T as Errors, Tt as normalizeIp, U as RENEWAL_ABANDONED, V as MESH_NODE_CERTIFICATES_COLUMNS, W as describeMeshLeaf, X as getProcessMeshCaState, Y as MeshCaKeeper, Z as requireProcessMeshCa, _ as signPairingProof, _t as verifyAgentUiUnlockTicket, a as hubHostFromMeshAddress, at as issueMeshLeafForNode, b as MembershipResponder, bt as isInsecureOrigin, c as PAIRING_MAX_SESSIONS, ct as AGENT_DASHBOARD_ORIGINS_FIELD, d as PAIRING_PROTOCOL, dt as AGENT_UI_UNLOCK_USE, et as createMeshCsrPem, f as PAIRING_TTL_MS, ft as AGENT_UI_UNLOCK_VERSION, g as keyFingerprintShort, gt as parseAgentDashboardOrigins, h as describeCsr, ht as mintAgentUiUnlockTicket, i as AgentPairing, it as isValidAgentNodeId, j as getProcessPeerLeaf, k as emitProcessNodeRegistered, l as PAIRING_PATHS, lt as AGENT_UI_UNLOCK_TTL_MS, m as computePairingSas, mt as isAllowedAgentDashboardReturnTo, n as HubPairing, nt as generateMeshCa, o as PAIRING_CODE_DIGITS, ot as issueMeshLeafFromCsr, p as computePairingCommitment, pt as UnlockTicketJtiStore, q as MeshCrl, r as PairingHttpError, rt as generateMeshKeyPair, s as PAIRING_MAX_CODE_ATTEMPTS, st as loadMeshCa, tt as exportMeshPrivateKeyPem, u as PAIRING_PIN_DIGITS, ut as AGENT_UI_UNLOCK_TYP, v as verifyPairingProof, vt as InvalidCorsOriginError, w as TlsTcpTransporter, wt as createCidrMatcher, x as signMembershipProof, xt as normalizeOrigin, y as MEMBERSHIP_PATHS, yt as OPAQUE_ORIGIN, z as setProcessMeshTlsListenerState } from "./builtins/system-config/system-config.addon.mjs";
|
|
38
38
|
import "./builtins/system-config/index.mjs";
|
|
39
39
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
40
40
|
import { C as isModelDownloaded, E as setHuggingFaceReachabilityObserver, 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-B9zFBNVa.mjs";
|
|
41
|
-
import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-
|
|
41
|
+
import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-pxgLcmqO.mjs";
|
|
42
42
|
import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
|
|
43
43
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
|
|
44
|
-
import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-
|
|
44
|
+
import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-Bd7fgVo8.mjs";
|
|
45
45
|
import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-DBlgWB8k.mjs";
|
|
46
46
|
import { z } from "zod";
|
|
47
47
|
import * as crypto$1 from "node:crypto";
|
|
@@ -11496,6 +11496,7 @@ function methodsFor(def) {
|
|
|
11496
11496
|
isVoid: isVoidInput(m.input),
|
|
11497
11497
|
isObject: isObjectInput(m.input),
|
|
11498
11498
|
callerRequired: m.caller === "required",
|
|
11499
|
+
callerScoped: m.caller === "scoped",
|
|
11499
11500
|
isArrayOutput: m.kind !== "subscription" && isArrayOutputSchema(m.output)
|
|
11500
11501
|
};
|
|
11501
11502
|
});
|
|
@@ -11572,6 +11573,30 @@ function injectCaller(rest, ctx, capName, methodName, services) {
|
|
|
11572
11573
|
caller
|
|
11573
11574
|
};
|
|
11574
11575
|
}
|
|
11576
|
+
/**
|
|
11577
|
+
* `caller: 'scoped'`: the same server-derived identity as {@link injectCaller}, with the
|
|
11578
|
+
* default-deny a method open to every session needs. An ADMIN passes as it always did. A
|
|
11579
|
+
* NON-admin passes only on a call pinned to ONE addon (`addonId`, never the fan-out union) whose
|
|
11580
|
+
* provider says it serves user-scoped rows (`admitsUserCaller`); the provider then filters on
|
|
11581
|
+
* the `caller` it receives. A context with a request but no user fails closed; a context with
|
|
11582
|
+
* neither (an in-process call that holds no session) passes without a caller, as before.
|
|
11583
|
+
*/
|
|
11584
|
+
async function injectScopedCaller(rest, ctx, provider, pinnedAddonId, capName, methodName, services) {
|
|
11585
|
+
const caller = extractCallerIdentity(ctx);
|
|
11586
|
+
if (caller === null) {
|
|
11587
|
+
if (!(typeof ctx === "object" && ctx !== null && "req" in ctx && ctx.req !== void 0)) return rest;
|
|
11588
|
+
return (services.unauthorized ?? services.badRequest)(`Capability "${capName}.${methodName}" requires an authenticated caller`);
|
|
11589
|
+
}
|
|
11590
|
+
if (!caller.isAdmin) {
|
|
11591
|
+
const refuse = services.forbidden ?? services.unauthorized ?? services.badRequest;
|
|
11592
|
+
if (pinnedAddonId === void 0) return refuse(`Capability "${capName}.${methodName}" requires admin unless it names one addon`);
|
|
11593
|
+
if (!(await services.admitsUserCaller?.(capName, provider) === true)) return refuse(`Capability "${capName}.${methodName}" requires admin for addon "${pinnedAddonId}"`);
|
|
11594
|
+
}
|
|
11595
|
+
return {
|
|
11596
|
+
...rest,
|
|
11597
|
+
caller
|
|
11598
|
+
};
|
|
11599
|
+
}
|
|
11575
11600
|
/** Strip a set of selector keys from an input object, returning a NEW object. */
|
|
11576
11601
|
function stripKeys(input, keys) {
|
|
11577
11602
|
const src = input ?? {};
|
|
@@ -11629,9 +11654,10 @@ function buildOneCapRouter(def, primitives, services) {
|
|
|
11629
11654
|
const nodeIdData = def.nodeIdMode === "data";
|
|
11630
11655
|
const procedures = {};
|
|
11631
11656
|
for (const method of methodsFor(def)) {
|
|
11632
|
-
if (method.callerRequired && (method.kind === "subscription" || !method.isObject)) throw new Error(`Cap "${capName}" method "${method.name}": caller: 'required' is only supported on query/mutation methods with an object input schema`);
|
|
11657
|
+
if ((method.callerRequired || method.callerScoped) && (method.kind === "subscription" || !method.isObject)) throw new Error(`Cap "${capName}" method "${method.name}": caller: 'required' is only supported on query/mutation methods with an object input schema`);
|
|
11633
11658
|
const effectiveMountKind = methodMountKindFor(def, mount.kind, method);
|
|
11634
11659
|
const isCollection = effectiveMountKind === "collection";
|
|
11660
|
+
if (method.callerScoped && (!isCollection || nodeIdData)) throw new Error(`Cap "${capName}" method "${method.name}": caller: 'scoped' needs a collection cap`);
|
|
11635
11661
|
const getLocal = (ctx, addonId) => services.getLocalProvider(capName, effectiveMountKind, ctx, addonId);
|
|
11636
11662
|
const base = primitives.procedures[procedureAuthKey(method.auth)];
|
|
11637
11663
|
const inputSchema = method.schema.input;
|
|
@@ -11660,7 +11686,8 @@ function buildOneCapRouter(def, primitives, services) {
|
|
|
11660
11686
|
}
|
|
11661
11687
|
if (method.isObject) {
|
|
11662
11688
|
const stampedCap = CALLER_STAMPED_CAPABILITIES$1.includes(capName);
|
|
11663
|
-
const
|
|
11689
|
+
const routed = nodeIdData ? inputSchema : looseSchema(inputSchema);
|
|
11690
|
+
const schema = method.callerScoped && routed instanceof z.ZodType && routed.safeParse({}).success ? routed.optional() : routed;
|
|
11664
11691
|
procedures[method.name] = base.input(schema)[procKind](({ input: wireInput, ctx }) => {
|
|
11665
11692
|
const hasHttpReq = typeof ctx === "object" && ctx !== null && "req" in ctx && ctx.req !== void 0;
|
|
11666
11693
|
const input = stampedCap && hasHttpReq ? withoutCallerStamp(wireInput) : wireInput;
|
|
@@ -11677,7 +11704,9 @@ function buildOneCapRouter(def, primitives, services) {
|
|
|
11677
11704
|
addonId = await Promise.resolve(services.inferCollectionAddonPin(capName, method.name, rest));
|
|
11678
11705
|
if (addonId !== void 0) refusePin = addonId;
|
|
11679
11706
|
}
|
|
11680
|
-
|
|
11707
|
+
const provider = resolveProviderForCall(capName, nodeId, () => getLocal(ctx, addonId), services, refusePin);
|
|
11708
|
+
if (method.callerScoped) return injectScopedCaller(rest, ctx, provider, topLevelAddonId, capName, method.name, services).then((payload) => invokeObserved(def, ctx, provider, method, payload, isCollection, services));
|
|
11709
|
+
return invokeObserved(def, ctx, provider, method, method.callerRequired ? injectCaller(rest, ctx, capName, method.name, services) : rest, isCollection, services);
|
|
11681
11710
|
};
|
|
11682
11711
|
return resolveAndInvoke();
|
|
11683
11712
|
}
|
|
@@ -117,6 +117,15 @@ export interface CapRouterServices {
|
|
|
117
117
|
* back to `badRequest` in that case so the call still fails closed.
|
|
118
118
|
*/
|
|
119
119
|
readonly unauthorized?: (message: string) => never;
|
|
120
|
+
/** Raise the canonical FORBIDDEN error; falls back to `unauthorized`, then `badRequest`. */
|
|
121
|
+
readonly forbidden?: (message: string) => never;
|
|
122
|
+
/**
|
|
123
|
+
* `caller: 'scoped'` default-deny: may a NON-admin session call a scoped method on this
|
|
124
|
+
* resolved provider? Absent (or a provider that does not say so) means no — the provider keeps
|
|
125
|
+
* the admin-only door. The provider is asked, never assumed: a cap-specific answer lives with
|
|
126
|
+
* the server, not in this builder.
|
|
127
|
+
*/
|
|
128
|
+
readonly admitsUserCaller?: (capName: string, provider: ResolvedProvider) => Promise<boolean>;
|
|
120
129
|
/**
|
|
121
130
|
* Called when an EXPLICIT top-level `{ addonId }` collection pin resolved to
|
|
122
131
|
* no local provider, BEFORE the hub-proxy fallthrough. Implementations throw
|
|
@@ -248,7 +248,7 @@ export interface ReadinessSnapshotResponse {
|
|
|
248
248
|
*/
|
|
249
249
|
export type AddonCallTarget = "routes" | "custom" | "settings" | "data-planes";
|
|
250
250
|
/** The addon-settings methods reachable over the addon-call plane. */
|
|
251
|
-
export type AddonSettingsMethod = "getScopedSettings" | "listScopedSettings" | "updateScopedSettings" | "readScopedValues" | "
|
|
251
|
+
export type AddonSettingsMethod = "getScopedSettings" | "listScopedSettings" | "updateScopedSettings" | "readScopedValues" | "getDeviceSettings" | "updateDeviceSettings" | "getDeclaredSettingsKeys" | "unsetStoredSettingsKeys";
|
|
252
252
|
/**
|
|
253
253
|
* Parent → child: invoke an ADDON-LEVEL method on a loaded addon (not a cap).
|
|
254
254
|
* Carried as a correlated request frame (`channel.request`) — it returns a
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Gs as collectSecretMarkerRefs } from "./dist-
|
|
1
|
+
import { Gs as collectSecretMarkerRefs } from "./dist-C0Df8iJl.mjs";
|
|
2
2
|
//#region src/builtins/sqlite-storage/migrations/legacy-integration-rows-door.ts
|
|
3
3
|
/**
|
|
4
4
|
* Migration-only door for the leftover integration rows (planning#416).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as DATABASE_SNAPSHOT_SUFFIX, ec as defineRecordKinds, q as DataStoreDatabaseSchema } from "./dist-
|
|
1
|
+
import { P as DATABASE_SNAPSHOT_SUFFIX, ec as defineRecordKinds, q as DataStoreDatabaseSchema } from "./dist-C0Df8iJl.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { createCipheriv, createDecipheriv, createHash, createPrivateKey, createPublicKey, diffieHellman, generateKeyPairSync, hkdfSync, randomBytes } from "node:crypto";
|
|
4
4
|
import { Buffer as Buffer$1 } from "buffer";
|
|
Binary file
|
|
Binary file
|