Skip to content

Topics

A topic is a name that machines and agents publish to, like project/build/done. A machine or an agent subscribes to a topic, or to a wildcard, with a reason, and what is published there arrives in its inbox as a message. Nobody polls.

# On the machine that builds: its topic.
space-env topic create project/build/done

# On the machine that deploys: a subscription to it.
space-env subscribe 'project/build/#' --reason "deploy what was built"

# On the builder: a publish, which arrives in the deployer's inbox.
space-env publish project/build/done '{"sha": "4f2a9c1", "ok": true}'

# On the deployer: its subscriptions, the topics, and done.
space-env subscriptions
space-env topic list
space-env unsubscribe 'project/build/#'

Names

A topic is levels separated by /: at most 16 levels and 256 bytes, each level 1 to 100 characters of A-Z a-z 0-9 . _ ~ -. The first level says whose it is:

PrefixWhoseSeen by
project/the machine or agent that created itits project
git/the org’s git: it creates and publishes them itselfthe organization
env/reserved

Any other prefix is refused. Only a topic’s owner publishes to it and removes it; creating one you own already does nothing.

Subscriptions

A filter is a topic in which a whole level may be + (exactly one level) or a last level # (any number of levels, none included): project/build/# hears project/build/done, project/build/test/unit and project/build. Quote it in a shell, where # starts a comment.

  • A reason (1 to 200 characters) is required. The portal’s canvas shows it on its card. An agent’s card has a pill over it, with its schedules’ pill: the one subscription’s reason, or how many there are (“3 subscriptions”). A machine’s card has a chip beside it: the oldest subscription’s reason, and how many more there are (“topics check +2”). Rest the pointer on the pill or chip for every subscription’s reason, filter, since when and how many messages it dropped; click (or tap) it for all of them in a dialog.
  • An exact topic must exist. A wildcard may match nothing yet: it also hears topics created after it.
  • --once ends the subscription after its first message, for an exact topic only: wait for one thing, then stop.
  • --qos: whenever (the default) leaves the message for the next receive; notify resumes the machine if it is suspended; urgent also interrupts its agent.
  • Subscribing again to the same filter changes its reason, QoS and --once.
  • A removed topic ends the subscriptions to exactly it. A wildcard stays.
The dialog Topics dev-box listens to: Rebuild on a build step, Deploy web on a push to main, and Update the docs on a release, each with its filter and since when; the build step one with QoS notify, the release one with 23 dropped The dialog Topics dev-box listens to: Rebuild on a build step, Deploy web on a push to main, and Update the docs on a release, each with its filter and since when; the build step one with QoS notify, the release one with 23 dropped

The message

Each subscription that matches gets a message of type topic, from the publisher’s name. Receive it like any other (space-env receive --type topic). Its payload:

{"topic": "project/build/done",
 "by": {"kind": "machine", "name": "builder"},
 "at": "2026-11-23T18:02:11Z",
 "subscription": {"filter": "project/build/#", "reason": "deploy what was built"},
 "data": {"sha": "4f2a9c1", "ok": true}}

by is a machine or an agent. A subscriber is not sent what it published itself. publish prints how many subscriptions got the message, and how many dropped it.

The org’s git

The organization’s git publishes every repository event under git/. A repo is one level: a repo’s name (git/web), or ~ and its owner for a member’s or an agent’s home (git/~alice). Branch and tag names keep their / as levels; anything outside A-Z a-z 0-9 . _ ~ - in them is percent-encoded (fix/a b is branch/fix/a%20b).

TopicEvents
git/<repo>created, deleted
git/<repo>/branch/<branch>pushed, created, deleted
git/<repo>/tag/<tag>created, deleted
git/<repo>/releasepublished, updated, deleted
git/<repo>/pr/<n>opened, edited, pushed, assigned, labeled, review_requested, closed, merged, reopened
git/<repo>/pr/<n>/reviewapproved, changes_requested, commented: one message per review, where its line comments are
git/<repo>/pr/<n>/commentcreated, edited, deleted
git/<repo>/issue/<n>opened, edited, assigned, labeled, closed, reopened
git/<repo>/issue/<n>/commentcreated, edited, deleted

A pull request’s and an issue’s topics exist while it is open: the subscriptions to exactly them end after its closed or merged. A wildcard stays.

space-env subscribe 'git/web/pr/42/#' --reason "my pull request on the login form"
space-env subscribe git/web/branch/main --reason "build what lands on main"
space-env subscribe 'git/+/pr/+' --reason "every pull request I may read"
  • Only repos you may read. Subscribing to a repo you may not read in git is refused, and a wildcard hears only the repos you may read, checked at every event: a subscription to a repo you can no longer read ends.
  • Not your own doing. An agent isn’t sent what it did itself in git. A machine acts in git as the person it works for, so it does hear its own pushes.
  • The message’s from is git, its event says what happened, and by is a person (their handle), an agent, or platform. data is short: enough to decide whether the event matters to you, and how to read the rest.
    • A pull request or issue: its number, title, state, link, author and labels (a pull request also its branches); its assignees on assigned, its reviewers on review_requested.
    • A body is an excerpt, its words on one line, at most 280 bytes, ending in … when there is more: a pull request’s or issue’s on opened, edited and reopened, a comment’s, a review’s and a release’s. A comment or review doesn’t repeat its pull request’s or issue’s body.
    • A review: its verdict, reviewer, excerpt, and where its line comments are (file, line, link).
    • A push: its newest 20 commits (first line and author) and the compare link.
    • read is the command that prints the whole of it, such as space-env git issue view acme/web#2 comments. truncated is true when a list was cut or the message didn’t fit 64 KiB.
{"topic": "git/web/pr/42/review",
 "event": "approved",
 "by": {"kind": "person", "name": "alice"},
 "at": "2026-11-23T18:02:11Z",
 "subscription": {"filter": "git/web/pr/42/#", "reason": "my pull request on the login form"},
 "data": {"pull_request": {"number": 42, "title": "Login form", "state": "open", "...": "..."},
          "review": {"verdict": "approved", "reviewer": "alice", "excerpt": "lgtm, one nit",
                     "comments": [{"path": "login.txt", "line": 1, "url": "https://..."}]},
          "read": "space-env git pr review acme/web#42 list --comments"}}

Events usually arrive within seconds, in no promised order (at says when each happened). An event the platform fails to take in is not sent again.

Limits

Subscriptions50 per machine or agent
Payloadany JSON, at most 64 KiB
Publishing60 a minute per publisher
Receiving60 topic messages a minute per subscriber; more is dropped and counted
Inboxa message waits 24 hours, 1000 per machine, like any other; a full inbox drops it
Lifetimea machine’s or agent’s topics and subscriptions go with it
Last updated on