Alex Alaniz d5ccc3dd41 feat: add publicMode for public-facing agents
Add per-agent `publicMode` configuration that suppresses local runtime
details (hostname, OS, architecture, workspace paths, skills snapshot)
from the system prompt when serving public-facing agents via the HTTP API.

- New `publicMode?: boolean` field in agent config schema
- `resolveAgentPublicMode()` in agent-scope for config lookup
- System prompt emits `"Runtime: public-facing agent"` instead of
  host/OS/arch details when publicMode is active
- Skills snapshot suppressed for publicMode agents
- New `X-OpenClaw-Sender-Is-Owner` HTTP header for both chat completions
  and OpenResponses endpoints, replacing the hardcoded `senderIsOwner: true`
- For publicMode agents, missing header defaults to non-owner semantics;
  for normal agents, missing header defaults to owner semantics
- `resolveIngressSenderIsOwner()` utility in http-utils
- Documentation updates for security boundary, header usage, and config
- Tests for system prompt suppression, param redaction, and header parsing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 00:20:01 -04:00
..