Files
hermes-agent/tests
teknium1 8eda97cafb fix(webhook): make delivery mirroring opt-in and profile-scoped
Follow-up to the salvaged mirror commit.

- Opt-in (`mirror_to_session: true`, or `hermes webhook subscribe --mirror-to-session`),
  default off like cron's `mirror_delivery`. The mirrored text lands with user authority in
  the target chat, and on `deliver_only` routes it is the raw rendered payload, so a route
  author has to ask for it. Only a real boolean `true` opts in (a YAML string "false" no
  longer does).
- The mirror runs inside the routed profile's scope, so a `/p/<profile>/` delivery writes
  into THAT profile's state.db. A Telegram DM chat_id is the user's id on every bot; an
  unscoped mirror landed in the default profile's DM with the same person (live-probed).
- Tests trimmed to two invariants against a real state.db: an opted-in delivery lands in the
  routed profile's chat session and not the default profile's; a route without the opt-in
  (including `mirror_to_session: "false"`) never touches the target transcript.
- Docs: webhooks guide section "Replying to a delivery" (default, profile scope, trust note),
  CLI reference row, bundled hermes-agent skill reference.
2026-09-23 17:58:45 -07:00
..