Commit 9149379
authored
Java SDK: sync reference implementation to
## XL — Regenerated RPC types from `@github/copilot schema` update (288 files)
Upgrading the reference implementation version from `^1.0.49-1` to `^1.0.52-1`
required updating the `@github/copilot` npm package in `scripts/codegen/`, which
brought in schema changes. The Java code generator (`java.ts`) was updated to
handle these schema changes, and all generated types were regenerated.
- 222 new generated RPC types under `src/generated/java/` (new API surfaces:
`SessionEventLogApi`, `SessionMetadataApi`, `SessionQueueApi`, `SessionTasksApi`,
`SessionUiApi`, `SessionOptionsApi`, `SessionLspApi`, `SessionMcpApi`,
`SessionScheduleApi`, permission `location/path/URL` config types, and more)
- 66 modified generated files (field type changes, new fields, new enum values)
- Updated `scripts/codegen/java.ts` to handle new schema patterns
- Updated `scripts/codegen/package.json` and `package-lock.json`
These are all machine-generated. Human review should focus on the `java.ts`
codegen script changes; the generated output can be spot-checked.
## M — Port `preMcpToolCall` hook (6 files)
New hook that fires before an MCP tool call is dispatched to an MCP server,
giving SDK consumers the ability to inspect or modify the call.
- New: `PreMcpToolCallHandler.java` (functional interface)
- New: `PreMcpToolCallHookInput.java` (input DTO with server name, tool name, arguments)
- New: `PreMcpToolCallHookOutput.java` (output DTO with allow/deny/modify)
- Modified: `SessionHooks.java` (added onPreMcpToolCall field, getter, setter, hasHooks check)
- Modified: `CopilotSession.java` (dispatch "preMcpToolCall" hook name to handler)
- New test: `PreMcpToolCallHookTest.java` (unit tests for the new hook)
## S — Fix `PingResponse` timestamp type (2 files)
The CLI server changed the ping response timestamp from a numeric epoch
(long) to an ISO 8601 string. Updated `PingResponse` record field from
`long timestamp` to `String timestamp`, and updated `CopilotClientTest`
accordingly.
## S — `SessionLogParams` constructor change (1 file)
`SessionLogParams` gained new nullable fields in the schema. Updated the
call site in `CopilotSession.log()` to pass the additional null parameters.
## S — Test maintenance (4 files)
- `McpAndAgentsTest`: new E2E test for MCP and agents scenario
- `PermissionsTest`: minor test adjustment
- `SessionEventDeserializationTest`: updated assertions to match new generated types
- `GeneratedRpcRecordsCoverageTest`: updated coverage list for new generated types
## S — Infra / metadata (3 files)
- `.lastmerge`: updated to `f4d22d70016c377881d86e4c77f8a3f93746ffae`
- `pom.xml`: ref-impl version property updated to `^1.0.52-1`
- `.github/workflows/copilot-setup-steps.yml`: bump gh-aw setup-cli to `v0.74.8`^1.0.52-1, add preMcpToolCall hook, fix PingResponse timestamp type (#1389)1 parent 5e4f490 commit 9149379
308 files changed
Lines changed: 8885 additions & 235 deletions
File tree
- .github/workflows
- java
- scripts/codegen
- src
- generated/java/com/github/copilot/sdk/generated
- rpc
- main/java/com/github/copilot/sdk
- json
- test/java/com/github/copilot/sdk
- generated
- rpc
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
40 | 52 | | |
41 | 53 | | |
42 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
43 | 59 | | |
44 | 60 | | |
45 | 61 | | |
| |||
102 | 118 | | |
103 | 119 | | |
104 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
105 | 126 | | |
106 | 127 | | |
107 | 128 | | |
| |||
131 | 152 | | |
132 | 153 | | |
133 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
134 | 177 | | |
135 | 178 | | |
136 | 179 | | |
| |||
883 | 926 | | |
884 | 927 | | |
885 | 928 | | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
886 | 942 | | |
887 | 943 | | |
888 | 944 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
0 commit comments