Hermes Dreaming v0.4.0 — Release Notes
Headline: The trust loop and the friction-killer.
v0.4.0 makes Dreaming safe to use in anger (revert, dry-run, selective apply) and removes the harvest-to-create two-step (one command, real sessions, redacted).
What's new
Trust loop
dreaming revert <artifact>restores live files from the recorded backups and rolls anappliedartifact back to arevertedstate. Requires the artifact to be inappliedstatus; anything else fails loud.- Drift detection: if the live file changed after apply, a
drift_detectedaudit event is recorded, but the restore still runs from backup. - On a missing backup file, revert aborts, leaves live state untouched, and records a
revert_failedaudit event. - Writes a
REVERT.mdnext to the artifact summarizing what was restored, what was rolled back, what drifted, and what failed. - Non-interactive callers (cron, pipe) must pass
--yes. The CLI exits with code 2 when a confirmation prompt is needed, so scripts can distinguish "needs confirmation" from a real failure.
- Drift detection: if the live file changed after apply, a
dreaming apply --dry-runpreviews the apply path without writing live state or creating backups. The result includes a structureddry_run_report(would-apply / would-skip / would-backup lists, and per-filter exclusions).dreaming apply --priority {low,normal,high}and--target-kind {memory,user,skill,fact}filter which approved proposals land. Filters compose. Filtered-out proposals stayapprovedso a later apply with a different filter can still land them.
Friction-killer
dreaming create --from-sessions Nauto-harvests N recent local Hermes sessions from the SessionDB, feeds the resulting redacted bundle as a source, and stages the artifact in one step. Always printsharvest:,sessions:, andredactions:to stdout before staging.dreaming create --from-since 7d(also12h,2w) is a time-window alternative. The count is derived from the window and capped at 50 sessions.--recent Nis preserved as a back-compat alias for--from-sessions N.--no-llmis a shorthand for--provider offline-markeroncreateandreview. Useful for cron jobs that should never reach an external LLM by accident.
Discovery and inbox
dreaming providers listprints a table withNAME,KIND,STATUS(always | optional | missing), andNOTESfor the three built-in providers. No external services are pinged.dreaming inbox --apply-readyfilters to artifacts where every non-rejected proposal is approved (or already applied) and the artifact is instaged,approved, orappliedstatus. Composes with--stateand--priority.- The inbox digest (
dreaming digest --inbox) now surfaces a "Ready to apply" section and anApply-ready countfield at the top.
Hardening
reject --reasonis enforced at the command layer (commands/review.py:reject_artifact()), not just the CLI parser. Any caller (CLI, library, plugin) is constrained by the same rule.ReviewErroris raised on missing, empty, or whitespace-only reasons.
Data model
Two additive fields on DreamArtifact:
reverted_at: str | None— ISO timestamp of the last revert, if anyrevert_audit_events: list[dict]— the revert audit trail (drift events, restore summary, partial-failure summary)
A third field, dry_run_report, is attached in-memory only during a single apply dry-run call and excluded from manifest.json so the on-disk contract stays stable across the dry-run feature.
Migration / compatibility
- The
recentflag is unchanged in behavior;--from-sessionsis the new preferred name. Both work. - The
rejectenforcement is stricter than v0.3.0. Library callers that previously passedreason=Nonetoreject_artifactwill now raiseReviewError. applygained three optional flags (--dry-run,--priority,--target-kind). Existing invocations are unchanged.
Verification
pytest -qpasses (112 tests across 25 files, +31 from v0.3.0).python -m build --wheelsucceeds.git diff --checkclean.- Smoke-tested on temp fixtures for:
revert(roundtrip, drift, missing backup, partial failure),apply --dry-run(preview without writes),apply --priorityand--target-kind(filters),inbox --apply-ready,providers list,--from-sessionswith redaction stats, and--no-llmtranslation.
Known limitations
- Revert does not re-run validation. It is a restore from backup, not a re-apply. If a reverted proposal is reapplied, validation runs normally as part of the apply path.
- Drift detection compares the live file's pre-restore content to the recorded backup snapshot, but does not currently track per-write post-apply shas. Adding a per-write post-apply sha is a v0.5.0 candidate.
- The
--from-sincewindow-to-count heuristic is conservative (4 sessions per day, capped at 50). If you want a more aggressive count, use--from-sessions Ndirectly.
Bottom line
This release delivers the two things that turn Dreaming from "demo-able" to "operator's default nightly loop":
- You can undo an apply. Revert is the trust headline.
- You can stage from real sessions in one command.
--from-sessionsis the friction-killer.
Direction A (operator trust) and Direction B (friction-killer) from the brainstorm — both shipped, both tested, both documented.