Skip to content

Commit ab55b90

Browse files
committed
Update github.com/a2aproject/a2a-go v0.3.3 -> v0.3.4
Update the Read() method signature to include TaskVersion as required by the new API. Also add WriteVersioned() method to satisfy the Queue interface. Assisted-By: cagent
1 parent 912b1a2 commit ab55b90

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
connectrpc.com/connect v1.19.1
1212
github.com/JohannesKaufmann/html-to-markdown/v2 v2.5.0
1313
github.com/Microsoft/go-winio v0.6.2
14-
github.com/a2aproject/a2a-go v0.3.3
14+
github.com/a2aproject/a2a-go v0.3.4
1515
github.com/alecthomas/chroma/v2 v2.22.0
1616
github.com/alpkeskin/gotoon v0.1.1
1717
github.com/anthropics/anthropic-sdk-go v1.19.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ github.com/RoaringBitmap/roaring/v2 v2.4.5 h1:uGrrMreGjvAtTBobc0g5IrW1D5ldxDQYe2
3131
github.com/RoaringBitmap/roaring/v2 v2.4.5/go.mod h1:FiJcsfkGje/nZBZgCu0ZxCPOKD/hVXDS2dXi7/eUFE0=
3232
github.com/a2aproject/a2a-go v0.3.3 h1:NqGDw2c8hCSW3/9MakeeRpw5yCZUUmW2Y/yINV15GwQ=
3333
github.com/a2aproject/a2a-go v0.3.3/go.mod h1:8C0O6lsfR7zWFEqVZz/+zWCoxe8gSWpknEpqm/Vgj3E=
34+
github.com/a2aproject/a2a-go v0.3.4 h1:rSMR/IryydWkIjtxDLZCVgSc3RrVF4eHrycKlBC/WE0=
35+
github.com/a2aproject/a2a-go v0.3.4/go.mod h1:8C0O6lsfR7zWFEqVZz/+zWCoxe8gSWpknEpqm/Vgj3E=
3436
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
3537
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
3638
github.com/alecthomas/chroma/v2 v2.22.0 h1:PqEhf+ezz5F5owoDeOUKFzW+W3ZJDShNCaHg4sZuItI=

pkg/a2a/executor_wrapper.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@ func (fq *fixingQueue) Write(ctx context.Context, event a2a.Event) error {
4949
return fq.queue.Write(ctx, event)
5050
}
5151

52-
func (fq *fixingQueue) Read(ctx context.Context) (a2a.Event, error) {
52+
func (fq *fixingQueue) Read(ctx context.Context) (a2a.Event, a2a.TaskVersion, error) {
5353
return fq.queue.Read(ctx)
5454
}
5555

56+
func (fq *fixingQueue) WriteVersioned(ctx context.Context, event a2a.Event, version a2a.TaskVersion) error {
57+
return fq.queue.WriteVersioned(ctx, event, version)
58+
}
59+
5660
func (fq *fixingQueue) Close() error {
5761
return fq.queue.Close()
5862
}

pkg/a2a/executor_wrapper_test.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,13 @@ func (m *mockQueue) Write(_ context.Context, event a2a.Event) error {
2020
return nil
2121
}
2222

23-
func (m *mockQueue) Read(context.Context) (a2a.Event, error) {
24-
return nil, nil
23+
func (m *mockQueue) Read(context.Context) (a2a.Event, a2a.TaskVersion, error) {
24+
return nil, a2a.TaskVersionMissing, nil
25+
}
26+
27+
func (m *mockQueue) WriteVersioned(_ context.Context, event a2a.Event, _ a2a.TaskVersion) error {
28+
m.events = append(m.events, event)
29+
return nil
2530
}
2631

2732
func (m *mockQueue) Close() error {

0 commit comments

Comments
 (0)