Commit ba94f95
Update @github/copilot to 1.0.60 (#1597)
* Update @github/copilot to 1.0.60
- Updated nodejs and test harness dependencies
- Re-ran code generators
- Formatted generated code
* Regenerate codegen and adjust tests for 1.0.60
- scripts/codegen/go.ts: also match discriminator method name on the
discriminator property itself, so sum types with a single variant
(e.g. PermissionDecisionNoResult) get the sealing method.
- scripts/codegen/python.ts: add reorderPythonDataclassFields pass that
moves required fields before optional ones (Python dataclass rule).
- Regenerate Go/Python/Java artifacts and adapt E2E tests across all
SDKs to the updated RPC surface.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix lint/format failures in Node and Python e2e tests
- nodejs/test/e2e/rpc_remote.e2e.test.ts: re-run prettier --write to
fix a small indent in waitForCondition call.
- python/e2e/test_rpc_server_e2e.py: move LocalSessionMetadataValue
into its correct alphabetical position in the from copilot.rpc
import block (ruff I001).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix Python codegen so ReasoningSummary import is not shadowed
The 1.0.60 schema introduces OptionsUpdateReasoningSummary and
SessionOpenOptionsReasoningSummary, structurally identical to the shared
ReasoningSummary enum. quicktype's enum-merging path (independent of
combineClasses) collapsed them into a single locally-defined
`class ReasoningSummary(Enum)` that shadowed the import from
session_events at the top of rpc.py. ModelSwitchToRequest.to_dict()
then called `to_enum(ReasoningSummary, x)` against the local class
while session.py constructed values via the imported one, so the
isinstance check inside to_enum failed and the unit test
TestSessionConfigForwarding.test_set_model_sends_correct_rpc broke.
Add a small post-processing step that strips locally-emitted enum
classes whose name and value set exactly match a name imported from
.session_events. The existing aliases at the end of rpc.py
(OptionsUpdateReasoningSummary = ReasoningSummary etc.) now resolve to
the imported enum, restoring isinstance equality across the SDK.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Scope down Go discriminator-method collision detection
The previous change to `goDiscriminatorMethodName` over-broadly flagged
collisions whenever the discriminator property's natural Go name matched the
chosen method name, even on multi-variant unions where the discriminator field
is elided or renamed to `Discriminator` on the emitted variant structs.
The result was 98 unnecessary `Kind()` -> `xxxKind()` method renames across
8 multi-variant unions (PermissionPromptRequest, PermissionDecision,
AgentRegistrySpawnResult, SlashCommandInvocationResult, UserToolSessionApproval,
PermissionsLocationsAddToolApprovalDetails, and the two ApproveFor* variants).
The real natural-name collision case is when the variant struct is a
pre-existing type (already in `ctx.generatedNames`) that retained the
discriminator as a struct field with its natural Go name -- e.g.,
`SessionListEntry`'s `LocalSessionMetadataValue.IsRemote bool` field, which
would clash with an exported `IsRemote() bool` interface method on the union.
This commit narrows the natural-name check to that pre-existing-variant case,
leaving the independent `Discriminator`-rename collision clause unchanged.
Also drops the now-dead `permissionDecisionKind()` helper from the
hand-written `permission_decision_no_result.go`.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 7d6bc92 commit ba94f95
167 files changed
Lines changed: 25769 additions & 4308 deletions
File tree
- dotnet
- src/Generated
- test/E2E
- go
- internal/e2e
- rpc
- java
- scripts/codegen
- src
- generated/java/com/github/copilot/generated
- rpc
- main/java/com/github/copilot
- test/java/com/github/copilot
- generated/rpc
- nodejs
- samples
- src/generated
- test/e2e
- python
- copilot/generated
- e2e
- rust
- src/generated
- tests/e2e
- scripts/codegen
- test/harness
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
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 | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | | - | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
77 | | - | |
| 77 | + | |
| 78 | + | |
78 | 79 | | |
79 | | - | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | 84 | | |
91 | 85 | | |
92 | | - | |
| 86 | + | |
93 | 87 | | |
94 | 88 | | |
95 | | - | |
| 89 | + | |
96 | 90 | | |
97 | 91 | | |
98 | | - | |
| 92 | + | |
99 | 93 | | |
100 | 94 | | |
101 | 95 | | |
102 | 96 | | |
103 | 97 | | |
104 | | - | |
| 98 | + | |
105 | 99 | | |
106 | 100 | | |
107 | 101 | | |
108 | 102 | | |
109 | 103 | | |
110 | | - | |
| 104 | + | |
111 | 105 | | |
112 | 106 | | |
113 | 107 | | |
| |||
241 | 235 | | |
242 | 236 | | |
243 | 237 | | |
244 | | - | |
245 | | - | |
| 238 | + | |
246 | 239 | | |
247 | 240 | | |
248 | 241 | | |
| |||
269 | 262 | | |
270 | 263 | | |
271 | 264 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | 265 | | |
276 | 266 | | |
277 | 267 | | |
| |||
297 | 287 | | |
298 | 288 | | |
299 | 289 | | |
300 | | - | |
| 290 | + | |
301 | 291 | | |
302 | | - | |
| 292 | + | |
303 | 293 | | |
304 | 294 | | |
305 | 295 | | |
| |||
406 | 396 | | |
407 | 397 | | |
408 | 398 | | |
409 | | - | |
| 399 | + | |
410 | 400 | | |
411 | 401 | | |
412 | 402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 54 | | |
62 | 55 | | |
63 | 56 | | |
64 | 57 | | |
65 | 58 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 59 | | |
74 | 60 | | |
75 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
| 224 | + | |
228 | 225 | | |
229 | 226 | | |
230 | 227 | | |
| |||
239 | 236 | | |
240 | 237 | | |
241 | 238 | | |
242 | | - | |
243 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
244 | 242 | | |
245 | 243 | | |
246 | 244 | | |
| |||
289 | 287 | | |
290 | 288 | | |
291 | 289 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | 290 | | |
300 | 291 | | |
301 | 292 | | |
| |||
319 | 310 | | |
320 | 311 | | |
321 | 312 | | |
322 | | - | |
| 313 | + | |
323 | 314 | | |
324 | 315 | | |
325 | 316 | | |
326 | | - | |
| 317 | + | |
327 | 318 | | |
328 | 319 | | |
329 | 320 | | |
| |||
371 | 362 | | |
372 | 363 | | |
373 | 364 | | |
374 | | - | |
| 365 | + | |
375 | 366 | | |
376 | 367 | | |
377 | 368 | | |
| |||
410 | 401 | | |
411 | 402 | | |
412 | 403 | | |
413 | | - | |
| 404 | + | |
414 | 405 | | |
415 | 406 | | |
416 | 407 | | |
| |||
624 | 615 | | |
625 | 616 | | |
626 | 617 | | |
627 | | - | |
| 618 | + | |
628 | 619 | | |
629 | 620 | | |
630 | 621 | | |
631 | 622 | | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | 623 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
326 | | - | |
| 325 | + | |
| 326 | + | |
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| |||
0 commit comments