@camstack/system 1.2.195 → 1.2.197
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/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 +132 -16
- package/dist/builtins/device-manager/device-manager.addon.mjs +132 -16
- package/dist/builtins/device-manager/device-online-fallback.d.ts +35 -0
- package/dist/builtins/device-manager/device-provider-context.d.ts +6 -0
- package/dist/builtins/device-manager/removal-fence.d.ts +58 -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-Qnc3kuba.js → dist-BNaW68aZ.js} +124 -2
- package/dist/{dist-Cr3ChLtE.mjs → dist-DWnHJI2T.mjs} +124 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{retired-settings-keys-C_h6HXZi.js → retired-settings-keys-FwgzdSHJ.js} +1 -1
- package/dist/{retired-settings-keys-BG6g74f1.mjs → retired-settings-keys-cjLVvYV0.mjs} +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A removed device stays removed.
|
|
3
|
+
*
|
|
4
|
+
* `removeDevice` deletes the row and clears the device's config store, but
|
|
5
|
+
* NOTHING stopped a write that was already on its way from putting the row
|
|
6
|
+
* back: `registerDevice` upserts unconditionally (`upsertRegistration` doubles
|
|
7
|
+
* as the INSERT), and `allocateDeviceId` mints a fresh row for any
|
|
8
|
+
* `(addonId, stableId)` it cannot find. A live device object whose runner had
|
|
9
|
+
* not finished tearing down — a probe retry, a reconcile, an accessory
|
|
10
|
+
* re-register — therefore resurrected the row it had just lost, with its
|
|
11
|
+
* construction-time name and type intact and its config GONE, because the
|
|
12
|
+
* config was cleared by the removal and `registerDevice` does not write config.
|
|
13
|
+
*
|
|
14
|
+
* That is exactly the shell device 614 ("Videocamera studio") was left in on
|
|
15
|
+
* 2026-09-05: row present, `config: {}`, `disabled: false`, `online: true`,
|
|
16
|
+
* failing its provider's Zod schema on `host`/`password` at every boot for a
|
|
17
|
+
* day. See D376.
|
|
18
|
+
*
|
|
19
|
+
* The fence is deliberately IN-MEMORY and short-lived. The race it closes is
|
|
20
|
+
* a teardown that is seconds wide, in the one process that owns the rows; a
|
|
21
|
+
* durable tombstone would be a second authority on "does this device exist"
|
|
22
|
+
* and this repo has been burned by those. A deliberate re-add of the same
|
|
23
|
+
* hardware (`createDevice` / `adoptDevice`) lifts the fence for that pair
|
|
24
|
+
* explicitly, so an operator is never told "no" for their own action.
|
|
25
|
+
*/
|
|
26
|
+
/** How long a removed identity refuses to be re-created. */
|
|
27
|
+
export declare const REMOVAL_FENCE_TTL_MS: number;
|
|
28
|
+
export interface RemovalFenceEntry {
|
|
29
|
+
readonly deviceId: number;
|
|
30
|
+
readonly addonId: string;
|
|
31
|
+
readonly stableId: string;
|
|
32
|
+
readonly removedAt: number;
|
|
33
|
+
}
|
|
34
|
+
export interface RemovalFence {
|
|
35
|
+
/** Record a completed removal. */
|
|
36
|
+
record(entry: Omit<RemovalFenceEntry, 'removedAt'>): void;
|
|
37
|
+
/** Is this numeric id fenced? */
|
|
38
|
+
isIdFenced(deviceId: number): RemovalFenceEntry | null;
|
|
39
|
+
/** Is this addon-facing identity fenced? */
|
|
40
|
+
isPairFenced(addonId: string, stableId: string): RemovalFenceEntry | null;
|
|
41
|
+
/** Lift the fence for one identity — an operator re-adding the device. */
|
|
42
|
+
lift(addonId: string, stableId: string): void;
|
|
43
|
+
/**
|
|
44
|
+
* Run an operator-initiated create/adopt with the fence down.
|
|
45
|
+
*
|
|
46
|
+
* `createDevice` / `adoptDevice` do not know the stableId in advance — the
|
|
47
|
+
* provider derives it from the hardware — so re-adding a camera that was
|
|
48
|
+
* just deleted cannot lift a single pair. It suspends the whole fence for
|
|
49
|
+
* the duration of the operator's own action instead, which is the one case
|
|
50
|
+
* where "this identity was removed" must not win.
|
|
51
|
+
*/
|
|
52
|
+
runUnfenced<T>(fn: () => Promise<T>): Promise<T>;
|
|
53
|
+
}
|
|
54
|
+
export interface RemovalFenceOptions {
|
|
55
|
+
readonly ttlMs?: number;
|
|
56
|
+
readonly now?: () => number;
|
|
57
|
+
}
|
|
58
|
+
export declare function createRemovalFence(options?: RemovalFenceOptions): RemovalFence;
|
|
@@ -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-BNaW68aZ.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 errMsg, Ht as DeviceType, It as BaseAddon, K as doorbellCapability, N as bareAddonId, X as evaluateSensorEdge, Yt as createEvent, cn as EventCategory, it as isSourceCap, rt as isSameAddonId, v as SOURCE_CAPS, y as SOURCE_DEVICE_TYPES } from "../../dist-
|
|
1
|
+
import { Ft as errMsg, Ht as DeviceType, It as BaseAddon, K as doorbellCapability, N as bareAddonId, X as evaluateSensorEdge, Yt as createEvent, cn as EventCategory, it as isSourceCap, rt as isSameAddonId, v as SOURCE_CAPS, y as SOURCE_DEVICE_TYPES } from "../../dist-DWnHJI2T.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-BNaW68aZ.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 { It as BaseAddon, lt as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { It as BaseAddon, lt as logDestinationCapability } from "../../dist-DWnHJI2T.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-BNaW68aZ.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 errMsg, It as BaseAddon, Yt as createEvent, _ as RecordingStatusSchema, cn as EventCategory } from "../../dist-
|
|
1
|
+
import { Ft as errMsg, It as BaseAddon, Yt as createEvent, _ as RecordingStatusSchema, cn as EventCategory } from "../../dist-DWnHJI2T.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-BNaW68aZ.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 { E as UserRecordSchema, It as BaseAddon, Mt as userManagementCapability, S as ScopedTokenSchema, j as authProviderCapability, r as ApiKeyRecordSchema } from "../../dist-
|
|
2
|
+
import { E as UserRecordSchema, It as BaseAddon, Mt as userManagementCapability, S as ScopedTokenSchema, j as authProviderCapability, r as ApiKeyRecordSchema } from "../../dist-DWnHJI2T.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-BNaW68aZ.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 { It as BaseAddon, cn as EventCategory, ct as localNetworkCapability } from "../../dist-
|
|
1
|
+
import { It as BaseAddon, cn as EventCategory, ct as localNetworkCapability } from "../../dist-DWnHJI2T.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-BNaW68aZ.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 { It as BaseAddon, lt as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { It as BaseAddon, lt as logDestinationCapability } from "../../dist-DWnHJI2T.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-BNaW68aZ.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 { $ as foldSnapshotByFunction, Ft as errMsg, It as BaseAddon, Yt as createEvent, cn as EventCategory, ft as metricsProviderCapability, vt as reducePoints, yt as resolveBucketMs } from "../../dist-
|
|
1
|
+
import { $ as foldSnapshotByFunction, Ft as errMsg, It as BaseAddon, Yt as createEvent, cn as EventCategory, ft as metricsProviderCapability, vt as reducePoints, yt as resolveBucketMs } from "../../dist-DWnHJI2T.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-BNaW68aZ.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 errMsg, It as BaseAddon, Tt as scoreRuntimes, Zt as emitReadiness, cn as EventCategory, gt as platformProbeCapability, q as enumerateInferenceDevices } from "../../dist-
|
|
2
|
+
import { Ft as errMsg, It as BaseAddon, Tt as scoreRuntimes, Zt as emitReadiness, cn as EventCategory, gt as platformProbeCapability, q as enumerateInferenceDevices } from "../../dist-DWnHJI2T.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-BNaW68aZ.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 { It as BaseAddon, cn as EventCategory } from "../../dist-
|
|
1
|
+
import { It as BaseAddon, cn as EventCategory } from "../../dist-DWnHJI2T.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-BNaW68aZ.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 { Bt as DeviceFeature, Dt as snapshotCapability, Ft as errMsg, H as deriveBatteryPresence, Ht as DeviceType, It as BaseAddon, N as bareAddonId, P as batteryCapability, cn as EventCategory, i as BatteryStatusSchema, jt as streamQualityLabel, tn as nodePin } from "../../dist-
|
|
1
|
+
import { Bt as DeviceFeature, Dt as snapshotCapability, Ft as errMsg, H as deriveBatteryPresence, Ht as DeviceType, It as BaseAddon, N as bareAddonId, P as batteryCapability, cn as EventCategory, i as BatteryStatusSchema, jt as streamQualityLabel, tn as nodePin } from "../../dist-DWnHJI2T.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-BNaW68aZ.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 { At as storageProviderCapability, It as BaseAddon, Q as filesystemBrowseCapability } from "../../dist-
|
|
1
|
+
import { At as storageProviderCapability, It as BaseAddon, Q as filesystemBrowseCapability } from "../../dist-DWnHJI2T.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-BNaW68aZ.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 StorageCleanupJobSchema, Et as settingsStoreCapability, I as collectSecretConfigKeys, It as BaseAddon, Ot as storageCapability, T as StorageMigrationJobSchema, h as REDACTED_SECRET, kt as storageMigrationCapability, nn as parseJsonObject, w as StorageLocationTypeSchema } from "../../dist-
|
|
1
|
+
import { C as StorageCleanupJobSchema, Et as settingsStoreCapability, I as collectSecretConfigKeys, It as BaseAddon, Ot as storageCapability, T as StorageMigrationJobSchema, h as REDACTED_SECRET, kt as storageMigrationCapability, nn as parseJsonObject, w as StorageLocationTypeSchema } from "../../dist-DWnHJI2T.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-BNaW68aZ.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 { $t as hydrateSchema, Ft as errMsg, It as BaseAddon } from "../../dist-
|
|
1
|
+
import { $t as hydrateSchema, Ft as errMsg, It as BaseAddon } from "../../dist-DWnHJI2T.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-BNaW68aZ.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 { It as BaseAddon, lt as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { It as BaseAddon, lt as logDestinationCapability } from "../../dist-DWnHJI2T.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";
|
|
@@ -1783,6 +1783,21 @@ var CameraStreamSchema = zod.z.object({
|
|
|
1783
1783
|
*/
|
|
1784
1784
|
autoEligible: zod.z.boolean().optional(),
|
|
1785
1785
|
/**
|
|
1786
|
+
* The profile slot the PUBLISHER says this stream is: `low` for a stream
|
|
1787
|
+
* whose only sensible role is the low-bandwidth one, `high` for a main
|
|
1788
|
+
* stream. Consulted by the broker's automatic ranking
|
|
1789
|
+
* (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
|
|
1790
|
+
* an operator's manual assignment still wins, and an absent hint is the
|
|
1791
|
+
* pixel-ranked default every camera had before this field existed.
|
|
1792
|
+
*
|
|
1793
|
+
* Why it exists: a camera with ONE stream ranked to `mid` — the slot no
|
|
1794
|
+
* storage class is written for on its own (`recordings` is high|mid,
|
|
1795
|
+
* `recordingsLow` is low) and the one profile scrub does not read. The robot
|
|
1796
|
+
* camera's single 720p relay is a `low` in every respect except the slot the
|
|
1797
|
+
* heuristic put it in.
|
|
1798
|
+
*/
|
|
1799
|
+
profileHint: CamProfileSchema.optional(),
|
|
1800
|
+
/**
|
|
1786
1801
|
* Transport-specific opaque metadata. The broker passes it through to
|
|
1787
1802
|
* the source reader without inspecting it. Currently used by
|
|
1788
1803
|
* `pull-rfc4571` streams to carry the upstream SDP (so the reader can
|
|
@@ -4094,7 +4109,22 @@ var RecordingTriggersSchema = zod.z.object({
|
|
|
4094
4109
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
4095
4110
|
* registrare.
|
|
4096
4111
|
*/
|
|
4097
|
-
sensorDeviceIds: zod.z.array(zod.z.number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
4112
|
+
sensorDeviceIds: zod.z.array(zod.z.number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
|
|
4113
|
+
/**
|
|
4114
|
+
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
4115
|
+
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
4116
|
+
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
4117
|
+
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
4118
|
+
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
4119
|
+
*
|
|
4120
|
+
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
4121
|
+
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
4122
|
+
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
4123
|
+
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
4124
|
+
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
4125
|
+
* (`holdTrigger` / `releaseTrigger`).
|
|
4126
|
+
*/
|
|
4127
|
+
deviceSignal: zod.z.boolean().optional()
|
|
4098
4128
|
});
|
|
4099
4129
|
/**
|
|
4100
4130
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8199,6 +8229,8 @@ var streamBrokerCapability = {
|
|
|
8199
8229
|
label: zod.z.string().optional(),
|
|
8200
8230
|
deviceFeatures: zod.z.array(zod.z.string()).optional(),
|
|
8201
8231
|
autoEligible: zod.z.boolean().optional(),
|
|
8232
|
+
/** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
|
|
8233
|
+
profileHint: CamProfileSchema.optional(),
|
|
8202
8234
|
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).optional(),
|
|
8203
8235
|
/** Required when kind === 'derived' — the source camStreamId the
|
|
8204
8236
|
* derived broker reads its encoded plane from.
|
|
@@ -31520,6 +31552,77 @@ var recordingExportCapability = {
|
|
|
31520
31552
|
}
|
|
31521
31553
|
};
|
|
31522
31554
|
/**
|
|
31555
|
+
* A camera's own "record me NOW" LEVEL — a signal the device raises while
|
|
31556
|
+
* something it knows about is happening (a robot vacuum cleaning, a machine
|
|
31557
|
+
* running, a gate open) and lowers when it stops.
|
|
31558
|
+
*
|
|
31559
|
+
* It is a level, not an edge. The sensor triggers the recorder already listens
|
|
31560
|
+
* to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
|
|
31561
|
+
* post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
|
|
31562
|
+
* still happening" cannot be expressed as an edge plus a post-buffer without
|
|
31563
|
+
* either re-triggering on a timer (polling — D224 forbids the consumer keeping
|
|
31564
|
+
* the fact fresh) or picking a post-buffer long enough to cover every job,
|
|
31565
|
+
* which records the dock for that long after every short one. So the recorder
|
|
31566
|
+
* reads the LEVEL: it records for as long as `active` is true, plus the band's
|
|
31567
|
+
* own post-buffer once it falls.
|
|
31568
|
+
*
|
|
31569
|
+
* Who owns the fact: the PROVIDER of the device, which already reads the state
|
|
31570
|
+
* the signal is derived from (the vacuum's lifecycle state, for Dreame). It
|
|
31571
|
+
* writes this slice on every change; consumers subscribe to the kernel's
|
|
31572
|
+
* `DeviceStateChanged` for it and read it back through
|
|
31573
|
+
* `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
|
|
31574
|
+
* against the device (D224, D8/D11).
|
|
31575
|
+
*
|
|
31576
|
+
* Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
|
|
31577
|
+
* to Home Assistant, HomeKit and the sensor picker as a thing an operator can
|
|
31578
|
+
* bind, and "the camera wants to record" is not a room sensor. It is a fact
|
|
31579
|
+
* about the camera, on the camera.
|
|
31580
|
+
*/
|
|
31581
|
+
var RecordingSignalStatusSchema = zod.z.object({
|
|
31582
|
+
/** True while the device asks to be recorded. */
|
|
31583
|
+
active: zod.z.boolean(),
|
|
31584
|
+
/**
|
|
31585
|
+
* Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
|
|
31586
|
+
* …). Free text for the log line and the UI badge; the recorder never
|
|
31587
|
+
* branches on it.
|
|
31588
|
+
*/
|
|
31589
|
+
reason: zod.z.string(),
|
|
31590
|
+
/** Ms epoch of the last `active` transition. 0 if never observed. */
|
|
31591
|
+
lastChangedAt: zod.z.number()
|
|
31592
|
+
});
|
|
31593
|
+
/** The runtime-state slice: the status plus the clock every slice carries. */
|
|
31594
|
+
var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: zod.z.number() });
|
|
31595
|
+
var recordingSignalCapability = {
|
|
31596
|
+
name: "recording-signal",
|
|
31597
|
+
scope: "device",
|
|
31598
|
+
deviceNative: true,
|
|
31599
|
+
mode: "singleton",
|
|
31600
|
+
deviceTypes: [DeviceType.Camera],
|
|
31601
|
+
methods: {
|
|
31602
|
+
/** The current level, straight from the slice the provider keeps fresh. */
|
|
31603
|
+
getStatus: method(zod.z.object({ deviceId: zod.z.number() }), RecordingSignalStatusSchema) },
|
|
31604
|
+
status: {
|
|
31605
|
+
schema: RecordingSignalStatusSchema,
|
|
31606
|
+
kind: "push",
|
|
31607
|
+
empty: {
|
|
31608
|
+
active: false,
|
|
31609
|
+
reason: "unknown",
|
|
31610
|
+
lastChangedAt: 0
|
|
31611
|
+
}
|
|
31612
|
+
},
|
|
31613
|
+
runtimeState: RecordingSignalRuntimeStateSchema,
|
|
31614
|
+
/**
|
|
31615
|
+
* Runtime-state durability: **session** — a restored `active: true` from
|
|
31616
|
+
* before a restart is exactly the stale level the recorder's reconcile bound
|
|
31617
|
+
* exists to end, and the provider re-derives the true level on activation
|
|
31618
|
+
* anyway. Nothing is lost by forgetting it; a lie is avoided.
|
|
31619
|
+
*
|
|
31620
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
31621
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
31622
|
+
*/
|
|
31623
|
+
durability: "session"
|
|
31624
|
+
};
|
|
31625
|
+
/**
|
|
31523
31626
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
31524
31627
|
* a rect ROI on a camera frame and names one or more states; the engine
|
|
31525
31628
|
* (pipeline-analytics, designated post-processing node) reports which state is
|
|
@@ -32017,6 +32120,8 @@ var CamStreamDescriptorSchema = zod.z.object({
|
|
|
32017
32120
|
deviceFeatures: zod.z.array(zod.z.string()).optional(),
|
|
32018
32121
|
/** Eligible for automatic profile assignment. Absent = `true`. */
|
|
32019
32122
|
autoEligible: zod.z.boolean().optional(),
|
|
32123
|
+
/** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
|
|
32124
|
+
profileHint: CamProfileSchema.optional(),
|
|
32020
32125
|
/** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
|
|
32021
32126
|
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
|
|
32022
32127
|
});
|
|
@@ -34994,6 +35099,7 @@ var CAP_NAMES_WITH_STATUS = [
|
|
|
34994
35099
|
"ptz",
|
|
34995
35100
|
"ptz-autotrack",
|
|
34996
35101
|
"recording",
|
|
35102
|
+
"recording-signal",
|
|
34997
35103
|
"scene-monitor",
|
|
34998
35104
|
"script-runner",
|
|
34999
35105
|
"smoke",
|
|
@@ -35136,6 +35242,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
35136
35242
|
rebootCapability,
|
|
35137
35243
|
recordingCapability,
|
|
35138
35244
|
recordingExportCapability,
|
|
35245
|
+
recordingSignalCapability,
|
|
35139
35246
|
sceneMonitorCapability,
|
|
35140
35247
|
scriptRunnerCapability,
|
|
35141
35248
|
serverManagementCapability,
|
|
@@ -39813,6 +39920,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
39813
39920
|
addonId: null,
|
|
39814
39921
|
access: "view"
|
|
39815
39922
|
},
|
|
39923
|
+
"recordingSignal.getStatus": {
|
|
39924
|
+
capName: "recording-signal",
|
|
39925
|
+
capScope: "device",
|
|
39926
|
+
addonId: null,
|
|
39927
|
+
access: "view"
|
|
39928
|
+
},
|
|
39816
39929
|
"sceneMonitor.captureReference": {
|
|
39817
39930
|
capName: "scene-monitor",
|
|
39818
39931
|
capScope: "device",
|
|
@@ -42805,6 +42918,11 @@ Object.freeze({
|
|
|
42805
42918
|
form: "single",
|
|
42806
42919
|
optional: true
|
|
42807
42920
|
}],
|
|
42921
|
+
"recordingSignal.getStatus": [{
|
|
42922
|
+
name: "deviceId",
|
|
42923
|
+
form: "single",
|
|
42924
|
+
optional: false
|
|
42925
|
+
}],
|
|
42808
42926
|
"sceneMonitor.captureReference": [{
|
|
42809
42927
|
name: "deviceId",
|
|
42810
42928
|
form: "single",
|
|
@@ -43158,7 +43276,7 @@ Object.freeze({
|
|
|
43158
43276
|
});
|
|
43159
43277
|
/**
|
|
43160
43278
|
* Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
|
|
43161
|
-
* `runtimeState`.
|
|
43279
|
+
* `runtimeState`. 67 caps: 35 `restored`, 32 `session`.
|
|
43162
43280
|
*
|
|
43163
43281
|
* A cap absent from this map has no runtime-state slice at all. A cap PRESENT
|
|
43164
43282
|
* with `durability: 'session'` has one and has decided not to keep it.
|
|
@@ -43360,6 +43478,10 @@ var RUNTIME_STATE_POLICY = {
|
|
|
43360
43478
|
durability: "session",
|
|
43361
43479
|
volatileFields: []
|
|
43362
43480
|
},
|
|
43481
|
+
"recording-signal": {
|
|
43482
|
+
durability: "session",
|
|
43483
|
+
volatileFields: []
|
|
43484
|
+
},
|
|
43363
43485
|
"scene-monitor": {
|
|
43364
43486
|
durability: "session",
|
|
43365
43487
|
volatileFields: []
|