@camstack/addon-post-analysis 1.2.651 → 1.2.653
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/CHANGELOG.md +12 -0
- package/dist/{clip-model-registry-BWY8P-AK.mjs → clip-model-registry-BrazZJvr.mjs} +2000 -720
- package/dist/{clip-model-registry-Dte3QQEt.js → clip-model-registry-Bz1uQvQ8.js} +2000 -720
- 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-_vVfXkDx.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-D6DnF6Vk.mjs} +2 -2
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BKMr4IqL.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-CtNyIYsM.mjs +26 -0
- package/dist/pipeline-analytics/{hostInit-A7m5uu3n.mjs → hostInit-DtrcY1yz.mjs} +2 -2
- package/dist/pipeline-analytics/index.js +145 -8
- package/dist/pipeline-analytics/index.mjs +145 -8
- 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-6PIugMbv.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-Bk6VlAsZ.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-Bz1uQvQ8.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");
|
|
@@ -9063,6 +9063,7 @@ var en_default = {
|
|
|
9063
9063
|
"system.node-offline.body.agent": "Agent {{nodeName}} is offline",
|
|
9064
9064
|
"system.node-offline.body.agent.connection-lost": "Agent {{nodeName}} lost its connection to the hub",
|
|
9065
9065
|
"system.node-offline.body.agent.shutdown": "Agent {{nodeName}} shut down",
|
|
9066
|
+
"system.node-offline.body.agent.updating": "Agent {{nodeName}} went offline while updating and has not come back after {{graceMin}} minutes",
|
|
9066
9067
|
"system.node-inference-unavailable.title": "Node cannot infer — {{nodeId}}",
|
|
9067
9068
|
"system.node-inference-unavailable.body": "Node {{nodeId}} can no longer run inference — every enabled device is unavailable ({{devices}}). It will not receive cameras until one returns.",
|
|
9068
9069
|
"system.addon-crash-loop.title": "Addon crash-loop — {{nodeId}}",
|
|
@@ -9467,6 +9468,7 @@ var it_default = {
|
|
|
9467
9468
|
"system.node-offline.body.agent": "L'agent {{nodeName}} è offline",
|
|
9468
9469
|
"system.node-offline.body.agent.connection-lost": "L'agent {{nodeName}} ha perso la connessione con l'hub",
|
|
9469
9470
|
"system.node-offline.body.agent.shutdown": "L'agent {{nodeName}} si è spento",
|
|
9471
|
+
"system.node-offline.body.agent.updating": "L'agent {{nodeName}} è andato offline durante un aggiornamento e non è tornato dopo {{graceMin}} minuti",
|
|
9470
9472
|
"system.node-inference-unavailable.title": "Nodo senza inferenza — {{nodeId}}",
|
|
9471
9473
|
"system.node-inference-unavailable.body": "Il nodo {{nodeId}} non può più eseguire inferenza — tutti i dispositivi abilitati non sono disponibili ({{devices}}). Non riceverà camere finché uno non torna disponibile.",
|
|
9472
9474
|
"system.addon-crash-loop.title": "Crash-loop addon — {{nodeId}}",
|
|
@@ -70507,7 +70509,12 @@ Object.freeze({
|
|
|
70507
70509
|
"calendar-source": ["listCalendars", "listEvents"],
|
|
70508
70510
|
"custom-model-registry": ["listModels"],
|
|
70509
70511
|
"data-store-provider": ["histogram", "query"],
|
|
70510
|
-
"device-export": [
|
|
70512
|
+
"device-export": [
|
|
70513
|
+
"listExposedDevices",
|
|
70514
|
+
"listExposedEntities",
|
|
70515
|
+
"listSupportedDeviceKinds",
|
|
70516
|
+
"listSupportedEntityKinds"
|
|
70517
|
+
],
|
|
70511
70518
|
"device-extension": ["listSlots", "listSources"],
|
|
70512
70519
|
"device-provider": ["discoverDevices", "getDevices"],
|
|
70513
70520
|
"device-removal-hook": ["listDeviceData"],
|
|
@@ -70532,6 +70539,7 @@ Object.freeze({
|
|
|
70532
70539
|
"listTargets"
|
|
70533
70540
|
],
|
|
70534
70541
|
"recording": ["listSources"],
|
|
70542
|
+
"remote-layout-components": ["listComponents"],
|
|
70535
70543
|
"storage-occupancy": ["getOccupancy"],
|
|
70536
70544
|
"storage-provider": ["list"],
|
|
70537
70545
|
"template": ["list"],
|
|
@@ -70546,6 +70554,12 @@ Object.freeze({
|
|
|
70546
70554
|
"videoclips": ["listClips", "listSources"]
|
|
70547
70555
|
});
|
|
70548
70556
|
Object.freeze({
|
|
70557
|
+
"device-export": [
|
|
70558
|
+
"exposeEntity",
|
|
70559
|
+
"listExposedEntities",
|
|
70560
|
+
"listSupportedEntityKinds",
|
|
70561
|
+
"unexposeEntity"
|
|
70562
|
+
],
|
|
70549
70563
|
"log-destination": [
|
|
70550
70564
|
"cancelRead",
|
|
70551
70565
|
"describeRead",
|
|
@@ -80753,12 +80767,13 @@ function incomingFromNodeRestarting(facts, data) {
|
|
|
80753
80767
|
nodeIds: [nodeId]
|
|
80754
80768
|
});
|
|
80755
80769
|
const packageName = stringField(data, "packageName") ?? "@camstack/server";
|
|
80770
|
+
const what = stringField(data, "what");
|
|
80756
80771
|
const fromVersion = stringField(data, "fromVersion");
|
|
80757
80772
|
const bodyKey = toVersion === void 0 ? "system.node-updating.body.plain" : fromVersion === void 0 ? "system.node-updating.body.toOnly" : "system.node-updating.body";
|
|
80758
80773
|
return systemSubject({
|
|
80759
80774
|
facts,
|
|
80760
80775
|
kind: "node-updating",
|
|
80761
|
-
subject: `node-updating:${nodeId}:${toVersion ?? "unknown"}`,
|
|
80776
|
+
subject: what === void 0 || what === "server" ? `node-updating:${nodeId}:${toVersion ?? "unknown"}` : `node-updating:${nodeId}:${what}:${toVersion ?? "unknown"}`,
|
|
80762
80777
|
titleKey: "system.node-updating.title",
|
|
80763
80778
|
bodyKey,
|
|
80764
80779
|
textParams: {
|
|
@@ -90260,13 +90275,17 @@ var DeviceLivenessHoldoff = class {
|
|
|
90260
90275
|
rememberIfAbsent(subject, state) {
|
|
90261
90276
|
if (!this.lastNotified.has(subject)) this.lastNotified.set(subject, state);
|
|
90262
90277
|
}
|
|
90263
|
-
/**
|
|
90264
|
-
|
|
90278
|
+
/**
|
|
90279
|
+
* A real ledger flip. Starts / resets the trailing timer. `delayMs` replaces
|
|
90280
|
+
* the default delay for THIS arm only (a node's planned-update grace).
|
|
90281
|
+
*/
|
|
90282
|
+
arm(subject, incoming, delayMs) {
|
|
90283
|
+
const delay = delayMs ?? this.delayMs;
|
|
90265
90284
|
this.pending.set(subject, incoming);
|
|
90266
90285
|
this.trackDeparture(subject, incoming);
|
|
90267
90286
|
const existing = this.timers.get(subject);
|
|
90268
90287
|
if (existing !== void 0) this.cancel(existing);
|
|
90269
|
-
if (
|
|
90288
|
+
if (delay <= 0) {
|
|
90270
90289
|
this.timers.delete(subject);
|
|
90271
90290
|
this.fire(subject);
|
|
90272
90291
|
return;
|
|
@@ -90274,7 +90293,7 @@ var DeviceLivenessHoldoff = class {
|
|
|
90274
90293
|
const id = this.schedule(() => {
|
|
90275
90294
|
this.timers.delete(subject);
|
|
90276
90295
|
this.fire(subject);
|
|
90277
|
-
},
|
|
90296
|
+
}, delay);
|
|
90278
90297
|
this.timers.set(subject, id);
|
|
90279
90298
|
}
|
|
90280
90299
|
dispose() {
|
|
@@ -92921,6 +92940,71 @@ var NcRuleStore = class NcRuleStore {
|
|
|
92921
92940
|
}
|
|
92922
92941
|
};
|
|
92923
92942
|
//#endregion
|
|
92943
|
+
//#region src/notification-center/planned-update-window.ts
|
|
92944
|
+
/**
|
|
92945
|
+
* A node that ANNOUNCED an update is expected to go offline — the window that
|
|
92946
|
+
* says so lives here.
|
|
92947
|
+
*
|
|
92948
|
+
* `system.restarting` becomes `node-updating` / `node-restarting`; the centre
|
|
92949
|
+
* records the announcement per node (RAM, refreshed by the event, never by a
|
|
92950
|
+
* read — D49). An offline for that node inside {@link PLANNED_UPDATE_OFFLINE_GRACE_MS}
|
|
92951
|
+
* of the announcement is held for the whole window instead of the usual 60 s
|
|
92952
|
+
* hold-off: back in time means no offline notification at all, not back means
|
|
92953
|
+
* one offline that says it happened during an update. A lost announcement
|
|
92954
|
+
* (events may be dropped, D8) simply behaves as before.
|
|
92955
|
+
*/
|
|
92956
|
+
/** How long after an announcement an offline is held, and how long the announcement counts. */
|
|
92957
|
+
var PLANNED_UPDATE_OFFLINE_GRACE_MS = 10 * 6e4;
|
|
92958
|
+
var NC_PLANNED_UPDATE_NODES_MAX = 256;
|
|
92959
|
+
var NcPlannedUpdateWindow = class {
|
|
92960
|
+
graceMs;
|
|
92961
|
+
/** Insertion-ordered: the oldest node is evicted first. */
|
|
92962
|
+
announcedAt = /* @__PURE__ */ new Map();
|
|
92963
|
+
/** When an offline was put on hold, per node. */
|
|
92964
|
+
heldAt = /* @__PURE__ */ new Map();
|
|
92965
|
+
constructor(graceMs = PLANNED_UPDATE_OFFLINE_GRACE_MS) {
|
|
92966
|
+
this.graceMs = graceMs;
|
|
92967
|
+
}
|
|
92968
|
+
get windowMs() {
|
|
92969
|
+
return this.graceMs;
|
|
92970
|
+
}
|
|
92971
|
+
get graceMinutes() {
|
|
92972
|
+
return Math.round(this.graceMs / 6e4);
|
|
92973
|
+
}
|
|
92974
|
+
/** Feed every system subject the intake accepted; only the two announcements are kept. */
|
|
92975
|
+
observe(system, atMs) {
|
|
92976
|
+
if (system.kind !== "node-updating" && system.kind !== "node-restarting") return;
|
|
92977
|
+
const nodeId = system.nodeId;
|
|
92978
|
+
if (nodeId === void 0) return;
|
|
92979
|
+
this.announcedAt.delete(nodeId);
|
|
92980
|
+
this.announcedAt.set(nodeId, atMs);
|
|
92981
|
+
while (this.announcedAt.size > NC_PLANNED_UPDATE_NODES_MAX) {
|
|
92982
|
+
const oldest = this.announcedAt.keys().next();
|
|
92983
|
+
if (oldest.done === true) break;
|
|
92984
|
+
this.announcedAt.delete(oldest.value);
|
|
92985
|
+
}
|
|
92986
|
+
}
|
|
92987
|
+
/** True when the node announced an update no longer than the window ago. */
|
|
92988
|
+
isPlanned(nodeId, atMs) {
|
|
92989
|
+
const at = this.announcedAt.get(nodeId);
|
|
92990
|
+
return at !== void 0 && atMs - at <= this.graceMs;
|
|
92991
|
+
}
|
|
92992
|
+
/** An offline was put on hold for this node. */
|
|
92993
|
+
hold(nodeId, atMs) {
|
|
92994
|
+
this.heldAt.set(nodeId, atMs);
|
|
92995
|
+
}
|
|
92996
|
+
/**
|
|
92997
|
+
* The node is back: seconds the held offline lasted, or `null` when no offline
|
|
92998
|
+
* was held, or its window already ran out (the offline was sent).
|
|
92999
|
+
*/
|
|
93000
|
+
release(nodeId, atMs) {
|
|
93001
|
+
const at = this.heldAt.get(nodeId);
|
|
93002
|
+
if (at === void 0) return null;
|
|
93003
|
+
this.heldAt.delete(nodeId);
|
|
93004
|
+
return atMs - at < this.graceMs ? Math.round((atMs - at) / 1e3) : null;
|
|
93005
|
+
}
|
|
93006
|
+
};
|
|
93007
|
+
//#endregion
|
|
92924
93008
|
//#region src/notification-center/restart-supersede.ts
|
|
92925
93009
|
/** How many landings are remembered — one per node per update, so a fleet's worth. */
|
|
92926
93010
|
var NC_UPDATE_LANDINGS_MAX = 256;
|
|
@@ -101881,6 +101965,7 @@ function onSystemEvent(host, event) {
|
|
|
101881
101965
|
const system = incoming.subject.systemEvent;
|
|
101882
101966
|
if (system !== void 0) host.stateSummary.observeSystem(system, host.now());
|
|
101883
101967
|
if (system !== void 0) host.updateLandings.observe(system, host.now());
|
|
101968
|
+
if (system !== void 0) host.plannedUpdates.observe(system, host.now());
|
|
101884
101969
|
const observation = system !== void 0 ? ledgeredLiveness(system) : null;
|
|
101885
101970
|
if (observation !== null) {
|
|
101886
101971
|
const previous = host.liveness.stateOf(observation.subject);
|
|
@@ -101907,7 +101992,11 @@ function onSystemEvent(host, event) {
|
|
|
101907
101992
|
});
|
|
101908
101993
|
return;
|
|
101909
101994
|
}
|
|
101910
|
-
if (
|
|
101995
|
+
if (isNodeLivenessKind(observation.kind) && system !== void 0) {
|
|
101996
|
+
armNodeLiveness(host, holdoff, observation.subject, incoming, system);
|
|
101997
|
+
return;
|
|
101998
|
+
}
|
|
101999
|
+
if (isDeviceLivenessKind(observation.kind)) {
|
|
101911
102000
|
holdoff.arm(observation.subject, incoming);
|
|
101912
102001
|
return;
|
|
101913
102002
|
}
|
|
@@ -101918,6 +102007,50 @@ function onSystemEvent(host, event) {
|
|
|
101918
102007
|
host.consumeEvent(incoming);
|
|
101919
102008
|
}
|
|
101920
102009
|
/**
|
|
102010
|
+
* Arm a node liveness flip. An OFFLINE of a node that announced an update is
|
|
102011
|
+
* held for the whole planned-update window and worded as such if it is still
|
|
102012
|
+
* sent; the node's return inside the window is logged and sends nothing (the
|
|
102013
|
+
* hold-off sees the state bounce back to the one last notified).
|
|
102014
|
+
*/
|
|
102015
|
+
function armNodeLiveness(host, holdoff, subject, incoming, system) {
|
|
102016
|
+
const nodeId = system.nodeId;
|
|
102017
|
+
const now = host.now();
|
|
102018
|
+
if (nodeId === void 0) {
|
|
102019
|
+
holdoff.arm(subject, incoming);
|
|
102020
|
+
return;
|
|
102021
|
+
}
|
|
102022
|
+
const window = host.plannedUpdates;
|
|
102023
|
+
if (system.kind === "node-offline" && window.isPlanned(nodeId, now)) {
|
|
102024
|
+
window.hold(nodeId, now);
|
|
102025
|
+
holdoff.arm(subject, withPlannedUpdateWording(incoming, system, window.graceMinutes), window.windowMs);
|
|
102026
|
+
return;
|
|
102027
|
+
}
|
|
102028
|
+
if (system.kind === "node-online") {
|
|
102029
|
+
const backAfterSec = window.release(nodeId, now);
|
|
102030
|
+
if (backAfterSec !== null) host.logger.info(`node ${nodeId}: offline suppressed: planned update, back after ${backAfterSec}s`, { meta: {
|
|
102031
|
+
nodeId,
|
|
102032
|
+
backAfterSec
|
|
102033
|
+
} });
|
|
102034
|
+
}
|
|
102035
|
+
holdoff.arm(subject, incoming);
|
|
102036
|
+
}
|
|
102037
|
+
function withPlannedUpdateWording(incoming, system, graceMin) {
|
|
102038
|
+
return {
|
|
102039
|
+
...incoming,
|
|
102040
|
+
subject: {
|
|
102041
|
+
...incoming.subject,
|
|
102042
|
+
systemEvent: {
|
|
102043
|
+
...system,
|
|
102044
|
+
bodyKey: "system.node-offline.body.agent.updating",
|
|
102045
|
+
textParams: {
|
|
102046
|
+
...system.textParams,
|
|
102047
|
+
graceMin: String(graceMin)
|
|
102048
|
+
}
|
|
102049
|
+
}
|
|
102050
|
+
}
|
|
102051
|
+
};
|
|
102052
|
+
}
|
|
102053
|
+
/**
|
|
101921
102054
|
* One edge of an alert episode, from the bus or from the reconcile. The
|
|
101922
102055
|
* ledger decides whether it is news; only news reaches the rules.
|
|
101923
102056
|
*/
|
|
@@ -105736,6 +105869,7 @@ var NotificationCenter = class {
|
|
|
105736
105869
|
stateSummary;
|
|
105737
105870
|
/** Every `server-updated` heard, so a stale `node-updating` is not sent after it (D723). */
|
|
105738
105871
|
updateLandings = new NcUpdateLandings();
|
|
105872
|
+
plannedUpdates = new NcPlannedUpdateWindow();
|
|
105739
105873
|
/** States the `deviceState` rule gate reads. Refreshed on the reload tick;
|
|
105740
105874
|
* read with no I/O on the persist hook. */
|
|
105741
105875
|
deviceStates;
|
|
@@ -107128,6 +107262,9 @@ var NotificationCenter = class {
|
|
|
107128
107262
|
get timelapseRules() {
|
|
107129
107263
|
return self.timelapseRules;
|
|
107130
107264
|
},
|
|
107265
|
+
get plannedUpdates() {
|
|
107266
|
+
return self.plannedUpdates;
|
|
107267
|
+
},
|
|
107131
107268
|
get updateLandings() {
|
|
107132
107269
|
return self.updateLandings;
|
|
107133
107270
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as MediaFileKindEnum, $i as BaseAddon, $n as cloneAlarmSettings, $r as paintHex, $t as OpsLogEntrySchema, A as DeclaredDevices, Aa as unknown, Ai as storageOccupancyCapability, An as TrackSideSchema, Ar as isAudioClassName, At as NcAlarmSensorsInputSchema, B as FULL_IMAGE_BBOX, Bi as systemEventSummarySplitOf, Bn as applyModeDelaysEdits, Br as isRootSuppliableStepId, Bt as NcRuleUpdateInputSchema, C as ClearTrackRelationResultSchema, Ca as partialRecord, Ci as ruleGroupingApplies, Cn as TimelapseRuleInputSchema, Cr as failureContributionCapability, Ct as NC_SNOOZE_MAX_MINUTES, D as DEFAULT_TIMELAPSE_PREVIEW_TEXT, Da as templateLiteral, Di as sensorRaisedOf, Dn as TrackPuritySchema, Dr as isAlertEpisodeOpen, Dt as NC_TEMPLATE_VARS, E as DEFAULT_EVENT_COLOR, Ea as string, Ei as secureActuationFor, En as TrackPlacementSchema, Er as isAlarmControllableCap, Et as NC_TAXONOMY, F as EVENT_DENSITY_BATCH_MAX, Fi as syncActiveAlarmProfileSettings, Fn as alarmPanelCapability, Fr as isEventOwnerType, Ft as NcRuleActionSchema, G as ListTrackRelationsResultSchema, Gi as withSystemEventClasses, Gn as audioMetricsCapability, Gr as kebabToCamel, Gt as NcSnoozeSuppressedSchema, H as LABEL_SUPPLY_MACRO, Hi as templateVarsFor, Hn as applySecureOnArmEdit, Hr as isSystemDelivery, Ht as NcSharedSequenceSchema, I as EVENT_KIND_BY_CAP, Ii as systemEventDeliveryProblems, In as alertEpisodeId, Ir as isKnownTemplateVar, It as NcRuleInputSchema, J as MAX_BIRTH_DECISION_RECORDS, Ji as canonicalHash, Jn as buildSubjectPath, Jr as memoizePinnedFfmpeg, Jt as NcTaxonomySchema, K as LockStateSchema, Ki as zoneAnalyticsCapability, Kn as audioModeOf, Kr as linkedStepOf, Kt as NcStateSummarySectionIdSchema, L as EVENT_OWNER_TYPES, Li as systemEventFamilyProblems, Ln as alertEpisodeKind, Lr as isLabelSupplyStepId, Lt as NcRulePatchSchema, M as EMBEDDING_MODEL_FAILED, Mi as subjectPathSampleFromBox, Mn as activateAlarmProfile, Mr as isDetectionMacroClass, Mt as NcAlarmSettingsPatchSchema, N as EMBEDDING_REQUIREMENTS_FAILED, Ni as subjectPathSvgPoints, Nn as addonWidgetsSourceCapability, Nr as isDrawableSubjectPath, Nt as NcConditionDescriptorSchema, O as DETECTION_MACRO_CLASSES, Oa as tuple, Oi as servedTemplateVars, On as TrackRelationKindSchema, Or as isAlertEpisodeSeverity, Ot as NcAlarmConfigSchema, P as EMBEDDING_REQUIREMENTS_UNAVAILABLE, Pi as summarizeReview, Pn as alarmDeviceSecureOnArm, Pr as isEventKindLabelKey, Pt as NcConditionsSchema, Q as MOTION_CLOSE_AFTER_MS, Qi as errMsg, Qn as classifyRetrainReview, Qr as occupancyScope, Qt as OPS_LOG_DEFAULT_LIMIT, R as EXPORT_DENSE_MAX_RANGES, Ri as systemEventFilterApplies, Rn as alertEpisodePayload, Rr as isMediaOwnerType, Rt as NcRuleSchema, S as ClearTrackRelationInputSchema, Sa as object, Si as ruleDeviceCompatCapQueries, Sn as TRACK_RELATIONS_DEFAULT_LIMIT, Sr as faceGalleryCapability, St as NC_SENSOR_TRANSITION_KINDS, T as DEFAULT_DETAIL_CROP_CONVENTION, Ta as strictObject, Ti as sceneMonitorCapability, Tn as TimelapseRuleSchema, Tr as gifFromMp4Args, Tt as NC_SYSTEM_EVENT_KIND_GROUP_SPECS, U as LabelAttributionSchema, Ui as vectorDimFromBase64, Un as armRemovalReconcile, Ur as isSystemEventSummaryRule, Ut as NcSnoozeInputSchema, V as FailureCounters, Vi as templateCarriesSummary, Vn as applyNonBlockingEdit, Vr as isScheduleActive, Vt as NcScheduleSchema, W as ListTrackRelationsInputSchema, Wi as viewerLinkBaseOf, Wn as assertTimelapseCadences, Wr as isVectorIndexDimConflict, Wt as NcSnoozeSchema, X as MAX_TRACK_PURITIES, Xi as isSourceCap, Xn as bundledCamstack, Xr as normalizeNcMediaPolicy, Xt as NcTemplatePreviewSchema, Y as MAX_BIRTH_LATENCY_PROXY_MS, Yi as evaluateSensorEdge, Yn as buildViewerLink, Yr as ncMediaPolicyError, Yt as NcTemplatePreviewInputSchema, Z as MAX_TRACK_RELATIONS, Zi as DeviceType, Zn as calendarEventLocalSpan, Zr as notificationRulesCapability, Zt as NcTemplateVarDescriptorSchema, _ as BIRTH_DECISION_DEFAULT_LIMIT, _a as boolean, _n as SceneMonitorSchema, _t as NC_CONSUMABLE_SYSTEM_EVENT_KINDS, a as CLIP_EMBEDDING_STEP_ID, aa as createEvent, ai as plateGalleryCapability, an as RetrainDismissedSchema, ar as deleteAlarmProfile, at as NC_ALARM_NOTIFY_FIELDS, b as BucketAccumulator, ba as looseObject, bi as ruleAutoTriggersAlarm, bn as SetTrackRelationInputSchema, br as eventKindLabel, bt as NC_GROUPING_MAX_SEC, c as readClusterModelPinStrict, ca as defineRecordKinds, ci as readMotionTriggeredBy, cn as SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, cr as deriveRecordingMode, ct as NC_AUDIO_CONFIRM_HITS_DEFAULT, d as APPEARANCE_BLOCKS, da as nodePin, di as resolveClipSearchMinScore, dn as SCENE_DEFAULT_CHECK_INTERVAL_SEC, dr as deviceAttentionKind, dt as NC_CLIP_PRE_ROLL_DEFAULT_SEC, ea as CAP_ADVANCE_FIELDS, ei as paletteResultSchema, en as PackageLlmVerdictSchema, er as consumableFormOf, et as MotionTriggeredBySchema, f as APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT, fi as resolveDeliveryParams, fn as SCENE_DEFAULT_OBSERVATION_SPACING_SEC, fr as deviceRemovalHookCapability, ft as NC_CLIP_RETENTION_MAX_SEC, g as ArchivedDebugNoteSchema, ga as array, gi as resolveNcMediaImage, gn as SCENE_RESET_RECAPTURES, gt as NC_CONSUMABLE_LOW_PERCENT_DEFAULT, h as AlarmArmModeSchema, ha as _enum, hi as resolveModeNotifyPolicy, hn as SCENE_DIVERGED, hr as embeddingRefusalOf, ht as NC_CONFIRM_DEFAULT_TIMEOUT_MS, ia as RECORD_QUERY_MAX, ii as pipelineAnalyticsCapability, in as RebuildObjectEmbeddingsRefusalSchema, ir as createAlarmProfile, it as NC_ALARM_DELAY_MAX_SEC, j as DetectionSourceSchema, ja as EventCategory, ji as subKindsOf, jn as TrackSourceSchema, jr as isDefaultAlarmProfileId, jt as NcAlarmSensorsSchema, k as DETECTION_PIPELINE_CAP_NAME, ka as union, ki as startMoverUnderClearance, kn as TrackRelationSchema, kr as isAppLinkBase, kt as NcAlarmPostTriggeredActionSchema, l as resolveClusterModelPin, la as hydrateSchema, li as readTimelapseGeneratedAt, ln as SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, lr as describeSystemEventDeliveryProblem, lt as NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT, m as AUDIO_MACRO_LABELS, ma as ZodObject, mi as resolveModeDelays, mn as SCENE_DEFAULT_UNCOVERED_POLICY, mt as NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, na as InvalidRecordError, nn as RECORDING_EXPORT_MAX_READ_BYTES, nr as coreBlockIdFromAddonId, nt as NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC, o as CLUSTER_MODEL_OWNER_ADDON_ID, oa as customAction, oi as projectSubjectPath, on as RetrainOriginSchema, or as deriveDetailCropRect, ot as NC_ALARM_SYSTEM_EVENT_KINDS, p as ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT, pa as sleep$1, pi as resolveLocationMode, pn as SCENE_DEFAULT_QUIET_SECONDS, pt as NC_CONDITION_CATALOG, q as MAX_ARCHIVED_DEBUG_NOTES, qi as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, qn as buildEventKindDescriptor, qr as mayWriteToLocation, qt as NcSystemEventKindSchema, ra as RECORD_MAX_DATA_BYTES, ri as pickFaceRescoreIntervalMinutes, rn as RECORDING_SOURCE_CAMSTACK_ADDON, rr as cosineSimilarity$1, rt as NC_ALARM_DELAY_FIELDS, s as FACE_EMBEDDING_STEP_ID, sa as defineCustomActions, si as readDeviceStateFrom, sn as RetrainStatusSchema, sr as derivePostTriggeredAction, st as NC_ALARM_TRIGGERED_MAX_SEC, t as BUILTIN_CLIP_MODELS, ta as CamProfileSchema, ti as parseAlertEpisodePayload, tr as consumableLowPercentOf, tt as NC_ALARM_DEFAULT_PROFILE_ID, u as APPEARANCE_BIN_COUNT, ua as isDeviceScopedCap, ui as renameAlarmProfile, un as SCENE_DEFAULT_ANCHOR_THRESHOLD, ur as describeSystemEventFamilyProblem, ut as NC_CLIP_POST_ROLL_DEFAULT_SEC, v as BaseDevice, va as discriminatedUnion, vi as retrainRevisionConflictMessage, vn as SetTrackPurityInputSchema, vr as encodeVectorBase64, vt as NC_DEFAULT_SNOOZE_MINUTES, w as CoverStateSchema, wa as record, wi as ruleKindOf, wn as TimelapseRulePatchSchema, wr as gifDeriveSpeed, wt as NC_STATE_SUMMARY_SECTION_IDS, x as COCO_TO_MACRO, xa as number, xi as ruleBelongsToAlarm$1, xn as TIMELAPSE_DENSE_FLOOR_SEC, xr as evictionPolicyOfLocation, xt as NC_GROUPING_MIN_SEC, y as BirthDecisionRecordSchema, ya as literal, yi as rootSupplyServes, yn as SetTrackPurityResultSchema, yr as ensureAlarmProfiles, yt as NC_GROUPING_DEFAULT_SEC, z as FIRST_LEVEL_MACRO_CLASSES, zi as systemEventSummaryScheduleOf, zn as applyBlockingEdit, zr as isRetiredClearKey, zt as NcRuleTargetSchema } from "../clip-model-registry-
|
|
1
|
+
import { $ as MediaFileKindEnum, $i as BaseAddon, $n as cloneAlarmSettings, $r as paintHex, $t as OpsLogEntrySchema, A as DeclaredDevices, Aa as unknown, Ai as storageOccupancyCapability, An as TrackSideSchema, Ar as isAudioClassName, At as NcAlarmSensorsInputSchema, B as FULL_IMAGE_BBOX, Bi as systemEventSummarySplitOf, Bn as applyModeDelaysEdits, Br as isRootSuppliableStepId, Bt as NcRuleUpdateInputSchema, C as ClearTrackRelationResultSchema, Ca as partialRecord, Ci as ruleGroupingApplies, Cn as TimelapseRuleInputSchema, Cr as failureContributionCapability, Ct as NC_SNOOZE_MAX_MINUTES, D as DEFAULT_TIMELAPSE_PREVIEW_TEXT, Da as templateLiteral, Di as sensorRaisedOf, Dn as TrackPuritySchema, Dr as isAlertEpisodeOpen, Dt as NC_TEMPLATE_VARS, E as DEFAULT_EVENT_COLOR, Ea as string, Ei as secureActuationFor, En as TrackPlacementSchema, Er as isAlarmControllableCap, Et as NC_TAXONOMY, F as EVENT_DENSITY_BATCH_MAX, Fi as syncActiveAlarmProfileSettings, Fn as alarmPanelCapability, Fr as isEventOwnerType, Ft as NcRuleActionSchema, G as ListTrackRelationsResultSchema, Gi as withSystemEventClasses, Gn as audioMetricsCapability, Gr as kebabToCamel, Gt as NcSnoozeSuppressedSchema, H as LABEL_SUPPLY_MACRO, Hi as templateVarsFor, Hn as applySecureOnArmEdit, Hr as isSystemDelivery, Ht as NcSharedSequenceSchema, I as EVENT_KIND_BY_CAP, Ii as systemEventDeliveryProblems, In as alertEpisodeId, Ir as isKnownTemplateVar, It as NcRuleInputSchema, J as MAX_BIRTH_DECISION_RECORDS, Ji as canonicalHash, Jn as buildSubjectPath, Jr as memoizePinnedFfmpeg, Jt as NcTaxonomySchema, K as LockStateSchema, Ki as zoneAnalyticsCapability, Kn as audioModeOf, Kr as linkedStepOf, Kt as NcStateSummarySectionIdSchema, L as EVENT_OWNER_TYPES, Li as systemEventFamilyProblems, Ln as alertEpisodeKind, Lr as isLabelSupplyStepId, Lt as NcRulePatchSchema, M as EMBEDDING_MODEL_FAILED, Mi as subjectPathSampleFromBox, Mn as activateAlarmProfile, Mr as isDetectionMacroClass, Mt as NcAlarmSettingsPatchSchema, N as EMBEDDING_REQUIREMENTS_FAILED, Ni as subjectPathSvgPoints, Nn as addonWidgetsSourceCapability, Nr as isDrawableSubjectPath, Nt as NcConditionDescriptorSchema, O as DETECTION_MACRO_CLASSES, Oa as tuple, Oi as servedTemplateVars, On as TrackRelationKindSchema, Or as isAlertEpisodeSeverity, Ot as NcAlarmConfigSchema, P as EMBEDDING_REQUIREMENTS_UNAVAILABLE, Pi as summarizeReview, Pn as alarmDeviceSecureOnArm, Pr as isEventKindLabelKey, Pt as NcConditionsSchema, Q as MOTION_CLOSE_AFTER_MS, Qi as errMsg, Qn as classifyRetrainReview, Qr as occupancyScope, Qt as OPS_LOG_DEFAULT_LIMIT, R as EXPORT_DENSE_MAX_RANGES, Ri as systemEventFilterApplies, Rn as alertEpisodePayload, Rr as isMediaOwnerType, Rt as NcRuleSchema, S as ClearTrackRelationInputSchema, Sa as object, Si as ruleDeviceCompatCapQueries, Sn as TRACK_RELATIONS_DEFAULT_LIMIT, Sr as faceGalleryCapability, St as NC_SENSOR_TRANSITION_KINDS, T as DEFAULT_DETAIL_CROP_CONVENTION, Ta as strictObject, Ti as sceneMonitorCapability, Tn as TimelapseRuleSchema, Tr as gifFromMp4Args, Tt as NC_SYSTEM_EVENT_KIND_GROUP_SPECS, U as LabelAttributionSchema, Ui as vectorDimFromBase64, Un as armRemovalReconcile, Ur as isSystemEventSummaryRule, Ut as NcSnoozeInputSchema, V as FailureCounters, Vi as templateCarriesSummary, Vn as applyNonBlockingEdit, Vr as isScheduleActive, Vt as NcScheduleSchema, W as ListTrackRelationsInputSchema, Wi as viewerLinkBaseOf, Wn as assertTimelapseCadences, Wr as isVectorIndexDimConflict, Wt as NcSnoozeSchema, X as MAX_TRACK_PURITIES, Xi as isSourceCap, Xn as bundledCamstack, Xr as normalizeNcMediaPolicy, Xt as NcTemplatePreviewSchema, Y as MAX_BIRTH_LATENCY_PROXY_MS, Yi as evaluateSensorEdge, Yn as buildViewerLink, Yr as ncMediaPolicyError, Yt as NcTemplatePreviewInputSchema, Z as MAX_TRACK_RELATIONS, Zi as DeviceType, Zn as calendarEventLocalSpan, Zr as notificationRulesCapability, Zt as NcTemplateVarDescriptorSchema, _ as BIRTH_DECISION_DEFAULT_LIMIT, _a as boolean, _n as SceneMonitorSchema, _t as NC_CONSUMABLE_SYSTEM_EVENT_KINDS, a as CLIP_EMBEDDING_STEP_ID, aa as createEvent, ai as plateGalleryCapability, an as RetrainDismissedSchema, ar as deleteAlarmProfile, at as NC_ALARM_NOTIFY_FIELDS, b as BucketAccumulator, ba as looseObject, bi as ruleAutoTriggersAlarm, bn as SetTrackRelationInputSchema, br as eventKindLabel, bt as NC_GROUPING_MAX_SEC, c as readClusterModelPinStrict, ca as defineRecordKinds, ci as readMotionTriggeredBy, cn as SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, cr as deriveRecordingMode, ct as NC_AUDIO_CONFIRM_HITS_DEFAULT, d as APPEARANCE_BLOCKS, da as nodePin, di as resolveClipSearchMinScore, dn as SCENE_DEFAULT_CHECK_INTERVAL_SEC, dr as deviceAttentionKind, dt as NC_CLIP_PRE_ROLL_DEFAULT_SEC, ea as CAP_ADVANCE_FIELDS, ei as paletteResultSchema, en as PackageLlmVerdictSchema, er as consumableFormOf, et as MotionTriggeredBySchema, f as APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT, fi as resolveDeliveryParams, fn as SCENE_DEFAULT_OBSERVATION_SPACING_SEC, fr as deviceRemovalHookCapability, ft as NC_CLIP_RETENTION_MAX_SEC, g as ArchivedDebugNoteSchema, ga as array, gi as resolveNcMediaImage, gn as SCENE_RESET_RECAPTURES, gt as NC_CONSUMABLE_LOW_PERCENT_DEFAULT, h as AlarmArmModeSchema, ha as _enum, hi as resolveModeNotifyPolicy, hn as SCENE_DIVERGED, hr as embeddingRefusalOf, ht as NC_CONFIRM_DEFAULT_TIMEOUT_MS, ia as RECORD_QUERY_MAX, ii as pipelineAnalyticsCapability, in as RebuildObjectEmbeddingsRefusalSchema, ir as createAlarmProfile, it as NC_ALARM_DELAY_MAX_SEC, j as DetectionSourceSchema, ja as EventCategory, ji as subKindsOf, jn as TrackSourceSchema, jr as isDefaultAlarmProfileId, jt as NcAlarmSensorsSchema, k as DETECTION_PIPELINE_CAP_NAME, ka as union, ki as startMoverUnderClearance, kn as TrackRelationSchema, kr as isAppLinkBase, kt as NcAlarmPostTriggeredActionSchema, l as resolveClusterModelPin, la as hydrateSchema, li as readTimelapseGeneratedAt, ln as SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, lr as describeSystemEventDeliveryProblem, lt as NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT, m as AUDIO_MACRO_LABELS, ma as ZodObject, mi as resolveModeDelays, mn as SCENE_DEFAULT_UNCOVERED_POLICY, mt as NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, na as InvalidRecordError, nn as RECORDING_EXPORT_MAX_READ_BYTES, nr as coreBlockIdFromAddonId, nt as NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC, o as CLUSTER_MODEL_OWNER_ADDON_ID, oa as customAction, oi as projectSubjectPath, on as RetrainOriginSchema, or as deriveDetailCropRect, ot as NC_ALARM_SYSTEM_EVENT_KINDS, p as ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT, pa as sleep$1, pi as resolveLocationMode, pn as SCENE_DEFAULT_QUIET_SECONDS, pt as NC_CONDITION_CATALOG, q as MAX_ARCHIVED_DEBUG_NOTES, qi as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, qn as buildEventKindDescriptor, qr as mayWriteToLocation, qt as NcSystemEventKindSchema, ra as RECORD_MAX_DATA_BYTES, ri as pickFaceRescoreIntervalMinutes, rn as RECORDING_SOURCE_CAMSTACK_ADDON, rr as cosineSimilarity$1, rt as NC_ALARM_DELAY_FIELDS, s as FACE_EMBEDDING_STEP_ID, sa as defineCustomActions, si as readDeviceStateFrom, sn as RetrainStatusSchema, sr as derivePostTriggeredAction, st as NC_ALARM_TRIGGERED_MAX_SEC, t as BUILTIN_CLIP_MODELS, ta as CamProfileSchema, ti as parseAlertEpisodePayload, tr as consumableLowPercentOf, tt as NC_ALARM_DEFAULT_PROFILE_ID, u as APPEARANCE_BIN_COUNT, ua as isDeviceScopedCap, ui as renameAlarmProfile, un as SCENE_DEFAULT_ANCHOR_THRESHOLD, ur as describeSystemEventFamilyProblem, ut as NC_CLIP_POST_ROLL_DEFAULT_SEC, v as BaseDevice, va as discriminatedUnion, vi as retrainRevisionConflictMessage, vn as SetTrackPurityInputSchema, vr as encodeVectorBase64, vt as NC_DEFAULT_SNOOZE_MINUTES, w as CoverStateSchema, wa as record, wi as ruleKindOf, wn as TimelapseRulePatchSchema, wr as gifDeriveSpeed, wt as NC_STATE_SUMMARY_SECTION_IDS, x as COCO_TO_MACRO, xa as number, xi as ruleBelongsToAlarm$1, xn as TIMELAPSE_DENSE_FLOOR_SEC, xr as evictionPolicyOfLocation, xt as NC_GROUPING_MIN_SEC, y as BirthDecisionRecordSchema, ya as literal, yi as rootSupplyServes, yn as SetTrackPurityResultSchema, yr as ensureAlarmProfiles, yt as NC_GROUPING_DEFAULT_SEC, z as FIRST_LEVEL_MACRO_CLASSES, zi as systemEventSummaryScheduleOf, zn as applyBlockingEdit, zr as isRetiredClearKey, zt as NcRuleTargetSchema } from "../clip-model-registry-BrazZJvr.mjs";
|
|
2
2
|
import { t as __exportAll } from "../embedding-encoder/index.mjs";
|
|
3
3
|
import * as fs$1 from "node:fs";
|
|
4
4
|
import { createWriteStream, promises } from "node:fs";
|
|
@@ -9055,6 +9055,7 @@ var en_default = {
|
|
|
9055
9055
|
"system.node-offline.body.agent": "Agent {{nodeName}} is offline",
|
|
9056
9056
|
"system.node-offline.body.agent.connection-lost": "Agent {{nodeName}} lost its connection to the hub",
|
|
9057
9057
|
"system.node-offline.body.agent.shutdown": "Agent {{nodeName}} shut down",
|
|
9058
|
+
"system.node-offline.body.agent.updating": "Agent {{nodeName}} went offline while updating and has not come back after {{graceMin}} minutes",
|
|
9058
9059
|
"system.node-inference-unavailable.title": "Node cannot infer — {{nodeId}}",
|
|
9059
9060
|
"system.node-inference-unavailable.body": "Node {{nodeId}} can no longer run inference — every enabled device is unavailable ({{devices}}). It will not receive cameras until one returns.",
|
|
9060
9061
|
"system.addon-crash-loop.title": "Addon crash-loop — {{nodeId}}",
|
|
@@ -9459,6 +9460,7 @@ var it_default = {
|
|
|
9459
9460
|
"system.node-offline.body.agent": "L'agent {{nodeName}} è offline",
|
|
9460
9461
|
"system.node-offline.body.agent.connection-lost": "L'agent {{nodeName}} ha perso la connessione con l'hub",
|
|
9461
9462
|
"system.node-offline.body.agent.shutdown": "L'agent {{nodeName}} si è spento",
|
|
9463
|
+
"system.node-offline.body.agent.updating": "L'agent {{nodeName}} è andato offline durante un aggiornamento e non è tornato dopo {{graceMin}} minuti",
|
|
9462
9464
|
"system.node-inference-unavailable.title": "Nodo senza inferenza — {{nodeId}}",
|
|
9463
9465
|
"system.node-inference-unavailable.body": "Il nodo {{nodeId}} non può più eseguire inferenza — tutti i dispositivi abilitati non sono disponibili ({{devices}}). Non riceverà camere finché uno non torna disponibile.",
|
|
9464
9466
|
"system.addon-crash-loop.title": "Crash-loop addon — {{nodeId}}",
|
|
@@ -70412,7 +70414,12 @@ Object.freeze({
|
|
|
70412
70414
|
"calendar-source": ["listCalendars", "listEvents"],
|
|
70413
70415
|
"custom-model-registry": ["listModels"],
|
|
70414
70416
|
"data-store-provider": ["histogram", "query"],
|
|
70415
|
-
"device-export": [
|
|
70417
|
+
"device-export": [
|
|
70418
|
+
"listExposedDevices",
|
|
70419
|
+
"listExposedEntities",
|
|
70420
|
+
"listSupportedDeviceKinds",
|
|
70421
|
+
"listSupportedEntityKinds"
|
|
70422
|
+
],
|
|
70416
70423
|
"device-extension": ["listSlots", "listSources"],
|
|
70417
70424
|
"device-provider": ["discoverDevices", "getDevices"],
|
|
70418
70425
|
"device-removal-hook": ["listDeviceData"],
|
|
@@ -70437,6 +70444,7 @@ Object.freeze({
|
|
|
70437
70444
|
"listTargets"
|
|
70438
70445
|
],
|
|
70439
70446
|
"recording": ["listSources"],
|
|
70447
|
+
"remote-layout-components": ["listComponents"],
|
|
70440
70448
|
"storage-occupancy": ["getOccupancy"],
|
|
70441
70449
|
"storage-provider": ["list"],
|
|
70442
70450
|
"template": ["list"],
|
|
@@ -70451,6 +70459,12 @@ Object.freeze({
|
|
|
70451
70459
|
"videoclips": ["listClips", "listSources"]
|
|
70452
70460
|
});
|
|
70453
70461
|
Object.freeze({
|
|
70462
|
+
"device-export": [
|
|
70463
|
+
"exposeEntity",
|
|
70464
|
+
"listExposedEntities",
|
|
70465
|
+
"listSupportedEntityKinds",
|
|
70466
|
+
"unexposeEntity"
|
|
70467
|
+
],
|
|
70454
70468
|
"log-destination": [
|
|
70455
70469
|
"cancelRead",
|
|
70456
70470
|
"describeRead",
|
|
@@ -80658,12 +80672,13 @@ function incomingFromNodeRestarting(facts, data) {
|
|
|
80658
80672
|
nodeIds: [nodeId]
|
|
80659
80673
|
});
|
|
80660
80674
|
const packageName = stringField(data, "packageName") ?? "@camstack/server";
|
|
80675
|
+
const what = stringField(data, "what");
|
|
80661
80676
|
const fromVersion = stringField(data, "fromVersion");
|
|
80662
80677
|
const bodyKey = toVersion === void 0 ? "system.node-updating.body.plain" : fromVersion === void 0 ? "system.node-updating.body.toOnly" : "system.node-updating.body";
|
|
80663
80678
|
return systemSubject({
|
|
80664
80679
|
facts,
|
|
80665
80680
|
kind: "node-updating",
|
|
80666
|
-
subject: `node-updating:${nodeId}:${toVersion ?? "unknown"}`,
|
|
80681
|
+
subject: what === void 0 || what === "server" ? `node-updating:${nodeId}:${toVersion ?? "unknown"}` : `node-updating:${nodeId}:${what}:${toVersion ?? "unknown"}`,
|
|
80667
80682
|
titleKey: "system.node-updating.title",
|
|
80668
80683
|
bodyKey,
|
|
80669
80684
|
textParams: {
|
|
@@ -90165,13 +90180,17 @@ var DeviceLivenessHoldoff = class {
|
|
|
90165
90180
|
rememberIfAbsent(subject, state) {
|
|
90166
90181
|
if (!this.lastNotified.has(subject)) this.lastNotified.set(subject, state);
|
|
90167
90182
|
}
|
|
90168
|
-
/**
|
|
90169
|
-
|
|
90183
|
+
/**
|
|
90184
|
+
* A real ledger flip. Starts / resets the trailing timer. `delayMs` replaces
|
|
90185
|
+
* the default delay for THIS arm only (a node's planned-update grace).
|
|
90186
|
+
*/
|
|
90187
|
+
arm(subject, incoming, delayMs) {
|
|
90188
|
+
const delay = delayMs ?? this.delayMs;
|
|
90170
90189
|
this.pending.set(subject, incoming);
|
|
90171
90190
|
this.trackDeparture(subject, incoming);
|
|
90172
90191
|
const existing = this.timers.get(subject);
|
|
90173
90192
|
if (existing !== void 0) this.cancel(existing);
|
|
90174
|
-
if (
|
|
90193
|
+
if (delay <= 0) {
|
|
90175
90194
|
this.timers.delete(subject);
|
|
90176
90195
|
this.fire(subject);
|
|
90177
90196
|
return;
|
|
@@ -90179,7 +90198,7 @@ var DeviceLivenessHoldoff = class {
|
|
|
90179
90198
|
const id = this.schedule(() => {
|
|
90180
90199
|
this.timers.delete(subject);
|
|
90181
90200
|
this.fire(subject);
|
|
90182
|
-
},
|
|
90201
|
+
}, delay);
|
|
90183
90202
|
this.timers.set(subject, id);
|
|
90184
90203
|
}
|
|
90185
90204
|
dispose() {
|
|
@@ -92826,6 +92845,71 @@ var NcRuleStore = class NcRuleStore {
|
|
|
92826
92845
|
}
|
|
92827
92846
|
};
|
|
92828
92847
|
//#endregion
|
|
92848
|
+
//#region src/notification-center/planned-update-window.ts
|
|
92849
|
+
/**
|
|
92850
|
+
* A node that ANNOUNCED an update is expected to go offline — the window that
|
|
92851
|
+
* says so lives here.
|
|
92852
|
+
*
|
|
92853
|
+
* `system.restarting` becomes `node-updating` / `node-restarting`; the centre
|
|
92854
|
+
* records the announcement per node (RAM, refreshed by the event, never by a
|
|
92855
|
+
* read — D49). An offline for that node inside {@link PLANNED_UPDATE_OFFLINE_GRACE_MS}
|
|
92856
|
+
* of the announcement is held for the whole window instead of the usual 60 s
|
|
92857
|
+
* hold-off: back in time means no offline notification at all, not back means
|
|
92858
|
+
* one offline that says it happened during an update. A lost announcement
|
|
92859
|
+
* (events may be dropped, D8) simply behaves as before.
|
|
92860
|
+
*/
|
|
92861
|
+
/** How long after an announcement an offline is held, and how long the announcement counts. */
|
|
92862
|
+
var PLANNED_UPDATE_OFFLINE_GRACE_MS = 10 * 6e4;
|
|
92863
|
+
var NC_PLANNED_UPDATE_NODES_MAX = 256;
|
|
92864
|
+
var NcPlannedUpdateWindow = class {
|
|
92865
|
+
graceMs;
|
|
92866
|
+
/** Insertion-ordered: the oldest node is evicted first. */
|
|
92867
|
+
announcedAt = /* @__PURE__ */ new Map();
|
|
92868
|
+
/** When an offline was put on hold, per node. */
|
|
92869
|
+
heldAt = /* @__PURE__ */ new Map();
|
|
92870
|
+
constructor(graceMs = PLANNED_UPDATE_OFFLINE_GRACE_MS) {
|
|
92871
|
+
this.graceMs = graceMs;
|
|
92872
|
+
}
|
|
92873
|
+
get windowMs() {
|
|
92874
|
+
return this.graceMs;
|
|
92875
|
+
}
|
|
92876
|
+
get graceMinutes() {
|
|
92877
|
+
return Math.round(this.graceMs / 6e4);
|
|
92878
|
+
}
|
|
92879
|
+
/** Feed every system subject the intake accepted; only the two announcements are kept. */
|
|
92880
|
+
observe(system, atMs) {
|
|
92881
|
+
if (system.kind !== "node-updating" && system.kind !== "node-restarting") return;
|
|
92882
|
+
const nodeId = system.nodeId;
|
|
92883
|
+
if (nodeId === void 0) return;
|
|
92884
|
+
this.announcedAt.delete(nodeId);
|
|
92885
|
+
this.announcedAt.set(nodeId, atMs);
|
|
92886
|
+
while (this.announcedAt.size > NC_PLANNED_UPDATE_NODES_MAX) {
|
|
92887
|
+
const oldest = this.announcedAt.keys().next();
|
|
92888
|
+
if (oldest.done === true) break;
|
|
92889
|
+
this.announcedAt.delete(oldest.value);
|
|
92890
|
+
}
|
|
92891
|
+
}
|
|
92892
|
+
/** True when the node announced an update no longer than the window ago. */
|
|
92893
|
+
isPlanned(nodeId, atMs) {
|
|
92894
|
+
const at = this.announcedAt.get(nodeId);
|
|
92895
|
+
return at !== void 0 && atMs - at <= this.graceMs;
|
|
92896
|
+
}
|
|
92897
|
+
/** An offline was put on hold for this node. */
|
|
92898
|
+
hold(nodeId, atMs) {
|
|
92899
|
+
this.heldAt.set(nodeId, atMs);
|
|
92900
|
+
}
|
|
92901
|
+
/**
|
|
92902
|
+
* The node is back: seconds the held offline lasted, or `null` when no offline
|
|
92903
|
+
* was held, or its window already ran out (the offline was sent).
|
|
92904
|
+
*/
|
|
92905
|
+
release(nodeId, atMs) {
|
|
92906
|
+
const at = this.heldAt.get(nodeId);
|
|
92907
|
+
if (at === void 0) return null;
|
|
92908
|
+
this.heldAt.delete(nodeId);
|
|
92909
|
+
return atMs - at < this.graceMs ? Math.round((atMs - at) / 1e3) : null;
|
|
92910
|
+
}
|
|
92911
|
+
};
|
|
92912
|
+
//#endregion
|
|
92829
92913
|
//#region src/notification-center/restart-supersede.ts
|
|
92830
92914
|
/** How many landings are remembered — one per node per update, so a fleet's worth. */
|
|
92831
92915
|
var NC_UPDATE_LANDINGS_MAX = 256;
|
|
@@ -101786,6 +101870,7 @@ function onSystemEvent(host, event) {
|
|
|
101786
101870
|
const system = incoming.subject.systemEvent;
|
|
101787
101871
|
if (system !== void 0) host.stateSummary.observeSystem(system, host.now());
|
|
101788
101872
|
if (system !== void 0) host.updateLandings.observe(system, host.now());
|
|
101873
|
+
if (system !== void 0) host.plannedUpdates.observe(system, host.now());
|
|
101789
101874
|
const observation = system !== void 0 ? ledgeredLiveness(system) : null;
|
|
101790
101875
|
if (observation !== null) {
|
|
101791
101876
|
const previous = host.liveness.stateOf(observation.subject);
|
|
@@ -101812,7 +101897,11 @@ function onSystemEvent(host, event) {
|
|
|
101812
101897
|
});
|
|
101813
101898
|
return;
|
|
101814
101899
|
}
|
|
101815
|
-
if (
|
|
101900
|
+
if (isNodeLivenessKind(observation.kind) && system !== void 0) {
|
|
101901
|
+
armNodeLiveness(host, holdoff, observation.subject, incoming, system);
|
|
101902
|
+
return;
|
|
101903
|
+
}
|
|
101904
|
+
if (isDeviceLivenessKind(observation.kind)) {
|
|
101816
101905
|
holdoff.arm(observation.subject, incoming);
|
|
101817
101906
|
return;
|
|
101818
101907
|
}
|
|
@@ -101823,6 +101912,50 @@ function onSystemEvent(host, event) {
|
|
|
101823
101912
|
host.consumeEvent(incoming);
|
|
101824
101913
|
}
|
|
101825
101914
|
/**
|
|
101915
|
+
* Arm a node liveness flip. An OFFLINE of a node that announced an update is
|
|
101916
|
+
* held for the whole planned-update window and worded as such if it is still
|
|
101917
|
+
* sent; the node's return inside the window is logged and sends nothing (the
|
|
101918
|
+
* hold-off sees the state bounce back to the one last notified).
|
|
101919
|
+
*/
|
|
101920
|
+
function armNodeLiveness(host, holdoff, subject, incoming, system) {
|
|
101921
|
+
const nodeId = system.nodeId;
|
|
101922
|
+
const now = host.now();
|
|
101923
|
+
if (nodeId === void 0) {
|
|
101924
|
+
holdoff.arm(subject, incoming);
|
|
101925
|
+
return;
|
|
101926
|
+
}
|
|
101927
|
+
const window = host.plannedUpdates;
|
|
101928
|
+
if (system.kind === "node-offline" && window.isPlanned(nodeId, now)) {
|
|
101929
|
+
window.hold(nodeId, now);
|
|
101930
|
+
holdoff.arm(subject, withPlannedUpdateWording(incoming, system, window.graceMinutes), window.windowMs);
|
|
101931
|
+
return;
|
|
101932
|
+
}
|
|
101933
|
+
if (system.kind === "node-online") {
|
|
101934
|
+
const backAfterSec = window.release(nodeId, now);
|
|
101935
|
+
if (backAfterSec !== null) host.logger.info(`node ${nodeId}: offline suppressed: planned update, back after ${backAfterSec}s`, { meta: {
|
|
101936
|
+
nodeId,
|
|
101937
|
+
backAfterSec
|
|
101938
|
+
} });
|
|
101939
|
+
}
|
|
101940
|
+
holdoff.arm(subject, incoming);
|
|
101941
|
+
}
|
|
101942
|
+
function withPlannedUpdateWording(incoming, system, graceMin) {
|
|
101943
|
+
return {
|
|
101944
|
+
...incoming,
|
|
101945
|
+
subject: {
|
|
101946
|
+
...incoming.subject,
|
|
101947
|
+
systemEvent: {
|
|
101948
|
+
...system,
|
|
101949
|
+
bodyKey: "system.node-offline.body.agent.updating",
|
|
101950
|
+
textParams: {
|
|
101951
|
+
...system.textParams,
|
|
101952
|
+
graceMin: String(graceMin)
|
|
101953
|
+
}
|
|
101954
|
+
}
|
|
101955
|
+
}
|
|
101956
|
+
};
|
|
101957
|
+
}
|
|
101958
|
+
/**
|
|
101826
101959
|
* One edge of an alert episode, from the bus or from the reconcile. The
|
|
101827
101960
|
* ledger decides whether it is news; only news reaches the rules.
|
|
101828
101961
|
*/
|
|
@@ -105641,6 +105774,7 @@ var NotificationCenter = class {
|
|
|
105641
105774
|
stateSummary;
|
|
105642
105775
|
/** Every `server-updated` heard, so a stale `node-updating` is not sent after it (D723). */
|
|
105643
105776
|
updateLandings = new NcUpdateLandings();
|
|
105777
|
+
plannedUpdates = new NcPlannedUpdateWindow();
|
|
105644
105778
|
/** States the `deviceState` rule gate reads. Refreshed on the reload tick;
|
|
105645
105779
|
* read with no I/O on the persist hook. */
|
|
105646
105780
|
deviceStates;
|
|
@@ -107033,6 +107167,9 @@ var NotificationCenter = class {
|
|
|
107033
107167
|
get timelapseRules() {
|
|
107034
107168
|
return self.timelapseRules;
|
|
107035
107169
|
},
|
|
107170
|
+
get plannedUpdates() {
|
|
107171
|
+
return self.plannedUpdates;
|
|
107172
|
+
},
|
|
107036
107173
|
get updateLandings() {
|
|
107037
107174
|
return self.updateLandings;
|
|
107038
107175
|
},
|
|
@@ -30,7 +30,7 @@ async function d(e) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
async function f() {
|
|
33
|
-
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-
|
|
33
|
+
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-D6DnF6Vk.mjs")).catch((e) => {
|
|
34
34
|
throw l = void 0, e;
|
|
35
35
|
}), l;
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-post-analysis",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.653",
|
|
4
4
|
"description": "Post-Analysis bundle — enrichment, embedding-encoder, pipeline-analytics. Multi-entry npm package shipping addons that consume pipeline output.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|