@camstack/addon-pipeline 1.2.373 → 1.2.375
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 +3 -3
- package/dist/audio-analyzer/index.mjs +3 -3
- package/dist/{custom-model-catalog-UaaDgBow.mjs → custom-model-catalog-DF5qs8u4.mjs} +2 -2
- package/dist/{custom-model-catalog-M-ECFeNJ.js → custom-model-catalog-gbLoUFki.js} +2 -2
- package/dist/detection-pipeline/index.js +4 -4
- package/dist/detection-pipeline/index.mjs +4 -4
- package/dist/{dist-QBVFmPYQ.js → dist-C0Mg8e3I.js} +924 -50
- package/dist/{dist-BT3uSeR7.mjs → dist-QyeZXkAO.mjs} +919 -51
- package/dist/{model-catalogs-C42Mo0jo.js → model-catalogs-BTuX-P0k.js} +1 -1
- package/dist/{model-catalogs-ChW0i2P6.mjs → model-catalogs-CIE4Dz4x.mjs} +1 -1
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-B6ev-Hqa.js → node-CifGKjsd.js} +1 -1
- package/dist/{node-BVRFl1hZ.mjs → node-ndjp9DQO.mjs} +1 -1
- package/dist/pipeline-runner/index.js +3 -3
- package/dist/pipeline-runner/index.mjs +3 -3
- package/dist/{process-memory-Cdf2A2qg.js → process-memory-BMfSP5-i.js} +1 -1
- package/dist/{process-memory-DdeedEgU.mjs → process-memory-CaMI-Ry2.mjs} +1 -1
- package/dist/recorder/index.js +265 -94
- package/dist/recorder/index.mjs +263 -92
- package/dist/{segment-demux-js-8CfbEFeD.mjs → segment-demux-js-CLXBgUTo.mjs} +1 -1
- package/dist/{segment-demux-js-Dp0OI-2n.js → segment-demux-js-LhwVw18z.js} +1 -1
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Dl3wrJnM.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-B4MD_B4k.mjs} +2 -2
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BvMrdOCD.mjs +26 -0
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-JVFs9LgI.mjs +26 -0
- 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-Bq36nWMP.mjs → hostInit-DBDp5YHD.mjs} +2 -2
- package/dist/stream-broker/index.js +1229 -288
- package/dist/stream-broker/index.mjs +1229 -288
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/package.json +5 -1
- package/dist/retire-root-keys-Csb8z2f3.js +0 -338
- package/dist/retire-root-keys-DZvlso2l.mjs +0 -327
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C3ssSNKh.mjs +0 -26
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BFRtKBOe.mjs +0 -26
package/dist/recorder/index.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { $n as
|
|
2
|
-
import { a as physicalRootOf, i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-
|
|
1
|
+
import { $n as userError, $t as recordingArchiveCapability, An as errMsg$1, B as RECORDING_SOURCE_CAMSTACK_ADDON, Bn as defineCustomActions, Bt as memoizePinnedFfmpeg, C as EVENT_PAD_MS, Ct as evictionPolicyForMode, Ft as loadContributionCapability, G as VIDEOCLIPS_MAX_OFFER_BYTES, H as RecordingConfigSchema, Ht as modeMayWrite, K as VISIT_MERGE_GAP_MS, Mn as BaseAddon, Mt as isFirstLevelMacroClass, N as OpsLogEntrySchema, On as DeviceFeature, Ot as gbToBytes, Qn as sleep$1, R as RECORDING_EXPORT_MAX_READ_BYTES, Rt as mayReadLocation, S as EVENT_OWNER_TYPES, T as ExportRecordSchema, Tn as evaluateSensorEdge, Tt as exportSubjectOf, U as RecordingSignalStatusSchema, Un as hydrateSchema, Vt as migrateLegacyDeviceSignalConfig, Yn as nodePin, Z as armRemovalReconcile, Zn as selectAssignedProfileSlots, _n as stripRetiredBandPreBufferSec, at as clipExportFailure, cr as preprocess, en as recordingCapability, er as _enum, fr as EventCategory, hn as storageOccupancyCapability, ht as deriveRecordingMode, in as resolveCreateExportSubject, kn as DeviceType, ln as resolveRecordingProfiles, lr as record, mn as storageEvictableCapability, nn as recordingSignalCapability, nr as boolean, o as BatteryStatusSchema, on as resolveLocationMode, or as number, ot as clipExportFailureOf, pt as deriveBatteryPresence, s as CLIP_BROKER_PACED_RATES, sr as object, tn as recordingExportCapability, tr as array, tt as batteryCapability, ur as string, v as DEFAULT_EVENTS_BAND_BUFFER_SEC, vt as deviceRemovalHookCapability, wt as evictionPolicyOfLocation, yn as videoclipsCapability, z as RECORDING_SOURCE_CAMSTACK, zn as customAction, zt as mayWriteToLocation } from "../dist-QyeZXkAO.mjs";
|
|
2
|
+
import { a as physicalRootOf, i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-ndjp9DQO.mjs";
|
|
3
3
|
import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
|
|
4
4
|
import { d as PREBUFFER_MAX_MS, l as withRecordingIntent, r as RECORDING_PRE_ROLL_REQUEST_MS } from "../restream-intent-DyGmLAU9.mjs";
|
|
5
|
-
import { n as RowMapStore, t as retireRootKeys } from "../retire-root-keys-DZvlso2l.mjs";
|
|
6
5
|
import { randomUUID } from "node:crypto";
|
|
7
6
|
import { createReadStream, promises, realpathSync } from "node:fs";
|
|
8
7
|
import path from "node:path";
|
|
@@ -5047,12 +5046,8 @@ var DeviceSettingsConfigsState = class {
|
|
|
5047
5046
|
}
|
|
5048
5047
|
async readAllRaw() {
|
|
5049
5048
|
const out = /* @__PURE__ */ new Map();
|
|
5050
|
-
const
|
|
5051
|
-
const
|
|
5052
|
-
if (list === void 0 && fallback === void 0) throw new Error("the per-device settings cannot list their devices on this view");
|
|
5053
|
-
const ids = list !== void 0 ? await list.call(this.deps.settings) : fallback !== void 0 ? await fallback() : [];
|
|
5054
|
-
const batch = this.deps.settings.readDeviceStoreBatch;
|
|
5055
|
-
const blobs = batch === void 0 ? new Map(await Promise.all(ids.map(async (id) => [id, await this.deps.settings.readDeviceStore(id)]))) : await batch.call(this.deps.settings, ids);
|
|
5049
|
+
const ids = await this.deps.settings.listDeviceStoreIds();
|
|
5050
|
+
const blobs = await this.deps.settings.readDeviceStoreBatch(ids);
|
|
5056
5051
|
for (const [id, blob] of blobs) {
|
|
5057
5052
|
const held = blob[RECORDING_CONFIG_KEY];
|
|
5058
5053
|
if (held !== void 0) out.set(String(id), held);
|
|
@@ -6148,7 +6143,9 @@ Object.freeze({
|
|
|
6148
6143
|
},
|
|
6149
6144
|
"setDeviceConfig": { "config": { "__nested__": { "bands": [] } } }
|
|
6150
6145
|
},
|
|
6146
|
+
"records": { "query": { "limit": 100 } },
|
|
6151
6147
|
"storage": { "upsertLocation": { "isSystem": false } },
|
|
6148
|
+
"storage-admin": { "readRecords": { "limit": 100 } },
|
|
6152
6149
|
"storage-provider": {
|
|
6153
6150
|
"beginDownload": { "location": { "__nested__": { "isSystem": false } } },
|
|
6154
6151
|
"beginUpload": { "location": { "__nested__": { "isSystem": false } } },
|
|
@@ -6583,6 +6580,18 @@ Object.freeze({
|
|
|
6583
6580
|
{
|
|
6584
6581
|
"path": "swingHorizontal",
|
|
6585
6582
|
"valueType": "boolean"
|
|
6583
|
+
},
|
|
6584
|
+
{
|
|
6585
|
+
"path": "minTemp",
|
|
6586
|
+
"valueType": "number"
|
|
6587
|
+
},
|
|
6588
|
+
{
|
|
6589
|
+
"path": "maxTemp",
|
|
6590
|
+
"valueType": "number"
|
|
6591
|
+
},
|
|
6592
|
+
{
|
|
6593
|
+
"path": "tempStep",
|
|
6594
|
+
"valueType": "number"
|
|
6586
6595
|
}
|
|
6587
6596
|
],
|
|
6588
6597
|
"color": [
|
|
@@ -8352,6 +8361,249 @@ function buildExportArgs(input) {
|
|
|
8352
8361
|
outPath
|
|
8353
8362
|
];
|
|
8354
8363
|
}
|
|
8364
|
+
var ROW_MAP_VALUE_COLUMN = "value";
|
|
8365
|
+
var RowMapStore = class RowMapStore {
|
|
8366
|
+
spec;
|
|
8367
|
+
store;
|
|
8368
|
+
logger;
|
|
8369
|
+
constructor(deps) {
|
|
8370
|
+
this.spec = deps.spec;
|
|
8371
|
+
this.store = deps.store;
|
|
8372
|
+
this.logger = deps.logger;
|
|
8373
|
+
}
|
|
8374
|
+
/** The collection this store owns — for the caller's own log lines. */
|
|
8375
|
+
get collection() {
|
|
8376
|
+
return this.spec.collection;
|
|
8377
|
+
}
|
|
8378
|
+
/**
|
|
8379
|
+
* Register the collection. MUST run at boot, before any read or write: the
|
|
8380
|
+
* SQLite backend answers 412 for an undeclared collection.
|
|
8381
|
+
*/
|
|
8382
|
+
static declare(store, spec) {
|
|
8383
|
+
return store.declareCollection.mutate({
|
|
8384
|
+
collection: spec.collection,
|
|
8385
|
+
columns: [
|
|
8386
|
+
{
|
|
8387
|
+
name: "id",
|
|
8388
|
+
type: "TEXT",
|
|
8389
|
+
primaryKey: true,
|
|
8390
|
+
notNull: true
|
|
8391
|
+
},
|
|
8392
|
+
...spec.columns,
|
|
8393
|
+
{
|
|
8394
|
+
name: ROW_MAP_VALUE_COLUMN,
|
|
8395
|
+
type: "JSON",
|
|
8396
|
+
notNull: true
|
|
8397
|
+
}
|
|
8398
|
+
],
|
|
8399
|
+
...spec.indexes !== void 0 ? { indexes: [...spec.indexes] } : {}
|
|
8400
|
+
});
|
|
8401
|
+
}
|
|
8402
|
+
declare() {
|
|
8403
|
+
return RowMapStore.declare(this.store, this.spec);
|
|
8404
|
+
}
|
|
8405
|
+
/** One entry, by key. `null` when absent OR unparseable (which is said aloud). */
|
|
8406
|
+
async read(key) {
|
|
8407
|
+
const raw = await this.store.get.query({
|
|
8408
|
+
collection: this.spec.collection,
|
|
8409
|
+
key
|
|
8410
|
+
});
|
|
8411
|
+
if (!isRecord(raw)) return null;
|
|
8412
|
+
const row = raw;
|
|
8413
|
+
const parsed = this.spec.schema.safeParse(row[ROW_MAP_VALUE_COLUMN]);
|
|
8414
|
+
if (!parsed.success) {
|
|
8415
|
+
this.logger.warn("row-map row skipped as unparseable", {
|
|
8416
|
+
...this.deviceTags(row),
|
|
8417
|
+
meta: {
|
|
8418
|
+
collection: this.spec.collection,
|
|
8419
|
+
key,
|
|
8420
|
+
error: parsed.error.message
|
|
8421
|
+
}
|
|
8422
|
+
});
|
|
8423
|
+
return null;
|
|
8424
|
+
}
|
|
8425
|
+
return parsed.data;
|
|
8426
|
+
}
|
|
8427
|
+
/**
|
|
8428
|
+
* Every entry, keyed. Unparseable rows are skipped — one bad entry costs that
|
|
8429
|
+
* entry, never the map.
|
|
8430
|
+
*/
|
|
8431
|
+
async readAll() {
|
|
8432
|
+
const records = await this.store.query.query({
|
|
8433
|
+
collection: this.spec.collection,
|
|
8434
|
+
filter: { limit: this.spec.loadLimit }
|
|
8435
|
+
});
|
|
8436
|
+
const out = /* @__PURE__ */ new Map();
|
|
8437
|
+
let skipped = 0;
|
|
8438
|
+
for (const record of records) {
|
|
8439
|
+
const parsed = this.spec.schema.safeParse(record.data[ROW_MAP_VALUE_COLUMN]);
|
|
8440
|
+
if (!parsed.success) {
|
|
8441
|
+
skipped += 1;
|
|
8442
|
+
continue;
|
|
8443
|
+
}
|
|
8444
|
+
out.set(record.id, parsed.data);
|
|
8445
|
+
}
|
|
8446
|
+
if (skipped > 0) this.logger.warn("row-map rows skipped as unparseable", { meta: {
|
|
8447
|
+
collection: this.spec.collection,
|
|
8448
|
+
skipped,
|
|
8449
|
+
kept: out.size
|
|
8450
|
+
} });
|
|
8451
|
+
if (records.length >= this.spec.loadLimit) this.logger.warn("row-map read hit its own bound — the map may be truncated", { meta: {
|
|
8452
|
+
collection: this.spec.collection,
|
|
8453
|
+
loadLimit: this.spec.loadLimit
|
|
8454
|
+
} });
|
|
8455
|
+
return out;
|
|
8456
|
+
}
|
|
8457
|
+
/**
|
|
8458
|
+
* Every entry as it was WRITTEN, unvalidated and unparsed — the read a
|
|
8459
|
+
* MIGRATION needs.
|
|
8460
|
+
*
|
|
8461
|
+
* {@link readAll} answers through the CURRENT schema, which is exactly what a
|
|
8462
|
+
* migration must not do: a retired key is stripped by a non-strict `z.object`
|
|
8463
|
+
* before the migration could see it, so the row it is there to rescue looks
|
|
8464
|
+
* like a row that never needed rescuing. Only a migration should call this;
|
|
8465
|
+
* everything else wants the validated read.
|
|
8466
|
+
*/
|
|
8467
|
+
async readAllRaw() {
|
|
8468
|
+
const records = await this.store.query.query({
|
|
8469
|
+
collection: this.spec.collection,
|
|
8470
|
+
filter: { limit: this.spec.loadLimit }
|
|
8471
|
+
});
|
|
8472
|
+
const out = /* @__PURE__ */ new Map();
|
|
8473
|
+
for (const record of records) out.set(record.id, record.data[ROW_MAP_VALUE_COLUMN]);
|
|
8474
|
+
return out;
|
|
8475
|
+
}
|
|
8476
|
+
/** Insert or replace ONE entry. Validates at the boundary. */
|
|
8477
|
+
async write(key, value) {
|
|
8478
|
+
const validated = this.spec.schema.parse(value);
|
|
8479
|
+
const columns = this.spec.project(key, validated);
|
|
8480
|
+
await this.store.set.mutate({
|
|
8481
|
+
collection: this.spec.collection,
|
|
8482
|
+
key,
|
|
8483
|
+
value: {
|
|
8484
|
+
...columns,
|
|
8485
|
+
[ROW_MAP_VALUE_COLUMN]: validated
|
|
8486
|
+
}
|
|
8487
|
+
});
|
|
8488
|
+
}
|
|
8489
|
+
/** Drop ONE entry. Idempotent. */
|
|
8490
|
+
async remove(key) {
|
|
8491
|
+
await this.store.delete.mutate({
|
|
8492
|
+
collection: this.spec.collection,
|
|
8493
|
+
key
|
|
8494
|
+
});
|
|
8495
|
+
}
|
|
8496
|
+
/**
|
|
8497
|
+
* Make the collection hold exactly `next` — the write path for an owner whose
|
|
8498
|
+
* in-memory map IS the authority (a persister handed the complete set).
|
|
8499
|
+
*
|
|
8500
|
+
* Returns how many rows were DELETED, and says so out loud when any were: a
|
|
8501
|
+
* replace that silently drops rows is indistinguishable from one that never
|
|
8502
|
+
* had them. Only an owner holding an authoritative set may call this — a
|
|
8503
|
+
* prune driven by a fallible read is work destroyed (D130, D49).
|
|
8504
|
+
*/
|
|
8505
|
+
async replaceAll(next) {
|
|
8506
|
+
const held = await this.store.query.query({
|
|
8507
|
+
collection: this.spec.collection,
|
|
8508
|
+
filter: { limit: this.spec.loadLimit }
|
|
8509
|
+
});
|
|
8510
|
+
for (const [key, value] of next) await this.write(key, value);
|
|
8511
|
+
const doomed = held.filter((record) => !next.has(record.id));
|
|
8512
|
+
for (const record of doomed) await this.remove(record.id);
|
|
8513
|
+
if (doomed.length > 0) this.logger.warn("row-map replaceAll dropped rows", { meta: {
|
|
8514
|
+
collection: this.spec.collection,
|
|
8515
|
+
dropped: doomed.length,
|
|
8516
|
+
keys: doomed.slice(0, 20).map((r) => r.id),
|
|
8517
|
+
remaining: next.size
|
|
8518
|
+
} });
|
|
8519
|
+
return doomed.length;
|
|
8520
|
+
}
|
|
8521
|
+
/**
|
|
8522
|
+
* The entries matching a projected-column predicate, in the order asked for.
|
|
8523
|
+
*
|
|
8524
|
+
* This is what projecting columns BUYS: "every export for camera 617, newest
|
|
8525
|
+
* first, capped at 50" is an indexed `WHERE` + `ORDER BY` + `LIMIT`, not a
|
|
8526
|
+
* parse of the whole map followed by a filter in JS.
|
|
8527
|
+
*
|
|
8528
|
+
* A `limit` is REQUIRED — `settings-store.query` silently caps an unbounded
|
|
8529
|
+
* read at 2 000 rows and answers as if that were everything.
|
|
8530
|
+
*/
|
|
8531
|
+
async readWhere(filter) {
|
|
8532
|
+
const records = await this.store.query.query({
|
|
8533
|
+
collection: this.spec.collection,
|
|
8534
|
+
filter: {
|
|
8535
|
+
...filter.where !== void 0 ? { where: filter.where } : {},
|
|
8536
|
+
...filter.whereIn !== void 0 ? { whereIn: filter.whereIn } : {},
|
|
8537
|
+
...filter.whereBetween !== void 0 ? { whereBetween: filter.whereBetween } : {},
|
|
8538
|
+
...filter.orderBy !== void 0 ? { orderBy: filter.orderBy } : {},
|
|
8539
|
+
...filter.offset !== void 0 ? { offset: filter.offset } : {},
|
|
8540
|
+
limit: filter.limit ?? this.spec.loadLimit
|
|
8541
|
+
}
|
|
8542
|
+
});
|
|
8543
|
+
const out = [];
|
|
8544
|
+
let skipped = 0;
|
|
8545
|
+
for (const record of records) {
|
|
8546
|
+
const parsed = this.spec.schema.safeParse(record.data[ROW_MAP_VALUE_COLUMN]);
|
|
8547
|
+
if (!parsed.success) {
|
|
8548
|
+
skipped += 1;
|
|
8549
|
+
continue;
|
|
8550
|
+
}
|
|
8551
|
+
out.push({
|
|
8552
|
+
key: record.id,
|
|
8553
|
+
value: parsed.data
|
|
8554
|
+
});
|
|
8555
|
+
}
|
|
8556
|
+
if (skipped > 0) this.logger.warn("row-map rows skipped as unparseable", { meta: {
|
|
8557
|
+
collection: this.spec.collection,
|
|
8558
|
+
skipped,
|
|
8559
|
+
kept: out.length
|
|
8560
|
+
} });
|
|
8561
|
+
return out;
|
|
8562
|
+
}
|
|
8563
|
+
/** How many rows match, without materialising one. */
|
|
8564
|
+
async count(filter) {
|
|
8565
|
+
return this.store.count.query({
|
|
8566
|
+
collection: this.spec.collection,
|
|
8567
|
+
...filter !== void 0 ? { filter: {
|
|
8568
|
+
...filter.where !== void 0 ? { where: filter.where } : {},
|
|
8569
|
+
...filter.whereIn !== void 0 ? { whereIn: filter.whereIn } : {},
|
|
8570
|
+
...filter.whereBetween !== void 0 ? { whereBetween: filter.whereBetween } : {}
|
|
8571
|
+
} } : {}
|
|
8572
|
+
});
|
|
8573
|
+
}
|
|
8574
|
+
/**
|
|
8575
|
+
* Delete every row matching a predicate, in ONE statement. Returns how many
|
|
8576
|
+
* went, and says so — a retention trim that silently drops rows is
|
|
8577
|
+
* indistinguishable from one that had nothing to do.
|
|
8578
|
+
*
|
|
8579
|
+
* The predicate is REQUIRED and the engine REFUSES one that compiles to
|
|
8580
|
+
* nothing: deleting a whole collection is a legitimate intent, but it must be
|
|
8581
|
+
* asked for by name rather than reached through an empty object.
|
|
8582
|
+
*/
|
|
8583
|
+
async deleteWhere(filter) {
|
|
8584
|
+
const { deleted } = await this.store.deleteWhere.mutate({
|
|
8585
|
+
collection: this.spec.collection,
|
|
8586
|
+
filter
|
|
8587
|
+
});
|
|
8588
|
+
if (deleted > 0) this.logger.warn("row-map deleteWhere dropped rows", { meta: {
|
|
8589
|
+
collection: this.spec.collection,
|
|
8590
|
+
deleted,
|
|
8591
|
+
filter
|
|
8592
|
+
} });
|
|
8593
|
+
return deleted;
|
|
8594
|
+
}
|
|
8595
|
+
/** `tags: { deviceId }` off the PROJECTED column, when the spec names one. */
|
|
8596
|
+
deviceTags(row) {
|
|
8597
|
+
const column = this.spec.deviceIdColumn;
|
|
8598
|
+
if (column === void 0) return {};
|
|
8599
|
+
const raw = row[column];
|
|
8600
|
+
return typeof raw === "number" && Number.isInteger(raw) ? { tags: { deviceId: raw } } : {};
|
|
8601
|
+
}
|
|
8602
|
+
};
|
|
8603
|
+
/** A store payload that is a plain object, or `null`. A type guard, not a cast. */
|
|
8604
|
+
function isRecord(value) {
|
|
8605
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
8606
|
+
}
|
|
8355
8607
|
//#endregion
|
|
8356
8608
|
//#region src/recorder/addon/export-store.ts
|
|
8357
8609
|
/**
|
|
@@ -14780,40 +15032,8 @@ var LocationRefresher = class {
|
|
|
14780
15032
|
}
|
|
14781
15033
|
}
|
|
14782
15034
|
};
|
|
14783
|
-
//#endregion
|
|
14784
|
-
//#region src/recorder/addon/ops-log-store.ts
|
|
14785
|
-
/**
|
|
14786
|
-
* Recordings ops-log persistence for the recorder addon.
|
|
14787
|
-
*
|
|
14788
|
-
* ONE ROW PER OPERATION in `recorder:ops-log`, through {@link RowMapStore}. The
|
|
14789
|
-
* ring is still bounded — `maxEntries` newest rows survive — but the eviction
|
|
14790
|
-
* is now a single `DELETE … WHERE at BETWEEN`, and a listing is an indexed
|
|
14791
|
-
* `WHERE deviceId … ORDER BY at DESC LIMIT`.
|
|
14792
|
-
*
|
|
14793
|
-
* ## What this replaced
|
|
14794
|
-
*
|
|
14795
|
-
* The ring lived in ONE key of the recorder's `addon-settings` / `root` blob,
|
|
14796
|
-
* as a flat JSON array. On the reference hub it was 147 437 bytes of that row's
|
|
14797
|
-
* 201 833 — so appending one audit line read, parsed, re-serialised and rewrote
|
|
14798
|
-
* ~200 KB, and so did every unrelated reader of that row (`resolveConfig`,
|
|
14799
|
-
* `loadDeviceConfig`, the export progress patch). The ops log is the CHEAPEST
|
|
14800
|
-
* thing in the recorder and it was paying for the most expensive.
|
|
14801
|
-
*
|
|
14802
|
-
* Writes stay BEST-EFFORT: `createRecordingOpsLogSink().append` never throws —
|
|
14803
|
-
* a failed audit write must not fail the operation it records.
|
|
14804
|
-
*/
|
|
14805
|
-
/**
|
|
14806
|
-
* @durable class=audit owner=recorder
|
|
14807
|
-
* write="one row per recordings operation (prune, evict, relocate, export, …), appended
|
|
14808
|
-
* best-effort by `createRecordingOpsLogSink().append` — never read back by the system,
|
|
14809
|
-
* only listed by an operator through the `recording.listOpsLog` cap method"
|
|
14810
|
-
* retention="a bounded ring: every append trims to the newest OPS_LOG_RING_DEFAULT_MAX
|
|
14811
|
-
* (500) rows with one `deleteWhere` on `at`. Rows tied on the cutoff millisecond
|
|
14812
|
-
* survive, so the ring may hold a few MORE than the cap and never fewer."
|
|
14813
|
-
*/
|
|
14814
|
-
var RECORDING_OPS_LOG_COLLECTION = "recorder:ops-log";
|
|
14815
15035
|
var RECORDING_OPS_LOG_SPEC = {
|
|
14816
|
-
collection:
|
|
15036
|
+
collection: "recorder:ops-log",
|
|
14817
15037
|
schema: OpsLogEntrySchema,
|
|
14818
15038
|
columns: [{
|
|
14819
15039
|
name: "at",
|
|
@@ -20955,25 +21175,6 @@ var RetentionSweeper = class {
|
|
|
20955
21175
|
}
|
|
20956
21176
|
};
|
|
20957
21177
|
//#endregion
|
|
20958
|
-
//#region src/recorder/addon/retired-root-keys.ts
|
|
20959
|
-
var RECORDER_RETIRED_ROOT_KEYS = [
|
|
20960
|
-
{
|
|
20961
|
-
key: "recordingOpsLog",
|
|
20962
|
-
successor: RECORDING_OPS_LOG_COLLECTION,
|
|
20963
|
-
reason: "the audit ring is one row per operation since the flatten; as a blob it was 147 KB of the 201 KB root row, re-parsed by every unrelated reader of that row"
|
|
20964
|
-
},
|
|
20965
|
-
{
|
|
20966
|
-
key: "recordingExports",
|
|
20967
|
-
successor: RECORDING_EXPORTS_COLLECTION,
|
|
20968
|
-
reason: "one row per export job since the flatten; as a blob a once-a-second progress patch rewrote 201 KB, and an overlapping createExport erased the row (2026-08-14)"
|
|
20969
|
-
},
|
|
20970
|
-
{
|
|
20971
|
-
key: "recordingConfigs",
|
|
20972
|
-
successor: "the recorder per-device settings (key recordingConfig)",
|
|
20973
|
-
reason: "one row per camera since the flatten; as a blob, asking what camera 617 records parsed every camera in the installation"
|
|
20974
|
-
}
|
|
20975
|
-
];
|
|
20976
|
-
//#endregion
|
|
20977
21178
|
//#region src/recorder/addon/heap-delta.ts
|
|
20978
21179
|
/**
|
|
20979
21180
|
* Name the unit of work that grows the recorder's heap.
|
|
@@ -23410,7 +23611,6 @@ var RecorderV2Addon = class extends BaseAddon {
|
|
|
23410
23611
|
return { providers: [] };
|
|
23411
23612
|
}
|
|
23412
23613
|
await this.declareRowCollections();
|
|
23413
|
-
await this.purgeFlattenedSettingsKeys();
|
|
23414
23614
|
this.segmentHours = new SegmentHourLedger({
|
|
23415
23615
|
store: this.ctx.api.settingsStore,
|
|
23416
23616
|
logger: this.ctx.logger,
|
|
@@ -25240,31 +25440,6 @@ var RecorderV2Addon = class extends BaseAddon {
|
|
|
25240
25440
|
await this.opsLogStore().declare();
|
|
25241
25441
|
}
|
|
25242
25442
|
/**
|
|
25243
|
-
* Drop the flattened keys from `recorder:addon-settings` / `root`, each gated
|
|
25244
|
-
* on its own successor collection being non-empty.
|
|
25245
|
-
*
|
|
25246
|
-
* `recordingPlacement` is NOT here: it stays a blob key. It is 1.4 KB of
|
|
25247
|
-
* per-(camera, profile) assignments plus a handful of volume ids, written
|
|
25248
|
-
* only when placement changes — and the row has to survive anyway, because it
|
|
25249
|
-
* is where `BaseAddon.resolveConfig` reads the operator's config fields from.
|
|
25250
|
-
* The problem was a 201 KB row, not a blob.
|
|
25251
|
-
*
|
|
25252
|
-
* Best-effort: a purge that throws must not take recording down. The keys are
|
|
25253
|
-
* dead weight, not a fault.
|
|
25254
|
-
*/
|
|
25255
|
-
async purgeFlattenedSettingsKeys() {
|
|
25256
|
-
try {
|
|
25257
|
-
await retireRootKeys({
|
|
25258
|
-
store: this.ctx.api.settingsStore,
|
|
25259
|
-
addonId: RECORDER_ADDON_ID,
|
|
25260
|
-
logger: this.ctx.logger,
|
|
25261
|
-
specs: RECORDER_RETIRED_ROOT_KEYS
|
|
25262
|
-
});
|
|
25263
|
-
} catch (err) {
|
|
25264
|
-
this.ctx.logger.warn("recorder: retiring the flattened settings keys failed", { meta: { error: errMsg$1(err) } });
|
|
25265
|
-
}
|
|
25266
|
-
}
|
|
25267
|
-
/**
|
|
25268
25443
|
* `ctx.api.settingsStore`, wrapped ONCE through {@link censusStoreClient}.
|
|
25269
25444
|
*
|
|
25270
25445
|
* LAZY (see `calendar` above): `ctx` is not assigned until `initialize()`
|
|
@@ -25283,11 +25458,7 @@ var RecorderV2Addon = class extends BaseAddon {
|
|
|
25283
25458
|
if (settings === void 0) throw new Error("recorder: device settings are not available");
|
|
25284
25459
|
this.configsState ??= recordingConfigsState({
|
|
25285
25460
|
settings,
|
|
25286
|
-
logger: this.ctx.logger
|
|
25287
|
-
listDeviceIds: async () => (await this.ctx.api.deviceManager.listAll.query({
|
|
25288
|
-
isCamera: true,
|
|
25289
|
-
projection: "slim"
|
|
25290
|
-
})).map((device) => device.id)
|
|
25461
|
+
logger: this.ctx.logger
|
|
25291
25462
|
});
|
|
25292
25463
|
return this.configsState;
|
|
25293
25464
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "./chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { An as errMsg } from "./dist-
|
|
2
|
+
import { An as errMsg } from "./dist-QyeZXkAO.mjs";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
//#region src/stream-broker/recorded/avcc-annexb.ts
|
|
5
5
|
/**
|
|
@@ -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-C0Mg8e3I.js");
|
|
3
3
|
let node_child_process = require("node:child_process");
|
|
4
4
|
//#region src/stream-broker/recorded/avcc-annexb.ts
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, i, l as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-JVFs9LgI.mjs";
|
|
2
2
|
import { a as m, i as h, n as g, o as _, r as v, t as y } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.js-C9j-2lBe.mjs";
|
|
3
3
|
import { n as b, r as x, t as S } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-XO0-Pyu6.mjs";
|
|
4
|
-
import { t as C } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-
|
|
4
|
+
import { t as C } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BvMrdOCD.mjs";
|
|
5
5
|
import { n as w, t as T } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-BO7TIbJV.mjs";
|
|
6
6
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
|
|
7
7
|
var E = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), D = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), O = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), k = (e) => {
|
|
@@ -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.380",
|
|
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.298",
|
|
37
37
|
scope: ["default"],
|
|
38
38
|
loaded: !1,
|
|
39
39
|
from: "addon_stream_broker_widgets",
|