@camstack/system 1.2.185 → 1.2.186
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon-runner.js +1 -1
- package/dist/addon-runner.mjs +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{dist-DE3OH-FG.js → dist-0fjBDzUu.js} +56 -5
- package/dist/{dist-CCMYMmkQ.mjs → dist-BLU9Dol1.mjs} +56 -5
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{manifest-system-deps-BmXFnBQZ.mjs → manifest-system-deps-BF-C5NDL.mjs} +2 -55
- package/dist/{manifest-system-deps-DMWd5Ygf.js → manifest-system-deps-KBuTXH-y.js} +1 -54
- package/dist/{retired-settings-keys-BgUS9Rr3.js → retired-settings-keys-pL2Nq6KT.js} +1 -1
- package/dist/{retired-settings-keys-C0uslzAd.mjs → retired-settings-keys-rIzS2f51.mjs} +1 -1
- package/package.json +1 -1
package/dist/addon-runner.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_manifest_system_deps = require("./manifest-system-deps-
|
|
2
|
+
const require_manifest_system_deps = require("./manifest-system-deps-KBuTXH-y.js");
|
|
3
3
|
const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
5
|
node_path = require_chunk.__toESM(node_path);
|
package/dist/addon-runner.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as createUdsLoggerWithControl, Ft as RUNNER_RSS_BUDGET_ENV, Jt as startRunnerHeapWatch, Qt as emitHeapDiagnosticReport, a as createUdsAddonContext, bt as resolveAddonClass, it as setWorkerNativeCapsChangeListener, j as LocalChildClient, n as installManifestPythonDeps, nt as getWorkerNativeCapSnapshot, ot as validateProviderRegistrations, t as installManifestSystemDeps, tt as getWorkerNativeCapProvider, yt as installManifestNativeDeps } from "./manifest-system-deps-
|
|
1
|
+
import { A as createUdsLoggerWithControl, Ft as RUNNER_RSS_BUDGET_ENV, Jt as startRunnerHeapWatch, Qt as emitHeapDiagnosticReport, a as createUdsAddonContext, bt as resolveAddonClass, it as setWorkerNativeCapsChangeListener, j as LocalChildClient, n as installManifestPythonDeps, nt as getWorkerNativeCapSnapshot, ot as validateProviderRegistrations, t as installManifestSystemDeps, tt as getWorkerNativeCapProvider, yt as installManifestNativeDeps } from "./manifest-system-deps-BF-C5NDL.mjs";
|
|
2
2
|
import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
|
|
3
3
|
import { register } from "node:module";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -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-0fjBDzUu.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as addonPagesCapability, Ft as BaseAddon, Pt as errMsg, sn as EventCategory } from "../../dist-
|
|
1
|
+
import { E as addonPagesCapability, Ft as BaseAddon, Pt as errMsg, sn as EventCategory } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -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-0fjBDzUu.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, O as addonWidgetsCapability, Pt as errMsg, sn as EventCategory } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, O as addonWidgetsCapability, Pt as errMsg, sn as EventCategory } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
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-0fjBDzUu.js");
|
|
7
7
|
//#region src/builtins/alerts/prune-policy.ts
|
|
8
8
|
/**
|
|
9
9
|
* Ids older than `cutoffMs`, oldest first.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, Jt as createEvent, Pt as errMsg, k as alertsCapability, n as AlertSchema, sn as EventCategory } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, Jt as createEvent, Pt as errMsg, k as alertsCapability, n as AlertSchema, sn as EventCategory } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
//#region src/builtins/alerts/prune-policy.ts
|
|
3
3
|
/**
|
|
4
4
|
* Ids older than `cutoffMs`, oldest first.
|
|
@@ -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-0fjBDzUu.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let buffer = require("buffer");
|
|
9
9
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, j as backupCapability, sn as EventCategory } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, j as backupCapability, sn as EventCategory } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
3
3
|
import { Buffer as Buffer$1 } from "buffer";
|
|
4
4
|
import * as fsp from "node:fs/promises";
|
|
@@ -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-0fjBDzUu.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
//#region src/builtins/console-logging/console-destination.ts
|
|
9
9
|
var LEVEL_RANK = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
//#region src/builtins/console-logging/console-destination.ts
|
|
4
4
|
var LEVEL_RANK = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-0fjBDzUu.js");
|
|
4
4
|
let node_crypto = require("node:crypto");
|
|
5
5
|
let node_fs_promises = require("node:fs/promises");
|
|
6
6
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, I as coreBlockAddonId, L as coreBlockIdFromAddonId, Pt as errMsg, R as coreBlocksCapability, c as CORE_BLOCK_ADDON_PREFIX, d as DeclaredDevices, l as CoreBlockSchema, s as CORE_BLOCKS_ADDON_ID } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, I as coreBlockAddonId, L as coreBlockIdFromAddonId, Pt as errMsg, R as coreBlocksCapability, c as CORE_BLOCK_ADDON_PREFIX, d as DeclaredDevices, l as CoreBlockSchema, s as CORE_BLOCKS_ADDON_ID } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import * as fs from "node:fs/promises";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_retired_settings_keys = require("../../retired-settings-keys-
|
|
6
|
+
const require_dist = require("../../dist-0fjBDzUu.js");
|
|
7
|
+
const require_retired_settings_keys = require("../../retired-settings-keys-pL2Nq6KT.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let _camstack_types_node = require("@camstack/types/node");
|
|
10
10
|
//#region src/builtins/device-manager/adoption-job-engine.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $t as isDeviceConfigCap, Bt as DeviceRole, Ft as BaseAddon, H as deviceManagerCapability, J as enumerateSchemaFields, P as buildStreamParamsConfigSchema, Pt as errMsg, U as deviceStateCapability, Vt as DeviceType, W as deviceStatusCapability, Wt as WELL_KNOWN_TAB_MAP, a as CAMERA_SWITCH_ORDER, b as STREAM_PROFILE_META, f as DeviceStatusSchema, ft as normalizeUnit, mt as parseStreamParamsFormPatch, o as CAP_NAMES_WITH_STATUS, on as sleep, q as enumerateItemArrayFields, sn as EventCategory, t as ALL_CAPABILITY_DEFINITIONS, xt as runtimeStatePolicyFor, yt as resolveContainerPrimaryChild, zt as DeviceFeature } from "../../dist-
|
|
2
|
-
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-
|
|
1
|
+
import { $t as isDeviceConfigCap, Bt as DeviceRole, Ft as BaseAddon, H as deviceManagerCapability, J as enumerateSchemaFields, P as buildStreamParamsConfigSchema, Pt as errMsg, U as deviceStateCapability, Vt as DeviceType, W as deviceStatusCapability, Wt as WELL_KNOWN_TAB_MAP, a as CAMERA_SWITCH_ORDER, b as STREAM_PROFILE_META, f as DeviceStatusSchema, ft as normalizeUnit, mt as parseStreamParamsFormPatch, o as CAP_NAMES_WITH_STATUS, on as sleep, q as enumerateItemArrayFields, sn as EventCategory, t as ALL_CAPABILITY_DEFINITIONS, xt as runtimeStatePolicyFor, yt as resolveContainerPrimaryChild, zt as DeviceFeature } from "../../dist-BLU9Dol1.mjs";
|
|
2
|
+
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-rIzS2f51.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { canonicalDeviceFingerprint } from "@camstack/types/node";
|
|
5
5
|
//#region src/builtins/device-manager/adoption-job-engine.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-0fjBDzUu.js");
|
|
7
7
|
//#region src/builtins/doorbell/trigger-engine.ts
|
|
8
8
|
/**
|
|
9
9
|
* Pure trigger logic for the virtual-doorbell builtin — edge detection over
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, G as doorbellCapability, Jt as createEvent, M as bareAddonId, Pt as errMsg, Vt as DeviceType, Y as evaluateSensorEdge, _ as SOURCE_CAPS, nt as isSameAddonId, rt as isSourceCap, sn as EventCategory, v as SOURCE_DEVICE_TYPES } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, G as doorbellCapability, Jt as createEvent, M as bareAddonId, Pt as errMsg, Vt as DeviceType, Y as evaluateSensorEdge, _ as SOURCE_CAPS, nt as isSameAddonId, rt as isSourceCap, sn as EventCategory, v as SOURCE_DEVICE_TYPES } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
//#region src/builtins/doorbell/trigger-engine.ts
|
|
3
3
|
/**
|
|
4
4
|
* Pure trigger logic for the virtual-doorbell builtin — edge detection over
|
|
@@ -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-0fjBDzUu.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
9
9
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
4
4
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-0fjBDzUu.js");
|
|
4
4
|
//#region src/builtins/liveness-monitor/liveness-checks.ts
|
|
5
5
|
var NO_DEVICES = "liveness:no-devices";
|
|
6
6
|
var ALL_OFFLINE = "liveness:all-devices-offline";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, Jt as createEvent, Pt as errMsg, sn as EventCategory } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, Jt as createEvent, Pt as errMsg, sn as EventCategory } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
//#region src/builtins/liveness-monitor/liveness-checks.ts
|
|
3
3
|
var NO_DEVICES = "liveness:no-devices";
|
|
4
4
|
var ALL_OFFLINE = "liveness:all-devices-offline";
|
|
@@ -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-0fjBDzUu.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
node_crypto = require_chunk.__toESM(node_crypto);
|
|
9
9
|
let crypto$1 = require("crypto");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { A as authProviderCapability, Ft as BaseAddon, T as UserRecordSchema, jt as userManagementCapability, r as ApiKeyRecordSchema, x as ScopedTokenSchema } from "../../dist-
|
|
2
|
+
import { A as authProviderCapability, Ft as BaseAddon, T as UserRecordSchema, jt as userManagementCapability, r as ApiKeyRecordSchema, x as ScopedTokenSchema } from "../../dist-BLU9Dol1.mjs";
|
|
3
3
|
import * as crypto$2 from "node:crypto";
|
|
4
4
|
import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
|
|
5
5
|
import nodeCrypto from "crypto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-0fjBDzUu.js");
|
|
4
4
|
const require_tls = require("../../tls-BxQlomxd.js");
|
|
5
5
|
let node_fs_promises = require("node:fs/promises");
|
|
6
6
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, sn as EventCategory, st as localNetworkCapability } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, sn as EventCategory, st as localNetworkCapability } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
import { S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, i as writeExtraSans, l as reissueTlsLeaf, n as readTlsAccessStatus, o as validateUploadedTls, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, y as applyLanHttp } from "../../tls-DOTmtLCW.mjs";
|
|
3
3
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
4
4
|
import { join } 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-0fjBDzUu.js");
|
|
7
7
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
8
8
|
/**
|
|
9
9
|
* Loki rejects a label name that is not a valid Prometheus label
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
3
3
|
/**
|
|
4
4
|
* Loki rejects a label name that is not a valid Prometheus label
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-0fjBDzUu.js");
|
|
7
7
|
let node_fs_promises = require("node:fs/promises");
|
|
8
8
|
let node_child_process = require("node:child_process");
|
|
9
9
|
let node_util = require("node:util");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, Jt as createEvent, Pt as errMsg, Q as foldSnapshotByFunction, _t as reducePoints, dt as metricsProviderCapability, sn as EventCategory, vt as resolveBucketMs } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, Jt as createEvent, Pt as errMsg, Q as foldSnapshotByFunction, _t as reducePoints, dt as metricsProviderCapability, sn as EventCategory, vt as resolveBucketMs } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
import { readFile, readdir } from "node:fs/promises";
|
|
3
3
|
import { execFile, execFileSync } from "node:child_process";
|
|
4
4
|
import { promisify } from "node:util";
|
|
@@ -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-0fjBDzUu.js");
|
|
7
7
|
let node_child_process = require("node:child_process");
|
|
8
8
|
let node_util = require("node:util");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Ft as BaseAddon, K as enumerateInferenceDevices, Pt as errMsg, Xt as emitReadiness, ht as platformProbeCapability, sn as EventCategory, wt as scoreRuntimes } from "../../dist-
|
|
2
|
+
import { Ft as BaseAddon, K as enumerateInferenceDevices, Pt as errMsg, Xt as emitReadiness, ht as platformProbeCapability, sn as EventCategory, wt as scoreRuntimes } from "../../dist-BLU9Dol1.mjs";
|
|
3
3
|
import { execFile } from "node:child_process";
|
|
4
4
|
import { promisify } from "node:util";
|
|
5
5
|
import * as fs from "node:fs";
|
|
@@ -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-0fjBDzUu.js");
|
|
7
7
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
8
8
|
/**
|
|
9
9
|
* Reconcile the durable `enabledProviders` set against authoritative
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, sn as EventCategory } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, sn as EventCategory } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
3
3
|
/**
|
|
4
4
|
* Reconcile the durable `enabledProviders` set against authoritative
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-0fjBDzUu.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as streamQualityLabel, Et as snapshotCapability, Ft as BaseAddon, M as bareAddonId, N as batteryCapability, Pt as errMsg, V as deriveBatteryPresence, Vt as DeviceType, en as nodePin, i as BatteryStatusSchema, sn as EventCategory, zt as DeviceFeature } from "../../dist-
|
|
1
|
+
import { At as streamQualityLabel, Et as snapshotCapability, Ft as BaseAddon, M as bareAddonId, N as batteryCapability, Pt as errMsg, V as deriveBatteryPresence, Vt as DeviceType, en as nodePin, i as BatteryStatusSchema, sn as EventCategory, zt as DeviceFeature } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { signExpiringUrl, verifyExpiringUrl } from "@camstack/types/node";
|
|
@@ -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-0fjBDzUu.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let node_fs_promises = require("node:fs/promises");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, Z as filesystemBrowseCapability, kt as storageProviderCapability } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, Z as filesystemBrowseCapability, kt as storageProviderCapability } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
Binary file
|
|
Binary file
|
|
@@ -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-0fjBDzUu.js");
|
|
7
7
|
const require_hub_cap_forward = require("../../hub-cap-forward-DmHNjbB0.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as StorageLocationTypeSchema, Dt as storageCapability, F as collectSecretConfigKeys, Ft as BaseAddon, Ot as storageMigrationCapability, S as StorageCleanupJobSchema, Tt as settingsStoreCapability, h as REDACTED_SECRET, tn as parseJsonObject, w as StorageMigrationJobSchema } from "../../dist-
|
|
1
|
+
import { C as StorageLocationTypeSchema, Dt as storageCapability, F as collectSecretConfigKeys, Ft as BaseAddon, Ot as storageMigrationCapability, S as StorageCleanupJobSchema, Tt as settingsStoreCapability, h as REDACTED_SECRET, tn as parseJsonObject, w as StorageMigrationJobSchema } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
import { t as HUB_CAP_FWD_ACTION } from "../../hub-cap-forward-BdT320dq.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
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-0fjBDzUu.js");
|
|
7
7
|
//#region src/builtins/system-config/system-config.addon.ts
|
|
8
8
|
/**
|
|
9
9
|
* Built-in `system-config` addon — Phase 4 of the settings redesign.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, Pt as errMsg, Qt as hydrateSchema } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, Pt as errMsg, Qt as hydrateSchema } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
//#region src/builtins/system-config/system-config.addon.ts
|
|
3
3
|
/**
|
|
4
4
|
* Built-in `system-config` addon — Phase 4 of the settings redesign.
|
|
@@ -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-0fjBDzUu.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-BLU9Dol1.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
import * as path$1 from "node:path";
|
|
4
4
|
import path from "node:path";
|
|
@@ -10594,6 +10594,24 @@ var deviceProviderCapability = {
|
|
|
10594
10594
|
})
|
|
10595
10595
|
}
|
|
10596
10596
|
};
|
|
10597
|
+
/**
|
|
10598
|
+
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
10599
|
+
* live registry access, and all management operations into a single tRPC surface.
|
|
10600
|
+
*
|
|
10601
|
+
* Replaces:
|
|
10602
|
+
* - `device-persistence` capability (persistence methods absorbed here)
|
|
10603
|
+
* - `device-management.router.ts` (deleted in Phase 2)
|
|
10604
|
+
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
10605
|
+
*
|
|
10606
|
+
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
10607
|
+
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
10608
|
+
* - No nodeId routing needed — this is a pure hub singleton.
|
|
10609
|
+
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
10610
|
+
* - No shadow registry or cross-node aggregation required.
|
|
10611
|
+
*
|
|
10612
|
+
* Forked workers register devices back to the hub via `ctx.devices`
|
|
10613
|
+
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
10614
|
+
*/
|
|
10597
10615
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
10598
10616
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
10599
10617
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -17535,6 +17553,9 @@ var RetrainStatusSchema = zod.z.enum([
|
|
|
17535
17553
|
*
|
|
17536
17554
|
* `debug` does NOT pin; it is attention, not durability.
|
|
17537
17555
|
*
|
|
17556
|
+
* `debugNote` is the operator's own words about WHAT should be checked on this
|
|
17557
|
+
* track, and it lives and dies with `debug` — see {@link MAX_TRACK_DEBUG_NOTE_LEN}.
|
|
17558
|
+
*
|
|
17538
17559
|
* `favourited` IS a BOOLEAN pin (durability bit), not a retrain lifecycle.
|
|
17539
17560
|
* A favourited track is skipped by retention the same way `staging` is, but
|
|
17540
17561
|
* it does not enter `none|staging|trained` and has no staging budget.
|
|
@@ -17545,6 +17566,21 @@ var TrackFlagFields = {
|
|
|
17545
17566
|
markForTrain: zod.z.boolean().optional(),
|
|
17546
17567
|
/** Operator marked this track for diagnostic attention. */
|
|
17547
17568
|
debug: zod.z.boolean().optional(),
|
|
17569
|
+
/**
|
|
17570
|
+
* What the operator wants CHECKED on this track, in their own words.
|
|
17571
|
+
*
|
|
17572
|
+
* The flag alone says "look at this" and nothing about what for; a debug set
|
|
17573
|
+
* reviewed hours later is a list of tracks with no question attached. Bound
|
|
17574
|
+
* to `debug` on the WRITE side — the body clears it when `debug` goes off,
|
|
17575
|
+
* and refuses it on a track whose debug is off — so a note can never outlive
|
|
17576
|
+
* the attention it belongs to.
|
|
17577
|
+
*
|
|
17578
|
+
* `''` is a real value ("marked, nothing to add"); the ABSENT key means
|
|
17579
|
+
* "leave whatever is stored alone", which is what lets a surface turn debug
|
|
17580
|
+
* on without a note (a cancelled prompt) and what lets it edit the note
|
|
17581
|
+
* without touching the flag.
|
|
17582
|
+
*/
|
|
17583
|
+
debugNote: zod.z.string().max(500).optional(),
|
|
17548
17584
|
/** Operator favourited this track. Pins it against pruning. */
|
|
17549
17585
|
favourited: zod.z.boolean().optional()
|
|
17550
17586
|
};
|
|
@@ -17571,6 +17607,12 @@ var TrackFlagsSchema = zod.z.object({
|
|
|
17571
17607
|
trackId: zod.z.string(),
|
|
17572
17608
|
markForTrain: zod.z.boolean(),
|
|
17573
17609
|
debug: zod.z.boolean(),
|
|
17610
|
+
/** The note as it STANDS after the write — never absent here (a track with no
|
|
17611
|
+
* note reports `''`), for the same reason the booleans are required: a
|
|
17612
|
+
* surface that has just written must be able to render the note it now owns
|
|
17613
|
+
* without a re-fetch, and an absent key would read as "unchanged" on a
|
|
17614
|
+
* screen that has no previous value to keep. */
|
|
17615
|
+
debugNote: zod.z.string(),
|
|
17574
17616
|
favourited: zod.z.boolean(),
|
|
17575
17617
|
/** The lifecycle state the boolean was derived from. Required here (unlike on
|
|
17576
17618
|
* a track row) because this shape is only ever produced by the write body,
|
|
@@ -18872,11 +18914,20 @@ var pipelineAnalyticsCapability = {
|
|
|
18872
18914
|
* staging is a deliberate action of the retrain page, which is also the only
|
|
18873
18915
|
* thing that produces `trained` in the first place.
|
|
18874
18916
|
*
|
|
18875
|
-
*
|
|
18876
|
-
*
|
|
18877
|
-
*
|
|
18878
|
-
*
|
|
18879
|
-
*
|
|
18917
|
+
* `debugNote` is the operator's sentence about WHAT to check on this track,
|
|
18918
|
+
* and it is bound to `debug`: writing `debug: false` clears it in the same
|
|
18919
|
+
* statement, and a note sent for a track whose debug is off (and is not
|
|
18920
|
+
* being turned on) is DROPPED with a warning rather than stored where
|
|
18921
|
+
* nothing will ever read it. An omitted `debugNote` leaves the stored one
|
|
18922
|
+
* alone — which is what lets a surface turn debug on when the operator
|
|
18923
|
+
* declined to type anything, without that refusal costing them the flag.
|
|
18924
|
+
*
|
|
18925
|
+
* Returns the RESOLVED state of all three flags (absent → `false`) plus the
|
|
18926
|
+
* note (absent → `''`) and the `retrainStatus` they were derived from, so a
|
|
18927
|
+
* caller can drive its toggle — and render a `trained` badge — without a
|
|
18928
|
+
* re-fetch. Rejects an unknown track, a new staging mark on a device already
|
|
18929
|
+
* holding its full budget, and any `markForTrain` write against a trained
|
|
18930
|
+
* track.
|
|
18880
18931
|
*/
|
|
18881
18932
|
setTrackFlags: method(zod.z.object({
|
|
18882
18933
|
/** Log/audit scope only — the trackId is globally unique on its own. */
|
|
@@ -10594,6 +10594,24 @@ var deviceProviderCapability = {
|
|
|
10594
10594
|
})
|
|
10595
10595
|
}
|
|
10596
10596
|
};
|
|
10597
|
+
/**
|
|
10598
|
+
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
10599
|
+
* live registry access, and all management operations into a single tRPC surface.
|
|
10600
|
+
*
|
|
10601
|
+
* Replaces:
|
|
10602
|
+
* - `device-persistence` capability (persistence methods absorbed here)
|
|
10603
|
+
* - `device-management.router.ts` (deleted in Phase 2)
|
|
10604
|
+
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
10605
|
+
*
|
|
10606
|
+
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
10607
|
+
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
10608
|
+
* - No nodeId routing needed — this is a pure hub singleton.
|
|
10609
|
+
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
10610
|
+
* - No shadow registry or cross-node aggregation required.
|
|
10611
|
+
*
|
|
10612
|
+
* Forked workers register devices back to the hub via `ctx.devices`
|
|
10613
|
+
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
10614
|
+
*/
|
|
10597
10615
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
10598
10616
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
10599
10617
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -17535,6 +17553,9 @@ var RetrainStatusSchema = z.enum([
|
|
|
17535
17553
|
*
|
|
17536
17554
|
* `debug` does NOT pin; it is attention, not durability.
|
|
17537
17555
|
*
|
|
17556
|
+
* `debugNote` is the operator's own words about WHAT should be checked on this
|
|
17557
|
+
* track, and it lives and dies with `debug` — see {@link MAX_TRACK_DEBUG_NOTE_LEN}.
|
|
17558
|
+
*
|
|
17538
17559
|
* `favourited` IS a BOOLEAN pin (durability bit), not a retrain lifecycle.
|
|
17539
17560
|
* A favourited track is skipped by retention the same way `staging` is, but
|
|
17540
17561
|
* it does not enter `none|staging|trained` and has no staging budget.
|
|
@@ -17545,6 +17566,21 @@ var TrackFlagFields = {
|
|
|
17545
17566
|
markForTrain: z.boolean().optional(),
|
|
17546
17567
|
/** Operator marked this track for diagnostic attention. */
|
|
17547
17568
|
debug: z.boolean().optional(),
|
|
17569
|
+
/**
|
|
17570
|
+
* What the operator wants CHECKED on this track, in their own words.
|
|
17571
|
+
*
|
|
17572
|
+
* The flag alone says "look at this" and nothing about what for; a debug set
|
|
17573
|
+
* reviewed hours later is a list of tracks with no question attached. Bound
|
|
17574
|
+
* to `debug` on the WRITE side — the body clears it when `debug` goes off,
|
|
17575
|
+
* and refuses it on a track whose debug is off — so a note can never outlive
|
|
17576
|
+
* the attention it belongs to.
|
|
17577
|
+
*
|
|
17578
|
+
* `''` is a real value ("marked, nothing to add"); the ABSENT key means
|
|
17579
|
+
* "leave whatever is stored alone", which is what lets a surface turn debug
|
|
17580
|
+
* on without a note (a cancelled prompt) and what lets it edit the note
|
|
17581
|
+
* without touching the flag.
|
|
17582
|
+
*/
|
|
17583
|
+
debugNote: z.string().max(500).optional(),
|
|
17548
17584
|
/** Operator favourited this track. Pins it against pruning. */
|
|
17549
17585
|
favourited: z.boolean().optional()
|
|
17550
17586
|
};
|
|
@@ -17571,6 +17607,12 @@ var TrackFlagsSchema = z.object({
|
|
|
17571
17607
|
trackId: z.string(),
|
|
17572
17608
|
markForTrain: z.boolean(),
|
|
17573
17609
|
debug: z.boolean(),
|
|
17610
|
+
/** The note as it STANDS after the write — never absent here (a track with no
|
|
17611
|
+
* note reports `''`), for the same reason the booleans are required: a
|
|
17612
|
+
* surface that has just written must be able to render the note it now owns
|
|
17613
|
+
* without a re-fetch, and an absent key would read as "unchanged" on a
|
|
17614
|
+
* screen that has no previous value to keep. */
|
|
17615
|
+
debugNote: z.string(),
|
|
17574
17616
|
favourited: z.boolean(),
|
|
17575
17617
|
/** The lifecycle state the boolean was derived from. Required here (unlike on
|
|
17576
17618
|
* a track row) because this shape is only ever produced by the write body,
|
|
@@ -18872,11 +18914,20 @@ var pipelineAnalyticsCapability = {
|
|
|
18872
18914
|
* staging is a deliberate action of the retrain page, which is also the only
|
|
18873
18915
|
* thing that produces `trained` in the first place.
|
|
18874
18916
|
*
|
|
18875
|
-
*
|
|
18876
|
-
*
|
|
18877
|
-
*
|
|
18878
|
-
*
|
|
18879
|
-
*
|
|
18917
|
+
* `debugNote` is the operator's sentence about WHAT to check on this track,
|
|
18918
|
+
* and it is bound to `debug`: writing `debug: false` clears it in the same
|
|
18919
|
+
* statement, and a note sent for a track whose debug is off (and is not
|
|
18920
|
+
* being turned on) is DROPPED with a warning rather than stored where
|
|
18921
|
+
* nothing will ever read it. An omitted `debugNote` leaves the stored one
|
|
18922
|
+
* alone — which is what lets a surface turn debug on when the operator
|
|
18923
|
+
* declined to type anything, without that refusal costing them the flag.
|
|
18924
|
+
*
|
|
18925
|
+
* Returns the RESOLVED state of all three flags (absent → `false`) plus the
|
|
18926
|
+
* note (absent → `''`) and the `retrainStatus` they were derived from, so a
|
|
18927
|
+
* caller can drive its toggle — and render a `trained` badge — without a
|
|
18928
|
+
* re-fetch. Rejects an unknown track, a new staging mark on a device already
|
|
18929
|
+
* holding its full budget, and any `markForTrain` write against a trained
|
|
18930
|
+
* track.
|
|
18880
18931
|
*/
|
|
18881
18932
|
setTrackFlags: method(z.object({
|
|
18882
18933
|
/** Log/audit scope only — the trackId is globally unique on its own. */
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("./dist-
|
|
3
|
+
const require_dist = require("./dist-0fjBDzUu.js");
|
|
4
4
|
const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
|
|
5
5
|
require("./builtins/alerts/index.js");
|
|
6
6
|
const require_formatter = require("./formatter-DqAKDlvN.js");
|
|
@@ -27,7 +27,7 @@ require("./builtins/system-config/index.js");
|
|
|
27
27
|
const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
|
|
28
28
|
const require_file_data_plane = require("./file-data-plane-DO8KbxCe.js");
|
|
29
29
|
const require_tls$1 = require("./tls-BxQlomxd.js");
|
|
30
|
-
const require_manifest_system_deps = require("./manifest-system-deps-
|
|
30
|
+
const require_manifest_system_deps = require("./manifest-system-deps-KBuTXH-y.js");
|
|
31
31
|
const require_resource_monitor = require("./resource-monitor-CdnzxBLP.js");
|
|
32
32
|
const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
|
|
33
33
|
let zod = require("zod");
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM$1, r as __exportAll, t as __commonJSMin$1 } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { $ as isArrayOutputSchema, Ct as scopesAllowDeviceCap, D as addonSettingsCapability, Gt as asJsonObject$1, Ht as ReadinessRegistry, It as DATAPLANE_SECRET_HEADER$1, Jt as createEvent, Kt as asNumber, Lt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Pt as errMsg$1, Rt as DEVICE_STATUS_METHOD, St as scopesAllowAddon, Ut as ReadinessTimeoutError, X as extractNestedAddonId, Yt as emitDownForOwnedCaps, Zt as expandCapMethods, an as scopeKey, at as kebabToCamel, bt as resolveMethodAuth, et as isCollectionArrayMethod, g as RUNTIME_DEFAULTS, gt as procedureAuthKey, in as resolveCapMount, it as isVoidInput, lt as logLevelAtMost, m as METHOD_ACCESS_MAP, nn as parseJsonUnknown, ot as lifecycleJobSchema, p as LOG_LEVEL_RANK, pt as objectInputDeclaresAddonId, qt as asString$1, rn as readinessKey, sn as EventCategory$1, t as ALL_CAPABILITY_DEFINITIONS, tn as parseJsonObject, tt as isObjectInput, ut as looseSchema } from "./dist-
|
|
2
|
+
import { $ as isArrayOutputSchema, Ct as scopesAllowDeviceCap, D as addonSettingsCapability, Gt as asJsonObject$1, Ht as ReadinessRegistry, It as DATAPLANE_SECRET_HEADER$1, Jt as createEvent, Kt as asNumber, Lt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Pt as errMsg$1, Rt as DEVICE_STATUS_METHOD, St as scopesAllowAddon, Ut as ReadinessTimeoutError, X as extractNestedAddonId, Yt as emitDownForOwnedCaps, Zt as expandCapMethods, an as scopeKey, at as kebabToCamel, bt as resolveMethodAuth, et as isCollectionArrayMethod, g as RUNTIME_DEFAULTS, gt as procedureAuthKey, in as resolveCapMount, it as isVoidInput, lt as logLevelAtMost, m as METHOD_ACCESS_MAP, nn as parseJsonUnknown, ot as lifecycleJobSchema, p as LOG_LEVEL_RANK, pt as objectInputDeclaresAddonId, qt as asString$1, rn as readinessKey, sn as EventCategory$1, t as ALL_CAPABILITY_DEFINITIONS, tn as parseJsonObject, tt as isObjectInput, ut as looseSchema } from "./dist-BLU9Dol1.mjs";
|
|
3
3
|
import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
|
|
4
4
|
import "./builtins/alerts/index.mjs";
|
|
5
5
|
import { t as formatLogLine } from "./formatter-B7qW8bPJ.mjs";
|
|
@@ -26,7 +26,7 @@ import "./builtins/system-config/index.mjs";
|
|
|
26
26
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
27
27
|
import { a as parseTokenizedUrl, c as collectModelFiles, d as downloadModel, f as ensureModel, h as isModelDownloaded, i as parseRangeHeader, l as deleteModelFromDisk, m as getModelFilePath, n as contentTypeFor, o as resolveFilePath, p as fetchJson, r as createAuthenticatedFileServer, s as ModelDownloadService, t as createFileDataPlaneHandler, u as downloadFile } from "./file-data-plane-BhKdxJgf.mjs";
|
|
28
28
|
import { C as registerLanHttpHandler, S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, b as bindPendingLanHttp, c as loadTlsCert, d as collectCertIdentity, f as CA_VALIDITY_DAYS, g as evaluateExistingCert, h as SERVER_AUTH_OID, i as writeExtraSans, l as reissueTlsLeaf, m as MAX_LEAF_VALIDITY_DAYS, n as readTlsAccessStatus, o as validateUploadedTls, p as LEAF_RENEWAL_WINDOW_DAYS, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, u as CA_COMMON_NAME, v as allFamiliesListenHost, x as closeLanHttp, y as applyLanHttp } from "./tls-DOTmtLCW.mjs";
|
|
29
|
-
import { $ as buildUdsNativeCapProxy, $t as formatHeapSpaces, A as createUdsLoggerWithControl, At as HUB_MAIN_RSS_BUDGET_MB, B as readMoleculerFanoutMode, Bt as createV8Reclaimer, C as ipcParentLink, Ct as createAddonDataPlaneFacility, D as createUdsEventBus, Dt as HEAP_WATCH_INTERVAL_MS, E as createUdsEventBridge, Et as HEAP_RECLAIM_TRIGGER_MB, F as AGENT_CAP_FWD_SERVICE, Ft as RUNNER_RSS_BUDGET_ENV, G as createLocalTransport, Gt as reclaimIntervalMs, H as PARENT_ROUTED_PROVIDER_ADDON_ID, Ht as hubMainRssBudget, I as CapRouteResolver, It as ZERO_LOOP_DELAY, J as SocketChannel, Jt as startRunnerHeapWatch, K as UdsLocalTransportClient, Kt as shouldReclaim, L as CapRouteError, Lt as buildHeapSample, M as LocalChildRegistry, Mt as RSS_BUDGET_REANNOUNCE_MIN_MS, N as UDS_NO_ROUTE_PREFIX, Nt as RSS_BUDGET_RELEASE_RATIO, O as udsChildLogToWorkerEntry, Ot as HEAP_WATCH_WARN_RATIO, P as AGENT_CAP_FWD_ACTION, Pt as RUNNER_HEAP_WATCH_INTERVAL_MS, Q as buildNativeCapProxy, Qt as emitHeapDiagnosticReport, R as classifyCapRoute, Rt as createDeferredHeapWatchSink, S as buildLinkChain, St as runNpm, T as createParentUnownedCallHandler, Tt as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, U as __resetCapUsageRegistryForTests, Ut as nextRssBudgetState, V as CapUsageRegistry, Vt as describeRss, W as getCapUsageRegistry, Wt as parseRssBudgetMb, X as FrameDecoder, Xt as DECISIVE_HEAP_SPACES, Y as localEndpointPath, Yt as strandedMb, Z as encodeFrame, Zt as HEAP_SPACE_REPORT_MIN_MB, _ as AddonDepsManager, _n as createEventPlaneReader, _t as CapabilityUnavailableError, a as createUdsAddonContext, an as createSocketPlaneMeter, at as createAddonService, b as brokerCallForCap, bt as resolveAddonClass, c as getOrInitReadinessRegistryForClient, cn as formatSocketPlane, ct as capActionName, d as clusterEventTopic, dn as recordSocketFrame, dt as capServiceName, en as heapSpaceField, et as createBrokerDeviceManagerApi, f as getBrokerEventBus, fn as sampleSocketDirection, ft as parseCapAction, g as subscribePassthrough, gn as createEventPlaneMeter, gt as CapabilityHandle, h as setNodeEventInterest, hn as EVENT_PLANE_TOP_N, ht as DeviceRegistry, i as createAddonContext, in as SOCKET_PLANE_TOP_N, j as LocalChildClient, jt as HUB_RSS_BUDGET_ENV, k as createUdsLogger, kt as HUB_MAIN_HEAP_WATCH_LABEL, l as setHubConnected, ln as EMPTY_SOCKET_DIRECTION, lt as capActionSuffix, m as registerEventBusService, mn as socketDirectionMessages, mt as serializeTypedArrays, n as installManifestPythonDeps, nn as selectReportedSpaces, o as getWorkerDeviceRegistry, on as createSocketPlaneReader, ot as validateProviderRegistrations, p as getMoleculerEventStats, pn as socketDirectionBytes, pt as deserializeTypedArrays, q as UdsLocalTransportServer, qt as startHeapWatch, r as adaptBrokerToCluster, rn as EMPTY_SOCKET_PLANE_BASELINE, rt as mountNativeCapService, s as getOrInitReadinessRegistry, sn as diffSocketPlane, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestSystemDeps, tn as readHeapSpaces, u as EVENT_TOPIC_PREFIX, un as createSocketDirectionCounters, ut as capBareAction, v as createKernelHwAccel, vn as diffEventPlane, vt as copyBundledNativeModules, w as localProviderLink, wt as HEAP_RECLAIM_MIN_INTERVAL_MS, x as brokerTransportLink, xt as resolveNpmInvocation, y as resolveHwAccel, yn as formatEventPlane, yt as installManifestNativeDeps, z as callWithServiceDiscovery, zt as createLoopDelayMeter } from "./manifest-system-deps-
|
|
29
|
+
import { $ as buildUdsNativeCapProxy, $t as formatHeapSpaces, A as createUdsLoggerWithControl, At as HUB_MAIN_RSS_BUDGET_MB, B as readMoleculerFanoutMode, Bt as createV8Reclaimer, C as ipcParentLink, Ct as createAddonDataPlaneFacility, D as createUdsEventBus, Dt as HEAP_WATCH_INTERVAL_MS, E as createUdsEventBridge, Et as HEAP_RECLAIM_TRIGGER_MB, F as AGENT_CAP_FWD_SERVICE, Ft as RUNNER_RSS_BUDGET_ENV, G as createLocalTransport, Gt as reclaimIntervalMs, H as PARENT_ROUTED_PROVIDER_ADDON_ID, Ht as hubMainRssBudget, I as CapRouteResolver, It as ZERO_LOOP_DELAY, J as SocketChannel, Jt as startRunnerHeapWatch, K as UdsLocalTransportClient, Kt as shouldReclaim, L as CapRouteError, Lt as buildHeapSample, M as LocalChildRegistry, Mt as RSS_BUDGET_REANNOUNCE_MIN_MS, N as UDS_NO_ROUTE_PREFIX, Nt as RSS_BUDGET_RELEASE_RATIO, O as udsChildLogToWorkerEntry, Ot as HEAP_WATCH_WARN_RATIO, P as AGENT_CAP_FWD_ACTION, Pt as RUNNER_HEAP_WATCH_INTERVAL_MS, Q as buildNativeCapProxy, Qt as emitHeapDiagnosticReport, R as classifyCapRoute, Rt as createDeferredHeapWatchSink, S as buildLinkChain, St as runNpm, T as createParentUnownedCallHandler, Tt as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, U as __resetCapUsageRegistryForTests, Ut as nextRssBudgetState, V as CapUsageRegistry, Vt as describeRss, W as getCapUsageRegistry, Wt as parseRssBudgetMb, X as FrameDecoder, Xt as DECISIVE_HEAP_SPACES, Y as localEndpointPath, Yt as strandedMb, Z as encodeFrame, Zt as HEAP_SPACE_REPORT_MIN_MB, _ as AddonDepsManager, _n as createEventPlaneReader, _t as CapabilityUnavailableError, a as createUdsAddonContext, an as createSocketPlaneMeter, at as createAddonService, b as brokerCallForCap, bt as resolveAddonClass, c as getOrInitReadinessRegistryForClient, cn as formatSocketPlane, ct as capActionName, d as clusterEventTopic, dn as recordSocketFrame, dt as capServiceName, en as heapSpaceField, et as createBrokerDeviceManagerApi, f as getBrokerEventBus, fn as sampleSocketDirection, ft as parseCapAction, g as subscribePassthrough, gn as createEventPlaneMeter, gt as CapabilityHandle, h as setNodeEventInterest, hn as EVENT_PLANE_TOP_N, ht as DeviceRegistry, i as createAddonContext, in as SOCKET_PLANE_TOP_N, j as LocalChildClient, jt as HUB_RSS_BUDGET_ENV, k as createUdsLogger, kt as HUB_MAIN_HEAP_WATCH_LABEL, l as setHubConnected, ln as EMPTY_SOCKET_DIRECTION, lt as capActionSuffix, m as registerEventBusService, mn as socketDirectionMessages, mt as serializeTypedArrays, n as installManifestPythonDeps, nn as selectReportedSpaces, o as getWorkerDeviceRegistry, on as createSocketPlaneReader, ot as validateProviderRegistrations, p as getMoleculerEventStats, pn as socketDirectionBytes, pt as deserializeTypedArrays, q as UdsLocalTransportServer, qt as startHeapWatch, r as adaptBrokerToCluster, rn as EMPTY_SOCKET_PLANE_BASELINE, rt as mountNativeCapService, s as getOrInitReadinessRegistry, sn as diffSocketPlane, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestSystemDeps, tn as readHeapSpaces, u as EVENT_TOPIC_PREFIX, un as createSocketDirectionCounters, ut as capBareAction, v as createKernelHwAccel, vn as diffEventPlane, vt as copyBundledNativeModules, w as localProviderLink, wt as HEAP_RECLAIM_MIN_INTERVAL_MS, x as brokerTransportLink, xt as resolveNpmInvocation, y as resolveHwAccel, yn as formatEventPlane, yt as installManifestNativeDeps, z as callWithServiceDiscovery, zt as createLoopDelayMeter } from "./manifest-system-deps-BF-C5NDL.mjs";
|
|
30
30
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-BWmQ5i-o.mjs";
|
|
31
31
|
import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
|
|
32
32
|
import { z } from "zod";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import "./dist-CCMYMmkQ.mjs";
|
|
2
1
|
import "./hub-cap-forward-BdT320dq.mjs";
|
|
3
2
|
import * as crypto$1 from "node:crypto";
|
|
4
3
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
@@ -16,7 +15,7 @@ import { createServer } from "node:http";
|
|
|
16
15
|
import * as v8 from "node:v8";
|
|
17
16
|
import { monitorEventLoopDelay } from "node:perf_hooks";
|
|
18
17
|
import * as vm from "node:vm";
|
|
19
|
-
import { BOOT_RECOVERY_BACKOFF_MS, DATAPLANE_SECRET_HEADER, DeviceType, DisposerChain, EventCategory, ReadinessRegistry, asJsonObject, asString, createDeviceProxy, createEventBusSliceSource, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, readNodePin, scopeKey, sleep, withCapInputDefaults } from "@camstack/types/addon";
|
|
18
|
+
import { BOOT_RECOVERY_BACKOFF_MS, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATCH_MAX, DeviceType, DisposerChain, EventCategory, ReadinessRegistry, asJsonObject, asString, createDeviceProxy, createEventBusSliceSource, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, readNodePin, scopeKey, sleep, withCapInputDefaults } from "@camstack/types/addon";
|
|
20
19
|
import { connect, createConnection, createServer as createServer$1 } from "node:net";
|
|
21
20
|
import { TRPCClientError, createTRPCClient } from "@trpc/client";
|
|
22
21
|
//#region src/kernel/event-plane-report.ts
|
|
@@ -2627,58 +2626,6 @@ async function readModifyWrite(input) {
|
|
|
2627
2626
|
//#endregion
|
|
2628
2627
|
//#region src/kernel/moleculer/children-batch-loader.ts
|
|
2629
2628
|
/**
|
|
2630
|
-
* "Who are my children?" asked by a thousand devices, answered in a handful of
|
|
2631
|
-
* calls.
|
|
2632
|
-
*
|
|
2633
|
-
* ## The number
|
|
2634
|
-
*
|
|
2635
|
-
* Every `BaseDevice` inherits a `getAccessoryChildren()` that returns `[]`, so
|
|
2636
|
-
* the accessory reconcile in `device-cap-proxy.ts` runs its orphan-prune step
|
|
2637
|
-
* for EVERY registered device — including the leaf accessories that can never
|
|
2638
|
-
* own one. Each pass asked `device-manager.getChildren` for its own id.
|
|
2639
|
-
* Measured on the live hub 2026-08-27, 120-second boot window, 1 017 devices:
|
|
2640
|
-
* **1 024 calls returning 919 rows in total**. A thousand round-trips, and a
|
|
2641
|
-
* thousand indexed scans behind them, to move less than one row each.
|
|
2642
|
-
*
|
|
2643
|
-
* ## Why a loader and not a caller that loops
|
|
2644
|
-
*
|
|
2645
|
-
* There is no loop to unroll. Reconcile is per-device by construction: it runs
|
|
2646
|
-
* inside `register()`, and again whenever a late feature-probe writes the
|
|
2647
|
-
* slice. The repetition is a THOUSAND INDEPENDENT CALLERS, not one caller
|
|
2648
|
-
* asking a thousand times — so the collapse has to happen between them.
|
|
2649
|
-
*
|
|
2650
|
-
* ## Why the batch is self-clocking, with no window to tune
|
|
2651
|
-
*
|
|
2652
|
-
* At most ONE batch call is in flight. Anything that arrives while it is in
|
|
2653
|
-
* flight lands in the next batch, dispatched the moment the current one
|
|
2654
|
-
* settles. That makes the batch size adapt to the arrival rate on its own:
|
|
2655
|
-
*
|
|
2656
|
-
* - Idle: the first caller flushes on the next macrotask. No added wait, and
|
|
2657
|
-
* no timer to pick a value for and be wrong about.
|
|
2658
|
-
* - Boot: `BaseDeviceProvider.onRestoreDevices` issues every top-level
|
|
2659
|
-
* `create()` at once and `runBounded(specs, 12)` spawns accessory children
|
|
2660
|
-
* twelve wide, so reconciles arrive in bursts — measured as 2 372 device
|
|
2661
|
-
* log lines in one 5-second bucket at boot+16s, against 62 at boot+142s.
|
|
2662
|
-
* Every arrival inside one round-trip collapses into the next call.
|
|
2663
|
-
* - Worst case: arrivals slower than a round-trip give batches of one, which
|
|
2664
|
-
* is exactly today's cost. The loader can never be worse than what it
|
|
2665
|
-
* replaces.
|
|
2666
|
-
*
|
|
2667
|
-
* A fixed debounce window would have to be guessed against that distribution,
|
|
2668
|
-
* and would tax the idle case to pay for the busy one.
|
|
2669
|
-
*
|
|
2670
|
-
* ## Degrading, rather than breaking, against an older hub
|
|
2671
|
-
*
|
|
2672
|
-
* `getChildrenBatch` is a NEW method: a hub that predates it rejects the call
|
|
2673
|
-
* (it does not silently strip the input and answer a different question, which
|
|
2674
|
-
* is what adding a `parentDeviceIds` FIELD to `getChildren` would have done).
|
|
2675
|
-
* Every waiter in a failed batch is then answered by the per-parent
|
|
2676
|
-
* `getChildren` it would have used anyway, so the reconcile is never denied
|
|
2677
|
-
* its answer. A rejection that names the method as unknown latches the
|
|
2678
|
-
* fallback permanently — re-probing a method the hub will never have, once per
|
|
2679
|
-
* batch for a whole boot, is the storm this exists to remove.
|
|
2680
|
-
*/
|
|
2681
|
-
/**
|
|
2682
2629
|
* Narrow an untyped cap answer to the fields the reconcile reads.
|
|
2683
2630
|
*
|
|
2684
2631
|
* `callDeviceManager` is an untyped boundary, and the answer may come from a
|
|
@@ -2737,7 +2684,7 @@ function looksLikeUnknownMethod(err) {
|
|
|
2737
2684
|
return lowered.includes("not_found") || lowered.includes("no procedure") || lowered.includes("unknown method") || lowered.includes("no such method") || lowered.includes("not available");
|
|
2738
2685
|
}
|
|
2739
2686
|
function createChildrenBatchLoader(opts) {
|
|
2740
|
-
const maxBatch = Math.max(1, opts.maxBatch ??
|
|
2687
|
+
const maxBatch = Math.max(1, opts.maxBatch ?? DEVICE_CHILDREN_BATCH_MAX);
|
|
2741
2688
|
let pending = [];
|
|
2742
2689
|
let flushScheduled = false;
|
|
2743
2690
|
let flushing = false;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
require("./dist-DE3OH-FG.js");
|
|
3
2
|
require("./hub-cap-forward-DmHNjbB0.js");
|
|
4
3
|
let node_crypto = require("node:crypto");
|
|
5
4
|
node_crypto = require_chunk.__toESM(node_crypto);
|
|
@@ -2630,58 +2629,6 @@ async function readModifyWrite(input) {
|
|
|
2630
2629
|
//#endregion
|
|
2631
2630
|
//#region src/kernel/moleculer/children-batch-loader.ts
|
|
2632
2631
|
/**
|
|
2633
|
-
* "Who are my children?" asked by a thousand devices, answered in a handful of
|
|
2634
|
-
* calls.
|
|
2635
|
-
*
|
|
2636
|
-
* ## The number
|
|
2637
|
-
*
|
|
2638
|
-
* Every `BaseDevice` inherits a `getAccessoryChildren()` that returns `[]`, so
|
|
2639
|
-
* the accessory reconcile in `device-cap-proxy.ts` runs its orphan-prune step
|
|
2640
|
-
* for EVERY registered device — including the leaf accessories that can never
|
|
2641
|
-
* own one. Each pass asked `device-manager.getChildren` for its own id.
|
|
2642
|
-
* Measured on the live hub 2026-08-27, 120-second boot window, 1 017 devices:
|
|
2643
|
-
* **1 024 calls returning 919 rows in total**. A thousand round-trips, and a
|
|
2644
|
-
* thousand indexed scans behind them, to move less than one row each.
|
|
2645
|
-
*
|
|
2646
|
-
* ## Why a loader and not a caller that loops
|
|
2647
|
-
*
|
|
2648
|
-
* There is no loop to unroll. Reconcile is per-device by construction: it runs
|
|
2649
|
-
* inside `register()`, and again whenever a late feature-probe writes the
|
|
2650
|
-
* slice. The repetition is a THOUSAND INDEPENDENT CALLERS, not one caller
|
|
2651
|
-
* asking a thousand times — so the collapse has to happen between them.
|
|
2652
|
-
*
|
|
2653
|
-
* ## Why the batch is self-clocking, with no window to tune
|
|
2654
|
-
*
|
|
2655
|
-
* At most ONE batch call is in flight. Anything that arrives while it is in
|
|
2656
|
-
* flight lands in the next batch, dispatched the moment the current one
|
|
2657
|
-
* settles. That makes the batch size adapt to the arrival rate on its own:
|
|
2658
|
-
*
|
|
2659
|
-
* - Idle: the first caller flushes on the next macrotask. No added wait, and
|
|
2660
|
-
* no timer to pick a value for and be wrong about.
|
|
2661
|
-
* - Boot: `BaseDeviceProvider.onRestoreDevices` issues every top-level
|
|
2662
|
-
* `create()` at once and `runBounded(specs, 12)` spawns accessory children
|
|
2663
|
-
* twelve wide, so reconciles arrive in bursts — measured as 2 372 device
|
|
2664
|
-
* log lines in one 5-second bucket at boot+16s, against 62 at boot+142s.
|
|
2665
|
-
* Every arrival inside one round-trip collapses into the next call.
|
|
2666
|
-
* - Worst case: arrivals slower than a round-trip give batches of one, which
|
|
2667
|
-
* is exactly today's cost. The loader can never be worse than what it
|
|
2668
|
-
* replaces.
|
|
2669
|
-
*
|
|
2670
|
-
* A fixed debounce window would have to be guessed against that distribution,
|
|
2671
|
-
* and would tax the idle case to pay for the busy one.
|
|
2672
|
-
*
|
|
2673
|
-
* ## Degrading, rather than breaking, against an older hub
|
|
2674
|
-
*
|
|
2675
|
-
* `getChildrenBatch` is a NEW method: a hub that predates it rejects the call
|
|
2676
|
-
* (it does not silently strip the input and answer a different question, which
|
|
2677
|
-
* is what adding a `parentDeviceIds` FIELD to `getChildren` would have done).
|
|
2678
|
-
* Every waiter in a failed batch is then answered by the per-parent
|
|
2679
|
-
* `getChildren` it would have used anyway, so the reconcile is never denied
|
|
2680
|
-
* its answer. A rejection that names the method as unknown latches the
|
|
2681
|
-
* fallback permanently — re-probing a method the hub will never have, once per
|
|
2682
|
-
* batch for a whole boot, is the storm this exists to remove.
|
|
2683
|
-
*/
|
|
2684
|
-
/**
|
|
2685
2632
|
* Narrow an untyped cap answer to the fields the reconcile reads.
|
|
2686
2633
|
*
|
|
2687
2634
|
* `callDeviceManager` is an untyped boundary, and the answer may come from a
|
|
@@ -2740,7 +2687,7 @@ function looksLikeUnknownMethod(err) {
|
|
|
2740
2687
|
return lowered.includes("not_found") || lowered.includes("no procedure") || lowered.includes("unknown method") || lowered.includes("no such method") || lowered.includes("not available");
|
|
2741
2688
|
}
|
|
2742
2689
|
function createChildrenBatchLoader(opts) {
|
|
2743
|
-
const maxBatch = Math.max(1, opts.maxBatch ??
|
|
2690
|
+
const maxBatch = Math.max(1, opts.maxBatch ?? _camstack_types_addon.DEVICE_CHILDREN_BATCH_MAX);
|
|
2744
2691
|
let pending = [];
|
|
2745
2692
|
let flushScheduled = false;
|
|
2746
2693
|
let flushing = false;
|