feat(monitor): auto-complete monitor tasks from the user's own messages#397
Draft
seasidespace wants to merge 1 commit into
Draft
feat(monitor): auto-complete monitor tasks from the user's own messages#397seasidespace wants to merge 1 commit into
seasidespace wants to merge 1 commit into
Conversation
When a monitor creates a pending task from an incoming Telegram message,
keep watching the user's OWN outgoing messages in that same conversation.
If the user signals they did the thing ("拿了"/"搞定了"/"done"...), the
matching monitor task is auto-marked completed (completed_via:"self_report").
Design constraints honored:
- 省token: an LLM call only fires when the conversation actually has an open
monitor task (cheap task-store gate runs first; zero tokens otherwise).
- 不影响性能: the normal incoming-message triage path is untouched. Outgoing
self-messages get a dedicated `message_self` kind and a router short-circuit
that skips triage entirely (preserves the #569 no-self-triage guarantee).
- The completion judge uses the monitor's configured model (not a hardcoded
one), routed through the workflow runner's new complete_text.
- Completion phrases (built-in multilingual defaults + per-monitor configured)
are passed as hints to the model, never as a hard gate. Disambiguation asks
the model which task when a conversation has multiple open tasks.
New RPCs: monitor_completion_phrase_add / _delete.
Tests: self-report detection, zero-token gating, single/multi-task judging,
phrase-hint merging, and the outgoing message_self kind mapping.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@seasidespace is attempting to deploy a commit to the fuzzland Team on Vercel. A member of the Team first needs to authorize it. |
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
Auto-completes a monitor-created task when the user later does the thing and says so in the same conversation, by watching their own outgoing Telegram messages.
拿了/搞定了/done); a confident match flips the matching task tocompletedwithcompleted_via:"self_report".message_selfkind and short-circuited in the router before triage, preserving the #569 "self-messages never trigger triage" guarantee.complete_text), not a hardcoded model.monitor_completion_phrase_add/monitor_completion_phrase_delete.Test plan
cargo check -p puffer-subscriptions -p puffer-clicargo test -p puffer-subscriptions self_report(4 passing: self-message detection by kind/payload, remote handler)cargo test -p puffer-cli monitor_self_report(11 passing: zero-token gating, single/multi-task judging, phrase-hint merging, completed/ignored tasks excluded)message_selfkind mapping testcompleted(completed_via:"self_report"); unrelated self-message does not complete it; self-message in a chat with no open task makes zero LLM calls.🤖 Generated with Claude Code