Shifts, cover and calendars
Ask for cover, hand over to the next person, see who carries the pager, and put on-call in your calendar.
On-call is a schedule, but it is also people with weddings, flu and sleep. These features are the people side.
#Ask for cover
"I am ill on Thursday, can someone take my shift?"
await treason.coverage.request(scheduleId, {
requesterId: ana, startsAt: "2027-03-04T00:00:00Z", endsAt: "2027-03-06T00:00:00Z", note: "wedding",
// offeredTo: bo, // ask one person (they accept or decline); omit to ask anyone on the team
});
await treason.coverage.accept(requestId, bo); // Bo is now on call for Ana's minutes in that stretchtreason coverage request <schedule-id> --user <ana> --from 2027-03-04T00:00:00Z --to 2027-03-06T00:00:00Z --note wedding
treason coverage accept <id> --user <bo>- You can only hand over time you actually hold. Asking for a stretch when you are not on call anywhere in it is refused.
- Accepting creates overrides for exactly the minutes the requester was on call inside the stretch. If the stretch runs into the next person's shift, theirs is untouched. The rotation itself is never edited.
- Only members of the schedule's team can take it. You cannot cover yourself.
- Cancelling an accepted cover undoes it: the overrides are removed and the requester is on call again.
- The cover shows everywhere on-call shows:
GET /v1/oncall, the schedule, the calendar feed.
coverage.requested, coverage.accepted and coverage.cancelled webhooks fire, so a request can land in a Slack channel. (Requests are visible in the dashboard and by webhook; we do not text or push the team about them yet.)
#Handoff notes
What the person going off call wants the next person to know: what is half-fixed, what to watch, what not to touch.
await treason.handoff.add(teamId, "The nightly export is flaky: just re-run it. Do not touch the replica.", { userId: ana });
const { handoff } = await treason.oncall.get("payments"); // the latest note, next to who is on callThe note appears with whoever is on call on the dashboard's On call page, in GET /v1/oncall as handoff, and in treason oncall <team>. A handoff.note webhook fires when one is left.
#Who carries the pager
treason report load --days 30Per person: hours on call (to the minute, overrides and cover included), how many of those were at night (22:00 to 07:00 where they live) and at weekends, the pages that actually arrived (not test pages or admin notices), pages at night, and how fast they answer. It flags lopsided load: someone carrying far more than the typical person, someone woken at night far more often, someone who was never on call.
const { people, suggestions } = await treason.reports.load(30);#Calendar feeds
A secret URL that Google Calendar (Other calendars → From URL), Apple Calendar or Outlook subscribes to, so on-call sits next to everything else:
treason calendar create --schedule <id> --label "Team on-call" # or --team <id>, or --user <id> for one person's shifts
treason calendar delete <id> # revokes itA feed shows a week back to four months ahead, including overrides and cover, refreshes hourly, and marks the time as free so it does not block meeting invites. The URL is the credential, and is shown once; delete the feed to revoke it. A person feed shows only that person's shifts across every schedule.