Skip to content

Supervisor event stream ​

One log, read three ways:

ReaderHow
A programServer-Sent Events: GET /api/events/stream, resuming after the Last-Event-ID header
A program that would rather pollJSON: GET /api/events?since={cursor}&wait={seconds}
An agentMCP: await_events(since)

All three read the same events with the same cursor. The stream is contract version 1: every event carries "v": 1. A kind is added, never renamed; a field is added, never removed or retyped.

An event ​

json
{
  "id": "1843.27.3fa9c2d1",
  "v": 1,
  "type": "activity",
  "kind": "checks-failed",
  "ephemeral": false,
  "at": "2026-11-30T14:02:11.204Z",
  "summary": "JasperFx/wolverine#5475 CI failed at 9c2e41b",
  "nodes": [{ "plan": "net11-train", "node": "wolverine-tfm", "status": "pr-open" }],
  "source": "github",
  "repository": "JasperFx/wolverine",
  "pr": 5475,
  "url": "https://github.com/JasperFx/wolverine/pull/5475",
  "sha": "9c2e41b7d0…",
  "state": "failed",
  "from": "running"
}

The first eight fields are on every event. The rest are left out when they do not apply.

Field
idThe event's cursor. Pass it back to resume after this event.
vThe contract version.
typeactivity, need, snapshot or log.
kindWhat happened; see Kinds.
ephemeraltrue for a fact kept only in memory: never stored, never replayed after a restart.
atWhen critterstack saw it.
summaryOne line a person can read.
nodesThe plan nodes it affects, across plans, each with its status when the event was made. Empty for a fact about no node.
sourcegithub, feed, plans, sessions, bobcat, assertion or stream.
repositoryowner/name.
pr, issueThe number.
urlThe pull request, issue or run.
shaThe commit: a PR's head, the commit a merge made, the commit a default branch turned red at.
branchA PR's base, a default branch, the branch a pin was read from.
feed, package, versionA package on a feed, or a pin.
sessionA Claude Code session id.
runId, tagA Bobcat run and its BOBCAT_RUN_TAG.
state, fromThe state now and the state before, in the source's words.
need, actor, commandOn a need: its kind, who acts on it, and the command when the action is one.
byWho said it: the agent behind an asserted observation, a claim's holder.
untilOn sweep-throttled: when the rate limit resets.
counts{ running, passed, failed, total }: a PR's checks, or a run's scenarios.
detailMore words: the failing checks, a sweep's error, what a contradicting sweep saw.
snapshotOn a snapshot: the present, as events with no id.

Activity and needs ​

Activity is a fact: CI went red, a version shipped, a claim stalled. Needs are things to act on. A need appears (need-appeared) and later clears (need-cleared), and both are stored, so a reader that resumes knows which are still open.

The needs are the plan's own (what the plan page's needs panel lists, node by node), and two more a supervisor acts on:

needactorOpen while
question, go-ahead, fix-base, merge, partial, findings, person, publish, bump, align, bindpersonThe node owes a person that action, as the needs panel says. A merge carries the PR's pr and url.
claimagentThe node is ready and free to take: its launch is next.
brokenanyThe node's stance is broken (a stalled or orphaned claim, red CI nobody is on). detail says why.

The events derive from the same status the plan page shows (plan_status), so the stream never says something the page does not.

Kinds ​

GitHub ​

Read from what the GitHub sweep observed. Each carries repository, pr or issue, url, and the nodes whose issue or pull requests they are.

KindWhenAlso
pr-openedA pull request is first seen open (or as a draft).sha (head), branch (base), state
pr-pushedAn open PR has a new head.sha, from (the old head)
pr-readyA draft PR is marked ready for review.sha
checks-passedIts CI turned green, or a push came back green.sha (the head the checks ran on)
checks-failedIts CI turned red, or a push came back red.sha
pr-conflictingIt conflicts with its base.sha, branch
pr-mergeableIt no longer conflicts.sha
pr-reviewedIts review decision changed.state: approved, changes_requested, review_required
pr-mergedIt merged.sha (the merge commit), branch
pr-closedIt closed without merging.
pr-reopenedIt reopened.
issue-closed, issue-reopenedAn issue's state changed.
base-redA repository's default branch turned red.sha (where it turned), branch, detail (failing checks)
base-greenIt is green again.branch

Feeds and pins ​

KindWhenAlso
package-publishedA version is listed on its feed (NuGet or npm) that was not before. Nodes: the publish nodes for the package on that feed, and the consume nodes that pin it.feed, package, version
pin-movedA repository's committed pin for a package changed. Nodes: the consume nodes on it.repository, package, version, from, branch

The sweeps ​

KindWhenAlso
sweep-throttledGitHub's rate limit is spent; nothing is read until it resets.until
sweep-resumedThe GitHub sweep reads again.
sweep-failingThe GitHub sweep fails for a repository (or has no token), or a feed cannot be read.repository or feed and package, detail
sweep-recoveredIt reads again.

Plans, claims and sessions ​

KindWhenAlso
node-statusA node's derived status changed.state, from
node-claimedSomeone claimed it, or another holder took it.by, session
node-releasedNobody holds it any more (released, or the lease ran out).by (who held it)
claim-healthThe holder's session stalled or is gone, or is back.state: stalled, orphaned, held; by, session, detail
session-stateA session is blocked on a prompt, is no longer, or stopped.session, state, from, detail (what it waits on, or how it stopped)

Asserted observations ​

KindWhenAlso
assertion-recordedA supervisor asserted a fact (below).by, tag (the assertion's kind), the subject's fields, session
assertion-confirmedA sweep observed it.detail
assertion-contradictedA sweep read the subject after the assertion and did not observe it.detail (what the sweep saw)

Ephemeral ​

Kept only in memory, so ephemeral: true, never stored, and never replayed after the server restarts.

KindWhenAlso
ci-progressAn open PR's check counts moved.counts, sha
run-started, run-progressed, run-finishedA Bobcat run tagged for a node started, moved or finished.runId, tag, session, state, counts, url
session-activityA session did something; at most once a minute a session.session, detail (when)

The stream's own ​

KindTypeWhen
snapshotsnapshotThe present, for a reader the stream cannot replay to (below).
truncatedlogStored events after the reader's cursor were dropped by retention.

The cursor ​

An event's id is {stored}.{ephemeral}.{epoch}:

  • stored counts stored events from 1. The count is in the store, so it survives a restart.
  • ephemeral counts ephemeral events in memory, within one run of the server.
  • epoch names that run of the server.

A plain number (1843) is a stored position with no ephemeral one. Pass the id of the last event you processed, or the cursor a read returned.

You passYou get
NothingOne snapshot: the open needs, and the latest of each ephemeral fact (each open PR's check counts, each run in flight, each session's activity). Then everything from now on.
A cursor from this run of the serverEvery event after it, stored and ephemeral, in the order they happened. Nothing twice, nothing skipped.
A cursor from an earlier run, or a plain numberA snapshot of the ephemeral facts in place of the ephemeral events you missed, which are gone; then every stored event after your stored position, with no gap and nothing twice.
A cursor behind the retention floorA truncated event saying which stored events are gone, a snapshot that also carries the open needs, then the stored events that are left.

Ephemeral events are held in memory for the latest 2,000 events; a cursor older than that is answered like one from an earlier run.

Retention ​

Stored events are kept for 7 days and at most 20,000 of them, whichever keeps fewer, trimmed once an hour. CritterStack:EventRetentionDays and CritterStack:EventRetentionCount change them. A reader that falls behind gets a truncated event, never a silent gap.

Server-Sent Events ​

GET /api/events/stream
Last-Event-ID: 1843.27.3fa9c2d1

?since= stands in for the header (the header wins), and ?plan= and ?type= filter as below. Each event is one frame:

id: 1843.28.3fa9c2d1
event: activity
data: {"id":"1843.28.3fa9c2d1","v":1,"type":"activity","kind":"pr-merged",…}

event is the type (activity, need, snapshot, log). The server sends retry: 3000 first and a : keep-alive comment every 15 seconds while nothing happens. A client that reconnects with Last-Event-ID resumes as the cursor table says. An unreadable cursor is a 400.

Long poll ​

GET /api/events?since=1843.27.3fa9c2d1&wait=240&max=100&plan=net11-train&type=need
Parameter
sinceThe cursor. Left out: the snapshot and the end.
waitSeconds to wait when nothing is there yet. Default 0, at most 240 (CritterStack:AwaitEventsSeconds).
maxMost events in one answer. Default 100, at most 500.
planOnly events about that plan's nodes, and events about no node.
typeOnly activity or only need. A snapshot or log event always comes.

The answer is { events, cursor, timedOut }. Pass cursor as the next since: when filtering skipped everything, it has moved past what was skipped.

MCP tools ​

Tool
await_eventssince, timeoutSeconds, max, plan, type, as the long poll. Waits at most 240 seconds, under the time an MCP client commonly lets a tool call run, and answers { events, cursor, timedOut }; on a timeout, call again with the cursor.
assert_observationRecord a fact the monitors have not seen yet (below).

Asserted observations ​

A supervisor that knows a fact before the monitor does (it merged the PR a minute ago; the GitHub API is throttled) tells critterstack with assert_observation, or POST /api/observations/asserted with the same fields as JSON.

kindFieldsAdvances
pr-mergedsubject: owner/name#nThe pr node for it, and an issue node it is a closing PR of. The issue it closes reads closed when its base is the repository's default branch.
issue-closedsubject: owner/name#nThe issue node for it.
package-publishedpackage, version, feed (default nuget.org)The publish node for the package on that feed: its feed reads as listing the version.

Every assertion takes by (who is asserting), and optionally at (when it happened, ISO 8601; default now), note and session. It is recorded as asserted, on its own stream, with who and when.

  • Pending: it counts at once. The node reads as if the monitor had observed the fact, and carries the assertion in its asserted list (kind, subject, version, by, at, state, note, session), so it is plain the node believes it because an agent said so.
  • Confirmed: a sweep observed the fact. The observation decides from then on, and the node no longer lists it.
  • Contradicted: a sweep read the subject after the assertion and its grace, and did not observe the fact. It stops counting: the node goes back to what was observed, and lists the assertion as contradicted, with what the sweep saw in detail, for a day. A later sweep that does observe it confirms it.

Only a sweep that reads the subject after the assertion's at plus a grace judges it: 30 seconds for GitHub (CritterStack:AssertedGitHubGraceSeconds), 15 minutes for a feed, which can take that long to list a version (CritterStack:AssertedPackageGraceMinutes). A sweep that cannot read (a spent rate limit, a feed that does not answer) judges nothing. Each step is an event: assertion-recorded, assertion-confirmed, assertion-contradicted. The stream's GitHub and feed events report what the sweeps observed, never an assertion: an asserted merge that is contradicted never reads as a PR reopening.

Asserting the same fact again while it is pending records nothing, and so does asserting one a sweep confirmed. Asserting a contradicted fact again records it again, and the next sweep judges it again.

POST /api/observations/asserted
200{ recorded, id, assertion }: recorded is false when nothing new was recorded.
400{ error, errors }: an unknown kind, a subject that is not owner/name#n, a version that is not a version, no by.

See also ​