@camstack/addon-pipeline 1.2.372 → 1.2.374
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-C6C2cSwd.mjs → custom-model-catalog-1LDuDw8S.mjs} +2 -2
- package/dist/{custom-model-catalog-n9v8MUL6.js → custom-model-catalog-W0DHDhfo.js} +2 -2
- package/dist/detection-pipeline/index.js +4 -4
- package/dist/detection-pipeline/index.mjs +4 -4
- package/dist/{dist-DmuX7IFJ.js → dist-CBEUVjTS.js} +197 -29
- package/dist/{dist-8AEiKOFO.mjs → dist-CmdLCb_F.mjs} +192 -30
- package/dist/{model-catalogs-BSWAHZJh.mjs → model-catalogs-BnCdB2A3.mjs} +1 -1
- package/dist/{model-catalogs-DO4aA1qo.js → model-catalogs-D5YksA5A.js} +1 -1
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-Bd4va7c-.mjs → node-C3r8kiOo.mjs} +1 -1
- package/dist/{node-DqA6nD1z.js → node-DMgi6pND.js} +1 -1
- package/dist/pipeline-runner/index.js +3 -3
- package/dist/pipeline-runner/index.mjs +3 -3
- package/dist/{process-memory-2OQ2oxrz.js → process-memory-GFR7fxpJ.js} +1 -1
- package/dist/{process-memory-BvS2Z88w.mjs → process-memory-X0ws1SGJ.mjs} +1 -1
- package/dist/recorder/index.js +267 -94
- package/dist/recorder/index.mjs +265 -92
- package/dist/{segment-demux-js-BkGK1rhu.js → segment-demux-js-CSQVhbFI.js} +1 -1
- package/dist/{segment-demux-js-By9MLn_g.mjs → segment-demux-js-IKEO1XBz.mjs} +1 -1
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DjoAY42S.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DPFTlVoW.mjs} +2 -2
- package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C3ssSNKh.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-B7wsxLrK.mjs} +1 -1
- package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-nua-KuDg.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BohOb2Cl.mjs} +1 -1
- 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-DPiGNc5u.mjs → hostInit-BOp1_Hhk.mjs} +2 -2
- package/dist/stream-broker/index.js +1087 -334
- package/dist/stream-broker/index.mjs +1087 -334
- 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/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-CmdLCb_F.mjs";
|
|
2
|
+
import { a as physicalRootOf, i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-C3r8kiOo.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);
|
|
@@ -8352,6 +8347,249 @@ function buildExportArgs(input) {
|
|
|
8352
8347
|
outPath
|
|
8353
8348
|
];
|
|
8354
8349
|
}
|
|
8350
|
+
var ROW_MAP_VALUE_COLUMN = "value";
|
|
8351
|
+
var RowMapStore = class RowMapStore {
|
|
8352
|
+
spec;
|
|
8353
|
+
store;
|
|
8354
|
+
logger;
|
|
8355
|
+
constructor(deps) {
|
|
8356
|
+
this.spec = deps.spec;
|
|
8357
|
+
this.store = deps.store;
|
|
8358
|
+
this.logger = deps.logger;
|
|
8359
|
+
}
|
|
8360
|
+
/** The collection this store owns — for the caller's own log lines. */
|
|
8361
|
+
get collection() {
|
|
8362
|
+
return this.spec.collection;
|
|
8363
|
+
}
|
|
8364
|
+
/**
|
|
8365
|
+
* Register the collection. MUST run at boot, before any read or write: the
|
|
8366
|
+
* SQLite backend answers 412 for an undeclared collection.
|
|
8367
|
+
*/
|
|
8368
|
+
static declare(store, spec) {
|
|
8369
|
+
return store.declareCollection.mutate({
|
|
8370
|
+
collection: spec.collection,
|
|
8371
|
+
columns: [
|
|
8372
|
+
{
|
|
8373
|
+
name: "id",
|
|
8374
|
+
type: "TEXT",
|
|
8375
|
+
primaryKey: true,
|
|
8376
|
+
notNull: true
|
|
8377
|
+
},
|
|
8378
|
+
...spec.columns,
|
|
8379
|
+
{
|
|
8380
|
+
name: ROW_MAP_VALUE_COLUMN,
|
|
8381
|
+
type: "JSON",
|
|
8382
|
+
notNull: true
|
|
8383
|
+
}
|
|
8384
|
+
],
|
|
8385
|
+
...spec.indexes !== void 0 ? { indexes: [...spec.indexes] } : {}
|
|
8386
|
+
});
|
|
8387
|
+
}
|
|
8388
|
+
declare() {
|
|
8389
|
+
return RowMapStore.declare(this.store, this.spec);
|
|
8390
|
+
}
|
|
8391
|
+
/** One entry, by key. `null` when absent OR unparseable (which is said aloud). */
|
|
8392
|
+
async read(key) {
|
|
8393
|
+
const raw = await this.store.get.query({
|
|
8394
|
+
collection: this.spec.collection,
|
|
8395
|
+
key
|
|
8396
|
+
});
|
|
8397
|
+
if (!isRecord(raw)) return null;
|
|
8398
|
+
const row = raw;
|
|
8399
|
+
const parsed = this.spec.schema.safeParse(row[ROW_MAP_VALUE_COLUMN]);
|
|
8400
|
+
if (!parsed.success) {
|
|
8401
|
+
this.logger.warn("row-map row skipped as unparseable", {
|
|
8402
|
+
...this.deviceTags(row),
|
|
8403
|
+
meta: {
|
|
8404
|
+
collection: this.spec.collection,
|
|
8405
|
+
key,
|
|
8406
|
+
error: parsed.error.message
|
|
8407
|
+
}
|
|
8408
|
+
});
|
|
8409
|
+
return null;
|
|
8410
|
+
}
|
|
8411
|
+
return parsed.data;
|
|
8412
|
+
}
|
|
8413
|
+
/**
|
|
8414
|
+
* Every entry, keyed. Unparseable rows are skipped — one bad entry costs that
|
|
8415
|
+
* entry, never the map.
|
|
8416
|
+
*/
|
|
8417
|
+
async readAll() {
|
|
8418
|
+
const records = await this.store.query.query({
|
|
8419
|
+
collection: this.spec.collection,
|
|
8420
|
+
filter: { limit: this.spec.loadLimit }
|
|
8421
|
+
});
|
|
8422
|
+
const out = /* @__PURE__ */ new Map();
|
|
8423
|
+
let skipped = 0;
|
|
8424
|
+
for (const record of records) {
|
|
8425
|
+
const parsed = this.spec.schema.safeParse(record.data[ROW_MAP_VALUE_COLUMN]);
|
|
8426
|
+
if (!parsed.success) {
|
|
8427
|
+
skipped += 1;
|
|
8428
|
+
continue;
|
|
8429
|
+
}
|
|
8430
|
+
out.set(record.id, parsed.data);
|
|
8431
|
+
}
|
|
8432
|
+
if (skipped > 0) this.logger.warn("row-map rows skipped as unparseable", { meta: {
|
|
8433
|
+
collection: this.spec.collection,
|
|
8434
|
+
skipped,
|
|
8435
|
+
kept: out.size
|
|
8436
|
+
} });
|
|
8437
|
+
if (records.length >= this.spec.loadLimit) this.logger.warn("row-map read hit its own bound — the map may be truncated", { meta: {
|
|
8438
|
+
collection: this.spec.collection,
|
|
8439
|
+
loadLimit: this.spec.loadLimit
|
|
8440
|
+
} });
|
|
8441
|
+
return out;
|
|
8442
|
+
}
|
|
8443
|
+
/**
|
|
8444
|
+
* Every entry as it was WRITTEN, unvalidated and unparsed — the read a
|
|
8445
|
+
* MIGRATION needs.
|
|
8446
|
+
*
|
|
8447
|
+
* {@link readAll} answers through the CURRENT schema, which is exactly what a
|
|
8448
|
+
* migration must not do: a retired key is stripped by a non-strict `z.object`
|
|
8449
|
+
* before the migration could see it, so the row it is there to rescue looks
|
|
8450
|
+
* like a row that never needed rescuing. Only a migration should call this;
|
|
8451
|
+
* everything else wants the validated read.
|
|
8452
|
+
*/
|
|
8453
|
+
async readAllRaw() {
|
|
8454
|
+
const records = await this.store.query.query({
|
|
8455
|
+
collection: this.spec.collection,
|
|
8456
|
+
filter: { limit: this.spec.loadLimit }
|
|
8457
|
+
});
|
|
8458
|
+
const out = /* @__PURE__ */ new Map();
|
|
8459
|
+
for (const record of records) out.set(record.id, record.data[ROW_MAP_VALUE_COLUMN]);
|
|
8460
|
+
return out;
|
|
8461
|
+
}
|
|
8462
|
+
/** Insert or replace ONE entry. Validates at the boundary. */
|
|
8463
|
+
async write(key, value) {
|
|
8464
|
+
const validated = this.spec.schema.parse(value);
|
|
8465
|
+
const columns = this.spec.project(key, validated);
|
|
8466
|
+
await this.store.set.mutate({
|
|
8467
|
+
collection: this.spec.collection,
|
|
8468
|
+
key,
|
|
8469
|
+
value: {
|
|
8470
|
+
...columns,
|
|
8471
|
+
[ROW_MAP_VALUE_COLUMN]: validated
|
|
8472
|
+
}
|
|
8473
|
+
});
|
|
8474
|
+
}
|
|
8475
|
+
/** Drop ONE entry. Idempotent. */
|
|
8476
|
+
async remove(key) {
|
|
8477
|
+
await this.store.delete.mutate({
|
|
8478
|
+
collection: this.spec.collection,
|
|
8479
|
+
key
|
|
8480
|
+
});
|
|
8481
|
+
}
|
|
8482
|
+
/**
|
|
8483
|
+
* Make the collection hold exactly `next` — the write path for an owner whose
|
|
8484
|
+
* in-memory map IS the authority (a persister handed the complete set).
|
|
8485
|
+
*
|
|
8486
|
+
* Returns how many rows were DELETED, and says so out loud when any were: a
|
|
8487
|
+
* replace that silently drops rows is indistinguishable from one that never
|
|
8488
|
+
* had them. Only an owner holding an authoritative set may call this — a
|
|
8489
|
+
* prune driven by a fallible read is work destroyed (D130, D49).
|
|
8490
|
+
*/
|
|
8491
|
+
async replaceAll(next) {
|
|
8492
|
+
const held = await this.store.query.query({
|
|
8493
|
+
collection: this.spec.collection,
|
|
8494
|
+
filter: { limit: this.spec.loadLimit }
|
|
8495
|
+
});
|
|
8496
|
+
for (const [key, value] of next) await this.write(key, value);
|
|
8497
|
+
const doomed = held.filter((record) => !next.has(record.id));
|
|
8498
|
+
for (const record of doomed) await this.remove(record.id);
|
|
8499
|
+
if (doomed.length > 0) this.logger.warn("row-map replaceAll dropped rows", { meta: {
|
|
8500
|
+
collection: this.spec.collection,
|
|
8501
|
+
dropped: doomed.length,
|
|
8502
|
+
keys: doomed.slice(0, 20).map((r) => r.id),
|
|
8503
|
+
remaining: next.size
|
|
8504
|
+
} });
|
|
8505
|
+
return doomed.length;
|
|
8506
|
+
}
|
|
8507
|
+
/**
|
|
8508
|
+
* The entries matching a projected-column predicate, in the order asked for.
|
|
8509
|
+
*
|
|
8510
|
+
* This is what projecting columns BUYS: "every export for camera 617, newest
|
|
8511
|
+
* first, capped at 50" is an indexed `WHERE` + `ORDER BY` + `LIMIT`, not a
|
|
8512
|
+
* parse of the whole map followed by a filter in JS.
|
|
8513
|
+
*
|
|
8514
|
+
* A `limit` is REQUIRED — `settings-store.query` silently caps an unbounded
|
|
8515
|
+
* read at 2 000 rows and answers as if that were everything.
|
|
8516
|
+
*/
|
|
8517
|
+
async readWhere(filter) {
|
|
8518
|
+
const records = await this.store.query.query({
|
|
8519
|
+
collection: this.spec.collection,
|
|
8520
|
+
filter: {
|
|
8521
|
+
...filter.where !== void 0 ? { where: filter.where } : {},
|
|
8522
|
+
...filter.whereIn !== void 0 ? { whereIn: filter.whereIn } : {},
|
|
8523
|
+
...filter.whereBetween !== void 0 ? { whereBetween: filter.whereBetween } : {},
|
|
8524
|
+
...filter.orderBy !== void 0 ? { orderBy: filter.orderBy } : {},
|
|
8525
|
+
...filter.offset !== void 0 ? { offset: filter.offset } : {},
|
|
8526
|
+
limit: filter.limit ?? this.spec.loadLimit
|
|
8527
|
+
}
|
|
8528
|
+
});
|
|
8529
|
+
const out = [];
|
|
8530
|
+
let skipped = 0;
|
|
8531
|
+
for (const record of records) {
|
|
8532
|
+
const parsed = this.spec.schema.safeParse(record.data[ROW_MAP_VALUE_COLUMN]);
|
|
8533
|
+
if (!parsed.success) {
|
|
8534
|
+
skipped += 1;
|
|
8535
|
+
continue;
|
|
8536
|
+
}
|
|
8537
|
+
out.push({
|
|
8538
|
+
key: record.id,
|
|
8539
|
+
value: parsed.data
|
|
8540
|
+
});
|
|
8541
|
+
}
|
|
8542
|
+
if (skipped > 0) this.logger.warn("row-map rows skipped as unparseable", { meta: {
|
|
8543
|
+
collection: this.spec.collection,
|
|
8544
|
+
skipped,
|
|
8545
|
+
kept: out.length
|
|
8546
|
+
} });
|
|
8547
|
+
return out;
|
|
8548
|
+
}
|
|
8549
|
+
/** How many rows match, without materialising one. */
|
|
8550
|
+
async count(filter) {
|
|
8551
|
+
return this.store.count.query({
|
|
8552
|
+
collection: this.spec.collection,
|
|
8553
|
+
...filter !== void 0 ? { filter: {
|
|
8554
|
+
...filter.where !== void 0 ? { where: filter.where } : {},
|
|
8555
|
+
...filter.whereIn !== void 0 ? { whereIn: filter.whereIn } : {},
|
|
8556
|
+
...filter.whereBetween !== void 0 ? { whereBetween: filter.whereBetween } : {}
|
|
8557
|
+
} } : {}
|
|
8558
|
+
});
|
|
8559
|
+
}
|
|
8560
|
+
/**
|
|
8561
|
+
* Delete every row matching a predicate, in ONE statement. Returns how many
|
|
8562
|
+
* went, and says so — a retention trim that silently drops rows is
|
|
8563
|
+
* indistinguishable from one that had nothing to do.
|
|
8564
|
+
*
|
|
8565
|
+
* The predicate is REQUIRED and the engine REFUSES one that compiles to
|
|
8566
|
+
* nothing: deleting a whole collection is a legitimate intent, but it must be
|
|
8567
|
+
* asked for by name rather than reached through an empty object.
|
|
8568
|
+
*/
|
|
8569
|
+
async deleteWhere(filter) {
|
|
8570
|
+
const { deleted } = await this.store.deleteWhere.mutate({
|
|
8571
|
+
collection: this.spec.collection,
|
|
8572
|
+
filter
|
|
8573
|
+
});
|
|
8574
|
+
if (deleted > 0) this.logger.warn("row-map deleteWhere dropped rows", { meta: {
|
|
8575
|
+
collection: this.spec.collection,
|
|
8576
|
+
deleted,
|
|
8577
|
+
filter
|
|
8578
|
+
} });
|
|
8579
|
+
return deleted;
|
|
8580
|
+
}
|
|
8581
|
+
/** `tags: { deviceId }` off the PROJECTED column, when the spec names one. */
|
|
8582
|
+
deviceTags(row) {
|
|
8583
|
+
const column = this.spec.deviceIdColumn;
|
|
8584
|
+
if (column === void 0) return {};
|
|
8585
|
+
const raw = row[column];
|
|
8586
|
+
return typeof raw === "number" && Number.isInteger(raw) ? { tags: { deviceId: raw } } : {};
|
|
8587
|
+
}
|
|
8588
|
+
};
|
|
8589
|
+
/** A store payload that is a plain object, or `null`. A type guard, not a cast. */
|
|
8590
|
+
function isRecord(value) {
|
|
8591
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
8592
|
+
}
|
|
8355
8593
|
//#endregion
|
|
8356
8594
|
//#region src/recorder/addon/export-store.ts
|
|
8357
8595
|
/**
|
|
@@ -11732,6 +11970,22 @@ var DurableLedger = class DurableLedger {
|
|
|
11732
11970
|
}
|
|
11733
11971
|
}
|
|
11734
11972
|
/**
|
|
11973
|
+
* Drop every MIRRORED row about `deviceId` (per the spec's `deviceIdOf`),
|
|
11974
|
+
* leaving the durable rows to the caller's `deleteWhere` (D871). Returns how
|
|
11975
|
+
* many mirror entries went; a spec without `deviceIdOf` evicts nothing.
|
|
11976
|
+
*/
|
|
11977
|
+
evictDevice(deviceId) {
|
|
11978
|
+
const of = this.spec.deviceIdOf;
|
|
11979
|
+
if (of === void 0) return 0;
|
|
11980
|
+
let evicted = 0;
|
|
11981
|
+
for (const [key, row] of [...this.mirror.entries()]) {
|
|
11982
|
+
if (of(row) !== deviceId) continue;
|
|
11983
|
+
this.mirror.delete(key);
|
|
11984
|
+
evicted += 1;
|
|
11985
|
+
}
|
|
11986
|
+
return evicted;
|
|
11987
|
+
}
|
|
11988
|
+
/**
|
|
11735
11989
|
* Drop every mirrored key NOT in `activeKeys`. Returns how many rows went.
|
|
11736
11990
|
*
|
|
11737
11991
|
* **The caller must hold an AUTHORITATIVE active set.** A prune driven by a
|
|
@@ -14764,40 +15018,8 @@ var LocationRefresher = class {
|
|
|
14764
15018
|
}
|
|
14765
15019
|
}
|
|
14766
15020
|
};
|
|
14767
|
-
//#endregion
|
|
14768
|
-
//#region src/recorder/addon/ops-log-store.ts
|
|
14769
|
-
/**
|
|
14770
|
-
* Recordings ops-log persistence for the recorder addon.
|
|
14771
|
-
*
|
|
14772
|
-
* ONE ROW PER OPERATION in `recorder:ops-log`, through {@link RowMapStore}. The
|
|
14773
|
-
* ring is still bounded — `maxEntries` newest rows survive — but the eviction
|
|
14774
|
-
* is now a single `DELETE … WHERE at BETWEEN`, and a listing is an indexed
|
|
14775
|
-
* `WHERE deviceId … ORDER BY at DESC LIMIT`.
|
|
14776
|
-
*
|
|
14777
|
-
* ## What this replaced
|
|
14778
|
-
*
|
|
14779
|
-
* The ring lived in ONE key of the recorder's `addon-settings` / `root` blob,
|
|
14780
|
-
* as a flat JSON array. On the reference hub it was 147 437 bytes of that row's
|
|
14781
|
-
* 201 833 — so appending one audit line read, parsed, re-serialised and rewrote
|
|
14782
|
-
* ~200 KB, and so did every unrelated reader of that row (`resolveConfig`,
|
|
14783
|
-
* `loadDeviceConfig`, the export progress patch). The ops log is the CHEAPEST
|
|
14784
|
-
* thing in the recorder and it was paying for the most expensive.
|
|
14785
|
-
*
|
|
14786
|
-
* Writes stay BEST-EFFORT: `createRecordingOpsLogSink().append` never throws —
|
|
14787
|
-
* a failed audit write must not fail the operation it records.
|
|
14788
|
-
*/
|
|
14789
|
-
/**
|
|
14790
|
-
* @durable class=audit owner=recorder
|
|
14791
|
-
* write="one row per recordings operation (prune, evict, relocate, export, …), appended
|
|
14792
|
-
* best-effort by `createRecordingOpsLogSink().append` — never read back by the system,
|
|
14793
|
-
* only listed by an operator through the `recording.listOpsLog` cap method"
|
|
14794
|
-
* retention="a bounded ring: every append trims to the newest OPS_LOG_RING_DEFAULT_MAX
|
|
14795
|
-
* (500) rows with one `deleteWhere` on `at`. Rows tied on the cutoff millisecond
|
|
14796
|
-
* survive, so the ring may hold a few MORE than the cap and never fewer."
|
|
14797
|
-
*/
|
|
14798
|
-
var RECORDING_OPS_LOG_COLLECTION = "recorder:ops-log";
|
|
14799
15021
|
var RECORDING_OPS_LOG_SPEC = {
|
|
14800
|
-
collection:
|
|
15022
|
+
collection: "recorder:ops-log",
|
|
14801
15023
|
schema: OpsLogEntrySchema,
|
|
14802
15024
|
columns: [{
|
|
14803
15025
|
name: "at",
|
|
@@ -20939,25 +21161,6 @@ var RetentionSweeper = class {
|
|
|
20939
21161
|
}
|
|
20940
21162
|
};
|
|
20941
21163
|
//#endregion
|
|
20942
|
-
//#region src/recorder/addon/retired-root-keys.ts
|
|
20943
|
-
var RECORDER_RETIRED_ROOT_KEYS = [
|
|
20944
|
-
{
|
|
20945
|
-
key: "recordingOpsLog",
|
|
20946
|
-
successor: RECORDING_OPS_LOG_COLLECTION,
|
|
20947
|
-
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"
|
|
20948
|
-
},
|
|
20949
|
-
{
|
|
20950
|
-
key: "recordingExports",
|
|
20951
|
-
successor: RECORDING_EXPORTS_COLLECTION,
|
|
20952
|
-
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)"
|
|
20953
|
-
},
|
|
20954
|
-
{
|
|
20955
|
-
key: "recordingConfigs",
|
|
20956
|
-
successor: "the recorder per-device settings (key recordingConfig)",
|
|
20957
|
-
reason: "one row per camera since the flatten; as a blob, asking what camera 617 records parsed every camera in the installation"
|
|
20958
|
-
}
|
|
20959
|
-
];
|
|
20960
|
-
//#endregion
|
|
20961
21164
|
//#region src/recorder/addon/heap-delta.ts
|
|
20962
21165
|
/**
|
|
20963
21166
|
* Name the unit of work that grows the recorder's heap.
|
|
@@ -23394,7 +23597,6 @@ var RecorderV2Addon = class extends BaseAddon {
|
|
|
23394
23597
|
return { providers: [] };
|
|
23395
23598
|
}
|
|
23396
23599
|
await this.declareRowCollections();
|
|
23397
|
-
await this.purgeFlattenedSettingsKeys();
|
|
23398
23600
|
this.segmentHours = new SegmentHourLedger({
|
|
23399
23601
|
store: this.ctx.api.settingsStore,
|
|
23400
23602
|
logger: this.ctx.logger,
|
|
@@ -25224,31 +25426,6 @@ var RecorderV2Addon = class extends BaseAddon {
|
|
|
25224
25426
|
await this.opsLogStore().declare();
|
|
25225
25427
|
}
|
|
25226
25428
|
/**
|
|
25227
|
-
* Drop the flattened keys from `recorder:addon-settings` / `root`, each gated
|
|
25228
|
-
* on its own successor collection being non-empty.
|
|
25229
|
-
*
|
|
25230
|
-
* `recordingPlacement` is NOT here: it stays a blob key. It is 1.4 KB of
|
|
25231
|
-
* per-(camera, profile) assignments plus a handful of volume ids, written
|
|
25232
|
-
* only when placement changes — and the row has to survive anyway, because it
|
|
25233
|
-
* is where `BaseAddon.resolveConfig` reads the operator's config fields from.
|
|
25234
|
-
* The problem was a 201 KB row, not a blob.
|
|
25235
|
-
*
|
|
25236
|
-
* Best-effort: a purge that throws must not take recording down. The keys are
|
|
25237
|
-
* dead weight, not a fault.
|
|
25238
|
-
*/
|
|
25239
|
-
async purgeFlattenedSettingsKeys() {
|
|
25240
|
-
try {
|
|
25241
|
-
await retireRootKeys({
|
|
25242
|
-
store: this.ctx.api.settingsStore,
|
|
25243
|
-
addonId: RECORDER_ADDON_ID,
|
|
25244
|
-
logger: this.ctx.logger,
|
|
25245
|
-
specs: RECORDER_RETIRED_ROOT_KEYS
|
|
25246
|
-
});
|
|
25247
|
-
} catch (err) {
|
|
25248
|
-
this.ctx.logger.warn("recorder: retiring the flattened settings keys failed", { meta: { error: errMsg$1(err) } });
|
|
25249
|
-
}
|
|
25250
|
-
}
|
|
25251
|
-
/**
|
|
25252
25429
|
* `ctx.api.settingsStore`, wrapped ONCE through {@link censusStoreClient}.
|
|
25253
25430
|
*
|
|
25254
25431
|
* LAZY (see `calendar` above): `ctx` is not assigned until `initialize()`
|
|
@@ -25267,11 +25444,7 @@ var RecorderV2Addon = class extends BaseAddon {
|
|
|
25267
25444
|
if (settings === void 0) throw new Error("recorder: device settings are not available");
|
|
25268
25445
|
this.configsState ??= recordingConfigsState({
|
|
25269
25446
|
settings,
|
|
25270
|
-
logger: this.ctx.logger
|
|
25271
|
-
listDeviceIds: async () => (await this.ctx.api.deviceManager.listAll.query({
|
|
25272
|
-
isCamera: true,
|
|
25273
|
-
projection: "slim"
|
|
25274
|
-
})).map((device) => device.id)
|
|
25447
|
+
logger: this.ctx.logger
|
|
25275
25448
|
});
|
|
25276
25449
|
return this.configsState;
|
|
25277
25450
|
}
|
|
@@ -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-CBEUVjTS.js");
|
|
3
3
|
let node_child_process = require("node:child_process");
|
|
4
4
|
//#region src/stream-broker/recorded/avcc-annexb.ts
|
|
5
5
|
/**
|
|
@@ -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-CmdLCb_F.mjs";
|
|
3
3
|
import { spawn } from "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-BohOb2Cl.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-B7wsxLrK.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.376",
|
|
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.294",
|
|
37
37
|
scope: ["default"],
|
|
38
38
|
loaded: !1,
|
|
39
39
|
from: "addon_stream_broker_widgets",
|