From 66c47a9aa37b9ecaef5e9a2b60daef23a2226761 Mon Sep 17 00:00:00 2001 From: Fusion future Date: Mon, 11 May 2026 13:09:35 +0800 Subject: [PATCH] fix: use pathToFileURL for Windows path comparison in generate-base-config-schema Summary: - Use Node's pathToFileURL for the base-config schema generator entrypoint guard so Windows backslash paths are recognized correctly. - Keep the schema generation logic unchanged and preserve the current changelog attribution. Verification: - node --import tsx scripts/generate-base-config-schema.ts --check - pnpm build - pnpm check - GitHub CI passed, including Real behavior proof, auto-response, ClawSweeper dispatch, and full repository checks. Co-authored-by: Fusion future <23738961+easyteacher@users.noreply.github.com> --- CHANGELOG.md | 1 + scripts/generate-base-config-schema.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28cd5d6e475..c7c71851d82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -269,6 +269,7 @@ Docs: https://docs.openclaw.ai - Models/config: allow `compat.thinkingFormat` values `qwen` and `qwen-chat-template` for configured OpenAI-compatible Qwen models, preserving them through catalog normalization and mapping `/think` levels to `enable_thinking` or `chat_template_kwargs.enable_thinking`. Fixes #79677. (#79777) Thanks @indulgeback. - Codex app-server: default implicit local stdio app-server permissions to guardian when Codex system requirements disallow the YOLO approval, reviewer, or sandbox value, including hostname-scoped remote sandbox entries, avoiding turn-start failures on managed hosts that permit only reviewed approval or narrower sandboxes. - Plugins/install: run managed npm-root install, uninstall, prune, and repair commands from the managed root without a redundant `--prefix .`, avoiding npm 10.9.3 Arborist crashes on native Windows WhatsApp plugin installs. Fixes #78514. (#78902) Thanks @melihselamett-stack. +- Config/schema/Windows: detect direct execution of the base config schema generator with `pathToFileURL` so Windows paths with backslashes still run the `--check` and `--write` command body. (#52989) Thanks @easyteacher. - Discord/voice: stream ElevenLabs TTS directly into Discord playback and send ElevenLabs latency optimization as the documented query parameter so spoken replies can start sooner. - Discord/voice: keep TTS playback running when another user starts speaking, ignore new capture during playback to avoid feedback loops, and downgrade expected receive-stream aborts to verbose diagnostics. - iMessage: expose native private-API message actions through `imsg rpc` for reactions, edits, unsends, replies, rich sends, attachments, and group management when `imsg status --json` reports the required bridge capabilities. diff --git a/scripts/generate-base-config-schema.ts b/scripts/generate-base-config-schema.ts index 7163d5d664f..8b6aa7796e1 100644 --- a/scripts/generate-base-config-schema.ts +++ b/scripts/generate-base-config-schema.ts @@ -1,4 +1,5 @@ #!/usr/bin/env node +import { pathToFileURL } from "node:url"; import { computeBaseConfigSchemaResponse } from "../src/config/schema-base.js"; export function checkBaseConfigSchema(): void { @@ -12,7 +13,7 @@ if (args.has("--check") && args.has("--write")) { throw new Error("Use either --check or --write, not both."); } -if (import.meta.url === new URL(process.argv[1] ?? "", "file://").href) { +if (import.meta.url === pathToFileURL(process.argv[1] ?? "").href) { checkBaseConfigSchema(); if (args.has("--write")) { console.log("[base-config-schema] runtime-computed; no generated file to write");