Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/troubleshooting/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ The Copilot SDK communicates with the CLI via JSON-RPC protocol. Features must b
| **Experimental** | | |
| Agent management | `session.rpc.agent.*` | List, select, deselect, get current agent |
| Fleet mode | `session.rpc.fleet.start()` | Parallel sub-agent execution |
| Manual compaction | `session.rpc.compaction.compact()` | Trigger compaction on demand |
| Manual compaction | `session.rpc.history.compact()` | Trigger compaction on demand |
| History truncation | `session.rpc.history.truncate()` | Remove events from a point onward |
| Session forking | `server.rpc.sessions.fork()` | Fork a session at a point in history |

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

Expand Down Expand Up @@ -222,7 +224,7 @@ const session = await client.createSession({
});

// Manual compaction (experimental)
const result = await session.rpc.compaction.compact();
const result = await session.rpc.history.compact();
console.log(`Removed ${result.tokensRemoved} tokens, ${result.messagesRemoved} messages`);
```

Expand Down
184 changes: 131 additions & 53 deletions dotnet/src/Generated/Rpc.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions dotnet/src/Generated/SessionEvents.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dotnet/test/AgentAndCompactRpcTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public async Task Should_Compact_Session_History_After_Messages()
await session.SendAndWaitAsync(new MessageOptions { Prompt = "What is 2+2?" });

// Compact the session
var result = await session.Rpc.Compaction.CompactAsync();
var result = await session.Rpc.History.CompactAsync();
Assert.NotNull(result);
}
}
2 changes: 1 addition & 1 deletion dotnet/test/SessionFsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public async Task Should_Succeed_With_Compaction_While_Using_SessionFs()
var contentBefore = await ReadAllTextSharedAsync(eventsPath);
Assert.DoesNotContain("checkpointNumber", contentBefore);

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

Expand Down
6 changes: 4 additions & 2 deletions go/generated_session_events.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/internal/e2e/agent_and_compact_rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ func TestSessionCompactionRpc(t *testing.T) {
}

// Compact the session
result, err := session.RPC.Compaction.Compact(t.Context())
result, err := session.RPC.History.Compact(t.Context())
if err != nil {
t.Fatalf("Failed to compact session: %v", err)
}
Expand Down
Loading
Loading