github agent-sh/agnix v0.22.0

3 hours ago

Shipped via PRs #820-#823 (agnix tools check/detect, agnix schema --fix, LLM changelog triage CI).

Added

  • agnix tools check + agnix tools detect for version-pin drift (#717). Two new subcommands for keeping .tool_versions in .agnix.toml honest against what's actually installed on PATH:
    • agnix tools check walks every pinned/installed pair, classifies the outcome ([ok], [drift], [unpinned], [missing]), prints a report, and exits 0 by default. With --strict it exits 1 on any [drift] or [missing] - fits pre-commit and CI.
    • agnix tools detect runs <cli> --version for each supported tool found on PATH and prints a suggested [tool_versions] TOML snippet. With --write it merges the detected versions into .agnix.toml's [tool_versions] section in place, preserving comments, blank lines, and untouched keys via a pure string-level transform (no TOML round-trip that would lose comments).
    • Resolves petemounce's #717 thread ending where you agreed to "auto-detect and warn. If the user pinned it, it's legit. If not, I detect and warn." Warn-by-default in check, --strict gives fail-by-default for his pre-commit case. Exact-match comparison (range matching deferred).
    • Semver extractor accepts N.N.N with optional pre-release / build-metadata (beta.3, +1234), skips two-segment versions like v20.11, and parses the first match in stdout+stderr combined so CLIs logging to either stream are covered.
    • Scoped to the 4 tools ToolVersions already covers (claude_code, codex, cursor, copilot). Expanding ToolVersions to cover all 11 validated tools is a separate refactor the commands will inherit for free.
    • 19 unit tests (version extraction edge cases + classify-outcome + TOML section round-trip including comment preservation) plus 5 CLI integration tests covering subcommand help discoverability, check exit-0 path with nothing pinned, check --strict exit-1 path via a pinned-but-missing-CLI fixture (guarded to degrade gracefully when the CLI is unexpectedly present), and detect --write exit-0 regardless of whether tools are on the runner's PATH. Locale entries in en/es/zh-CN. Closes #717.
  • agnix schema --fix for source-controlled schema drift detection (#716). Pete source-controls schemas/agnix.json and wanted a pre-commit hook that regenerates it when the agnix binary is bumped. New --fix flag reads the current target file, compares against the binary's live schema output, and overwrites only when they differ. Defaults the target path to schemas/agnix.json when --output is absent. Silent on clean runs (pre-commit stays quiet on no-op), prints Schema created: <path> or Schema updated: <path> when it writes. Creates parent directories as needed. .pre-commit-hooks.yaml ships a new agnix-schema hook entry that runs agnix schema --fix with always_run: true + pass_filenames: false. 5 new integration tests cover create-missing, silent-on-clean, update-on-drift, custom path with parent creation, and --help discoverability. Closes #716.

Changed

  • Schema output now ends with a trailing newline. Affects both legacy modes (agnix schema to stdout and agnix schema --output <path>) and the new --fix mode. Matches what most editors and formatters produce, so source-controlled schema files round-trip cleanly without spurious "no newline at EOF" diffs. Consumers that grep or diff schema output byte-for-byte may need a one-time refresh; schema parsers are unaffected (trailing whitespace in JSON is legal).
  • LLM-assisted changelog triage in tool-release-watch (#802). When GLM_API_KEY is set and a tool declares changes_of_interest in .github/tool-release-baselines.json, the watcher now runs scripts/glm-extract.js --mode=agnix-triage after fetching the release notes. The LLM filters the notes down to validator-relevant items + rule candidates using the per-tool descriptor (config_surfaces, relevant, irrelevant). The filtered summary is posted as ## Agnix Triage (auto-filtered) at the top of the issue body, with the full upstream changelog preserved in a <details> block below. Gracefully falls back to raw changelog on any LLM failure (missing key, empty response, HTTP error, node unavailable) - zero regressions vs. prior behavior. changes_of_interest descriptors authored for 10 of 11 tracked tools (all except amp, which is already filtered via RSS CDATA). Closes #802.

Don't miss a new agnix release

NewReleases is sending notifications on new releases.