Skip to content

armgit / ax

Public Imported from GitHub
0

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

Go

Remove forking capabilities until controller2 is stable (#130)

Jaana Dogan5425c993f475
diff --git a/README.md b/README.md
index 0979746..40864b9 100644
--- a/README.md
+++ b/README.md
@@ -128,8 +128,7 @@ ax exec \
If the client gets disconnected, pass the last sequence it saw to
replay the events it missed. This catches the client up; it does not
-rewind the conversation. To branch from a checkpoint, use `ax fork`
-instead.
+rewind the conversation.
In this example, we catch up a client from sequence number 12:
@@ -281,39 +280,6 @@ ax serve
# Start server with custom config
ax serve --config my-config.yaml
```
-
-### Fork
-
-Fork an existing agentic event log from a specific checkpoint (or the latest state)
-into a new event log.
-
-```bash
-ax fork \
- --src-conversation <id> \
- --dest-conversation <id> \
- [--src-seq <number>] \
- [--server <address>]
-```
-
-Options:
-- `--src-conversation`: Source conversation ID to fork from (required)
-- `--dest-conversation`: Destination conversation ID for the new event log (required)
-- `--src-seq`: Sequence number to fork from (optional, defaults to latest). Must be a sequence that exists in the source conversation.
-- `--server`: gRPC controller server address (default: "localhost:8494")
-
-**Example:**
-
-```bash
-# Fork from the latest state into a new conversation
-ax fork --src-conversation 38460323-9a78-41cb-8991-022b0ff2c19c \
- --dest-conversation e5e26e38-53a2-4f22-b1cb-ae867357df83
-
-# Fork from a specific checkpoint
-ax fork --src-conversation 38460323-9a78-41cb-8991-022b0ff2c19c \
- --dest-conversation e5e26e38-53a2-4f22-b1cb-ae867357df83 \
- --src-seq 12
-```
-
## Gemini Agent
AX includes a built-in Gemini agent that can be used to generate text based on a given prompt. The agent is registered as `gemini` and can be triggered as a standalone agent or used from custom agent implementations.
diff --git a/cmd/ax/fork.go b/cmd/ax/fork.go
deleted file mode 100644
index 9210b4c..0000000
--- a/cmd/ax/fork.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2026 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package main
-
-import (
- "fmt"
-
- "github.com/google/ax/cmd/ax/internal/cliutil"
- "github.com/google/ax/proto"
- "github.com/spf13/cobra"
-)
-
-var (
- forkSourceConversation string
- forkSourceSeq int32
- forkDestConversation string
- forkServerAddr string
- forkConfigFile string
-)
-
-var forkCmd = &cobra.Command{
- Use: "fork",
- Short: "Fork an event log from a specific checkpoint",
- Long: `Fork an existing agentic event log into a new conversation, optionally from a specific checkpoint.`,
- RunE: runFork,
-}
-
-func init() {
- forkCmd.Flags().StringVar(&forkSourceConversation, "src-conversation", "", "Source conversation ID to fork from (required)")
- forkCmd.Flags().Int32Var(&forkSourceSeq, "src-seq", 0, "Sequence number to fork from (optional, defaults to latest)")
- forkCmd.Flags().StringVar(&forkDestConversation, "dest-conversation", "", "Destination conversation ID (required)")
- forkCmd.Flags().StringVar(&forkServerAddr, "server", "", "gRPC controller server address (if specified, connects to remote server; otherwise runs with a local built-in AX server)")
- forkCmd.Flags().StringVar(&forkConfigFile, "config", "ax.yaml", "Path to YAML configuration file (only used with a local built-in AX server)")
-
- forkCmd.MarkFlagRequired("src-conversation")
- forkCmd.MarkFlagRequired("dest-conversation")
-}
-
-func runFork(cmd *cobra.Command, args []string) error {
- ctx := cmd.Context()
-
- if forkServerAddr == "" {
- // Headless mode
- cfg, err := cliutil.LoadFromFile(forkConfigFile)
- if err != nil {
- return fmt.Errorf("error loading config file '%s': %w", forkConfigFile, err)
- }
-
- c, err := cliutil.NewControllerFromConfig(ctx, cfg)
- if err != nil {
- return fmt.Errorf("error creating controller: %w", err)
- }
- defer c.Close()
-
- destID, err := c.Fork(ctx, forkSourceConversation, forkSourceSeq, forkDestConversation)
- if err != nil {
- return fmt.Errorf("error forking conversation: %w", err)
- }
-
- fmt.Printf("Conversation forked successfully. New conversation ID: %s\n", destID)
- return nil
- }
-
- // Remote mode
- conn, err := connect(forkServerAddr)
- if err != nil {
- return err
- }
- defer conn.Close()
-
- client := proto.NewConversationServiceClient(conn)
-
- resp, err := client.ForkConversation(ctx, &proto.ForkConversationRequest{
- SrcConversationId: forkSourceConversation,
- SrcSeq: forkSourceSeq,
- DestConversationId: forkDestConversation,
- })
- if err != nil {
- return fmt.Errorf("error forking conversation: %w", err)
- }
-
- fmt.Printf("Conversation forked successfully. New conversation ID: %s\n", resp.ConversationId)
- return nil
-}
diff --git a/cmd/ax/main.go b/cmd/ax/main.go
index 5d255e0..9084f8c 100644
--- a/cmd/ax/main.go
+++ b/cmd/ax/main.go
@@ -46,8 +46,6 @@ and run the controller server.`,
func init() {
rootCmd.AddCommand(execCmd)
rootCmd.AddCommand(serveCmd)
-
- rootCmd.AddCommand(forkCmd)
}
func connect(server string) (*grpc.ClientConn, error) {
diff --git a/cmd/axepp/main.go b/cmd/axepp/main.go
index ed4fba3..a045820 100644
--- a/cmd/axepp/main.go
+++ b/cmd/axepp/main.go
@@ -14,7 +14,7 @@
// limitations under the License.
// Command axepp is an Envoy External Processing (ext_authz) plugin for the ax server.
-// It intercepts Exec, DeleteConversation, and ForkConversation gRPC requests to
+// Intercepts Exec and DeleteConversation gRPC requests to
// extract conversation IDs and safely initiate session/actor resumption.
package main
@@ -148,13 +148,6 @@ func (s *authServer) Check(ctx context.Context, req *authv3.CheckRequest) (*auth
slog.ErrorContext(ctx, "EPP routing failed", slog.String("path", path), slog.Any("error", err))
}
return resp, err
- case "/ax.ConversationService/ForkConversation":
- var forkReq proto.ForkConversationRequest
- resp, err := route(ctx, s.sc, body, &forkReq, path, func() string { return forkReq.GetDestConversationId() })
- if err != nil {
- slog.ErrorContext(ctx, "EPP routing failed", slog.String("path", path), slog.Any("error", err))
- }
- return resp, err
}
return defaultResp, nil
}
diff --git a/internal/controller/controller.go b/internal/controller/controller.go
index 5dd315e..34ece25 100644
--- a/internal/controller/controller.go
+++ b/internal/controller/controller.go
@@ -266,64 +266,6 @@ func (d *Controller) Delete(ctx context.Context, conversationID string) error {
return d.eventLog.DeleteEvents(ctx, conversationID)
}
-// Fork forks an event log from a specific conversation up to a checkpoint.
-func (d *Controller) Fork(ctx context.Context, srcConversationID string, srcSeq int32, destConversationID string) (string, error) {
- if srcConversationID == "" {
- return "", fmt.Errorf("src_conversation_id is required")
- }
- // TODO(anj-s): Check whether destination ID already exists and reject collisions.
- if destConversationID == "" {
- destConversationID = uuid.NewString()
- }
-
- events, err := d.eventLog.Events(ctx, srcConversationID)
- if err != nil {
- return "", fmt.Errorf("failed to retrieve source events: %w", err)
- }
- if len(events) == 0 {
- return "", fmt.Errorf("source conversation %s not found or has no events", srcConversationID)
- }
-
- // When the caller specifies srcSeq, require that it actually exists in
- // the source event log. Without this check a typo or stale checkpoint
- // silently degrades to "fork all events", which is misleading. Walk
- // the events once: stop as soon as we pass the requested seq, and
- // truncate the slice on an exact match so the copy loop below doesn't
- // need to re-check the bound.
- if srcSeq > 0 {
- found := false
- for i, ev := range events {
- if ev.Seq == srcSeq {
- events = events[:i+1]
- found = true
- break
- }
- if ev.Seq > srcSeq {
- break
- }
- }
- if !found {
- return "", fmt.Errorf("src_seq %d not found in conversation %s", srcSeq, srcConversationID)
- }
- }
-
- for _, ev := range events {
- // Clone the event to update the conversation ID.
- newEvent := &proto.ConversationEvent{
- ConversationId: destConversationID,
- Seq: ev.Seq,
- ExecId: ev.ExecId,
- Messages: ev.Messages,
- State: ev.State,
- }
- if _, err := d.eventLog.Append(ctx, newEvent); err != nil {
- return "", fmt.Errorf("failed to append forked event: %w", err)
- }
- }
-
- return destConversationID, nil
-}
-
// Registry returns the agent registry.
func (d *Controller) Registry() *Registry {
return d.registry
diff --git a/internal/controller/fork_test.go b/internal/controller/fork_test.go
deleted file mode 100644
index 8547973..0000000
--- a/internal/controller/fork_test.go
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright 2026 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package controller
-
-import (
- "context"
- "testing"
-
- "github.com/google/ax/internal/agent"
- "github.com/google/ax/internal/controller/executor"
- "github.com/google/ax/internal/controller/executor/executortest"
- "github.com/google/ax/proto"
-)
-
-func TestController_Fork(t *testing.T) {
- ctx := context.Background()
- srcCID := "src-conv"
- destCID := "dest-conv"
-
- log := &executortest.MemoryEventLog{}
- // Pre-populate history
- log.AllEvents = []*proto.ConversationEvent{
- {
- ConversationId: srcCID,
- Seq: 1,
- Messages: []*proto.Message{
- {Role: "user", Content: &proto.Content{Type: &proto.Content_Text{Text: &proto.TextContent{Text: "msg 1"}}}},
- },
- State: proto.State_STATE_COMPLETED,
- },
- {
- ConversationId: srcCID,
- Seq: 2,
- Messages: []*proto.Message{
- {Role: "assistant", Content: &proto.Content{Type: &proto.Content_Text{Text: &proto.TextContent{Text: "msg 2"}}}},
- },
- State: proto.State_STATE_COMPLETED,
- },
- }
-
- c, err := New(ctx, Config{
- EventLogBuilder: func() (executor.EventLog, error) {
- return log, nil
- },
- PlannerBuilder: func(ctx context.Context, r *Registry) (agent.Agent, error) {
- return &dummyAgent{}, nil
- },
- })
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- // Case 1: Fork without seq (should copy all)
- forkedID, err := c.Fork(ctx, srcCID, 0, destCID)
- if err != nil {
- t.Fatal(err)
- }
- if forkedID != destCID {
- t.Fatalf("expected destCID %s, got %s", destCID, forkedID)
- }
-
- events, err := log.Events(ctx, destCID)
- if err != nil {
- t.Fatal(err)
- }
- if len(events) != 2 {
- t.Fatalf("expected 2 events, got %d", len(events))
- }
- if events[0].Seq != 1 || events[1].Seq != 2 {
- t.Errorf("sequences mismatch")
- }
-
- // Case 2: Fork with seq 1
- destCID2 := "dest-conv-2"
- forkedID2, err := c.Fork(ctx, srcCID, 1, destCID2)
- if err != nil {
- t.Fatal(err)
- }
- if forkedID2 != destCID2 {
- t.Fatalf("expected destCID2 %s, got %s", destCID2, forkedID2)
- }
-
- events2, err := log.Events(ctx, destCID2)
- if err != nil {
- t.Fatal(err)
- }
- if len(events2) != 1 {
- t.Fatalf("expected 1 event, got %d", len(events2))
- }
- if events2[0].Seq != 1 {
- t.Errorf("expected seq 1, got %d", events2[0].Seq)
- }
-}
-
-func TestController_Fork_SrcSeqNotFound(t *testing.T) {
- ctx := context.Background()
- srcCID := "src-conv"
-
- log := &executortest.MemoryEventLog{}
- log.AllEvents = []*proto.ConversationEvent{
- {
- ConversationId: srcCID,
- Seq: 1,
- Messages: []*proto.Message{
- {Role: "user", Content: &proto.Content{Type: &proto.Content_Text{Text: &proto.TextContent{Text: "msg 1"}}}},
- },
- State: proto.State_STATE_COMPLETED,
- },
- {
- ConversationId: srcCID,
- Seq: 2,
- Messages: []*proto.Message{
- {Role: "assistant", Content: &proto.Content{Type: &proto.Content_Text{Text: &proto.TextContent{Text: "msg 2"}}}},
- },
- State: proto.State_STATE_COMPLETED,
- },
- }
-
- c, err := New(ctx, Config{
- EventLogBuilder: func() (executor.EventLog, error) {
- return log, nil
- },
- PlannerBuilder: func(ctx context.Context, r *Registry) (agent.Agent, error) {
- return &dummyAgent{}, nil
- },
- })
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- // Non-existent src_seq must error and write nothing.
- if _, err := c.Fork(ctx, srcCID, 99, "dest-conv"); err == nil {
- t.Fatal("expected error when src_seq does not exist, got nil")
- }
- events, err := log.Events(ctx, "dest-conv")
- if err != nil {
- t.Fatal(err)
- }
- if len(events) != 0 {
- t.Fatalf("expected 0 events on failed fork, got %d", len(events))
- }
-
- // src_seq exactly at the max is valid and must succeed.
- if _, err := c.Fork(ctx, srcCID, 2, "dest-conv-boundary"); err != nil {
- t.Fatalf("unexpected error forking at boundary src_seq: %v", err)
- }
-}
diff --git a/internal/controller2/controller.go b/internal/controller2/controller.go
index f842049..8701e7c 100644
--- a/internal/controller2/controller.go
+++ b/internal/controller2/controller.go
@@ -24,7 +24,6 @@ import (
"github.com/google/ax/internal/controller/executor"
"github.com/google/ax/internal/harness/harnesstest"
"github.com/google/ax/proto"
- "github.com/google/uuid"
)
type ExecHandler func(resp *proto.ExecResponse) error
@@ -171,64 +170,6 @@ func (d *Controller) Delete(ctx context.Context, conversationID string) error {
return d.eventLog.DeleteEvents(ctx, conversationID)
}
-// Fork forks an event log from a specific conversation up to a checkpoint.
-func (d *Controller) Fork(ctx context.Context, srcConversationID string, srcSeq int32, destConversationID string) (string, error) {
- if srcConversationID == "" {
- return "", fmt.Errorf("src_conversation_id is required")
- }
- // TODO(anj-s): Check whether destination ID already exists and reject collisions.
- if destConversationID == "" {
- destConversationID = uuid.NewString()
- }
-
- events, err := d.eventLog.Events(ctx, srcConversationID)
- if err != nil {
- return "", fmt.Errorf("failed to retrieve source events: %w", err)
- }
- if len(events) == 0 {
- return "", fmt.Errorf("source conversation %s not found or has no events", srcConversationID)
- }
-
- // When the caller specifies srcSeq, require that it actually exists in
- // the source event log. Without this check a typo or stale checkpoint
- // silently degrades to "fork all events", which is misleading. Walk
- // the events once: stop as soon as we pass the requested seq, and
- // truncate the slice on an exact match so the copy loop below doesn't
- // need to re-check the bound.
- if srcSeq > 0 {
- found := false
- for i, ev := range events {
- if ev.Seq == srcSeq {
- events = events[:i+1]
- found = true
- break
- }
- if ev.Seq > srcSeq {
- break
- }
- }
- if !found {
- return "", fmt.Errorf("src_seq %d not found in conversation %s", srcSeq, srcConversationID)
- }
- }
-
- for _, ev := range events {
- // Clone the event to update the conversation ID.
- newEvent := &proto.ConversationEvent{
- ConversationId: destConversationID,
- Seq: ev.Seq,
- ExecId: ev.ExecId,
- Messages: ev.Messages,
- State: ev.State,
- }
- if _, err := d.eventLog.Append(ctx, newEvent); err != nil {
- return "", fmt.Errorf("failed to append forked event: %w", err)
- }
- }
-
- return destConversationID, nil
-}
-
// Registry returns the agent registry.
func (d *Controller) Registry() *Registry {
return d.registry
diff --git a/internal/controller2/fork_test.go b/internal/controller2/fork_test.go
deleted file mode 100644
index 2946d4a..0000000
--- a/internal/controller2/fork_test.go
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright 2026 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package controller2
-
-import (
- "context"
- "testing"
-
- "github.com/google/ax/internal/controller/executor"
- "github.com/google/ax/internal/controller/executor/executortest"
- "github.com/google/ax/proto"
-)
-
-func TestController_Fork(t *testing.T) {
- ctx := context.Background()
- srcCID := "src-conv"
- destCID := "dest-conv"
-
- log := &executortest.MemoryEventLog{}
- // Pre-populate history
- log.AllEvents = []*proto.ConversationEvent{
- {
- ConversationId: srcCID,
- Seq: 1,
- Messages: []*proto.Message{
- {Role: "user", Content: &proto.Content{Type: &proto.Content_Text{Text: &proto.TextContent{Text: "msg 1"}}}},
- },
- State: proto.State_STATE_COMPLETED,
- },
- {
- ConversationId: srcCID,
- Seq: 2,
- Messages: []*proto.Message{
- {Role: "assistant", Content: &proto.Content{Type: &proto.Content_Text{Text: &proto.TextContent{Text: "msg 2"}}}},
- },
- State: proto.State_STATE_COMPLETED,
- },
- }
-
- reg := NewRegistry()
- c, err := New(ctx, Config{
- Registry: reg,
- EventLogBuilder: func() (executor.EventLog, error) {
- return log, nil
- },
- })
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- // Case 1: Fork without seq (should copy all)
- forkedID, err := c.Fork(ctx, srcCID, 0, destCID)
- if err != nil {
- t.Fatal(err)
- }
- if forkedID != destCID {
- t.Fatalf("expected destCID %s, got %s", destCID, forkedID)
- }
-
- events, err := log.Events(ctx, destCID)
- if err != nil {
- t.Fatal(err)
- }
- if len(events) != 2 {
- t.Fatalf("expected 2 events, got %d", len(events))
- }
- if events[0].Seq != 1 || events[1].Seq != 2 {
- t.Errorf("sequences mismatch")
- }
-
- // Case 2: Fork with seq 1
- destCID2 := "dest-conv-2"
- forkedID2, err := c.Fork(ctx, srcCID, 1, destCID2)
- if err != nil {
- t.Fatal(err)
- }
- if forkedID2 != destCID2 {
- t.Fatalf("expected destCID2 %s, got %s", destCID2, forkedID2)
- }
-
- events2, err := log.Events(ctx, destCID2)
- if err != nil {
- t.Fatal(err)
- }
- if len(events2) != 1 {
- t.Fatalf("expected 1 event, got %d", len(events2))
- }
- if events2[0].Seq != 1 {
- t.Errorf("expected seq 1, got %d", events2[0].Seq)
- }
-}
-
-func TestController_Fork_SrcSeqNotFound(t *testing.T) {
- ctx := context.Background()
- srcCID := "src-conv"
-
- log := &executortest.MemoryEventLog{}
- log.AllEvents = []*proto.ConversationEvent{
- {
- ConversationId: srcCID,
- Seq: 1,
- Messages: []*proto.Message{
- {Role: "user", Content: &proto.Content{Type: &proto.Content_Text{Text: &proto.TextContent{Text: "msg 1"}}}},
- },
- State: proto.State_STATE_COMPLETED,
- },
- {
- ConversationId: srcCID,
- Seq: 2,
- Messages: []*proto.Message{
- {Role: "assistant", Content: &proto.Content{Type: &proto.Content_Text{Text: &proto.TextContent{Text: "msg 2"}}}},
- },
- State: proto.State_STATE_COMPLETED,
- },
- }
-
- reg := NewRegistry()
- c, err := New(ctx, Config{
- Registry: reg,
- EventLogBuilder: func() (executor.EventLog, error) {
- return log, nil
- },
- })
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- // Non-existent src_seq must error and write nothing.
- if _, err := c.Fork(ctx, srcCID, 99, "dest-conv"); err == nil {
- t.Fatal("expected error when src_seq does not exist, got nil")
- }
- events, err := log.Events(ctx, "dest-conv")
- if err != nil {
- t.Fatal(err)
- }
- if len(events) != 0 {
- t.Fatalf("expected 0 events on failed fork, got %d", len(events))
- }
-
- // src_seq exactly at the max is valid and must succeed.
- if _, err := c.Fork(ctx, srcCID, 2, "dest-conv-boundary"); err != nil {
- t.Fatalf("unexpected error forking at boundary src_seq: %v", err)
- }
-}
diff --git a/internal/server/server.go b/internal/server/server.go
index c76d518..22a2296 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -76,38 +76,6 @@ func (s *Server) Exec(req *proto.ExecRequest, stream grpc.ServerStreamingServer[
return err
}
-func (s *Server) ForkConversation(ctx context.Context, req *proto.ForkConversationRequest) (*proto.ForkConversationResponse, error) {
- slog.InfoContext(ctx, "Forking conversation...",
- slog.String("src_conversation_id", req.SrcConversationId),
- slog.Int("src_seq", int(req.SrcSeq)),
- slog.String("dest_conversation_id", req.DestConversationId))
-
- if req.SrcConversationId == "" {
- return nil, status.Errorf(codes.InvalidArgument, "src_conversation_id is required")
- }
- // dest_conversation_id must be supplied by the caller: the substrate
- // router uses it to bring up the actor for the new conversation
- // before the request reaches this handler, so an empty value here
- // would mean no actor was provisioned.
- // TODO: consider relaxing this requirement.
- if req.DestConversationId == "" {
- return nil, status.Errorf(codes.InvalidArgument, "dest_conversation_id is required")
- }
-
- inFlight, cleanup := s.markInFlight(req.DestConversationId)
- if inFlight {
- return nil, status.Errorf(codes.FailedPrecondition, "conversation %q is already in flight", req.DestConversationId)
- }
- defer cleanup()
-
- destID, err := s.controller.Fork(ctx, req.SrcConversationId, req.SrcSeq, req.DestConversationId)
- if err != nil {
- return nil, status.Errorf(codes.Internal, "failed to fork conversation: %v", err)
- }
- go suspendActor(destID) // TODO(jbd): Move to an interceptor.
- return &proto.ForkConversationResponse{ConversationId: destID}, nil
-}
-
func (s *Server) DeleteConversation(ctx context.Context, req *proto.DeleteConversationRequest) (*proto.DeleteConversationResponse, error) {
slog.InfoContext(ctx, "Deleting conversation...",
slog.String("conversation_id", req.ConversationId))
diff --git a/internal/server/server_harness.go b/internal/server/server_harness.go
index 5372f5a..d04444b 100644
--- a/internal/server/server_harness.go
+++ b/internal/server/server_harness.go
@@ -74,36 +74,6 @@ func (s *Server) Exec(req *proto.ExecRequest, stream grpc.ServerStreamingServer[
return s.controller.Exec(ctx, req, outputHandler)
}
-func (s *Server) ForkConversation(ctx context.Context, req *proto.ForkConversationRequest) (*proto.ForkConversationResponse, error) {
- slog.InfoContext(ctx, "Forking conversation...",
- slog.String("src_conversation_id", req.SrcConversationId),
- slog.Int("src_seq", int(req.SrcSeq)),
- slog.String("dest_conversation_id", req.DestConversationId))
-
- if req.SrcConversationId == "" {
- return nil, status.Errorf(codes.InvalidArgument, "src_conversation_id is required")
- }
- // dest_conversation_id must be supplied by the caller: the substrate
- // router uses it to bring up the actor for the new conversation
- // before the request reaches this handler, so an empty value here
- // would mean no actor was provisioned.
- // TODO: consider relaxing this requirement.
- if req.DestConversationId == "" {
- return nil, status.Errorf(codes.InvalidArgument, "dest_conversation_id is required")
- }
-
- inFlight, cleanup := s.markInFlight(req.DestConversationId)
- if inFlight {
- return nil, status.Errorf(codes.FailedPrecondition, "conversation %q is already in flight", req.DestConversationId)
- }
- defer cleanup()
-
- destID, err := s.controller.Fork(ctx, req.SrcConversationId, req.SrcSeq, req.DestConversationId)
- if err != nil {
- return nil, status.Errorf(codes.Internal, "failed to fork conversation: %v", err)
- }
- return &proto.ForkConversationResponse{ConversationId: destID}, nil
-}
func (s *Server) DeleteConversation(ctx context.Context, req *proto.DeleteConversationRequest) (*proto.DeleteConversationResponse, error) {
slog.InfoContext(ctx, "Deleting conversation...",
diff --git a/internal/server/server_harness_test.go b/internal/server/server_harness_test.go
deleted file mode 100644
index c907c04..0000000
--- a/internal/server/server_harness_test.go
+++ /dev/null
@@ -1,119 +0,0 @@
-//go:build harness
-
-// Copyright 2026 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package server
-
-import (
- "context"
- "testing"
-
- "github.com/google/ax/internal/controller/executor"
- "github.com/google/ax/internal/controller/executor/executortest"
- "github.com/google/ax/internal/controller2"
- "github.com/google/ax/proto"
-)
-
-func TestServer_Fork(t *testing.T) {
- ctx := context.Background()
- srcCID := "src-conv"
- destCID := "dest-conv"
-
- log := &executortest.MemoryEventLog{}
- log.AllEvents = []*proto.ConversationEvent{
- {
- ConversationId: srcCID,
- Seq: 1,
- Messages: []*proto.Message{
- {Role: "user", Content: &proto.Content{Type: &proto.Content_Text{Text: &proto.TextContent{Text: "msg 1"}}}},
- },
- State: proto.State_STATE_COMPLETED,
- },
- }
-
- c, err := controller2.New(ctx, controller2.Config{
- Registry: controller2.NewRegistry(),
- EventLogBuilder: func() (executor.EventLog, error) {
- return log, nil
- },
- })
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- s := New(c)
-
- resp, err := s.ForkConversation(ctx, &proto.ForkConversationRequest{
- SrcConversationId: srcCID,
- DestConversationId: destCID,
- })
- if err != nil {
- t.Fatal(err)
- }
-
- if resp.ConversationId != destCID {
- t.Fatalf("expected destCID %s, got %s", destCID, resp.ConversationId)
- }
-
- events, err := log.Events(ctx, destCID)
- if err != nil {
- t.Fatal(err)
- }
- if len(events) != 1 {
- t.Fatalf("expected 1 event, got %d", len(events))
- }
-}
-
-// TestServer_Fork_RequiresDestID verifies that ForkConversation rejects
-// a request without DestConversationId. The substrate router relies on
-// the dest ID to bring up the conversation's actor before the handler
-// runs, so we can't accept empty IDs at this layer.
-func TestServer_Fork_RequiresDestID(t *testing.T) {
- ctx := context.Background()
- srcCID := "src-conv"
-
- log := &executortest.MemoryEventLog{}
- log.AllEvents = []*proto.ConversationEvent{
- {
- ConversationId: srcCID,
- Seq: 1,
- Messages: []*proto.Message{
- {Role: "user", Content: &proto.Content{Type: &proto.Content_Text{Text: &proto.TextContent{Text: "msg 1"}}}},
- },
- State: proto.State_STATE_COMPLETED,
- },
- }
-
- c, err := controller2.New(ctx, controller2.Config{
- Registry: controller2.NewRegistry(),
- EventLogBuilder: func() (executor.EventLog, error) {
- return log, nil
- },
- })
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- s := New(c)
-
- if _, err := s.ForkConversation(ctx, &proto.ForkConversationRequest{
- SrcConversationId: srcCID,
- // DestConversationId intentionally left empty.
- }); err == nil {
- t.Fatal("expected InvalidArgument when DestConversationId is empty, got nil")
- }
-}
diff --git a/internal/server/server_test.go b/internal/server/server_test.go
deleted file mode 100644
index 09b3d28..0000000
--- a/internal/server/server_test.go
+++ /dev/null
@@ -1,131 +0,0 @@
-//go:build !harness
-
-// Copyright 2026 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package server
-
-import (
- "context"
- "testing"
-
- "github.com/google/ax/internal/agent"
- "github.com/google/ax/internal/controller"
- "github.com/google/ax/internal/controller/executor"
- "github.com/google/ax/internal/controller/executor/executortest"
- "github.com/google/ax/proto"
-)
-
-type dummyAgent struct{}
-
-func (a *dummyAgent) Connect(ctx context.Context, conversationID string, execID string, start *proto.AgentStart, e agent.Executor, o agent.OutputHandler) error {
- return nil
-}
-func (a *dummyAgent) Close() error { return nil }
-
-func TestServer_Fork(t *testing.T) {
- ctx := context.Background()
- srcCID := "src-conv"
- destCID := "dest-conv"
-
- log := &executortest.MemoryEventLog{}
- log.AllEvents = []*proto.ConversationEvent{
- {
- ConversationId: srcCID,
- Seq: 1,
- Messages: []*proto.Message{
- {Role: "user", Content: &proto.Content{Type: &proto.Content_Text{Text: &proto.TextContent{Text: "msg 1"}}}},
- },
- State: proto.State_STATE_COMPLETED,
- },
- }
-
- c, err := controller.New(ctx, controller.Config{
- EventLogBuilder: func() (executor.EventLog, error) {
- return log, nil
- },
- PlannerBuilder: func(ctx context.Context, r *controller.Registry) (agent.Agent, error) {
- return &dummyAgent{}, nil
- },
- })
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- s := New(c)
-
- resp, err := s.ForkConversation(ctx, &proto.ForkConversationRequest{
- SrcConversationId: srcCID,
- DestConversationId: destCID,
- })
- if err != nil {
- t.Fatal(err)
- }
-
- if resp.ConversationId != destCID {
- t.Fatalf("expected destCID %s, got %s", destCID, resp.ConversationId)
- }
-
- events, err := log.Events(ctx, destCID)
- if err != nil {
- t.Fatal(err)
- }
- if len(events) != 1 {
- t.Fatalf("expected 1 event, got %d", len(events))
- }
-}
-
-// TestServer_Fork_RequiresDestID verifies that ForkConversation rejects
-// a request without DestConversationId. The substrate router relies on
-// the dest ID to bring up the conversation's actor before the handler
-// runs, so we can't accept empty IDs at this layer.
-func TestServer_Fork_RequiresDestID(t *testing.T) {
- ctx := context.Background()
- srcCID := "src-conv"
-
- log := &executortest.MemoryEventLog{}
- log.AllEvents = []*proto.ConversationEvent{
- {
- ConversationId: srcCID,
- Seq: 1,
- Messages: []*proto.Message{
- {Role: "user", Content: &proto.Content{Type: &proto.Content_Text{Text: &proto.TextContent{Text: "msg 1"}}}},
- },
- State: proto.State_STATE_COMPLETED,
- },
- }
-
- c, err := controller.New(ctx, controller.Config{
- EventLogBuilder: func() (executor.EventLog, error) {
- return log, nil
- },
- PlannerBuilder: func(ctx context.Context, r *controller.Registry) (agent.Agent, error) {
- return &dummyAgent{}, nil
- },
- })
- if err != nil {
- t.Fatal(err)
- }
- defer c.Close()
-
- s := New(c)
-
- if _, err := s.ForkConversation(ctx, &proto.ForkConversationRequest{
- SrcConversationId: srcCID,
- // DestConversationId intentionally left empty.
- }); err == nil {
- t.Fatal("expected InvalidArgument when DestConversationId is empty, got nil")
- }
-}
diff --git a/proto/ax.pb.go b/proto/ax.pb.go
index e02fe5d..ad70d56 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 v7.34.1
+// protoc v5.28.2
// source: proto/ax.proto
package proto
@@ -1365,115 +1365,6 @@ func (*DeleteConversationResponse) Descriptor() ([]byte, []int) {
return file_proto_ax_proto_rawDescGZIP(), []int{19}
}
-type ForkConversationRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // Required: The source conversation ID to fork from.
- SrcConversationId string `protobuf:"bytes,1,opt,name=src_conversation_id,json=srcConversationId,proto3" json:"src_conversation_id,omitempty"`
- // Optional: The sequence number to fork from.
- // Defaults to the latest sequence if not set or set to 0.
- SrcSeq int32 `protobuf:"varint,2,opt,name=src_seq,json=srcSeq,proto3" json:"src_seq,omitempty"` // TODO(jbd): Replace this with snapshot_id.
- // Optional: The destination conversation ID.
- // Generates a new UUID if not provided.
- DestConversationId string `protobuf:"bytes,3,opt,name=dest_conversation_id,json=destConversationId,proto3" json:"dest_conversation_id,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *ForkConversationRequest) Reset() {
- *x = ForkConversationRequest{}
- mi := &file_proto_ax_proto_msgTypes[20]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *ForkConversationRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ForkConversationRequest) ProtoMessage() {}
-
-func (x *ForkConversationRequest) ProtoReflect() protoreflect.Message {
- mi := &file_proto_ax_proto_msgTypes[20]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use ForkConversationRequest.ProtoReflect.Descriptor instead.
-func (*ForkConversationRequest) Descriptor() ([]byte, []int) {
- return file_proto_ax_proto_rawDescGZIP(), []int{20}
-}
-
-func (x *ForkConversationRequest) GetSrcConversationId() string {
- if x != nil {
- return x.SrcConversationId
- }
- return ""
-}
-
-func (x *ForkConversationRequest) GetSrcSeq() int32 {
- if x != nil {
- return x.SrcSeq
- }
- return 0
-}
-
-func (x *ForkConversationRequest) GetDestConversationId() string {
- if x != nil {
- return x.DestConversationId
- }
- return ""
-}
-
-type ForkConversationResponse struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- ConversationId string `protobuf:"bytes,1,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"` // The ID of the new conversation
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *ForkConversationResponse) Reset() {
- *x = ForkConversationResponse{}
- mi := &file_proto_ax_proto_msgTypes[21]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *ForkConversationResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ForkConversationResponse) ProtoMessage() {}
-
-func (x *ForkConversationResponse) ProtoReflect() protoreflect.Message {
- mi := &file_proto_ax_proto_msgTypes[21]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use ForkConversationResponse.ProtoReflect.Descriptor instead.
-func (*ForkConversationResponse) Descriptor() ([]byte, []int) {
- return file_proto_ax_proto_rawDescGZIP(), []int{21}
-}
-
-func (x *ForkConversationResponse) GetConversationId() string {
- if x != nil {
- return x.ConversationId
- }
- return ""
-}
-
var File_proto_ax_proto protoreflect.FileDescriptor
const file_proto_ax_proto_rawDesc = "" +
@@ -1554,13 +1445,7 @@ const file_proto_ax_proto_rawDesc = "" +
"\x03seq\x18\x02 \x01(\x05R\x03seq\"D\n" +
"\x19DeleteConversationRequest\x12'\n" +
"\x0fconversation_id\x18\x01 \x01(\tR\x0econversationId\"\x1c\n" +
- "\x1aDeleteConversationResponse\"\x94\x01\n" +
- "\x17ForkConversationRequest\x12.\n" +
- "\x13src_conversation_id\x18\x01 \x01(\tR\x11srcConversationId\x12\x17\n" +
- "\asrc_seq\x18\x02 \x01(\x05R\x06srcSeq\x120\n" +
- "\x14dest_conversation_id\x18\x03 \x01(\tR\x12destConversationId\"C\n" +
- "\x18ForkConversationResponse\x12'\n" +
- "\x0fconversation_id\x18\x01 \x01(\tR\x0econversationId*l\n" +
+ "\x1aDeleteConversationResponse*l\n" +
"\x05State\x12\x15\n" +
"\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n" +
"\rSTATE_PENDING\x10\x01\x12\x10\n" +
@@ -1578,10 +1463,9 @@ const file_proto_ax_proto_rawDesc = "" +
"\x0eHarnessService\x126\n" +
"\aConnect\x12\x12.ax.HarnessRequest\x1a\x13.ax.HarnessResponse(\x010\x012@\n" +
"\x11ControllerService\x12+\n" +
- "\x04Exec\x12\x0f.ax.ExecRequest\x1a\x10.ax.ExecResponse0\x012\xb9\x01\n" +
+ "\x04Exec\x12\x0f.ax.ExecRequest\x1a\x10.ax.ExecResponse0\x012j\n" +
"\x13ConversationService\x12S\n" +
- "\x12DeleteConversation\x12\x1d.ax.DeleteConversationRequest\x1a\x1e.ax.DeleteConversationResponse\x12M\n" +
- "\x10ForkConversation\x12\x1b.ax.ForkConversationRequest\x1a\x1c.ax.ForkConversationResponseB\x1cZ\x1agithub.com/google/ax/protob\x06proto3"
+ "\x12DeleteConversation\x12\x1d.ax.DeleteConversationRequest\x1a\x1e.ax.DeleteConversationResponseB\x1cZ\x1agithub.com/google/ax/protob\x06proto3"
var (
file_proto_ax_proto_rawDescOnce sync.Once
@@ -1596,7 +1480,7 @@ func file_proto_ax_proto_rawDescGZIP() []byte {
}
var file_proto_ax_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
-var file_proto_ax_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
+var file_proto_ax_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
var file_proto_ax_proto_goTypes = []any{
(State)(0), // 0: ax.State
(CancelReason)(0), // 1: ax.CancelReason
@@ -1620,10 +1504,8 @@ var file_proto_ax_proto_goTypes = []any{
(*ExecResponse)(nil), // 19: ax.ExecResponse
(*DeleteConversationRequest)(nil), // 20: ax.DeleteConversationRequest
(*DeleteConversationResponse)(nil), // 21: ax.DeleteConversationResponse
- (*ForkConversationRequest)(nil), // 22: ax.ForkConversationRequest
- (*ForkConversationResponse)(nil), // 23: ax.ForkConversationResponse
- (*Content)(nil), // 24: ax.Content
- (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp
+ (*Content)(nil), // 22: ax.Content
+ (*timestamppb.Timestamp)(nil), // 23: google.protobuf.Timestamp
}
var file_proto_ax_proto_depIdxs = []int32{
7, // 0: ax.AgentStart.messages:type_name -> ax.Message
@@ -1631,13 +1513,13 @@ var file_proto_ax_proto_depIdxs = []int32{
2, // 2: ax.AgentRequest.start:type_name -> ax.AgentStart
3, // 3: ax.AgentResponse.outputs:type_name -> ax.AgentOutputs
4, // 4: ax.AgentResponse.end:type_name -> ax.AgentEnd
- 24, // 5: ax.Message.content:type_name -> ax.Content
+ 22, // 5: ax.Message.content:type_name -> ax.Content
7, // 6: ax.ConversationEvent.messages:type_name -> ax.Message
0, // 7: ax.ConversationEvent.state:type_name -> ax.State
7, // 8: ax.ExecutionEvent.inputs:type_name -> ax.Message
7, // 9: ax.ExecutionEvent.outputs:type_name -> ax.Message
0, // 10: ax.ExecutionEvent.state:type_name -> ax.State
- 25, // 11: ax.ExecutionEvent.timestamp:type_name -> google.protobuf.Timestamp
+ 23, // 11: ax.ExecutionEvent.timestamp:type_name -> google.protobuf.Timestamp
7, // 12: ax.HarnessStart.messages:type_name -> ax.Message
1, // 13: ax.HarnessCancel.reason:type_name -> ax.CancelReason
12, // 14: ax.HarnessRequest.start:type_name -> ax.HarnessStart
@@ -1653,15 +1535,13 @@ var file_proto_ax_proto_depIdxs = []int32{
14, // 24: ax.HarnessService.Connect:input_type -> ax.HarnessRequest
18, // 25: ax.ControllerService.Exec:input_type -> ax.ExecRequest
20, // 26: ax.ConversationService.DeleteConversation:input_type -> ax.DeleteConversationRequest
- 22, // 27: ax.ConversationService.ForkConversation:input_type -> ax.ForkConversationRequest
- 6, // 28: ax.AgentService.Connect:output_type -> ax.AgentResponse
- 11, // 29: ax.AgentService.HealthCheck:output_type -> ax.HealthCheckResponse
- 17, // 30: ax.HarnessService.Connect:output_type -> ax.HarnessResponse
- 19, // 31: ax.ControllerService.Exec:output_type -> ax.ExecResponse
- 21, // 32: ax.ConversationService.DeleteConversation:output_type -> ax.DeleteConversationResponse
- 23, // 33: ax.ConversationService.ForkConversation:output_type -> ax.ForkConversationResponse
- 28, // [28:34] is the sub-list for method output_type
- 22, // [22:28] is the sub-list for method input_type
+ 6, // 27: ax.AgentService.Connect:output_type -> ax.AgentResponse
+ 11, // 28: ax.AgentService.HealthCheck:output_type -> ax.HealthCheckResponse
+ 17, // 29: ax.HarnessService.Connect:output_type -> ax.HarnessResponse
+ 19, // 30: ax.ControllerService.Exec:output_type -> ax.ExecResponse
+ 21, // 31: ax.ConversationService.DeleteConversation:output_type -> ax.DeleteConversationResponse
+ 27, // [27:32] is the sub-list for method output_type
+ 22, // [22:27] is the sub-list for method input_type
22, // [22:22] is the sub-list for extension type_name
22, // [22:22] is the sub-list for extension extendee
0, // [0:22] is the sub-list for field type_name
@@ -1691,7 +1571,7 @@ func file_proto_ax_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_ax_proto_rawDesc), len(file_proto_ax_proto_rawDesc)),
NumEnums: 2,
- NumMessages: 22,
+ NumMessages: 20,
NumExtensions: 0,
NumServices: 4,
},
diff --git a/proto/ax.proto b/proto/ax.proto
index a875d6b..d6514e9 100644
--- a/proto/ax.proto
+++ b/proto/ax.proto
@@ -201,29 +201,8 @@ message DeleteConversationRequest {
message DeleteConversationResponse {}
-message ForkConversationRequest {
- // Required: The source conversation ID to fork from.
- string src_conversation_id = 1;
- // Optional: The sequence number to fork from.
- // Defaults to the latest sequence if not set or set to 0.
- int32 src_seq = 2; // TODO(jbd): Replace this with snapshot_id.
- // Optional: The destination conversation ID.
- // Generates a new UUID if not provided.
- string dest_conversation_id = 3;
-}
-
-message ForkConversationResponse {
- string conversation_id = 1; // The ID of the new conversation
-
- // TODO(jbd): Remove conversation_id, and return error if
- // dest_conversation_id already exists.
-}
-
service ConversationService {
// Deletes conversational events and all event log resources
// for its children executions.
rpc DeleteConversation(DeleteConversationRequest) returns (DeleteConversationResponse);
-
- // Fork forks an event log from a specific conversation.
- rpc ForkConversation(ForkConversationRequest) returns (ForkConversationResponse);
}
diff --git a/proto/ax_grpc.pb.go b/proto/ax_grpc.pb.go
index 42fad49..fca5623 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.6.1
-// - protoc v7.34.1
+// - protoc-gen-go-grpc v1.5.1
+// - protoc v5.28.2
// source: proto/ax.proto
package proto
@@ -119,10 +119,10 @@ type AgentServiceServer interface {
type UnimplementedAgentServiceServer struct{}
func (UnimplementedAgentServiceServer) Connect(*AgentRequest, grpc.ServerStreamingServer[AgentResponse]) error {
- return status.Error(codes.Unimplemented, "method Connect not implemented")
+ return status.Errorf(codes.Unimplemented, "method Connect not implemented")
}
func (UnimplementedAgentServiceServer) HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) {
- return nil, status.Error(codes.Unimplemented, "method HealthCheck not implemented")
+ return nil, status.Errorf(codes.Unimplemented, "method HealthCheck not implemented")
}
func (UnimplementedAgentServiceServer) mustEmbedUnimplementedAgentServiceServer() {}
func (UnimplementedAgentServiceServer) testEmbeddedByValue() {}
@@ -135,7 +135,7 @@ type UnsafeAgentServiceServer interface {
}
func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer) {
- // If the following call panics, it indicates UnimplementedAgentServiceServer was
+ // If the following call pancis, 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.
@@ -252,7 +252,7 @@ type HarnessServiceServer interface {
type UnimplementedHarnessServiceServer struct{}
func (UnimplementedHarnessServiceServer) Connect(grpc.BidiStreamingServer[HarnessRequest, HarnessResponse]) error {
- return status.Error(codes.Unimplemented, "method Connect not implemented")
+ return status.Errorf(codes.Unimplemented, "method Connect not implemented")
}
func (UnimplementedHarnessServiceServer) mustEmbedUnimplementedHarnessServiceServer() {}
func (UnimplementedHarnessServiceServer) testEmbeddedByValue() {}
@@ -265,7 +265,7 @@ type UnsafeHarnessServiceServer interface {
}
func RegisterHarnessServiceServer(s grpc.ServiceRegistrar, srv HarnessServiceServer) {
- // If the following call panics, it indicates UnimplementedHarnessServiceServer was
+ // If the following call pancis, it indicates UnimplementedHarnessServiceServer 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.
@@ -358,7 +358,7 @@ type ControllerServiceServer interface {
type UnimplementedControllerServiceServer struct{}
func (UnimplementedControllerServiceServer) Exec(*ExecRequest, grpc.ServerStreamingServer[ExecResponse]) error {
- return status.Error(codes.Unimplemented, "method Exec not implemented")
+ return status.Errorf(codes.Unimplemented, "method Exec not implemented")
}
func (UnimplementedControllerServiceServer) mustEmbedUnimplementedControllerServiceServer() {}
func (UnimplementedControllerServiceServer) testEmbeddedByValue() {}
@@ -371,7 +371,7 @@ type UnsafeControllerServiceServer interface {
}
func RegisterControllerServiceServer(s grpc.ServiceRegistrar, srv ControllerServiceServer) {
- // If the following call panics, it indicates UnimplementedControllerServiceServer was
+ // If the following call pancis, 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.
@@ -411,7 +411,6 @@ var ControllerService_ServiceDesc = grpc.ServiceDesc{
const (
ConversationService_DeleteConversation_FullMethodName = "/ax.ConversationService/DeleteConversation"
- ConversationService_ForkConversation_FullMethodName = "/ax.ConversationService/ForkConversation"
)
// ConversationServiceClient is the client API for ConversationService service.
@@ -421,8 +420,6 @@ type ConversationServiceClient interface {
// Deletes conversational events and all event log resources
// for its children executions.
DeleteConversation(ctx context.Context, in *DeleteConversationRequest, opts ...grpc.CallOption) (*DeleteConversationResponse, error)
- // Fork forks an event log from a specific conversation.
- ForkConversation(ctx context.Context, in *ForkConversationRequest, opts ...grpc.CallOption) (*ForkConversationResponse, error)
}
type conversationServiceClient struct {
@@ -443,16 +440,6 @@ func (c *conversationServiceClient) DeleteConversation(ctx context.Context, in *
return out, nil
}
-func (c *conversationServiceClient) ForkConversation(ctx context.Context, in *ForkConversationRequest, opts ...grpc.CallOption) (*ForkConversationResponse, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(ForkConversationResponse)
- err := c.cc.Invoke(ctx, ConversationService_ForkConversation_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
// ConversationServiceServer is the server API for ConversationService service.
// All implementations must embed UnimplementedConversationServiceServer
// for forward compatibility.
@@ -460,8 +447,6 @@ type ConversationServiceServer interface {
// Deletes conversational events and all event log resources
// for its children executions.
DeleteConversation(context.Context, *DeleteConversationRequest) (*DeleteConversationResponse, error)
- // Fork forks an event log from a specific conversation.
- ForkConversation(context.Context, *ForkConversationRequest) (*ForkConversationResponse, error)
mustEmbedUnimplementedConversationServiceServer()
}
@@ -473,10 +458,7 @@ type ConversationServiceServer interface {
type UnimplementedConversationServiceServer struct{}
func (UnimplementedConversationServiceServer) DeleteConversation(context.Context, *DeleteConversationRequest) (*DeleteConversationResponse, error) {
- return nil, status.Error(codes.Unimplemented, "method DeleteConversation not implemented")
-}
-func (UnimplementedConversationServiceServer) ForkConversation(context.Context, *ForkConversationRequest) (*ForkConversationResponse, error) {
- return nil, status.Error(codes.Unimplemented, "method ForkConversation not implemented")
+ return nil, status.Errorf(codes.Unimplemented, "method DeleteConversation not implemented")
}
func (UnimplementedConversationServiceServer) mustEmbedUnimplementedConversationServiceServer() {}
func (UnimplementedConversationServiceServer) testEmbeddedByValue() {}
@@ -489,7 +471,7 @@ type UnsafeConversationServiceServer interface {
}
func RegisterConversationServiceServer(s grpc.ServiceRegistrar, srv ConversationServiceServer) {
- // If the following call panics, it indicates UnimplementedConversationServiceServer was
+ // If the following call pancis, it indicates UnimplementedConversationServiceServer 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.
@@ -517,24 +499,6 @@ func _ConversationService_DeleteConversation_Handler(srv interface{}, ctx contex
return interceptor(ctx, in, info, handler)
}
-func _ConversationService_ForkConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ForkConversationRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(ConversationServiceServer).ForkConversation(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: ConversationService_ForkConversation_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(ConversationServiceServer).ForkConversation(ctx, req.(*ForkConversationRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
// ConversationService_ServiceDesc is the grpc.ServiceDesc for ConversationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -546,10 +510,6 @@ var ConversationService_ServiceDesc = grpc.ServiceDesc{
MethodName: "DeleteConversation",
Handler: _ConversationService_DeleteConversation_Handler,
},
- {
- MethodName: "ForkConversation",
- Handler: _ConversationService_ForkConversation_Handler,
- },
},
Streams: []grpc.StreamDesc{},
Metadata: "proto/ax.proto",
diff --git a/proto/content.pb.go b/proto/content.pb.go
index 807eb73..1cae4f6 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 v7.34.1
+// protoc v5.28.2
// source: proto/content.proto
package proto
diff --git a/python/proto/ax_pb2.py b/python/proto/ax_pb2.py
index 2e4ede0..d9e2ce0 100644
--- a/python/proto/ax_pb2.py
+++ b/python/proto/ax_pb2.py
@@ -14,23 +14,13 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
-# NO CHECKED-IN PROTOBUF GENCODE
# source: proto/ax.proto
-# Protobuf Python Version: 6.31.1
+# Protobuf Python Version: 4.25.1
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
-from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
-_runtime_version.ValidateProtobufRuntimeVersion(
- _runtime_version.Domain.PUBLIC,
- 6,
- 31,
- 1,
- '',
- 'proto/ax.proto'
-)
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
@@ -40,18 +30,18 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__
from proto import content_pb2 as proto_dot_content__pb2
-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eproto/ax.proto\x12\x02\x61x\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13proto/content.proto\"S\n\nAgentStart\x12\x10\n\x08\x61gent_id\x18\x01 \x01(\t\x12\x14\n\x0c\x61gent_config\x18\x02 \x01(\x0c\x12\x1d\n\x08messages\x18\x03 \x03(\x0b\x32\x0b.ax.Message\"-\n\x0c\x41gentOutputs\x12\x1d\n\x08messages\x18\x01 \x03(\x0b\x32\x0b.ax.Message\"\n\n\x08\x41gentEnd\"W\n\x0c\x41gentRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x1d\n\x05start\x18\x03 \x01(\x0b\x32\x0e.ax.AgentStart\"\x83\x01\n\rAgentResponse\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12#\n\x07outputs\x18\x03 \x01(\x0b\x32\x10.ax.AgentOutputsH\x00\x12\x1b\n\x03\x65nd\x18\x04 \x01(\x0b\x32\x0c.ax.AgentEndH\x00\x42\x06\n\x04type\"L\n\x07Message\x12\x0c\n\x04role\x18\x01 \x01(\t\x12\x1c\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x0b.ax.Content\x12\x15\n\rinternal_only\x18\x03 \x01(\x08\"\x83\x01\n\x11\x43onversationEvent\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x0b\n\x03seq\x18\x02 \x01(\x05\x12\x0f\n\x07\x65xec_id\x18\x03 \x01(\t\x12\x1d\n\x08messages\x18\x04 \x03(\x0b\x32\x0b.ax.Message\x12\x18\n\x05state\x18\x05 \x01(\x0e\x32\t.ax.State\"\xcd\x01\n\x0e\x45xecutionEvent\x12\x0f\n\x07\x65xec_id\x18\x01 \x01(\t\x12\x10\n\x08\x61gent_id\x18\x02 \x01(\t\x12\x14\n\x0c\x61gent_config\x18\x03 \x01(\x0c\x12\x1b\n\x06inputs\x18\x04 \x03(\x0b\x32\x0b.ax.Message\x12\x1c\n\x07outputs\x18\x05 \x03(\x0b\x32\x0b.ax.Message\x12\x18\n\x05state\x18\x06 \x01(\x0e\x32\t.ax.State\x12-\n\ttimestamp\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x14\n\x12HealthCheckRequest\"7\n\x13HealthCheckResponse\x12\x0f\n\x07healthy\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"E\n\x0cHarnessStart\x12\x16\n\x0eharness_config\x18\x01 \x01(\x0c\x12\x1d\n\x08messages\x18\x02 \x03(\x0b\x32\x0b.ax.Message\"1\n\rHarnessCancel\x12 \n\x06reason\x18\x01 \x01(\x0e\x32\x10.ax.CancelReason\"\x8d\x01\n\x0eHarnessRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x12\n\nharness_id\x18\x02 \x01(\t\x12!\n\x05start\x18\x03 \x01(\x0b\x32\x10.ax.HarnessStartH\x00\x12#\n\x06\x63\x61ncel\x18\x04 \x01(\x0b\x32\x11.ax.HarnessCancelH\x00\x42\x06\n\x04type\"/\n\x0eHarnessOutputs\x12\x1d\n\x08messages\x18\x01 \x03(\x0b\x32\x0b.ax.Message\"=\n\nHarnessEnd\x12\x18\n\x05state\x18\x01 \x01(\x0e\x32\t.ax.State\x12\x15\n\rerror_message\x18\x02 \x01(\t\"x\n\x0fHarnessResponse\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12%\n\x07outputs\x18\x02 \x01(\x0b\x32\x12.ax.HarnessOutputsH\x00\x12\x1d\n\x03\x65nd\x18\x03 \x01(\x0b\x32\x0e.ax.HarnessEndH\x00\x42\x06\n\x04type\"}\n\x0b\x45xecRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x1b\n\x06inputs\x18\x02 \x03(\x0b\x32\x0b.ax.Message\x12\x10\n\x08last_seq\x18\x03 \x01(\x05\x12\x10\n\x08\x61gent_id\x18\x04 \x01(\t\x12\x14\n\x0c\x61gent_config\x18\x05 \x01(\x0c\"9\n\x0c\x45xecResponse\x12\x1c\n\x07outputs\x18\x01 \x03(\x0b\x32\x0b.ax.Message\x12\x0b\n\x03seq\x18\x02 \x01(\x05\"4\n\x19\x44\x65leteConversationRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\"\x1c\n\x1a\x44\x65leteConversationResponse\"e\n\x17\x46orkConversationRequest\x12\x1b\n\x13src_conversation_id\x18\x01 \x01(\t\x12\x0f\n\x07src_seq\x18\x02 \x01(\x05\x12\x1c\n\x14\x64\x65st_conversation_id\x18\x03 \x01(\t\"3\n\x18\x46orkConversationResponse\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t*l\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n\rSTATE_PENDING\x10\x01\x12\x10\n\x0cSTATE_FAILED\x10\x02\x12\x13\n\x0fSTATE_COMPLETED\x10\x03\x12\x12\n\x0eSTATE_CANCELED\x10\x04*\x8c\x01\n\x0c\x43\x61ncelReason\x12\x1d\n\x19\x43\x41NCEL_REASON_UNSPECIFIED\x10\x00\x12 \n\x1c\x43\x41NCEL_REASON_USER_REQUESTED\x10\x01\x12\x19\n\x15\x43\x41NCEL_REASON_TIMEOUT\x10\x02\x12 \n\x1c\x43\x41NCEL_REASON_INTERNAL_ERROR\x10\x03\x32\x80\x01\n\x0c\x41gentService\x12\x30\n\x07\x43onnect\x12\x10.ax.AgentRequest\x1a\x11.ax.AgentResponse0\x01\x12>\n\x0bHealthCheck\x12\x16.ax.HealthCheckRequest\x1a\x17.ax.HealthCheckResponse2H\n\x0eHarnessService\x12\x36\n\x07\x43onnect\x12\x12.ax.HarnessRequest\x1a\x13.ax.HarnessResponse(\x01\x30\x01\x32@\n\x11\x43ontrollerService\x12+\n\x04\x45xec\x12\x0f.ax.ExecRequest\x1a\x10.ax.ExecResponse0\x01\x32\xb9\x01\n\x13\x43onversationService\x12S\n\x12\x44\x65leteConversation\x12\x1d.ax.DeleteConversationRequest\x1a\x1e.ax.DeleteConversationResponse\x12M\n\x10\x46orkConversation\x12\x1b.ax.ForkConversationRequest\x1a\x1c.ax.ForkConversationResponseB\x1cZ\x1agithub.com/google/ax/protob\x06proto3')
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eproto/ax.proto\x12\x02\x61x\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13proto/content.proto\"S\n\nAgentStart\x12\x10\n\x08\x61gent_id\x18\x01 \x01(\t\x12\x14\n\x0c\x61gent_config\x18\x02 \x01(\x0c\x12\x1d\n\x08messages\x18\x03 \x03(\x0b\x32\x0b.ax.Message\"-\n\x0c\x41gentOutputs\x12\x1d\n\x08messages\x18\x01 \x03(\x0b\x32\x0b.ax.Message\"\n\n\x08\x41gentEnd\"W\n\x0c\x41gentRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x1d\n\x05start\x18\x03 \x01(\x0b\x32\x0e.ax.AgentStart\"\x83\x01\n\rAgentResponse\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12#\n\x07outputs\x18\x03 \x01(\x0b\x32\x10.ax.AgentOutputsH\x00\x12\x1b\n\x03\x65nd\x18\x04 \x01(\x0b\x32\x0c.ax.AgentEndH\x00\x42\x06\n\x04type\"L\n\x07Message\x12\x0c\n\x04role\x18\x01 \x01(\t\x12\x1c\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x0b.ax.Content\x12\x15\n\rinternal_only\x18\x03 \x01(\x08\"\x83\x01\n\x11\x43onversationEvent\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x0b\n\x03seq\x18\x02 \x01(\x05\x12\x0f\n\x07\x65xec_id\x18\x03 \x01(\t\x12\x1d\n\x08messages\x18\x04 \x03(\x0b\x32\x0b.ax.Message\x12\x18\n\x05state\x18\x05 \x01(\x0e\x32\t.ax.State\"\xcd\x01\n\x0e\x45xecutionEvent\x12\x0f\n\x07\x65xec_id\x18\x01 \x01(\t\x12\x10\n\x08\x61gent_id\x18\x02 \x01(\t\x12\x14\n\x0c\x61gent_config\x18\x03 \x01(\x0c\x12\x1b\n\x06inputs\x18\x04 \x03(\x0b\x32\x0b.ax.Message\x12\x1c\n\x07outputs\x18\x05 \x03(\x0b\x32\x0b.ax.Message\x12\x18\n\x05state\x18\x06 \x01(\x0e\x32\t.ax.State\x12-\n\ttimestamp\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x14\n\x12HealthCheckRequest\"7\n\x13HealthCheckResponse\x12\x0f\n\x07healthy\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"E\n\x0cHarnessStart\x12\x16\n\x0eharness_config\x18\x01 \x01(\x0c\x12\x1d\n\x08messages\x18\x02 \x03(\x0b\x32\x0b.ax.Message\"1\n\rHarnessCancel\x12 \n\x06reason\x18\x01 \x01(\x0e\x32\x10.ax.CancelReason\"\x8d\x01\n\x0eHarnessRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x12\n\nharness_id\x18\x02 \x01(\t\x12!\n\x05start\x18\x03 \x01(\x0b\x32\x10.ax.HarnessStartH\x00\x12#\n\x06\x63\x61ncel\x18\x04 \x01(\x0b\x32\x11.ax.HarnessCancelH\x00\x42\x06\n\x04type\"/\n\x0eHarnessOutputs\x12\x1d\n\x08messages\x18\x01 \x03(\x0b\x32\x0b.ax.Message\"=\n\nHarnessEnd\x12\x18\n\x05state\x18\x01 \x01(\x0e\x32\t.ax.State\x12\x15\n\rerror_message\x18\x02 \x01(\t\"x\n\x0fHarnessResponse\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12%\n\x07outputs\x18\x02 \x01(\x0b\x32\x12.ax.HarnessOutputsH\x00\x12\x1d\n\x03\x65nd\x18\x03 \x01(\x0b\x32\x0e.ax.HarnessEndH\x00\x42\x06\n\x04type\"}\n\x0b\x45xecRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x1b\n\x06inputs\x18\x02 \x03(\x0b\x32\x0b.ax.Message\x12\x10\n\x08last_seq\x18\x03 \x01(\x05\x12\x10\n\x08\x61gent_id\x18\x04 \x01(\t\x12\x14\n\x0c\x61gent_config\x18\x05 \x01(\x0c\"9\n\x0c\x45xecResponse\x12\x1c\n\x07outputs\x18\x01 \x03(\x0b\x32\x0b.ax.Message\x12\x0b\n\x03seq\x18\x02 \x01(\x05\"4\n\x19\x44\x65leteConversationRequest\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\"\x1c\n\x1a\x44\x65leteConversationResponse*l\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n\rSTATE_PENDING\x10\x01\x12\x10\n\x0cSTATE_FAILED\x10\x02\x12\x13\n\x0fSTATE_COMPLETED\x10\x03\x12\x12\n\x0eSTATE_CANCELED\x10\x04*\x8c\x01\n\x0c\x43\x61ncelReason\x12\x1d\n\x19\x43\x41NCEL_REASON_UNSPECIFIED\x10\x00\x12 \n\x1c\x43\x41NCEL_REASON_USER_REQUESTED\x10\x01\x12\x19\n\x15\x43\x41NCEL_REASON_TIMEOUT\x10\x02\x12 \n\x1c\x43\x41NCEL_REASON_INTERNAL_ERROR\x10\x03\x32\x80\x01\n\x0c\x41gentService\x12\x30\n\x07\x43onnect\x12\x10.ax.AgentRequest\x1a\x11.ax.AgentResponse0\x01\x12>\n\x0bHealthCheck\x12\x16.ax.HealthCheckRequest\x1a\x17.ax.HealthCheckResponse2H\n\x0eHarnessService\x12\x36\n\x07\x43onnect\x12\x12.ax.HarnessRequest\x1a\x13.ax.HarnessResponse(\x01\x30\x01\x32@\n\x11\x43ontrollerService\x12+\n\x04\x45xec\x12\x0f.ax.ExecRequest\x1a\x10.ax.ExecResponse0\x01\x32j\n\x13\x43onversationService\x12S\n\x12\x44\x65leteConversation\x12\x1d.ax.DeleteConversationRequest\x1a\x1e.ax.DeleteConversationResponseB\x1cZ\x1agithub.com/google/ax/protob\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.ax_pb2', _globals)
-if not _descriptor._USE_C_DESCRIPTORS:
- _globals['DESCRIPTOR']._loaded_options = None
+if _descriptor._USE_C_DESCRIPTORS == False:
+ _globals['DESCRIPTOR']._options = None
_globals['DESCRIPTOR']._serialized_options = b'Z\032github.com/google/ax/proto'
- _globals['_STATE']._serialized_start=1868
- _globals['_STATE']._serialized_end=1976
- _globals['_CANCELREASON']._serialized_start=1979
- _globals['_CANCELREASON']._serialized_end=2119
+ _globals['_STATE']._serialized_start=1712
+ _globals['_STATE']._serialized_end=1820
+ _globals['_CANCELREASON']._serialized_start=1823
+ _globals['_CANCELREASON']._serialized_end=1963
_globals['_AGENTSTART']._serialized_start=76
_globals['_AGENTSTART']._serialized_end=159
_globals['_AGENTOUTPUTS']._serialized_start=161
@@ -92,16 +82,12 @@ if not _descriptor._USE_C_DESCRIPTORS:
_globals['_DELETECONVERSATIONREQUEST']._serialized_end=1680
_globals['_DELETECONVERSATIONRESPONSE']._serialized_start=1682
_globals['_DELETECONVERSATIONRESPONSE']._serialized_end=1710
- _globals['_FORKCONVERSATIONREQUEST']._serialized_start=1712
- _globals['_FORKCONVERSATIONREQUEST']._serialized_end=1813
- _globals['_FORKCONVERSATIONRESPONSE']._serialized_start=1815
- _globals['_FORKCONVERSATIONRESPONSE']._serialized_end=1866
- _globals['_AGENTSERVICE']._serialized_start=2122
- _globals['_AGENTSERVICE']._serialized_end=2250
- _globals['_HARNESSSERVICE']._serialized_start=2252
- _globals['_HARNESSSERVICE']._serialized_end=2324
- _globals['_CONTROLLERSERVICE']._serialized_start=2326
- _globals['_CONTROLLERSERVICE']._serialized_end=2390
- _globals['_CONVERSATIONSERVICE']._serialized_start=2393
- _globals['_CONVERSATIONSERVICE']._serialized_end=2578
+ _globals['_AGENTSERVICE']._serialized_start=1966
+ _globals['_AGENTSERVICE']._serialized_end=2094
+ _globals['_HARNESSSERVICE']._serialized_start=2096
+ _globals['_HARNESSSERVICE']._serialized_end=2168
+ _globals['_CONTROLLERSERVICE']._serialized_start=2170
+ _globals['_CONTROLLERSERVICE']._serialized_end=2234
+ _globals['_CONVERSATIONSERVICE']._serialized_start=2236
+ _globals['_CONVERSATIONSERVICE']._serialized_end=2342
# @@protoc_insertion_point(module_scope)
diff --git a/python/proto/ax_pb2_grpc.py b/python/proto/ax_pb2_grpc.py
index bb7516d..b46662d 100644
--- a/python/proto/ax_pb2_grpc.py
+++ b/python/proto/ax_pb2_grpc.py
@@ -15,29 +15,9 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
-import warnings
from proto import ax_pb2 as proto_dot_ax__pb2
-GRPC_GENERATED_VERSION = '1.80.0'
-GRPC_VERSION = grpc.__version__
-_version_not_supported = False
-
-try:
- from grpc._utilities import first_version_is_lower
- _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
-except ImportError:
- _version_not_supported = True
-
-if _version_not_supported:
- raise RuntimeError(
- f'The grpc package installed is at version {GRPC_VERSION},'
- + ' but the generated code in proto/ax_pb2_grpc.py depends on'
- + f' grpcio>={GRPC_GENERATED_VERSION}.'
- + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
- + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
- )
-
class AgentServiceStub(object):
"""AgentService defines the gRPC service for agent communication.
@@ -59,12 +39,12 @@ class AgentServiceStub(object):
'/ax.AgentService/Connect',
request_serializer=proto_dot_ax__pb2.AgentRequest.SerializeToString,
response_deserializer=proto_dot_ax__pb2.AgentResponse.FromString,
- _registered_method=True)
+ )
self.HealthCheck = channel.unary_unary(
'/ax.AgentService/HealthCheck',
request_serializer=proto_dot_ax__pb2.HealthCheckRequest.SerializeToString,
response_deserializer=proto_dot_ax__pb2.HealthCheckResponse.FromString,
- _registered_method=True)
+ )
class AgentServiceServicer(object):
@@ -108,7 +88,6 @@ def add_AgentServiceServicer_to_server(servicer, server):
generic_handler = grpc.method_handlers_generic_handler(
'ax.AgentService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
- server.add_registered_method_handlers('ax.AgentService', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
@@ -133,21 +112,11 @@ class AgentService(object):
wait_for_ready=None,
timeout=None,
metadata=None):
- return grpc.experimental.unary_stream(
- request,
- target,
- '/ax.AgentService/Connect',
+ return grpc.experimental.unary_stream(request, target, '/ax.AgentService/Connect',
proto_dot_ax__pb2.AgentRequest.SerializeToString,
proto_dot_ax__pb2.AgentResponse.FromString,
- options,
- channel_credentials,
- insecure,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- _registered_method=True)
+ options, channel_credentials,
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def HealthCheck(request,
@@ -160,21 +129,11 @@ class AgentService(object):
wait_for_ready=None,
timeout=None,
metadata=None):
- return grpc.experimental.unary_unary(
- request,
- target,
- '/ax.AgentService/HealthCheck',
+ return grpc.experimental.unary_unary(request, target, '/ax.AgentService/HealthCheck',
proto_dot_ax__pb2.HealthCheckRequest.SerializeToString,
proto_dot_ax__pb2.HealthCheckResponse.FromString,
- options,
- channel_credentials,
- insecure,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- _registered_method=True)
+ options, channel_credentials,
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
class HarnessServiceStub(object):
@@ -190,7 +149,7 @@ class HarnessServiceStub(object):
'/ax.HarnessService/Connect',
request_serializer=proto_dot_ax__pb2.HarnessRequest.SerializeToString,
response_deserializer=proto_dot_ax__pb2.HarnessResponse.FromString,
- _registered_method=True)
+ )
class HarnessServiceServicer(object):
@@ -218,7 +177,6 @@ def add_HarnessServiceServicer_to_server(servicer, server):
generic_handler = grpc.method_handlers_generic_handler(
'ax.HarnessService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
- server.add_registered_method_handlers('ax.HarnessService', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
@@ -236,21 +194,11 @@ class HarnessService(object):
wait_for_ready=None,
timeout=None,
metadata=None):
- return grpc.experimental.stream_stream(
- request_iterator,
- target,
- '/ax.HarnessService/Connect',
+ return grpc.experimental.stream_stream(request_iterator, target, '/ax.HarnessService/Connect',
proto_dot_ax__pb2.HarnessRequest.SerializeToString,
proto_dot_ax__pb2.HarnessResponse.FromString,
- options,
- channel_credentials,
- insecure,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- _registered_method=True)
+ options, channel_credentials,
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
class ControllerServiceStub(object):
@@ -266,7 +214,7 @@ class ControllerServiceStub(object):
'/ax.ControllerService/Exec',
request_serializer=proto_dot_ax__pb2.ExecRequest.SerializeToString,
response_deserializer=proto_dot_ax__pb2.ExecResponse.FromString,
- _registered_method=True)
+ )
class ControllerServiceServicer(object):
@@ -292,7 +240,6 @@ def add_ControllerServiceServicer_to_server(servicer, server):
generic_handler = grpc.method_handlers_generic_handler(
'ax.ControllerService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
- server.add_registered_method_handlers('ax.ControllerService', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
@@ -310,21 +257,11 @@ class ControllerService(object):
wait_for_ready=None,
timeout=None,
metadata=None):
- return grpc.experimental.unary_stream(
- request,
- target,
- '/ax.ControllerService/Exec',
+ return grpc.experimental.unary_stream(request, target, '/ax.ControllerService/Exec',
proto_dot_ax__pb2.ExecRequest.SerializeToString,
proto_dot_ax__pb2.ExecResponse.FromString,
- options,
- channel_credentials,
- insecure,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- _registered_method=True)
+ options, channel_credentials,
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
class ConversationServiceStub(object):
@@ -340,12 +277,7 @@ class ConversationServiceStub(object):
'/ax.ConversationService/DeleteConversation',
request_serializer=proto_dot_ax__pb2.DeleteConversationRequest.SerializeToString,
response_deserializer=proto_dot_ax__pb2.DeleteConversationResponse.FromString,
- _registered_method=True)
- self.ForkConversation = channel.unary_unary(
- '/ax.ConversationService/ForkConversation',
- request_serializer=proto_dot_ax__pb2.ForkConversationRequest.SerializeToString,
- response_deserializer=proto_dot_ax__pb2.ForkConversationResponse.FromString,
- _registered_method=True)
+ )
class ConversationServiceServicer(object):
@@ -359,13 +291,6 @@ class ConversationServiceServicer(object):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
- def ForkConversation(self, request, context):
- """Fork forks an event log from a specific conversation.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
def add_ConversationServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
@@ -374,16 +299,10 @@ def add_ConversationServiceServicer_to_server(servicer, server):
request_deserializer=proto_dot_ax__pb2.DeleteConversationRequest.FromString,
response_serializer=proto_dot_ax__pb2.DeleteConversationResponse.SerializeToString,
),
- 'ForkConversation': grpc.unary_unary_rpc_method_handler(
- servicer.ForkConversation,
- request_deserializer=proto_dot_ax__pb2.ForkConversationRequest.FromString,
- response_serializer=proto_dot_ax__pb2.ForkConversationResponse.SerializeToString,
- ),
}
generic_handler = grpc.method_handlers_generic_handler(
'ax.ConversationService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
- server.add_registered_method_handlers('ax.ConversationService', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
@@ -401,45 +320,8 @@ class ConversationService(object):
wait_for_ready=None,
timeout=None,
metadata=None):
- return grpc.experimental.unary_unary(
- request,
- target,
- '/ax.ConversationService/DeleteConversation',
+ return grpc.experimental.unary_unary(request, target, '/ax.ConversationService/DeleteConversation',
proto_dot_ax__pb2.DeleteConversationRequest.SerializeToString,
proto_dot_ax__pb2.DeleteConversationResponse.FromString,
- options,
- channel_credentials,
- insecure,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- _registered_method=True)
-
- @staticmethod
- def ForkConversation(request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- insecure=False,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None):
- return grpc.experimental.unary_unary(
- request,
- target,
- '/ax.ConversationService/ForkConversation',
- proto_dot_ax__pb2.ForkConversationRequest.SerializeToString,
- proto_dot_ax__pb2.ForkConversationResponse.FromString,
- options,
- channel_credentials,
- insecure,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- _registered_method=True)
+ options, channel_credentials,
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
diff --git a/python/proto/content_pb2.py b/python/proto/content_pb2.py
index dff1333..c20ef7b 100644
--- a/python/proto/content_pb2.py
+++ b/python/proto/content_pb2.py
@@ -14,23 +14,13 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
-# NO CHECKED-IN PROTOBUF GENCODE
# source: proto/content.proto
-# Protobuf Python Version: 6.31.1
+# Protobuf Python Version: 4.25.1
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
-from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
-_runtime_version.ValidateProtobufRuntimeVersion(
- _runtime_version.Domain.PUBLIC,
- 6,
- 31,
- 1,
- '',
- 'proto/content.proto'
-)
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
@@ -44,8 +34,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13proto/content.
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.content_pb2', _globals)
-if not _descriptor._USE_C_DESCRIPTORS:
- _globals['DESCRIPTOR']._loaded_options = None
+if _descriptor._USE_C_DESCRIPTORS == False:
+ _globals['DESCRIPTOR']._options = None
_globals['DESCRIPTOR']._serialized_options = b'Z\032github.com/google/ax/proto'
_globals['_MEDIARESOLUTION']._serialized_start=2638
_globals['_MEDIARESOLUTION']._serialized_end=2736
diff --git a/python/proto/content_pb2_grpc.py b/python/proto/content_pb2_grpc.py
index 8ead1e8..fe9b2e7 100644
--- a/python/proto/content_pb2_grpc.py
+++ b/python/proto/content_pb2_grpc.py
@@ -15,24 +15,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
-import warnings
-
-GRPC_GENERATED_VERSION = '1.80.0'
-GRPC_VERSION = grpc.__version__
-_version_not_supported = False
-
-try:
- from grpc._utilities import first_version_is_lower
- _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
-except ImportError:
- _version_not_supported = True
-
-if _version_not_supported:
- raise RuntimeError(
- f'The grpc package installed is at version {GRPC_VERSION},'
- + ' but the generated code in proto/content_pb2_grpc.py depends on'
- + f' grpcio>={GRPC_GENERATED_VERSION}.'
- + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
- + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
- )