Skip to content

Add built-in plugin directory support - #2330

Merged
lutzroeder merged 4 commits into
mainfrom
builtin-plugin-directories
Aug 14, 2026
Merged

Add built-in plugin directory support#2330
lutzroeder merged 4 commits into
mainfrom
builtin-plugin-directories

Conversation

@lutzroeder

Copy link
Copy Markdown
Member

Summary

  • add host-bundled built-in plugin directory startup options across the SDKs
  • register the complete built-in plugin path set with plugins.builtin.set after connect/protocol verification and before sessions can be created
  • document the distinction between ordinary --plugin-dir loading and trusted host-bundled plugin registration

Closes #2327

Validation

  • cargo test --features test-support --test builtin_plugin_directories_test

@lutzroeder
lutzroeder requested a review from a team as a code owner August 13, 2026 19:53
Copilot AI balanced review requested due to automatic review settings August 13, 2026 19:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds trusted, host-bundled plugin directory registration across all supported SDKs.

Changes:

  • Adds absolute-path startup options for six SDKs.
  • Registers directories through plugins.builtin.set after protocol verification.
  • Adds tests and documentation for the new behavior.
Show a summary per file
File Description
rust/src/lib.rs Adds Rust option and startup RPC.
rust/tests/builtin_plugin_directories_test.rs Tests Rust registration and validation.
python/copilot/client.py Adds Python option and startup RPC.
python/test_client.py Tests Python behavior.
nodejs/src/types.ts Defines the TypeScript option.
nodejs/src/client.ts Validates paths and registers plugins.
nodejs/test/client.test.ts Tests Node.js behavior.
java/src/main/java/com/github/copilot/rpc/CopilotClientOptions.java Adds Java configuration API.
java/src/main/java/com/github/copilot/CopilotClient.java Registers paths during Java startup.
java/src/test/java/com/github/copilot/BuiltinPluginDirectoriesTest.java Tests Java behavior.
go/types.go Defines the Go option.
go/client.go Validates and registers Go paths.
go/client_test.go Tests Go behavior.
dotnet/src/Types.cs Defines and clones the .NET option.
dotnet/src/Client.cs Validates and registers .NET paths.
dotnet/test/Unit/CloneTests.cs Tests option cloning.
dotnet/test/Unit/GitHubTelemetryTests.cs Tests .NET startup registration.
docs/features/plugin-directories.md Documents trusted plugin directories.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 18/18 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread docs/features/plugin-directories.md Outdated
Comment thread go/client.go
…ories

# Conflicts:
#	java/sdk/src/main/java/com/github/copilot/CopilotClient.java
#	java/sdk/src/test/java/com/github/copilot/BuiltinPluginDirectoriesTest.java
@github-actions

This comment has been minimized.

Use a plain code fence for the single-language docs example and clear Go connection state when built-in plugin registration fails so reconnect can start cleanly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: cd609bcf-9f69-4d40-960b-dbd12e90158a
@github-actions

This comment has been minimized.

Comment thread dotnet/src/Client.cs Fixed
Comment thread dotnet/test/Unit/GitHubTelemetryTests.cs Fixed
Comment thread dotnet/test/Unit/GitHubTelemetryTests.cs Fixed
Make the built-in plugin path validation filter explicit and avoid Path.Combine in the test paths flagged by code scanning.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: cd609bcf-9f69-4d40-960b-dbd12e90158a
@github-actions

Copy link
Copy Markdown
Contributor

Cross-SDK Consistency Review ✅

This PR adds builtinPluginDirectories / builtin_plugin_directories across all six SDKs (Node.js, Python, Go, .NET, Java, Rust). The implementation is consistent across languages:

Aspect Status
Option naming ✅ Follows each language's convention (builtinPluginDirectories, builtin_plugin_directories, BuiltinPluginDirectories)
Absolute path validation ✅ All SDKs validate at construction/init time
Validation error type ✅ Each SDK uses its idiomatic error (panic in Go's NewClient matches existing patterns there; exceptions/errors elsewhere)
RPC call ✅ All SDKs call plugins.builtin.set with {"paths": [...]}
Timing ✅ All SDKs register before sessions can be created
Failure handling ✅ All SDKs clean up on RPC failure
Tests ✅ Both Java and Rust have new dedicated test files

No consistency gaps found. The PR maintains full feature parity across all SDK implementations.

Generated by SDK Consistency Review Agent for #2330 · sonnet46 32 AIC · ⌖ 5.43 AIC · ⊞ 6.6K ·

@lutzroeder
lutzroeder enabled auto-merge August 13, 2026 22:48
@lutzroeder
lutzroeder added this pull request to the merge queue Aug 14, 2026
Merged via the queue into main with commit 1935fd3 Aug 14, 2026
152 of 156 checks passed
@lutzroeder
lutzroeder deleted the builtin-plugin-directories branch August 14, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add SDK support for registering built-in plugin directories

4 participants