Skip to content

Commit f84435f

Browse files
iammatthiasclaude
andcommitted
feat: support OpenClaw and Hermes agents
Add support for both engines on the Pinata platform plus the cheap drift in the same files. (Previous commit on this branch covered create/engines/ versions; this rolls in the Hermes chat fix.) For chat: OpenClaw streams the assistant turn token-by-token in `data.delta`, while Hermes sends the full message in `data.text`. The CLI only read `delta`, so Hermes responses were silently dropped after the lifecycle:start event and chat appeared to hang. Read `data.text` when `data.delta` is absent so both engines render correctly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f497de3 commit f84435f

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ All notable changes to this project will be documented in this file.
2020
- Allow flags to be passed after positional arguments (e.g. `files get <id> --network public`); previously such flags were silently ignored
2121
- Fix `agents templates update`/`submit`/`validate` for templates from a branch or subfolder: send the API's `ref` (with `path` for monorepos) instead of the removed `branch` field; `--branch`/`-b` remain as aliases for `--ref`
2222
- Surface server error messages (including validation errors) for the templates API instead of a generic "server returned status N"
23+
- `agents chat` now works with Hermes agents: Hermes sends assistant messages via `data.text` (whole message) instead of `data.delta` (streaming tokens), and the CLI was silently dropping anything without `delta`
2324

2425
### 🚜 Refactor
2526

internal/agents/chat/stream.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,13 @@ func StreamChat(ctx context.Context, agentID, token, model, session string, mess
319319

320320
switch payload.Stream {
321321
case "assistant":
322-
// Text delta
322+
// Assistant text. OpenClaw streams token-by-token via
323+
// `data.delta`; Hermes sends the full message in a
324+
// single event via `data.text`. Handle both.
323325
if delta, ok := payload.Data["delta"].(string); ok {
324326
events <- StreamEvent{Type: StreamEventToken, Token: delta}
327+
} else if text, ok := payload.Data["text"].(string); ok {
328+
events <- StreamEvent{Type: StreamEventToken, Token: text}
325329
}
326330

327331
case "tool":

0 commit comments

Comments
 (0)