Commit c8f88c7
Update @github/copilot to 1.0.57-2 (#1517)
* Update @github/copilot to 1.0.57-2
- Updated nodejs and test harness dependencies
- Re-ran code generators
- Formatted generated code
* Synthesize shared anyOf discriminator aliases and exclude hand-written collisions
Follows up on #1515. Adds two pieces of generator hardening on top of the
conditional alias emit that #1515 introduced.
1. `collectGoSharedAnyOfDiscriminatorAliasNames`: detect shared anyOf
unions with a string-const discriminator property and synthesize the
discriminator enum name + per-variant const names so the public
`copilot` alias file re-exports them alongside the union and variant
structs. Without this, schema-shared discriminated unions like
`Attachment` (in the bumped schema) would expose `copilot.Attachment`
and its variant structs but not `copilot.AttachmentType` /
`copilot.AttachmentTypeFile` etc.
2. `collectHandWrittenGoPublicNames`: scan hand-written `go/*.go` files
for exported type/const names and exclude them from the alias file so
schema-shared definitions that happen to share a name with a hand-written
declaration (e.g. `ContextTier`) don't double-declare in the
`copilot` package and break `go build`. Note from #1515 explicitly
flagged `ContextTier` as out-of-scope; this handles it.
On the current 1.0.56 schema the only behavioural change is that the
public `copilot` package now also re-exports the
`UserToolSessionApprovalKind` discriminator enum and its 8 constants
(which the `rpc` package was already exporting). On the bumped 1.0.57+
schema this lets the generator succeed (no more
`assertNoGoRpcSessionEventConflicts` failure) and produces the expected
`Attachment*` alias surface while letting hand-written `ContextTier`
win.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix generated type collisions after Copilot update
Remove handwritten ContextTier definitions now owned by generated schema types, update Attachment type references, and keep generated outputs in sync.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix Rust import generation and Python test import ordering
- Rust generator: merge crate::types imports in api_types.rs so the source matches what rustfmt produces on Linux (joining adjacent use crate::types::... lines). This unbreaks the Codegen Check on CI.
- Python: sort the import block in test_event_forward_compatibility.py to satisfy ruff I001.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix Go session event union decoding
Register shared API union decoders when generating Go session event payload unmarshalling so event data can decode attachments and approvals referenced from the API schema.
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 fa275a0 commit c8f88c7
35 files changed
Lines changed: 3585 additions & 2741 deletions
File tree
- docs/features
- dotnet
- src
- Generated
- test
- E2E
- Unit
- go
- internal/e2e
- rpc
- nodejs
- samples
- src/generated
- test
- python
- copilot/generated
- rust/src/generated
- scripts/codegen
- test/harness
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
| 211 | + | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
| 347 | + | |
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
| 364 | + | |
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
| 399 | + | |
400 | 400 | | |
401 | | - | |
| 401 | + | |
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
| 418 | + | |
419 | 419 | | |
420 | | - | |
| 420 | + | |
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
| |||
0 commit comments