diff --git a/.agents/workflows/ABOUTME.md b/.agents/looprails/ABOUTME.md similarity index 83% rename from .agents/workflows/ABOUTME.md rename to .agents/looprails/ABOUTME.md index a965ada..f42a92f 100644 --- a/.agents/workflows/ABOUTME.md +++ b/.agents/looprails/ABOUTME.md @@ -1,6 +1,6 @@ -# .agents/workflows +# .agents/looprails -nbot-wf workflow files for this repo. +Looprail files for this repo. ## journal-triage @@ -15,4 +15,4 @@ against this repo, and writes a report ranked by urgency to `.tmp/journal-report - Inputs: `since` (default `24 hours ago`), `priority` (`err`, `warning`, `notice`), `host` (default `fwbook`), `repo` (default `/home/ari/nixos-setup`). -Run: `nbot-wf run .agents/workflows/journal-triage.toml`, or ask the agent to run it. +Run: `looprail run .agents/looprails/journal-triage.toml`, or ask the agent to run it. diff --git a/.agents/workflows/journal-triage.toml b/.agents/looprails/journal-triage.toml similarity index 92% rename from .agents/workflows/journal-triage.toml rename to .agents/looprails/journal-triage.toml index 43fc1e0..64bcd88 100644 --- a/.agents/workflows/journal-triage.toml +++ b/.agents/looprails/journal-triage.toml @@ -11,7 +11,7 @@ repo = { type = "string", description = "Path of the NixOS config repo.", min_le kind = "shell" description = "Collects journal warnings and failed units into a digest." cwd = "{{ inputs.repo }}" -run = ["/usr/bin/env", "sh", ".agents/workflows/journal-triage/collect.sh {{ inputs.since }} {{ inputs.priority }}"] +run = ["sh .agents/looprails/journal-triage/collect.sh {{ inputs.since }} {{ inputs.priority }}"] [step.collect.outputs] raw_log = { type = "string", description = "Path of the full raw journal log." } @@ -38,7 +38,7 @@ description = "Writes the report to .tmp/journal-reports." needs = ["triage"] run = [ "R={{ inputs.repo }}; mkdir -p \"$R/.tmp/journal-reports\"", - "S={{ steps.triage.outputs.summary }}; H={{ inputs.host }}; R={{ inputs.repo }}; f=\"$R/.tmp/journal-reports/$H-$(date +%Y-%m-%d-%H%M).md\"; printf '%s\\n' \"$S\" > \"$f\"; echo \"report=$f\" >> \"$NBOT_WF_OUTPUTS\"; echo \"Report written to $f\"", + "S={{ steps.triage.outputs.summary }}; H={{ inputs.host }}; R={{ inputs.repo }}; f=\"$R/.tmp/journal-reports/$H-$(date +%Y-%m-%d-%H%M).md\"; printf '%s\\n' \"$S\" > \"$f\"; echo \"report=$f\" >> \"$NBOT_LR_OUTPUTS\"; echo \"Report written to $f\"", ] [step.report.outputs] diff --git a/.agents/workflows/journal-triage/collect.sh b/.agents/looprails/journal-triage/collect.sh similarity index 93% rename from .agents/workflows/journal-triage/collect.sh rename to .agents/looprails/journal-triage/collect.sh index fc300ca..2580714 100755 --- a/.agents/workflows/journal-triage/collect.sh +++ b/.agents/looprails/journal-triage/collect.sh @@ -2,7 +2,7 @@ # Collect journald warnings+ and failed units into the run folder, plus a deduplicated digest. set -eu since="$1"; priority="$2" -dir="$NBOT_WF_RUN_DIR" +dir="$NBOT_LR_RUN_DIR" raw="$dir/journal-raw.log"; digest="$dir/journal-digest.txt" journalctl -p "$priority" --since "$since" --no-pager -q -o short-iso > "$raw" || true @@ -23,4 +23,4 @@ journalctl -p "$priority" --since "$since" --no-pager -q -o short-iso > "$raw" | lines=$(wc -l < "$raw") uniq=$(grep -c '^ *[0-9]' "$digest" || true) -printf 'raw_log=%s\ndigest=%s\nlines=%s\nunique=%s\n' "$raw" "$digest" "$lines" "$uniq" >> "$NBOT_WF_OUTPUTS" +printf 'raw_log=%s\ndigest=%s\nlines=%s\nunique=%s\n' "$raw" "$digest" "$lines" "$uniq" >> "$NBOT_LR_OUTPUTS" diff --git a/.agents/workflows/journal-triage/triage.md b/.agents/looprails/journal-triage/triage.md similarity index 100% rename from .agents/workflows/journal-triage/triage.md rename to .agents/looprails/journal-triage/triage.md diff --git a/flake.lock b/flake.lock index 5017faf..75d0fa5 100644 --- a/flake.lock +++ b/flake.lock @@ -2143,11 +2143,11 @@ ] }, "locked": { - "lastModified": 1794866996, - "narHash": "sha256-q9sqHlAVgxmQltqKCUKkljUH514cnOTB8kdgDdr7yqY=", + "lastModified": 1794942815, + "narHash": "sha256-YVZcT7Kqt0eYOTrjCPAreZHe0heKSJhcPnN54XU/vVc=", "ref": "refs/heads/main", - "rev": "75795eb4ff891ca64306a962dd6308309cfdf794", - "revCount": 21, + "rev": "9d5f57eb36661e76fb1160591484a323dde4f6b8", + "revCount": 91, "type": "git", "url": "ssh://git@github.com/SkyG-Org/LoopRail.git" }, @@ -2244,11 +2244,11 @@ ] }, "locked": { - "lastModified": 1794921139, - "narHash": "sha256-YlykKn/+zvpBGsxbFcPcEczOBLguXwFrWjEK1W07diA=", + "lastModified": 1794935764, + "narHash": "sha256-MNWm/NWTMaWj3VW/9uIVJ5yEHpeh0qdvSf+fP2/BCFI=", "ref": "refs/heads/main", - "rev": "bdc877dd20d3f2389228ef2a3d25f4c1800a71ce", - "revCount": 1627, + "rev": "dec5099a1db1bf0c85d28c066f5f551fd9f635c8", + "revCount": 1636, "type": "git", "url": "ssh://git@github.com/SkyG-Org/nBot.git" },