Skip to content

Fix EMPTY mode validation, hook null-checks, and Javadoc accuracy#232

Merged
edburns merged 11 commits into
mainfrom
copilot/reference-impl-sync-37-new-commits
May 27, 2026
Merged

Fix EMPTY mode validation, hook null-checks, and Javadoc accuracy#232
edburns merged 11 commits into
mainfrom
copilot/reference-impl-sync-37-new-commits

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 27, 2026


Before the change?

  • EMPTY mode validation error message only mentions CopilotHome, misleading callers about the fix when CliUrl is also accepted.
  • resumeSession() in EMPTY mode does not validate that availableTools is supplied, allowing callers to bypass the isolation guarantees.
  • Hook handler dispatch unconditionally calls .thenApply() on the returned CompletableFuture, causing a NullPointerException if a handler returns null.
  • SessionConfig and ResumeSessionConfig Javadoc claims the SDK auto-defaults EMPTY-mode options (skipCustomInstructions, customAgentsLocalOnly, coauthorEnabled, manageScheduleEnabled), but no wiring exists to propagate them.
  • ResumeSessionConfig clear* methods have malformed Javadoc (@return on same line as summary).
  • CopilotClientMode.EMPTY Javadoc references "a session filesystem" instead of the actual CliUrl configuration knob.

After the change?

  • Error message now mentions both CopilotHome and CliUrl as valid persistence options.
  • resumeSession() validates availableTools in EMPTY mode, matching createSession() behavior.
  • All hook dispatch paths null-check the handler return value and treat null as CompletableFuture.completedFuture(null).
  • Javadoc for EMPTY-mode config options updated to clearly state they are reserved for future wire protocol support and currently have no runtime effect.
  • ResumeSessionConfig clear* Javadoc reformatted to standard multi-line tag style.
  • CopilotClientMode.EMPTY Javadoc updated to reference CopilotClientOptions#getCliUrl().

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

Copilot AI and others added 3 commits May 27, 2026 19:13
…y mode hardening from reference implementation

- Add PostToolUseFailureHookInput, PostToolUseFailureHookOutput, and PostToolUseFailureHandler
- Wire postToolUseFailure hook in SessionHooks and CopilotSession
- Add CopilotClientMode enum (EMPTY vs COPILOT_CLI)
- Add mode field to CopilotClientOptions with COPILOT_CLI default
- Add ToolSet builder class for source-qualified tool filter patterns
- Add BuiltInTools constants (ISOLATED set)
- Add Empty mode validation: requires copilotHome, requires availableTools per session
- Set toolFilterPrecedence=excluded in Empty mode for both create and resume
- Add skipCustomInstructions, customAgentsLocalOnly, coauthorEnabled, manageScheduleEnabled to SessionConfig and ResumeSessionConfig
- Add RUNTIME_INSTRUCTIONS to SystemPromptSections
- Add factory methods and feedback field to PermissionRequestResult
- Add toolFilterPrecedence to CreateSessionRequest and ResumeSessionRequest

Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
…esult

Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
…om.xml CLI version, and update scripts/codegen @github/copilot version

Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Copilot AI changed the title [WIP] Sync reference implementation with 37 new commits from Copilot SDK Port multi-tenancy hardening, post-tool-use-failure hook, and ToolSet from reference implementation May 27, 2026
Copilot AI requested a review from edburns May 27, 2026 19:28
@edburns edburns marked this pull request as ready for review May 27, 2026 20:03
Copilot AI review requested due to automatic review settings May 27, 2026 20:03
Auto-committed by codegen-check workflow.
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label May 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Ports several security- and extensibility-related updates from the reference implementation into the Java SDK, primarily introducing a safer multi-tenant defaulting strategy (EMPTY mode), additional hook coverage for tool failures, and a typed ToolSet builder for source-qualified tool filtering.

Changes:

  • Add CopilotClientMode (including EMPTY) and enforce stricter session tool allowlisting behavior in EMPTY mode.
  • Add post-tool-use-failure hook types/handler and dispatch wiring via SessionHooks/CopilotSession.
  • Sync codegen + generated RPC/events to @github/copilot@^1.0.55-5 and update .lastmerge.
Show a summary per file
File Description
src/test/java/com/github/copilot/ToolSetTest.java Unit tests for ToolSet source-qualified pattern building and validation.
src/test/java/com/github/copilot/PermissionRequestResultTest.java Unit tests for new PermissionRequestResult factories + feedback serialization.
src/test/java/com/github/copilot/CopilotClientModeTest.java Unit tests for CopilotClientMode defaults and EMPTY-mode validation.
src/main/java/com/github/copilot/rpc/ToolSet.java New typed builder for tool filter patterns (builtin:*, mcp:*, custom:*).
src/main/java/com/github/copilot/rpc/SystemPromptSections.java Add RUNTIME_INSTRUCTIONS system prompt section constant.
src/main/java/com/github/copilot/rpc/SessionHooks.java Add onPostToolUseFailure hook support + hasHooks() update.
src/main/java/com/github/copilot/rpc/SessionConfig.java Add EMPTY-mode-related config flags (skip custom instructions, etc.).
src/main/java/com/github/copilot/rpc/ResumeSessionRequest.java Add toolFilterPrecedence field for resume wire request.
src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java Add EMPTY-mode-related config flags for resume configuration.
src/main/java/com/github/copilot/rpc/PostToolUseFailureHookOutput.java New hook output DTO for tool-failure hook additional context.
src/main/java/com/github/copilot/rpc/PostToolUseFailureHookInput.java New hook input DTO for tool-failure hook payload.
src/main/java/com/github/copilot/rpc/PostToolUseFailureHandler.java New functional interface for post-tool-use-failure hook handling.
src/main/java/com/github/copilot/rpc/PermissionRequestResult.java Add feedback and convenience factory methods (approveOnce, reject, etc.).
src/main/java/com/github/copilot/rpc/CreateSessionRequest.java Add toolFilterPrecedence field for create wire request.
src/main/java/com/github/copilot/rpc/CopilotClientOptions.java Add mode option (default COPILOT_CLI) and accessors.
src/main/java/com/github/copilot/rpc/CopilotClientMode.java New enum defining defaulting strategy (EMPTY vs COPILOT_CLI).
src/main/java/com/github/copilot/rpc/BuiltInTools.java Add curated BuiltInTools.ISOLATED set for safer tool enablement.
src/main/java/com/github/copilot/CopilotSession.java Dispatch postToolUseFailure hook invocations.
src/main/java/com/github/copilot/CopilotClient.java EMPTY-mode validation and tool-filter precedence wiring for create/resume.
src/generated/java/com/github/copilot/generated/ToolExecutionStartEvent.java Generated: add displayVerbatim to tool execution start event data.
src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone.java Generated: add UI permissions microphone record.
src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation.java Generated: add UI permissions geolocation record.
src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite.java Generated: add UI permissions clipboardWrite record.
src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsCamera.java Generated: add UI permissions camera record.
src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissions.java Generated: add UI permissions aggregate record.
src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUICsp.java Generated: add CSP metadata record for UI resources.
src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUI.java Generated: add UI metadata record for UI resources.
src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMeta.java Generated: add _meta wrapper record for UI resource metadata.
src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResource.java Generated: add UI resource payload record.
src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescriptionMetaUIVisibility.java Generated: enum for tool UI visibility.
src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescriptionMetaUI.java Generated: tool description UI metadata record.
src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescriptionMeta.java Generated: tool description _meta record.
src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescription.java Generated: tool description record.
src/generated/java/com/github/copilot/generated/ToolExecutionCompleteResult.java Generated: add uiResource field to tool execution result.
src/generated/java/com/github/copilot/generated/ToolExecutionCompleteEvent.java Generated: add toolDescription field to tool execution complete event data.
src/generated/java/com/github/copilot/generated/SkillInvokedTrigger.java Generated: enum for skill invocation trigger.
src/generated/java/com/github/copilot/generated/SkillInvokedEvent.java Generated: add source and trigger to skill invoked event data.
src/generated/java/com/github/copilot/generated/SessionPermissionsChangedEvent.java Generated: add permissions-changed session event type.
src/generated/java/com/github/copilot/generated/SessionModelChangeEvent.java Generated: add contextTier to model-change event data.
src/generated/java/com/github/copilot/generated/SessionMcpServerStatusChangedEvent.java Generated: add error to MCP server status changed event data.
src/generated/java/com/github/copilot/generated/SessionEvent.java Generated: register new session event subtypes (hooks/canvas/mcp app).
src/generated/java/com/github/copilot/generated/SessionErrorEvent.java Generated: add serviceRequestId for CAPI correlation.
src/generated/java/com/github/copilot/generated/SessionCompactionCompleteEvent.java Generated: add serviceRequestId for compaction correlation.
src/generated/java/com/github/copilot/generated/SessionCanvasRegistryChangedEvent.java Generated: add canvas registry changed event type.
src/generated/java/com/github/copilot/generated/SessionCanvasOpenedEvent.java Generated: add canvas opened event type.
src/generated/java/com/github/copilot/generated/SessionAutopilotObjectiveChangedEvent.java Generated: add autopilot objective changed event type.
src/generated/java/com/github/copilot/generated/ModelCallFailureEvent.java Generated: add serviceRequestId for CAPI correlation.
src/generated/java/com/github/copilot/generated/McpServerTransport.java Generated: add MCP server transport enum.
src/generated/java/com/github/copilot/generated/McpServersLoadedServer.java Generated: add transport + plugin metadata to MCP servers loaded.
src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteToolMetaUI.java Generated: add MCP app tool call UI meta record.
src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteToolMeta.java Generated: add MCP app tool call meta record.
src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteEvent.java Generated: add MCP app tool call complete event type.
src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteError.java Generated: add MCP app tool call error record.
src/generated/java/com/github/copilot/generated/HookProgressEvent.java Generated: add hook progress event type.
src/generated/java/com/github/copilot/generated/ExternalToolRequestedEvent.java Generated: add workingDirectory to external tool requested event data.
src/generated/java/com/github/copilot/generated/CapabilitiesChangedUI.java Generated: add MCP Apps + canvases capability flags.
src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvasAction.java Generated: add canvas action record (registry event schema).
src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvas.java Generated: add canvas registry entry record.
src/generated/java/com/github/copilot/generated/CanvasOpenedAvailability.java Generated: add canvas opened availability enum.
src/generated/java/com/github/copilot/generated/AutopilotObjectiveChangedStatus.java Generated: add autopilot objective status enum.
src/generated/java/com/github/copilot/generated/AutopilotObjectiveChangedOperation.java Generated: add autopilot objective operation enum.
src/generated/java/com/github/copilot/generated/AssistantUsageEvent.java Generated: add serviceRequestId for usage correlation.
src/generated/java/com/github/copilot/generated/AssistantMessageEvent.java Generated: add serviceRequestId for message correlation.
src/generated/java/com/github/copilot/generated/rpc/WorkspaceDiffMode.java Generated RPC: add workspace diff mode enum.
src/generated/java/com/github/copilot/generated/rpc/WorkspaceDiffFileChangeType.java Generated RPC: add workspace diff file change type enum.
src/generated/java/com/github/copilot/generated/rpc/WorkspaceDiffFileChange.java Generated RPC: add workspace diff file change record.
src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesGetWorkspaceResult.java Generated RPC: add clientName to workspace result.
src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesDiffResult.java Generated RPC: add workspace diff result record.
src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesDiffParams.java Generated RPC: add workspace diff params record.
src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesApi.java Generated RPC: add diff(...) method in session.workspaces API.
src/generated/java/com/github/copilot/generated/rpc/SessionsEnrichMetadataResult.java Generated RPC: clarify enrich-metadata semantics in docs.
src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java Generated RPC: add canvas namespace to session-scoped RPC client.
src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetAllowAllResult.java Generated RPC: add allow-all permissions set result record.
src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetAllowAllParams.java Generated RPC: add allow-all permissions set params record.
src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsGetAllowAllResult.java Generated RPC: add allow-all permissions get result record.
src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsGetAllowAllParams.java Generated RPC: add allow-all permissions get params record.
src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsApi.java Generated RPC: add get/set allow-all permission endpoints.
src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateParams.java Generated RPC: add toolFilterPrecedence to options update params.
src/generated/java/com/github/copilot/generated/rpc/SessionMetadataSnapshotResult.java Generated RPC: add clientName to metadata snapshot.
src/generated/java/com/github/copilot/generated/rpc/SessionMetadata.java Generated RPC: add clientName and isDetached to session metadata.
src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsSetHostContextParams.java Generated RPC: add MCP Apps set host context params.
src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsReadResourceResult.java Generated RPC: add MCP Apps read resource result.
src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsReadResourceParams.java Generated RPC: add MCP Apps read resource params.
src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsListToolsResult.java Generated RPC: add MCP Apps list tools result.
src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsListToolsParams.java Generated RPC: add MCP Apps list tools params.
src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsGetHostContextResult.java Generated RPC: add MCP Apps get host context result.
src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsGetHostContextParams.java Generated RPC: add MCP Apps get host context params.
src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsDiagnoseResult.java Generated RPC: add MCP Apps diagnose result.
src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsDiagnoseParams.java Generated RPC: add MCP Apps diagnose params.
src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsCallToolParams.java Generated RPC: add MCP Apps call tool params.
src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsApi.java Generated RPC: add session.mcp.apps namespace methods.
src/generated/java/com/github/copilot/generated/rpc/SessionMcpApi.java Generated RPC: expose .apps under session.mcp.
src/generated/java/com/github/copilot/generated/rpc/SessionCanvasOpenResult.java Generated RPC: add session.canvas open result record.
src/generated/java/com/github/copilot/generated/rpc/SessionCanvasOpenParams.java Generated RPC: add session.canvas open params record.
src/generated/java/com/github/copilot/generated/rpc/SessionCanvasListResult.java Generated RPC: add session.canvas list result record.
src/generated/java/com/github/copilot/generated/rpc/SessionCanvasListParams.java Generated RPC: add session.canvas list params record.
src/generated/java/com/github/copilot/generated/rpc/SessionCanvasListOpenResult.java Generated RPC: add session.canvas listOpen result record.
src/generated/java/com/github/copilot/generated/rpc/SessionCanvasListOpenParams.java Generated RPC: add session.canvas listOpen params record.
src/generated/java/com/github/copilot/generated/rpc/SessionCanvasInvokeActionResult.java Generated RPC: add session.canvas invokeAction result record.
src/generated/java/com/github/copilot/generated/rpc/SessionCanvasInvokeActionParams.java Generated RPC: add session.canvas invokeAction params record.
src/generated/java/com/github/copilot/generated/rpc/SessionCanvasCloseParams.java Generated RPC: add session.canvas close params record.
src/generated/java/com/github/copilot/generated/rpc/SessionCanvasApi.java Generated RPC: add session.canvas namespace methods.
src/generated/java/com/github/copilot/generated/rpc/ServerSessionsApi.java Generated RPC: doc tweak for sessions list params.
src/generated/java/com/github/copilot/generated/rpc/ServerRpc.java Generated RPC: add agentRegistry namespace to server RPC client.
src/generated/java/com/github/copilot/generated/rpc/ServerAgentRegistryApi.java Generated RPC: add agent registry spawn method.
src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateToolFilterPrecedence.java Generated RPC: add tool filter precedence enum.
src/generated/java/com/github/copilot/generated/rpc/OpenCanvasInstance.java Generated RPC: add open canvas instance record.
src/generated/java/com/github/copilot/generated/rpc/ModelBillingTokenPricesLongContext.java Generated RPC: add long-context pricing record.
src/generated/java/com/github/copilot/generated/rpc/ModelBillingTokenPrices.java Generated RPC: update pricing types and add context-max + longContext.
src/generated/java/com/github/copilot/generated/rpc/McpAppsSetHostContextDetailsTheme.java Generated RPC: add MCP Apps host context theme enum (set).
src/generated/java/com/github/copilot/generated/rpc/McpAppsSetHostContextDetailsPlatform.java Generated RPC: add MCP Apps host context platform enum (set).
src/generated/java/com/github/copilot/generated/rpc/McpAppsSetHostContextDetailsDisplayMode.java Generated RPC: add MCP Apps host context display mode enum (set).
src/generated/java/com/github/copilot/generated/rpc/McpAppsSetHostContextDetailsAvailableDisplayMode.java Generated RPC: add MCP Apps available display modes enum (set).
src/generated/java/com/github/copilot/generated/rpc/McpAppsSetHostContextDetails.java Generated RPC: add MCP Apps host context details record (set).
src/generated/java/com/github/copilot/generated/rpc/McpAppsResourceContent.java Generated RPC: add MCP Apps resource content record.
src/generated/java/com/github/copilot/generated/rpc/McpAppsHostContextDetailsTheme.java Generated RPC: add MCP Apps host context theme enum (get).
src/generated/java/com/github/copilot/generated/rpc/McpAppsHostContextDetailsPlatform.java Generated RPC: add MCP Apps host context platform enum (get).
src/generated/java/com/github/copilot/generated/rpc/McpAppsHostContextDetailsDisplayMode.java Generated RPC: add MCP Apps host context display mode enum (get).
src/generated/java/com/github/copilot/generated/rpc/McpAppsHostContextDetailsAvailableDisplayMode.java Generated RPC: add MCP Apps available display modes enum (get).
src/generated/java/com/github/copilot/generated/rpc/McpAppsHostContextDetails.java Generated RPC: add MCP Apps host context details record (get).
src/generated/java/com/github/copilot/generated/rpc/McpAppsDiagnoseServer.java Generated RPC: add MCP Apps diagnose server record.
src/generated/java/com/github/copilot/generated/rpc/McpAppsDiagnoseCapability.java Generated RPC: add MCP Apps diagnose capability record.
src/generated/java/com/github/copilot/generated/rpc/DiscoveredMcpServerType.java Generated RPC: doc tweak for MCP server type.
src/generated/java/com/github/copilot/generated/rpc/DiscoveredMcpServer.java Generated RPC: doc tweak for MCP server transport description.
src/generated/java/com/github/copilot/generated/rpc/DiscoveredCanvas.java Generated RPC: add discovered canvas record.
src/generated/java/com/github/copilot/generated/rpc/CanvasSessionContext.java Generated RPC: add canvas session context record.
src/generated/java/com/github/copilot/generated/rpc/CanvasOpenResult.java Generated RPC: add canvas provider open result record.
src/generated/java/com/github/copilot/generated/rpc/CanvasOpenParams.java Generated RPC: add canvas provider open params record.
src/generated/java/com/github/copilot/generated/rpc/CanvasInvokeActionParams.java Generated RPC: add canvas provider invoke action params record.
src/generated/java/com/github/copilot/generated/rpc/CanvasInstanceAvailability.java Generated RPC: add canvas instance availability enum.
src/generated/java/com/github/copilot/generated/rpc/CanvasHostContextCapabilities.java Generated RPC: add canvas host capabilities record.
src/generated/java/com/github/copilot/generated/rpc/CanvasHostContext.java Generated RPC: add canvas host context record.
src/generated/java/com/github/copilot/generated/rpc/CanvasCloseParams.java Generated RPC: add canvas provider close params record.
src/generated/java/com/github/copilot/generated/rpc/CanvasAction.java Generated RPC: add canvas action record.
src/generated/java/com/github/copilot/generated/rpc/AgentRegistrySpawnPermissionMode.java Generated RPC: add agent registry spawn permission mode enum.
src/generated/java/com/github/copilot/generated/rpc/AgentRegistrySpawnParams.java Generated RPC: add agent registry spawn params record.
scripts/codegen/package.json Bump reference implementation npm dependency to ^1.0.55-5.
scripts/codegen/package-lock.json Lockfile update for @github/copilot@1.0.55-5 and platform packages.
pom.xml Sync recorded reference implementation version property to ^1.0.55-5.
.lastmerge Update last merged reference implementation commit hash.

Copilot's findings

Files not reviewed (1)
  • scripts/codegen/package-lock.json: Language not supported
  • Files reviewed: 22/140 changed files
  • Comments generated: 7

Comment thread src/main/java/com/github/copilot/CopilotClient.java
Comment thread src/main/java/com/github/copilot/CopilotClient.java Outdated
Comment thread src/main/java/com/github/copilot/CopilotSession.java
Comment thread src/main/java/com/github/copilot/rpc/SessionConfig.java
Comment thread src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java
Comment thread src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java
Comment thread src/main/java/com/github/copilot/rpc/CopilotClientMode.java
- CapabilitiesChangedUI now has 3 fields (elicitation, mcpApps, canvases);
  update test to pass null for the two new fields
- AssistantMessageEventData now has 16 fields (added parentToolCallId);
  update test to pass null for the new field

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Commit pushed: d9f6c85

Generated by Codegen Agentic Fix

…avadoc

- Update EMPTY mode error message to mention both CopilotHome and CliUrl
- Add availableTools validation in resumeSession() for EMPTY mode
- Add null-checks for hook handler return values to prevent NPE
- Fix misleading Javadoc in SessionConfig/ResumeSessionConfig for
  EMPTY-mode options that are not yet wired to the protocol
- Fix Javadoc formatting in ResumeSessionConfig clear* methods
- Update CopilotClientMode.EMPTY Javadoc to match actual validation

Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Copilot AI changed the title Port multi-tenancy hardening, post-tool-use-failure hook, and ToolSet from reference implementation Fix EMPTY mode validation, hook null-checks, and Javadoc accuracy May 27, 2026
edburns added 4 commits May 27, 2026 14:01
Update 8 Javadoc blocks in SessionConfig and ResumeSessionConfig that
incorrectly claimed skipCustomInstructions, customAgentsLocalOnly,
coauthorEnabled, and manageScheduleEnabled were not yet propagated
to the wire protocol. All reference implementations (Node.js, .NET, Go)
propagate these via session.options.update.
Implement updateSessionOptionsForMode() in CopilotClient to send
session.options.update RPC call after session creation and resumption,
matching the behavior of the Node.js, .NET, and Go reference
implementations. In EMPTY mode, safe defaults are applied. In
COPILOT_CLI mode, only explicitly-set fields are forwarded.

Includes 8 unit tests covering both modes and partial overrides.
@edburns edburns merged commit 6a6da5a into main May 27, 2026
11 checks passed
@edburns edburns deleted the copilot/reference-impl-sync-37-new-commits branch May 27, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[reference-impl-sync] Reference Implementation sync: 37 new commits (2026-05-27)

3 participants