mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-17 03:10:38 +09:00
fix(openclaw): support /hooks/wake compatibility payload
This commit is contained in:
parent
690149d555
commit
a05aa99c7e
4 changed files with 291 additions and 10 deletions
|
|
@ -29,6 +29,11 @@ function normalizeHostname(value: string | null | undefined): string | null {
|
|||
return trimmed.toLowerCase();
|
||||
}
|
||||
|
||||
function isWakePath(pathname: string): boolean {
|
||||
const value = pathname.trim().toLowerCase();
|
||||
return value === "/hooks/wake" || value.endsWith("/hooks/wake");
|
||||
}
|
||||
|
||||
function pushDeploymentDiagnostics(
|
||||
checks: AdapterEnvironmentCheck[],
|
||||
ctx: AdapterEnvironmentTestContext,
|
||||
|
|
@ -148,6 +153,15 @@ export async function testEnvironment(
|
|||
hint: "Use a reachable hostname/IP (for example Tailscale/private hostname or public domain).",
|
||||
});
|
||||
}
|
||||
|
||||
if (isWakePath(url.pathname)) {
|
||||
checks.push({
|
||||
code: "openclaw_wake_endpoint_compat_mode",
|
||||
level: "info",
|
||||
message: "Endpoint targets /hooks/wake; adapter will use OpenClaw wake compatibility payload (text/mode).",
|
||||
hint: "For structured Paperclip JSON payloads, use a mapped webhook endpoint such as /hooks/paperclip.",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
pushDeploymentDiagnostics(checks, ctx, url);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue