Conduct

Removals Only when allowed

Each archive or removal takes two calls: a preview that changes nothing, then a confirmation with the person's own words. The server enforces both steps.

View as Markdown

Two steps, enforced

1. Preview. xale_prepare_removal with an action and the item's id returns:

json
{
  "status": "needs_confirmation",
  "removalId": "…",
  "preview": "Archive the Task \"Book the venue\", so it moves out of your active Tasks and keeps its links. It can be unarchived in Xale.",
  "expiresInMinutes": 30,
  "standingConfirmation": false,
  "nextStep": "Nothing has been removed. Tell the person exactly what this would remove and ask them to confirm. Only when they clearly say yes, call xale_confirm_removal with this removalId and their words in personSaid. If they say no, do nothing."
}

Nothing changes yet. Show the person the preview.

2. Confirm. After a clear yes, xale_confirm_removal with the removalId and their words, quoted exactly, in personSaid (2–500 characters). Then say the tellThePerson sentence.

What the server checks

CheckRefusal
No personSaid and no standing yes"Ask the person first, then send their words in personSaid. (Or, if they want you to stop asking each time, record that with xale_allow_removals.)"
During an unattended run"Not during an unattended run. Removals happen only while the person is in the chat and has said yes."
Older than 30 minutes"That preview expired after 30 minutes. Prepare it again with xale_prepare_removal and confirm with the person."
The item changed since the preview"Nothing was removed: it changed after the preview. Prepare it again, show the person the new preview, and ask again."

A removal does exactly what was previewed, or nothing.

Prefer archiving

The tool says "prefer archiving: it can be undone". Archiving a Task, Milestone, Mindmap, Note, List, Meeting or Habit can be unarchived in Xale. A Capture goes to Trash and can be restored there. delete_mindmap_branch removes the node and everything under it for good.

A standing yes

Only when the person tells you that you may remove things without asking each time, record their words with xale_allow_removals. You still preview each removal and tell them what you removed. Settings › Connected apps shows it, with their words and an Ask me each time button; xale_stop_allowing_removals turns it off from the chat.

  • Checked against main 8aef9b15

Was this helpful?

removals-only-when-allowed.md · main@c1725f34