What's new
Scoped Agent
On UserPromptSubmit, Warden calls the Anthropic API (Haiku) to synthesise a minimal, task-specific rule set from the user's goal — restricting tools, file paths, and network access to only what the task genuinely requires. Falls back to keyword-based static heuristics when no API key is present. Rules persist in .prismor-warden/scoped/ for the session.
warden scope list
warden scope show --session-id <id>
warden scope clear <id>
Session-Based Learning
Mines historical session data for recurring uncovered command patterns, tracks false positives, and detects evasion attempts (e.g. backtick vs $() substitution bypassing rules).
warden learn # full analysis + candidate proposals
warden learn --candidates # list pending rules
warden learn --apply <id> # promote to policy.yaml
warden learn --reject <id>
warden learn --json
Security & correctness fixes (from review)
- Prompt-injection mitigation: LLM-synthesised
allowed_toolsclamped to the known-good available set — a crafted task prompt can no longer expand the scoped policy - Command injection fix in
warden scope edit:os.system→subprocess.runto prevent$EDITORexploitation KeyError: 'id'crash inwarden learnoutput when candidates are freshly mined (not yet persisted)- Corrected misleading display text in the scoped-rules box
- Removed dead
get_scoped_dir()fromstore.py(path mismatch withscoped_agent)
Full changelog
See CHANGELOG.md for the complete entry.