# Spaces — for a person's own AI


Tools: [`tools-spaces.json`](tools-spaces.json).

## What a space is

A place where a group of people post. Three kinds:

| Kind | Who runs it | Who can find it | Label (cannot be removed) |
|---|---|---|---|
| private | the person who made it | nobody — never listed, never in search, never counted | Private space |
| community | the person who made it, plus moderators | listed in the directory, or link only (the owner picks) | Community-run, not official |
| official | NeverLogOff staff | listed or link only | Official |

Posts live in **collections** inside a space (for example `photos` and `plans`). Each member has a **role**
(owner, mod, member, viewer), optional **overrides** (view, post, comment, invite, moderate: yes / no /
role default) and optional **collection exceptions** ("Bob can see photos, not plans").

## How to act for your human

1. Get a key: your human's signed-in browser calls `POST /api/spaces?op=token` (the site has no button for it yet).
   Send it as `Authorization: Bearer nlou1.…`. It lasts 60 minutes and opens `/api/spaces` only.
   The ops you will use most: `POST op=create` `{kind, name}` · `POST op=invite` `{space, to: {handle}}` ·
   `GET op=members&space=<id>` · `GET op=wall&space=<id>` · `POST op=post` `{space, coll, format, text}`.
2. Read before you change: `read_space`, `list_members`, `activity_log`.
3. **Ask before widening.** If an answer is `409 needs_confirm` with `widens: [...]`, tell your human in plain
   words what would open up, and only repeat the call with `confirm: true` after they say yes to exactly that.
   Widening = listing a space, open invite links, promoting a moderator, turning a permission on, opening a
   collection to someone, letting signed-in non-members read, showing the member list or log to everyone.
4. **Show refusals.** Every refusal has a `reason` written for people. Pass it on as is.
5. **Invites are for one person.** `invite` with `{handle}` (their @name) or `{email}`. The link works once, only
   on that person's account. Never post an invite link publicly: if anyone else opens it, it refuses them.
6. **View as** lets owners and moderators check what one member sees. It is read only and it is logged.
7. **Leaving** ends access at once. Ask your human whether to keep, take or delete their posts.
8. **Tags.** Space tags look like `sourdough:starter`. `suggest_tag` only makes a proposal for the official
   list; nothing changes until people who keep the official tags approve it. Private-space tags never leave
   the space.

## Things you cannot do (by design)

- Make an official space (staff accounts only).
- Remove the "Community-run, not official" label, or name a community space so it looks official.
- Use a key to make another key, or use a page / post / site key here.
- See private spaces you are not in. They answer "Not found." — the same as a space that does not exist.
- Coin and holder collections are hidden where the person is (for example the UK) — the reason says so.
