mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 01:50:39 +09:00
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:
commit
26ebe3b002
3 changed files with 17 additions and 0 deletions
|
|
@ -36,6 +36,7 @@ Request behavior fields:
|
|||
- 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)
|
||||
- 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:
|
||||
- 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> {
|
||||
const paperclipApiUrlOverride = resolvePaperclipApiUrlOverride(ctx.config.paperclipApiUrl);
|
||||
const paperclipEnv: Record<string, string> = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue