forked from farhoodlabs/paperclip
Merge pull request #2662 from wbelt/fix/configurable-claimed-api-key-path
fix(openclaw-gateway): make claimedApiKeyPath configurable per agent
This commit is contained in:
@@ -36,6 +36,7 @@ Request behavior fields:
|
|||||||
- waitTimeoutMs (number, optional): agent.wait timeout override (default timeoutSec * 1000)
|
- waitTimeoutMs (number, optional): agent.wait timeout override (default timeoutSec * 1000)
|
||||||
- autoPairOnFirstConnect (boolean, optional): on first "pairing required", attempt device.pair.list/device.pair.approve via shared auth, then retry once (default true)
|
- autoPairOnFirstConnect (boolean, optional): on first "pairing required", attempt device.pair.list/device.pair.approve via shared auth, then retry once (default true)
|
||||||
- paperclipApiUrl (string, optional): absolute Paperclip base URL advertised in wake text
|
- paperclipApiUrl (string, optional): absolute Paperclip base URL advertised in wake text
|
||||||
|
- claimedApiKeyPath (string, optional): path to the claimed API key JSON file read by the agent at wake time (default ~/.openclaw/workspace/paperclip-claimed-api-key.json)
|
||||||
|
|
||||||
Session routing fields:
|
Session routing fields:
|
||||||
- sessionKeyStrategy (string, optional): issue (default), fixed, or run
|
- sessionKeyStrategy (string, optional): issue (default), fixed, or run
|
||||||
|
|||||||
@@ -320,6 +320,12 @@ function resolvePaperclipApiUrlOverride(value: unknown): string | null {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DEFAULT_CLAIMED_API_KEY_PATH = "~/.openclaw/workspace/paperclip-claimed-api-key.json";
|
||||||
|
|
||||||
|
function resolveClaimedApiKeyPath(value: unknown): string {
|
||||||
|
return nonEmpty(value) ?? DEFAULT_CLAIMED_API_KEY_PATH;
|
||||||
|
}
|
||||||
|
|
||||||
function buildPaperclipEnvForWake(ctx: AdapterExecutionContext, wakePayload: WakePayload): Record<string, string> {
|
function buildPaperclipEnvForWake(ctx: AdapterExecutionContext, wakePayload: WakePayload): Record<string, string> {
|
||||||
const paperclipApiUrlOverride = resolvePaperclipApiUrlOverride(ctx.config.paperclipApiUrl);
|
const paperclipApiUrlOverride = resolvePaperclipApiUrlOverride(ctx.config.paperclipApiUrl);
|
||||||
const paperclipEnv: Record<string, string> = {
|
const paperclipEnv: Record<string, string> = {
|
||||||
|
|||||||
@@ -150,6 +150,16 @@ export function OpenClawGatewayConfigFields({
|
|||||||
/>
|
/>
|
||||||
</Field>
|
</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">
|
<Field label="Session strategy">
|
||||||
<select
|
<select
|
||||||
value={sessionStrategy}
|
value={sessionStrategy}
|
||||||
|
|||||||
Reference in New Issue
Block a user