Importing a skill from the cloud market failed with
'SyntaxError: No number after minus sign in JSON at position 1 (line 1 column 2)'
because the WebPlatformAdapter hard-coded res.json() for every response, while
the same IPC handler on Electron already routes by Content-Type / .json suffix
(see apps/desktop/main/ipc/window.ts: '支持 JSON 和纯文本/Markdown').
The Electron path handled skill bodies (.md) correctly; the Web path only
worked for the catalog (skill.json). Aligning the Web adapter with the same
Content-Type / .json-suffix rule fixes both fetchCloudCatalog and
importFromCloud at once, with no new abstraction.
An ambient npm_config_runtime=electron (common in Electron dev shells
and CI) makes bare prebuild-install "succeed" with an Electron-ABI
binding, bypassing the source-build fallbacks and leaving the CLI
unable to start. Pin -r node -t to the current system Node instead.
Co-authored-by: Cursor <cursoragent@cursor.com>
Prepending all of System32 to PATH made WSL bash.EXE shadow Git Bash,
breaking every later shell: bash step (first hit: dtolnay/rust-toolchain);
now only tar.exe is exposed. Passing --target after -- hid the triple
from napi, which then emitted a host-named darwin-arm64 artifact for the
x64 build; pass --target to napi directly instead.
Co-authored-by: Cursor <cursoragent@cursor.com>
prebuild-install was invoked with -r napi, but better-sqlite3 only
publishes per-ABI node/electron prebuilds, so the download branch always
failed and every run fell back to a ~1.5min node-gyp source build.
Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid switching legacy DELETE-journal session databases to WAL from readonly validation paths. This prevents sync existence checks from treating valid databases as unreadable and deleting them.