@ody./pi-at0.1.0
Schedule a one-time message into a pi session at a given time, like at(1).
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
@ody./pi-at
pi extension that schedules a one-time message into a session at a given time, like at(1).
Features
- Queue one message for delivery to the current session at a later time, for example after a rate limit resets overnight.
- Pi stores jobs in the session file, and they survive
/reloadand/resume. - Delivery is a
followUp, so a job never interrupts running work.
Install
pi install npm:@ody./pi-at
From a checkout: pi -e ./src/index.ts.
Usage
| Command | Effect |
|---|---|
/at |
Open the job menu in TUI or RPC mode. |
/at TIME -- MESSAGE |
Schedule MESSAGE for TIME. Splits on the first --. |
/at list |
List pending jobs of this session. |
/at delete ID |
Cancel a pending job. |
The job menu lists pending jobs and offers guided creation, inspection, and cancellation. Escape dismisses a prompt without changing jobs. The menu requires TUI or RPC mode; direct commands also work in print and JSON modes.
TIME forms
chrono-node parses TIME in local time, and the whole string must parse.
Accepted: 06:30, 6:30am, 0630, noon, midnight, teatime (16:00), tomorrow 6:30am, noon Jan 2, 2027-01-02 06:30, now + 3 hours, 06:30 + 2 days.
Rejected with an error:
- Trailing text such as
06:30 foo bar. - A time at or before now, including
now. DD.MM.YYandMMDDYY. UseYYYY-MM-DD.- A leading
next, such asnext friday. - An empty MESSAGE or a missing
--.
Keep pi running
Jobs fire from a timer inside the pi process, polled every 30 seconds, so delivery can be up to 30 seconds late. Pi must stay running until the fire time, for example in tmux.
Pi does not send a job whose time passes while it is not running. On the next start or resume, pi marks it missed and names it in a notification. Jobs belong to the session that scheduled them; a fork or clone does not fire them.
Source map
One bullet per file under src/: the path in backticks, then its group and a short description.
src/index.ts— root: extension entrysrc/time-parser.ts— root: TIME string to Date, via chrono-nodesrc/command/at-args.ts— command: parse/atargumentssrc/command/job-menu.ts— command: interactive job managementsrc/command/register-at.ts— command: register/atand run its subcommandssrc/schedule/job-state.ts— schedule: job entry types and pending replaysrc/schedule/schedule.ts— schedule: poll timer, delivery, overdue handling