Skip to content

armgit / ax

Public Imported from GitHub
0

Agent Executor (AX) is Google's open agentic orchestration runtime

Go

Rename AgentComplete to AgentEnd (#225)

Jaana Dogan818867923c83
diff --git a/examples/k8s_sandbox_agent/main.go b/examples/k8s_sandbox_agent/main.go
index 8c77633..7c65428 100644
--- a/examples/k8s_sandbox_agent/main.go
+++ b/examples/k8s_sandbox_agent/main.go
@@ -106,11 +106,11 @@ func (s *server) Connect(stream grpc.BidiStreamingServer[proto.AgentMessage, pro
}
}
- // Send AgentComplete to signal end of outputs.
+ // Send AgentEnd to signal end of outputs.
if err := stream.Send(&proto.AgentMessage{
ExecId: req.ExecId,
- Type: &proto.AgentMessage_Complete{
- Complete: &proto.AgentComplete{},
+ Type: &proto.AgentMessage_End{
+ End: &proto.AgentEnd{},
},
}); err != nil {
return err
diff --git a/examples/remote_agent/main.go b/examples/remote_agent/main.go
index d26c0ed..2c7670e 100644
--- a/examples/remote_agent/main.go
+++ b/examples/remote_agent/main.go
@@ -90,11 +90,11 @@ func (s *server) Connect(stream grpc.BidiStreamingServer[proto.AgentMessage, pro
return err
}
- // Send AgentComplete to signal end of outputs.
+ // Send AgentEnd to signal end of outputs.
if err := stream.Send(&proto.AgentMessage{
ExecId: incoming.ExecId,
- Type: &proto.AgentMessage_Complete{
- Complete: &proto.AgentComplete{},
+ Type: &proto.AgentMessage_End{
+ End: &proto.AgentEnd{},
},
}); err != nil {
return err
diff --git a/internal/agent/remote.go b/internal/agent/remote.go
index 08fe15a..bfbbf0f 100644
--- a/internal/agent/remote.go
+++ b/internal/agent/remote.go
@@ -118,7 +118,7 @@ func (a *RemoteAgent) Connect(ctx context.Context, execID string, start *proto.A
if err := o(msg.Outputs); err != nil {
return fmt.Errorf("handler error: %w", err)
}
- case *proto.AgentMessage_Complete:
+ case *proto.AgentMessage_End:
// Agent signaled completion
return nil
default:
diff --git a/internal/examples/ate_agent/main.go b/internal/examples/ate_agent/main.go
index 78fabad..5b76808 100644
--- a/internal/examples/ate_agent/main.go
+++ b/internal/examples/ate_agent/main.go
@@ -71,11 +71,11 @@ func (s *server) Connect(stream grpc.BidiStreamingServer[proto.AgentMessage, pro
return err
}
- // Send AgentComplete to signal end of outputs.
+ // Send AgentEnd to signal end of outputs.
if err := stream.Send(&proto.AgentMessage{
ExecId: incoming.ExecId,
- Type: &proto.AgentMessage_Complete{
- Complete: &proto.AgentComplete{},
+ Type: &proto.AgentMessage_End{
+ End: &proto.AgentEnd{},
},
}); err != nil {
return err
diff --git a/internal/testagent/proto/testagent.pb.go b/internal/testagent/proto/testagent.pb.go
index 78ae1ea..0dbd921 100644
--- a/internal/testagent/proto/testagent.pb.go
+++ b/internal/testagent/proto/testagent.pb.go
@@ -15,7 +15,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
-// protoc v5.28.2
+// protoc v7.34.1
// source: internal/testagent/proto/testagent.proto
package proto
diff --git a/proto/ax.pb.go b/proto/ax.pb.go
index 891c1e0..830ee37 100644
--- a/proto/ax.pb.go
+++ b/proto/ax.pb.go
@@ -15,7 +15,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
-// protoc v5.28.2
+// protoc v7.34.1
// source: proto/ax.proto
package proto
@@ -206,26 +206,26 @@ func (x *AgentOutputs) GetInternalOnly() bool {
return false
}
-type AgentComplete struct {
+type AgentEnd struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
-func (x *AgentComplete) Reset() {
- *x = AgentComplete{}
+func (x *AgentEnd) Reset() {
+ *x = AgentEnd{}
mi := &file_proto_ax_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
-func (x *AgentComplete) String() string {
+func (x *AgentEnd) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*AgentComplete) ProtoMessage() {}
+func (*AgentEnd) ProtoMessage() {}
-func (x *AgentComplete) ProtoReflect() protoreflect.Message {
+func (x *AgentEnd) ProtoReflect() protoreflect.Message {
mi := &file_proto_ax_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -237,8 +237,8 @@ func (x *AgentComplete) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use AgentComplete.ProtoReflect.Descriptor instead.
-func (*AgentComplete) Descriptor() ([]byte, []int) {
+// Deprecated: Use AgentEnd.ProtoReflect.Descriptor instead.
+func (*AgentEnd) Descriptor() ([]byte, []int) {
return file_proto_ax_proto_rawDescGZIP(), []int{2}
}
@@ -249,7 +249,7 @@ type AgentMessage struct {
//
// *AgentMessage_Start
// *AgentMessage_Outputs
- // *AgentMessage_Complete
+ // *AgentMessage_End
Type isAgentMessage_Type `protobuf_oneof:"type"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
@@ -317,10 +317,10 @@ func (x *AgentMessage) GetOutputs() *AgentOutputs {
return nil
}
-func (x *AgentMessage) GetComplete() *AgentComplete {
+func (x *AgentMessage) GetEnd() *AgentEnd {
if x != nil {
- if x, ok := x.Type.(*AgentMessage_Complete); ok {
- return x.Complete
+ if x, ok := x.Type.(*AgentMessage_End); ok {
+ return x.End
}
}
return nil
@@ -338,15 +338,15 @@ type AgentMessage_Outputs struct {
Outputs *AgentOutputs `protobuf:"bytes,3,opt,name=outputs,proto3,oneof"`
}
-type AgentMessage_Complete struct {
- Complete *AgentComplete `protobuf:"bytes,4,opt,name=complete,proto3,oneof"`
+type AgentMessage_End struct {
+ End *AgentEnd `protobuf:"bytes,4,opt,name=end,proto3,oneof"`
}
func (*AgentMessage_Start) isAgentMessage_Type() {}
func (*AgentMessage_Outputs) isAgentMessage_Type() {}
-func (*AgentMessage_Complete) isAgentMessage_Type() {}
+func (*AgentMessage_End) isAgentMessage_Type() {}
// Message is a message in the history.
type Message struct {
@@ -1304,13 +1304,14 @@ const file_proto_ax_proto_rawDesc = "" +
"\bmessages\x18\x03 \x03(\v2\v.ax.MessageR\bmessages\"\\\n" +
"\fAgentOutputs\x12'\n" +
"\bmessages\x18\x01 \x03(\v2\v.ax.MessageR\bmessages\x12#\n" +
- "\rinternal_only\x18\x02 \x01(\bR\finternalOnly\"\x0f\n" +
- "\rAgentComplete\"\xb6\x01\n" +
+ "\rinternal_only\x18\x02 \x01(\bR\finternalOnly\"\n" +
+ "\n" +
+ "\bAgentEnd\"\xa7\x01\n" +
"\fAgentMessage\x12\x17\n" +
"\aexec_id\x18\x01 \x01(\tR\x06execId\x12&\n" +
"\x05start\x18\x02 \x01(\v2\x0e.ax.AgentStartH\x00R\x05start\x12,\n" +
- "\aoutputs\x18\x03 \x01(\v2\x10.ax.AgentOutputsH\x00R\aoutputs\x12/\n" +
- "\bcomplete\x18\x04 \x01(\v2\x11.ax.AgentCompleteH\x00R\bcompleteB\x06\n" +
+ "\aoutputs\x18\x03 \x01(\v2\x10.ax.AgentOutputsH\x00R\aoutputs\x12 \n" +
+ "\x03end\x18\x04 \x01(\v2\f.ax.AgentEndH\x00R\x03endB\x06\n" +
"\x04type\"D\n" +
"\aMessage\x12\x12\n" +
"\x04role\x18\x01 \x01(\tR\x04role\x12%\n" +
@@ -1405,7 +1406,7 @@ var file_proto_ax_proto_goTypes = []any{
(State)(0), // 0: ax.State
(*AgentStart)(nil), // 1: ax.AgentStart
(*AgentOutputs)(nil), // 2: ax.AgentOutputs
- (*AgentComplete)(nil), // 3: ax.AgentComplete
+ (*AgentEnd)(nil), // 3: ax.AgentEnd
(*AgentMessage)(nil), // 4: ax.AgentMessage
(*Message)(nil), // 5: ax.Message
(*ConversationEvent)(nil), // 6: ax.ConversationEvent
@@ -1436,7 +1437,7 @@ var file_proto_ax_proto_depIdxs = []int32{
5, // 2: ax.AgentOutputs.messages:type_name -> ax.Message
1, // 3: ax.AgentMessage.start:type_name -> ax.AgentStart
2, // 4: ax.AgentMessage.outputs:type_name -> ax.AgentOutputs
- 3, // 5: ax.AgentMessage.complete:type_name -> ax.AgentComplete
+ 3, // 5: ax.AgentMessage.end:type_name -> ax.AgentEnd
24, // 6: ax.Message.content:type_name -> ax.Content
5, // 7: ax.ConversationEvent.messages:type_name -> ax.Message
0, // 8: ax.ConversationEvent.state:type_name -> ax.State
@@ -1482,7 +1483,7 @@ func file_proto_ax_proto_init() {
file_proto_ax_proto_msgTypes[3].OneofWrappers = []any{
(*AgentMessage_Start)(nil),
(*AgentMessage_Outputs)(nil),
- (*AgentMessage_Complete)(nil),
+ (*AgentMessage_End)(nil),
}
file_proto_ax_proto_msgTypes[12].OneofWrappers = []any{
(*RegisterAgentRequest_Remote)(nil),
diff --git a/proto/ax.proto b/proto/ax.proto
index 4fd7725..1785307 100644
--- a/proto/ax.proto
+++ b/proto/ax.proto
@@ -41,14 +41,14 @@ message AgentOutputs {
bool internal_only = 2;
}
-message AgentComplete {}
+message AgentEnd {}
message AgentMessage {
string exec_id = 1;
oneof type {
AgentStart start = 2;
AgentOutputs outputs = 3;
- AgentComplete complete = 4;
+ AgentEnd end = 4;
}
}
diff --git a/proto/ax_grpc.pb.go b/proto/ax_grpc.pb.go
index 0ffa560..2318330 100644
--- a/proto/ax_grpc.pb.go
+++ b/proto/ax_grpc.pb.go
@@ -14,8 +14,8 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.5.1
-// - protoc v5.28.2
+// - protoc-gen-go-grpc v1.6.0
+// - protoc v7.34.1
// source: proto/ax.proto
package proto
@@ -101,10 +101,10 @@ type AgentServiceServer interface {
type UnimplementedAgentServiceServer struct{}
func (UnimplementedAgentServiceServer) Connect(grpc.BidiStreamingServer[AgentMessage, AgentMessage]) error {
- return status.Errorf(codes.Unimplemented, "method Connect not implemented")
+ return status.Error(codes.Unimplemented, "method Connect not implemented")
}
func (UnimplementedAgentServiceServer) HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method HealthCheck not implemented")
+ return nil, status.Error(codes.Unimplemented, "method HealthCheck not implemented")
}
func (UnimplementedAgentServiceServer) mustEmbedUnimplementedAgentServiceServer() {}
func (UnimplementedAgentServiceServer) testEmbeddedByValue() {}
@@ -117,7 +117,7 @@ type UnsafeAgentServiceServer interface {
}
func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer) {
- // If the following call pancis, it indicates UnimplementedAgentServiceServer was
+ // If the following call panics, it indicates UnimplementedAgentServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
@@ -248,10 +248,10 @@ type ControllerServiceServer interface {
type UnimplementedControllerServiceServer struct{}
func (UnimplementedControllerServiceServer) Exec(*ExecRequest, grpc.ServerStreamingServer[ExecResponse]) error {
- return status.Errorf(codes.Unimplemented, "method Exec not implemented")
+ return status.Error(codes.Unimplemented, "method Exec not implemented")
}
func (UnimplementedControllerServiceServer) RegisterAgent(context.Context, *RegisterAgentRequest) (*RegisterAgentResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RegisterAgent not implemented")
+ return nil, status.Error(codes.Unimplemented, "method RegisterAgent not implemented")
}
func (UnimplementedControllerServiceServer) mustEmbedUnimplementedControllerServiceServer() {}
func (UnimplementedControllerServiceServer) testEmbeddedByValue() {}
@@ -264,7 +264,7 @@ type UnsafeControllerServiceServer interface {
}
func RegisterControllerServiceServer(s grpc.ServiceRegistrar, srv ControllerServiceServer) {
- // If the following call pancis, it indicates UnimplementedControllerServiceServer was
+ // If the following call panics, it indicates UnimplementedControllerServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
@@ -404,13 +404,13 @@ type EventLogServiceServer interface {
type UnimplementedEventLogServiceServer struct{}
func (UnimplementedEventLogServiceServer) List(context.Context, *ListRequest) (*ListResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
+ return nil, status.Error(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedEventLogServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
+ return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedEventLogServiceServer) Fork(context.Context, *ForkRequest) (*ForkResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method Fork not implemented")
+ return nil, status.Error(codes.Unimplemented, "method Fork not implemented")
}
func (UnimplementedEventLogServiceServer) mustEmbedUnimplementedEventLogServiceServer() {}
func (UnimplementedEventLogServiceServer) testEmbeddedByValue() {}
@@ -423,7 +423,7 @@ type UnsafeEventLogServiceServer interface {
}
func RegisterEventLogServiceServer(s grpc.ServiceRegistrar, srv EventLogServiceServer) {
- // If the following call pancis, it indicates UnimplementedEventLogServiceServer was
+ // If the following call panics, it indicates UnimplementedEventLogServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
diff --git a/proto/content.pb.go b/proto/content.pb.go
index 86e5e0b..a990246 100644
--- a/proto/content.pb.go
+++ b/proto/content.pb.go
@@ -15,7 +15,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
-// protoc v5.28.2
+// protoc v7.34.1
// source: proto/content.proto
package proto