Skip to content

feat(routines): bots change and delete their own routines, with the owner's ok - #161

Merged
httpsphl merged 1 commit into
mainfrom
feat/bot-routine-changes
Oct 4, 2026
Merged

httpsphl merged 1 commit into
mainfrom
feat/bot-routine-changes

Conversation

@httpsphl

@httpsphl httpsphl commented Oct 4, 2026

Copy link
Copy Markdown
Owner

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 like routines.create; impossible or no-op changes go back as errors with no card. Approval mcp__botloft__change_routine with {name, before, after}; the owner may send an adjusted routine as input, checked before the request settles (check_changed).
  • delete_routine {routine_id, reason?}: approval mcp__botloft__delete_routine; allowed, the routine is archived.
  • Only the bot's own routines (another bot's is "not found"). bypass_permissions does it at once.
  • Bot rules (5.1) mention the new tools.

App (RoutineChangeCard.tsx)

  • Change card: what changes, before struck through and after; the new request folded; "Adjust before allowing" opens the editor fields and an on/off switch; "Change routine" / "Not now" with a note.
  • Delete card: name, schedule and the bot's reason; "Delete routine" / "Keep it" with a note.
  • Tool names in the three languages. Spec 20.12 updated.

Test plan

  • cargo fmt, clippy -D warnings, cargo test --workspace (new tests/routine_changes.rs, tools list)
  • pnpm check (new routineChange.test.tsx)
  • Real Claude: ask a bot to move its routine to 9:00 and to turn another off, approve one and decline the other; ask it to delete a routine

…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.
@httpsphl
httpsphl enabled auto-merge October 4, 2026 19:24
@httpsphl
httpsphl merged commit 1074c47 into main Oct 4, 2026
7 of 8 checks passed
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