Description
The storage block is required in every Squadron configuration — omitting it produces:
Error: a storage block is required in the configuration, e.g.:
storage {
backend = "sqlite"
}
However, there is no documentation for this block anywhere on the docs site. It's missing from:
config/overview.mdx — not listed in the Block Types table
- No dedicated
config/storage.mdx page exists
getting-started/quickstart.mdx — not mentioned
getting-started/docker.mdx — not mentioned
What the source code shows
From config/storage.go:
type StorageConfig struct {
Backend string `hcl:"backend,optional"` // "sqlite" or "postgres"
Path string `hcl:"path,optional"` // SQLite file path (default: ".squadron/store.db")
ConnString string `hcl:"conn_string,optional"` // Postgres connection string
}
From store/factory.go, the two supported backends:
- sqlite — requires
path (defaults to .squadron/store.db, or $SQUADRON_HOME/store.db when SQUADRON_HOME is set)
- postgres — requires
conn_string (e.g., postgres://user:pass@host:5432/dbname). Uses pgx driver, auto-creates 12 tables via CREATE TABLE IF NOT EXISTS, sets pool to 25 max open / 5 max idle / 5min max lifetime.
Suggested documentation
Minimal addition to config/overview.mdx
Add storage to the Block Types table:
| Block |
Purpose |
| storage |
Configure mission state persistence (SQLite or PostgreSQL) |
New page: config/storage.mdx
SQLite (default):
storage {
backend = "sqlite"
path = ".squadron/store.db" # optional, this is the default
}
When SQUADRON_HOME is set, defaults to $SQUADRON_HOME/store.db.
PostgreSQL:
storage {
backend = "postgres"
conn_string = "postgres://user:pass@localhost:5432/mydb"
}
Tables are auto-created on first use. Squadron creates 12 tables (missions, sessions, tool_results, etc.) using CREATE TABLE IF NOT EXISTS, so it can safely co-locate with application tables in the same database.
Attributes:
| Attribute |
Type |
Default |
Description |
| backend |
string |
sqlite |
Storage backend: sqlite or postgres |
| path |
string |
.squadron/store.db |
SQLite database file path |
| conn_string |
string |
— |
PostgreSQL connection string (required when backend = postgres) |
Context
We discovered this through reading the source code after trial-and-error. Our project co-locates Squadron tables alongside application tables in the same Postgres database, which works well since there are no table name collisions.
Description
The
storageblock is required in every Squadron configuration — omitting it produces:However, there is no documentation for this block anywhere on the docs site. It's missing from:
config/overview.mdx— not listed in the Block Types tableconfig/storage.mdxpage existsgetting-started/quickstart.mdx— not mentionedgetting-started/docker.mdx— not mentionedWhat the source code shows
From
config/storage.go:From
store/factory.go, the two supported backends:path(defaults to.squadron/store.db, or$SQUADRON_HOME/store.dbwhenSQUADRON_HOMEis set)conn_string(e.g.,postgres://user:pass@host:5432/dbname). Usespgxdriver, auto-creates 12 tables viaCREATE TABLE IF NOT EXISTS, sets pool to 25 max open / 5 max idle / 5min max lifetime.Suggested documentation
Minimal addition to config/overview.mdx
Add
storageto the Block Types table:New page: config/storage.mdx
SQLite (default):
When SQUADRON_HOME is set, defaults to $SQUADRON_HOME/store.db.
PostgreSQL:
Tables are auto-created on first use. Squadron creates 12 tables (missions, sessions, tool_results, etc.) using CREATE TABLE IF NOT EXISTS, so it can safely co-locate with application tables in the same database.
Attributes:
Context
We discovered this through reading the source code after trial-and-error. Our project co-locates Squadron tables alongside application tables in the same Postgres database, which works well since there are no table name collisions.