@camstack/server 1.2.870 → 1.2.872
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 +2 -1
- package/dist/api/trpc/generated-cap-routers.js +15 -1
- package/package.json +12 -15
- 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 +4 -4
- package/system/dist/builtins/composer/composer.addon.mjs +4 -4
- 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/core-blocks.addon.js +3 -3
- 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 +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- 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 +3 -3
- package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
- 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-DvcUjBD4.js → capture-engine-BNeKmvyo.js} +1 -1
- package/system/dist/{capture-engine-4BFlpvJV.mjs → capture-engine-BYuDoU5P.mjs} +1 -1
- package/system/dist/{composition-sources-CWKwokvg.js → composition-sources-52ZtkEBw.js} +1 -1
- package/system/dist/{composition-sources-DU-LtoTH.mjs → composition-sources-DQwbBMG1.mjs} +1 -1
- package/system/dist/{constants-C7shrFbd.mjs → constants-RWobCEGs.mjs} +1 -1
- package/system/dist/{constants-BHEbtnlN.js → constants-jwecWQuN.js} +1 -1
- package/system/dist/{device-ca-CRIb8o13.js → device-ca-Bkujp9Cx.js} +1 -1
- package/system/dist/{device-ca-DN7M71Qy.mjs → device-ca-DFi1axk5.mjs} +1 -1
- package/system/dist/{dist-Co_TBjrT.js → dist-8pvVkKh4.js} +259 -3
- package/system/dist/{dist-C_8yolmP.mjs → dist-B15a2506.mjs} +259 -3
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-BoelHayw.mjs → hub-identity-3uLEvGsn.mjs} +1 -1
- package/system/dist/{hub-identity-D6YKdl9L.js → hub-identity-C3ijBf-E.js} +1 -1
- package/system/dist/{hub-mdns-ciao-C7vrLh6K.js → hub-mdns-ciao-BUL3yLqz.js} +2 -2
- package/system/dist/{hub-mdns-ciao-CFIA6g7n.mjs → hub-mdns-ciao-Ch6HwlRl.mjs} +2 -2
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +8 -8
- package/system/dist/{legacy-integration-rows-door-D3JEzzQB.js → legacy-integration-rows-door-BtRtvXfK.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-uKx33PTT.mjs → legacy-integration-rows-door-ChF97F5x.mjs} +1 -1
- package/system/dist/{rename-composition-block-Bqk6u7Q6.js → rename-composition-block-CHIIBly8.js} +1 -1
- package/system/dist/{rename-composition-block-CvevOCur.mjs → rename-composition-block-DfsNTQ2H.mjs} +1 -1
- package/system/dist/{restore-archive-eHXLFCxW.js → restore-archive-8o1pcPFB.js} +1 -1
- package/system/dist/{restore-archive-BZ45H1RA.mjs → restore-archive-BfaE7Y65.mjs} +1 -1
- package/system/dist/{wal-maintenance-BHFm-B-H.js → wal-maintenance-Cv6MfFm9.js} +0 -0
- package/system/dist/{wal-maintenance-D80Zkary.mjs → wal-maintenance-DxtgYuYM.mjs} +0 -0
- package/system/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Bc as emitReadiness, Il as errMsg, Is as BaseAddon, Lr as enumerateInferenceDevices, Rl as EventCategory, _a as platformProbeCapability, lo as scoreRuntimes, ua as parseAcceleratorFactsJson } from "../../dist-
|
|
2
|
+
import { Bc as emitReadiness, Il as errMsg, Is as BaseAddon, Lr as enumerateInferenceDevices, Rl as EventCategory, _a as platformProbeCapability, lo as scoreRuntimes, ua as parseAcceleratorFactsJson } from "../../dist-B15a2506.mjs";
|
|
3
3
|
import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-DBlgWB8k.mjs";
|
|
4
4
|
import * as fs$1 from "node:fs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-8pvVkKh4.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
//#region src/builtins/record-entries/entries-service.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cl as secretViewsOf, Is as BaseAddon, Ma as recordEntriesCapability, gc as UnknownRecordKindError, qs as InvalidRecordError } from "../../dist-
|
|
1
|
+
import { Cl as secretViewsOf, Is as BaseAddon, Ma as recordEntriesCapability, gc as UnknownRecordKindError, qs as InvalidRecordError } from "../../dist-B15a2506.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/builtins/record-entries/entries-service.ts
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-8pvVkKh4.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
9
9
|
/**
|
package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Is as BaseAddon, Rl as EventCategory } from "../../dist-
|
|
1
|
+
import { Is as BaseAddon, Rl as EventCategory } from "../../dist-B15a2506.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
4
4
|
/**
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-8pvVkKh4.js");
|
|
7
7
|
const require_snapshot_courtesy = require("../../snapshot-courtesy-D_C5-nC0.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fl as DeviceType, Fn as batteryCapability, Il as errMsg, Is as BaseAddon, Ji as memoizePinnedFfmpeg, Nl as DeviceFeature, Oo as streamQualityLabel, Pn as bareAddonId, Rl as EventCategory, ll as nodePin, wr as deriveBatteryPresence, y as BatteryStatusSchema, yo as snapshotCapability } from "../../dist-
|
|
1
|
+
import { Fl as DeviceType, Fn as batteryCapability, Il as errMsg, Is as BaseAddon, Ji as memoizePinnedFfmpeg, Nl as DeviceFeature, Oo as streamQualityLabel, Pn as bareAddonId, Rl as EventCategory, ll as nodePin, wr as deriveBatteryPresence, y as BatteryStatusSchema, yo as snapshotCapability } from "../../dist-B15a2506.mjs";
|
|
2
2
|
import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg } from "../../snapshot-courtesy-CyFs1M3I.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-8pvVkKh4.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $r as filesystemBrowseCapability, Eo as storageProviderCapability, Is as BaseAddon } from "../../dist-
|
|
1
|
+
import { $r as filesystemBrowseCapability, Eo as storageProviderCapability, Is as BaseAddon } from "../../dist-B15a2506.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import * as fs$1 from "node:fs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
|
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
6
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./filesystem-storage.addon.js");
|
|
7
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
7
|
+
const require_wal_maintenance = require("../../wal-maintenance-Cv6MfFm9.js");
|
|
8
8
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./sqlite-settings.addon.js");
|
|
9
9
|
//#region src/builtins/sqlite-storage/config-store.ts
|
|
10
10
|
var ConfigStore = class {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./filesystem-storage.addon.mjs";
|
|
2
|
-
import { 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-
|
|
2
|
+
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-DxtgYuYM.mjs";
|
|
3
3
|
import { SqliteSettingsAddon } from "./sqlite-settings.addon.mjs";
|
|
4
4
|
//#region src/builtins/sqlite-storage/config-store.ts
|
|
5
5
|
var ConfigStore = class {
|
|
@@ -3,12 +3,12 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-8pvVkKh4.js");
|
|
7
7
|
const require_retired_settings_keys = require("../../retired-settings-keys-C8nOOr5H.js");
|
|
8
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
8
|
+
const require_wal_maintenance = require("../../wal-maintenance-Cv6MfFm9.js");
|
|
9
9
|
const require_sqlite_snapshot_protocol = require("../../sqlite-snapshot-protocol-B9OndqZv.js");
|
|
10
10
|
const require_wal_checkpoint_policy = require("../../wal-checkpoint-policy-d2z2qPqx.js");
|
|
11
|
-
const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-
|
|
11
|
+
const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-BtRtvXfK.js");
|
|
12
12
|
let zod = require("zod");
|
|
13
13
|
let node_crypto = require("node:crypto");
|
|
14
14
|
let node_fs = require("node:fs");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $a as resolveRunnerId, F as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, Hs as DeclarationRefusedError, I as DATABASE_SNAPSHOT_SUFFIX, Ic as defineCustomActions, Il as errMsg$1, Is as BaseAddon, Js as NoCallerError, L as DATABASE_SNAPSHOT_TIMEOUT_MS, Lt as MigrationMetaSchema, Mt as MIGRATION_API_V1_METHODS, Na as recordsCapability, Pc as customAction, Pn as bareAddonId, R as DATA_STORE_DATABASES, Rl as EventCategory, So as storageAdminCapability, Yn as catalogueIssues, Zi as migrationsCapability, dl as normalizeSecretOwner, ec as RECORD_SWEEP_INTERVAL_MS, gc as UnknownRecordKindError, kc as collectSecretMarkerRefs, la as orderMigrations, mc as TransactRefusedError, qo as vectorStoreCapability, qs as InvalidRecordError, rc as RUNTIME_DEFAULTS, sc as RecordKindDeclarationSchema, vr as dataStoreProviderCapability, yr as databaseSnapshotCapability } from "../../dist-
|
|
1
|
+
import { $a as resolveRunnerId, F as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, Hs as DeclarationRefusedError, I as DATABASE_SNAPSHOT_SUFFIX, Ic as defineCustomActions, Il as errMsg$1, Is as BaseAddon, Js as NoCallerError, L as DATABASE_SNAPSHOT_TIMEOUT_MS, Lt as MigrationMetaSchema, Mt as MIGRATION_API_V1_METHODS, Na as recordsCapability, Pc as customAction, Pn as bareAddonId, R as DATA_STORE_DATABASES, Rl as EventCategory, So as storageAdminCapability, Yn as catalogueIssues, Zi as migrationsCapability, dl as normalizeSecretOwner, ec as RECORD_SWEEP_INTERVAL_MS, gc as UnknownRecordKindError, kc as collectSecretMarkerRefs, la as orderMigrations, mc as TransactRefusedError, qo as vectorStoreCapability, qs as InvalidRecordError, rc as RUNTIME_DEFAULTS, sc as RecordKindDeclarationSchema, vr as dataStoreProviderCapability, yr as databaseSnapshotCapability } from "../../dist-B15a2506.mjs";
|
|
2
2
|
import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys-u6xQA6r7.mjs";
|
|
3
|
-
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-
|
|
3
|
+
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-DxtgYuYM.mjs";
|
|
4
4
|
import { r as isSnapshotWorkerMessage } from "../../sqlite-snapshot-protocol-2QaTouWV.mjs";
|
|
5
5
|
import { a as isWorkerMessage, t as WAL_CHECKPOINT_LARGE_PASS_FRAMES } from "../../wal-checkpoint-policy-BahrTtyD.mjs";
|
|
6
|
-
import { a as patchLegacyIntegrationRows, i as legacyIntegrationAddonId, n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows, r as deleteLegacyIntegrationRowKeys } from "../../legacy-integration-rows-door-
|
|
6
|
+
import { a as patchLegacyIntegrationRows, i as legacyIntegrationAddonId, n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows, r as deleteLegacyIntegrationRowKeys } from "../../legacy-integration-rows-door-ChF97F5x.mjs";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-8pvVkKh4.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $i as modeMayWrite, Co as storageCapability, Dc as collectSecretConfigKeys, Ec as buildSecretRef, Ei as isLocationEnabled, El as toSecretFieldView, Fc as defineAddonMigrations, Gi as mayWriteToLocation, Ic as defineCustomActions, Is as BaseAddon, Ja as resolveLocationMode, Pc as customAction, Qi as modeForSwitch, Rc as defineRecordKinds, Rl as EventCategory, Ur as evictionPolicyOfLocation, Wi as mayReadLocation, Xo as withLocationMode, dn as StorageCleanupJobSchema, do as settingsStoreCapability, fi as integrationInstancesCapability, fn as StorageLocationModeSchema, gl as recordSecretRef, ii as gbToBytes, jo as switchStateOfMode, ml as parseSecretRef, mn as StorageMigrationJobSchema, nl as isSecretFieldView, ol as makeSecretMarker, pn as StorageLocationTypeSchema, rl as isSecretMarker, rn as STORAGE_LOCATION_MODES, tc as REDACTED_SECRET, tl as isSecretClear, ul as normalizeNodeId, vl as resolveSecretMarkers, wo as storageMigrationCapability } from "../../dist-
|
|
1
|
+
import { $i as modeMayWrite, Co as storageCapability, Dc as collectSecretConfigKeys, Ec as buildSecretRef, Ei as isLocationEnabled, El as toSecretFieldView, Fc as defineAddonMigrations, Gi as mayWriteToLocation, Ic as defineCustomActions, Is as BaseAddon, Ja as resolveLocationMode, Pc as customAction, Qi as modeForSwitch, Rc as defineRecordKinds, Rl as EventCategory, Ur as evictionPolicyOfLocation, Wi as mayReadLocation, Xo as withLocationMode, dn as StorageCleanupJobSchema, do as settingsStoreCapability, fi as integrationInstancesCapability, fn as StorageLocationModeSchema, gl as recordSecretRef, ii as gbToBytes, jo as switchStateOfMode, ml as parseSecretRef, mn as StorageMigrationJobSchema, nl as isSecretFieldView, ol as makeSecretMarker, pn as StorageLocationTypeSchema, rl as isSecretMarker, rn as STORAGE_LOCATION_MODES, tc as REDACTED_SECRET, tl as isSecretClear, ul as normalizeNodeId, vl as resolveSecretMarkers, wo as storageMigrationCapability } from "../../dist-B15a2506.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-8pvVkKh4.js");
|
|
7
7
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
8
8
|
const require_x509_es = require("../../x509.es-WtnRNyYS.js");
|
|
9
|
-
const require_hub_identity = require("../../hub-identity-
|
|
10
|
-
const require_constants$8 = require("../../constants-
|
|
9
|
+
const require_hub_identity = require("../../hub-identity-C3ijBf-E.js");
|
|
10
|
+
const require_constants$8 = require("../../constants-jwecWQuN.js");
|
|
11
11
|
const require_src$1 = require("../../src-CnAqG6EF.js");
|
|
12
12
|
let zod = require("zod");
|
|
13
13
|
let node_crypto = require("node:crypto");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Ic as defineCustomActions, Il as errMsg, Is as BaseAddon, Pc as customAction, cn as ServerNameSchema, go as shortHostname, qc as hydrateSchema } from "../../dist-
|
|
2
|
+
import { Ic as defineCustomActions, Il as errMsg, Is as BaseAddon, Pc as customAction, cn as ServerNameSchema, go as shortHostname, qc as hydrateSchema } from "../../dist-B15a2506.mjs";
|
|
3
3
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
4
4
|
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";
|
|
5
|
-
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-
|
|
6
|
-
import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, 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-
|
|
5
|
+
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-3uLEvGsn.mjs";
|
|
6
|
+
import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, 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-RWobCEGs.mjs";
|
|
7
7
|
import { t as require_src } from "../../src-hG4grMU4.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, randomInt, sign, timingSafeEqual, verify, webcrypto } from "node:crypto";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-8pvVkKh4.js");
|
|
7
7
|
const require_formatter = require("../../formatter-xbxeV4GD.js");
|
|
8
8
|
const require_log_file_read_protocol = require("../../log-file-read-protocol-DSV_vQRb.js");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fc as defineAddonMigrations, Is as BaseAddon, Vi as logDestinationCapability, xa as preconditionOf } from "../../dist-
|
|
1
|
+
import { Fc as defineAddonMigrations, Is as BaseAddon, Vi as logDestinationCapability, xa as preconditionOf } from "../../dist-B15a2506.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
|
|
3
3
|
import { a as LogFileIndexStore, i as serveRead, n as isFromReader, t as CancelBook } from "../../log-file-read-protocol-hTaAsYlX.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_dist = require("./dist-
|
|
1
|
+
const require_dist = require("./dist-8pvVkKh4.js");
|
|
2
2
|
//#region src/builtins/device-history/store/series-registry.ts
|
|
3
3
|
function subjectIdOf(subject) {
|
|
4
4
|
return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fl as DeviceType, Gc as historyItemFieldPath, Ks as HISTORY_DEFAULT_MIN_INTERVAL_MS } from "./dist-
|
|
1
|
+
import { Fl as DeviceType, Gc as historyItemFieldPath, Ks as HISTORY_DEFAULT_MIN_INTERVAL_MS } from "./dist-B15a2506.mjs";
|
|
2
2
|
//#region src/builtins/device-history/store/series-registry.ts
|
|
3
3
|
function subjectIdOf(subject) {
|
|
4
4
|
return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Il as errMsg, _s as compositionSourceKey } from "./dist-
|
|
1
|
+
import { Il as errMsg, _s as compositionSourceKey } from "./dist-B15a2506.mjs";
|
|
2
2
|
//#region src/builtins/shared/device-state-changed.ts
|
|
3
3
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
4
4
|
function isRecord(value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
|
|
2
|
-
var MESH_CA_KEY_REF = require("./dist-
|
|
2
|
+
var MESH_CA_KEY_REF = require("./dist-8pvVkKh4.js").buildSecretRef({
|
|
3
3
|
owner: "system",
|
|
4
4
|
scope: { kind: "global" },
|
|
5
5
|
fieldPath: "meshCaKey"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ec as buildSecretRef, K as DEVICE_SAN_CREDENTIAL_PREFIX, q as DEVICE_SAN_USER_PREFIX } from "./dist-
|
|
1
|
+
import { Ec as buildSecretRef, K as DEVICE_SAN_CREDENTIAL_PREFIX, q as DEVICE_SAN_USER_PREFIX } from "./dist-B15a2506.mjs";
|
|
2
2
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension } from "./x509.es-BRiJgOvu.mjs";
|
|
3
3
|
import { X509Certificate, createPublicKey, randomBytes, verify, webcrypto } from "node:crypto";
|
|
4
4
|
//#region src/auth/jwt-signing-key.ts
|
|
@@ -1274,7 +1274,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
1274
1274
|
*/
|
|
1275
1275
|
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
1276
1276
|
//#endregion
|
|
1277
|
-
//#region ../types/dist/sleep-
|
|
1277
|
+
//#region ../types/dist/sleep-BnR9qGOv.mjs
|
|
1278
1278
|
/**
|
|
1279
1279
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
1280
1280
|
* window to float samples (D455).
|
|
@@ -15042,6 +15042,30 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
15042
15042
|
icon: "wifi-off"
|
|
15043
15043
|
}]
|
|
15044
15044
|
},
|
|
15045
|
+
"error": {
|
|
15046
|
+
scope: "device",
|
|
15047
|
+
noun: {
|
|
15048
|
+
en: "Fault",
|
|
15049
|
+
it: "Guasto"
|
|
15050
|
+
},
|
|
15051
|
+
state: [{
|
|
15052
|
+
kind: "boolean",
|
|
15053
|
+
field: "active",
|
|
15054
|
+
label: {
|
|
15055
|
+
en: "Fault",
|
|
15056
|
+
it: "Guasto"
|
|
15057
|
+
},
|
|
15058
|
+
whenTrue: {
|
|
15059
|
+
en: "When {device} reports a fault",
|
|
15060
|
+
it: "Quando {device} segnala un guasto"
|
|
15061
|
+
},
|
|
15062
|
+
whenFalse: {
|
|
15063
|
+
en: "When the fault of {device} clears",
|
|
15064
|
+
it: "Quando il guasto di {device} si risolve"
|
|
15065
|
+
},
|
|
15066
|
+
icon: "triangle-alert"
|
|
15067
|
+
}]
|
|
15068
|
+
},
|
|
15045
15069
|
"doorbell": {
|
|
15046
15070
|
scope: "device",
|
|
15047
15071
|
noun: {
|
|
@@ -16076,6 +16100,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
16076
16100
|
"embedding-encoder",
|
|
16077
16101
|
"energy-system",
|
|
16078
16102
|
"enum-sensor",
|
|
16103
|
+
"error",
|
|
16079
16104
|
"event-emitter",
|
|
16080
16105
|
"face-gallery",
|
|
16081
16106
|
"failure-contribution",
|
|
@@ -16966,6 +16991,29 @@ Object.freeze({
|
|
|
16966
16991
|
"path": "timestamp",
|
|
16967
16992
|
"valueType": "boolean"
|
|
16968
16993
|
}],
|
|
16994
|
+
"error": [
|
|
16995
|
+
{
|
|
16996
|
+
"path": "active",
|
|
16997
|
+
"valueType": "boolean"
|
|
16998
|
+
},
|
|
16999
|
+
{
|
|
17000
|
+
"path": "code",
|
|
17001
|
+
"valueType": "string"
|
|
17002
|
+
},
|
|
17003
|
+
{
|
|
17004
|
+
"path": "label",
|
|
17005
|
+
"valueType": "string"
|
|
17006
|
+
},
|
|
17007
|
+
{
|
|
17008
|
+
"path": "severity",
|
|
17009
|
+
"valueType": "enum",
|
|
17010
|
+
"enumValues": ["warning", "error"]
|
|
17011
|
+
},
|
|
17012
|
+
{
|
|
17013
|
+
"path": "since",
|
|
17014
|
+
"valueType": "number"
|
|
17015
|
+
}
|
|
17016
|
+
],
|
|
16969
17017
|
"event-emitter": [
|
|
16970
17018
|
{
|
|
16971
17019
|
"path": "lastEvent.deviceId",
|
|
@@ -64467,7 +64515,7 @@ function groupTemplate(id) {
|
|
|
64467
64515
|
}
|
|
64468
64516
|
/**
|
|
64469
64517
|
* Cap history catalog, projected from every `*.cap.ts` `history` block.
|
|
64470
|
-
* 45 caps with series (104 series),
|
|
64518
|
+
* 45 caps with series (104 series), 39 caps answered `'none'`.
|
|
64471
64519
|
* Field keys are `runtimeState` paths (`a.b` into fixed objects only).
|
|
64472
64520
|
*/
|
|
64473
64521
|
var HISTORY_CATALOG = {
|
|
@@ -73498,6 +73546,85 @@ var enumSensorCapability = {
|
|
|
73498
73546
|
}]
|
|
73499
73547
|
}
|
|
73500
73548
|
};
|
|
73549
|
+
/** How loudly a fault wants the operator. Both tiers raise the attention event. */
|
|
73550
|
+
var DeviceErrorSeveritySchema = zod.z.enum(["warning", "error"]);
|
|
73551
|
+
/** One fault of a device that can raise several at once. */
|
|
73552
|
+
var DeviceFaultSchema = zod.z.object({
|
|
73553
|
+
/** The device's own code, as the vendor names it. */
|
|
73554
|
+
code: zod.z.string(),
|
|
73555
|
+
/** Already translated by the provider (it owns the vendor vocabulary). */
|
|
73556
|
+
label: zod.z.string(),
|
|
73557
|
+
severity: DeviceErrorSeveritySchema
|
|
73558
|
+
});
|
|
73559
|
+
/**
|
|
73560
|
+
* The fault a device reports right now. One slice per device.
|
|
73561
|
+
*
|
|
73562
|
+
* `active` is tri-state: `null` is "the provider has not read it yet" and is
|
|
73563
|
+
* never drawn as "no fault" nor as a fault (D315, D393). The provider filters
|
|
73564
|
+
* what is not a fault (a completion or reminder code) BEFORE it writes `true`.
|
|
73565
|
+
*
|
|
73566
|
+
* The cap's name is the key a template reads (`{{ alias.error.label }}`, D1021).
|
|
73567
|
+
*/
|
|
73568
|
+
var ErrorStatusSchema = zod.z.object({
|
|
73569
|
+
active: zod.z.boolean().nullable(),
|
|
73570
|
+
/** The code of the principal fault; `null` when none (or unknown). */
|
|
73571
|
+
code: zod.z.string().nullable(),
|
|
73572
|
+
/** The principal fault's words, provider-translated; `null` when none. */
|
|
73573
|
+
label: zod.z.string().nullable(),
|
|
73574
|
+
severity: DeviceErrorSeveritySchema,
|
|
73575
|
+
/** Ms epoch the current fault started; `null` when none or not known. */
|
|
73576
|
+
since: zod.z.number().nullable(),
|
|
73577
|
+
/** Every fault, for a device that raises several. The principal is the first. */
|
|
73578
|
+
faults: zod.z.array(DeviceFaultSchema).optional(),
|
|
73579
|
+
/** Ms epoch of the last read the provider made of the fault. */
|
|
73580
|
+
lastFetchedAt: zod.z.number()
|
|
73581
|
+
});
|
|
73582
|
+
/** The slice before the provider has read anything: unknown, not "fine". */
|
|
73583
|
+
var ERROR_STATUS_COLD = {
|
|
73584
|
+
active: null,
|
|
73585
|
+
code: null,
|
|
73586
|
+
label: null,
|
|
73587
|
+
severity: "error",
|
|
73588
|
+
since: null,
|
|
73589
|
+
lastFetchedAt: 0
|
|
73590
|
+
};
|
|
73591
|
+
var errorCapability = {
|
|
73592
|
+
name: "error",
|
|
73593
|
+
scope: "device",
|
|
73594
|
+
deviceNative: true,
|
|
73595
|
+
mode: "singleton",
|
|
73596
|
+
methods: {},
|
|
73597
|
+
status: {
|
|
73598
|
+
schema: ErrorStatusSchema,
|
|
73599
|
+
kind: "push",
|
|
73600
|
+
empty: ERROR_STATUS_COLD
|
|
73601
|
+
},
|
|
73602
|
+
runtimeState: ErrorStatusSchema,
|
|
73603
|
+
/**
|
|
73604
|
+
* Runtime-state durability: **restored** — the previous observation is what
|
|
73605
|
+
* lets the first reading after a restart be a COMPARISON: a fault that was
|
|
73606
|
+
* already open must not announce itself a second time.
|
|
73607
|
+
*
|
|
73608
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
73609
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
73610
|
+
*/
|
|
73611
|
+
durability: "restored",
|
|
73612
|
+
volatileStateFields: ["lastFetchedAt"],
|
|
73613
|
+
/** The fault itself is carried by the attention alerts; no series is recorded. */
|
|
73614
|
+
history: "none",
|
|
73615
|
+
vocabulary: {
|
|
73616
|
+
noun: t("Fault", "Guasto"),
|
|
73617
|
+
order: 5265,
|
|
73618
|
+
state: [{
|
|
73619
|
+
kind: "boolean",
|
|
73620
|
+
field: "active",
|
|
73621
|
+
label: t("Fault", "Guasto"),
|
|
73622
|
+
whenTrue: t("When {device} reports a fault", "Quando {device} segnala un guasto"),
|
|
73623
|
+
whenFalse: t("When the fault of {device} clears", "Quando il guasto di {device} si risolve"),
|
|
73624
|
+
icon: "triangle-alert"
|
|
73625
|
+
}]
|
|
73626
|
+
}
|
|
73627
|
+
};
|
|
73501
73628
|
var IdentitySchema = zod.z.object({
|
|
73502
73629
|
id: zod.z.string(),
|
|
73503
73630
|
name: zod.z.string(),
|
|
@@ -110086,6 +110213,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
110086
110213
|
embeddingEncoderCapability,
|
|
110087
110214
|
energySystemCapability,
|
|
110088
110215
|
enumSensorCapability,
|
|
110216
|
+
errorCapability,
|
|
110089
110217
|
eventEmitterCapability,
|
|
110090
110218
|
faceGalleryCapability,
|
|
110091
110219
|
failureContributionCapability,
|
|
@@ -112821,6 +112949,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
112821
112949
|
doorbell: doorbellCapability,
|
|
112822
112950
|
energySystem: energySystemCapability,
|
|
112823
112951
|
enumSensor: enumSensorCapability,
|
|
112952
|
+
error: errorCapability,
|
|
112824
112953
|
eventEmitter: eventEmitterCapability,
|
|
112825
112954
|
fanControl: fanControlCapability,
|
|
112826
112955
|
featureProbe: featureProbeCapability,
|
|
@@ -112882,6 +113011,54 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
112882
113011
|
zoneRules: zoneRulesCapability,
|
|
112883
113012
|
zones: zonesCapability
|
|
112884
113013
|
};
|
|
113014
|
+
/**
|
|
113015
|
+
* The edge between two readings, or `null` for no edge.
|
|
113016
|
+
*
|
|
113017
|
+
* - `null`/cold → `true` is a START (a fault already open at boot is one);
|
|
113018
|
+
* - `true` → `false` is a RESOLVE;
|
|
113019
|
+
* - an UNKNOWN reading (`active: null`) is never an edge, in either direction —
|
|
113020
|
+
* a failed read must neither raise nor close an episode (D393, D49);
|
|
113021
|
+
* - `true` → `true` is the same episode, whatever the code did.
|
|
113022
|
+
*/
|
|
113023
|
+
function deviceErrorEdge(previous, next) {
|
|
113024
|
+
if (next.active === true && previous?.active !== true) return "start";
|
|
113025
|
+
if (next.active === false && previous?.active === true) return "resolve";
|
|
113026
|
+
return null;
|
|
113027
|
+
}
|
|
113028
|
+
function deviceErrorAlertId(deviceId) {
|
|
113029
|
+
return `device-error:${String(deviceId)}`;
|
|
113030
|
+
}
|
|
113031
|
+
/** The alert that opens an episode. `since` is the fault's own start, else `now`. */
|
|
113032
|
+
function buildDeviceErrorAlert(deviceId, deviceName, status, now) {
|
|
113033
|
+
const label = status.label ?? status.code ?? "Fault";
|
|
113034
|
+
const startedAt = status.since ?? now;
|
|
113035
|
+
const alertId = deviceErrorAlertId(deviceId);
|
|
113036
|
+
return {
|
|
113037
|
+
id: alertId,
|
|
113038
|
+
category: "device.error",
|
|
113039
|
+
severity: "critical",
|
|
113040
|
+
title: `${deviceName}: ${label}`,
|
|
113041
|
+
message: `${deviceName} reports a fault: ${label}.`,
|
|
113042
|
+
action: {
|
|
113043
|
+
label: "Open device",
|
|
113044
|
+
href: `/devices/${String(deviceId)}`,
|
|
113045
|
+
navigation: "app"
|
|
113046
|
+
},
|
|
113047
|
+
status: "active",
|
|
113048
|
+
read: false,
|
|
113049
|
+
createdAt: now,
|
|
113050
|
+
updatedAt: now,
|
|
113051
|
+
source: {
|
|
113052
|
+
type: "device",
|
|
113053
|
+
id: String(deviceId)
|
|
113054
|
+
},
|
|
113055
|
+
metadata: {
|
|
113056
|
+
episodeId: `${alertId}@${String(startedAt)}`,
|
|
113057
|
+
code: status.code,
|
|
113058
|
+
deviceSeverity: status.severity
|
|
113059
|
+
}
|
|
113060
|
+
};
|
|
113061
|
+
}
|
|
112885
113062
|
var BaseDevice = class {
|
|
112886
113063
|
id;
|
|
112887
113064
|
stableId;
|
|
@@ -113181,6 +113358,68 @@ var BaseDevice = class {
|
|
|
113181
113358
|
} catch (err) {}
|
|
113182
113359
|
}
|
|
113183
113360
|
/**
|
|
113361
|
+
* Declare that this device can report a fault (the `error` cap). The slice
|
|
113362
|
+
* starts UNKNOWN — a restored slice is kept, so a fault that was open before
|
|
113363
|
+
* a restart is compared, not announced again.
|
|
113364
|
+
*/
|
|
113365
|
+
registerErrorCap() {
|
|
113366
|
+
this.ctx.registerNativeCap?.(errorCapability, {});
|
|
113367
|
+
if (this.runtimeState.getCapState(errorCapability.name) === void 0) this.setCapSlice(errorCapability, ERROR_STATUS_COLD);
|
|
113368
|
+
}
|
|
113369
|
+
/**
|
|
113370
|
+
* Publish the device's fault. The slice is written; on an EDGE (a fault
|
|
113371
|
+
* starts, or one resolves) an attention episode opens or closes through the
|
|
113372
|
+
* alerts cap, which the notification center announces as
|
|
113373
|
+
* `device-attention-required` / `-resolved`. An unknown reading is never an
|
|
113374
|
+
* edge. No rule exists by default: it notifies when the operator makes one.
|
|
113375
|
+
*/
|
|
113376
|
+
async publishError(reading) {
|
|
113377
|
+
const previous = this.getCapSlice(errorCapability);
|
|
113378
|
+
if (reading.active === null && previous !== null && previous.active !== null) return;
|
|
113379
|
+
const now = Date.now();
|
|
113380
|
+
const edge = deviceErrorEdge(previous, reading);
|
|
113381
|
+
const next = edge === "start" && reading.since === null ? {
|
|
113382
|
+
...reading,
|
|
113383
|
+
since: now
|
|
113384
|
+
} : reading;
|
|
113385
|
+
this.setCapSlice(errorCapability, next);
|
|
113386
|
+
if (edge === null) return;
|
|
113387
|
+
const alerts = this.ctx.api.alerts;
|
|
113388
|
+
if (alerts === void 0) {
|
|
113389
|
+
this.ctx.logger.warn("device error: attention event skipped — alerts capability missing", {
|
|
113390
|
+
tags: { deviceId: this.id },
|
|
113391
|
+
meta: { edge }
|
|
113392
|
+
});
|
|
113393
|
+
return;
|
|
113394
|
+
}
|
|
113395
|
+
try {
|
|
113396
|
+
if (edge === "start") await alerts.emit.mutate(buildDeviceErrorAlert(this.id, this.name, next, now));
|
|
113397
|
+
else await alerts.update.mutate({
|
|
113398
|
+
alertId: deviceErrorAlertId(this.id),
|
|
113399
|
+
patch: {
|
|
113400
|
+
status: "completed",
|
|
113401
|
+
read: true,
|
|
113402
|
+
updatedAt: now
|
|
113403
|
+
}
|
|
113404
|
+
});
|
|
113405
|
+
this.ctx.logger.info(`device error: ${edge === "start" ? "raised" : "resolved"}`, {
|
|
113406
|
+
tags: { deviceId: this.id },
|
|
113407
|
+
meta: {
|
|
113408
|
+
code: next.code,
|
|
113409
|
+
label: next.label
|
|
113410
|
+
}
|
|
113411
|
+
});
|
|
113412
|
+
} catch (err) {
|
|
113413
|
+
this.ctx.logger.warn("device error: attention event failed", {
|
|
113414
|
+
tags: { deviceId: this.id },
|
|
113415
|
+
meta: {
|
|
113416
|
+
edge,
|
|
113417
|
+
error: errMsg(err)
|
|
113418
|
+
}
|
|
113419
|
+
});
|
|
113420
|
+
}
|
|
113421
|
+
}
|
|
113422
|
+
/**
|
|
113184
113423
|
* Typed read-through to a cap-keyed runtime-state slice. Drivers
|
|
113185
113424
|
* call `this.getCapSlice(batteryCapability)` and the return type
|
|
113186
113425
|
* is inferred from the cap's `runtimeState` Zod schema — no string
|
|
@@ -121284,6 +121523,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
121284
121523
|
access: "view",
|
|
121285
121524
|
role: "viewer"
|
|
121286
121525
|
},
|
|
121526
|
+
"error.getStatus": {
|
|
121527
|
+
capName: "error",
|
|
121528
|
+
capScope: "device",
|
|
121529
|
+
addonId: null,
|
|
121530
|
+
access: "view",
|
|
121531
|
+
role: "viewer"
|
|
121532
|
+
},
|
|
121287
121533
|
"eventEmitter.getStatus": {
|
|
121288
121534
|
capName: "event-emitter",
|
|
121289
121535
|
capScope: "device",
|
|
@@ -128767,6 +129013,7 @@ var CAP_NAMES_WITH_STATUS = [
|
|
|
128767
129013
|
"doorbell",
|
|
128768
129014
|
"energy-system",
|
|
128769
129015
|
"enum-sensor",
|
|
129016
|
+
"error",
|
|
128770
129017
|
"event-emitter",
|
|
128771
129018
|
"fan-control",
|
|
128772
129019
|
"feature-probe",
|
|
@@ -129810,6 +130057,11 @@ Object.freeze({
|
|
|
129810
130057
|
form: "single",
|
|
129811
130058
|
optional: false
|
|
129812
130059
|
}],
|
|
130060
|
+
"error.getStatus": [{
|
|
130061
|
+
name: "deviceId",
|
|
130062
|
+
form: "single",
|
|
130063
|
+
optional: false
|
|
130064
|
+
}],
|
|
129813
130065
|
"eventEmitter.getStatus": [{
|
|
129814
130066
|
name: "deviceId",
|
|
129815
130067
|
form: "single",
|
|
@@ -131979,7 +132231,7 @@ Object.freeze({
|
|
|
131979
132231
|
});
|
|
131980
132232
|
/**
|
|
131981
132233
|
* Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
|
|
131982
|
-
* `runtimeState`.
|
|
132234
|
+
* `runtimeState`. 85 caps: 43 `restored`, 42 `session`.
|
|
131983
132235
|
*
|
|
131984
132236
|
* A cap absent from this map has no runtime-state slice at all. A cap PRESENT
|
|
131985
132237
|
* with `durability: 'session'` has one and has decided not to keep it.
|
|
@@ -132082,6 +132334,10 @@ var RUNTIME_STATE_POLICY = {
|
|
|
132082
132334
|
durability: "restored",
|
|
132083
132335
|
volatileFields: ["lastFetchedAt", "timestamp"]
|
|
132084
132336
|
},
|
|
132337
|
+
"error": {
|
|
132338
|
+
durability: "restored",
|
|
132339
|
+
volatileFields: ["lastFetchedAt"]
|
|
132340
|
+
},
|
|
132085
132341
|
"event-emitter": {
|
|
132086
132342
|
durability: "session",
|
|
132087
132343
|
volatileFields: []
|