Repository navigation
feat(routines): bots change and delete their own routines, with the owner's ok - #161
Merged
Merged
Conversation
…wner's ok my_routines lists a bot's routines; change_routine and delete_routine ask the owner in the chat, like schedule_routine does. The change card shows what changes, before and after, and the owner can adjust it before allowing it; the delete card shows why. A bot that bypasses permissions does it at once.
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.
Asked by the owner: bots could only create routines; now they can change and delete their own, when the owner allows it.
Daemon (
tools/routine_change.rs,tools/routine_catalog.rs)my_routines: the bot's routines (id, name, prompt, schedule, zone, on/off, next run), no approval.change_routine {routine_id, ...only what changes}: checked likeroutines.create; impossible or no-op changes go back as errors with no card. Approvalmcp__botloft__change_routinewith{name, before, after}; the owner may send an adjusted routine asinput, checked before the request settles (check_changed).delete_routine {routine_id, reason?}: approvalmcp__botloft__delete_routine; allowed, the routine is archived.bypass_permissionsdoes it at once.App (
RoutineChangeCard.tsx)Test plan
cargo fmt,clippy -D warnings,cargo test --workspace(newtests/routine_changes.rs, tools list)pnpm check(newroutineChange.test.tsx)