Repository navigation
feat(worker): add AI agent reply support to comment automation - #729
Merged
Merged
Conversation
sung17
force-pushed
the
fix/comment-automation-reply-detection
branch
from
July 13, 2026 03:44
9423b16 to
58639a8
Compare
sung17
force-pushed
the
fix/comment-automation-reply-detection
branch
from
July 13, 2026 04:23
58639a8 to
35ea858
Compare
- Add commentAIReply job and processCommentAIReply handler that generates
an AI agent reply and delivers it as a public comment reply or private
DM based on the automation's configured reply channel
- Add generateAIReplyText, a tool-free variant of replyByAI that returns
plain text instead of sending, so the caller controls delivery
- Fix matchPost to compare normalized {pageId}_{storyId} post ids so
automations match regardless of which picker (published/ads/reels)
stored the post id
- Fix LINK_RE to catch bare domains and www. links, not just explicit
http(s):// links
- Fix willSendReply/executePublicReply/executePrivateReply to require an
AIAgent value before treating an AIAgent reply as sendable
- Make hasKeywords matching case-insensitive
- Add hasRepliedOnOtherPost + replyToUsersWhoCommentedOnOtherPosts skip
to avoid re-engaging contacts who already replied on a different post
- Add fb-comment-automation skill and docs
sung17
force-pushed
the
fix/comment-automation-reply-detection
branch
from
July 13, 2026 06:44
35ea858 to
b6ba468
Compare
viethung0o0
pushed a commit
that referenced
this pull request
Sep 7, 2026
- Add commentAIReply job and processCommentAIReply handler that generates
an AI agent reply and delivers it as a public comment reply or private
DM based on the automation's configured reply channel
- Add generateAIReplyText, a tool-free variant of replyByAI that returns
plain text instead of sending, so the caller controls delivery
- Fix matchPost to compare normalized {pageId}_{storyId} post ids so
automations match regardless of which picker (published/ads/reels)
stored the post id
- Fix LINK_RE to catch bare domains and www. links, not just explicit
http(s):// links
- Fix willSendReply/executePublicReply/executePrivateReply to require an
AIAgent value before treating an AIAgent reply as sendable
- Make hasKeywords matching case-insensitive
- Add hasRepliedOnOtherPost + replyToUsersWhoCommentedOnOtherPosts skip
to avoid re-engaging contacts who already replied on a different post
- Add fb-comment-automation skill and docs
Co-authored-by: Deathgiver <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
commentAIReplyjobChanges
apps/worker/src/integration/handlers/comment-automation/ai-reply.ts— new job handlerapps/worker/src/integration/handlers/automated-response/replies.ts—generateAIReplyText(tool-free AI generation)apps/worker/src/integration/handlers/comment-automation/index.ts— post-id normalization, link regex, case-insensitive keywords, cross-post skippackages/business/src/fb-comment-automation/service.ts—hasRepliedOnOtherPostpackages/worker-config/src/queues/integration/index.ts— new job type.agents/skills/fb-comment-automation/,docs/fb-comment-automation.md— new skill/docsTest plan