@camstack/addon-pipeline 1.2.221 → 1.2.223
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/audio-analyzer/index.js +55 -16
- package/dist/audio-analyzer/index.mjs +55 -16
- package/dist/{default-detection-model-B1NT1A38.js → default-detection-model-B7kn9xHR.js} +1 -1
- package/dist/{default-detection-model-DkVFgubU.mjs → default-detection-model-BSX8cVHY.mjs} +1 -1
- package/dist/detection-pipeline/index.js +4 -4
- package/dist/detection-pipeline/index.mjs +4 -4
- package/dist/{dist-CEFC3PkP.mjs → dist-BNzfbpF6.mjs} +31 -2
- package/dist/{dist-ATDfcxgL.js → dist-DZsjVFey.js} +31 -2
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-C5jnTgpv.js → node-BhQ8dDQC.js} +1 -1
- package/dist/{node-DR3fHqUq.mjs → node-uYIx2aZF.mjs} +1 -1
- package/dist/pipeline-runner/index.js +139 -20
- package/dist/pipeline-runner/index.mjs +139 -20
- package/dist/{process-memory-DQbCPnMA.js → process-memory-BozKb5-g.js} +1 -1
- package/dist/{process-memory-DqYj5IAb.mjs → process-memory-CkoLpOV-.mjs} +1 -1
- package/dist/recorder/index.js +90 -27
- package/dist/recorder/index.mjs +90 -27
- package/dist/{segment-demux-js-o9KBAz9p.js → segment-demux-js-Cvszh55p.js} +1 -1
- package/dist/{segment-demux-js-CddDwD69.mjs → segment-demux-js-Dh1dn_AT.mjs} +1 -1
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-D5XnLZWR.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BZG3prqU.mjs} +3 -3
- package/dist/stream-broker/demux-worker-child.js +1 -1
- package/dist/stream-broker/demux-worker-child.mjs +1 -1
- package/dist/stream-broker/{hostInit-C-VdcJS2.mjs → hostInit-Cyo0CFo3.mjs} +3 -3
- package/dist/stream-broker/index.js +96 -54
- package/dist/stream-broker/index.mjs +96 -54
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/package.json +1 -1
package/dist/recorder/index.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_node = require("../node-
|
|
6
|
+
const require_dist = require("../dist-DZsjVFey.js");
|
|
7
|
+
const require_node = require("../node-BhQ8dDQC.js");
|
|
8
8
|
const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
|
|
9
9
|
const require_restream_intent = require("../restream-intent-B1Difcnq.js");
|
|
10
10
|
const require_retire_root_keys = require("../retire-root-keys-Csb8z2f3.js");
|
|
@@ -7777,6 +7777,7 @@ function buildRecordingProvider(deps) {
|
|
|
7777
7777
|
},
|
|
7778
7778
|
setDeviceConfig: async ({ deviceId, config }) => {
|
|
7779
7779
|
const saved = await saveDeviceConfig(deps.configStore, deviceId, config);
|
|
7780
|
+
deps.onConfigSaved?.(deviceId, saved);
|
|
7780
7781
|
if (deps.onConfigChanged) try {
|
|
7781
7782
|
await deps.onConfigChanged(deviceId);
|
|
7782
7783
|
} catch (err) {
|
|
@@ -10963,29 +10964,75 @@ Object.freeze({
|
|
|
10963
10964
|
"turn-provider": ["getTurnServers"],
|
|
10964
10965
|
"user-passkeys": ["listPasskeys"]
|
|
10965
10966
|
});
|
|
10966
|
-
//#endregion
|
|
10967
|
-
//#region src/recorder/addon/last-known-config.ts
|
|
10968
10967
|
/**
|
|
10969
|
-
*
|
|
10968
|
+
* Build the recorder's config mirror.
|
|
10970
10969
|
*
|
|
10971
|
-
*
|
|
10972
|
-
* call site
|
|
10973
|
-
*
|
|
10974
|
-
*
|
|
10970
|
+
* `load` is the fallible store read (`loadDeviceConfig(configStore, id)`), and
|
|
10971
|
+
* every existing call site keeps its signature: the controller is handed
|
|
10972
|
+
* {@link RecordingConfigMirror.read} and cannot tell the difference, which is
|
|
10973
|
+
* the point — the trigger post-buffer is the path that got CAUGHT writing a
|
|
10974
|
+
* wrong number, but it is one of six reads and the other five are the volume.
|
|
10975
10975
|
*/
|
|
10976
|
-
function
|
|
10976
|
+
function createRecordingConfigMirror(deps) {
|
|
10977
10977
|
const now = deps.now ?? (() => Date.now());
|
|
10978
|
-
const
|
|
10979
|
-
|
|
10978
|
+
const freshMs = deps.freshMs ?? 3e4;
|
|
10979
|
+
const reportIntervalMs = deps.reportIntervalMs ?? 6e4;
|
|
10980
|
+
const mirror = /* @__PURE__ */ new Map();
|
|
10981
|
+
const window = {
|
|
10982
|
+
served: 0,
|
|
10983
|
+
storeReads: 0,
|
|
10984
|
+
fallbacks: 0,
|
|
10985
|
+
startedAt: now()
|
|
10986
|
+
};
|
|
10987
|
+
/**
|
|
10988
|
+
* One line per window, fleet-level (no `deviceId`: this aggregates every
|
|
10989
|
+
* camera, and the per-camera lines are the fallback WARNs above).
|
|
10990
|
+
*
|
|
10991
|
+
* It exists because a branch that ACCEPTS work and produces no store traffic
|
|
10992
|
+
* is indistinguishable from a branch nobody calls: without this line, a
|
|
10993
|
+
* mirror that silently stopped mirroring and a mirror doing its job both look
|
|
10994
|
+
* like silence, and the only visible difference is 1 800 calls a minute on a
|
|
10995
|
+
* runner nobody is watching.
|
|
10996
|
+
*/
|
|
10997
|
+
const reportIfDue = (atMs) => {
|
|
10998
|
+
const windowMs = atMs - window.startedAt;
|
|
10999
|
+
if (windowMs < reportIntervalMs) return;
|
|
11000
|
+
const calls = window.served + window.storeReads;
|
|
11001
|
+
window.startedAt = atMs;
|
|
11002
|
+
const served = window.served;
|
|
11003
|
+
const storeReads = window.storeReads;
|
|
11004
|
+
const fallbacks = window.fallbacks;
|
|
11005
|
+
window.served = 0;
|
|
11006
|
+
window.storeReads = 0;
|
|
11007
|
+
window.fallbacks = 0;
|
|
11008
|
+
if (calls === 0) return;
|
|
11009
|
+
deps.logger.info("recorder: config mirror window", { meta: {
|
|
11010
|
+
served,
|
|
11011
|
+
storeReads,
|
|
11012
|
+
fallbacks,
|
|
11013
|
+
devices: mirror.size,
|
|
11014
|
+
windowMs,
|
|
11015
|
+
freshMs
|
|
11016
|
+
} });
|
|
11017
|
+
};
|
|
11018
|
+
const read = async (deviceId) => {
|
|
11019
|
+
const atMs = now();
|
|
11020
|
+
reportIfDue(atMs);
|
|
11021
|
+
const held = mirror.get(deviceId);
|
|
11022
|
+
if (held !== void 0 && atMs - held.atMs < freshMs) {
|
|
11023
|
+
window.served += 1;
|
|
11024
|
+
return held.config;
|
|
11025
|
+
}
|
|
11026
|
+
window.storeReads += 1;
|
|
10980
11027
|
try {
|
|
10981
11028
|
const config = await deps.load(deviceId);
|
|
10982
|
-
|
|
11029
|
+
mirror.set(deviceId, {
|
|
10983
11030
|
config,
|
|
10984
11031
|
atMs: now()
|
|
10985
11032
|
});
|
|
10986
11033
|
return config;
|
|
10987
11034
|
} catch (err) {
|
|
10988
|
-
const cached =
|
|
11035
|
+
const cached = mirror.get(deviceId);
|
|
10989
11036
|
if (cached === void 0) {
|
|
10990
11037
|
deps.logger.warn("recorder: config read failed and NOTHING is cached for this camera — no last-known-good to serve", {
|
|
10991
11038
|
tags: { deviceId },
|
|
@@ -10993,17 +11040,29 @@ function withLastKnownConfig(deps) {
|
|
|
10993
11040
|
});
|
|
10994
11041
|
throw err;
|
|
10995
11042
|
}
|
|
10996
|
-
|
|
11043
|
+
window.fallbacks += 1;
|
|
10997
11044
|
deps.logger.warn("recorder: config read failed — serving the LAST-KNOWN-GOOD config (not the shipped default)", {
|
|
10998
11045
|
tags: { deviceId },
|
|
10999
11046
|
meta: {
|
|
11000
|
-
ageMs,
|
|
11047
|
+
ageMs: now() - cached.atMs,
|
|
11001
11048
|
error: require_dist.errMsg(err)
|
|
11002
11049
|
}
|
|
11003
11050
|
});
|
|
11004
11051
|
return cached.config;
|
|
11005
11052
|
}
|
|
11006
11053
|
};
|
|
11054
|
+
return {
|
|
11055
|
+
read,
|
|
11056
|
+
put(deviceId, config) {
|
|
11057
|
+
mirror.set(deviceId, {
|
|
11058
|
+
config,
|
|
11059
|
+
atMs: now()
|
|
11060
|
+
});
|
|
11061
|
+
},
|
|
11062
|
+
invalidate(deviceId) {
|
|
11063
|
+
mirror.delete(deviceId);
|
|
11064
|
+
}
|
|
11065
|
+
};
|
|
11007
11066
|
}
|
|
11008
11067
|
//#endregion
|
|
11009
11068
|
//#region src/recorder/addon/ledger-walk-reconcile.ts
|
|
@@ -17459,21 +17518,22 @@ var RecorderV2Addon = class extends require_dist.BaseAddon {
|
|
|
17459
17518
|
/** Continuous + events band write-path controller (ffmpeg writers + watchers). */
|
|
17460
17519
|
controller = null;
|
|
17461
17520
|
/**
|
|
17462
|
-
* The controller's config read
|
|
17521
|
+
* The controller's config read — this addon's mirror of the rows it owns
|
|
17522
|
+
* (`config-mirror.ts`, D466), with the last-known-good fallback.
|
|
17463
17523
|
*
|
|
17464
|
-
* Built ONCE and memoized, because the
|
|
17465
|
-
*
|
|
17466
|
-
* to
|
|
17467
|
-
*
|
|
17468
|
-
* `undefined` at that point.
|
|
17524
|
+
* Built ONCE and memoized, because the map lives INSIDE it: rebuilding it per
|
|
17525
|
+
* call would throw away both the freshness the trigger path is served from
|
|
17526
|
+
* and the last value a failed read falls back to. Lazy rather than a field
|
|
17527
|
+
* initializer — a field initializer runs before the constructor assigns
|
|
17528
|
+
* `this.ctx`, so `this.ctx.logger` would be `undefined` at that point.
|
|
17469
17529
|
*/
|
|
17470
|
-
|
|
17471
|
-
get
|
|
17472
|
-
this.
|
|
17530
|
+
mirroredConfigRead = null;
|
|
17531
|
+
get configMirror() {
|
|
17532
|
+
this.mirroredConfigRead ??= createRecordingConfigMirror({
|
|
17473
17533
|
load: (deviceId) => loadDeviceConfig(this.configStore(), deviceId),
|
|
17474
17534
|
logger: this.ctx.logger
|
|
17475
17535
|
});
|
|
17476
|
-
return this.
|
|
17536
|
+
return this.mirroredConfigRead;
|
|
17477
17537
|
}
|
|
17478
17538
|
/** Unsubscribe handle for the EventCapture motion subscription. */
|
|
17479
17539
|
eventUnsub = null;
|
|
@@ -17721,7 +17781,7 @@ var RecorderV2Addon = class extends require_dist.BaseAddon {
|
|
|
17721
17781
|
nodeId: this.nodeId,
|
|
17722
17782
|
ownerNodeId: ingestOwner.ownerNodeId,
|
|
17723
17783
|
segmentStore: this.segmentStore,
|
|
17724
|
-
loadConfig: this.
|
|
17784
|
+
loadConfig: this.configMirror.read,
|
|
17725
17785
|
enabledDeviceIds: async () => [...(await readDeviceConfigs(this.configStore())).keys()],
|
|
17726
17786
|
/**
|
|
17727
17787
|
* The DURABLE half of the trigger path (D8/D11). `pipelineAnalytics` rows
|
|
@@ -17860,6 +17920,9 @@ var RecorderV2Addon = class extends require_dist.BaseAddon {
|
|
|
17860
17920
|
calendar: this.calendar,
|
|
17861
17921
|
mfraFor: (deviceId, profile, startMs) => this.mfraTables.get(deviceId, profile, startMs),
|
|
17862
17922
|
hydrateWindow: (deviceId, fromMs, toMs, verifyClosedHours) => hydrateWindowFromStorage(this.index, deviceId, fromMs, toMs, this.resolvedLocations, this.ctx.logger, this.segmentHours ?? void 0, { verifyClosedHours: verifyClosedHours === true }),
|
|
17923
|
+
onConfigSaved: (deviceId, config) => {
|
|
17924
|
+
this.configMirror.put(deviceId, config);
|
|
17925
|
+
},
|
|
17863
17926
|
onConfigChanged: async (deviceId) => {
|
|
17864
17927
|
await this.refreshSensorTriggerBindings();
|
|
17865
17928
|
await (this.controller?.onConfigChanged(deviceId) ?? Promise.resolve());
|
package/dist/recorder/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as evictionPolicyOfLocation, Ct as recordingExportCapability, D as RecordingConfigSchema, Dt as resolveLocationMode, E as RECORDING_EXPORT_MAX_READ_BYTES, F as batteryCapability, G as deriveRecordingMode, H as defineCustomActions, Kt as DeviceFeature, Lt as errMsg, Mt as storageOccupancyCapability, O as RecordingSignalStatusSchema, Pt as stripRetiredBandPreBufferSec, Q as evictionPolicyForMode, S as OpsLogEntrySchema, St as recordingCapability, U as deriveBatteryPresence, Wt as BaseAddon, X as evaluateSensorEdge, Zt as hydrateSchema, an as sleep$1, at as loadContributionCapability, cn as boolean, d as DEFAULT_EVENTS_BAND_BUFFER_SEC, dt as migrateLegacyDeviceSignalConfig, fn as number, ft as modeMayWrite, g as ExportRecordSchema, gn as string, hn as record, i as BatteryStatusSchema, in as selectAssignedProfileSlots, it as isFirstLevelMacroClass, jt as storageEvictableCapability, kt as resolveRecordingProfiles, lt as mayReadLocation, mn as preprocess, on as _enum, pn as object, qt as DeviceType, sn as array, tn as nodePin, tt as gbToBytes, ut as mayWriteToLocation, vn as EventCategory, wt as recordingSignalCapability, z as customAction } from "../dist-
|
|
2
|
-
import { a as physicalRootOf, i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-
|
|
1
|
+
import { $ as evictionPolicyOfLocation, Ct as recordingExportCapability, D as RecordingConfigSchema, Dt as resolveLocationMode, E as RECORDING_EXPORT_MAX_READ_BYTES, F as batteryCapability, G as deriveRecordingMode, H as defineCustomActions, Kt as DeviceFeature, Lt as errMsg, Mt as storageOccupancyCapability, O as RecordingSignalStatusSchema, Pt as stripRetiredBandPreBufferSec, Q as evictionPolicyForMode, S as OpsLogEntrySchema, St as recordingCapability, U as deriveBatteryPresence, Wt as BaseAddon, X as evaluateSensorEdge, Zt as hydrateSchema, an as sleep$1, at as loadContributionCapability, cn as boolean, d as DEFAULT_EVENTS_BAND_BUFFER_SEC, dt as migrateLegacyDeviceSignalConfig, fn as number, ft as modeMayWrite, g as ExportRecordSchema, gn as string, hn as record, i as BatteryStatusSchema, in as selectAssignedProfileSlots, it as isFirstLevelMacroClass, jt as storageEvictableCapability, kt as resolveRecordingProfiles, lt as mayReadLocation, mn as preprocess, on as _enum, pn as object, qt as DeviceType, sn as array, tn as nodePin, tt as gbToBytes, ut as mayWriteToLocation, vn as EventCategory, wt as recordingSignalCapability, z as customAction } from "../dist-BNzfbpF6.mjs";
|
|
2
|
+
import { a as physicalRootOf, i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-uYIx2aZF.mjs";
|
|
3
3
|
import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
|
|
4
4
|
import { c as PREBUFFER_MAX_MS, r as RECORDING_PRE_ROLL_REQUEST_MS, s as withRecordingIntent } from "../restream-intent-DWe2kInY.mjs";
|
|
5
5
|
import { n as RowMapStore, t as retireRootKeys } from "../retire-root-keys-DZvlso2l.mjs";
|
|
@@ -7770,6 +7770,7 @@ function buildRecordingProvider(deps) {
|
|
|
7770
7770
|
},
|
|
7771
7771
|
setDeviceConfig: async ({ deviceId, config }) => {
|
|
7772
7772
|
const saved = await saveDeviceConfig(deps.configStore, deviceId, config);
|
|
7773
|
+
deps.onConfigSaved?.(deviceId, saved);
|
|
7773
7774
|
if (deps.onConfigChanged) try {
|
|
7774
7775
|
await deps.onConfigChanged(deviceId);
|
|
7775
7776
|
} catch (err) {
|
|
@@ -10956,29 +10957,75 @@ Object.freeze({
|
|
|
10956
10957
|
"turn-provider": ["getTurnServers"],
|
|
10957
10958
|
"user-passkeys": ["listPasskeys"]
|
|
10958
10959
|
});
|
|
10959
|
-
//#endregion
|
|
10960
|
-
//#region src/recorder/addon/last-known-config.ts
|
|
10961
10960
|
/**
|
|
10962
|
-
*
|
|
10961
|
+
* Build the recorder's config mirror.
|
|
10963
10962
|
*
|
|
10964
|
-
*
|
|
10965
|
-
* call site
|
|
10966
|
-
*
|
|
10967
|
-
*
|
|
10963
|
+
* `load` is the fallible store read (`loadDeviceConfig(configStore, id)`), and
|
|
10964
|
+
* every existing call site keeps its signature: the controller is handed
|
|
10965
|
+
* {@link RecordingConfigMirror.read} and cannot tell the difference, which is
|
|
10966
|
+
* the point — the trigger post-buffer is the path that got CAUGHT writing a
|
|
10967
|
+
* wrong number, but it is one of six reads and the other five are the volume.
|
|
10968
10968
|
*/
|
|
10969
|
-
function
|
|
10969
|
+
function createRecordingConfigMirror(deps) {
|
|
10970
10970
|
const now = deps.now ?? (() => Date.now());
|
|
10971
|
-
const
|
|
10972
|
-
|
|
10971
|
+
const freshMs = deps.freshMs ?? 3e4;
|
|
10972
|
+
const reportIntervalMs = deps.reportIntervalMs ?? 6e4;
|
|
10973
|
+
const mirror = /* @__PURE__ */ new Map();
|
|
10974
|
+
const window = {
|
|
10975
|
+
served: 0,
|
|
10976
|
+
storeReads: 0,
|
|
10977
|
+
fallbacks: 0,
|
|
10978
|
+
startedAt: now()
|
|
10979
|
+
};
|
|
10980
|
+
/**
|
|
10981
|
+
* One line per window, fleet-level (no `deviceId`: this aggregates every
|
|
10982
|
+
* camera, and the per-camera lines are the fallback WARNs above).
|
|
10983
|
+
*
|
|
10984
|
+
* It exists because a branch that ACCEPTS work and produces no store traffic
|
|
10985
|
+
* is indistinguishable from a branch nobody calls: without this line, a
|
|
10986
|
+
* mirror that silently stopped mirroring and a mirror doing its job both look
|
|
10987
|
+
* like silence, and the only visible difference is 1 800 calls a minute on a
|
|
10988
|
+
* runner nobody is watching.
|
|
10989
|
+
*/
|
|
10990
|
+
const reportIfDue = (atMs) => {
|
|
10991
|
+
const windowMs = atMs - window.startedAt;
|
|
10992
|
+
if (windowMs < reportIntervalMs) return;
|
|
10993
|
+
const calls = window.served + window.storeReads;
|
|
10994
|
+
window.startedAt = atMs;
|
|
10995
|
+
const served = window.served;
|
|
10996
|
+
const storeReads = window.storeReads;
|
|
10997
|
+
const fallbacks = window.fallbacks;
|
|
10998
|
+
window.served = 0;
|
|
10999
|
+
window.storeReads = 0;
|
|
11000
|
+
window.fallbacks = 0;
|
|
11001
|
+
if (calls === 0) return;
|
|
11002
|
+
deps.logger.info("recorder: config mirror window", { meta: {
|
|
11003
|
+
served,
|
|
11004
|
+
storeReads,
|
|
11005
|
+
fallbacks,
|
|
11006
|
+
devices: mirror.size,
|
|
11007
|
+
windowMs,
|
|
11008
|
+
freshMs
|
|
11009
|
+
} });
|
|
11010
|
+
};
|
|
11011
|
+
const read = async (deviceId) => {
|
|
11012
|
+
const atMs = now();
|
|
11013
|
+
reportIfDue(atMs);
|
|
11014
|
+
const held = mirror.get(deviceId);
|
|
11015
|
+
if (held !== void 0 && atMs - held.atMs < freshMs) {
|
|
11016
|
+
window.served += 1;
|
|
11017
|
+
return held.config;
|
|
11018
|
+
}
|
|
11019
|
+
window.storeReads += 1;
|
|
10973
11020
|
try {
|
|
10974
11021
|
const config = await deps.load(deviceId);
|
|
10975
|
-
|
|
11022
|
+
mirror.set(deviceId, {
|
|
10976
11023
|
config,
|
|
10977
11024
|
atMs: now()
|
|
10978
11025
|
});
|
|
10979
11026
|
return config;
|
|
10980
11027
|
} catch (err) {
|
|
10981
|
-
const cached =
|
|
11028
|
+
const cached = mirror.get(deviceId);
|
|
10982
11029
|
if (cached === void 0) {
|
|
10983
11030
|
deps.logger.warn("recorder: config read failed and NOTHING is cached for this camera — no last-known-good to serve", {
|
|
10984
11031
|
tags: { deviceId },
|
|
@@ -10986,17 +11033,29 @@ function withLastKnownConfig(deps) {
|
|
|
10986
11033
|
});
|
|
10987
11034
|
throw err;
|
|
10988
11035
|
}
|
|
10989
|
-
|
|
11036
|
+
window.fallbacks += 1;
|
|
10990
11037
|
deps.logger.warn("recorder: config read failed — serving the LAST-KNOWN-GOOD config (not the shipped default)", {
|
|
10991
11038
|
tags: { deviceId },
|
|
10992
11039
|
meta: {
|
|
10993
|
-
ageMs,
|
|
11040
|
+
ageMs: now() - cached.atMs,
|
|
10994
11041
|
error: errMsg(err)
|
|
10995
11042
|
}
|
|
10996
11043
|
});
|
|
10997
11044
|
return cached.config;
|
|
10998
11045
|
}
|
|
10999
11046
|
};
|
|
11047
|
+
return {
|
|
11048
|
+
read,
|
|
11049
|
+
put(deviceId, config) {
|
|
11050
|
+
mirror.set(deviceId, {
|
|
11051
|
+
config,
|
|
11052
|
+
atMs: now()
|
|
11053
|
+
});
|
|
11054
|
+
},
|
|
11055
|
+
invalidate(deviceId) {
|
|
11056
|
+
mirror.delete(deviceId);
|
|
11057
|
+
}
|
|
11058
|
+
};
|
|
11000
11059
|
}
|
|
11001
11060
|
//#endregion
|
|
11002
11061
|
//#region src/recorder/addon/ledger-walk-reconcile.ts
|
|
@@ -17452,21 +17511,22 @@ var RecorderV2Addon = class extends BaseAddon {
|
|
|
17452
17511
|
/** Continuous + events band write-path controller (ffmpeg writers + watchers). */
|
|
17453
17512
|
controller = null;
|
|
17454
17513
|
/**
|
|
17455
|
-
* The controller's config read
|
|
17514
|
+
* The controller's config read — this addon's mirror of the rows it owns
|
|
17515
|
+
* (`config-mirror.ts`, D466), with the last-known-good fallback.
|
|
17456
17516
|
*
|
|
17457
|
-
* Built ONCE and memoized, because the
|
|
17458
|
-
*
|
|
17459
|
-
* to
|
|
17460
|
-
*
|
|
17461
|
-
* `undefined` at that point.
|
|
17517
|
+
* Built ONCE and memoized, because the map lives INSIDE it: rebuilding it per
|
|
17518
|
+
* call would throw away both the freshness the trigger path is served from
|
|
17519
|
+
* and the last value a failed read falls back to. Lazy rather than a field
|
|
17520
|
+
* initializer — a field initializer runs before the constructor assigns
|
|
17521
|
+
* `this.ctx`, so `this.ctx.logger` would be `undefined` at that point.
|
|
17462
17522
|
*/
|
|
17463
|
-
|
|
17464
|
-
get
|
|
17465
|
-
this.
|
|
17523
|
+
mirroredConfigRead = null;
|
|
17524
|
+
get configMirror() {
|
|
17525
|
+
this.mirroredConfigRead ??= createRecordingConfigMirror({
|
|
17466
17526
|
load: (deviceId) => loadDeviceConfig(this.configStore(), deviceId),
|
|
17467
17527
|
logger: this.ctx.logger
|
|
17468
17528
|
});
|
|
17469
|
-
return this.
|
|
17529
|
+
return this.mirroredConfigRead;
|
|
17470
17530
|
}
|
|
17471
17531
|
/** Unsubscribe handle for the EventCapture motion subscription. */
|
|
17472
17532
|
eventUnsub = null;
|
|
@@ -17714,7 +17774,7 @@ var RecorderV2Addon = class extends BaseAddon {
|
|
|
17714
17774
|
nodeId: this.nodeId,
|
|
17715
17775
|
ownerNodeId: ingestOwner.ownerNodeId,
|
|
17716
17776
|
segmentStore: this.segmentStore,
|
|
17717
|
-
loadConfig: this.
|
|
17777
|
+
loadConfig: this.configMirror.read,
|
|
17718
17778
|
enabledDeviceIds: async () => [...(await readDeviceConfigs(this.configStore())).keys()],
|
|
17719
17779
|
/**
|
|
17720
17780
|
* The DURABLE half of the trigger path (D8/D11). `pipelineAnalytics` rows
|
|
@@ -17853,6 +17913,9 @@ var RecorderV2Addon = class extends BaseAddon {
|
|
|
17853
17913
|
calendar: this.calendar,
|
|
17854
17914
|
mfraFor: (deviceId, profile, startMs) => this.mfraTables.get(deviceId, profile, startMs),
|
|
17855
17915
|
hydrateWindow: (deviceId, fromMs, toMs, verifyClosedHours) => hydrateWindowFromStorage(this.index, deviceId, fromMs, toMs, this.resolvedLocations, this.ctx.logger, this.segmentHours ?? void 0, { verifyClosedHours: verifyClosedHours === true }),
|
|
17916
|
+
onConfigSaved: (deviceId, config) => {
|
|
17917
|
+
this.configMirror.put(deviceId, config);
|
|
17918
|
+
},
|
|
17856
17919
|
onConfigChanged: async (deviceId) => {
|
|
17857
17920
|
await this.refreshSensorTriggerBindings();
|
|
17858
17921
|
await (this.controller?.onConfigChanged(deviceId) ?? Promise.resolve());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-DZsjVFey.js");
|
|
3
3
|
let node_child_process = require("node:child_process");
|
|
4
4
|
//#region ../../node_modules/mp4box/dist/mp4box.all.js
|
|
5
5
|
var require_mp4box_all = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "./chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { Lt as errMsg } from "./dist-
|
|
2
|
+
import { Lt as errMsg } from "./dist-BNzfbpF6.mjs";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
//#region ../../node_modules/mp4box/dist/mp4box.all.js
|
|
5
5
|
var require_mp4box_all = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -3,7 +3,7 @@ import "./dist-CYZr2fwk.mjs";
|
|
|
3
3
|
var e = {
|
|
4
4
|
"@camstack/sdk": {
|
|
5
5
|
name: "@camstack/sdk",
|
|
6
|
-
version: "1.2.
|
|
6
|
+
version: "1.2.100",
|
|
7
7
|
scope: ["default"],
|
|
8
8
|
loaded: !1,
|
|
9
9
|
from: "addon_stream_broker_widgets",
|
|
@@ -18,7 +18,7 @@ var e = {
|
|
|
18
18
|
},
|
|
19
19
|
"@camstack/types": {
|
|
20
20
|
name: "@camstack/types",
|
|
21
|
-
version: "1.2.
|
|
21
|
+
version: "1.2.180",
|
|
22
22
|
scope: ["default"],
|
|
23
23
|
loaded: !1,
|
|
24
24
|
from: "addon_stream_broker_widgets",
|
|
@@ -33,7 +33,7 @@ var e = {
|
|
|
33
33
|
},
|
|
34
34
|
"@camstack/ui-library": {
|
|
35
35
|
name: "@camstack/ui-library",
|
|
36
|
-
version: "1.2.
|
|
36
|
+
version: "1.2.148",
|
|
37
37
|
scope: ["default"],
|
|
38
38
|
loaded: !1,
|
|
39
39
|
from: "addon_stream_broker_widgets",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_segment_demux_js = require("../segment-demux-js-
|
|
1
|
+
const require_segment_demux_js = require("../segment-demux-js-Cvszh55p.js");
|
|
2
2
|
let node_worker_threads = require("node:worker_threads");
|
|
3
3
|
//#region src/stream-broker/recorded/demux-worker-child.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as demuxSegmentFullJs } from "../segment-demux-js-
|
|
1
|
+
import { t as demuxSegmentFullJs } from "../segment-demux-js-Dh1dn_AT.mjs";
|
|
2
2
|
import { parentPort } from "node:worker_threads";
|
|
3
3
|
//#region src/stream-broker/recorded/demux-worker-child.ts
|
|
4
4
|
/**
|
|
@@ -36,7 +36,7 @@ async function r() {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"@camstack/types": {
|
|
39
|
-
version: "1.2.
|
|
39
|
+
version: "1.2.180",
|
|
40
40
|
scope: "default",
|
|
41
41
|
shareConfig: {
|
|
42
42
|
singleton: !0,
|
|
@@ -45,7 +45,7 @@ async function r() {
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"@camstack/sdk": {
|
|
48
|
-
version: "1.2.
|
|
48
|
+
version: "1.2.100",
|
|
49
49
|
scope: "default",
|
|
50
50
|
shareConfig: {
|
|
51
51
|
singleton: !0,
|
|
@@ -81,7 +81,7 @@ async function r() {
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"@camstack/ui-library": {
|
|
84
|
-
version: "1.2.
|
|
84
|
+
version: "1.2.148",
|
|
85
85
|
scope: "default",
|
|
86
86
|
shareConfig: {
|
|
87
87
|
singleton: !0,
|