Skip to content

Alternative SDK sources #4

@DanInProgress

Description

@DanInProgress

Note

These are mostly my ramblings/notes while investigating for my own uses. I leave them here in hopes that they might be useful to others.

After some further evalautation of the protocols/frontend code, the LSP and the Extension
seem to be very tightly coupled, with functionality moving from the extension to the LSP sort of adhoc as a need for native/performance-orientated code is identified.

Given this, it's feeling like the protobuf definitions alone are sufficient for only a very limited set of intended use-cases.

Background

Bit of background on me: My Job has bought in on windsurf, and I'm making the best of what they will provide.

My hope was to create a windsurf equivalent to the cursor-agent, with programatic invocation of new cascade conversations enabling:

  • small scope parallel file processing
  • harness managed sequential looping (e.g. "ralph"-style loops)

Protocol Changes

Looking at Exafunction's repositories, they've recently made some serious changes to their frontends and broken support for many of their existing integrations. For example:

  • all of their source-available integrations (e.g. windsurf.el, windsurf.nvim, windsurf-vscode, etc.) are no longer compatible with the latest version of the LSP.
  • windsurf.vim and WindsurfVisualStudio have had the version of the LSP they use pinned to an old version.
  • the latest versions of the jetbrains plugin are no longer available in the public repo.
  • the webchat frontend that was previously bundled with the LSP appears to have been removed (this was the basis for using cascade with vim/emacs/visual studio)

As they have made these changes, they've made pretty radical changes to the boundary between the LSP and the extension. More of the tool-enablement and response parsing has been moved to the extension, and more dedicated batch processing procedures have been added to the LSP.

Some avenues of exploration

Unbundled App Code

Looks like the current version of the mac app has plenty of unpacked code in it, so we might have additional options for accessing unminified extension code.

/Applications/Windsurf.app/Contents/Resources/app/$ rg 'proto3' --only-matching --files-with-matches

$ pwd
/Applications/Windsurf.app/Contents/Resources/app/
$ rg 'proto3' --only-matching --files-with-matches
node_modules/@bufbuild/protobuf/dist/cjs/proto2.js
node_modules/@bufbuild/protobuf/dist/cjs/binary-encoding.js
node_modules/@bufbuild/protobuf/dist/cjs/proto3.js
node_modules/@bufbuild/protobuf/dist/cjs/create-registry-from-desc.js
node_modules/@bufbuild/protobuf/dist/cjs/create-descriptor-set.js
node_modules/@bufbuild/protobuf/dist/cjs/codegen-info.js
node_modules/@bufbuild/protobuf/dist/cjs/private/field-normalize.js
node_modules/@bufbuild/protobuf/dist/cjs/private/binary-format.js
node_modules/@bufbuild/protobuf/dist/cjs/private/scalars.js
node_modules/@bufbuild/protobuf/dist/cjs/index.js
node_modules/@bufbuild/protobuf/dist/cjs/google/protobuf/field_mask_pb.js
node_modules/@bufbuild/protobuf/dist/cjs/google/protobuf/timestamp_pb.js
node_modules/@bufbuild/protobuf/dist/cjs/google/protobuf/struct_pb.js
node_modules/@bufbuild/protobuf/dist/cjs/google/protobuf/duration_pb.js
node_modules/@bufbuild/protobuf/dist/cjs/google/protobuf/api_pb.js
node_modules/@bufbuild/protobuf/dist/cjs/google/protobuf/any_pb.js
node_modules/@bufbuild/protobuf/dist/cjs/google/protobuf/source_context_pb.js
node_modules/@bufbuild/protobuf/dist/cjs/google/protobuf/wrappers_pb.js
node_modules/@bufbuild/protobuf/dist/cjs/google/protobuf/descriptor_pb.js
node_modules/@bufbuild/protobuf/dist/cjs/google/protobuf/empty_pb.js
node_modules/@bufbuild/protobuf/dist/cjs/google/protobuf/type_pb.js
node_modules/@bufbuild/protobuf/dist/cjs/message.js
node_modules/@bufbuild/protobuf/dist/cjs/scalar.js
node_modules/@bufbuild/protobuf/dist/esm/proto2.js
node_modules/@bufbuild/protobuf/dist/esm/binary-encoding.js
node_modules/@bufbuild/protobuf/dist/esm/proto3.js
node_modules/@bufbuild/protobuf/dist/esm/create-registry-from-desc.js
node_modules/@bufbuild/protobuf/dist/esm/create-descriptor-set.js
node_modules/@bufbuild/protobuf/dist/esm/codegen-info.js
node_modules/@bufbuild/protobuf/dist/esm/private/field-normalize.js
node_modules/@bufbuild/protobuf/dist/esm/private/binary-format.js
node_modules/@bufbuild/protobuf/dist/esm/private/scalars.js
out/vs/workbench/api/worker/extensionHostWorkerMain.js
out/vs/workbench/api/node/extensionHostProcess.js
node_modules/@bufbuild/protobuf/dist/esm/index.js
node_modules/@bufbuild/protobuf/dist/esm/google/protobuf/field_mask_pb.js
node_modules/@bufbuild/protobuf/dist/esm/google/protobuf/timestamp_pb.js
node_modules/@bufbuild/protobuf/dist/esm/google/protobuf/struct_pb.js
node_modules/@bufbuild/protobuf/dist/esm/google/protobuf/duration_pb.js
node_modules/@bufbuild/protobuf/dist/esm/google/protobuf/api_pb.js
node_modules/@bufbuild/protobuf/dist/esm/google/protobuf/any_pb.js
node_modules/@bufbuild/protobuf/dist/esm/google/protobuf/source_context_pb.js
node_modules/@bufbuild/protobuf/dist/esm/google/protobuf/wrappers_pb.js
node_modules/@bufbuild/protobuf/dist/esm/google/protobuf/descriptor_pb.js
node_modules/@bufbuild/protobuf/dist/esm/google/protobuf/empty_pb.js
node_modules/@bufbuild/protobuf/dist/esm/google/protobuf/type_pb.js
node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/gen/status_pb.js
node_modules/@bufbuild/protobuf/dist/esm/message.js
node_modules/@bufbuild/protobuf/dist/esm/scalar.js
extensions/windsurf/dist/extension.js
out/vs/workbench/workbench.desktop.main.js
node_modules/@connectrpc/connect/dist/esm/protocol-grpc/gen/status_pb.js
node_modules/@exa/chat-client/index.js

Jetbrains Plugin

The jetbrains plugin seems to integrate deeply with many features of the IDE,
it's likely that the classes are architeced/decoupled in a way that would allow
us to patch them or leverage them for our own purposes.

The relevant jars in the plugin classpath:

  • codeium-2.12.5-searchableOptions.jar
  • codeium-2.12.5.jar

And these are distributed along with 85 other jars as part of the plugin.zip,
suggesting that they are not bundled into an uber-jar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions