fix(openclaw-gateway): make claimedApiKeyPath configurable per agent

The openclaw_gateway adapter hardcodes the Paperclip API key path to
~/.openclaw/workspace/paperclip-claimed-api-key.json in buildWakeText().
In multi-agent OpenClaw deployments, each agent has its own workspace
with its own key file. The hardcoded path forces all agents to share
one key, breaking agent identity isolation.

Add a claimedApiKeyPath field to the adapter config (with UI input)
that allows operators to set a per-agent path. Falls back to the
current default when unset — zero behavior change for existing
deployments.

Fixes #930
This commit is contained in:
Wes Belt 2026-04-03 11:25:58 -04:00
parent 2ac40aba56
commit 8e42c6cdac
No known key found for this signature in database
2 changed files with 19 additions and 3 deletions

View file

@ -150,6 +150,16 @@ export function OpenClawGatewayConfigFields({
/>
</Field>
<Field label="Claimed API key path">
<DraftInput
value={eff("adapterConfig", "claimedApiKeyPath", String(config.claimedApiKeyPath ?? ""))}
onCommit={(v) => mark("adapterConfig", "claimedApiKeyPath", v || undefined)}
immediate
className={inputClass}
placeholder="~/.openclaw/workspace/paperclip-claimed-api-key.json"
/>
</Field>
<Field label="Session strategy">
<select
value={sessionStrategy}