Extracted 52 files from Timmy_Foundation/hermes-agent (gitea/main) into hermes-sovereign/ directory to restore clean upstream tracking. Layout: docs/ 19 files — deploy guides, performance reports, security docs, research security/ 5 files — audit workflows, PR checklists, validation scripts wizard-bootstrap/ 7 files — wizard environment, dependency checking, auditing notebooks/ 2 files — Jupyter health monitoring notebooks scripts/ 5 files — forge health, smoke tests, syntax guard, deploy validation ci/ 2 files — Gitea CI workflow definitions githooks/ 3 files — pre-commit hooks and config devkit/ 8 files — developer toolkit (Gitea client, health, notebook runner) README.md 1 file — directory overview Addresses: #337, #338
58 lines
1.7 KiB
Plaintext
58 lines
1.7 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Parameterized Agent Task: System Health Check\n",
|
|
"\n",
|
|
"This notebook demonstrates how an LLM agent can generate a task notebook,\n",
|
|
"a scheduler can parameterize and execute it via papermill,\n",
|
|
"and the output becomes a persistent audit artifact."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {"tags": ["parameters"]},
|
|
"outputs": [],
|
|
"source": [
|
|
"# Default parameters — papermill will inject overrides here\n",
|
|
"threshold = 1.0\n",
|
|
"hostname = \"localhost\""
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import json, subprocess, datetime\n",
|
|
"gather_time = datetime.datetime.now().isoformat()\n",
|
|
"load_avg = subprocess.check_output([\"cat\", \"/proc/loadavg\"]).decode().strip()\n",
|
|
"load_values = [float(x) for x in load_avg.split()[:3]]\n",
|
|
"avg_load = sum(load_values) / len(load_values)\n",
|
|
"intervention_needed = avg_load > threshold\n",
|
|
"report = {\n",
|
|
" \"hostname\": hostname,\n",
|
|
" \"threshold\": threshold,\n",
|
|
" \"avg_load\": round(avg_load, 3),\n",
|
|
" \"intervention_needed\": intervention_needed,\n",
|
|
" \"gathered_at\": gather_time\n",
|
|
"}\n",
|
|
"print(json.dumps(report, indent=2))"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"language": "python",
|
|
"name": "python3"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|