Skip to content

feat(runner): comment on channel posts and note the owner privately - #8

Merged
sanchpet merged 5 commits into
mainfrom
feat/diary-comments
Sep 30, 2026
Merged

sanchpet merged 5 commits into
mainfrom
feat/diary-comments

Conversation

@sanchpet

Copy link
Copy Markdown
Owner

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_peer splits 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 = false is 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.

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>
@sanchpet
sanchpet merged commit 316fbce into main Sep 30, 2026
2 checks passed
@sanchpet
sanchpet deleted the feat/diary-comments branch September 30, 2026 17:38
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