Reapply "refactor: move runtime state to SQLite"

This reverts commit 694ca50e97.
This commit is contained in:
Peter Steinberger
2026-05-13 13:34:30 +01:00
parent 05db911775
commit c6ee68b751
3003 changed files with 128551 additions and 130603 deletions

View File

@@ -242,7 +242,7 @@ Model behavior:
Credential and profile paths:
- Auth profiles (API keys + OAuth): `~/.openclaw/agents/<agentId>/agent/auth-profiles.json`
- Auth profiles (API keys + OAuth): `~/.openclaw/state/openclaw.sqlite#table/auth_profile_stores/<agentDir>`
- Legacy OAuth import: `~/.openclaw/credentials/oauth.json`
Credential storage mode:
@@ -269,10 +269,10 @@ Credential storage mode:
<Note>
Headless and server tip: complete OAuth on a machine with a browser, then copy
that agent's `auth-profiles.json` (for example
`~/.openclaw/agents/<agentId>/agent/auth-profiles.json`, or the matching
`$OPENCLAW_STATE_DIR/...` path) to the gateway host. `credentials/oauth.json`
is only a legacy import source.
that agent's SQLite auth-profile row (for example
`~/.openclaw/state/openclaw.sqlite#table/auth_profile_stores/<agentDir>`, or the matching
`$OPENCLAW_STATE_DIR/...` path) to the gateway host. `credentials/oauth.json` is
only a legacy import source.
</Note>
## Outputs and internals
@@ -299,7 +299,11 @@ Typical fields in `~/.openclaw/openclaw.json`:
`openclaw agents add` writes `agents.list[]` and optional `bindings`.
WhatsApp credentials go under `~/.openclaw/credentials/whatsapp/<accountId>/`.
Sessions are stored under `~/.openclaw/agents/<agentId>/sessions/`.
Session rows and transcripts are stored in SQLite:
`~/.openclaw/state/openclaw.sqlite` plus
`~/.openclaw/agents/<agentId>/agent/openclaw-agent.sqlite`.
Legacy `agents/<agentId>/sessions/` files are doctor migration inputs or
explicit debug/export artifacts only.
<Note>
Some channels are delivered as plugins. When selected during setup, the wizard