Skip to content

Upstream sync: port 23 new commits (2026-04-13)#72

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/sync-upstream-23-new-commits
Draft

Upstream sync: port 23 new commits (2026-04-13)#72
Copilot wants to merge 3 commits intomainfrom
copilot/sync-upstream-23-new-commits

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 13, 2026

Ports 23 upstream commits from github/copilot-sdk (up to 16f0ba2) into the Java SDK. Minimum CLI version bumped to 1.0.22.


Before the change?

  • MCP server configs used untyped Map<String, Object> — no compile-time safety, no HTTP server support
  • No enableConfigDiscovery option (auto-discovery of .mcp.json, skill dirs)
  • No ModelCapabilitiesOverride — couldn't override vision/token limits per session
  • No Session FS support — callers couldn't provide a custom filesystem backend for session-scoped I/O

After the change?

Typed MCP server configsMcpServerConfig base with two concrete subtypes:

var servers = Map.of(
    "local",  new McpStdioServerConfig().setCommand("node").setArgs(List.of("server.js")).setTools(List.of("*")),
    "remote", new McpHttpServerConfig().setUrl("https://example.com/mcp").setTools(List.of("*"))
);

enableConfigDiscovery on SessionConfig/ResumeSessionConfig — when true, runtime auto-discovers .mcp.json and skill directories from workingDirectory, merged with explicit values.

ModelCapabilitiesOverride — overrides vision/reasoning/token-limit capabilities per session or on model switch:

session.setModel("claude-sonnet-4.5", null, new ModelCapabilitiesOverride()
    .setSupports(new ModelCapabilitiesOverrideSupports().setVision(false))).get();

Session FS — custom filesystem backend for session-scoped file I/O:

var client = new CopilotClient(new CopilotClientOptions()
    .setSessionFs(new SessionFsConfig()
        .setInitialCwd("/workspace")
        .setSessionStatePath(".sessions")
        .setConventions(SessionFsConventions.POSIX)));

var session = client.createSession(new SessionConfig()
    .setOnPermissionRequest(PermissionHandler.APPROVE_ALL)
    .setCreateSessionFsHandler(s -> new MySessionFsHandler(s.getSessionId()))).get();

SessionFsHandler interface covers 13 file operations: readFile, writeFile, appendFile, exists, stat, mkdir, readdir, readdirWithTypes, rm, rename, cp, copyDir, glob.

.lastmerge updated to 16f0ba278ebb25e2cd6326f932d60517ea926431.

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • mvn spotless:apply has been run to format the code
  • mvn clean verify passes locally

Does this introduce a breaking change?

  • Yes
  • No

getMcpServers()/setMcpServers() on SessionConfig, ResumeSessionConfig, CustomAgentConfig and the wire request types changed from Map<String, Object> to Map<String, McpServerConfig>. Callers using raw maps must migrate to McpStdioServerConfig or McpHttpServerConfig.


Copilot AI linked an issue Apr 13, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits April 13, 2026 10:51
}
}).exceptionally(ex -> {
try {
rpc.sendErrorResponse(Long.parseLong(requestId), -32603, ex.getMessage());
} catch (Exception e) {
LOG.log(Level.SEVERE, "Error handling sessionFs." + opName, e);
try {
rpc.sendErrorResponse(Long.parseLong(requestId), -32603, e.getMessage());
Copilot AI changed the title [WIP] Sync upstream with 23 new commits Upstream sync: port 23 new commits (2026-04-13) Apr 13, 2026
Copilot AI requested a review from edburns April 13, 2026 11:11
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.

Upstream sync: 23 new commits (2026-04-13)

2 participants