Automations¶
The activity source is read on a timer with a cursor in the automation's state. The manifest suggests five minutes; Linear's own rate limits are the floor.
| Source | Method | Provider floor | Suggested | Signals |
|---|---|---|---|---|
linear.activity | tools.linear.events_list | — | 5 min | bus |
The recipe¶
- Read
tools.linear.events_listwith the account and the cursor saved by the previous run. - Apply the page's events, then save the
cursorit answers in the automation's state. - If
failedis not empty, keep the old cursor: a failed event holds the read back. Arefusedevent may be skipped; the cursor already covers it. A feed that could not be read at all is namedfeed:issuesorfeed:notifications; the page lists the other feed and the cursor keeps the failed feed where it was, so retrying asks for it again. - If the page carries
gap, history beforegap.sincewas lost: apply the page, then tell the person the window was cut. - Read again on the suggested cadence.
more: truemeans another page is ready now, not that the source is done.
// The automation's state holds one cursor per account.
const page = await tools.linear.events_list({
source: "linear",
account: "work",
cursor: state.cursor,
})
state.cursor = page.cursor
A cursor is bound to its plugin, source and account, and keeps the window it was issued with: pages after a since read never list an event before that since. Do not share one between accounts: the plugin refuses it with CURSOR_INVALID.
No nudge from a read¶
events_list is a read, and the plugin owns no write, so it emits no bus event: there is no changed nudge to listen for. An app that follows the source reads events_list on its own timer; the cursor still decides what is new, so a read that lists nothing advances nothing. The plugin emits rpc.linear.status once at setup and rpc.linear.account when an alias needs a sign-in or fails; both carry state, never Linear content.