Skip to main content

Module self_quit

Module self_quit 

Source

Structs§

QuitSummary

Enums§

GateRefusal
Why QuitSelf doesn’t proceed at once (§6.3). Until Phase 2b’s override window exists, every one of these is a refusal (spec §9: the non-user path ships with 2b).
QuitOrigin
Who asked.

Constants§

SELF_QUIT_TURN_GRACE
How long a scheduled quit waits for the turn to end (§4.2); after that the graceful shutdown interrupts it.

Statics§

QUITTING 🔒
Blocks with a QuitSelf waiting for their turn to end (§4.2’s mark_quitting): a second call answers already_quitting.

Functions§

gate
The §6.3 gate: may QuitSelf proceed without asking the user?
is_quitting
normalized 🔒
quote_matches
§6.3: the quote must appear in the user’s message, whitespace- and case-insensitively. An empty quote never matches.
run
run_with
run with an audit detail (for QuitSelf: the reason and the user’s quoted instruction).
schedule_after_turn
§4.2: the tool call is part of the turn that asked for it, so quit when that turn ends (or after SELF_QUIT_TURN_GRACE), not now. Returns false when a quit is already scheduled or under way.