@camstack/system 1.2.173 → 1.2.174
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 +120 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +120 -2
- package/dist/builtins/device-manager/device-meta-actions.d.ts +13 -0
- 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-1DEQFmTq.mjs → dist-B25PDvaS.mjs} +85 -2
- package/dist/{dist-DsoVfJSR.js → dist-BzPNEPHo.js} +90 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{manifest-system-deps-ir_XTNpe.js → manifest-system-deps-B0mzJPmb.js} +1 -1
- package/dist/{manifest-system-deps-Da6sme9C.mjs → manifest-system-deps-Pw8iaY5X.mjs} +1 -1
- package/dist/{retired-settings-keys-DTE5k4lU.js → retired-settings-keys-DZmeJ8ja.js} +1 -1
- package/dist/{retired-settings-keys-ChS1Q2Kv.mjs → retired-settings-keys-tWdiQpwa.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-B0mzJPmb.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 { $t as emitHeapDiagnosticReport, A as createUdsLoggerWithControl, Ft as RUNNER_RSS_BUDGET_ENV, Jt as startRunnerHeapWatch, 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 { $t as emitHeapDiagnosticReport, A as createUdsLoggerWithControl, Ft as RUNNER_RSS_BUDGET_ENV, Jt as startRunnerHeapWatch, 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-Pw8iaY5X.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-BzPNEPHo.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 {
|
|
1
|
+
import { E as addonPagesCapability, Nt as errMsg, Pt as BaseAddon, on as EventCategory } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { Nt as errMsg, O as addonWidgetsCapability, Pt as BaseAddon, on as EventCategory } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { Nt as errMsg, Pt as BaseAddon, k as alertsCapability, n as AlertSchema, on as EventCategory, qt as createEvent } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { Pt as BaseAddon, j as backupCapability, on as EventCategory } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { Pt as BaseAddon, ct as logDestinationCapability } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { I as coreBlockAddonId, L as coreBlockIdFromAddonId, Nt as errMsg, Pt as BaseAddon, R as coreBlocksCapability, c as CORE_BLOCK_ADDON_PREFIX, d as DeclaredDevices, l as CoreBlockSchema, s as CORE_BLOCKS_ADDON_ID } from "../../dist-B25PDvaS.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-BzPNEPHo.js");
|
|
7
|
+
const require_retired_settings_keys = require("../../retired-settings-keys-DZmeJ8ja.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
|
|
@@ -3271,6 +3271,75 @@ var DeviceEventPropagator = class {
|
|
|
3271
3271
|
}
|
|
3272
3272
|
};
|
|
3273
3273
|
//#endregion
|
|
3274
|
+
//#region src/builtins/device-manager/migrate-device.ts
|
|
3275
|
+
/** A refusal that names a switch the camera does not offer, rather than one it
|
|
3276
|
+
* could not be asked about. The cap documents rejecting the former; anything
|
|
3277
|
+
* else is treated as the camera being out of reach, which is the safe reading:
|
|
3278
|
+
* it keeps the switch in `sourceStillLive` instead of quietly clearing it. */
|
|
3279
|
+
function classify(err) {
|
|
3280
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
3281
|
+
return {
|
|
3282
|
+
outcome: /does not offer|not available|unsupported/i.test(detail) ? "not-offered" : "unreachable",
|
|
3283
|
+
detail
|
|
3284
|
+
};
|
|
3285
|
+
}
|
|
3286
|
+
async function applyAll(deps, deviceId, enabled) {
|
|
3287
|
+
const out = [];
|
|
3288
|
+
for (const switchId of require_dist.CAMERA_SWITCH_ORDER) try {
|
|
3289
|
+
await deps.setSwitch(deviceId, switchId, enabled);
|
|
3290
|
+
out.push({
|
|
3291
|
+
deviceId,
|
|
3292
|
+
switchId,
|
|
3293
|
+
outcome: enabled ? "on" : "off"
|
|
3294
|
+
});
|
|
3295
|
+
} catch (err) {
|
|
3296
|
+
const { outcome, detail } = classify(err);
|
|
3297
|
+
out.push({
|
|
3298
|
+
deviceId,
|
|
3299
|
+
switchId,
|
|
3300
|
+
outcome,
|
|
3301
|
+
detail
|
|
3302
|
+
});
|
|
3303
|
+
deps.log("camera switch refused", {
|
|
3304
|
+
deviceId,
|
|
3305
|
+
switchId,
|
|
3306
|
+
enabled,
|
|
3307
|
+
outcome,
|
|
3308
|
+
detail
|
|
3309
|
+
});
|
|
3310
|
+
}
|
|
3311
|
+
return out;
|
|
3312
|
+
}
|
|
3313
|
+
/**
|
|
3314
|
+
* Put both cameras to sleep, exchange their identities, wake the target.
|
|
3315
|
+
*
|
|
3316
|
+
* Throws only if the swap itself fails — a switch that could not be written is
|
|
3317
|
+
* reported, not raised, because refusing to migrate a camera whose old hardware
|
|
3318
|
+
* is unreachable would refuse the exact case this exists for.
|
|
3319
|
+
*/
|
|
3320
|
+
async function migrateDevice$1(deps, input) {
|
|
3321
|
+
const { sourceId, targetId } = input;
|
|
3322
|
+
if (sourceId === targetId) throw new Error(`[device-manager] migrateDevice: ${sourceId} is both source and target`);
|
|
3323
|
+
const down = [...await applyAll(deps, sourceId, false), ...await applyAll(deps, targetId, false)];
|
|
3324
|
+
const sourceStillLive = down.filter((r) => r.deviceId === sourceId && r.outcome === "unreachable").map((r) => r.switchId);
|
|
3325
|
+
await deps.swapIds(sourceId, targetId);
|
|
3326
|
+
const up = await applyAll(deps, sourceId, true);
|
|
3327
|
+
await deps.respawnRunners([sourceId, targetId]);
|
|
3328
|
+
deps.log("camera migrated", {
|
|
3329
|
+
sourceId,
|
|
3330
|
+
targetId,
|
|
3331
|
+
sourceStillLive,
|
|
3332
|
+
refusals: [...down, ...up].filter((r) => r.outcome === "unreachable").length
|
|
3333
|
+
});
|
|
3334
|
+
return {
|
|
3335
|
+
sourceId,
|
|
3336
|
+
targetId,
|
|
3337
|
+
switches: [...down, ...up],
|
|
3338
|
+
sourceStillLive,
|
|
3339
|
+
swapped: true
|
|
3340
|
+
};
|
|
3341
|
+
}
|
|
3342
|
+
//#endregion
|
|
3274
3343
|
//#region src/builtins/device-manager/device-meta-actions.ts
|
|
3275
3344
|
/**
|
|
3276
3345
|
* Device meta-mutation + persistence actions for the device-manager addon —
|
|
@@ -3344,6 +3413,54 @@ async function allocateDeviceId(pctx, input) {
|
|
|
3344
3413
|
return { id };
|
|
3345
3414
|
});
|
|
3346
3415
|
}
|
|
3416
|
+
/**
|
|
3417
|
+
* Replace a camera: the new hardware inherits the number the system knows.
|
|
3418
|
+
*
|
|
3419
|
+
* The composition lives in `migrate-device.ts`, deliberately free of this
|
|
3420
|
+
* file's context so the decisions it carries — above all "never report a switch
|
|
3421
|
+
* as off when it could not be written" — are testable without a hub. This is
|
|
3422
|
+
* the wiring: the four real dependencies, and the write lock.
|
|
3423
|
+
*
|
|
3424
|
+
* The temp id comes from `allocateNextDeviceId`, the monotonic counter, so the
|
|
3425
|
+
* value a crash could park a row on was never used and will never be reused.
|
|
3426
|
+
* `swapIds` therefore runs INSIDE the same lock the id was allocated under.
|
|
3427
|
+
*/
|
|
3428
|
+
async function migrateDevice(pctx, input) {
|
|
3429
|
+
const { sourceId, targetId } = input;
|
|
3430
|
+
const ctx = pctx.host.ctx;
|
|
3431
|
+
return await pctx.metaStore.withMetaWriteLock(async () => {
|
|
3432
|
+
const tempId = await pctx.metaStore.allocateNextDeviceId();
|
|
3433
|
+
return await migrateDevice$1({
|
|
3434
|
+
setSwitch: async (deviceId, switchId, enabled) => {
|
|
3435
|
+
await ctx.api.pipelineOrchestrator.setCameraSwitch.mutate({
|
|
3436
|
+
deviceId,
|
|
3437
|
+
switchId,
|
|
3438
|
+
enabled
|
|
3439
|
+
});
|
|
3440
|
+
},
|
|
3441
|
+
swapIds: async (a, b) => {
|
|
3442
|
+
await pctx.metaStore.rows.swapIds(a, b, tempId);
|
|
3443
|
+
},
|
|
3444
|
+
respawnRunners: async (deviceIds) => {
|
|
3445
|
+
const owners = /* @__PURE__ */ new Set();
|
|
3446
|
+
for (const deviceId of deviceIds) {
|
|
3447
|
+
const addonId = pctx.metaStore.idToAddonId.get(deviceId);
|
|
3448
|
+
if (addonId !== void 0) owners.add(addonId);
|
|
3449
|
+
}
|
|
3450
|
+
for (const addonId of owners) await ctx.api.addons.restartAddon.mutate({ addonId });
|
|
3451
|
+
},
|
|
3452
|
+
log: (message, meta) => {
|
|
3453
|
+
ctx.logger.info(message, {
|
|
3454
|
+
tags: { deviceId: sourceId },
|
|
3455
|
+
meta
|
|
3456
|
+
});
|
|
3457
|
+
}
|
|
3458
|
+
}, {
|
|
3459
|
+
sourceId,
|
|
3460
|
+
targetId
|
|
3461
|
+
});
|
|
3462
|
+
});
|
|
3463
|
+
}
|
|
3347
3464
|
async function registerDevice(pctx, input) {
|
|
3348
3465
|
const { addonId, stableId, id, type, name, parentDeviceId, features, config } = input;
|
|
3349
3466
|
const featuresArr = Array.isArray(features) ? [...features] : [];
|
|
@@ -5951,6 +6068,7 @@ var DeviceManagerAddon = class extends require_dist.BaseAddon {
|
|
|
5951
6068
|
resolveDeviceOwnerSync: (deviceId) => resolveDeviceOwnerSync(pctx, deviceId),
|
|
5952
6069
|
resolveNativeCapOwnerSync: (capName, deviceId) => resolveNativeCapOwnerSync(pctx, capName, deviceId),
|
|
5953
6070
|
allocateDeviceId: (input) => allocateDeviceId(pctx, input),
|
|
6071
|
+
migrateDevice: (input) => migrateDevice(pctx, input),
|
|
5954
6072
|
registerDevice: (input) => registerDevice(pctx, input),
|
|
5955
6073
|
removeDevice: (input) => removeDevice(pctx, input),
|
|
5956
6074
|
persistConfig: (input) => persistConfig(pctx, input),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-
|
|
1
|
+
import { Bt as DeviceType, H as deviceManagerCapability, J as enumerateSchemaFields, Nt as errMsg, P as buildStreamParamsConfigSchema, Pt as BaseAddon, Qt as isDeviceConfigCap, Rt as DeviceFeature, U as deviceStateCapability, Ut as WELL_KNOWN_TAB_MAP, W as deviceStatusCapability, a as CAMERA_SWITCH_ORDER, an as sleep, b as STREAM_PROFILE_META, bt as runtimeStatePolicyFor, f as DeviceStatusSchema, ft as normalizeUnit, mt as parseStreamParamsFormPatch, o as CAP_NAMES_WITH_STATUS, on as EventCategory, q as enumerateItemArrayFields, t as ALL_CAPABILITY_DEFINITIONS, zt as DeviceRole } from "../../dist-B25PDvaS.mjs";
|
|
2
|
+
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-tWdiQpwa.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
|
|
@@ -3266,6 +3266,75 @@ var DeviceEventPropagator = class {
|
|
|
3266
3266
|
}
|
|
3267
3267
|
};
|
|
3268
3268
|
//#endregion
|
|
3269
|
+
//#region src/builtins/device-manager/migrate-device.ts
|
|
3270
|
+
/** A refusal that names a switch the camera does not offer, rather than one it
|
|
3271
|
+
* could not be asked about. The cap documents rejecting the former; anything
|
|
3272
|
+
* else is treated as the camera being out of reach, which is the safe reading:
|
|
3273
|
+
* it keeps the switch in `sourceStillLive` instead of quietly clearing it. */
|
|
3274
|
+
function classify(err) {
|
|
3275
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
3276
|
+
return {
|
|
3277
|
+
outcome: /does not offer|not available|unsupported/i.test(detail) ? "not-offered" : "unreachable",
|
|
3278
|
+
detail
|
|
3279
|
+
};
|
|
3280
|
+
}
|
|
3281
|
+
async function applyAll(deps, deviceId, enabled) {
|
|
3282
|
+
const out = [];
|
|
3283
|
+
for (const switchId of CAMERA_SWITCH_ORDER) try {
|
|
3284
|
+
await deps.setSwitch(deviceId, switchId, enabled);
|
|
3285
|
+
out.push({
|
|
3286
|
+
deviceId,
|
|
3287
|
+
switchId,
|
|
3288
|
+
outcome: enabled ? "on" : "off"
|
|
3289
|
+
});
|
|
3290
|
+
} catch (err) {
|
|
3291
|
+
const { outcome, detail } = classify(err);
|
|
3292
|
+
out.push({
|
|
3293
|
+
deviceId,
|
|
3294
|
+
switchId,
|
|
3295
|
+
outcome,
|
|
3296
|
+
detail
|
|
3297
|
+
});
|
|
3298
|
+
deps.log("camera switch refused", {
|
|
3299
|
+
deviceId,
|
|
3300
|
+
switchId,
|
|
3301
|
+
enabled,
|
|
3302
|
+
outcome,
|
|
3303
|
+
detail
|
|
3304
|
+
});
|
|
3305
|
+
}
|
|
3306
|
+
return out;
|
|
3307
|
+
}
|
|
3308
|
+
/**
|
|
3309
|
+
* Put both cameras to sleep, exchange their identities, wake the target.
|
|
3310
|
+
*
|
|
3311
|
+
* Throws only if the swap itself fails — a switch that could not be written is
|
|
3312
|
+
* reported, not raised, because refusing to migrate a camera whose old hardware
|
|
3313
|
+
* is unreachable would refuse the exact case this exists for.
|
|
3314
|
+
*/
|
|
3315
|
+
async function migrateDevice$1(deps, input) {
|
|
3316
|
+
const { sourceId, targetId } = input;
|
|
3317
|
+
if (sourceId === targetId) throw new Error(`[device-manager] migrateDevice: ${sourceId} is both source and target`);
|
|
3318
|
+
const down = [...await applyAll(deps, sourceId, false), ...await applyAll(deps, targetId, false)];
|
|
3319
|
+
const sourceStillLive = down.filter((r) => r.deviceId === sourceId && r.outcome === "unreachable").map((r) => r.switchId);
|
|
3320
|
+
await deps.swapIds(sourceId, targetId);
|
|
3321
|
+
const up = await applyAll(deps, sourceId, true);
|
|
3322
|
+
await deps.respawnRunners([sourceId, targetId]);
|
|
3323
|
+
deps.log("camera migrated", {
|
|
3324
|
+
sourceId,
|
|
3325
|
+
targetId,
|
|
3326
|
+
sourceStillLive,
|
|
3327
|
+
refusals: [...down, ...up].filter((r) => r.outcome === "unreachable").length
|
|
3328
|
+
});
|
|
3329
|
+
return {
|
|
3330
|
+
sourceId,
|
|
3331
|
+
targetId,
|
|
3332
|
+
switches: [...down, ...up],
|
|
3333
|
+
sourceStillLive,
|
|
3334
|
+
swapped: true
|
|
3335
|
+
};
|
|
3336
|
+
}
|
|
3337
|
+
//#endregion
|
|
3269
3338
|
//#region src/builtins/device-manager/device-meta-actions.ts
|
|
3270
3339
|
/**
|
|
3271
3340
|
* Device meta-mutation + persistence actions for the device-manager addon —
|
|
@@ -3339,6 +3408,54 @@ async function allocateDeviceId(pctx, input) {
|
|
|
3339
3408
|
return { id };
|
|
3340
3409
|
});
|
|
3341
3410
|
}
|
|
3411
|
+
/**
|
|
3412
|
+
* Replace a camera: the new hardware inherits the number the system knows.
|
|
3413
|
+
*
|
|
3414
|
+
* The composition lives in `migrate-device.ts`, deliberately free of this
|
|
3415
|
+
* file's context so the decisions it carries — above all "never report a switch
|
|
3416
|
+
* as off when it could not be written" — are testable without a hub. This is
|
|
3417
|
+
* the wiring: the four real dependencies, and the write lock.
|
|
3418
|
+
*
|
|
3419
|
+
* The temp id comes from `allocateNextDeviceId`, the monotonic counter, so the
|
|
3420
|
+
* value a crash could park a row on was never used and will never be reused.
|
|
3421
|
+
* `swapIds` therefore runs INSIDE the same lock the id was allocated under.
|
|
3422
|
+
*/
|
|
3423
|
+
async function migrateDevice(pctx, input) {
|
|
3424
|
+
const { sourceId, targetId } = input;
|
|
3425
|
+
const ctx = pctx.host.ctx;
|
|
3426
|
+
return await pctx.metaStore.withMetaWriteLock(async () => {
|
|
3427
|
+
const tempId = await pctx.metaStore.allocateNextDeviceId();
|
|
3428
|
+
return await migrateDevice$1({
|
|
3429
|
+
setSwitch: async (deviceId, switchId, enabled) => {
|
|
3430
|
+
await ctx.api.pipelineOrchestrator.setCameraSwitch.mutate({
|
|
3431
|
+
deviceId,
|
|
3432
|
+
switchId,
|
|
3433
|
+
enabled
|
|
3434
|
+
});
|
|
3435
|
+
},
|
|
3436
|
+
swapIds: async (a, b) => {
|
|
3437
|
+
await pctx.metaStore.rows.swapIds(a, b, tempId);
|
|
3438
|
+
},
|
|
3439
|
+
respawnRunners: async (deviceIds) => {
|
|
3440
|
+
const owners = /* @__PURE__ */ new Set();
|
|
3441
|
+
for (const deviceId of deviceIds) {
|
|
3442
|
+
const addonId = pctx.metaStore.idToAddonId.get(deviceId);
|
|
3443
|
+
if (addonId !== void 0) owners.add(addonId);
|
|
3444
|
+
}
|
|
3445
|
+
for (const addonId of owners) await ctx.api.addons.restartAddon.mutate({ addonId });
|
|
3446
|
+
},
|
|
3447
|
+
log: (message, meta) => {
|
|
3448
|
+
ctx.logger.info(message, {
|
|
3449
|
+
tags: { deviceId: sourceId },
|
|
3450
|
+
meta
|
|
3451
|
+
});
|
|
3452
|
+
}
|
|
3453
|
+
}, {
|
|
3454
|
+
sourceId,
|
|
3455
|
+
targetId
|
|
3456
|
+
});
|
|
3457
|
+
});
|
|
3458
|
+
}
|
|
3342
3459
|
async function registerDevice(pctx, input) {
|
|
3343
3460
|
const { addonId, stableId, id, type, name, parentDeviceId, features, config } = input;
|
|
3344
3461
|
const featuresArr = Array.isArray(features) ? [...features] : [];
|
|
@@ -5946,6 +6063,7 @@ var DeviceManagerAddon = class extends BaseAddon {
|
|
|
5946
6063
|
resolveDeviceOwnerSync: (deviceId) => resolveDeviceOwnerSync(pctx, deviceId),
|
|
5947
6064
|
resolveNativeCapOwnerSync: (capName, deviceId) => resolveNativeCapOwnerSync(pctx, capName, deviceId),
|
|
5948
6065
|
allocateDeviceId: (input) => allocateDeviceId(pctx, input),
|
|
6066
|
+
migrateDevice: (input) => migrateDevice(pctx, input),
|
|
5949
6067
|
registerDevice: (input) => registerDevice(pctx, input),
|
|
5950
6068
|
removeDevice: (input) => removeDevice(pctx, input),
|
|
5951
6069
|
persistConfig: (input) => persistConfig(pctx, input),
|
|
@@ -13,6 +13,19 @@ type IDeviceManagerProvider = InferProvider<typeof deviceManagerCapability>;
|
|
|
13
13
|
*/
|
|
14
14
|
export declare function stampIntegrationId(metaStore: DeviceMetaStore, ctx: AddonContext, deviceId: number, integrationId: string): Promise<void>;
|
|
15
15
|
export declare function allocateDeviceId(pctx: ProviderContext, input: Parameters<IDeviceManagerProvider['allocateDeviceId']>[0]): ReturnType<IDeviceManagerProvider['allocateDeviceId']>;
|
|
16
|
+
/**
|
|
17
|
+
* Replace a camera: the new hardware inherits the number the system knows.
|
|
18
|
+
*
|
|
19
|
+
* The composition lives in `migrate-device.ts`, deliberately free of this
|
|
20
|
+
* file's context so the decisions it carries — above all "never report a switch
|
|
21
|
+
* as off when it could not be written" — are testable without a hub. This is
|
|
22
|
+
* the wiring: the four real dependencies, and the write lock.
|
|
23
|
+
*
|
|
24
|
+
* The temp id comes from `allocateNextDeviceId`, the monotonic counter, so the
|
|
25
|
+
* value a crash could park a row on was never used and will never be reused.
|
|
26
|
+
* `swapIds` therefore runs INSIDE the same lock the id was allocated under.
|
|
27
|
+
*/
|
|
28
|
+
export declare function migrateDevice(pctx: ProviderContext, input: Parameters<IDeviceManagerProvider['migrateDevice']>[0]): ReturnType<IDeviceManagerProvider['migrateDevice']>;
|
|
16
29
|
export declare function registerDevice(pctx: ProviderContext, input: Parameters<IDeviceManagerProvider['registerDevice']>[0]): ReturnType<IDeviceManagerProvider['registerDevice']>;
|
|
17
30
|
export declare function removeDevice(pctx: ProviderContext, input: Parameters<IDeviceManagerProvider['removeDevice']>[0]): ReturnType<IDeviceManagerProvider['removeDevice']>;
|
|
18
31
|
export declare function persistConfig(pctx: ProviderContext, input: Parameters<IDeviceManagerProvider['persistConfig']>[0]): ReturnType<IDeviceManagerProvider['persistConfig']>;
|
|
@@ -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-BzPNEPHo.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 {
|
|
1
|
+
import { Bt as DeviceType, G as doorbellCapability, M as bareAddonId, Nt as errMsg, Pt as BaseAddon, Y as evaluateSensorEdge, _ as SOURCE_CAPS, nt as isSameAddonId, on as EventCategory, qt as createEvent, rt as isSourceCap, v as SOURCE_DEVICE_TYPES } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { Pt as BaseAddon, ct as logDestinationCapability } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { Nt as errMsg, Pt as BaseAddon, on as EventCategory, qt as createEvent } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
2
|
+
import { A as authProviderCapability, At as userManagementCapability, Pt as BaseAddon, T as UserRecordSchema, r as ApiKeyRecordSchema, x as ScopedTokenSchema } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { Pt as BaseAddon, on as EventCategory, st as localNetworkCapability } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { Pt as BaseAddon, ct as logDestinationCapability } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { Nt as errMsg, Pt as BaseAddon, Q as foldSnapshotByFunction, _t as reducePoints, dt as metricsProviderCapability, on as EventCategory, qt as createEvent, vt as resolveBucketMs } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
2
|
+
import { Ct as scoreRuntimes, K as enumerateInferenceDevices, Nt as errMsg, Pt as BaseAddon, Yt as emitReadiness, ht as platformProbeCapability, on as EventCategory } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { Pt as BaseAddon, on as EventCategory } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { $t as nodePin, Bt as DeviceType, M as bareAddonId, N as batteryCapability, Nt as errMsg, Pt as BaseAddon, Rt as DeviceFeature, Tt as snapshotCapability, V as deriveBatteryPresence, i as BatteryStatusSchema, kt as streamQualityLabel, on as EventCategory } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { Ot as storageProviderCapability, Pt as BaseAddon, Z as filesystemBrowseCapability } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { C as StorageLocationTypeSchema, Dt as storageMigrationCapability, Et as storageCapability, F as collectSecretConfigKeys, Pt as BaseAddon, S as StorageCleanupJobSchema, en as parseJsonObject, h as REDACTED_SECRET, w as StorageMigrationJobSchema, wt as settingsStoreCapability } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { Nt as errMsg, Pt as BaseAddon, Zt as hydrateSchema } from "../../dist-B25PDvaS.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-BzPNEPHo.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 {
|
|
1
|
+
import { Pt as BaseAddon, ct as logDestinationCapability } from "../../dist-B25PDvaS.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";
|
|
@@ -3619,6 +3619,32 @@ var CameraSwitchIdSchema = z.enum([
|
|
|
3619
3619
|
"notifications"
|
|
3620
3620
|
]);
|
|
3621
3621
|
/**
|
|
3622
|
+
* Stable render order — broadest blast radius first, and a source before the
|
|
3623
|
+
* thing that consumes it. `device-audio` sits ABOVE `audio-analysis` because
|
|
3624
|
+
* turning the microphone off leaves the analyzer with nothing to analyse; the
|
|
3625
|
+
* reverse is not true.
|
|
3626
|
+
*
|
|
3627
|
+
* `privacy-mask` sits directly ABOVE `device-audio` because they are literal
|
|
3628
|
+
* siblings — one cap, one device plane, video then audio — and NOT above
|
|
3629
|
+
* `object-detection` despite feeding it: a mask blanks REGIONS, so its blast
|
|
3630
|
+
* radius is partial, and the "broadest first" rule does not rank a partial
|
|
3631
|
+
* control above a whole-function one.
|
|
3632
|
+
*
|
|
3633
|
+
* `broker-audio` sits directly BELOW `device-audio` by the same source-first
|
|
3634
|
+
* rule: the camera's microphone feeds the broker, so silencing the camera
|
|
3635
|
+
* leaves the broker's mute with nothing to suppress; the reverse is not true.
|
|
3636
|
+
*/
|
|
3637
|
+
var CAMERA_SWITCH_ORDER = [
|
|
3638
|
+
"stream-broker",
|
|
3639
|
+
"object-detection",
|
|
3640
|
+
"privacy-mask",
|
|
3641
|
+
"device-audio",
|
|
3642
|
+
"broker-audio",
|
|
3643
|
+
"audio-analysis",
|
|
3644
|
+
"recording",
|
|
3645
|
+
"notifications"
|
|
3646
|
+
];
|
|
3647
|
+
/**
|
|
3622
3648
|
* WHERE the switch's state actually lives. A discriminated union rather than a
|
|
3623
3649
|
* string so both the writer (the orchestrator's `setCameraSwitch`) and any
|
|
3624
3650
|
* reader can exhaustively narrow — and so "the group added a parallel map" is
|
|
@@ -3892,7 +3918,8 @@ var OpsLogReasonSchema = z.enum([
|
|
|
3892
3918
|
"quota",
|
|
3893
3919
|
"manual",
|
|
3894
3920
|
"operator",
|
|
3895
|
-
"maintenance"
|
|
3921
|
+
"maintenance",
|
|
3922
|
+
"orphaned-device"
|
|
3896
3923
|
]);
|
|
3897
3924
|
/** One audit row, shared verbatim by both domains. */
|
|
3898
3925
|
var OpsLogEntrySchema = z.object({
|
|
@@ -10605,6 +10632,29 @@ var DevicePersistConfigPayloadSchema = z.object({
|
|
|
10605
10632
|
deviceId: z.number(),
|
|
10606
10633
|
data: z.record(z.string(), z.unknown())
|
|
10607
10634
|
});
|
|
10635
|
+
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
10636
|
+
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
10637
|
+
var MigrateSwitchOutcomeSchema = z.enum([
|
|
10638
|
+
"off",
|
|
10639
|
+
"on",
|
|
10640
|
+
"not-offered",
|
|
10641
|
+
"unreachable"
|
|
10642
|
+
]);
|
|
10643
|
+
var MigrateSwitchReportSchema = z.object({
|
|
10644
|
+
deviceId: z.number(),
|
|
10645
|
+
switchId: CameraSwitchIdSchema,
|
|
10646
|
+
outcome: MigrateSwitchOutcomeSchema,
|
|
10647
|
+
detail: z.string().optional()
|
|
10648
|
+
});
|
|
10649
|
+
var MigrateDeviceResultSchema = z.object({
|
|
10650
|
+
sourceId: z.number(),
|
|
10651
|
+
targetId: z.number(),
|
|
10652
|
+
switches: z.array(MigrateSwitchReportSchema).readonly(),
|
|
10653
|
+
/** Switches that could NOT be turned off on the source. Empty is the only
|
|
10654
|
+
* value meaning the replaced hardware is quiet. */
|
|
10655
|
+
sourceStillLive: z.array(CameraSwitchIdSchema).readonly(),
|
|
10656
|
+
swapped: z.boolean()
|
|
10657
|
+
});
|
|
10608
10658
|
var deviceManagerCapability = {
|
|
10609
10659
|
name: "device-manager",
|
|
10610
10660
|
scope: "system",
|
|
@@ -10619,6 +10669,33 @@ var deviceManagerCapability = {
|
|
|
10619
10669
|
addonId: z.string(),
|
|
10620
10670
|
stableId: z.string()
|
|
10621
10671
|
}), z.object({ id: z.number() }), { kind: "mutation" }),
|
|
10672
|
+
/**
|
|
10673
|
+
* Replace a camera: the new hardware inherits the number the system knows.
|
|
10674
|
+
*
|
|
10675
|
+
* Everything general about a camera is keyed on the numeric id and nothing
|
|
10676
|
+
* else — the recording path on disk, the hour ledger, the media store, zone
|
|
10677
|
+
* ownership, and all four ecosystem exports. So a replacement moves the
|
|
10678
|
+
* NUMBER rather than the work, and the operator keeps their footage, their
|
|
10679
|
+
* rules and their integrations.
|
|
10680
|
+
*
|
|
10681
|
+
* Both cameras are switched off first, then the identities are exchanged
|
|
10682
|
+
* (children follow their parent), then the target — now answering on the
|
|
10683
|
+
* inherited number — is switched back on.
|
|
10684
|
+
*
|
|
10685
|
+
* **A switch that could not be written is REPORTED, not swallowed.** The
|
|
10686
|
+
* source is characteristically broken, and two of the eight switches write
|
|
10687
|
+
* the camera itself, so on a dead one they cannot be written at all.
|
|
10688
|
+
* `sourceStillLive` names what stayed live; empty is the only value that
|
|
10689
|
+
* means the old hardware is quiet. The migration proceeds either way —
|
|
10690
|
+
* refusing would refuse the case this exists for.
|
|
10691
|
+
*/
|
|
10692
|
+
migrateDevice: method(z.object({
|
|
10693
|
+
sourceId: z.number(),
|
|
10694
|
+
targetId: z.number()
|
|
10695
|
+
}), MigrateDeviceResultSchema, {
|
|
10696
|
+
kind: "mutation",
|
|
10697
|
+
auth: "admin"
|
|
10698
|
+
}),
|
|
10622
10699
|
/** Register a device in the DB + in-memory registry. Called by DeviceManagerApi.register(). */
|
|
10623
10700
|
registerDevice: method(DeviceRegisterPayloadSchema, z.void(), { kind: "mutation" }),
|
|
10624
10701
|
/** Remove a device from the DB + in-memory registry. Called by DeviceManagerApi.remove(). */
|
|
@@ -35679,6 +35756,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
35679
35756
|
addonId: null,
|
|
35680
35757
|
access: "view"
|
|
35681
35758
|
},
|
|
35759
|
+
"deviceManager.migrateDevice": {
|
|
35760
|
+
capName: "device-manager",
|
|
35761
|
+
capScope: "system",
|
|
35762
|
+
addonId: null,
|
|
35763
|
+
access: "create"
|
|
35764
|
+
},
|
|
35682
35765
|
"deviceManager.persistConfig": {
|
|
35683
35766
|
capName: "device-manager",
|
|
35684
35767
|
capScope: "system",
|
|
@@ -42964,4 +43047,4 @@ function enumerateInferenceDevices(hw) {
|
|
|
42964
43047
|
return out;
|
|
42965
43048
|
}
|
|
42966
43049
|
//#endregion
|
|
42967
|
-
export {
|
|
43050
|
+
export { isArrayOutputSchema as $, nodePin as $t, authProviderCapability as A, userManagementCapability as At, decodeVectorBase64 as B, DeviceType as Bt, StorageLocationTypeSchema as C, scoreRuntimes as Ct, addonSettingsCapability as D, storageMigrationCapability as Dt, addonPagesCapability as E, storageCapability as Et, collectSecretConfigKeys as F, DATAPLANE_SECRET_HEADER as Ft, doorbellCapability as G, asNumber as Gt, deviceManagerCapability as H, ReadinessTimeoutError as Ht, coreBlockAddonId as I, DEVICE_SETTINGS_CONTRIBUTION_METHODS as It, enumerateSchemaFields as J, emitDownForOwnedCaps as Jt, enumerateInferenceDevices as K, asString as Kt, coreBlockIdFromAddonId as L, DEVICE_STATUS_METHOD as Lt, bareAddonId as M, vectorStoreCapability as Mt, batteryCapability as N, errMsg as Nt, addonWidgetsCapability as O, storageProviderCapability as Ot, buildStreamParamsConfigSchema as P, BaseAddon as Pt, foldSnapshotByFunction as Q, isDeviceConfigCap as Qt, coreBlocksCapability as R, DeviceFeature as Rt, StorageCleanupJobSchema as S, scopesAllowDeviceCap as St, UserRecordSchema as T, snapshotCapability as Tt, deviceStateCapability as U, WELL_KNOWN_TAB_MAP as Ut, deriveBatteryPresence as V, ReadinessRegistry as Vt, deviceStatusCapability as W, asJsonObject as Wt, extractNestedAddonId as X, expandCapMethods as Xt, evaluateSensorEdge as Y, emitReadiness as Yt, filesystemBrowseCapability as Z, hydrateSchema as Zt, SOURCE_CAPS as _, reducePoints as _t, CAMERA_SWITCH_ORDER as a, sleep as an, kebabToCamel as at, STREAM_PROFILE_META as b, runtimeStatePolicyFor as bt, CORE_BLOCK_ADDON_PREFIX as c, logDestinationCapability as ct, DeclaredDevices as d, metricsProviderCapability as dt, parseJsonObject as en, isCollectionArrayMethod as et, DeviceStatusSchema as f, normalizeUnit as ft, RUNTIME_DEFAULTS as g, procedureAuthKey as gt, REDACTED_SECRET as h, platformProbeCapability as ht, BatteryStatusSchema as i, scopeKey as in, isVoidInput as it, backupCapability as j, vectorDimFromBase64 as jt, alertsCapability as k, streamQualityLabel as kt, CoreBlockSchema as l, logLevelAtMost as lt, METHOD_ACCESS_MAP as m, parseStreamParamsFormPatch as mt, AlertSchema as n, readinessKey as nn, isSameAddonId as nt, CAP_NAMES_WITH_STATUS as o, EventCategory as on, lifecycleJobSchema as ot, LOG_LEVEL_RANK as p, objectInputDeclaresAddonId as pt, enumerateItemArrayFields as q, createEvent as qt, ApiKeyRecordSchema as r, resolveCapMount as rn, isSourceCap as rt, CORE_BLOCKS_ADDON_ID as s, localNetworkCapability as st, ALL_CAPABILITY_DEFINITIONS as t, parseJsonUnknown as tn, isObjectInput as tt, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as u, looseSchema as ut, SOURCE_DEVICE_TYPES as v, resolveBucketMs as vt, StorageMigrationJobSchema as w, settingsStoreCapability as wt, ScopedTokenSchema as x, scopesAllowAddon as xt, STORAGE_ACCESS_FALLBACK as y, resolveMethodAuth as yt, dataStoreProviderCapability as z, DeviceRole as zt };
|
|
@@ -3619,6 +3619,32 @@ var CameraSwitchIdSchema = zod.z.enum([
|
|
|
3619
3619
|
"notifications"
|
|
3620
3620
|
]);
|
|
3621
3621
|
/**
|
|
3622
|
+
* Stable render order — broadest blast radius first, and a source before the
|
|
3623
|
+
* thing that consumes it. `device-audio` sits ABOVE `audio-analysis` because
|
|
3624
|
+
* turning the microphone off leaves the analyzer with nothing to analyse; the
|
|
3625
|
+
* reverse is not true.
|
|
3626
|
+
*
|
|
3627
|
+
* `privacy-mask` sits directly ABOVE `device-audio` because they are literal
|
|
3628
|
+
* siblings — one cap, one device plane, video then audio — and NOT above
|
|
3629
|
+
* `object-detection` despite feeding it: a mask blanks REGIONS, so its blast
|
|
3630
|
+
* radius is partial, and the "broadest first" rule does not rank a partial
|
|
3631
|
+
* control above a whole-function one.
|
|
3632
|
+
*
|
|
3633
|
+
* `broker-audio` sits directly BELOW `device-audio` by the same source-first
|
|
3634
|
+
* rule: the camera's microphone feeds the broker, so silencing the camera
|
|
3635
|
+
* leaves the broker's mute with nothing to suppress; the reverse is not true.
|
|
3636
|
+
*/
|
|
3637
|
+
var CAMERA_SWITCH_ORDER = [
|
|
3638
|
+
"stream-broker",
|
|
3639
|
+
"object-detection",
|
|
3640
|
+
"privacy-mask",
|
|
3641
|
+
"device-audio",
|
|
3642
|
+
"broker-audio",
|
|
3643
|
+
"audio-analysis",
|
|
3644
|
+
"recording",
|
|
3645
|
+
"notifications"
|
|
3646
|
+
];
|
|
3647
|
+
/**
|
|
3622
3648
|
* WHERE the switch's state actually lives. A discriminated union rather than a
|
|
3623
3649
|
* string so both the writer (the orchestrator's `setCameraSwitch`) and any
|
|
3624
3650
|
* reader can exhaustively narrow — and so "the group added a parallel map" is
|
|
@@ -3892,7 +3918,8 @@ var OpsLogReasonSchema = zod.z.enum([
|
|
|
3892
3918
|
"quota",
|
|
3893
3919
|
"manual",
|
|
3894
3920
|
"operator",
|
|
3895
|
-
"maintenance"
|
|
3921
|
+
"maintenance",
|
|
3922
|
+
"orphaned-device"
|
|
3896
3923
|
]);
|
|
3897
3924
|
/** One audit row, shared verbatim by both domains. */
|
|
3898
3925
|
var OpsLogEntrySchema = zod.z.object({
|
|
@@ -10605,6 +10632,29 @@ var DevicePersistConfigPayloadSchema = zod.z.object({
|
|
|
10605
10632
|
deviceId: zod.z.number(),
|
|
10606
10633
|
data: zod.z.record(zod.z.string(), zod.z.unknown())
|
|
10607
10634
|
});
|
|
10635
|
+
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
10636
|
+
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
10637
|
+
var MigrateSwitchOutcomeSchema = zod.z.enum([
|
|
10638
|
+
"off",
|
|
10639
|
+
"on",
|
|
10640
|
+
"not-offered",
|
|
10641
|
+
"unreachable"
|
|
10642
|
+
]);
|
|
10643
|
+
var MigrateSwitchReportSchema = zod.z.object({
|
|
10644
|
+
deviceId: zod.z.number(),
|
|
10645
|
+
switchId: CameraSwitchIdSchema,
|
|
10646
|
+
outcome: MigrateSwitchOutcomeSchema,
|
|
10647
|
+
detail: zod.z.string().optional()
|
|
10648
|
+
});
|
|
10649
|
+
var MigrateDeviceResultSchema = zod.z.object({
|
|
10650
|
+
sourceId: zod.z.number(),
|
|
10651
|
+
targetId: zod.z.number(),
|
|
10652
|
+
switches: zod.z.array(MigrateSwitchReportSchema).readonly(),
|
|
10653
|
+
/** Switches that could NOT be turned off on the source. Empty is the only
|
|
10654
|
+
* value meaning the replaced hardware is quiet. */
|
|
10655
|
+
sourceStillLive: zod.z.array(CameraSwitchIdSchema).readonly(),
|
|
10656
|
+
swapped: zod.z.boolean()
|
|
10657
|
+
});
|
|
10608
10658
|
var deviceManagerCapability = {
|
|
10609
10659
|
name: "device-manager",
|
|
10610
10660
|
scope: "system",
|
|
@@ -10619,6 +10669,33 @@ var deviceManagerCapability = {
|
|
|
10619
10669
|
addonId: zod.z.string(),
|
|
10620
10670
|
stableId: zod.z.string()
|
|
10621
10671
|
}), zod.z.object({ id: zod.z.number() }), { kind: "mutation" }),
|
|
10672
|
+
/**
|
|
10673
|
+
* Replace a camera: the new hardware inherits the number the system knows.
|
|
10674
|
+
*
|
|
10675
|
+
* Everything general about a camera is keyed on the numeric id and nothing
|
|
10676
|
+
* else — the recording path on disk, the hour ledger, the media store, zone
|
|
10677
|
+
* ownership, and all four ecosystem exports. So a replacement moves the
|
|
10678
|
+
* NUMBER rather than the work, and the operator keeps their footage, their
|
|
10679
|
+
* rules and their integrations.
|
|
10680
|
+
*
|
|
10681
|
+
* Both cameras are switched off first, then the identities are exchanged
|
|
10682
|
+
* (children follow their parent), then the target — now answering on the
|
|
10683
|
+
* inherited number — is switched back on.
|
|
10684
|
+
*
|
|
10685
|
+
* **A switch that could not be written is REPORTED, not swallowed.** The
|
|
10686
|
+
* source is characteristically broken, and two of the eight switches write
|
|
10687
|
+
* the camera itself, so on a dead one they cannot be written at all.
|
|
10688
|
+
* `sourceStillLive` names what stayed live; empty is the only value that
|
|
10689
|
+
* means the old hardware is quiet. The migration proceeds either way —
|
|
10690
|
+
* refusing would refuse the case this exists for.
|
|
10691
|
+
*/
|
|
10692
|
+
migrateDevice: method(zod.z.object({
|
|
10693
|
+
sourceId: zod.z.number(),
|
|
10694
|
+
targetId: zod.z.number()
|
|
10695
|
+
}), MigrateDeviceResultSchema, {
|
|
10696
|
+
kind: "mutation",
|
|
10697
|
+
auth: "admin"
|
|
10698
|
+
}),
|
|
10622
10699
|
/** Register a device in the DB + in-memory registry. Called by DeviceManagerApi.register(). */
|
|
10623
10700
|
registerDevice: method(DeviceRegisterPayloadSchema, zod.z.void(), { kind: "mutation" }),
|
|
10624
10701
|
/** Remove a device from the DB + in-memory registry. Called by DeviceManagerApi.remove(). */
|
|
@@ -35679,6 +35756,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
35679
35756
|
addonId: null,
|
|
35680
35757
|
access: "view"
|
|
35681
35758
|
},
|
|
35759
|
+
"deviceManager.migrateDevice": {
|
|
35760
|
+
capName: "device-manager",
|
|
35761
|
+
capScope: "system",
|
|
35762
|
+
addonId: null,
|
|
35763
|
+
access: "create"
|
|
35764
|
+
},
|
|
35682
35765
|
"deviceManager.persistConfig": {
|
|
35683
35766
|
capName: "device-manager",
|
|
35684
35767
|
capScope: "system",
|
|
@@ -42994,6 +43077,12 @@ Object.defineProperty(exports, "BatteryStatusSchema", {
|
|
|
42994
43077
|
return BatteryStatusSchema;
|
|
42995
43078
|
}
|
|
42996
43079
|
});
|
|
43080
|
+
Object.defineProperty(exports, "CAMERA_SWITCH_ORDER", {
|
|
43081
|
+
enumerable: true,
|
|
43082
|
+
get: function() {
|
|
43083
|
+
return CAMERA_SWITCH_ORDER;
|
|
43084
|
+
}
|
|
43085
|
+
});
|
|
42997
43086
|
Object.defineProperty(exports, "CAP_NAMES_WITH_STATUS", {
|
|
42998
43087
|
enumerable: true,
|
|
42999
43088
|
get: function() {
|
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-BzPNEPHo.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-B0mzJPmb.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
|
|
2
|
+
import { $ as isArrayOutputSchema, D as addonSettingsCapability, Ft as DATAPLANE_SECRET_HEADER$1, Gt as asNumber, Ht as ReadinessTimeoutError, It as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Jt as emitDownForOwnedCaps, Kt as asString$1, Lt as DEVICE_STATUS_METHOD, Nt as errMsg$1, St as scopesAllowDeviceCap, Vt as ReadinessRegistry, Wt as asJsonObject$1, X as extractNestedAddonId, Xt as expandCapMethods, at as kebabToCamel, en as parseJsonObject, et as isCollectionArrayMethod, g as RUNTIME_DEFAULTS, gt as procedureAuthKey, in as scopeKey, it as isVoidInput, lt as logLevelAtMost, m as METHOD_ACCESS_MAP, nn as readinessKey, on as EventCategory$1, ot as lifecycleJobSchema, p as LOG_LEVEL_RANK, pt as objectInputDeclaresAddonId, qt as createEvent, rn as resolveCapMount, t as ALL_CAPABILITY_DEFINITIONS, tn as parseJsonUnknown, tt as isObjectInput, ut as looseSchema, xt as scopesAllowAddon, yt as resolveMethodAuth } from "./dist-B25PDvaS.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 emitHeapDiagnosticReport, 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 RUNNER_HEAP_SNAPSHOT_ENV, 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 EVENT_PLANE_TOP_N, _t as CapabilityUnavailableError, a as createUdsAddonContext, an as EMPTY_SOCKET_PLANE_BASELINE, at as createAddonService, b as brokerCallForCap, bn as diffEventPlane, bt as resolveAddonClass, c as getOrInitReadinessRegistryForClient, cn as createSocketPlaneReader, ct as capActionName, d as clusterEventTopic, dn as EMPTY_SOCKET_DIRECTION, dt as capServiceName, en as formatHeapSpaces, et as createBrokerDeviceManagerApi, f as getBrokerEventBus, fn as createSocketDirectionCounters, ft as parseCapAction, g as subscribePassthrough, gn as socketDirectionMessages, gt as CapabilityHandle, h as setNodeEventInterest, hn as socketDirectionBytes, ht as DeviceRegistry, i as createAddonContext, in as selectReportedSpaces, j as LocalChildClient, jt as HUB_RSS_BUDGET_ENV, k as createUdsLogger, kt as HUB_MAIN_HEAP_WATCH_LABEL, l as setHubConnected, ln as diffSocketPlane, lt as capActionSuffix, m as registerEventBusService, mn as sampleSocketDirection, mt as serializeTypedArrays, n as installManifestPythonDeps, nn as heapSpaceField, o as getWorkerDeviceRegistry, on as SOCKET_PLANE_TOP_N, ot as validateProviderRegistrations, p as getMoleculerEventStats, pn as recordSocketFrame, pt as deserializeTypedArrays, q as UdsLocalTransportServer, qt as startHeapWatch, r as adaptBrokerToCluster, rn as readHeapSpaces, rt as mountNativeCapService, s as getOrInitReadinessRegistry, sn as createSocketPlaneMeter, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestSystemDeps, tn as heapSnapshotAuthorised, u as EVENT_TOPIC_PREFIX, un as formatSocketPlane, ut as capBareAction, v as createKernelHwAccel, vn as createEventPlaneMeter, vt as copyBundledNativeModules, w as localProviderLink, wt as HEAP_RECLAIM_MIN_INTERVAL_MS, x as brokerTransportLink, xn as formatEventPlane, xt as resolveNpmInvocation, y as resolveHwAccel, yn as createEventPlaneReader, yt as installManifestNativeDeps, z as callWithServiceDiscovery, zt as createLoopDelayMeter } from "./manifest-system-deps-
|
|
29
|
+
import { $ as buildUdsNativeCapProxy, $t as emitHeapDiagnosticReport, 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 RUNNER_HEAP_SNAPSHOT_ENV, 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 EVENT_PLANE_TOP_N, _t as CapabilityUnavailableError, a as createUdsAddonContext, an as EMPTY_SOCKET_PLANE_BASELINE, at as createAddonService, b as brokerCallForCap, bn as diffEventPlane, bt as resolveAddonClass, c as getOrInitReadinessRegistryForClient, cn as createSocketPlaneReader, ct as capActionName, d as clusterEventTopic, dn as EMPTY_SOCKET_DIRECTION, dt as capServiceName, en as formatHeapSpaces, et as createBrokerDeviceManagerApi, f as getBrokerEventBus, fn as createSocketDirectionCounters, ft as parseCapAction, g as subscribePassthrough, gn as socketDirectionMessages, gt as CapabilityHandle, h as setNodeEventInterest, hn as socketDirectionBytes, ht as DeviceRegistry, i as createAddonContext, in as selectReportedSpaces, j as LocalChildClient, jt as HUB_RSS_BUDGET_ENV, k as createUdsLogger, kt as HUB_MAIN_HEAP_WATCH_LABEL, l as setHubConnected, ln as diffSocketPlane, lt as capActionSuffix, m as registerEventBusService, mn as sampleSocketDirection, mt as serializeTypedArrays, n as installManifestPythonDeps, nn as heapSpaceField, o as getWorkerDeviceRegistry, on as SOCKET_PLANE_TOP_N, ot as validateProviderRegistrations, p as getMoleculerEventStats, pn as recordSocketFrame, pt as deserializeTypedArrays, q as UdsLocalTransportServer, qt as startHeapWatch, r as adaptBrokerToCluster, rn as readHeapSpaces, rt as mountNativeCapService, s as getOrInitReadinessRegistry, sn as createSocketPlaneMeter, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestSystemDeps, tn as heapSnapshotAuthorised, u as EVENT_TOPIC_PREFIX, un as formatSocketPlane, ut as capBareAction, v as createKernelHwAccel, vn as createEventPlaneMeter, vt as copyBundledNativeModules, w as localProviderLink, wt as HEAP_RECLAIM_MIN_INTERVAL_MS, x as brokerTransportLink, xn as formatEventPlane, xt as resolveNpmInvocation, y as resolveHwAccel, yn as createEventPlaneReader, yt as installManifestNativeDeps, z as callWithServiceDiscovery, zt as createLoopDelayMeter } from "./manifest-system-deps-Pw8iaY5X.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";
|