@camstack/server 1.2.944 → 1.2.946
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 +12 -0
- package/dist/api/trpc/generated-cap-mounts.js +18 -1
- package/dist/api/trpc/generated-cap-routers.js +2596 -2559
- package/package.json +9 -17
- package/system/assets/apps-aggregator/icon.svg +5 -0
- package/system/dist/{action-index-Dz9rd1qa.js → action-index-Bcnb-jyg.js} +8 -0
- package/system/dist/{action-index-DpYmsOKh.mjs → action-index-DwPHO2nz.mjs} +8 -0
- package/system/dist/apps.cap-Bqb9NpYx.mjs +130 -0
- package/system/dist/apps.cap-CLjgnuUe.js +141 -0
- package/system/dist/builtins/alerts/alerts.addon.js +2 -2
- package/system/dist/builtins/alerts/alerts.addon.mjs +2 -2
- package/system/dist/builtins/apps-aggregator/aggregate-apps.d.ts +24 -0
- package/system/dist/builtins/apps-aggregator/apps-aggregator.addon.d.ts +16 -0
- package/system/dist/builtins/apps-aggregator/apps-aggregator.addon.js +109 -0
- package/system/dist/builtins/apps-aggregator/apps-aggregator.addon.mjs +103 -0
- package/system/dist/builtins/apps-aggregator/index.d.ts +1 -0
- package/system/dist/builtins/apps-aggregator/index.js +8 -0
- package/system/dist/builtins/apps-aggregator/index.mjs +2 -0
- 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 +4 -4
- package/system/dist/builtins/composer/composer.addon.mjs +4 -4
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +68 -23
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +68 -23
- package/system/dist/builtins/core-blocks/timed-run/timed-run-service.d.ts +19 -2
- package/system/dist/builtins/device-history/device-history.addon.js +1 -1
- package/system/dist/builtins/device-history/device-history.addon.mjs +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.js +31 -9
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +31 -9
- package/system/dist/builtins/keychain/index.js +1 -1
- package/system/dist/builtins/keychain/index.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/system/dist/builtins/local-auth/local-auth.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 +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +1 -1
- package/system/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/system/dist/{command-catalog-CI0tu1Nt.js → command-catalog-A_ONlLfF.js} +1 -1
- package/system/dist/{command-catalog-zwlIA3T5.mjs → command-catalog-CZDlLhxO.mjs} +1 -1
- package/system/dist/{compile-SpeAhaZ6.js → compile-BpAtMSvc.js} +1 -1
- package/system/dist/{compile-OBMHlqD-.mjs → compile-DPGk4aRg.mjs} +1 -1
- package/system/dist/{composition-sources-CXxXfh1z.mjs → composition-sources-D5bWS3nC.mjs} +2 -2
- package/system/dist/{composition-sources-DNgSItK-.js → composition-sources-hmri4Cu4.js} +2 -2
- package/system/dist/{core-blocks.cap-BHEok4VO.js → core-blocks.cap-9xvotd_3.js} +3 -3
- package/system/dist/{core-blocks.cap-CPgZRcpj.mjs → core-blocks.cap-C6REo0Dd.mjs} +3 -3
- package/system/dist/{device-kind-C37Ra2wd.mjs → device-kind-B6G_HfgC.mjs} +19 -2
- package/system/dist/{device-kind-FMhJg8uC.js → device-kind-B7ESmha7.js} +24 -1
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/index.js +4 -4
- package/system/dist/index.mjs +4 -4
- package/system/dist/{named-entity-store-DFwLij9c.js → named-entity-store-CzJ28TsK.js} +2 -2
- package/system/dist/{named-entity-store-DOnyyFFf.mjs → named-entity-store-DJxyweoS.mjs} +2 -2
- package/system/dist/{record-kinds-BV8Gcpsx.js → record-kinds-DP2-HG3W.js} +1 -1
- package/system/dist/{record-kinds-BD2xv4Pd.mjs → record-kinds-WosKAa-D.mjs} +1 -1
- package/system/dist/{rename-composition-block-Cx3X8QSm.js → rename-composition-block--abG_xyW.js} +31 -36
- package/system/dist/{rename-composition-block-C3QQ9UUE.mjs → rename-composition-block-kmkoIx0R.mjs} +31 -36
- package/system/dist/{user-management.cap-4IEUCSdL.mjs → user-management.cap-C3eqqVdz.mjs} +1 -1
- package/system/dist/{user-management.cap-DV9Jfsj3.js → user-management.cap-D4r3UKtG.js} +1 -1
- package/system/dist/{wal-maintenance-CkPfVApC.js → wal-maintenance-CZKvoKfx.js} +0 -0
- package/system/dist/{wal-maintenance-u84_1sVl.mjs → wal-maintenance-WLoThDXX.mjs} +0 -0
- package/system/package.json +16 -1
- /package/system/dist/{constants-Ba3FTIHl.js → constants-Ba3FTIHl2.js} +0 -0
- /package/system/dist/{constants-DB4piTD5.mjs → constants-DB4piTD52.mjs} +0 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { E as deviceStatusCapability, T as DeviceStatusSchema } from "../../stream-catalog.cap-CzwRDaqT.mjs";
|
|
2
2
|
import { b as EventCategory$1, f as defineAddonMigrations, g as WELL_KNOWN_TAB_MAP, n as secretTreeFromPaths, o as resolveSecretMarkers, s as transformSecretWrite, t as BaseAddon } from "../../base-addon-BcVoYZbC.mjs";
|
|
3
3
|
import { B as SECRET_CLEAR, G as isSecretMarkerLike, H as isSecretClear, K as makeSecretMarker, W as isSecretMarker, X as isKeychainStoredField, Z as errMsg$1, b as buildSecretRef, q as toSecretFieldView, w as parseSecretRef } from "../../scoped-settings-DVWUIP7Z.mjs";
|
|
4
|
-
import { Jn as ExportNameRefusedError, _n as deviceStateCapability, b as workloadTransition, c as kebabToCamel, fn as PUSH_CONFIRM_WINDOW_MS, g as WorkloadStateSchema, gn as FieldClaimSchema, h as WORKLOAD_TRANSITION_CATEGORY, hn as FieldClaimModeSchema, m as ALL_CAPABILITY_DEFINITIONS, mn as effectiveRefreshIntervalMs, n as renameCompositionBlock, pn as commandBurstOffsets, t as composedBlockIdOf, v as isWorkloadSettled, vn as deviceExtensionCapability, y as workloadCapability, yn as EXTENSION_SLOTS } from "../../rename-composition-block-
|
|
4
|
+
import { Jn as ExportNameRefusedError, _n as deviceStateCapability, b as workloadTransition, c as kebabToCamel, fn as PUSH_CONFIRM_WINDOW_MS, g as WorkloadStateSchema, gn as FieldClaimSchema, h as WORKLOAD_TRANSITION_CATEGORY, hn as FieldClaimModeSchema, m as ALL_CAPABILITY_DEFINITIONS, mn as effectiveRefreshIntervalMs, n as renameCompositionBlock, pn as commandBurstOffsets, t as composedBlockIdOf, v as isWorkloadSettled, vn as deviceExtensionCapability, y as workloadCapability, yn as EXTENSION_SLOTS } from "../../rename-composition-block-kmkoIx0R.mjs";
|
|
5
5
|
import { t as userError } from "../../camstack-error-viZYfcj9.mjs";
|
|
6
6
|
import { a as expandCapMethods$1, s as isDeviceConfigCap } from "../../capability-definition-C1TLUVJR.mjs";
|
|
7
7
|
import { t as collectZodSecretPaths$1 } from "../../zod-secret-zY4nM61M.mjs";
|
|
8
8
|
import { C as generateDeviceAlias, S as checkDeviceAlias, _ as DEVICE_TEMPLATE_MAX_LENGTH, a as deviceManagerCapability, b as DEVICE_TEMPLATE_VALUES_CAP, d as ZoneBodySchema, g as DEVICE_TEMPLATE_FILTERS, h as identityLinkSidesRefusal, m as identityLinkId, s as RoomBodySchema, v as DEVICE_TEMPLATE_MAX_OUTPUT, x as resolveTemplateRef } from "../../device-manager.cap-CV4KGp3e.mjs";
|
|
9
9
|
import { a as isEmptyIdentifiers, c as sameIdentifiers, i as identifierStrength, l as CAMERA_SWITCH_ORDER, o as mergeIdentifiers, r as DeviceIdentifiersSchema, t as DEVICE_IDENTIFIER_KEYS } from "../../device-identifiers-iSuQCKmK.mjs";
|
|
10
|
-
import { a as deviceRowBackendOf, c as recordUpsertEdit, i as DeviceRowStore, n as DEVICE_ROWS_COLLECTION, o as MigrationRefusedError, r as DEVICE_ROWS_FLEET_LIMIT, t as deviceManagerRecordKinds } from "../../record-kinds-
|
|
10
|
+
import { a as deviceRowBackendOf, c as recordUpsertEdit, i as DeviceRowStore, n as DEVICE_ROWS_COLLECTION, o as MigrationRefusedError, r as DEVICE_ROWS_FLEET_LIMIT, t as deviceManagerRecordKinds } from "../../record-kinds-WosKAa-D.mjs";
|
|
11
11
|
import { u as preconditionOf } from "../../migration-BvbfW9g-.mjs";
|
|
12
12
|
import { f as canonicalIconKey, s as normalizeTags, u as tagKey } from "../../tag-DU8pm9Bi.mjs";
|
|
13
13
|
import { n as DeviceRole, r as DeviceType$1, t as DeviceFeature } from "../../device-type-TUGqGmaI.mjs";
|
|
14
|
-
import { n as capAppliesToDeviceKind } from "../../device-kind-
|
|
15
|
-
import { $ as CAP_RUNTIME_FIELD_UNITS, Xt as enumerateItemArrayFields, Zt as enumerateSchemaFields } from "../../core-blocks.cap-
|
|
16
|
-
import { c as CAP_VOCABULARY_BY_NAME, o as vocabActionIdFor } from "../../action-index-
|
|
14
|
+
import { n as capAdmitsDevice, r as capAppliesToDeviceKind } from "../../device-kind-B6G_HfgC.mjs";
|
|
15
|
+
import { $ as CAP_RUNTIME_FIELD_UNITS, Xt as enumerateItemArrayFields, Zt as enumerateSchemaFields } from "../../core-blocks.cap-C6REo0Dd.mjs";
|
|
16
|
+
import { c as CAP_VOCABULARY_BY_NAME, o as vocabActionIdFor } from "../../action-index-DwPHO2nz.mjs";
|
|
17
17
|
import { u as locationIconKey } from "../../addon-settings.cap-CHpmuaQG.mjs";
|
|
18
|
-
import "../../compile-
|
|
18
|
+
import "../../compile-DPGk4aRg.mjs";
|
|
19
19
|
import { a as normalizeUnit, r as extractSourceInfoFromMetadata } from "../../source-info-DGB7SdB_.mjs";
|
|
20
|
-
import { a as loadPrefixed, c as roomIdFromKey, d as ConditionMirror, i as createWriteLock, l as tagIdFromKey, n as EntityNotFoundError, r as NamedEntityStore, s as entityNameKey, t as EntityNameTakenError, u as zoneIdFromKey } from "../../named-entity-store-
|
|
21
|
-
import { a as effectConditionHolds, i as commandHoldMs, n as commandEffect, o as isCommand$1, r as commandEffects, s as resolveSideEffect } from "../../command-catalog-
|
|
20
|
+
import { a as loadPrefixed, c as roomIdFromKey, d as ConditionMirror, i as createWriteLock, l as tagIdFromKey, n as EntityNotFoundError, r as NamedEntityStore, s as entityNameKey, t as EntityNameTakenError, u as zoneIdFromKey } from "../../named-entity-store-DJxyweoS.mjs";
|
|
21
|
+
import { a as effectConditionHolds, i as commandHoldMs, n as commandEffect, o as isCommand$1, r as commandEffects, s as resolveSideEffect } from "../../command-catalog-CZDlLhxO.mjs";
|
|
22
22
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
23
23
|
import { a as redactLogText, i as redactLogMeta, n as isSecretArgumentKey } from "../../log-redactor-XLDrPzOi.mjs";
|
|
24
24
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
@@ -1248,6 +1248,27 @@ var METHOD_ACCESS_MAP = /* @__PURE__ */ Object.freeze({
|
|
|
1248
1248
|
access: "view",
|
|
1249
1249
|
role: "viewer"
|
|
1250
1250
|
},
|
|
1251
|
+
"apps.getNavBadges": {
|
|
1252
|
+
capName: "apps",
|
|
1253
|
+
capScope: "system",
|
|
1254
|
+
addonId: null,
|
|
1255
|
+
access: "view",
|
|
1256
|
+
role: "viewer"
|
|
1257
|
+
},
|
|
1258
|
+
"apps.listApps": {
|
|
1259
|
+
capName: "apps",
|
|
1260
|
+
capScope: "system",
|
|
1261
|
+
addonId: null,
|
|
1262
|
+
access: "view",
|
|
1263
|
+
role: "viewer"
|
|
1264
|
+
},
|
|
1265
|
+
"appSource.listApps": {
|
|
1266
|
+
capName: "app-source",
|
|
1267
|
+
capScope: "system",
|
|
1268
|
+
addonId: null,
|
|
1269
|
+
access: "view",
|
|
1270
|
+
role: "admin"
|
|
1271
|
+
},
|
|
1251
1272
|
"audioAnalysis.applyDeviceSettingsPatch": {
|
|
1252
1273
|
capName: "audio-analysis",
|
|
1253
1274
|
capScope: "device",
|
|
@@ -14871,6 +14892,7 @@ async function resolveBindingsForDevice(deps, deviceId, row, pass) {
|
|
|
14871
14892
|
else if (deps.capabilityRegistry) {
|
|
14872
14893
|
const skippedForType = [];
|
|
14873
14894
|
const skippedSystem = [];
|
|
14895
|
+
const hasBound = (companion) => entries.some((entry) => entry.capName === companion) || deps.capabilityRegistry?.getNativeAddonId(companion, deviceId) != null || resolveRemote(companion) !== null;
|
|
14874
14896
|
for (const capName of deps.capabilityRegistry.getCapsWithDefaultWrapper()) {
|
|
14875
14897
|
if (seenCaps.has(capName)) continue;
|
|
14876
14898
|
const definition = deps.capabilityRegistry.getDefinition(capName);
|
|
@@ -14878,7 +14900,7 @@ async function resolveBindingsForDevice(deps, deviceId, row, pass) {
|
|
|
14878
14900
|
skippedSystem.push(capName);
|
|
14879
14901
|
continue;
|
|
14880
14902
|
}
|
|
14881
|
-
if (!
|
|
14903
|
+
if (!capAdmitsDevice(definition, deviceType, deviceRole, hasBound)) {
|
|
14882
14904
|
skippedForType.push(capName);
|
|
14883
14905
|
continue;
|
|
14884
14906
|
}
|
|
@@ -10,7 +10,7 @@ const require_keychain_admin_cap = require("../../keychain-admin.cap-DcRCRWtu.js
|
|
|
10
10
|
const require_device_ca = require("../../device-ca-C5kJE6mL.js");
|
|
11
11
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
12
12
|
const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-BK8eoGlF.js");
|
|
13
|
-
const require_constants = require("../../constants-
|
|
13
|
+
const require_constants = require("../../constants-Ba3FTIHl2.js");
|
|
14
14
|
const require_platform_key_source = require("../../platform-key-source-Di7HrlGR.js");
|
|
15
15
|
let node_crypto = require("node:crypto");
|
|
16
16
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -5,7 +5,7 @@ import { a as keychainCapability, i as keychainAdminCapability, n as KeychainAud
|
|
|
5
5
|
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-BLM6fccc.mjs";
|
|
6
6
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
7
7
|
import { t as LEGACY_INTEGRATION_ROWS_TABLE } from "../../legacy-integration-rows-door-CwzC5XNk.mjs";
|
|
8
|
-
import { a as MESH_CA_KEY_REF } from "../../constants-
|
|
8
|
+
import { a as MESH_CA_KEY_REF } from "../../constants-DB4piTD52.mjs";
|
|
9
9
|
import { n as getPlatformKeychainKey } from "../../platform-key-source-BWlq0jjn.mjs";
|
|
10
10
|
import { createCipheriv, createDecipheriv, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
11
11
|
import { restrictDirToOwnerSync, restrictFileToOwnerSync, writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
@@ -7,7 +7,7 @@ const require_base_addon = require("../../base-addon-BG7p06Hb.js");
|
|
|
7
7
|
const require_scoped_settings = require("../../scoped-settings-CylSSq_8.js");
|
|
8
8
|
const require_camstack_error = require("../../camstack-error-DJ-TUAi1.js");
|
|
9
9
|
const require_record_kind = require("../../record-kind-DoBfYHCs.js");
|
|
10
|
-
const require_user_management_cap = require("../../user-management.cap-
|
|
10
|
+
const require_user_management_cap = require("../../user-management.cap-D4r3UKtG.js");
|
|
11
11
|
const require_device_certificate = require("../../device-certificate-CguVACQO.js");
|
|
12
12
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
13
13
|
const require_ms$1 = require("../../ms-LB3giGoU.js");
|
|
@@ -3,7 +3,7 @@ import { t as BaseAddon } from "../../base-addon-BcVoYZbC.mjs";
|
|
|
3
3
|
import { K as makeSecretMarker, W as isSecretMarker } from "../../scoped-settings-DVWUIP7Z.mjs";
|
|
4
4
|
import { t as userError } from "../../camstack-error-viZYfcj9.mjs";
|
|
5
5
|
import { s as defineRecordKinds } from "../../record-kind-ub6NXqfh.mjs";
|
|
6
|
-
import { a as authProviderCapability, c as TokenScopeSchema, i as deviceCredentialsCapability, l as UserRecordSchema, n as SsoBridgeClaimsSchema, o as MethodAccessSchema, s as ScopedTokenSchema, t as userManagementCapability, u as ViewerTokenScopeSchema } from "../../user-management.cap-
|
|
6
|
+
import { a as authProviderCapability, c as TokenScopeSchema, i as deviceCredentialsCapability, l as UserRecordSchema, n as SsoBridgeClaimsSchema, o as MethodAccessSchema, s as ScopedTokenSchema, t as userManagementCapability, u as ViewerTokenScopeSchema } from "../../user-management.cap-C3eqqVdz.mjs";
|
|
7
7
|
import { c as buildDeviceEnrollmentLink, l as buildDeviceSignatureMessage, n as DEVICE_NONCE_TTL_MS, t as DEVICE_ENROLLMENT_TTL_MS, u as formatDeviceRevoker } from "../../device-certificate-Cddm4Idn.mjs";
|
|
8
8
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
9
9
|
import { t as require_ms } from "../../ms-CgH2OFlD.mjs";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
6
|
+
const require_wal_maintenance = require("../../wal-maintenance-CZKvoKfx.js");
|
|
7
7
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./filesystem-storage.addon.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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as SQLITE_ENGINE_STORM_WALL_SHARE, F as SQLITE_MMAP_FLOOR_BYTES, G as SqliteOpProfiler, H as SQLITE_PROFILE_REPORT_INTERVAL_MS, I as SQLITE_PAGE_CACHE_CEILING_KIB, K as sqliteEngineStorm, L as SQLITE_PAGE_CACHE_FLOOR_KIB, N as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, P as SQLITE_MMAP_CEILING_BYTES, R as sqliteMmapSizeFor, U as SQLITE_PROFILE_TOP_N, V as SQLITE_PROFILE_REPORT_FLOOR_MS, W as SQLITE_SLOW_CALL_MS, a as WalMaintenance, i as WAL_MAINTENANCE_INTERVAL_MS, l as SqliteSettingsBackend, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as sqlitePageCacheKibFor } from "../../wal-maintenance-
|
|
1
|
+
import { B as SQLITE_ENGINE_STORM_WALL_SHARE, F as SQLITE_MMAP_FLOOR_BYTES, G as SqliteOpProfiler, H as SQLITE_PROFILE_REPORT_INTERVAL_MS, I as SQLITE_PAGE_CACHE_CEILING_KIB, K as sqliteEngineStorm, L as SQLITE_PAGE_CACHE_FLOOR_KIB, N as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, P as SQLITE_MMAP_CEILING_BYTES, R as sqliteMmapSizeFor, U as SQLITE_PROFILE_TOP_N, V as SQLITE_PROFILE_REPORT_FLOOR_MS, W as SQLITE_SLOW_CALL_MS, a as WalMaintenance, i as WAL_MAINTENANCE_INTERVAL_MS, l as SqliteSettingsBackend, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as sqlitePageCacheKibFor } from "../../wal-maintenance-WLoThDXX.mjs";
|
|
2
2
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./filesystem-storage.addon.mjs";
|
|
3
3
|
import { SqliteSettingsAddon } from "./sqlite-settings.addon.mjs";
|
|
4
4
|
//#region src/builtins/sqlite-storage/config-store.ts
|
|
@@ -6,7 +6,7 @@ const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
|
6
6
|
const require_base_addon = require("../../base-addon-BG7p06Hb.js");
|
|
7
7
|
const require_scoped_settings = require("../../scoped-settings-CylSSq_8.js");
|
|
8
8
|
const require_record_kind = require("../../record-kind-DoBfYHCs.js");
|
|
9
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
9
|
+
const require_wal_maintenance = require("../../wal-maintenance-CZKvoKfx.js");
|
|
10
10
|
const require_settings_store_cap = require("../../settings-store.cap-BhOIBtO4.js");
|
|
11
11
|
const require_migration = require("../../migration-CHPdAdNh.js");
|
|
12
12
|
const require_database_snapshot_cap = require("../../database-snapshot.cap-BNS5c60M.js");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as EventCategory, i as collectSecretMarkerRefs, t as BaseAddon } from "../../base-addon-BcVoYZbC.mjs";
|
|
2
2
|
import { A as NoCallerError, C as normalizeSecretOwner, E as DeclarationRefusedError, L as TransactRefusedError, Z as errMsg$1, k as InvalidRecordError, v as RECORD_SWEEP_INTERVAL_MS, z as UnknownRecordKindError } from "../../scoped-settings-DVWUIP7Z.mjs";
|
|
3
3
|
import { n as RecordKindDeclarationSchema } from "../../record-kind-ub6NXqfh.mjs";
|
|
4
|
-
import { A as callRecords, D as RecordsEngine, E as databaseOfStore, M as controlTargetOf, O as callControl, T as trustResult, _ as rehydrateError, a as WalMaintenance, b as collectTransferables, c as vectorProviderOfOwnedFile, d as callMigrate, f as migrateTargetOf, g as DuplicatePlacementError, h as DatabaseBusyError, j as callVector, k as callData, l as SqliteSettingsBackend, m as CrossDatabaseTransactError, o as createVectorIndex, p as CollectionPlacementError, s as vectorProviderOf, u as HUB_MIGRATIONS, x as isFileHostMessage } from "../../wal-maintenance-
|
|
4
|
+
import { A as callRecords, D as RecordsEngine, E as databaseOfStore, M as controlTargetOf, O as callControl, T as trustResult, _ as rehydrateError, a as WalMaintenance, b as collectTransferables, c as vectorProviderOfOwnedFile, d as callMigrate, f as migrateTargetOf, g as DuplicatePlacementError, h as DatabaseBusyError, j as callVector, k as callData, l as SqliteSettingsBackend, m as CrossDatabaseTransactError, o as createVectorIndex, p as CollectionPlacementError, s as vectorProviderOf, u as HUB_MIGRATIONS, x as isFileHostMessage } from "../../wal-maintenance-WLoThDXX.mjs";
|
|
5
5
|
import { i as DATA_STORE_DATABASES } from "../../settings-store.cap-CaDSOqgK.mjs";
|
|
6
6
|
import { c as catalogueIssues, l as orderMigrations, r as MigrationMetaSchema } from "../../migration-BvbfW9g-.mjs";
|
|
7
7
|
import { a as databaseSnapshotCapability, i as DATABASE_SNAPSHOT_TIMEOUT_MS, n as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, r as DATABASE_SNAPSHOT_SUFFIX } from "../../database-snapshot.cap-a3lSf4hl.mjs";
|
|
@@ -10,7 +10,7 @@ const require_custom_actions = require("../../custom-actions-D92NRi2c.js");
|
|
|
10
10
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
11
11
|
const require_x509_es = require("../../x509.es-WtnRNyYS.js");
|
|
12
12
|
const require_hub_identity = require("../../hub-identity-BMdR3Mw9.js");
|
|
13
|
-
const require_constants$8 = require("../../constants-
|
|
13
|
+
const require_constants$8 = require("../../constants-Ba3FTIHl2.js");
|
|
14
14
|
const require_src$1 = require("../../src-CnAqG6EF.js");
|
|
15
15
|
let zod = require("zod");
|
|
16
16
|
let node_crypto = require("node:crypto");
|
|
@@ -6,7 +6,7 @@ import { n as defineCustomActions, t as customAction } from "../../custom-action
|
|
|
6
6
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
7
7
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension } from "../../x509.es-BRiJgOvu.mjs";
|
|
8
8
|
import { B as AGENT_HTTPS_NAMES_COLLECTION, G as systemConfigRecordKinds, H as AgentHttpsNames, I as isLocalOnlyHostname, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, m as isPrivateAddress, r as isAnnouncedHubId } from "../../hub-identity-DjMN9Ac2.mjs";
|
|
9
|
-
import { a as MESH_CA_KEY_REF, c as MESH_LEAF_NOT_AFTER, i as MESH_CA_FIELD, l as SERVER_AUTH_OID, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-
|
|
9
|
+
import { a as MESH_CA_KEY_REF, c as MESH_LEAF_NOT_AFTER, i as MESH_CA_FIELD, l as SERVER_AUTH_OID, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-DB4piTD52.mjs";
|
|
10
10
|
import { t as require_src } from "../../src-hG4grMU4.mjs";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, randomInt, sign, timingSafeEqual, verify, webcrypto } from "node:crypto";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_action_index = require("./action-index-
|
|
1
|
+
const require_action_index = require("./action-index-Bcnb-jyg.js");
|
|
2
2
|
//#region ../types/dist/esm/device/cap-vocabulary/command-catalog.mjs
|
|
3
3
|
/**
|
|
4
4
|
* The command catalogue (D1022): which cap methods are COMMANDS - the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as findVocabAction, c as CAP_VOCABULARY_BY_NAME, n as actionEffect, o as vocabActionIdFor, r as allVocabActions } from "./action-index-
|
|
1
|
+
import { a as findVocabAction, c as CAP_VOCABULARY_BY_NAME, n as actionEffect, o as vocabActionIdFor, r as allVocabActions } from "./action-index-DwPHO2nz.mjs";
|
|
2
2
|
//#region ../types/dist/esm/device/cap-vocabulary/command-catalog.mjs
|
|
3
3
|
/**
|
|
4
4
|
* The command catalogue (D1022): which cap methods are COMMANDS - the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_capability_definition = require("./capability-definition-BEVd01Xj.js");
|
|
2
2
|
const require_quantity = require("./quantity-lY1KiTSZ.js");
|
|
3
3
|
const require_device_type = require("./device-type-Cnc0NiSX.js");
|
|
4
|
-
const require_device_kind = require("./device-kind-
|
|
4
|
+
const require_device_kind = require("./device-kind-B7ESmha7.js");
|
|
5
5
|
const require_history_catalog = require("./history-catalog-CiTMP3-E.js");
|
|
6
6
|
let zod = require("zod");
|
|
7
7
|
//#region ../types/dist/esm/catalogs/sensor-active-state.mjs
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as method } from "./capability-definition-C1TLUVJR.mjs";
|
|
2
2
|
import { n as baseUnitOf } from "./quantity-D3g5SxsZ.mjs";
|
|
3
3
|
import { n as DeviceRole, r as DeviceType, t as DeviceFeature } from "./device-type-TUGqGmaI.mjs";
|
|
4
|
-
import { t as canonicalStoredDeviceType } from "./device-kind-
|
|
4
|
+
import { t as canonicalStoredDeviceType } from "./device-kind-B6G_HfgC.mjs";
|
|
5
5
|
import { a as wattMillisecondsToKwh, i as historyFieldsFor } from "./history-catalog-A_dzXNpv.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region ../types/dist/esm/catalogs/sensor-active-state.mjs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Z as errMsg } from "./scoped-settings-DVWUIP7Z.mjs";
|
|
2
|
-
import { Q as CAP_CUSTOMIZE_CATALOG } from "./core-blocks.cap-
|
|
3
|
-
import { A as compositionSourceKey, a as isIdentifier, c as signedToken, i as dwellExpr, l as unsignedToken, o as linearExpr, r as constantExpr, s as overrideExpr } from "./compile-
|
|
2
|
+
import { Q as CAP_CUSTOMIZE_CATALOG } from "./core-blocks.cap-C6REo0Dd.mjs";
|
|
3
|
+
import { A as compositionSourceKey, a as isIdentifier, c as signedToken, i as dwellExpr, l as unsignedToken, o as linearExpr, r as constantExpr, s as overrideExpr } from "./compile-DPGk4aRg.mjs";
|
|
4
4
|
//#region ../types/dist/esm/composition/customize/field-source.mjs
|
|
5
5
|
function fromRead(source, cap, fieldPath) {
|
|
6
6
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_scoped_settings = require("./scoped-settings-CylSSq_8.js");
|
|
2
|
-
const require_core_blocks_cap = require("./core-blocks.cap-
|
|
3
|
-
const require_compile = require("./compile-
|
|
2
|
+
const require_core_blocks_cap = require("./core-blocks.cap-9xvotd_3.js");
|
|
3
|
+
const require_compile = require("./compile-BpAtMSvc.js");
|
|
4
4
|
//#region ../types/dist/esm/composition/customize/field-source.mjs
|
|
5
5
|
function fromRead(source, cap, fieldPath) {
|
|
6
6
|
return {
|
|
@@ -5,10 +5,10 @@ const require_system_reasons = require("./system-reasons-Be_k1W8g.js");
|
|
|
5
5
|
const require_quantity = require("./quantity-lY1KiTSZ.js");
|
|
6
6
|
const require_tag = require("./tag-BLraBqvp.js");
|
|
7
7
|
const require_device_type = require("./device-type-Cnc0NiSX.js");
|
|
8
|
-
const require_device_kind = require("./device-kind-
|
|
9
|
-
const require_action_index = require("./action-index-
|
|
8
|
+
const require_device_kind = require("./device-kind-B7ESmha7.js");
|
|
9
|
+
const require_action_index = require("./action-index-Bcnb-jyg.js");
|
|
10
10
|
const require_addon_settings_cap = require("./addon-settings.cap-nZVHPo3X.js");
|
|
11
|
-
const require_compile = require("./compile-
|
|
11
|
+
const require_compile = require("./compile-BpAtMSvc.js");
|
|
12
12
|
const require_time_window = require("./time-window-B6UhCArd.js");
|
|
13
13
|
const require_source_info = require("./source-info-DtWf4k2j.js");
|
|
14
14
|
const require_l10n = require("./l10n-CGMvp7NF.js");
|
|
@@ -5,10 +5,10 @@ import { t as NOT_A_DEVICE } from "./system-reasons-CYj4qwyS.mjs";
|
|
|
5
5
|
import { a as readingMeta, i as isReadingQuantity, n as baseUnitOf, t as ReadingQuantitySchema } from "./quantity-D3g5SxsZ.mjs";
|
|
6
6
|
import { a as TagsFieldSchema, n as TagIdsFieldSchema } from "./tag-DU8pm9Bi.mjs";
|
|
7
7
|
import { r as DeviceType } from "./device-type-TUGqGmaI.mjs";
|
|
8
|
-
import {
|
|
9
|
-
import { a as findVocabAction, n as actionEffect } from "./action-index-
|
|
8
|
+
import { a as isSwitchLight, t as canonicalStoredDeviceType } from "./device-kind-B6G_HfgC.mjs";
|
|
9
|
+
import { a as findVocabAction, n as actionEffect } from "./action-index-DwPHO2nz.mjs";
|
|
10
10
|
import { a as tryConvertUnit, n as SettingsSchemaWithValuesSchema, o as unitDimension, r as SettingsUpdateResultSchema, t as SettingsPatchSchema, u as locationIconKey } from "./addon-settings.cap-CHpmuaQG.mjs";
|
|
11
|
-
import { A as compositionSourceKey, B as CompositionSourceRefSchema, D as compositionItemFieldPath, E as compositionFeatureEnabled, F as COMPOSED_DEVICE_STABLE_ID_PREFIX, M as featureSources, N as fieldReads, O as compositionReadKey, P as isForwardInputRef, S as CompositionSchema, _ as refused, b as CompositionFieldReadSchema, dt as compileExpressionSafe, ft as EXPRESSION_IDENTIFIER_RE, g as problem, h as compositionFieldAt, j as featureFieldEntries, m as groupTemplate, mt as EXPRESSION_BUILTINS, n as sameHelperBody, pt as MAX_EXPRESSION_SOURCE_LENGTH, t as compileHelper, ut as validateExpressionSource, v as COMPOSER_ADDON_ID, w as composedDeviceRef, x as CompositionFieldSourceSchema, y as COMPOSITION_ITEM_ARRAY_PATH } from "./compile-
|
|
11
|
+
import { A as compositionSourceKey, B as CompositionSourceRefSchema, D as compositionItemFieldPath, E as compositionFeatureEnabled, F as COMPOSED_DEVICE_STABLE_ID_PREFIX, M as featureSources, N as fieldReads, O as compositionReadKey, P as isForwardInputRef, S as CompositionSchema, _ as refused, b as CompositionFieldReadSchema, dt as compileExpressionSafe, ft as EXPRESSION_IDENTIFIER_RE, g as problem, h as compositionFieldAt, j as featureFieldEntries, m as groupTemplate, mt as EXPRESSION_BUILTINS, n as sameHelperBody, pt as MAX_EXPRESSION_SOURCE_LENGTH, t as compileHelper, ut as validateExpressionSource, v as COMPOSER_ADDON_ID, w as composedDeviceRef, x as CompositionFieldSourceSchema, y as COMPOSITION_ITEM_ARRAY_PATH } from "./compile-DPGk4aRg.mjs";
|
|
12
12
|
import { c as WeekdayKeySchema, m as validateTimeSpecForSite, n as TimeWindowSchema, o as refineTimeWindow, r as expandTimeWindowPreset, s as TimeSpecSchema, t as TimeWindowObjectSchema } from "./time-window-BnUBULgu.mjs";
|
|
13
13
|
import { a as normalizeUnit } from "./source-info-DGB7SdB_.mjs";
|
|
14
14
|
import { t } from "./l10n-Bu6aUvSY.mjs";
|
|
@@ -62,7 +62,8 @@ function isSwitchLight(type, role) {
|
|
|
62
62
|
*
|
|
63
63
|
* Fails open where the old type-only gate did: no `deviceTypes` (or an empty
|
|
64
64
|
* list) applies to every device, and an unknown type never filters (a failed
|
|
65
|
-
* meta read must not destroy work, D49). A
|
|
65
|
+
* meta read must not destroy work, D49). A cap that declares `bindsWhenDeviceHas`
|
|
66
|
+
* does NOT use this gate: `capAdmitsDevice` does, and it never fails open. A type the cap's `deviceRoles` names
|
|
66
67
|
* is offered only to the roles listed there; an unknown role is NOT one of
|
|
67
68
|
* them, so a `switch` whose role could not be read is not a heater.
|
|
68
69
|
*/
|
|
@@ -76,5 +77,21 @@ function capAppliesToDeviceKind(gate, deviceType, role) {
|
|
|
76
77
|
if (roles === void 0) return true;
|
|
77
78
|
return role !== null && role !== void 0 && roles.some((candidate) => candidate === role);
|
|
78
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Is a capability offered on this device, by its kind OR by a cap it has (D1097)?
|
|
82
|
+
*
|
|
83
|
+
* Without `bindsWhenDeviceHas` this is exactly {@link capAppliesToDeviceKind}. With
|
|
84
|
+
* it, a device that has one of the named caps is admitted whatever its type, and
|
|
85
|
+
* otherwise only a KNOWN type that `deviceTypes` names is: the fail-open of an
|
|
86
|
+
* unresolved type does not apply, because "has a switch" is the rule and an
|
|
87
|
+
* unresolved type must not conjure a cap onto a device that has none.
|
|
88
|
+
*/
|
|
89
|
+
function capAdmitsDevice(gate, deviceType, role, hasCap) {
|
|
90
|
+
const companions = gate?.bindsWhenDeviceHas;
|
|
91
|
+
if (companions === void 0 || companions.length === 0) return capAppliesToDeviceKind(gate, deviceType, role);
|
|
92
|
+
if (companions.some(hasCap)) return true;
|
|
93
|
+
if (deviceType === void 0 || (gate?.deviceTypes?.length ?? 0) === 0) return false;
|
|
94
|
+
return capAppliesToDeviceKind(gate, deviceType, role);
|
|
95
|
+
}
|
|
79
96
|
//#endregion
|
|
80
|
-
export { isSwitchLight as i,
|
|
97
|
+
export { isSwitchLight as a, isAirConditioner as i, capAdmitsDevice as n, capAppliesToDeviceKind as r, canonicalStoredDeviceType as t };
|
|
@@ -62,7 +62,8 @@ function isSwitchLight(type, role) {
|
|
|
62
62
|
*
|
|
63
63
|
* Fails open where the old type-only gate did: no `deviceTypes` (or an empty
|
|
64
64
|
* list) applies to every device, and an unknown type never filters (a failed
|
|
65
|
-
* meta read must not destroy work, D49). A
|
|
65
|
+
* meta read must not destroy work, D49). A cap that declares `bindsWhenDeviceHas`
|
|
66
|
+
* does NOT use this gate: `capAdmitsDevice` does, and it never fails open. A type the cap's `deviceRoles` names
|
|
66
67
|
* is offered only to the roles listed there; an unknown role is NOT one of
|
|
67
68
|
* them, so a `switch` whose role could not be read is not a heater.
|
|
68
69
|
*/
|
|
@@ -76,6 +77,22 @@ function capAppliesToDeviceKind(gate, deviceType, role) {
|
|
|
76
77
|
if (roles === void 0) return true;
|
|
77
78
|
return role !== null && role !== void 0 && roles.some((candidate) => candidate === role);
|
|
78
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Is a capability offered on this device, by its kind OR by a cap it has (D1097)?
|
|
82
|
+
*
|
|
83
|
+
* Without `bindsWhenDeviceHas` this is exactly {@link capAppliesToDeviceKind}. With
|
|
84
|
+
* it, a device that has one of the named caps is admitted whatever its type, and
|
|
85
|
+
* otherwise only a KNOWN type that `deviceTypes` names is: the fail-open of an
|
|
86
|
+
* unresolved type does not apply, because "has a switch" is the rule and an
|
|
87
|
+
* unresolved type must not conjure a cap onto a device that has none.
|
|
88
|
+
*/
|
|
89
|
+
function capAdmitsDevice(gate, deviceType, role, hasCap) {
|
|
90
|
+
const companions = gate?.bindsWhenDeviceHas;
|
|
91
|
+
if (companions === void 0 || companions.length === 0) return capAppliesToDeviceKind(gate, deviceType, role);
|
|
92
|
+
if (companions.some(hasCap)) return true;
|
|
93
|
+
if (deviceType === void 0 || (gate?.deviceTypes?.length ?? 0) === 0) return false;
|
|
94
|
+
return capAppliesToDeviceKind(gate, deviceType, role);
|
|
95
|
+
}
|
|
79
96
|
//#endregion
|
|
80
97
|
Object.defineProperty(exports, "canonicalStoredDeviceType", {
|
|
81
98
|
enumerable: true,
|
|
@@ -83,6 +100,12 @@ Object.defineProperty(exports, "canonicalStoredDeviceType", {
|
|
|
83
100
|
return canonicalStoredDeviceType;
|
|
84
101
|
}
|
|
85
102
|
});
|
|
103
|
+
Object.defineProperty(exports, "capAdmitsDevice", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function() {
|
|
106
|
+
return capAdmitsDevice;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
86
109
|
Object.defineProperty(exports, "capAppliesToDeviceKind", {
|
|
87
110
|
enumerable: true,
|
|
88
111
|
get: function() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
2
|
+
const require_wal_maintenance = require("./wal-maintenance-CZKvoKfx.js");
|
|
3
3
|
let node_worker_threads = require("node:worker_threads");
|
|
4
4
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-
|
|
1
|
+
import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-WLoThDXX.mjs";
|
|
2
2
|
import { parentPort, threadId, workerData } from "node:worker_threads";
|
|
3
3
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
4
4
|
/**
|
package/system/dist/index.js
CHANGED
|
@@ -2,14 +2,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
3
3
|
const require_base_addon = require("./base-addon-BG7p06Hb.js");
|
|
4
4
|
const require_scoped_settings = require("./scoped-settings-CylSSq_8.js");
|
|
5
|
-
const require_rename_composition_block = require("./rename-composition-block
|
|
5
|
+
const require_rename_composition_block = require("./rename-composition-block--abG_xyW.js");
|
|
6
6
|
const require_camstack_error = require("./camstack-error-DJ-TUAi1.js");
|
|
7
7
|
const require_capability_definition = require("./capability-definition-BEVd01Xj.js");
|
|
8
8
|
const require_record_kind = require("./record-kind-DoBfYHCs.js");
|
|
9
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
9
|
+
const require_wal_maintenance = require("./wal-maintenance-CZKvoKfx.js");
|
|
10
10
|
const require_device_certificate = require("./device-certificate-CguVACQO.js");
|
|
11
11
|
const require_addon_settings_cap = require("./addon-settings.cap-nZVHPo3X.js");
|
|
12
|
-
const require_named_entity_store = require("./named-entity-store-
|
|
12
|
+
const require_named_entity_store = require("./named-entity-store-CzJ28TsK.js");
|
|
13
13
|
const require_network_access_cap = require("./network-access.cap-CTQ2WQoi.js");
|
|
14
14
|
const require_constants = require("./constants-C860Y6U4.js");
|
|
15
15
|
const require_addon_id = require("./addon-id-Di0lNJ89.js");
|
|
@@ -48,7 +48,7 @@ const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage
|
|
|
48
48
|
const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
|
|
49
49
|
require("./builtins/storage-orchestrator/index.js");
|
|
50
50
|
const require_hub_identity = require("./hub-identity-BMdR3Mw9.js");
|
|
51
|
-
const require_constants$1 = require("./constants-
|
|
51
|
+
const require_constants$1 = require("./constants-Ba3FTIHl2.js");
|
|
52
52
|
const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
|
|
53
53
|
require("./builtins/system-config/index.js");
|
|
54
54
|
const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
|
package/system/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { i as __require } from "./chunk-CNf5ZN-e.mjs";
|
|
2
2
|
import { b as EventCategory$1, i as collectSecretMarkerRefs, p as createEvent$1 } from "./base-addon-BcVoYZbC.mjs";
|
|
3
3
|
import { Z as errMsg$1 } from "./scoped-settings-DVWUIP7Z.mjs";
|
|
4
|
-
import { Un as lifecycleJobSchema, a as isCollectionArrayMethod, c as kebabToCamel$1, d as objectInputDeclaresRequiredDeviceId, dr as compareVersions, f as procedureAuthKey, fr as describeUnmet, i as isArrayOutputSchema, l as looseSchema, m as ALL_CAPABILITY_DEFINITIONS, o as isObjectInput, p as resolveMethodAuth, pr as unmetRequirements, r as extractNestedAddonId, s as isVoidInput, u as objectInputDeclaresAddonId, ur as PackageRequiresSchema } from "./rename-composition-block-
|
|
4
|
+
import { Un as lifecycleJobSchema, a as isCollectionArrayMethod, c as kebabToCamel$1, d as objectInputDeclaresRequiredDeviceId, dr as compareVersions, f as procedureAuthKey, fr as describeUnmet, i as isArrayOutputSchema, l as looseSchema, m as ALL_CAPABILITY_DEFINITIONS, o as isObjectInput, p as resolveMethodAuth, pr as unmetRequirements, r as extractNestedAddonId, s as isVoidInput, u as objectInputDeclaresAddonId, ur as PackageRequiresSchema } from "./rename-composition-block-kmkoIx0R.mjs";
|
|
5
5
|
import { t as userError } from "./camstack-error-viZYfcj9.mjs";
|
|
6
6
|
import { a as expandCapMethods, n as DEVICE_STATUS_METHOD, t as DEVICE_SETTINGS_CONTRIBUTION_METHODS, u as resolveCapMount } from "./capability-definition-C1TLUVJR.mjs";
|
|
7
7
|
import { s as defineRecordKinds } from "./record-kind-ub6NXqfh.mjs";
|
|
8
|
-
import { D as RecordsEngine, J as asNumber, X as parseJsonObject, Y as asString$1, Z as parseJsonUnknown, l as SqliteSettingsBackend, q as asJsonObject$1 } from "./wal-maintenance-
|
|
8
|
+
import { D as RecordsEngine, J as asNumber, X as parseJsonObject, Y as asString$1, Z as parseJsonUnknown, l as SqliteSettingsBackend, q as asJsonObject$1 } from "./wal-maintenance-WLoThDXX.mjs";
|
|
9
9
|
import { f as AppPageLangSchema } from "./device-certificate-Cddm4Idn.mjs";
|
|
10
10
|
import { i as addonSettingsCapability } from "./addon-settings.cap-CHpmuaQG.mjs";
|
|
11
|
-
import { a as loadPrefixed } from "./named-entity-store-
|
|
11
|
+
import { a as loadPrefixed } from "./named-entity-store-DJxyweoS.mjs";
|
|
12
12
|
import { a as AGENT_MDNS_TXT_KEYS, i as AGENT_MDNS_SERVICE_TYPE } from "./network-access.cap-Dx5K0I5i.mjs";
|
|
13
13
|
import { t as RUNTIME_DEFAULTS } from "./constants-DCLpoF4L.mjs";
|
|
14
14
|
import { t as bareAddonId } from "./addon-id-CVg1_r5E.mjs";
|
|
@@ -47,7 +47,7 @@ import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
|
|
|
47
47
|
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";
|
|
48
48
|
import "./builtins/storage-orchestrator/index.mjs";
|
|
49
49
|
import { A as evaluateExistingCert, B as AGENT_HTTPS_NAMES_COLLECTION, C as localCaCommonName, D as LEAF_RENEWAL_WINDOW_DAYS, E as CA_VALIDITY_DAYS, F as isConstrainedCa, H as AgentHttpsNames, I as isLocalOnlyHostname, L as permitsIdentity, M as PERMITTED_DNS_SUFFIXES, N as PERMITTED_IP_RANGES, O as MAX_LEAF_VALIDITY_DAYS, P as buildNameConstraintSet, R as permitsName, T as systemHostFacts, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, _ as pemDigest, a as AgentHttpsInstallError, c as certificateNames, d as describeHttpsLeaf, f as installAgentHttps, g as loadAgentHttps, h as issueAgentHttpsLeaf, i as loadOrCreateHubId, k as SERVER_AUTH_OID, l as collectAgentNames, m as isPrivateAddress, n as HUB_IDENTITY_RELATIVE, o as acceptAgentSans, p as isContainerBridgeAddress, r as isAnnouncedHubId, s as agentHttpsPaths, t as HUB_IDENTITY_FILE, u as createAgentHttpsRequest, v as pinnedHttpsCaFingerprint, w as collectCertIdentity, y as CA_COMMON_NAME, z as readNameConstraints } from "./hub-identity-DjMN9Ac2.mjs";
|
|
50
|
-
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-
|
|
50
|
+
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-DB4piTD52.mjs";
|
|
51
51
|
import { $ as getProcessMeshCaState, A as emitProcessNodeRegistered, At as readCidrSetting, B as getProcessMeshTlsListenerState, C as verifyMembershipAnswer, Ct as isInsecureOrigin, D as ServiceBroker, Dt as createCidrMatcher, E as Errors, Et as readOriginSetting, F as onProcessNodeRegistered, G as MeshCertificateRegistry, H as setProcessMeshTlsListenerState, I as setProcessMeshHandshakeReporter, J as getProcessMeshCertificateRegistry, K as RENEWAL_ABANDONED, L as setProcessMeshPeerTransportLookup, M as getProcessNodeMeshTransport, N as getProcessPeerLeaf, O as setProcessMeshTlsEnabler, Ot as normalizeIp, P as isProcessVerifiedMeshPeer, Q as MeshCaKeeper, R as renewMeshCertificate, S as signMembershipProof, St as OPAQUE_ORIGIN, SystemConfigAddon, T as TlsTcpTransporter, Tt as parseOriginList, U as MESH_NODE_CERTIFICATES_COLLECTION, V as openMeshTlsWhenRevocationsLoaded, W as MESH_NODE_CERTIFICATES_COLUMNS, X as MeshCrl, Y as setProcessMeshCertificateRegistry, Z as processMeshCrl, _ as keyFingerprintShort, _t as isAllowedAgentDashboardReturnTo, a as dialableHubHost, at as generateMeshCa, b as MEMBERSHIP_PATHS, bt as verifyAgentUiUnlockTicket, c as PAIRING_MAX_CODE_ATTEMPTS, ct as issueMeshLeafForNode, d as PAIRING_PIN_DIGITS, dt as AGENT_DASHBOARD_ORIGINS_FIELD, et as requireProcessMeshCa, f as PAIRING_PROTOCOL, ft as AGENT_UI_UNLOCK_TTL_MS, g as describeCsr, gt as UnlockTicketJtiStore, h as computePairingSas, ht as AGENT_UI_UNLOCK_VERSION, i as AgentPairing, it as exportMeshPrivateKeyPem, j as getProcessMeshHandshakeReporter, k as dropProcessPeer, kt as parseCidrList, l as PAIRING_MAX_SESSIONS, lt as issueMeshLeafFromCsr, m as computePairingCommitment, mt as AGENT_UI_UNLOCK_USE, n as HubPairing, nt as caFingerprintCompact, o as hubHostFromMeshAddress, ot as generateMeshKeyPair, p as PAIRING_TTL_MS, pt as AGENT_UI_UNLOCK_TYP, q as describeMeshLeaf, r as PairingHttpError, rt as createMeshCsrPem, s as PAIRING_CODE_DIGITS, st as isValidAgentNodeId, tt as caFingerprint, u as PAIRING_PATHS, ut as loadMeshCa, v as signPairingProof, vt as mintAgentUiUnlockTicket, w as MESH_TLS_PORT_HELLO_FIELD, wt as normalizeOrigin, x as MembershipResponder, xt as InvalidCorsOriginError, y as verifyPairingProof, yt as parseAgentDashboardOrigins, z as revokeMeshCertificate } from "./builtins/system-config/system-config.addon.mjs";
|
|
52
52
|
import "./builtins/system-config/index.mjs";
|
|
53
53
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_core_blocks_cap = require("./core-blocks.cap-
|
|
2
|
-
const require_compile = require("./compile-
|
|
1
|
+
const require_core_blocks_cap = require("./core-blocks.cap-9xvotd_3.js");
|
|
2
|
+
const require_compile = require("./compile-BpAtMSvc.js");
|
|
3
3
|
const require_time_window = require("./time-window-B6UhCArd.js");
|
|
4
4
|
const require_read_all_rows$1 = require("./read-all-rows-CVoO1ONM.js");
|
|
5
5
|
const require_prefix_range = require("./prefix-range-D_KueXbQ.js");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Ft as forEachLeaf, Ht as faultMatches, Lt as isEventLeaf, Pt as eventLeafIdAt, Rt as compareValues, Ut as readFault, Vt as describeWantedFaults, Wt as anySubjectMatches, qt as isQuantityValue, zt as describeHoldMs } from "./core-blocks.cap-
|
|
2
|
-
import { lt as toExpressionValue, st as evaluateExpressionSource } from "./compile-
|
|
1
|
+
import { Ft as forEachLeaf, Ht as faultMatches, Lt as isEventLeaf, Pt as eventLeafIdAt, Rt as compareValues, Ut as readFault, Vt as describeWantedFaults, Wt as anySubjectMatches, qt as isQuantityValue, zt as describeHoldMs } from "./core-blocks.cap-C6REo0Dd.mjs";
|
|
2
|
+
import { lt as toExpressionValue, st as evaluateExpressionSource } from "./compile-DPGk4aRg.mjs";
|
|
3
3
|
import { a as judgeTimeWindow } from "./time-window-BnUBULgu.mjs";
|
|
4
4
|
import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
|
|
5
5
|
import { t as prefixRange } from "./prefix-range-Dl0znowN.mjs";
|
|
@@ -3,7 +3,7 @@ const require_record_kind = require("./record-kind-DoBfYHCs.js");
|
|
|
3
3
|
const require_device_manager_cap = require("./device-manager.cap-B9qVf7ag.js");
|
|
4
4
|
const require_device_identifiers = require("./device-identifiers-BQg9EQi1.js");
|
|
5
5
|
const require_migration = require("./migration-CHPdAdNh.js");
|
|
6
|
-
const require_device_kind = require("./device-kind-
|
|
6
|
+
const require_device_kind = require("./device-kind-B7ESmha7.js");
|
|
7
7
|
//#region ../types/dist/esm/records/records-access.mjs
|
|
8
8
|
function isRecord(value) {
|
|
9
9
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -3,7 +3,7 @@ import { s as defineRecordKinds } from "./record-kind-ub6NXqfh.mjs";
|
|
|
3
3
|
import { d as ZoneBodySchema, n as DeviceTombstoneSchema, o as DiscoveryProposalBodySchema, p as IdentityLinkBodySchema, s as RoomBodySchema } from "./device-manager.cap-CV4KGp3e.mjs";
|
|
4
4
|
import { n as DeviceIdentifierKeySchema, r as DeviceIdentifiersSchema } from "./device-identifiers-iSuQCKmK.mjs";
|
|
5
5
|
import { u as preconditionOf } from "./migration-BvbfW9g-.mjs";
|
|
6
|
-
import { t as canonicalStoredDeviceType } from "./device-kind-
|
|
6
|
+
import { t as canonicalStoredDeviceType } from "./device-kind-B6G_HfgC.mjs";
|
|
7
7
|
//#region ../types/dist/esm/records/records-access.mjs
|
|
8
8
|
function isRecord(value) {
|
|
9
9
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
package/system/dist/{rename-composition-block-Cx3X8QSm.js → rename-composition-block--abG_xyW.js}
RENAMED
|
@@ -16,17 +16,18 @@ const require_relocate = require("./relocate-CdVQAk-w.js");
|
|
|
16
16
|
const require_storage_migration_cap = require("./storage-migration.cap-CDOhpCQw.js");
|
|
17
17
|
const require_tag = require("./tag-BLraBqvp.js");
|
|
18
18
|
const require_platform_probe_cap = require("./platform-probe.cap-C0N9CugQ.js");
|
|
19
|
-
const require_user_management_cap = require("./user-management.cap-
|
|
19
|
+
const require_user_management_cap = require("./user-management.cap-D4r3UKtG.js");
|
|
20
20
|
const require_device_type = require("./device-type-Cnc0NiSX.js");
|
|
21
21
|
const require_device_certificate = require("./device-certificate-CguVACQO.js");
|
|
22
|
-
const require_core_blocks_cap = require("./core-blocks.cap-
|
|
23
|
-
const require_action_index = require("./action-index-
|
|
22
|
+
const require_core_blocks_cap = require("./core-blocks.cap-9xvotd_3.js");
|
|
23
|
+
const require_action_index = require("./action-index-Bcnb-jyg.js");
|
|
24
24
|
const require_addon_settings_cap = require("./addon-settings.cap-nZVHPo3X.js");
|
|
25
|
-
const require_compile = require("./compile-
|
|
25
|
+
const require_compile = require("./compile-BpAtMSvc.js");
|
|
26
26
|
const require_source_info = require("./source-info-DtWf4k2j.js");
|
|
27
27
|
const require_l10n = require("./l10n-CGMvp7NF.js");
|
|
28
28
|
const require_addon_pages_cap = require("./addon-pages.cap-B3gHFDYW.js");
|
|
29
29
|
const require_addon_widgets_cap = require("./addon-widgets.cap-DuCe2VRj.js");
|
|
30
|
+
const require_apps_cap = require("./apps.cap-CLjgnuUe.js");
|
|
30
31
|
const require_database_snapshot_cap = require("./database-snapshot.cap-BNS5c60M.js");
|
|
31
32
|
const require_storage_occupancy_cap = require("./storage-occupancy.cap-B-Z8f8TZ.js");
|
|
32
33
|
const require_calendars_cap = require("./calendars.cap-CGeOtL7Q.js");
|
|
@@ -12496,42 +12497,34 @@ function switchRunLimitOf(deviceType, role) {
|
|
|
12496
12497
|
* boot a deadline already past sends the off once (a failed off is logged, never
|
|
12497
12498
|
* retried in a loop - D49); a future one is re-armed.
|
|
12498
12499
|
*
|
|
12499
|
-
*
|
|
12500
|
-
*
|
|
12501
|
-
*
|
|
12500
|
+
* It is offered on EVERY device that has a `switch` (and on a pet fountain, which
|
|
12501
|
+
* switches its pump): the binding rule is `bindsWhenDeviceHas: ['switch']` (D1097).
|
|
12502
|
+
* What a device may be run for, and for how long at most, is the one table of
|
|
12503
|
+
* `switchRunLimitOf` by device type and role ({@link timedRunLimitOf}): the maximum
|
|
12504
|
+
* is a safety bound, not a preference, so a request above it is REFUSED with a
|
|
12505
|
+
* typed reason, never clamped.
|
|
12502
12506
|
*/
|
|
12503
12507
|
var TimedRunUnitSchema = /* @__PURE__ */ zod.z.enum(["s", "min"]);
|
|
12504
|
-
/** A plug-in heater (switch + `switch-heater`): up to 3 h, in minutes. */
|
|
12505
|
-
var TIMED_RUN_HEATER_LIMIT = {
|
|
12506
|
-
actuator: "switch",
|
|
12507
|
-
maxSeconds: SWITCH_RUN_HEATER_LIMIT.maxSeconds,
|
|
12508
|
-
unit: "min",
|
|
12509
|
-
quickRunDefault: SWITCH_RUN_HEATER_LIMIT.quickRunSeconds / 60
|
|
12510
|
-
};
|
|
12511
|
-
/** A pet fountain's pump: up to 5 min, in seconds. */
|
|
12512
|
-
var TIMED_RUN_PET_FOUNTAIN_LIMIT = {
|
|
12513
|
-
actuator: "pet-fountain",
|
|
12514
|
-
maxSeconds: SWITCH_RUN_PET_FOUNTAIN_LIMIT.maxSeconds,
|
|
12515
|
-
unit: "s",
|
|
12516
|
-
quickRunDefault: SWITCH_RUN_PET_FOUNTAIN_LIMIT.quickRunSeconds
|
|
12517
|
-
};
|
|
12518
12508
|
/**
|
|
12519
|
-
* The
|
|
12520
|
-
*
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
/** The roles that make a device of these types timed-run-able (D1033). */
|
|
12524
|
-
var TIMED_RUN_DEVICE_ROLES = { [require_device_type.DeviceType.Switch]: [require_device_type.DeviceRole.SwitchHeater] };
|
|
12525
|
-
/**
|
|
12526
|
-
* The longest run of a device, by its type AND role (D1033): a `switch` is a
|
|
12527
|
-
* heater only with role `switch-heater`, a pet fountain always is what it is.
|
|
12528
|
-
* `null` - the device is not offered `timed-run`.
|
|
12509
|
+
* The timed-run limit of ANY device the cap is bound to: the numbers come from
|
|
12510
|
+
* the one table (`switchRunLimitOf`), the unit and the actuator from the type.
|
|
12511
|
+
* A pet fountain runs its pump and thinks in seconds; every other device is
|
|
12512
|
+
* switched through `switch.setState` and thinks in minutes.
|
|
12529
12513
|
*/
|
|
12530
12514
|
function timedRunLimitOf(deviceType, role) {
|
|
12531
12515
|
const limit = switchRunLimitOf(deviceType, role);
|
|
12532
|
-
if (deviceType === require_device_type.DeviceType.PetFountain
|
|
12533
|
-
|
|
12534
|
-
|
|
12516
|
+
if (deviceType === require_device_type.DeviceType.PetFountain) return {
|
|
12517
|
+
actuator: "pet-fountain",
|
|
12518
|
+
maxSeconds: limit.maxSeconds,
|
|
12519
|
+
unit: "s",
|
|
12520
|
+
quickRunDefault: limit.quickRunSeconds
|
|
12521
|
+
};
|
|
12522
|
+
return {
|
|
12523
|
+
actuator: "switch",
|
|
12524
|
+
maxSeconds: limit.maxSeconds,
|
|
12525
|
+
unit: "min",
|
|
12526
|
+
quickRunDefault: limit.quickRunSeconds / 60
|
|
12527
|
+
};
|
|
12535
12528
|
}
|
|
12536
12529
|
var MS_PER_SECOND = 1e3;
|
|
12537
12530
|
var MS_PER_MINUTE = 6e4;
|
|
@@ -12612,8 +12605,8 @@ var timedRunCapability = {
|
|
|
12612
12605
|
mode: "singleton",
|
|
12613
12606
|
kind: "wrapper",
|
|
12614
12607
|
defaultActive: true,
|
|
12615
|
-
deviceTypes:
|
|
12616
|
-
|
|
12608
|
+
deviceTypes: [require_device_type.DeviceType.PetFountain],
|
|
12609
|
+
bindsWhenDeviceHas: ["switch"],
|
|
12617
12610
|
deviceConfig: { ui: {
|
|
12618
12611
|
kind: "derived-form",
|
|
12619
12612
|
builderId: "timed-run",
|
|
@@ -34165,6 +34158,8 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
34165
34158
|
require_notification_rules_cap.alarmPanelCapability,
|
|
34166
34159
|
require_compile.alertsCapability,
|
|
34167
34160
|
ambientLightSensorCapability,
|
|
34161
|
+
require_apps_cap.appSourceCapability,
|
|
34162
|
+
require_apps_cap.appsCapability,
|
|
34168
34163
|
audioAnalysisCapability,
|
|
34169
34164
|
audioAnalyzerCapability,
|
|
34170
34165
|
audioCodecCapability,
|