docs: document embedded agent runtime

This commit is contained in:
Peter Steinberger
2025-12-17 11:29:12 +01:00
parent fece42ce0a
commit 1cdebb68a0
12 changed files with 143 additions and 252 deletions

View File

@@ -5,7 +5,7 @@ read_when:
---
# Session Management
Clawdis treats **one session as primary**. By default the canonical key is `main` for every direct chat; no configuration is required. You can rename it via `inbound.reply.session.mainKey` if you really want, but there is still only a single primary session. Older/local sessions can stay on disk, but only the primary key is used for desktop/web chat and direct agent calls.
Clawdis treats **one session as primary**. By default the canonical key is `main` for every direct chat; no configuration is required. You can rename it via `inbound.session.mainKey` if you really want, but there is still only a single primary session. Older/local sessions can stay on disk, but only the primary key is used for desktop/web chat and direct agent calls.
## Gateway is the source of truth
All session state is **owned by the gateway** (the “master” Clawdis). UI clients (macOS app, WebChat, etc.) must query the gateway for session lists and token counts instead of reading local files.
@@ -25,7 +25,7 @@ All session state is **owned by the gateway** (the “master” Clawdis). UI cli
- Group chats still isolate state with `group:<jid>` keys; do not reuse the primary key for groups.
## Lifecyle
- Idle expiry: `inbound.reply.session.idleMinutes` (default 60). After the timeout a new `sessionId` is minted on the next message.
- Idle expiry: `inbound.session.idleMinutes` (default 60). After the timeout a new `sessionId` is minted on the next message.
- Reset triggers: exact `/new` (plus any extras in `resetTriggers`) start a fresh session id and pass the remainder of the message through.
- Manual reset: delete specific keys from the store or remove the JSONL transcript; the next message recreates them.
@@ -34,14 +34,12 @@ All session state is **owned by the gateway** (the “master” Clawdis). UI cli
// ~/.clawdis/clawdis.json
{
inbound: {
reply: {
session: {
scope: "per-sender", // keep group keys separate
idleMinutes: 120,
resetTriggers: ["/new"],
store: "~/.clawdis/sessions/sessions.json",
mainKey: "main" // optional rename; still a single primary
}
session: {
scope: "per-sender", // keep group keys separate
idleMinutes: 120,
resetTriggers: ["/new"],
store: "~/.clawdis/sessions/sessions.json",
mainKey: "main" // optional rename; still a single primary
}
}
}