Repository navigation
feat(runner): comment on channel posts and note the owner privately - #8
Merged
Merged
Conversation
A channel's posts reach its discussion group as messages from the channel, and a reply to one shows under the post as a comment. A rule can now admit a channel (sender = "channel", min_chars), and a tier with dm_peer splits the answer into that public reply and a private note. Nothing is published unless the run succeeded and its answer parsed; everything else reaches dm_peer only. A long post arrives as several messages, so it is answered once, on its last part, with the parts joined after they settle. Rules now check the sender's kind: channel and user ids share one number space, so a user rule must never admit a channel. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: sanchpet <petrov@sanch.pet>
A private channel has no username, so its posts are addressed as t.me/c/<id>/<post>. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: sanchpet <petrov@sanch.pet>
Parts published one after another landed 13 s apart on staging, past the 10 s window. 30 s still separates distinct posts in practice. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: sanchpet <petrov@sanch.pet>
Without a date a run guessed when earlier posts were written: on staging it called a post from the same day yesterday's. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: sanchpet <petrov@sanch.pet>
A diary run reads its memory from the channel, so resuming the chat's session only carried the whole history along: on staging a post cost $2-3 resumed and $0.67-0.94 fresh. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: sanchpet <petrov@sanch.pet>
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.
Agent can now comment on channel posts. Channel post comes into its discussion group as a message from the channel, so a reply to it shows under the post as comment. Tier with
dm_peersplits the answer: public comment goes to the chat, private note goes to one fixed peer, and nothing is published if the run failed or its answer didn't parse.Rules now check sender kind too. Channel and user ids share one number space, so before this a channel with the same id as an allowlisted user would pass as that user.
Long post that Telegram splits into several messages gets one answer, on the last part.
resume = falseis for tiers that read memory from the chat itself: on staging resumed session cost $2-3 per post, fresh one $0.67-1.01.Tested on private staging channel with linked discussion group, split post was joined and answered once.