mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 09:03:58 +00:00
* refactor: consolidate exact boolean parsing * test: fix normalization subpath resolution * fix: resolve normalization boolean subpath
11 lines
426 B
TypeScript
11 lines
426 B
TypeScript
// Boolean parameter helpers parse plugin-facing string flags into stable booleans.
|
|
import { parseBoolean } from "../../packages/normalization-core/src/boolean-coercion.js";
|
|
|
|
/** Read loose boolean params from tool input that may arrive as booleans or "true"/"false" strings. */
|
|
export function readBooleanParam(
|
|
params: Record<string, unknown>,
|
|
key: string,
|
|
): boolean | undefined {
|
|
return parseBoolean(params[key]);
|
|
}
|