docs: refresh chat history sanitization mirrors

This commit is contained in:
Peter Steinberger
2026-04-04 21:53:25 +01:00
parent 291afbbb95
commit adfdde5cb3
5 changed files with 21 additions and 12 deletions

View File

@@ -285,10 +285,11 @@ The delegate's `AGENTS.md` defines its autonomous authority — what it may do w
If you grant `sessions_history`, remember it is a bounded, safety-filtered
recall view. OpenClaw redacts credential/token-like text, truncates long
content, strips thinking tags / `<relevant-memories>` scaffolding / plain-text
tool-call XML payloads / downgraded tool-call scaffolding / leaked model
tool-call XML payloads (including `<tool_calls>` and truncated tool-call
blocks) / downgraded tool-call scaffolding / leaked ASCII/full-width model
control tokens / malformed MiniMax tool-call XML from assistant recall, and
can replace oversized rows with `[sessions_history omitted: message too large]`
instead of returning a raw transcript dump.
can replace oversized rows with `[sessions_history omitted: message too
large]` instead of returning a raw transcript dump.
## Scaling pattern

View File

@@ -348,8 +348,10 @@ implemented in `src/gateway/server-methods/*.ts`.
- chat execution still uses `chat.history`, `chat.send`, `chat.abort`, and
`chat.inject`.
- `chat.history` is display-normalized for UI clients: inline directive tags are
stripped from visible text, pure `NO_REPLY` assistant rows are omitted, and
oversized rows can be replaced with placeholders.
stripped from visible text, plain-text tool-call XML payloads (including
`<tool_calls>` and truncated tool-call blocks) and leaked ASCII/full-width
model control tokens are stripped, pure `NO_REPLY` assistant rows are
omitted, and oversized rows can be replaced with placeholders.
#### Device pairing and device tokens

View File

@@ -138,10 +138,10 @@ Pairing details: [Pairing](/channels/pairing).
The Android Chat tab supports session selection (default `main`, plus other existing sessions):
- History: `chat.history` (display-normalized; inline directive tags are
stripped from visible text, plain-text tool-call XML payloads and leaked
ASCII/full-width model control tokens are stripped, pure `NO_REPLY`
assistant rows are omitted, and oversized rows can be replaced with
placeholders)
stripped from visible text, plain-text tool-call XML payloads (including
`<tool_calls>` and truncated tool-call blocks) and leaked ASCII/full-width
model control tokens are stripped, pure `NO_REPLY` assistant rows are
omitted, and oversized rows can be replaced with placeholders)
- Send: `chat.send`
- Push updates (best-effort): `chat.subscribe` → `event:"chat"`

View File

@@ -31,8 +31,9 @@ agent (with a session switcher for other sessions).
- Data plane: Gateway WS methods `chat.history`, `chat.send`, `chat.abort`,
`chat.inject` and events `chat`, `agent`, `presence`, `tick`, `health`.
- `chat.history` returns display-normalized transcript rows: inline directive
tags are stripped from visible text, plain-text tool-call XML payloads and
leaked ASCII/full-width model control tokens are stripped, pure `NO_REPLY`
tags are stripped from visible text, plain-text tool-call XML payloads
(including `<tool_calls>` and truncated tool-call blocks) and leaked
ASCII/full-width model control tokens are stripped, pure `NO_REPLY`
assistant rows are omitted, and oversized rows can be replaced with
placeholders.
- Session: defaults to the primary session (`main`, or `global` when scope is

View File

@@ -26,7 +26,12 @@ Status: the macOS/iOS SwiftUI chat UI talks directly to the Gateway WebSocket.
- The UI connects to the Gateway WebSocket and uses `chat.history`, `chat.send`, and `chat.inject`.
- `chat.history` is bounded for stability: Gateway may truncate long text fields, omit heavy metadata, and replace oversized entries with `[chat.history omitted: message too large]`.
- `chat.history` is also display-normalized: inline delivery directive tags such as `[[reply_to_*]]` and `[[audio_as_voice]]`, plain-text tool-call XML payloads (including `<tool_calls>` and truncated tool-call blocks), and leaked ASCII/full-width model control tokens are stripped from visible text, and assistant entries whose whole visible text is only `NO_REPLY` are omitted.
- `chat.history` is also display-normalized: inline delivery directive tags
such as `[[reply_to_*]]` and `[[audio_as_voice]]`, plain-text tool-call XML
payloads (including `<tool_calls>` and truncated tool-call blocks), and
leaked ASCII/full-width model control tokens are stripped from visible text,
and assistant entries whose whole visible text is only `NO_REPLY` are
omitted.
- `chat.inject` appends an assistant note directly to the transcript and broadcasts it to the UI (no agent run).
- Aborted runs can keep partial assistant output visible in the UI.
- Gateway persists aborted partial assistant text into transcript history when buffered output exists, and marks those entries with abort metadata.