Skip to content

Add policy inspection and multi-agent cron setup#79

Merged
Mr-Lucky merged 9 commits into
mainfrom
feat/policy-show
May 21, 2026
Merged

Add policy inspection and multi-agent cron setup#79
Mr-Lucky merged 9 commits into
mainfrom
feat/policy-show

Conversation

@Mr-Lucky
Copy link
Copy Markdown
Contributor

Summary

  • Add agentguard policy show to inspect the cached effective runtime policy, with JSON output and fallback to the bundled default policy.
  • Persist the selected agent host from agentguard init --agent <agent> and show it in agentguard status.
  • Extend agentguard init --agent support to Hermes and QClaw.
  • Add agentguard subscribe --cron-target <auto|openclaw|qclaw|hermes|system> for agent-aware cron backend selection:
    • OpenClaw uses native OpenClaw cron first, with Gateway fallback at 127.0.0.1:18789.
    • QClaw uses QClaw Gateway at 127.0.0.1:28789.
    • Hermes uses native Hermes cron and writes a no-agent script under ~/.hermes/scripts/.
    • Claude Code and Codex use system crontab.
  • Require a saved agent host for --cron-target auto, or allow explicit backend selection.
  • Make OpenClaw Gateway cron installation fail fast when cron.list is unavailable.
  • Update install/postinstall guidance so agents recommend:
    • agentguard init --agent <agent>
    • agentguard connect
    • agentguard checkup
  • Update README, CHANGELOG, and AgentGuard skill routing docs for the new commands and flows.

Tests

  • git diff --check origin/main..HEAD
  • npm run build
  • npm test

Commits Included

  • 0d564c8 Add agentguard policy show
  • a81b858 Select cron backend by saved agent host
  • 8f21c88 Support Hermes and QClaw init agents
  • 010a0e4 Support Hermes cron backend
  • dc8ee43 Guide AgentGuard postinstall next steps
  • 0df51bc Support QClaw Gateway cron target

Type

  • [✅] Bug fix
  • [✅] New feature / detection rule
  • Refactoring
  • Documentation

Testing

  • [✅] npm run build passes
  • [✅] npm test passes (32 tests)
  • Manually tested the change

Related Issues

Closes #

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

AgentGuard PR Review

I found one actionable issue in the cron backend selection path.

  1. severity: high — src/feed/cron.ts (installThreatFeedCron, auto backend resolution)
    • What can go wrong: --cron-target auto now routes any saved agent host other than openclaw to installSystemThreatFeedCron, including newly added hermes and qclaw. That means Hermes users will never get the native Hermes cron backend advertised by the patch, and any future non-OpenClaw host will silently fall back to system crontab. This is a correctness regression and can install the wrong execution path for a security-sensitive scheduled action.
    • Concrete fix: Make the auto-resolution explicit per host, e.g. map hermes to a dedicated Hermes backend and only send unsupported hosts to system cron. Add a test that agentHost: 'hermes' with backend: 'auto' selects the Hermes backend rather than system crontab.

@Mr-Lucky Mr-Lucky merged commit 3e20b77 into main May 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant