fix(auth): lazy-load provider oauth helpers

This commit is contained in:
Vincent Koc
2026-03-18 13:40:28 -07:00
parent 6ebcd853be
commit 91d37ccfc3
12 changed files with 53 additions and 15 deletions

View File

@@ -535,7 +535,12 @@ function recordPluginError(params: {
logPrefix: string;
diagnosticMessagePrefix: string;
}) {
const errorText = String(params.error);
const errorText =
process.env.OPENCLAW_PLUGIN_LOADER_DEBUG_STACKS === "1" &&
params.error instanceof Error &&
typeof params.error.stack === "string"
? params.error.stack
: String(params.error);
const deprecatedApiHint =
errorText.includes("api.registerHttpHandler") && errorText.includes("is not a function")
? "deprecated api.registerHttpHandler(...) was removed; use api.registerHttpRoute(...) for plugin-owned routes or registerPluginHttpRoute(...) for dynamic lifecycle routes"