Working as of 2026-01-30 (Windsurf 1.13.14 / Extension 1.48.2)
- Run
extract_sources.jsto copy the necessary files from your Windsurf build:
pnpm run decompile:extract
- Run
prepare_decompile.jsto format the file for decompilation and extract just the proto/service definitions:
pnpm run decompile:prepare
- Run
build_protos.jsto generate the.protofiles:
pnpm run decompile:build
After a successful run, the WINDSURF_VERSION metadata and generated .proto files are synced into the repo’s canonical protos/ directory.
- Get
chat.jsusing VSCode dev tools from the Windsurf cascade panel. - Place it in this folder as
chat.js. - Format it.
- Run
pnpm exec node build_protos.js ./chat.js. - It will fail with something like
document is not defined on line <LINE>. - Go to
chat.jsand remove everything starting from that line. - Run
pnpm exec node find_services.js(it prints something likemodule.exports = { ... }). - Copy the output and place it at the end of
chat.js. - Run
pnpm exec node build_protos.js ./chat.jsagain. It should produce protos in theprotos/folder.
No need to do it every time; protos are committed to the repo. Use this if something stopped working.