-All 8 bots are implemented. Enabled/configured via the web UI or `scuttlectl`. The manager (`internal/bots/manager/`) starts/stops them dynamically when policies change.
162
+All 10 bots are implemented. Enabled/configured via the web UI or `scuttlectl bot list`. The manager (`internal/bots/manager/`) starts/stops them dynamically when policies change. All bots set `+B` (bot) user mode on connect and auto-accept INVITE.
163
163
164
164
| Bot | Nick | Role |
165
165
|-----|------|------|
166
166
| `auditbot` | auditbot | Immutable append-only audit trail of agent actions and credential events |
-Oracle reads history from scribe's log files (pointed at the same dir). Configure `api_key_env` to the name of the env var holding the API key (e.g. `ORACLE_OPENAI_API_KEY`), and `base_url` for non-OpenAI providers.
177
+Oracle uses TOON format (`pkg/toon/`) for token-efficient LLM context. Scroll supports `format=toon` for compact replay output. Configure `api_key_env` to the name of the env var holding the API key (e.g. `ORACLE_OPENAI_API_KEY`), and `base_url` for non-OpenAI providers.
176
178
177
179
### Scale
178
180
179
181
Target: 100s to low 1000s of agents on a private network. Single Ergo instance handles this comfortably (documented up to 10k clients, 2k per channel). Ergo scales up (multi-core), not out — no horizontal clustering today. Federation is planned upstream but has no timeline; not a scuttlebot concern for now.
-The API token is a random hex string generated once at startup, persisted to `data/ergo/api_token`.
234
-
235
236
### Auth
236
237
237
-`POST /login` accepts `{username, password}` and returns `{token, username}`. The token is the shared server API token. Rate limited to 10 attempts per minute per IP.
238
+API keys are per-consumer tokens with scoped permissions. Each key has a name, scopes, optional expiry, and last-used tracking. Scopes: `admin`, `agents`, `channels`, `chat`, `topology`, `bots`, `config`, `read`. The `admin` scope implies all others.
239
+
240
+`POST /login` accepts `{username, password}` and returns a 24h session token with admin scope. Rate limited to 10 attempts per minute per IP.
241
+
242
+On first run, the legacy `api_token` file is migrated into `api_keys.json` as the first admin-scope key. New keys are created via `POST /v1/api-keys`, `scuttlectl api-key create`, or the web UI settings tab.
238
243
239
-Admin accounts are managed via `scuttlectl admin` or the web UI settings → admin accounts card. First run auto-creates an `admin` account with a random password printed to the log.
244
+Admin accounts managed via `scuttlectl admin` or web UI. First run auto-creates `admin` with a random password printed to the log.
1. Create `internal/bots/{name}/` package with a `Bot` struct and `Start(ctx context.Context) error` method
264
-2. Add a `BotSpec` config struct if the bot needs user-configurable settings
265
-3. Register in `internal/bots/manager/manager.go`:
295
+2. Set `+B` user mode on connect, handle INVITE for auto-join
296
+3. Add a `BotSpec` config struct if the bot needs user-configurable settings
297
+4. Register in `internal/bots/manager/manager.go`:
266
298
- Add a case to `buildBot()` that constructs your bot from the spec config
267
299
- Add a `BehaviorConfig` entry to `defaultBehaviors` in `internal/api/policies.go`
268
-4. Add the UI config schema to `BEHAVIOR_SCHEMAS` in `internal/api/ui/index.html`
269
-5. Write tests: bot logic, config parsing, edge cases. IRC connection can be skipped in unit tests.
270
-6. Update this bootstrap
300
+5. Add commands to `botCommands` map in `internal/api/policies.go` for the web UI command reference
301
+6. Add the UI config schema to `BEHAVIOR_SCHEMAS` in `internal/api/ui/index.html`
302
+7. Use `internal/bots/cmdparse/` for command routing if the bot accepts DM commands
303
+8. Write tests: bot logic, config parsing, edge cases. IRC connection can be skipped in unit tests.
304
+9. Update this bootstrap
271
305
272
306
No separate registration file or global registry. The manager builds bots by ID from the `BotSpec`. Bots satisfy the `bot` interface (unexported in manager package):
273
307
274
308
```go
275
309
type bot interface {
@@ -315,14 +349,28 @@
315
349
go build ./cmd/scuttlectl # build CLI
316
350
go test ./... # run all tests
317
351
golangci-lint run # lint
318
352
319
353
# Admin CLI
354
+scuttlectl status # server health
320
355
scuttlectl admin list # list admin accounts
321
356
scuttlectl admin add alice # add admin (prompts for password)
docker compose -f deploy/compose/docker-compose.yml up
327
375
```
328
376
329
377
--- bootstrap.md
+++ bootstrap.md
@@ -157,24 +157,26 @@
157
- `+v` (voice) — trusted worker agents
158
- no mode — standard agents
159
160
### Built-in bots
161
162
All 8 bots are implemented. Enabled/configured via the web UI or `scuttlectl`. The manager (`internal/bots/manager/`) starts/stops them dynamically when policies change.
163
164
| Bot | Nick | Role |
165
|-----|------|------|
166
| `auditbot` | auditbot | Immutable append-only audit trail of agent actions and credential events |
Oracle reads history from scribe's log files (pointed at the same dir). Configure `api_key_env` to the name of the env var holding the API key (e.g. `ORACLE_OPENAI_API_KEY`), and `base_url` for non-OpenAI providers.
176
177
### Scale
178
179
Target: 100s to low 1000s of agents on a private network. Single Ergo instance handles this comfortably (documented up to 10k clients, 2k per channel). Ergo scales up (multi-core), not out — no horizontal clustering today. Federation is planned upstream but has no timeline; not a scuttlebot concern for now.
The API token is a random hex string generated once at startup, persisted to `data/ergo/api_token`.
234
235
### Auth
236
237
`POST /login` accepts `{username, password}` and returns `{token, username}`. The token is the shared server API token. Rate limited to 10 attempts per minute per IP.
238
239
Admin accounts are managed via `scuttlectl admin` or the web UI settings → admin accounts card. First run auto-creates an `admin` account with a random password printed to the log.
1. Create `internal/bots/{name}/` package with a `Bot` struct and `Start(ctx context.Context) error` method
264
2. Add a `BotSpec` config struct if the bot needs user-configurable settings
265
3. Register in `internal/bots/manager/manager.go`:
266
- Add a case to `buildBot()` that constructs your bot from the spec config
267
- Add a `BehaviorConfig` entry to `defaultBehaviors` in `internal/api/policies.go`
268
4. Add the UI config schema to `BEHAVIOR_SCHEMAS` in `internal/api/ui/index.html`
269
5. Write tests: bot logic, config parsing, edge cases. IRC connection can be skipped in unit tests.
270
6. Update this bootstrap
271
272
No separate registration file or global registry. The manager builds bots by ID from the `BotSpec`. Bots satisfy the `bot` interface (unexported in manager package):
273
274
```go
275
type bot interface {
@@ -315,14 +349,28 @@
315
go build ./cmd/scuttlectl # build CLI
316
go test ./... # run all tests
317
golangci-lint run # lint
318
319
# Admin CLI
320
scuttlectl admin list # list admin accounts
321
scuttlectl admin add alice # add admin (prompts for password)
322
scuttlectl admin passwd alice # change password
323
scuttlectl admin remove alice # remove admin
324
325
# Docker
326
docker compose -f deploy/compose/docker-compose.yml up
327
```
328
329
--- bootstrap.md
+++ bootstrap.md
@@ -157,24 +157,26 @@
157
- `+v` (voice) — trusted worker agents
158
- no mode — standard agents
159
160
### Built-in bots
161
162
All 10 bots are implemented. Enabled/configured via the web UI or `scuttlectl bot list`. The manager (`internal/bots/manager/`) starts/stops them dynamically when policies change. All bots set `+B` (bot) user mode on connect and auto-accept INVITE.
163
164
| Bot | Nick | Role |
165
|-----|------|------|
166
| `auditbot` | auditbot | Immutable append-only audit trail of agent actions and credential events |
Oracle uses TOON format (`pkg/toon/`) for token-efficient LLM context. Scroll supports `format=toon` for compact replay output. Configure `api_key_env` to the name of the env var holding the API key (e.g. `ORACLE_OPENAI_API_KEY`), and `base_url` for non-OpenAI providers.
178
179
### Scale
180
181
Target: 100s to low 1000s of agents on a private network. Single Ergo instance handles this comfortably (documented up to 10k clients, 2k per channel). Ergo scales up (multi-core), not out — no horizontal clustering today. Federation is planned upstream but has no timeline; not a scuttlebot concern for now.
API keys are per-consumer tokens with scoped permissions. Each key has a name, scopes, optional expiry, and last-used tracking. Scopes: `admin`, `agents`, `channels`, `chat`, `topology`, `bots`, `config`, `read`. The `admin` scope implies all others.
239
240
`POST /login` accepts `{username, password}` and returns a 24h session token with admin scope. Rate limited to 10 attempts per minute per IP.
241
242
On first run, the legacy `api_token` file is migrated into `api_keys.json` as the first admin-scope key. New keys are created via `POST /v1/api-keys`, `scuttlectl api-key create`, or the web UI settings tab.
243
244
Admin accounts managed via `scuttlectl admin` or web UI. First run auto-creates `admin` with a random password printed to the log.
245
246
### Key endpoints
247
248
All `/v1/` endpoints require a Bearer token with the appropriate scope.
1. Create `internal/bots/{name}/` package with a `Bot` struct and `Start(ctx context.Context) error` method
295
2. Set `+B` user mode on connect, handle INVITE for auto-join
296
3. Add a `BotSpec` config struct if the bot needs user-configurable settings
297
4. Register in `internal/bots/manager/manager.go`:
298
- Add a case to `buildBot()` that constructs your bot from the spec config
299
- Add a `BehaviorConfig` entry to `defaultBehaviors` in `internal/api/policies.go`
300
5. Add commands to `botCommands` map in `internal/api/policies.go` for the web UI command reference
301
6. Add the UI config schema to `BEHAVIOR_SCHEMAS` in `internal/api/ui/index.html`
302
7. Use `internal/bots/cmdparse/` for command routing if the bot accepts DM commands
303
8. Write tests: bot logic, config parsing, edge cases. IRC connection can be skipped in unit tests.
304
9. Update this bootstrap
305
306
No separate registration file or global registry. The manager builds bots by ID from the `BotSpec`. Bots satisfy the `bot` interface (unexported in manager package):
307
308
```go
309
type bot interface {
@@ -315,14 +349,28 @@
349
go build ./cmd/scuttlectl # build CLI
350
go test ./... # run all tests
351
golangci-lint run # lint
352
353
# Admin CLI
354
scuttlectl status # server health
355
scuttlectl admin list # list admin accounts
356
scuttlectl admin add alice # add admin (prompts for password)