Bridge/npm adapter trim - #5
Merged
Merged
Conversation
Update @connectrpc/connect and connect-node to 1.7.0 and @bufbuild/protobuf to 1.10.1; @cursor/sdk remains at 1.0.18 (latest on npm).
Remove runtime-only TypeScript declarations, Python-style store callbacks, and e2e error survivors; slim the launcher and local store wiring. Reframe docs so bridge/ is maintained here for Go over npm, not synced from Python.
Resolve the launcher from PATH or explicit env overrides; remove setup-bridge, embedded tarball bootstrap, and in-repo bridge discovery. Vendor @anysphere/proto for self-contained npm installs and document publishing steps.
There was a problem hiding this comment.
Pull request overview
This PR shifts the Go SDK’s local-agent bridge from a repo-local bridge/ runtime (installed via npm install in-tree) to a globally installable npm-distributed adapter (@cursor-go-sdk/cursor-sdk-bridge) that exposes a cursor-sdk-bridge binary on PATH, and updates docs/CI accordingly.
Changes:
- Publishable bridge npm package: add package metadata, vendored
@anysphere/proto, and CI PATH wiring forcursor-sdk-bridge. - Simplify Go-side bridge discovery/installation checks to prefer
CURSOR_SDK_BRIDGE_BIN,CURSOR_SDK_BRIDGE_ROOT, thenPATH(and remove embedded-bridge support + setup helper). - Trim bridge dist artifacts and remove unsupported “custom” host store callback wiring in the Node adapter.
Reviewed changes
Copilot reviewed 27 out of 99 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| SECURITY.md | Updates security scope language to include the Node adapter in bridge/. |
| references/README.md | Adds a reference doc for the bridge trim inventory. |
| references/go-api-map.md | Updates bridge discovery + prerequisite instructions to the npm-installed bridge. |
| references/bridge.md | Reframes bridge as an npm prerequisite and updates env/discovery/maintenance notes. |
| references/bridge-trim.md | New inventory documenting retained/removed bridge features for Go. |
| README.md | Updates installation/requirements and bridge setup guidance to npm global/link workflow. |
| internal/connect/connect.go | Updates package doc comment to reflect bridge adapter wording. |
| internal/bridge/version.go | Updates comments to match new bridge packaging/layout. |
| internal/bridge/install.go | Replaces in-repo bridge-root resolution with “binary on PATH / env override” checks. |
| internal/bridge/install_test.go | Updates tests to reflect new ResolvePath behavior (root/PATH). |
| internal/bridge/export_test.go | Removes no-longer-needed test hooks related to module bridge root validation. |
| internal/bridge/embedded.go | Removes embedbridge build-tag implementation. |
| internal/bridge/embedded_stub.go | Removes embedbridge stub implementation. |
| internal/bridge/bridge.go | Simplifies bridge launch config (removes store callback fields) and updates ResolvePath logic. |
| examples/quickstart/main.go | Updates example prerequisites to require cursor-sdk-bridge on PATH. |
| examples/coding-agent-tui/main.go | Updates example prerequisites to require cursor-sdk-bridge on PATH. |
| examples/coding-agent-cli/main.go | Updates example prerequisites to require cursor-sdk-bridge on PATH. |
| examples/basic/main.go | Updates example prerequisites to require cursor-sdk-bridge on PATH. |
| DISCLAIMER.md | Updates project description to reflect the Node adapter architecture. |
| cursor/default.go | Updates EnsureBridgeInstalled docs; default client logic unchanged (still supports URL attach). |
| CONTRIBUTING.md | Updates contributor setup to npm ci && npm link for bridge dev. |
| cmd/setup-bridge/main.go | Removes the old setup-bridge helper command. |
| bridge/vendor/README.md | Documents vendored @anysphere/proto purpose and provenance. |
| bridge/vendor/anysphere-proto/package.json | Adds vendored @anysphere/proto package metadata/exports/peer deps. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_store_callback_service_pb.js | Vendored generated proto runtime JS for store callback service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_store_callback_service_pb.d.ts.map | Vendored generated TS types map for store callback service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_store_callback_service_pb.d.ts | Vendored generated TS types for store callback service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_store_callback_service_connect.js | Vendored generated Connect service descriptor JS for store callback service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_store_callback_service_connect.d.ts.map | Vendored generated TS types map for store callback service descriptor. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_store_callback_service_connect.d.ts | Vendored generated TS types for store callback service descriptor. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_errors_pb.js | Vendored generated proto runtime JS for SDK errors. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_errors_pb.d.ts.map | Vendored generated TS types map for SDK errors. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_errors_pb.d.ts | Vendored generated TS types for SDK errors. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_custom_tool_callback_service_pb.js | Vendored generated proto runtime JS for custom tool callback service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_custom_tool_callback_service_pb.d.ts.map | Vendored generated TS types map for custom tool callback service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_custom_tool_callback_service_pb.d.ts | Vendored generated TS types for custom tool callback service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_custom_tool_callback_service_connect.js | Vendored generated Connect service descriptor JS for custom tool callback service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_custom_tool_callback_service_connect.d.ts.map | Vendored generated TS types map for custom tool callback service descriptor. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_custom_tool_callback_service_connect.d.ts | Vendored generated TS types for custom tool callback service descriptor. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_cursor_service_pb.js | Vendored generated proto runtime JS for cursor service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_cursor_service_pb.d.ts.map | Vendored generated TS types map for cursor service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_cursor_service_pb.d.ts | Vendored generated TS types for cursor service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_cursor_service_connect.js | Vendored generated Connect service descriptor JS for cursor service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_cursor_service_connect.d.ts.map | Vendored generated TS types map for cursor service descriptor. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_cursor_service_connect.d.ts | Vendored generated TS types for cursor service descriptor. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_bridge_control_service_pb.js | Vendored generated proto runtime JS for bridge control service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_bridge_control_service_pb.d.ts.map | Vendored generated TS types map for bridge control service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_bridge_control_service_pb.d.ts | Vendored generated TS types for bridge control service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_bridge_control_service_connect.js | Vendored generated Connect service descriptor JS for bridge control service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_bridge_control_service_connect.d.ts.map | Vendored generated TS types map for bridge control service descriptor. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_bridge_control_service_connect.d.ts | Vendored generated TS types for bridge control service descriptor. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_agent_service_pb.d.ts | Vendored generated TS types for agent service (large surface). |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_agent_service_connect.js | Vendored generated Connect service descriptor JS for agent service. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_agent_service_connect.d.ts.map | Vendored generated TS types map for agent service descriptor. |
| bridge/vendor/anysphere-proto/dist/generated/sdk/v1/sdk_agent_service_connect.d.ts | Vendored generated TS types for agent service descriptor. |
| bridge/README.md | New bridge-package README describing install, layout, and Go discovery order. |
| bridge/PUBLISHING.md | New maintainer-focused publishing guide for the npm package. |
| bridge/package.json | Converts bridge to a publishable npm package with bin, files, and vendored proto dep. |
| bridge/package-lock.json | Updates lockfile for new package metadata and dependency versions/vendor link. |
| bridge/dist/tool-callback-config.d.ts.map | Removes TS declaration map artifact from dist. |
| bridge/dist/tool-callback-config.d.ts | Removes TS declaration artifact from dist. |
| bridge/dist/store-callback-config.js | Removes store-callback config module from dist. |
| bridge/dist/store-callback-config.d.ts.map | Removes TS declaration map artifact from dist. |
| bridge/dist/store-callback-config.d.ts | Removes TS declaration artifact from dist. |
| bridge/dist/server.d.ts.map | Removes TS declaration map artifact from dist. |
| bridge/dist/server.d.ts | Removes TS declaration artifact from dist. |
| bridge/dist/sdk-service.d.ts.map | Removes TS declaration map artifact from dist. |
| bridge/dist/sdk-service.d.ts | Removes TS declaration artifact from dist. |
| bridge/dist/sdk-error-interceptor.d.ts.map | Removes TS declaration map artifact from dist. |
| bridge/dist/sdk-error-interceptor.d.ts | Removes TS declaration artifact from dist. |
| bridge/dist/sdk-converters.d.ts.map | Removes TS declaration map artifact from dist. |
| bridge/dist/sdk-converters.d.ts | Removes TS declaration artifact from dist. |
| bridge/dist/registry.d.ts.map | Removes TS declaration map artifact from dist. |
| bridge/dist/registry.d.ts | Removes TS declaration artifact from dist. |
| bridge/dist/process-error-survivors.js | Removes process “survivor” shim from dist. |
| bridge/dist/process-error-survivors.d.ts.map | Removes TS declaration map artifact from dist. |
| bridge/dist/process-error-survivors.d.ts | Removes TS declaration artifact from dist. |
| bridge/dist/index.js | Removes dist barrel export entrypoint. |
| bridge/dist/index.d.ts.map | Removes TS declaration map artifact from dist. |
| bridge/dist/index.d.ts | Removes TS declaration artifact from dist. |
| bridge/dist/constants.d.ts.map | Removes TS declaration map artifact from dist. |
| bridge/dist/constants.d.ts | Removes TS declaration artifact from dist. |
| bridge/dist/bridge-local-agent-store.js | Disables unsupported local.store type custom (host callback) for Go adapter. |
| bridge/dist/bridge-local-agent-store.d.ts.map | Removes TS declaration map artifact from dist. |
| bridge/dist/bridge-local-agent-store.d.ts | Removes TS declaration artifact from dist. |
| bridge/dist/bridge-custom-tools.d.ts.map | Removes TS declaration map artifact from dist. |
| bridge/dist/bridge-custom-tools.d.ts | Removes TS declaration artifact from dist. |
| bridge/dist/bin/cursor-sdk-bridge.js | Updates CLI to drop store callback flags/env and simplify startup behavior. |
| bridge/dist/bin/cursor-sdk-bridge.d.ts.map | Removes TS declaration map artifact from dist. |
| bridge/dist/bin/cursor-sdk-bridge.d.ts | Removes TS declaration artifact from dist. |
| bridge/dist/auth.d.ts.map | Removes TS declaration map artifact from dist. |
| bridge/dist/auth.d.ts | Removes TS declaration artifact from dist. |
| AGENTS.md | Updates contributor/agent notes to match new bridge packaging and dev workflow. |
| .github/workflows/ci.yml | Installs bridge deps and adds bridge/bin to PATH so Go tests can launch it in CI. |
Files not reviewed (1)
- bridge/package-lock.json: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,4 +1,4 @@ | |||
| // Package connect implements the Connect JSON protocol used by cursor-sdk-bridge. | |||
| // Package connect implements the Connect JSON protocol spoken with the bridge/ adapter. | |||
Replace vendored @anysphere/proto and hand-maintained dist/ with src/ + tsc, owned bridge/proto/, and generated gen/ts/; gitignore dist and update docs/CI for npm run build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
go test ./...go vet ./...cd bridge && npm ci(if bridge files changed)CURSOR_API_KEY(if agent/runtime behavior changed)Checklist
node_modules/committed