You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add session-first TodoProvider read helpers in Go with GetAllTodos(*agent.Session) and GetRemainingTodos(*agent.Session), while keeping the existing option-based helpers as compatibility wrappers. This ports the narrow public API portion of the upstream .NET todo provider graduation work so the Go harness exposes direct session-based todo reads, and it updates focused tests plus the parity comparison doc.
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch dotnet-port-api-todo-session-helpers-c7ebc42e6a54636e.
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Show patch preview (337 of 337 lines)
From 2a46b67630442a206135a2bde9a8b3db78612a68 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Tue, 21 Jul 2026 06:21:52 +0000
Subject: [PATCH] [dotnet-port-api] Add TodoProvider session helpers
Port the session-first TodoProvider read helpers from upstream .NET so Go exposes direct session-based access alongside the existing option-based helpers.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
agent/harness/todo/todo.go | 89 +++++++++++++-----------
agent/harness/todo/todo_test.go | 55 ++++++++++++++-
docs/dotnet-go-sdk-feature-comparison.md | 2 +-
3 files changed, 102 insertions(+), 44 deletions(-)
diff --git a/agent/harness/todo/todo.go b/agent/harness/todo/todo.go
index 73df2df00..d96bb70eb 100644
--- a/agent/harness/todo/todo.go+++ b/agent/harness/todo/todo.go@@ -124,29 +124,31 @@ func (p *Provider) Invoked(ctx context.Context, invoked agent.InvokedContext) er
// GetAllItems returns all todo items from the session state.
func (p *Provider) GetAllItems(opts ...agent.Option) []Item {
- mu := p.getSessionLock(opts)- mu.Lock()- defer mu.Unlock()- st := p.loadState(opts)- result := make([]Item, len(st.Items))- copy(result, st.Items)- return result+ return p.GetAllTodos(sessionFromOptions(opts))
}
// GetRemainingItems returns only the incomplete todo items from the session state.
func (p *Provider) GetRemainingItems(opts ...agent.Option) []Item {
- mu := p.getSessionLock(opts)+ return p.GetRemainingTodos(sessionFromOptions(opts))+}++// GetAllTodos returns all todo items stored in session.+func (p *Provider) GetAllTodos(session *agent.Session) []Item {+ mu := p.getSessionLock(session)
mu.Lock()
defer mu.Unlock()
- st := p.loadState(opts)- return remainingItems(st.Items)+ return copyItems(p.loadState(session).Items)
}
-func (p *Provider) loadState(opts []agent.Option) *state {- session, ok := agent.GetOption(opts, agent.With
... (truncated)
Summary
Add session-first
TodoProviderread helpers in Go withGetAllTodos(*agent.Session)andGetRemainingTodos(*agent.Session), while keeping the existing option-based helpers as compatibility wrappers. This ports the narrow public API portion of the upstream .NET todo provider graduation work so the Go harness exposes direct session-based todo reads, and it updates focused tests plus the parity comparison doc.Ported .NET PRs
e57f046d8a248869fad1a2c0ea6761345efce852, microsoft/agent-framework@e57f046)Breaking Changes
No. Existing
GetAllItemsandGetRemainingItemshelpers remain available; this change only adds the session-first exported helpers.Tests and Examples
go test ./agent/harness/todogo test -race ./agent/harness/todoNotes
Note
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch
dotnet-port-api-todo-session-helpers-c7ebc42e6a54636e.Click here to create the pull request
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Show patch preview (337 of 337 lines)