fix(openclaw): support /hooks/wake compatibility payload

This commit is contained in:
Dotta
2026-03-05 13:43:37 -06:00
parent 690149d555
commit a05aa99c7e
4 changed files with 291 additions and 10 deletions

View File

@@ -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);