feat(config): wire runtime settings from env/config with sane defaults

This commit is contained in:
patrick committed 2026-02-10 22:01:17 -05:00
1 parent 6dac06c117
commit 461512f20a
6 files changed
+195 -20

No files matched your search

+7 -2
View File
@@ -10,8 +10,13 @@ class LocalStateReporter:
Manages the health manifest on Triton.
Acts as the 'Black Box' recorder for Argus to query.
"""
def __init__(self, state_file="/root/threat-engine-agent/threat-agent-state.json"):
def __init__(
self,
state_file="/root/threat-engine-agent/threat-agent-state.json",
node_name="unknown",
):
self.state_file = state_file
self.node_name = node_name
# Ensure the directory is writable
os.makedirs(os.path.dirname(os.path.abspath(self.state_file)), exist_ok=True)
@@ -20,7 +25,7 @@ class LocalStateReporter:
Writes the current health snapshot to a JSON file.
"""
status_data = {
"node_name": "triton",
"node_name": self.node_name,
"last_check": datetime.now().isoformat(),
"status": "HEALTHY" if is_synced else "DESYNC_DETECTED",
"is_synced": is_synced,