Commit 8e2c875
chore: upgrade copilot-sdk to v1.0.2 and re-bundle embedded CLI to 1.0.64-0 (fixes session.idle hang) (#333)
* chore: upgrade copilot-sdk to v1.0.2 and re-bundle embedded CLI to 1.0.64-0
Upgrades the embedded GitHub Copilot SDK from v0.3.0 to v1.0.2 (GA) and
re-bundles the embedded Copilot CLI from 1.0.49 to 1.0.64-0, which ships
the fix for the tracked session.idle hang (copilot-sdk #558 "Timeout
waiting for session.idle" and #794 "processQueuedItems lacks error
handling -> session.idle never emitted"). Previously sessions could wedge
mid-turn with no output, recovered only by waza's external watchdog.
SDK v1.0.x migration:
- SessionEvent.Type is now a method Type() derived from the Data field;
events are constructed via Data: &copilot.XxxData{} and read with Type().
- ClientOptions dropped CLIArgs/CLIPath/AutoStart/AutoRestart; CLI args and
path now flow through Connection: copilot.StdioConnection{Path, Args}.
- SessionConfig/ResumeSessionConfig.Streaming is now *bool (copilot.Bool).
- Permission approval uses the built-in copilot.PermissionHandler.ApproveAll
(replaces the removed PermissionRequestResultKindApproved path).
- ProviderConfig.WireApi renamed to WireAPI.
- Usage/limits fields became pointers (TotalPremiumRequests, ModelMetric
Requests Count/Cost, AssistantUsage token counts, MaxContextWindowTokens).
Validated: go build/vet/test all pass; a real copilot-sdk eval completed a
20-turn agent session in ~12s with zero stalls or watchdog recoveries.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: preserve event type for transcript round-trip of uncovered events
TranscriptEvent.UnmarshalJSON reconstructs SessionEvent.Data via
transcriptData, whose default case wrapped the payload in
RawSessionEventData without setting EventType. Since
RawSessionEventData.Type() returns exactly that field, every event kind
without a dedicated Data struct (session.start/idle/shutdown,
assistant.turn_start/turn_end/usage, etc.) round-tripped to Type() == "",
losing the type. The web API mapTranscriptEvents relies on Type(), so
stored transcripts surfaced empty/incorrect event types.
Set EventType in copilotevents.RawData so Type() round-trips for all event
kinds, and add a regression test covering session.idle/shutdown and
assistant.usage.
Addresses PR #333 review comment.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* test: make hooks context-timeout test deterministic
TestExecute_ContextTimeout used context.WithTimeout(1ms)+Sleep(5ms),
which races the deadline-timer goroutine: on a loaded runner Execute could
observe ctx.Err()==nil, run the hook, and swallow the resulting deadline
error as a non-fatal WARN (ErrorOnFail defaults false), so the test saw nil
and failed (intermittently on windows-latest CI). Use a deadline already in
the past so WithDeadline cancels synchronously (dur <= 0), keeping the
timeout-path coverage without the timer race.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* ci: exclude generated embedded bundler files from codecov
Codecov flagged 0% patch coverage on internal/embedded/zcopilot_linux_amd64.go,
whose only uncovered lines are the panic branches of the generated base64/zstd
decode helpers. These zcopilot_*.go files are produced by the copilot-sdk
bundler ("DO NOT EDIT") and contain only trivial generated glue, so they should
not be coverage-gated. Add a codecov.yml ignore entry for them (validated via
codecov/validate).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 98aa1a3 commit 8e2c875
30 files changed
Lines changed: 91 additions & 48 deletions
File tree
- internal
- embedded
- hooks
- models
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
| 120 | + | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments