@camstack/system 1.2.353 → 1.2.355
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/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.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/calendars/calendar-prefs-store.d.ts +7 -0
- package/dist/builtins/calendars/calendars.addon.js +3 -2
- package/dist/builtins/calendars/calendars.addon.mjs +3 -2
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/composer.addon.js +56 -5
- package/dist/builtins/composer/composer.addon.mjs +56 -5
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/block-settings-store.d.ts +5 -0
- package/dist/builtins/core-blocks/core-blocks.addon.js +7 -2
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +7 -2
- package/dist/builtins/device-manager/device-manager.addon.js +3 -3
- package/dist/builtins/device-manager/device-manager.addon.mjs +3 -3
- 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.d.ts +21 -6
- package/dist/builtins/local-network/local-network.addon.js +81 -54
- package/dist/builtins/local-network/local-network.addon.mjs +81 -55
- 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/analyze-stats.d.ts +0 -2
- 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-backend.d.ts +9 -11
- 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 +2 -2
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +2 -2
- 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/{child-cap-dispatch-CvYlCq60.js → child-cap-dispatch-CqV-7-QZ.js} +27 -86
- package/dist/{child-cap-dispatch-C6IpRb4P.mjs → child-cap-dispatch-DMx2axev.mjs} +28 -81
- package/dist/{composition-sources-CAFDvTRs.js → composition-sources-Bk-MjK1D.js} +1 -1
- package/dist/{composition-sources-BGlDi3CT.mjs → composition-sources-Dpl1G0Gr.mjs} +1 -1
- package/dist/{dist-CXVXFdJX.js → dist-BWicEEVA.js} +233 -79
- package/dist/{dist-Cm556q2j.mjs → dist-OCi0K-iM.mjs} +216 -80
- package/dist/http/reverse-proxy.d.ts +11 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +71 -56
- package/dist/index.mjs +72 -56
- package/dist/kernel/config-schema.d.ts +1 -0
- package/dist/kernel/event-plane-report.d.ts +7 -36
- package/dist/kernel/fs-utils.d.ts +1 -5
- package/dist/kernel/heap-spaces.d.ts +2 -23
- package/dist/kernel/index.d.ts +0 -2
- package/dist/kernel/moleculer/event-bus-core.d.ts +6 -28
- package/dist/kernel/moleculer/process-service.d.ts +2 -5
- package/dist/kernel/moleculer/runner-native-allocator.d.ts +1 -6
- package/dist/kernel/transport/index.d.ts +1 -1
- package/dist/kernel/transport/local-child-registry.d.ts +8 -41
- package/dist/kernel/transport/uds-event-bridge.d.ts +2 -2
- package/dist/{retired-settings-keys-D24IW4qo.js → retired-settings-keys-DLJ7MvIB.js} +1 -1
- package/dist/{retired-settings-keys-DzkSqnH0.mjs → retired-settings-keys-TDzxE6GA.mjs} +1 -1
- package/package.json +1 -1
- package/dist/kernel/heap-allocation-sample.d.ts +0 -107
package/dist/addon-runner.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_child_cap_dispatch = require("./child-cap-dispatch-
|
|
2
|
+
const require_child_cap_dispatch = require("./child-cap-dispatch-CqV-7-QZ.js");
|
|
3
3
|
const require_custom_action_registry = require("./custom-action-registry-acBY3mHA.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 {
|
|
1
|
+
import { $t as RUNNER_RSS_BUDGET_ENV, Ft as resolveAddonClass, H as createUdsLoggerWithControl, Pt as installManifestNativeDeps, U as LocalChildClient, _t as getWorkerNativeCapSnapshot, f as installManifestSystemDeps, fn as startRunnerHeapWatch, g as createUdsAddonContext, gt as getWorkerNativeCapProvider, i as killOwnRunnerGroupAfterParentLoss, n as createChildCapDispatch, p as installManifestPythonDeps, u as startRunnerParentDeathWatchdog, wn as emitHeapDiagnosticReport, xt as validateProviderRegistrations, yt as setWorkerNativeCapsChangeListener } from "./child-cap-dispatch-DMx2axev.mjs";
|
|
2
2
|
import { t as CustomActionRegistry } from "./custom-action-registry-B4Cf4O_X.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-BWicEEVA.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 { Cr as EventCategory, Qn as BaseAddon, U as addonPagesCapability, Zn as errMsg } from "../../dist-OCi0K-iM.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-BWicEEVA.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 { Cr as EventCategory, G as addonWidgetsCapability, Qn as BaseAddon, Zn as errMsg } from "../../dist-OCi0K-iM.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-BWicEEVA.js");
|
|
7
7
|
//#region src/builtins/alerts/device-label.ts
|
|
8
8
|
/**
|
|
9
9
|
* Operator-facing device label for alert messages.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Cr as EventCategory, K as alertsCapability, Qn as BaseAddon, Zn as errMsg, cr as createEvent, n as AlertSchema } from "../../dist-OCi0K-iM.mjs";
|
|
2
2
|
//#region src/builtins/alerts/device-label.ts
|
|
3
3
|
/**
|
|
4
4
|
* Operator-facing device label for alert messages.
|
|
@@ -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-BWicEEVA.js");
|
|
7
7
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
8
8
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
9
9
|
deadZoneFraction: .5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Cr as EventCategory, Qn as BaseAddon, S as FIRST_LEVEL_MACRO_CLASSES, Y as bareAddonId, Zn as errMsg, ln as ptzAutotrackCapability, mr as isEvent } from "../../dist-OCi0K-iM.mjs";
|
|
2
2
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
3
3
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
4
4
|
deadZoneFraction: .5,
|
|
@@ -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-BWicEEVA.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 { Cr as EventCategory, En as storageOccupancyCapability, J as backupCapability, Qn as BaseAddon, Sr as toNodeId, Yt as mayWriteToLocation, g as DATABASE_SNAPSHOT_SUFFIX, hr as nodePin } from "../../dist-OCi0K-iM.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";
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { CalendarPreferences, SettingsStoreClient } from '@camstack/types';
|
|
2
|
+
/**
|
|
3
|
+
* @durable class=config owner=calendars
|
|
4
|
+
* write="`setCalendarPreference` upserts the caller's row"
|
|
5
|
+
* retention="none — a missing row reads as empty prefs (all visible,
|
|
6
|
+
* system colours). Losing the table silently resets every operator's
|
|
7
|
+
* colour/hide choices."
|
|
8
|
+
*/
|
|
2
9
|
export declare const CALENDARS_USER_PREFS_COLLECTION = "calendars:user-prefs";
|
|
3
10
|
export declare function declareCalendarPrefsSchema(store: SettingsStoreClient): Promise<void>;
|
|
4
11
|
export declare function loadCalendarPreferences(store: SettingsStoreClient, userId: string): Promise<CalendarPreferences>;
|
|
@@ -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-BWicEEVA.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/calendars/calendar-color.ts
|
|
@@ -38,7 +38,8 @@ function defaultCalendarColor(calendarId) {
|
|
|
38
38
|
*
|
|
39
39
|
* One row per `userId`. The calendars builtin owns declare + read/write;
|
|
40
40
|
* the browser never talks to `settingsStore` directly.
|
|
41
|
-
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
42
43
|
* @durable class=config owner=calendars
|
|
43
44
|
* write="`setCalendarPreference` upserts the caller's row"
|
|
44
45
|
* retention="none — a missing row reads as empty prefs (all visible,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as calendarsCapability, Qn as BaseAddon, p as CalendarPreferencesSchema } from "../../dist-OCi0K-iM.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/calendars/calendar-color.ts
|
|
@@ -33,7 +33,8 @@ function defaultCalendarColor(calendarId) {
|
|
|
33
33
|
*
|
|
34
34
|
* One row per `userId`. The calendars builtin owns declare + read/write;
|
|
35
35
|
* the browser never talks to `settingsStore` directly.
|
|
36
|
-
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
37
38
|
* @durable class=config owner=calendars
|
|
38
39
|
* write="`setCalendarPreference` upserts the caller's row"
|
|
39
40
|
* retention="none — a missing row reads as empty prefs (all visible,
|
|
@@ -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-BWicEEVA.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let _camstack_types_node = require("@camstack/types/node");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $t as motionCapability, A as MOTION_CLOSE_AFTER_MS, Cn as snapshotCapability, Cr as EventCategory, Jn as DeviceFeature, Ln as buildFfmpegArgs, On as streamCatalogCapability, Qn as BaseAddon, Xn as DeviceType, Xt as memoizePinnedFfmpeg, Zn as errMsg, b as DeclaredDevices, cr as createEvent, et as cameraGridLayoutCapability, fr as hydrateSchema, i as BaseDevice, pt as declarationOwnerNodeId, y as DERIVED_CAMERA_SILENCED_CAP_NAMES } from "../../dist-OCi0K-iM.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
4
4
|
import { join } 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_composition_sources = require("../../composition-sources-
|
|
6
|
+
const require_dist = require("../../dist-BWicEEVA.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-Bk-MjK1D.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/shared/device-state-changed.ts
|
|
10
10
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
@@ -1307,7 +1307,57 @@ function ownFieldReading(records, key) {
|
|
|
1307
1307
|
* to a synchronous subscriber first.
|
|
1308
1308
|
* - Derived fields are evaluated before accumulators, and every field reading
|
|
1309
1309
|
* an own field that changed is re-evaluated in the same pass.
|
|
1310
|
+
* - An edge-latched (`rose`) field holds its last edge through a source
|
|
1311
|
+
* outage: the field goes stale, its value does not change (D713).
|
|
1310
1312
|
*/
|
|
1313
|
+
/**
|
|
1314
|
+
* Whether the field's last outcome said a SOURCE did not answer — unavailable
|
|
1315
|
+
* for that reason, or held over it. An expression that failed on answered
|
|
1316
|
+
* values is not an outage: its rose memory was never committed, so the next
|
|
1317
|
+
* success compares against the level from before (D716).
|
|
1318
|
+
*/
|
|
1319
|
+
function wasDown(outcome) {
|
|
1320
|
+
if (outcome === null) return false;
|
|
1321
|
+
if (outcome.state === "unavailable") return outcome.expressionFailed !== true;
|
|
1322
|
+
return outcome.held === true;
|
|
1323
|
+
}
|
|
1324
|
+
function isExpressionValue(value) {
|
|
1325
|
+
return value === null || typeof value === "number" || typeof value === "string" || typeof value === "boolean";
|
|
1326
|
+
}
|
|
1327
|
+
/** Whether the field's output is LATCHED by `rose`: it is the last edge, not a reading of now. */
|
|
1328
|
+
function isEdgeLatch(record) {
|
|
1329
|
+
const source = record.plan.source;
|
|
1330
|
+
return source.kind === "expression" && require_dist.expressionContainsBuiltinCall(source.expr, "rose");
|
|
1331
|
+
}
|
|
1332
|
+
/**
|
|
1333
|
+
* D713: an edge-latched field keeps its last known value when a source stops
|
|
1334
|
+
* answering. `rose` already returns its current output whenever no edge
|
|
1335
|
+
* happened, so its value is the last edge — a doorbell's `lastPressedAt` is
|
|
1336
|
+
* history, not a reading of now — and a source outage marks the FIELD stale
|
|
1337
|
+
* and leaves the value alone (the `count` accumulator already did, D670). A
|
|
1338
|
+
* provider redeploy used to write `null` over the restored stamp. Only for
|
|
1339
|
+
* the policies that would otherwise WRITE a stand-in (`null`, `'unknown'`): a
|
|
1340
|
+
* `release` field still goes back to its native provider and an `offline` one
|
|
1341
|
+
* still takes its device offline. A GONE source (fatal) is not held — the
|
|
1342
|
+
* block must fail. An expression that FAILED on answered values is not an
|
|
1343
|
+
* outage and is not held. Nothing known (no seed, nothing written) stays
|
|
1344
|
+
* unavailable.
|
|
1345
|
+
* A measurement (`battery.percentage = level`) is NOT held: D393.
|
|
1346
|
+
*/
|
|
1347
|
+
function holdLatchedValue(record, outcome) {
|
|
1348
|
+
if (outcome.state !== "unavailable" || outcome.fatal || outcome.expressionFailed) return outcome;
|
|
1349
|
+
if (record.plan.unavailable !== "null" && record.plan.unavailable !== "unknown") return outcome;
|
|
1350
|
+
if (!isEdgeLatch(record)) return outcome;
|
|
1351
|
+
const last = currentOutput(record);
|
|
1352
|
+
if (last === void 0 || !isExpressionValue(last)) return outcome;
|
|
1353
|
+
return {
|
|
1354
|
+
state: "stale",
|
|
1355
|
+
value: last,
|
|
1356
|
+
reason: `${outcome.reason}; holding the last edge`,
|
|
1357
|
+
deadline: null,
|
|
1358
|
+
held: true
|
|
1359
|
+
};
|
|
1360
|
+
}
|
|
1311
1361
|
function strictFiniteAdvance(previous, next) {
|
|
1312
1362
|
return typeof next === "number" && Number.isFinite(next) && (previous === null || next > previous);
|
|
1313
1363
|
}
|
|
@@ -1355,8 +1405,8 @@ function evaluateFields(host, keys, now) {
|
|
|
1355
1405
|
const record = next.get(key);
|
|
1356
1406
|
if (record === void 0) continue;
|
|
1357
1407
|
const candidateMemory = require_dist.cloneStatefulExpressionMemory(record.expressionMemory);
|
|
1358
|
-
if (record.outcome
|
|
1359
|
-
const
|
|
1408
|
+
if (wasDown(record.outcome)) require_dist.disarmRoseMemory(candidateMemory);
|
|
1409
|
+
const evaluatedOutcome = require_dist.evaluateCompositionField({
|
|
1360
1410
|
source: record.plan.source,
|
|
1361
1411
|
read,
|
|
1362
1412
|
now,
|
|
@@ -1367,7 +1417,8 @@ function evaluateFields(host, keys, now) {
|
|
|
1367
1417
|
callPathPrefix: fieldKey(record.plan)
|
|
1368
1418
|
}
|
|
1369
1419
|
});
|
|
1370
|
-
const expressionSucceeded =
|
|
1420
|
+
const expressionSucceeded = evaluatedOutcome.state !== "unavailable";
|
|
1421
|
+
const outcome = holdLatchedValue(record, evaluatedOutcome);
|
|
1371
1422
|
if (expressionSucceeded) candidateMemory.disarmRoseNext = false;
|
|
1372
1423
|
let evaluated = {
|
|
1373
1424
|
...record,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bn as
|
|
2
|
-
import { n as normalizedNativeOwner } from "../../composition-sources-
|
|
1
|
+
import { Bn as composedDeviceStableId, Cr as EventCategory, Gn as createStatefulExpressionMemory, Hn as compositionItemFieldPath, In as COMPOSER_ADDON_ID, Kn as disarmRoseMemory, Ot as expressionContainsBuiltinCall, Qn as BaseAddon, Rn as cloneStatefulExpressionMemory, Tt as evaluateCompositionField, Un as compositionSliceKey, Vn as compositionFeatureEnabled, Wn as compositionSourceKey, Xn as DeviceType, Z as buildCapabilityLookup, Zn as errMsg, b as DeclaredDevices, cr as createEvent, i as BaseDevice, l as COMPOSED_ITEM_FIXED_FIELDS, nt as composerCapability, on as planComposition, qn as toExpressionValue, rt as compositionFieldKey, t as ALL_CAPABILITY_DEFINITIONS, zn as composedDeviceRef } from "../../dist-OCi0K-iM.mjs";
|
|
2
|
+
import { n as normalizedNativeOwner } from "../../composition-sources-Dpl1G0Gr.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/shared/device-state-changed.ts
|
|
5
5
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
@@ -1302,7 +1302,57 @@ function ownFieldReading(records, key) {
|
|
|
1302
1302
|
* to a synchronous subscriber first.
|
|
1303
1303
|
* - Derived fields are evaluated before accumulators, and every field reading
|
|
1304
1304
|
* an own field that changed is re-evaluated in the same pass.
|
|
1305
|
+
* - An edge-latched (`rose`) field holds its last edge through a source
|
|
1306
|
+
* outage: the field goes stale, its value does not change (D713).
|
|
1305
1307
|
*/
|
|
1308
|
+
/**
|
|
1309
|
+
* Whether the field's last outcome said a SOURCE did not answer — unavailable
|
|
1310
|
+
* for that reason, or held over it. An expression that failed on answered
|
|
1311
|
+
* values is not an outage: its rose memory was never committed, so the next
|
|
1312
|
+
* success compares against the level from before (D716).
|
|
1313
|
+
*/
|
|
1314
|
+
function wasDown(outcome) {
|
|
1315
|
+
if (outcome === null) return false;
|
|
1316
|
+
if (outcome.state === "unavailable") return outcome.expressionFailed !== true;
|
|
1317
|
+
return outcome.held === true;
|
|
1318
|
+
}
|
|
1319
|
+
function isExpressionValue(value) {
|
|
1320
|
+
return value === null || typeof value === "number" || typeof value === "string" || typeof value === "boolean";
|
|
1321
|
+
}
|
|
1322
|
+
/** Whether the field's output is LATCHED by `rose`: it is the last edge, not a reading of now. */
|
|
1323
|
+
function isEdgeLatch(record) {
|
|
1324
|
+
const source = record.plan.source;
|
|
1325
|
+
return source.kind === "expression" && expressionContainsBuiltinCall(source.expr, "rose");
|
|
1326
|
+
}
|
|
1327
|
+
/**
|
|
1328
|
+
* D713: an edge-latched field keeps its last known value when a source stops
|
|
1329
|
+
* answering. `rose` already returns its current output whenever no edge
|
|
1330
|
+
* happened, so its value is the last edge — a doorbell's `lastPressedAt` is
|
|
1331
|
+
* history, not a reading of now — and a source outage marks the FIELD stale
|
|
1332
|
+
* and leaves the value alone (the `count` accumulator already did, D670). A
|
|
1333
|
+
* provider redeploy used to write `null` over the restored stamp. Only for
|
|
1334
|
+
* the policies that would otherwise WRITE a stand-in (`null`, `'unknown'`): a
|
|
1335
|
+
* `release` field still goes back to its native provider and an `offline` one
|
|
1336
|
+
* still takes its device offline. A GONE source (fatal) is not held — the
|
|
1337
|
+
* block must fail. An expression that FAILED on answered values is not an
|
|
1338
|
+
* outage and is not held. Nothing known (no seed, nothing written) stays
|
|
1339
|
+
* unavailable.
|
|
1340
|
+
* A measurement (`battery.percentage = level`) is NOT held: D393.
|
|
1341
|
+
*/
|
|
1342
|
+
function holdLatchedValue(record, outcome) {
|
|
1343
|
+
if (outcome.state !== "unavailable" || outcome.fatal || outcome.expressionFailed) return outcome;
|
|
1344
|
+
if (record.plan.unavailable !== "null" && record.plan.unavailable !== "unknown") return outcome;
|
|
1345
|
+
if (!isEdgeLatch(record)) return outcome;
|
|
1346
|
+
const last = currentOutput(record);
|
|
1347
|
+
if (last === void 0 || !isExpressionValue(last)) return outcome;
|
|
1348
|
+
return {
|
|
1349
|
+
state: "stale",
|
|
1350
|
+
value: last,
|
|
1351
|
+
reason: `${outcome.reason}; holding the last edge`,
|
|
1352
|
+
deadline: null,
|
|
1353
|
+
held: true
|
|
1354
|
+
};
|
|
1355
|
+
}
|
|
1306
1356
|
function strictFiniteAdvance(previous, next) {
|
|
1307
1357
|
return typeof next === "number" && Number.isFinite(next) && (previous === null || next > previous);
|
|
1308
1358
|
}
|
|
@@ -1350,8 +1400,8 @@ function evaluateFields(host, keys, now) {
|
|
|
1350
1400
|
const record = next.get(key);
|
|
1351
1401
|
if (record === void 0) continue;
|
|
1352
1402
|
const candidateMemory = cloneStatefulExpressionMemory(record.expressionMemory);
|
|
1353
|
-
if (record.outcome
|
|
1354
|
-
const
|
|
1403
|
+
if (wasDown(record.outcome)) disarmRoseMemory(candidateMemory);
|
|
1404
|
+
const evaluatedOutcome = evaluateCompositionField({
|
|
1355
1405
|
source: record.plan.source,
|
|
1356
1406
|
read,
|
|
1357
1407
|
now,
|
|
@@ -1362,7 +1412,8 @@ function evaluateFields(host, keys, now) {
|
|
|
1362
1412
|
callPathPrefix: fieldKey(record.plan)
|
|
1363
1413
|
}
|
|
1364
1414
|
});
|
|
1365
|
-
const expressionSucceeded =
|
|
1415
|
+
const expressionSucceeded = evaluatedOutcome.state !== "unavailable";
|
|
1416
|
+
const outcome = holdLatchedValue(record, evaluatedOutcome);
|
|
1366
1417
|
if (expressionSucceeded) candidateMemory.disarmRoseNext = false;
|
|
1367
1418
|
let evaluated = {
|
|
1368
1419
|
...record,
|
|
@@ -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-BWicEEVA.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 { Gt as logDestinationCapability, Qn as BaseAddon } from "../../dist-OCi0K-iM.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,4 +1,9 @@
|
|
|
1
1
|
import { SettingsStoreClient } from '@camstack/types';
|
|
2
|
+
/**
|
|
3
|
+
* @durable class=config owner=core-blocks
|
|
4
|
+
* write="`setValues` / `mergeValues` persist the operator's prefs for one block"
|
|
5
|
+
* retention="`delete` when the block is deleted. Nothing ages out."
|
|
6
|
+
*/
|
|
2
7
|
export declare const CORE_BLOCK_SETTINGS_COLLECTION = "core-blocks:settings";
|
|
3
8
|
export declare const CORE_BLOCK_SETTINGS_COLUMNS: readonly [{
|
|
4
9
|
readonly name: "id";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
4
|
-
const require_composition_sources = require("../../composition-sources-
|
|
3
|
+
const require_dist = require("../../dist-BWicEEVA.js");
|
|
4
|
+
const require_composition_sources = require("../../composition-sources-Bk-MjK1D.js");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
6
6
|
let _camstack_types_node = require("@camstack/types/node");
|
|
7
7
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -491,6 +491,11 @@ var BlockSupervisor = class {
|
|
|
491
491
|
};
|
|
492
492
|
//#endregion
|
|
493
493
|
//#region src/builtins/core-blocks/block-settings-store.ts
|
|
494
|
+
/**
|
|
495
|
+
* @durable class=config owner=core-blocks
|
|
496
|
+
* write="`setValues` / `mergeValues` persist the operator's prefs for one block"
|
|
497
|
+
* retention="`delete` when the block is deleted. Nothing ages out."
|
|
498
|
+
*/
|
|
494
499
|
var CORE_BLOCK_SETTINGS_COLLECTION = "core-blocks:settings";
|
|
495
500
|
var CORE_BLOCK_SETTINGS_COLUMNS = [{
|
|
496
501
|
name: "id",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as describeCompositionSources } from "../../composition-sources-
|
|
1
|
+
import { Qn as BaseAddon, Wn as compositionSourceKey, Z as buildCapabilityLookup, Zn as errMsg, _t as describeComposableCaps, at as coreBlockAddonId, b as DeclaredDevices, ct as coreBlockSourceKind, d as CORE_BLOCKS_ADDON_ID, dn as replacedFieldKeys, en as normalizeCoreBlockWrite, f as CORE_BLOCK_ADDON_PREFIX, fr as hydrateSchema, it as compositionSourceRefs, jn as validateComposition, lt as coreBlocksCapability, m as CoreBlockSchema, mn as resolveCoreBlockFiles, on as planComposition, ot as coreBlockComposition, pn as resolveCoreBlockEntry, st as coreBlockIdFromAddonId, t as ALL_CAPABILITY_DEFINITIONS, u as COMPOSER_RUNNER_ID, zn as composedDeviceRef } from "../../dist-OCi0K-iM.mjs";
|
|
2
|
+
import { t as describeCompositionSources } from "../../composition-sources-Dpl1G0Gr.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import { customizationBlockName } from "@camstack/types/node";
|
|
@@ -486,6 +486,11 @@ var BlockSupervisor = class {
|
|
|
486
486
|
};
|
|
487
487
|
//#endregion
|
|
488
488
|
//#region src/builtins/core-blocks/block-settings-store.ts
|
|
489
|
+
/**
|
|
490
|
+
* @durable class=config owner=core-blocks
|
|
491
|
+
* write="`setValues` / `mergeValues` persist the operator's prefs for one block"
|
|
492
|
+
* retention="`delete` when the block is deleted. Nothing ages out."
|
|
493
|
+
*/
|
|
489
494
|
var CORE_BLOCK_SETTINGS_COLLECTION = "core-blocks:settings";
|
|
490
495
|
var CORE_BLOCK_SETTINGS_COLUMNS = [{
|
|
491
496
|
name: "id",
|
|
@@ -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-BWicEEVA.js");
|
|
7
|
+
const require_retired_settings_keys = require("../../retired-settings-keys-DLJ7MvIB.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -4898,7 +4898,7 @@ async function reloadMigratedDevices(pctx, targets) {
|
|
|
4898
4898
|
* keyed by the number in a separate store, and until 2026-09-01 they simply
|
|
4899
4899
|
* stayed put. Measured on the live hub after replacing a Hikvision (id 618)
|
|
4900
4900
|
* with a Reolink: device 618 — Reolink hardware — was dialled at
|
|
4901
|
-
* `192.168.
|
|
4901
|
+
* `192.168.10.245:80` with `deviceCache.model="DS-2DE2A404IW-DE3/W"`, the
|
|
4902
4902
|
* Hikvision's address, credentials and cached model, and never came online.
|
|
4903
4903
|
* Device 4362 wore the Reolink's config on Hikvision hardware. The two devices
|
|
4904
4904
|
* were wearing each other's identity.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-
|
|
1
|
+
import { Bt as legacyAutoLinkIds, C as FieldClaimModeSchema, Cr as EventCategory, Ct as enumerateItemArrayFields, D as LocationIconIdSchema, Dt as expandContainer, I as STREAM_PROFILE_META, Jn as DeviceFeature, Mt as formatMinutes, Q as buildStreamParamsConfigSchema, Qn as BaseAddon, Sn as siteZoneKey, Wt as locationIconKey, Xn as DeviceType, Yn as DeviceRole, Zn as errMsg, _n as runtimeStatePolicyFor, bt as deviceStateCapability, c as CAP_NAMES_WITH_STATUS, ht as defineExtensionSlotProvider, in as parseStreamParamsFormPatch, ir as WELL_KNOWN_TAB_MAP, k as MINUTES_PER_DAY, o as CAMERA_SWITCH_ORDER, pr as isDeviceConfigCap, t as ALL_CAPABILITY_DEFINITIONS, tn as normalizeUnit, ut as createDeviceExtensionProvider, v as DAY_NAMES, vt as deviceExtensionCapability, w as FieldClaimSchema, wt as enumerateSchemaFields, x as DeviceStatusSchema, xr as sleep$1, xt as deviceStatusCapability, yt as deviceManagerCapability } from "../../dist-OCi0K-iM.mjs";
|
|
2
|
+
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-TDzxE6GA.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import { canonicalDeviceFingerprint } from "@camstack/types/node";
|
|
@@ -4893,7 +4893,7 @@ async function reloadMigratedDevices(pctx, targets) {
|
|
|
4893
4893
|
* keyed by the number in a separate store, and until 2026-09-01 they simply
|
|
4894
4894
|
* stayed put. Measured on the live hub after replacing a Hikvision (id 618)
|
|
4895
4895
|
* with a Reolink: device 618 — Reolink hardware — was dialled at
|
|
4896
|
-
* `192.168.
|
|
4896
|
+
* `192.168.10.245:80` with `deviceCache.model="DS-2DE2A404IW-DE3/W"`, the
|
|
4897
4897
|
* Hikvision's address, credentials and cached model, and never came online.
|
|
4898
4898
|
* Device 4362 wore the Reolink's config on Hikvision hardware. The two devices
|
|
4899
4899
|
* were wearing each other's identity.
|
|
@@ -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-BWicEEVA.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 { Gt as logDestinationCapability, Qn as BaseAddon } from "../../dist-OCi0K-iM.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-BWicEEVA.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 { Cr as EventCategory, P as RecordingStatusSchema, Qn as BaseAddon, Zn as errMsg, cr as createEvent, j as RECORDING_SOURCE_CAMSTACK_ADDON } from "../../dist-OCi0K-iM.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-BWicEEVA.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 { An as userManagementCapability, H as UserRecordSchema, L as ScopedTokenSchema, Qn as BaseAddon, q as authProviderCapability, r as ApiKeyRecordSchema } from "../../dist-OCi0K-iM.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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdvertisedLocalPort, ConnectionEndpoint, LocalInterface, ProviderRegistration, BaseAddon } from '@camstack/types';
|
|
2
2
|
/**
|
|
3
3
|
* Cached mesh-reachable endpoint, learned from the `mesh-network`
|
|
4
4
|
* provider via the `MeshNetworkChanged` event-tail + pull-reconcile.
|
|
@@ -68,13 +68,20 @@ export declare class LocalNetworkAddon extends BaseAddon<LocalNetworkConfig> {
|
|
|
68
68
|
private meshEndpoint;
|
|
69
69
|
constructor();
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
71
|
+
* The effective flagged notification address: the operator's explicit
|
|
72
|
+
* choice, else AUTO — the CamStack app link (D709, operator decision
|
|
73
|
+
* 2026-10-06; before it AUTO was the tunnel, then the mesh). The app link is
|
|
74
|
+
* not a hub address: the NC's signed media and buttons keep their own hub
|
|
75
|
+
* ladder when it is flagged; only viewer taps take the app form.
|
|
76
76
|
*/
|
|
77
77
|
private resolveNotificationEndpoint;
|
|
78
|
+
/**
|
|
79
|
+
* The `hub=` an app link carries: the best public HTTPS address in this
|
|
80
|
+
* cap's own palette (tunnel, then mesh) — so it can never disagree with
|
|
81
|
+
* what the Network page lists. See `pickAppLinkHub`.
|
|
82
|
+
*/
|
|
83
|
+
private resolveAppLinkHub;
|
|
84
|
+
private notificationEndpointSnapshot;
|
|
78
85
|
private snapshotViewerEndpoints;
|
|
79
86
|
/**
|
|
80
87
|
* Palette shown in the Network tab: LAN IPv4, stable LAN IPv6, public,
|
|
@@ -205,6 +212,14 @@ export interface LanHttpAdvertisement {
|
|
|
205
212
|
readonly httpsPort: number;
|
|
206
213
|
readonly localHostname: string | null;
|
|
207
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* The CamStack app link as a palette entry (D709): the one address on the
|
|
217
|
+
* Network page that is not this hub's. Flagging it for notifications (the
|
|
218
|
+
* default) makes viewer taps open the native app, with the hub carried as
|
|
219
|
+
* `hub=`. `kind: 'app-link'` keeps it out of every race and ranking; it is
|
|
220
|
+
* only emitted on `includeAppLink: true`.
|
|
221
|
+
*/
|
|
222
|
+
export declare function appLinkEndpoint(): ConnectionEndpoint;
|
|
208
223
|
export declare function buildEndpoints(interfaces: readonly LocalInterface[], port: number, includeLoopback: boolean, ipv4Only: boolean, publicHostname: string, scheme?: 'http' | 'https', meshEndpoint?: MeshEndpointCache | null, lanHttp?: LanHttpAdvertisement | null): ConnectionEndpoint[];
|
|
209
224
|
/** AUTO viewer race: LAN IPv4 + the public tunnel. Never IPv6, mesh, or loopback. */
|
|
210
225
|
export declare function isDefaultViewerEndpoint(endpoint: ConnectionEndpoint): boolean;
|