Logs every SSE event and final message content block types to stdout
to diagnose what the user sees as "full tool calls" in Telegram.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- TS worker saves/loads messages to {stateRoot}/conversation.json
- Saves after user message, assistant response, and session reset
- Loads on engine construction (survives container restarts)
- Add CLAW_GATEWAY_WORKER_HOST_STATE_ROOT and
CLAW_GATEWAY_WORKER_HOST_WORKSPACE_ROOT to Unraid XML, defaulting
to /mnt/user/appdata/claw-telegram-gateway/workers
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
OAuth tokens require:
- System prompt as array of content blocks with the SDK prefix first
- anthropic-beta, anthropic-dangerous-direct-browser-access,
user-agent, and x-app headers
- Beta flags: claude-code-20250219,oauth-2025-04-20
Tested end-to-end: real Claude response received (Hey!, 409/5 tokens).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
OAuth tokens (sk-ant-oat) require:
- System prompt prefixed with "You are a Claude agent, built on
Anthropic's Claude Agent SDK."
- anthropic-beta, anthropic-dangerous-direct-browser-access, and
x-app headers
Tested locally: 401 → 429 (auth succeeds, rate limited).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The gateway health check calls /healthz without auth headers.
Move the healthz route before the auth check.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The agent is instructed to actively learn about the user, recognize
new information worth keeping, and offer to persist useful artifacts
across session resets. Concise for Telegram.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add ts-worker/ with the Bun/TypeScript worker that replaces
claw-profile-worker. The Dockerfile now builds a single image
containing both the Rust gateway (claw-telegram) and the TS worker.
The image defaults to worker mode (bun run ts-worker/main.ts).
The gateway Unraid XML overrides with --entrypoint claw-telegram.
Worker containers use the same image with the default CMD.
- Add ts-worker/ (12 files): HTTP/SSE server, Anthropic SDK engine,
approval broker, event translator, state stores
- Add package.json with @anthropic-ai/sdk dependency
- Rewrite Dockerfile: three-stage build (Rust + Bun + runtime)
- Revert CLAW_GATEWAY_WORKER_IMAGE to claw-telegram:latest
- Remove image pull from docker_worker_manager (same image, already local)
- Add ts-worker paths to CI trigger
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>