Skip to content

feat(workflow): support message thread context - #3522

Closed
wayne-o wants to merge 2 commits into
block:mainfrom
wayne-o:codex/workflow-thread-context
Closed

feat(workflow): support message thread context#3522
wayne-o wants to merge 2 commits into
block:mainfrom
wayne-o:codex/workflow-thread-context

Conversation

@wayne-o

@wayne-o wayne-o commented Jul 29, 2026

Copy link
Copy Markdown

Summary

  • expose root and parent message event IDs to workflow templates and conditions
  • add a json template filter for safely embedding message text in webhook JSON bodies
  • allow send_message actions to specify a templated top-level thread_root
  • validate that the root exists in the workflow channel and is not itself a reply
  • persist generated replies with the correct NIP-10 tag and thread metadata
  • cover top-level, direct-reply, nested-reply, schema, template, and condition behavior

This provides generic workflow primitives for bridging an external conversation into a Buzz thread without adding application-specific behavior to Buzz.

Related issue

N/A. Supports the N2 Assist/Buzz conversation bridge in n2retail/n2#17296.

Testing

  • ./bin/cargo fmt --all -- --check
  • ./bin/cargo test -p buzz-workflow (159 passed, 2 Postgres tests ignored)
  • ./bin/cargo check -p buzz-relay
  • live multi-turn round trip: N2 escalation -> support question in widget -> customer answer attached to the same Buzz root -> second support reply rendered in the widget

The local Lefthook wrapper could not run because just is not installed; the formatter, workflow suite, and relay check were run directly.

Signed-off-by: wayne-o <wayne@pollenapp.ai>
@wayne-o wayne-o changed the title feat(workflow): expose message thread context feat(workflow): support message thread context Jul 29, 2026
Signed-off-by: wayne-o <wayne@pollenapp.ai>
@wayne-o
wayne-o force-pushed the codex/workflow-thread-context branch from d946c48 to 3e86a6d Compare July 29, 2026 12:22
@wayne-o wayne-o closed this Jul 30, 2026
@wayne-o
wayne-o deleted the codex/workflow-thread-context branch July 30, 2026 11:44
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