Skip to content

Commit 9351e26

Browse files
github-actions[bot]Copilotstephentoub
authored
Update @github/copilot to 1.0.21 (#1039)
* Update @github/copilot to 1.0.21 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code * Update tests and docs: compaction.compact → history.compact Agent-Logs-Url: https://github.com/github/copilot-sdk/sessions/3afab108-c1a1-4942-9bce-f4c96ce1936a Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com> * Fix tests and docs for compaction → history RPC rename in @github/copilot 1.0.21 Agent-Logs-Url: https://github.com/github/copilot-sdk/sessions/3afab108-c1a1-4942-9bce-f4c96ce1936a Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com> * Add missing doc entries for fork/truncate, revert go/samples changes Agent-Logs-Url: https://github.com/github/copilot-sdk/sessions/2078ab96-88a2-4213-bd0a-a40e7b755bc3 Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
1 parent 9ef0dac commit 9351e26

22 files changed

+565
-236
lines changed

docs/troubleshooting/compatibility.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ The Copilot SDK communicates with the CLI via JSON-RPC protocol. Features must b
8686
| **Experimental** | | |
8787
| Agent management | `session.rpc.agent.*` | List, select, deselect, get current agent |
8888
| Fleet mode | `session.rpc.fleet.start()` | Parallel sub-agent execution |
89-
| Manual compaction | `session.rpc.compaction.compact()` | Trigger compaction on demand |
89+
| Manual compaction | `session.rpc.history.compact()` | Trigger compaction on demand |
90+
| History truncation | `session.rpc.history.truncate()` | Remove events from a point onward |
91+
| Session forking | `server.rpc.sessions.fork()` | Fork a session at a point in history |
9092

9193
### ❌ Not Available in SDK (CLI-Only)
9294

@@ -222,7 +224,7 @@ const session = await client.createSession({
222224
});
223225

224226
// Manual compaction (experimental)
225-
const result = await session.rpc.compaction.compact();
227+
const result = await session.rpc.history.compact();
226228
console.log(`Removed ${result.tokensRemoved} tokens, ${result.messagesRemoved} messages`);
227229
```
228230

dotnet/src/Generated/Rpc.cs

Lines changed: 131 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dotnet/src/Generated/SessionEvents.cs

Lines changed: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dotnet/test/AgentAndCompactRpcTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public async Task Should_Compact_Session_History_After_Messages()
135135
await session.SendAndWaitAsync(new MessageOptions { Prompt = "What is 2+2?" });
136136

137137
// Compact the session
138-
var result = await session.Rpc.Compaction.CompactAsync();
138+
var result = await session.Rpc.History.CompactAsync();
139139
Assert.NotNull(result);
140140
}
141141
}

dotnet/test/SessionFsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public async Task Should_Succeed_With_Compaction_While_Using_SessionFs()
211211
var contentBefore = await ReadAllTextSharedAsync(eventsPath);
212212
Assert.DoesNotContain("checkpointNumber", contentBefore);
213213

214-
await session.Rpc.Compaction.CompactAsync();
214+
await session.Rpc.History.CompactAsync();
215215
await WaitForConditionAsync(() => compactionEvent is not null, TimeSpan.FromSeconds(30));
216216
Assert.True(compactionEvent!.Data.Success);
217217

go/generated_session_events.go

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/internal/e2e/agent_and_compact_rpc_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func TestSessionCompactionRpc(t *testing.T) {
281281
}
282282

283283
// Compact the session
284-
result, err := session.RPC.Compaction.Compact(t.Context())
284+
result, err := session.RPC.History.Compact(t.Context())
285285
if err != nil {
286286
t.Fatalf("Failed to compact session: %v", err)
287287
}

0 commit comments

Comments
 (0)