@camstack/addon-post-analysis 1.2.373 → 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/{clip-model-registry-jeFu3pma.mjs → clip-model-registry-BIJ0ZD7t.mjs} +696 -110
- package/dist/{clip-model-registry-Cy2RokDO.js → clip-model-registry-BRzN2GzR.js} +696 -110
- package/dist/embedding-encoder/index.js +1 -1
- package/dist/embedding-encoder/index.mjs +1 -1
- package/dist/pipeline-analytics/_stub.js +2 -2
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-ujfvEENv.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BYu-s1rf.mjs} +2 -2
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Ds_wGoAi.mjs +26 -0
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BjCURGur.mjs +26 -0
- package/dist/pipeline-analytics/{hostInit-Ddz0CyLk.mjs → hostInit-DEl2xA0o.mjs} +2 -2
- package/dist/pipeline-analytics/index.js +39 -206
- package/dist/pipeline-analytics/index.mjs +39 -206
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CyYkqCmx.mjs +0 -26
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Kh1uHJki.mjs +0 -26
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_clip_model_registry = require("../clip-model-registry-
|
|
5
|
+
const require_clip_model_registry = require("../clip-model-registry-BRzN2GzR.js");
|
|
6
6
|
let node_fs = require("node:fs");
|
|
7
7
|
node_fs = require_clip_model_registry.__toESM(node_fs, 1);
|
|
8
8
|
let node_path = require("node:path");
|
|
@@ -13051,6 +13051,19 @@ function recordField(data, key) {
|
|
|
13051
13051
|
* with it — which is why the number is named on both sides.
|
|
13052
13052
|
*/
|
|
13053
13053
|
var NC_STREAM_OFFLINE_REASON = "stale-timeout";
|
|
13054
|
+
/**
|
|
13055
|
+
* The BATTERY outage reasons (D883). A battery camera's sleep is not an
|
|
13056
|
+
* outage and the broker no longer emits one; what it does emit is a failure it
|
|
13057
|
+
* has already named — a demanded wake that delivered nothing, a connection
|
|
13058
|
+
* error while the camera is awake, silence past the battery refresh window.
|
|
13059
|
+
* The 120 s window above is the stale window those share; the extra reasons
|
|
13060
|
+
* are only the broker saying WHICH failure, so they pass the same gate.
|
|
13061
|
+
*/
|
|
13062
|
+
var NC_STREAM_BATTERY_OFFLINE_REASONS = [
|
|
13063
|
+
"wake-timeout",
|
|
13064
|
+
"connection-error",
|
|
13065
|
+
"battery-unreachable"
|
|
13066
|
+
];
|
|
13054
13067
|
/** The recovery that answers a {@link NC_STREAM_OFFLINE_REASON} outage. */
|
|
13055
13068
|
var NC_STREAM_ONLINE_REASON = "recovered";
|
|
13056
13069
|
/**
|
|
@@ -13111,7 +13124,7 @@ function discardedAccessoryLiveness(event, lookup) {
|
|
|
13111
13124
|
}
|
|
13112
13125
|
/** Is this stream-health flip the one the operator asked to hear about? */
|
|
13113
13126
|
function streamHealthAccepted(category, reason) {
|
|
13114
|
-
return category === "stream.online" ? reason === NC_STREAM_ONLINE_REASON : reason === NC_STREAM_OFFLINE_REASON;
|
|
13127
|
+
return category === "stream.online" ? reason === NC_STREAM_ONLINE_REASON : reason === NC_STREAM_OFFLINE_REASON || reason !== void 0 && NC_STREAM_BATTERY_OFFLINE_REASONS.includes(reason);
|
|
13115
13128
|
}
|
|
13116
13129
|
/**
|
|
13117
13130
|
* Describe a system event the intake's GATE dropped, or `null` when the event
|
|
@@ -13459,15 +13472,14 @@ function incomingFromSystemEvent(event, lookup) {
|
|
|
13459
13472
|
case "stream.offline": {
|
|
13460
13473
|
if (!streamHealthAccepted(event.category, stringField(data, "reason"))) return null;
|
|
13461
13474
|
const deviceId = numberField(data, "deviceId");
|
|
13462
|
-
|
|
13463
|
-
if (deviceId === void 0 || camStreamId === void 0) return null;
|
|
13475
|
+
if (deviceId === void 0) return null;
|
|
13464
13476
|
const online = event.category === "stream.online";
|
|
13465
|
-
const profile = stringField(data, "profile");
|
|
13477
|
+
const profile = stringList(data, "camStreamIds").length > 1 ? void 0 : stringField(data, "profile");
|
|
13466
13478
|
const kind = online ? "stream-online" : "stream-offline";
|
|
13467
13479
|
return systemSubject({
|
|
13468
13480
|
facts,
|
|
13469
13481
|
kind,
|
|
13470
|
-
subject: `stream:${
|
|
13482
|
+
subject: `stream:${String(deviceId)}`,
|
|
13471
13483
|
titleKey: `system.${kind}.title`,
|
|
13472
13484
|
bodyKey: profile !== void 0 ? `system.${kind}.body.profiled` : `system.${kind}.body`,
|
|
13473
13485
|
textParams: {
|
|
@@ -16895,10 +16907,22 @@ function updateStateKey(target, nodeId, packageName) {
|
|
|
16895
16907
|
return `update:${target}:${nodeId ?? HUB_NODE}:${packageName}`;
|
|
16896
16908
|
}
|
|
16897
16909
|
var CRASH_SUBJECT_PREFIX = "addon-crash:";
|
|
16910
|
+
/** The current stream-row key: one per device (D883). */
|
|
16911
|
+
var DEVICE_STREAM_KEY = /^stream:\d+$/;
|
|
16898
16912
|
var NcSystemStateLedger = class {
|
|
16899
16913
|
deps;
|
|
16900
16914
|
constructor(deps) {
|
|
16901
16915
|
this.deps = deps;
|
|
16916
|
+
this.closeLegacyStreamKeys();
|
|
16917
|
+
}
|
|
16918
|
+
/**
|
|
16919
|
+
* One-time migration of state keys (D883): a stream row used to be keyed by
|
|
16920
|
+
* `stream:<camStreamId>`; it is now `stream:<deviceId>`. A row still open
|
|
16921
|
+
* under the old shape would never meet its `stream.online`, so it is closed
|
|
16922
|
+
* now and against the loaded rows. Nothing else is touched.
|
|
16923
|
+
*/
|
|
16924
|
+
closeLegacyStreamKeys() {
|
|
16925
|
+
this.closeWhere("legacy-stream-keys", (row) => row.key.startsWith("stream:") && !DEVICE_STREAM_KEY.test(row.key), "legacy-stream-key");
|
|
16902
16926
|
}
|
|
16903
16927
|
/** The open rows, or `null` while the store has never answered. */
|
|
16904
16928
|
openRows() {
|
|
@@ -16969,8 +16993,9 @@ var NcSystemStateLedger = class {
|
|
|
16969
16993
|
* drops a `first-packet` online — a recreated broker's — because it is not
|
|
16970
16994
|
* a recovery worth a notification; it is still proof the stream is up.
|
|
16971
16995
|
*/
|
|
16972
|
-
observeStreamOnline(
|
|
16973
|
-
|
|
16996
|
+
observeStreamOnline(deviceId) {
|
|
16997
|
+
const key = `stream:${String(deviceId)}`;
|
|
16998
|
+
this.closeWhere(key, (row) => row.key === key || row.deviceId === deviceId && row.key.startsWith("stream:") && !DEVICE_STREAM_KEY.test(row.key), "stream-online");
|
|
16974
16999
|
}
|
|
16975
17000
|
/** One `update.available` list: REPLACE the rows of every node it names. */
|
|
16976
17001
|
observeUpdateList(list, atMs) {
|
|
@@ -38337,8 +38362,8 @@ var NcStateSummaryService = class {
|
|
|
38337
38362
|
observeRawEvent(category, data, atMs, sourceNodeId) {
|
|
38338
38363
|
switch (category) {
|
|
38339
38364
|
case "stream.online": {
|
|
38340
|
-
const
|
|
38341
|
-
if (
|
|
38365
|
+
const deviceId = data["deviceId"];
|
|
38366
|
+
if (typeof deviceId === "number") this.ledger.observeStreamOnline(deviceId);
|
|
38342
38367
|
return;
|
|
38343
38368
|
}
|
|
38344
38369
|
case "update.available": {
|
|
@@ -76393,10 +76418,8 @@ function describeTapeStatus(input) {
|
|
|
76393
76418
|
* retention="none — a row goes only when its owner deletes it"
|
|
76394
76419
|
*
|
|
76395
76420
|
* Renamed from the bare `viewer-settings-snapshots` on 2026-08-19: an addon
|
|
76396
|
-
* collection carries its owner's prefix
|
|
76397
|
-
*
|
|
76398
|
-
* under the old name are adopted at boot by
|
|
76399
|
-
* `viewer-settings-legacy-adoption.ts`.
|
|
76421
|
+
* collection carries its owner's prefix. The drained bare table is dropped by
|
|
76422
|
+
* `scripts/hub/drop-dead-tables.ts` (records plan phase 0).
|
|
76400
76423
|
*/
|
|
76401
76424
|
var VIEWER_SETTINGS_SNAPSHOTS_COLLECTION = "pipeline-analytics:viewer-settings-snapshots";
|
|
76402
76425
|
var COLUMNS = [
|
|
@@ -76598,183 +76621,6 @@ function makeViewerSettingsActionHandlers(store) {
|
|
|
76598
76621
|
};
|
|
76599
76622
|
}
|
|
76600
76623
|
//#endregion
|
|
76601
|
-
//#region src/pipeline-analytics/viewer-settings-legacy-adoption.ts
|
|
76602
|
-
/**
|
|
76603
|
-
* @durable class=config owner=pipeline-analytics
|
|
76604
|
-
* write="NOTHING writes it any more — it is the pre-2026-08-19 bare name of
|
|
76605
|
-
* `pipeline-analytics:viewer-settings-snapshots`, declared here only so its
|
|
76606
|
-
* surviving rows can be READ once and moved"
|
|
76607
|
-
* retention="drained, not pruned: a row goes as soon as the successor is
|
|
76608
|
-
* confirmed to hold the same id. The table is empty and inert once every
|
|
76609
|
-
* hub has booted this addon; it is then dropped through the kernel's
|
|
76610
|
-
* `RETIRED_COLLECTIONS` and this module deleted."
|
|
76611
|
-
*
|
|
76612
|
-
* Bare, and therefore a namespacing violation — hence the single
|
|
76613
|
-
* `ALLOWED_BARE` entry in `scripts/check-collection-namespacing.ts`, which
|
|
76614
|
-
* names this file and the condition for removing both.
|
|
76615
|
-
*/
|
|
76616
|
-
var LEGACY_VIEWER_SETTINGS_SNAPSHOTS_COLLECTION = "viewer-settings-snapshots";
|
|
76617
|
-
/**
|
|
76618
|
-
* The ORIGINAL column list, byte-for-byte.
|
|
76619
|
-
*
|
|
76620
|
-
* Do not "tidy" this to reference the successor's constant: they are allowed to
|
|
76621
|
-
* diverge, and the day they do, a shared constant would silently rebuild the
|
|
76622
|
-
* legacy table and destroy the rows.
|
|
76623
|
-
*/
|
|
76624
|
-
var LEGACY_COLUMNS = [
|
|
76625
|
-
{
|
|
76626
|
-
name: "id",
|
|
76627
|
-
type: "TEXT",
|
|
76628
|
-
primaryKey: true,
|
|
76629
|
-
notNull: true
|
|
76630
|
-
},
|
|
76631
|
-
{
|
|
76632
|
-
name: "name",
|
|
76633
|
-
type: "TEXT",
|
|
76634
|
-
notNull: true
|
|
76635
|
-
},
|
|
76636
|
-
{
|
|
76637
|
-
name: "ownerUserId",
|
|
76638
|
-
type: "TEXT",
|
|
76639
|
-
notNull: true
|
|
76640
|
-
},
|
|
76641
|
-
{
|
|
76642
|
-
name: "ownerUsername",
|
|
76643
|
-
type: "TEXT",
|
|
76644
|
-
notNull: true
|
|
76645
|
-
},
|
|
76646
|
-
{
|
|
76647
|
-
name: "createdAt",
|
|
76648
|
-
type: "INTEGER",
|
|
76649
|
-
notNull: true
|
|
76650
|
-
},
|
|
76651
|
-
{
|
|
76652
|
-
name: "updatedAt",
|
|
76653
|
-
type: "INTEGER",
|
|
76654
|
-
notNull: true
|
|
76655
|
-
},
|
|
76656
|
-
{
|
|
76657
|
-
name: "blob",
|
|
76658
|
-
type: "JSON",
|
|
76659
|
-
notNull: true
|
|
76660
|
-
}
|
|
76661
|
-
];
|
|
76662
|
-
/** Bounded read: this table held 1 row on the reference hub. */
|
|
76663
|
-
var LEGACY_READ_LIMIT = 500;
|
|
76664
|
-
function errText(err) {
|
|
76665
|
-
return err instanceof Error ? err.message : String(err);
|
|
76666
|
-
}
|
|
76667
|
-
function asRows(raw) {
|
|
76668
|
-
if (!Array.isArray(raw)) return [];
|
|
76669
|
-
const out = [];
|
|
76670
|
-
for (const item of raw) {
|
|
76671
|
-
if (typeof item !== "object" || item === null) continue;
|
|
76672
|
-
const id = Reflect.get(item, "id");
|
|
76673
|
-
const data = Reflect.get(item, "data");
|
|
76674
|
-
if (typeof id !== "string" || typeof data !== "object" || data === null) continue;
|
|
76675
|
-
out.push({
|
|
76676
|
-
id,
|
|
76677
|
-
data
|
|
76678
|
-
});
|
|
76679
|
-
}
|
|
76680
|
-
return out;
|
|
76681
|
-
}
|
|
76682
|
-
/**
|
|
76683
|
-
* Move every legacy row into the successor and clear the legacy table.
|
|
76684
|
-
*
|
|
76685
|
-
* Returns the number of legacy rows RETIRED — the completion metric, not the
|
|
76686
|
-
* number written. A row copied but not yet verified counts as zero and is
|
|
76687
|
-
* retried on the next boot, which is the safe direction.
|
|
76688
|
-
*/
|
|
76689
|
-
async function adoptLegacyViewerSettingsSnapshots(deps) {
|
|
76690
|
-
await deps.store.declareCollection.mutate({
|
|
76691
|
-
collection: LEGACY_VIEWER_SETTINGS_SNAPSHOTS_COLLECTION,
|
|
76692
|
-
columns: LEGACY_COLUMNS
|
|
76693
|
-
});
|
|
76694
|
-
let legacy;
|
|
76695
|
-
try {
|
|
76696
|
-
legacy = asRows(await deps.store.query.query({
|
|
76697
|
-
collection: LEGACY_VIEWER_SETTINGS_SNAPSHOTS_COLLECTION,
|
|
76698
|
-
filter: { limit: LEGACY_READ_LIMIT }
|
|
76699
|
-
}));
|
|
76700
|
-
} catch (err) {
|
|
76701
|
-
deps.logger.warn("viewer-settings legacy adoption skipped — legacy read failed", { meta: {
|
|
76702
|
-
collection: LEGACY_VIEWER_SETTINGS_SNAPSHOTS_COLLECTION,
|
|
76703
|
-
error: errText(err)
|
|
76704
|
-
} });
|
|
76705
|
-
return 0;
|
|
76706
|
-
}
|
|
76707
|
-
if (legacy.length === 0) return 0;
|
|
76708
|
-
let existing;
|
|
76709
|
-
try {
|
|
76710
|
-
existing = new Set(asRows(await deps.store.query.query({
|
|
76711
|
-
collection: VIEWER_SETTINGS_SNAPSHOTS_COLLECTION,
|
|
76712
|
-
filter: { limit: LEGACY_READ_LIMIT }
|
|
76713
|
-
})).map((r) => r.id));
|
|
76714
|
-
} catch (err) {
|
|
76715
|
-
deps.logger.warn("viewer-settings legacy adoption skipped — successor read failed", { meta: {
|
|
76716
|
-
collection: VIEWER_SETTINGS_SNAPSHOTS_COLLECTION,
|
|
76717
|
-
error: errText(err)
|
|
76718
|
-
} });
|
|
76719
|
-
return 0;
|
|
76720
|
-
}
|
|
76721
|
-
let written = 0;
|
|
76722
|
-
for (const row of legacy) {
|
|
76723
|
-
if (existing.has(row.id)) continue;
|
|
76724
|
-
try {
|
|
76725
|
-
await deps.store.set.mutate({
|
|
76726
|
-
collection: VIEWER_SETTINGS_SNAPSHOTS_COLLECTION,
|
|
76727
|
-
key: row.id,
|
|
76728
|
-
value: row.data
|
|
76729
|
-
});
|
|
76730
|
-
written += 1;
|
|
76731
|
-
} catch (err) {
|
|
76732
|
-
deps.logger.warn("viewer-settings legacy adoption — one row failed to write", { meta: {
|
|
76733
|
-
snapshotId: row.id,
|
|
76734
|
-
error: errText(err)
|
|
76735
|
-
} });
|
|
76736
|
-
}
|
|
76737
|
-
}
|
|
76738
|
-
let landed;
|
|
76739
|
-
try {
|
|
76740
|
-
landed = new Set(asRows(await deps.store.query.query({
|
|
76741
|
-
collection: VIEWER_SETTINGS_SNAPSHOTS_COLLECTION,
|
|
76742
|
-
filter: { limit: LEGACY_READ_LIMIT }
|
|
76743
|
-
})).map((r) => r.id));
|
|
76744
|
-
} catch (err) {
|
|
76745
|
-
deps.logger.warn("viewer-settings legacy adoption — verification read failed, legacy rows kept", { meta: {
|
|
76746
|
-
written,
|
|
76747
|
-
error: errText(err)
|
|
76748
|
-
} });
|
|
76749
|
-
return 0;
|
|
76750
|
-
}
|
|
76751
|
-
let retired = 0;
|
|
76752
|
-
for (const row of legacy) {
|
|
76753
|
-
if (!landed.has(row.id)) continue;
|
|
76754
|
-
try {
|
|
76755
|
-
await deps.store.delete.mutate({
|
|
76756
|
-
collection: LEGACY_VIEWER_SETTINGS_SNAPSHOTS_COLLECTION,
|
|
76757
|
-
key: row.id
|
|
76758
|
-
});
|
|
76759
|
-
retired += 1;
|
|
76760
|
-
} catch (err) {
|
|
76761
|
-
deps.logger.warn("viewer-settings legacy adoption — one legacy row failed to delete", { meta: {
|
|
76762
|
-
snapshotId: row.id,
|
|
76763
|
-
error: errText(err)
|
|
76764
|
-
} });
|
|
76765
|
-
}
|
|
76766
|
-
}
|
|
76767
|
-
deps.logger.warn("viewer-settings snapshots adopted from the legacy bare collection", { meta: {
|
|
76768
|
-
from: LEGACY_VIEWER_SETTINGS_SNAPSHOTS_COLLECTION,
|
|
76769
|
-
to: VIEWER_SETTINGS_SNAPSHOTS_COLLECTION,
|
|
76770
|
-
found: legacy.length,
|
|
76771
|
-
written,
|
|
76772
|
-
retired,
|
|
76773
|
-
kept: legacy.length - retired
|
|
76774
|
-
} });
|
|
76775
|
-
return retired;
|
|
76776
|
-
}
|
|
76777
|
-
//#endregion
|
|
76778
76624
|
//#region src/notification-center/event-media/event-media-service.ts
|
|
76779
76625
|
/**
|
|
76780
76626
|
* Long side of the gif.
|
|
@@ -101458,13 +101304,6 @@ var ANALYTICS_COLLECTIONS = [
|
|
|
101458
101304
|
why: "a hub user's named snapshot of their own viewer layout. It is not analytics data — it happens to live in this addon because the actions ride `addons.custom`. Owned by the user who saved it and deleted only by them; no track, device or event can orphan it, and no age applies."
|
|
101459
101305
|
}
|
|
101460
101306
|
},
|
|
101461
|
-
{
|
|
101462
|
-
collection: LEGACY_VIEWER_SETTINGS_SNAPSHOTS_COLLECTION,
|
|
101463
|
-
classification: {
|
|
101464
|
-
kind: "never-orphaned",
|
|
101465
|
-
why: "the drained predecessor of the row above, declared only so its rows can be read once and moved (`viewer-settings-legacy-adoption.ts`). Retention must never touch it: its rows go one way only, to the successor, gated on a re-read that confirms they landed. Delete this entry together with that module."
|
|
101466
|
-
}
|
|
101467
|
-
},
|
|
101468
101307
|
{
|
|
101469
101308
|
collection: DEBUG_NOTE_ARCHIVE_COLLECTION,
|
|
101470
101309
|
classification: {
|
|
@@ -106075,7 +105914,9 @@ Object.freeze({
|
|
|
106075
105914
|
},
|
|
106076
105915
|
"setDeviceConfig": { "config": { "__nested__": { "bands": [] } } }
|
|
106077
105916
|
},
|
|
105917
|
+
"records": { "query": { "limit": 100 } },
|
|
106078
105918
|
"storage": { "upsertLocation": { "isSystem": false } },
|
|
105919
|
+
"storage-admin": { "readRecords": { "limit": 100 } },
|
|
106079
105920
|
"storage-provider": {
|
|
106080
105921
|
"beginDownload": { "location": { "__nested__": { "isSystem": false } } },
|
|
106081
105922
|
"beginUpload": { "location": { "__nested__": { "isSystem": false } } },
|
|
@@ -114700,14 +114541,6 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends require_clip_m
|
|
|
114700
114541
|
logger: this.ctx.logger.child("SweepCursors")
|
|
114701
114542
|
});
|
|
114702
114543
|
this.viewerSettingsSnapshots = new ViewerSettingsSnapshotStore(api.settingsStore);
|
|
114703
|
-
try {
|
|
114704
|
-
await adoptLegacyViewerSettingsSnapshots({
|
|
114705
|
-
store: api.settingsStore,
|
|
114706
|
-
logger: this.ctx.logger.child("viewer-settings")
|
|
114707
|
-
});
|
|
114708
|
-
} catch (err) {
|
|
114709
|
-
this.ctx.logger.warn("viewer-settings legacy adoption threw", { meta: { error: require_clip_model_registry.errMsg(err) } });
|
|
114710
|
-
}
|
|
114711
114544
|
runLabelTierMigration({
|
|
114712
114545
|
store: api.settingsStore,
|
|
114713
114546
|
logger: this.ctx.logger,
|