better startup flow

This commit is contained in:
ari committed 2026-11-01 14:20:13 -05:00
1 parent d7f5dba677
commit 650bcff83a
8 files changed
+345 -68

No files matched your search

+48 -45
View File
@@ -4,9 +4,9 @@ How to use slackerbot from Slack.
## Your container
| Where you talk to the bot | Container | Who can use it |
|---|---|---|
| DM with the bot | `u-<user id>` | Only you |
| Where you talk to the bot | Container | Who can use it |
| ------------------------------------------------------- | ---------------- | ---------------------- |
| DM with the bot | `u-<user id>` | Only you |
| Channel, private channel or group DM (@mention the bot) | `c-<channel id>` | Anyone in that channel |
In channels, @mention the bot to start a session. In a session's thread, the bot by default only reads replies that @mention it, but a thread can be switched to read every reply (see **Listening in threads** below). Each message reaches the agent with the sender's name in front (e.g. `Alice: try the other branch`), so the agent knows who's asking, and the first message of a session tells the agent which channel it's in.
@@ -22,8 +22,10 @@ In DMs the bot reads every message. You can also chat with it in Slack's assista
5. To stop a reply part-way, react to your message or the bot's reply with ❌ (`:x:`) or 🛑 (`:octagonal_sign:`). The reply ends with _(cancelled)_, and the session carries on with your next message.
6. Messages in one thread run one at a time. If two people post at once, the second waits its turn.
7. Containers unused for longer than their idle limit are stopped (default 6 hours, see `keep`). Files are kept, and the bot posts to say it stopped the container.
8. **Container updates have their own thread.** Each time a container starts, the bot posts a top-level "Starting container" message in the channel (or your DM) and pins it. Every step goes in that message's thread as its own reply, saying what the bot is waiting for: placing it on a node, creating the home folder and launching it, and waiting for the agent. A last reply says the container is up. Your own thread only gets one message with a link to it. Stopping a container (`stop`, the **Stop** button or the idle limit) is reported in the same thread, ending with a reply that it's down. The pin is replaced the next time the container starts.
Other replies you may get:
- **"maxed out":** no node has room right now. Try again later.
- **"being moved, try again in a moment":** a move is in progress.
- **"dead slave":** the node your container lives on is offline. Pick **Create new container** to get a fresh one on a healthy node (old sessions won't carry over), or **Wait** to get a message when the node is back.
@@ -32,13 +34,13 @@ Other replies you may get:
Channel threads start out in `only-mentions`: the bot only reads replies that @mention it. Switch with `@slacker /listen …` (the mention matters, because Slack treats a message starting with `/` as a slash command). `listen` without the slash works too.
| Command | Where | What it does |
|---|---|---|
| `@slacker /listen all-messages` | in a session's thread | The bot reads every reply in this thread |
| `@slacker /listen only-mentions` | in a session's thread | Back to replies that @mention the bot |
| `@slacker /listen` | in a thread | Shows what this thread does |
| Command | Where | What it does |
| ---------------------------------------------------------------------------------------- | ----------------------- | ----------------------------------------------------------------- |
| `@slacker /listen all-messages` | in a session's thread | The bot reads every reply in this thread |
| `@slacker /listen only-mentions` | in a session's thread | Back to replies that @mention the bot |
| `@slacker /listen` | in a thread | Shows what this thread does |
| `@slacker /listen channel all-messages` (or a top-level `@slacker /listen all-messages`) | anywhere in the channel | Sets the channel's default for threads that haven't set their own |
| `@slacker /listen channel` | anywhere in the channel | Shows the channel's default |
| `@slacker /listen channel` | anywhere in the channel | Shows the channel's default |
Anyone in the channel can change these. In an `all-messages` thread, `move` still needs an @mention, so a chatty "move on" doesn't move the container. DMs always read every message.
@@ -46,26 +48,26 @@ Anyone in the channel can change these. In an `all-messages` thread, `move` stil
Send these as a **new message**, not in a thread. `move` and `listen` are the exceptions, and also work in a thread. In the assistant pane, the first message of a chat counts as new.
| Command | What it does |
|---|---|
| `help` | Shows the command list |
| `status` | State, size, time unused and idle limit, with **Stop** and **Scale up** buttons |
| `sessions` | Past sessions with links. Open one and reply in its thread to continue |
| `stop` | Shuts the container down. Files are kept |
| `scale up` / `scale down` | Doubles or halves RAM and CPU |
| `scale 8G 4cpu` | Sets an exact size |
| `scale +2G` / `scale -1cpu` / `scale 512M +0.5cpu` | `+` or `-` changes by that much. Memory and CPU can be mixed or left out |
| `keep 24h` (or `3d`, `1d12h`, `2w`, `5 hours`) | Stops the container after that long unused |
| `keep indefinite` (or `forever`) | Never stops it for being unused. Use `stop` when done |
| `keep default` | Back to the server's default |
| `keep` | Shows the current idle limit |
| `storage` | Shows home folder usage, guaranteed space and max |
| `storage 20G` / `storage +5G` / `storage -2G` | Sets or changes the max (the cap) |
| `storage min 8G` / `storage min 8G max 20G` | Sets the guaranteed space, or both |
| `nodes` | Every node with what's free on it, and where this container runs |
| `move <node>` / `move to <node>` / `migrate <node>` | Moves this container to that node |
| `move` / `move auto` | Moves it to whichever other node keeps resources most even |
| `permissions` | Who may change what here |
| Command | What it does |
| --------------------------------------------------- | ------------------------------------------------------------------------------- |
| `help` | Shows the command list |
| `status` | State, size, time unused and idle limit, with **Stop** and **Scale up** buttons |
| `sessions` | Past sessions with links. Open one and reply in its thread to continue |
| `stop` | Shuts the container down. Files are kept |
| `scale up` / `scale down` | Doubles or halves RAM and CPU |
| `scale 8G 4cpu` | Sets an exact size |
| `scale +2G` / `scale -1cpu` / `scale 512M +0.5cpu` | `+` or `-` changes by that much. Memory and CPU can be mixed or left out |
| `keep 24h` (or `3d`, `1d12h`, `2w`, `5 hours`) | Stops the container after that long unused |
| `keep indefinite` (or `forever`) | Never stops it for being unused. Use `stop` when done |
| `keep default` | Back to the server's default |
| `keep` | Shows the current idle limit |
| `storage` | Shows home folder usage, guaranteed space and max |
| `storage 20G` / `storage +5G` / `storage -2G` | Sets or changes the max (the cap) |
| `storage min 8G` / `storage min 8G max 20G` | Sets the guaranteed space, or both |
| `nodes` | Every node with what's free on it, and where this container runs |
| `move <node>` / `move to <node>` / `migrate <node>` | Moves this container to that node |
| `move` / `move auto` | Moves it to whichever other node keeps resources most even |
| `permissions` | Who may change what here |
If what follows `scale`, `keep`, `storage` or `move` doesn't look like a size, a time or a node (e.g. "keep the tests passing"), the message goes to the agent instead.
@@ -83,29 +85,30 @@ Anyone can talk to the agent and use `status`, `sessions`, `nodes`, `permissions
**Changing** a container needs a permission:
| Permission | Covers |
|---|---|
| `scale` | `scale …` and the **Scale up** button |
| `storage` | `storage <size>`, `storage min …` |
| `move` | `move …` and **Create new container** |
| `keep` | `keep <time>`, `keep indefinite`, `keep default` |
| `all` | The four above |
| `manage` | Editing this channel's permission list |
| Permission | Covers |
| ---------- | ------------------------------------------------ |
| `scale` | `scale …` and the **Scale up** button |
| `storage` | `storage <size>`, `storage min …` |
| `move` | `move …` and **Create new container** |
| `keep` | `keep <time>`, `keep indefinite`, `keep default` |
| `all` | The four above |
| `manage` | Editing this channel's permission list |
Roughly how it fits together:
- **Channels** use a server-wide **default list** of super users, unless the channel has its **own list**. Your first `grant` in a channel copies the default list into it, so nobody loses access.
- **DMs** have no list. Instead, a server-wide switch per permission says whether people may change their own DM container (on unless turned off).
- **User managers** can change everything: any channel's list, the default list, DM switches and the manager list. **Channel managers** (`manage`) can only edit their own channel's list. There's always at least one user manager.
- If you lack a permission, the bot answers with :lock: and names who has it, without tagging them.
- Automatic moves don't need a permission.
| Command | Who | What it does |
|---|---|---|
| `grant @alice @bob move scale` | channel managers | Grants permissions in this channel |
| `revoke @alice move` / `revoke @alice` | channel managers | Removes some or all of someone's permissions here |
| `permissions reset` | channel managers | This channel goes back to the default list |
| `grant default @alice all` / `revoke default @alice` | user managers | Changes the default list |
| `dm storage on` / `dm storage off` | user managers | Changes what people may do on their own DM container |
| `managers` / `managers add @alice` / `managers remove @alice` | anyone / user managers | Shows or changes the user managers |
| Command | Who | What it does |
| ------------------------------------------------------------- | ---------------------- | ---------------------------------------------------- |
| `grant @alice @bob move scale` | channel managers | Grants permissions in this channel |
| `revoke @alice move` / `revoke @alice` | channel managers | Removes some or all of someone's permissions here |
| `permissions reset` | channel managers | This channel goes back to the default list |
| `grant default @alice all` / `revoke default @alice` | user managers | Changes the default list |
| `dm storage on` / `dm storage off` | user managers | Changes what people may do on their own DM container |
| `managers` / `managers add @alice` / `managers remove @alice` | anyone / user managers | Shows or changes the user managers |
People named in a `grant`, `revoke` or `managers` change are tagged in the bot's confirmation, so Slack notifies them.