Agent Executor (AX) is Google's open agentic orchestration runtime
Go
Remove the notion of session ID (#94)
Jaana Doganea3d9c51c6e8
diff --git a/README.md b/README.mdindex b51b99d..0035738 100644--- a/README.md+++ b/README.md@@ -2,11 +2,11 @@🚧 This project is in active development and may introduce breaking changes to capabilities and APIs until the 1.0 release. 🚧-GAR, a short for Google Agent Runtime, is a single-writer agent orchestrator system built in Go. It provides a minimal runtime that coordinates agentic loops, manages sessions with event logging, and communicates with both local and remote agents via streaming protocols.+GAR, a short for Google Agent Runtime, is a single-writer agent orchestrator system built in Go. It provides a minimal runtime that coordinates agentic loops, manages executions with event logging, and communicates with both local and remote agents via streaming protocols.## Features-- **Session Management**: Builtin session management for starting, resuming, forking, and inspecting agentic loop sessions+- **Session Management**: Builtin event log management for starting, resuming, forking, and inspecting agentic loop executions- **Local & Remote Agents**: Support for both in-process and remote agent deployment- **Streaming**: gRPC bidirectional streaming for agent communication- **Tools and Skills**: Built-in bash tool and agent skills support@@ -14,7 +14,7 @@ GAR, a short for Google Agent Runtime, is a single-writer agent orchestrator sysBuilt-in consistency and resumability features:- **Single-Writer Architecture**: Centralized controller ensures consistent state management-- **Event Log**: Durable session state with automatic recovery+- **Event Log**: Durable execution state with automatic recovery## Overview@@ -57,7 +57,7 @@ You should see the gar CLI usage information.### 1. Run exec-The CLI provides an easy way to execute a session by using the+The CLI provides an easy way to execute by using theagents and built-in tools already linked into the GAR binary.```bash@@ -68,10 +68,10 @@ gar exec --input "Can you list me this directory?"gar exec --input "Can you list me this directory?" --config my-config.yaml```-You can continue a session any time:+You can continue an execution any time:```bash-gar exec --session session123 --input "Show me the contents of README.md"+gar exec --id exec123 --input "Show me the contents of README.md"```Instead of running the default planner agent, you can run any registered agent:@@ -100,7 +100,7 @@ gar serve```The GAR server exposes the `GARService` on port `:8494`.-**Terminal 3** - Register the remote agent and execute a session:+**Terminal 3** - Register the remote agent and execute:```bash# Register the remote agent with gargar register \@@ -110,10 +110,10 @@ gar register \--agent-description "Converts input text to uppercase." \--agent-addr localhost:50051-# Execute a session - once server address is specified, gar will coordinate the remote agent via Process RPC accordingly+# Execute - once server address is specified, gar will coordinate the remote agent via Process RPC accordinglygar exec \--server localhost:8494 \- --session session123 \+ --id task123 \--input "Hello, can you uppercase what I just said?"```@@ -123,34 +123,34 @@ gar exec \The `gar` command provides several subcommands:-#### Execute a Session+#### Execute```bashgar exec \--input <text> \- [--session <id>] \+ [--id <id>] \[--agent <id>] \[--server <address>] \[--config <file>]```-Executes a new agentic loop session or automatically resumes an existing one. If the session ID already exists, the session will be resumed from its last state with the new input.+Executes a new agentic execution or automatically resumes an existing one. If the ID already exists, the execution will be resumed from its last state with the new input.Options:- `--input`: Input message to send to agents (required)-- `--session`: Unique session identifier (optional, generates UUID if not provided, or resumes if exists)-- `--agent`: Agent ID to use for the session (optional, defaults to planner)+- `--id`: Unique identifier (optional, generates UUID if not provided, or resumes if exists)+- `--agent`: Agent ID to use (optional, defaults to planner)- `--server`: gRPC controller server address (optional. If not provided, runs with a built-in GAR server)- `--config`: Path to YAML configuration file (only used with a built-in GAR server, default: "gar.yaml")**Examples:**```bash-# Execute a new session+# Execute a new executiongar exec --input "Hello agents!"-# Resume an existing session with new input-gar exec --session abc123 --input "Ok, now let's do something else..."+# Resume an existing execution with new input+gar exec --id abc123 --input "Ok, now let's do something else..."# Execute using server mode (connect to gar serve)gar exec --server localhost:8494 --input "Hello agents!"@@ -158,35 +158,35 @@ gar exec --server localhost:8494 --input "Hello agents!"gar exec --agent coding --input "Hello coding agent, write me a cool Go program!"```-#### Fork a Session+#### Fork an Event Log-Fork an existing session from a specific checkpoint (or the latest state) into a new session.+Fork an existing agentic event log from a specific checkpoint (or the latest state) into a new event log.```bashgar fork \- --src-session <id> \+ --src-id <id> \[--src-checkpoint <id>] \- [--dest-session <id>] \+ [--dest-id <id>] \[--server <address>]```Options:-- `--src-session`: Source Session ID to fork from (required)+- `--src-id`: Source ID to fork from (required)- `--src-checkpoint`: Checkpoint ID to fork from (optional, defaults to latest)-- `--dest-session`: Destination Session ID (optional, generates UUID if not provided)+- `--dest-id`: Destination ID (optional, generates UUID if not provided)- `--server`: gRPC controller server address (default: "localhost:8494")**Example:**```bash# Fork from the latest state-gar fork --src-session abc123+gar fork --src-id abc123# Fork from a specific checkpoint-gar fork --src-session abc123 --src-checkpoint "550e..."+gar fork --src-id abc123 --src-checkpoint "550e..."-# Fork from a specific checkpoint to a new session with a specific new session id-gar fork --src-session abc123 --src-checkpoint "550e..." --dest-session new-session-id+# Fork from a specific checkpoint to a new event log with a specific new ID+gar fork --src-id abc123 --src-checkpoint "550e..." --dest-id new-id```#### Register a Remote Agent@@ -271,18 +271,18 @@ gar serve --config my-config.yaml### Checkpoints-Checkpoints provide a mechanism to save and resume session state at specific points. Every content event can create a checkpoint with a unique UUID.+Checkpoints provide a mechanism to save and resume state at specific points. Every content event can create a checkpoint with a unique UUID.**Usage Examples:**```bash-# Fork from a checkpoint to a new session-gar fork --src-session session123 \+# Fork from a checkpoint to a new event log+gar fork --src-id task123 \--src-checkpoint "550e8400-e29b-41d4-a716-446655440000" \- --dest-session session456+ --dest-id task456-# Resume from the forked session-gar exec --session session456 \+# Resume from the forked event log+gar exec --id task456 \--input "Try different approach"```@@ -324,7 +324,7 @@ See `examples/remote_agent/main.go` for a complete implementation.1. Remote agent starts as gRPC server on a port (e.g., :50051)2. Start gar controller: `gar serve`3. Register with gar: `gar register --agent-id my-agent --agent-name "My Agent" --agent-description "Agent description" --agent-addr localhost:50051`-4. When gar executes a session, it calls the agent's `Process` RPC+4. When gar executes an execution, it calls the agent's `Process` RPC5. GAR streams input content → Agent processes → Agent streams output backSee `examples/remote_agent/main.go` for a complete implementation.@@ -422,7 +422,7 @@ The system will dynamically create a `SandboxClaim`, establish a connection via#### Viewing Sandbox LogsIf you want to monitor the internal agent output or see if your gVisor sandbox received the physical gRPC requests:-1. List the active sandbox Pods (named after your session IDs):+1. List the active sandbox Pods:```bashkubectl get pods -n default```@@ -459,15 +459,12 @@ gar register \--agent-description "An agent that processes text to lower or upper case the inputs." \--agent-addr localhost:50051-# Execute a sessiongar exec \--server localhost:8494 \- --session session123 \+ --id task123 \--input "Hello, can you uppercase what I just said?"```## LicenseApache 2.0--diff --git a/agent/k8s_sandbox.go b/agent/k8s_sandbox.goindex 223f186..8f265ac 100644--- a/agent/k8s_sandbox.go+++ b/agent/k8s_sandbox.go@@ -85,22 +85,22 @@ func (a *KubernetesSandboxAgent) Process(ctx context.Context, t *Task, e TaskExectx, cancel := context.WithTimeout(context.Background(), 5*time.Second)defer cancel()- // Use the sessionID deterministically so interactive sessions reuse the same sandbox pod,+ // Use the id deterministically so interactive executions reuse the same sandbox pod,// rather than spawning a new pod for every exchanged message.- safeSessionID := strings.ReplaceAll(t.ID, "-", "")- if len(safeSessionID) > 20 {- safeSessionID = safeSessionID[:20] // Keep it short for k8s names+ safeID := strings.ReplaceAll(t.ID, "-", "")+ if len(safeID) > 20 {+ safeID = safeID[:20] // Keep it short for k8s names}- claimName := fmt.Sprintf("gar-claim-%s-%s", a.config.ID, safeSessionID)+ claimName := fmt.Sprintf("gar-claim-%s-%s", a.config.ID, safeID)- // 1. Create Ephemeral SandboxClaim (Ignore AlreadyExists errors if it's already created this session)+ // 1. Create Ephemeral SandboxClaim (Ignore AlreadyExists errors if it's already created this execution)if err := a.client.CreateClaim(ctx, claimName, a.config.SandboxTemplateRef); err != nil {if !strings.Contains(err.Error(), "already exists") {return fmt.Errorf("failed to create SandboxClaim: %w", err)}}- // We track the claim so `Close()` deletes it at the end of the session.+ // We track the claim so `Close()` deletes it at the end of the execution.// If we deleted it here, interactive shells would lose the pod.a.claimMu.Lock()a.activeClaims[claimName] = struct{}{}@@ -215,7 +215,7 @@ func findAvailablePort() (int, error) {}// Close gracefully shreds all active SandboxClaims generated by this agent-// during interactive sessions.+// during interactive executions.func (a *KubernetesSandboxAgent) Close() error {ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)defer cancel()diff --git a/agent/remote.go b/agent/remote.goindex 2a10abb..c21b2f4 100644--- a/agent/remote.go+++ b/agent/remote.go@@ -95,8 +95,7 @@ func (a *RemoteAgent) connect() error {// Process handles processing of input content with the remote agent.func (a *RemoteAgent) Process(ctx context.Context, t *Task, e TaskExecutor, o OutputHandler) error {- // Add session_id to gRPC metadata without overwriting existing metadata hooks (e.g. sandbox routers)- ctx = metadata.AppendToOutgoingContext(ctx, "session-id", t.ID)+ ctx = metadata.AppendToOutgoingContext(ctx, "execution-id", t.ID)stream, err := a.client.Process(ctx)if err != nil {diff --git a/cmd/gar/exec.go b/cmd/gar/exec.goindex b06e1c8..396699f 100644--- a/cmd/gar/exec.go+++ b/cmd/gar/exec.go@@ -32,7 +32,7 @@ import ()var (- execSessionID string+ execID stringexecAgentID stringexecInput stringexecServerAddr string@@ -41,14 +41,14 @@ var (var execCmd = &cobra.Command{Use: "exec",- Short: "Execute a new session or resume an existing one",- Long: `Execute a new agentic session or resume an existing one.-If no session ID is provided, a new UUID will be generated.`,+ Short: "Execute a task or resume an existing one",+ Long: `Execute a new agentic task or resume an existing one.+If no ID is provided, a new UUID will be generated.`,RunE: runExec,}func init() {- execCmd.Flags().StringVar(&execSessionID, "session", "", "Session ID (optional, generates UUID if not provided)")+ execCmd.Flags().StringVar(&execID, "id", "", "ID (optional, generates UUID if not provided)")execCmd.Flags().StringVar(&execAgentID, "agent", "", "Agent ID (optional, planner is used if not specified)")execCmd.Flags().StringVar(&execInput, "input", "", "Input message to send (optional)")execCmd.Flags().StringVar(&execServerAddr, "server", "", "gRPC controller server address (if specified, connects to remote server; otherwise runs with a local built-in GAR server)")@@ -64,9 +64,9 @@ var (func runExec(cmd *cobra.Command, args []string) error {ctx := context.Background()- // Generate UUID if no session ID provided- if execSessionID == "" {- execSessionID = uuid.New().String()+ // Generate UUID if no ID provided+ if execID == "" {+ execID = uuid.New().String()}// Setup signal handling for graceful shutdown@@ -85,11 +85,11 @@ func runExec(cmd *cobra.Command, args []string) error {cancel()}()- return execLoop(ctx, execSessionID, execAgentID, execInput)+ return execLoop(ctx, execID, execAgentID, execInput)}-func execLoop(ctx context.Context, sessionID string, agentID string, input string) error {- d := internal.NewDisplay(sessionID)+func execLoop(ctx context.Context, id string, agentID string, input string) error {+ d := internal.NewDisplay(id)d.DisplayHeader()if input == "" {@@ -113,7 +113,7 @@ func execLoop(ctx context.Context, sessionID string, agentID string, input strin}for {- conf, outputs, err := runAutoExec(ctx, d, sessionID, agentID, history)+ conf, outputs, err := runAutoExec(ctx, d, id, agentID, history)if err != nil {return err}@@ -154,7 +154,7 @@ func execLoop(ctx context.Context, sessionID string, agentID string, input strin// The task is still pending, we need to only send the answer.// not the full history. Because we executor will put the full// history together.- conf, outputs, err = runAutoExec(ctx, d, sessionID, agentID, decision)+ conf, outputs, err = runAutoExec(ctx, d, id, agentID, decision)if err != nil {return err}@@ -168,8 +168,8 @@ func execLoop(ctx context.Context, sessionID string, agentID string, input strin// Once we finished a task, we should start another one// to continue the conversation with history.- sessionID = uuid.NewString()- d := internal.NewDisplay(sessionID)+ id = uuid.NewString()+ d := internal.NewDisplay(id)d.DisplayHeader()// Remove all the function calls, confirmations,@@ -193,15 +193,15 @@ func execLoop(ctx context.Context, sessionID string, agentID string, input strin}}-func runAutoExec(ctx context.Context, d *internal.Display, sessionID string, agentID string, inputs []*proto.Content) (*proto.ConfirmationContent, []*proto.Content, error) {+func runAutoExec(ctx context.Context, d *internal.Display, id string, agentID string, inputs []*proto.Content) (*proto.ConfirmationContent, []*proto.Content, error) {fn := runExecHeadlessif execServerAddr != "" {fn = runExecServer}- return fn(ctx, d, sessionID, agentID, inputs)+ return fn(ctx, d, id, agentID, inputs)}-func runExecHeadless(ctx context.Context, d *internal.Display, sessionID string, agentID string, inputs []*proto.Content) (*proto.ConfirmationContent, []*proto.Content, error) {+func runExecHeadless(ctx context.Context, d *internal.Display, id string, agentID string, inputs []*proto.Content) (*proto.ConfirmationContent, []*proto.Content, error) {if execController == nil {cfg, err := config.LoadFromFile(execConfigFile)if err != nil {@@ -232,7 +232,7 @@ func runExecHeadless(ctx context.Context, d *internal.Display, sessionID string,displayContents(d, resp.Contents)return nil})- if err := execController.Exec(ctx, sessionID, agentID, &proto.ProcessRequest{+ if err := execController.Exec(ctx, id, agentID, &proto.ProcessRequest{Contents: inputs,}, outputHandler); err != nil {return nil, nil, fmt.Errorf("error executing with local server: %w", err)@@ -244,7 +244,7 @@ func runExecHeadless(ctx context.Context, d *internal.Display, sessionID string,return confirmation, outputs, nil}-func runExecServer(ctx context.Context, d *internal.Display, sessionID string, agentID string, inputs []*proto.Content) (*proto.ConfirmationContent, []*proto.Content, error) {+func runExecServer(ctx context.Context, d *internal.Display, id string, agentID string, inputs []*proto.Content) (*proto.ConfirmationContent, []*proto.Content, error) {conn, err := connect(execServerAddr)if err != nil {return nil, nil, err@@ -253,8 +253,8 @@ func runExecServer(ctx context.Context, d *internal.Display, sessionID string, aclient := proto.NewGARServiceClient(conn)stream, err := client.Exec(ctx, &proto.ExecRequest{- SessionId: sessionID,- AgentId: agentID,+ Id: id,+ AgentId: agentID,Inputs: inputs,})if err != nil {diff --git a/cmd/gar/fork.go b/cmd/gar/fork.goindex e7541ec..37db0ea 100644--- a/cmd/gar/fork.go+++ b/cmd/gar/fork.go@@ -24,36 +24,36 @@ import ()var (- forkSourceSessionID string- forkCheckpointID string- forkDestSessionID string- forkServerAddr string+ forkSourceID string+ forkCheckpointID string+ forkDestID string+ forkServerAddr string)var forkCmd = &cobra.Command{Use: "fork",- Short: "Fork a session from a specific checkpoint",- Long: `Fork an existing agentic session from a specific checkpoint.-If --dest-session is not provided, a new UUID will be generated.`,+ Short: "Fork an event log from a specific checkpoint",+ Long: `Fork an existing agentic event log from a specific checkpoint.+If --dest-id is not provided, a new UUID will be generated.`,RunE: runFork,}func init() {- forkCmd.Flags().StringVar(&forkSourceSessionID, "src-session", "", "Source Session ID to fork from (required)")+ forkCmd.Flags().StringVar(&forkSourceID, "src-id", "", "Source ID to fork from (required)")forkCmd.Flags().StringVar(&forkCheckpointID, "src-checkpoint", "", "Checkpoint ID to fork from (optional, defaults to latest)")- forkCmd.Flags().StringVar(&forkDestSessionID, "dest-session", "", "Destination Session ID (optional, generates UUID if not provided)")+ forkCmd.Flags().StringVar(&forkDestID, "dest-id", "", "Destination ID (optional, generates UUID if not provided)")forkCmd.Flags().StringVar(&forkServerAddr, "server", "localhost:8494", "gRPC controller server address (default: localhost:8494)")- forkCmd.MarkFlagRequired("src-session")+ forkCmd.MarkFlagRequired("src-id")}func runFork(cmd *cobra.Command, args []string) error {ctx := context.Background()- // Generate UUID if no destination session ID provided- if forkDestSessionID == "" {- forkDestSessionID = uuid.New().String()- fmt.Printf("Generated destination session ID: %s\n", forkDestSessionID)+ // Generate UUID if no destination ID provided+ if forkDestID == "" {+ forkDestID = uuid.New().String()+ fmt.Printf("Generated destination ID: %s\n", forkDestID)}conn, err := connect(forkServerAddr)@@ -64,23 +64,19 @@ func runFork(cmd *cobra.Command, args []string) error {client := proto.NewGARServiceClient(conn)- _, err = ForkSession(ctx, client, forkSourceSessionID, forkCheckpointID, forkDestSessionID)+ _, err = Fork(ctx, client, forkSourceID, forkCheckpointID, forkDestID)return err}-// ForkSession forks a session from a checkpoint and returns the new session ID.-func ForkSession(ctx context.Context, client proto.GARServiceClient, sourceSessionID, checkpointID, destSessionID string) (string, error) {- fmt.Printf("Forking from source session %s at checkpoint %s to destination session %s\n", sourceSessionID, checkpointID, destSessionID)-- resp, err := client.ForkSession(ctx, &proto.ForkSessionRequest{- SrcSessionId: sourceSessionID,+// Fork forks a execution from a checkpoint and returns the new execution ID.+func Fork(ctx context.Context, client proto.GARServiceClient, sourceID, checkpointID, destID string) (string, error) {+ resp, err := client.Fork(ctx, &proto.ForkRequest{+ SrcId: sourceID,SrcCheckpointId: checkpointID,- DestSessionId: destSessionID,+ DestId: destID,})if err != nil {- return "", fmt.Errorf("error forking session: %w", err)+ return "", fmt.Errorf("error forking: %w", err)}-- fmt.Printf("Forked session ID: %s\n", resp.NewSessionId)- return resp.NewSessionId, nil+ return resp.NewId, nil}diff --git a/cmd/gar/internal/display.go b/cmd/gar/internal/display.goindex 1f2f43f..28e65ca 100644--- a/cmd/gar/internal/display.go+++ b/cmd/gar/internal/display.go@@ -32,24 +32,24 @@ var ()type Display struct {- sessionID string+ id stringuserStyle lipgloss.StylecheckpointStyle lipgloss.Style- sessionStyle lipgloss.Style+ idStyle lipgloss.StyleloadingVisible atomic.BoolloadingStopCh chan bool}-func NewDisplay(sessionID string) *Display {+func NewDisplay(id string) *Display {return &Display{- sessionID: sessionID,+ id: id,userStyle: lipgloss.NewStyle().Foreground(purple),checkpointStyle: lipgloss.NewStyle().Foreground(comment),- sessionStyle: lipgloss.NewStyle().+ idStyle: lipgloss.NewStyle().Foreground(comment),loadingStopCh: make(chan bool),}@@ -81,7 +81,7 @@ func (d *Display) FinishOutput(checkpointID string) {}func (d *Display) DisplayHeader() {- fmt.Println(d.sessionStyle.Render("Session: " + d.sessionID))+ fmt.Println(d.idStyle.Render("ID: " + d.id))fmt.Println()}diff --git a/cmd/gar/main.go b/cmd/gar/main.goindex 3e287c2..e89aa15 100644--- a/cmd/gar/main.go+++ b/cmd/gar/main.go@@ -12,8 +12,8 @@// See the License for the specific language governing permissions and// limitations under the License.-// Gar is a CLI tool for managing agent orchestrator sessions.-// It provides commands to execute sessions, resume from checkpoints,+// Gar is a server for managing agent orchestrator tasks.+// It provides commands to execute tasks, resume from checkpoints,// register agents, and run the controller server.package main@@ -35,14 +35,13 @@ func main() {var rootCmd = &cobra.Command{Use: "gar",- Short: "GAR - Google Agent Runtime CLI",- Long: `Gar is a CLI tool for managing agent orchestrator sessions.-It provides commands to execute sessions, resume from checkpoints,+ Short: "GAR - Google Agent Runtime",+ Long: `Gar is a server for managing agent orchestrator tasks.+It provides commands to execute tasks, resume from checkpoints,register agents, and run the controller server.`,}func init() {- // Add subcommandsrootCmd.AddCommand(execCmd)rootCmd.AddCommand(forkCmd)rootCmd.AddCommand(registerCmd)diff --git a/cmd/gar/register.go b/cmd/gar/register.goindex f970f4e..213549b 100644--- a/cmd/gar/register.go+++ b/cmd/gar/register.go@@ -33,7 +33,7 @@ var (var registerCmd = &cobra.Command{Use: "register",Short: "Register a remote agent",- Long: `Register a remote agent with the controller so it can be used in sessions.`,+ Long: `Register a remote agent with the controller so it can be used in executions.`,RunE: runRegister,}diff --git a/examples/gke_sandbox_agent/main.go b/examples/gke_sandbox_agent/main.goindex 08ddb27..c9e4ba8 100644--- a/examples/gke_sandbox_agent/main.go+++ b/examples/gke_sandbox_agent/main.go@@ -52,7 +52,7 @@ func (s *server) Process(stream grpc.BidiStreamingServer[proto.ProcessRequest, pvar outputs []*proto.Contentif len(req.Contents) > 0 {- // Find the most recent message from the "user" in the session history+ // Find the most recent message from the "user" in the historyvar targetText stringfor i := len(req.Contents) - 1; i >= 0; i-- {if text := req.Contents[i].GetText(); text != nil && req.Contents[i].Role == "user" {diff --git a/internal/controller/controller.go b/internal/controller/controller.goindex 986d4ef..3489ab7 100644--- a/internal/controller/controller.go+++ b/internal/controller/controller.go@@ -13,7 +13,7 @@// limitations under the License.// Package controller implements the single-writer orchestrator that coordinates-// agentic loops, manages sessions, and communicates with local and remote agents.+// agentic loops, manages executions, and communicates with local and remote agents.package controllerimport (@@ -35,8 +35,8 @@ const plannerAgentID = "__planner"// Controller is the main controller that coordinates all components.// It acts as a single-writer system for managing agentic loops.type Controller struct {- inFlightSessionsMu sync.Mutex- inFlightSessions map[string]struct{}+ inFlightExecutionsMu sync.Mutex+ inFlightExecutions map[string]struct{}registry *RegistryeventLogBuilder task.EventLogBuilderplannerBuilder PlannerBuilder@@ -76,26 +76,26 @@ func New(ctx context.Context, config Config) (*Controller, error) {}return &Controller{- inFlightSessions: make(map[string]struct{}),+ inFlightExecutions: make(map[string]struct{}),registry: registry,eventLogBuilder: config.EventLogBuilder,plannerBuilder: config.PlannerBuilder,}, nil}-// Exec executes a new agentic loop session or resumes an existing one.-// If sessionID is empty, a UUID will be generated.-// If the session already exists, it will be resumed with optional new inputs.-func (d *Controller) Exec(ctx context.Context, sessionID string, agentID string, incoming *proto.ProcessRequest, handler agent.OutputHandler) error {- if sessionID == "" {- return fmt.Errorf("session_id is required")+// Exec executes a new agentic loop execution or resumes an existing one.+// If id is empty, a UUID will be generated.+// If the execution already exists, it will be resumed with optional new inputs.+func (d *Controller) Exec(ctx context.Context, id string, agentID string, incoming *proto.ProcessRequest, handler agent.OutputHandler) error {+ if id == "" {+ return fmt.Errorf("id is required")}- inFlight, cleanup := d.markInFlight(sessionID)+ inFlight, cleanup := d.markInFlight(id)defer cleanup()if inFlight {- return fmt.Errorf("task %q is already in flight", sessionID)+ return fmt.Errorf("task %q is already in flight", id)}planner, err := d.plannerBuilder(ctx, d.registry)@@ -132,20 +132,20 @@ func (d *Controller) Exec(ctx context.Context, sessionID string, agentID string,}e := task.DefaultExecutor(d.eventLogBuilder, registry)return e.Exec(ctx, &agent.Task{- ID: sessionID,+ ID: id,AgentID: agentID,Inputs: incoming.Contents,}, o)}-// ForkSession forks a session from a source session.-// If checkpointId is provided, fork til the checkpoint. Otherwise, fork the whole session.-func (d *Controller) ForkSession(ctx context.Context, sourceSessionID, sourceCheckpoint, destSessionID string) error {- if sourceSessionID == "" {- return fmt.Errorf("source session ID is required")+// Fork forks an execution from a source execution.+// If checkpointId is provided, fork til the checkpoint. Otherwise, fork the whole execution.+func (d *Controller) Fork(ctx context.Context, sourceID, sourceCheckpoint, destID string) error {+ if sourceID == "" {+ return fmt.Errorf("source ID is required")}- if destSessionID == "" {- return fmt.Errorf("destination session ID is required")+ if destID == "" {+ return fmt.Errorf("destination ID is required")}panic("not yet implemented")@@ -165,19 +165,19 @@ func (d *Controller) Close() error {return nil}-func (d *Controller) markInFlight(sessionID string) (exists bool, cleanup func()) {- d.inFlightSessionsMu.Lock()- defer d.inFlightSessionsMu.Unlock()+func (d *Controller) markInFlight(id string) (exists bool, cleanup func()) {+ d.inFlightExecutionsMu.Lock()+ defer d.inFlightExecutionsMu.Unlock()- _, ok := d.inFlightSessions[sessionID]+ _, ok := d.inFlightExecutions[id]if ok {return true, func() {}}- d.inFlightSessions[sessionID] = struct{}{}+ d.inFlightExecutions[id] = struct{}{}return false, func() {- d.inFlightSessionsMu.Lock()- delete(d.inFlightSessions, sessionID)- d.inFlightSessionsMu.Unlock()+ d.inFlightExecutionsMu.Lock()+ delete(d.inFlightExecutions, id)+ d.inFlightExecutionsMu.Unlock()}}diff --git a/internal/controller/gemini_planner.go b/internal/controller/gemini_planner.goindex e1c5b12..32382bc 100644--- a/internal/controller/gemini_planner.go+++ b/internal/controller/gemini_planner.go@@ -491,7 +491,7 @@ func agentsToTools(bashTool *bashTool, registry *Registry) ([]*genai.Tool, errorreturn tools, nil}-// protoToContents converts session message history to Gemini conversation format.+// protoToContents converts history to Gemini conversation format.func protoToContents(inputs []*proto.Content) []*genai.Content {var contents []*genai.Contentdiff --git a/internal/controller/task/eventlog.go b/internal/controller/task/eventlog.goindex 780936b..c44abc7 100644--- a/internal/controller/task/eventlog.go+++ b/internal/controller/task/eventlog.go@@ -41,7 +41,7 @@ type EventLog interface {}// FileEventLog is a durable EventLog that writes one JSON object per line to-// a file. Each session should use its own file. The file is created if it does+// a file. Each execution should use its own file. The file is created if it does// not exist and is opened for appending, so existing events survive restarts.//// The format is newline-delimited JSON (NDJSON): every Append call writes one@@ -54,7 +54,7 @@ type FileEventLog struct {}// OpenFileEventLog opens (or creates) the log file at path.-// Call Close when the session is done to release the file handle.+// Call Close when the execution is done to release the file handle.func OpenFileEventLog(path string) (*FileEventLog, error) {f, err := os.OpenFile(path, os.O_CREATE|os.O_APPEND|os.O_RDWR, 0o644)if err != nil {diff --git a/internal/controller/validation.go b/internal/controller/validation.goindex 6f866c0..4148238 100644--- a/internal/controller/validation.go+++ b/internal/controller/validation.go@@ -22,7 +22,7 @@ import (var validIDRegex = regexp.MustCompile(`^[A-Za-z0-9\-_]+$`)-// validateID checks if a session ID or agent ID contains allowed characters.+// validateID checks if an ID contains allowed characters.func validateID(id string) error {if id == "" {return errors.New("empty ID")diff --git a/internal/controller/validation_test.go b/internal/controller/validation_test.goindex 3879ea3..6082b39 100644--- a/internal/controller/validation_test.go+++ b/internal/controller/validation_test.go@@ -18,54 +18,54 @@ import ("testing")-func TestValidateSessionID(t *testing.T) {+func TestValidateID(t *testing.T) {tests := []struct {- name string- sessionID string- wantErr bool+ name string+ id string+ wantErr bool}{{- name: "valid lowercase",- sessionID: "session123",+ name: "valid lowercase",+ id: "task123",wantErr: false,},{- name: "valid mixed",- sessionID: "Session-ID_123",+ name: "valid mixed",+ id: "Task-ID_123",wantErr: false,},{- name: "valid simple",- sessionID: "Session-ID",+ name: "valid simple",+ id: "Task-ID",wantErr: false,},{- name: "valid underscore",- sessionID: "session_id",+ name: "valid underscore",+ id: "task_id",wantErr: false,},{- name: "invalid space",- sessionID: "session id",- wantErr: true,+ name: "invalid space",+ id: "task id",+ wantErr: true,},{- name: "invalid char",- sessionID: "session!",- wantErr: true,+ name: "invalid char",+ id: "task!",+ wantErr: true,},{- name: "empty",- sessionID: "",- wantErr: true,+ name: "empty",+ id: "",+ wantErr: true,},}for _, tt := range tests {t.Run(tt.name, func(t *testing.T) {- err := validateID(tt.sessionID)+ err := validateID(tt.id)if (err != nil) != tt.wantErr {- t.Errorf("validateID(%q) error = %v, wantErr %v", tt.sessionID, err, tt.wantErr)+ t.Errorf("validateID(%q) error = %v, wantErr %v", tt.id, err, tt.wantErr)}})}diff --git a/internal/server/server.go b/internal/server/server.goindex c59e5f3..3681807 100644--- a/internal/server/server.go+++ b/internal/server/server.go@@ -13,7 +13,7 @@// limitations under the License.// Package server implements the gRPC server for GARService,-// exposing session management and agent registration APIs.+// exposing execution management and agent registration APIs.package server@@ -45,32 +45,28 @@ func New(c *controller.Controller) *Server {}}-// Exec executes a new agentic loop session with streaming responses.+// Exec executes a new agentic task with streaming responses.func (s *Server) Exec(req *proto.ExecRequest, stream grpc.ServerStreamingServer[proto.ExecResponse]) error {- sessionID := req.SessionId- inputs := req.Inputs-incoming := &proto.ProcessRequest{- Contents: inputs,+ Contents: req.Inputs,}// Create output handler to stream outputs back to clientoutputHandler := agent.OutputHandler(func(outgoing *proto.ProcessResponse) error {return stream.Send(&proto.ExecResponse{- SessionId: sessionID,- Outputs: outgoing.Contents,+ Outputs: outgoing.Contents,})})return s.controller.Exec(- stream.Context(), sessionID, req.AgentId, incoming, outputHandler)+ stream.Context(), req.Id, req.AgentId, incoming, outputHandler)}-func (s *Server) ForkSession(ctx context.Context, req *proto.ForkSessionRequest) (*proto.ForkSessionResponse, error) {- if err := s.controller.ForkSession(ctx, req.SrcSessionId, req.SrcCheckpointId, req.DestSessionId); err != nil {+func (s *Server) Fork(ctx context.Context, req *proto.ForkRequest) (*proto.ForkResponse, error) {+ if err := s.controller.Fork(ctx, req.SrcId, req.SrcCheckpointId, req.DestId); err != nil {return nil, err}- return &proto.ForkSessionResponse{- NewSessionId: req.DestSessionId,+ return &proto.ForkResponse{+ NewId: req.DestId,}, nil}diff --git a/proto/gar.pb.go b/proto/gar.pb.goindex 9eaeaa2..018ffe5 100644--- a/proto/gar.pb.go+++ b/proto/gar.pb.go@@ -36,7 +36,7 @@ const (_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))-// State represents the state of a session+// State represents the state of an executiontype State int32const (@@ -860,9 +860,9 @@ type ExecRequest struct {sizeCache protoimpl.SizeCacheunknownFields protoimpl.UnknownFields- SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // Unique session identifier- AgentId string `protobuf:"bytes,2,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` // Agent ID, if empty planner is used.- Inputs []*Content `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"` // Input content to process+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique execution identifier+ AgentId string `protobuf:"bytes,2,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` // Agent ID, if empty planner is used.+ Inputs []*Content `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"` // Input content to process}func (x *ExecRequest) Reset() {@@ -895,9 +895,9 @@ func (*ExecRequest) Descriptor() ([]byte, []int) {return file_proto_gar_proto_rawDescGZIP(), []int{12}}-func (x *ExecRequest) GetSessionId() string {+func (x *ExecRequest) GetId() string {if x != nil {- return x.SessionId+ return x.Id}return ""}@@ -922,9 +922,8 @@ type ExecResponse struct {sizeCache protoimpl.SizeCacheunknownFields protoimpl.UnknownFields- SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // Session ID- Outputs []*Content `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` // Output content- State State `protobuf:"varint,3,opt,name=state,proto3,enum=proto.State" json:"state,omitempty"` // Session state+ Outputs []*Content `protobuf:"bytes,1,rep,name=outputs,proto3" json:"outputs,omitempty"` // Output content+ State State `protobuf:"varint,2,opt,name=state,proto3,enum=proto.State" json:"state,omitempty"` // Execution state}func (x *ExecResponse) Reset() {@@ -957,13 +956,6 @@ func (*ExecResponse) Descriptor() ([]byte, []int) {return file_proto_gar_proto_rawDescGZIP(), []int{13}}-func (x *ExecResponse) GetSessionId() string {- if x != nil {- return x.SessionId- }- return ""-}-func (x *ExecResponse) GetOutputs() []*Content {if x != nil {return x.Outputs@@ -978,30 +970,30 @@ func (x *ExecResponse) GetState() State {return State_STATE_UNSPECIFIED}-type ForkSessionRequest struct {+type ForkRequest struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCacheunknownFields protoimpl.UnknownFields- SrcSessionId string `protobuf:"bytes,1,opt,name=src_session_id,json=srcSessionId,proto3" json:"src_session_id,omitempty"`- SrcCheckpointId string `protobuf:"bytes,2,opt,name=src_checkpoint_id,json=srcCheckpointId,proto3" json:"src_checkpoint_id,omitempty"` // Checkpoint ID within the source session to fork from.- DestSessionId string `protobuf:"bytes,3,opt,name=dest_session_id,json=destSessionId,proto3" json:"dest_session_id,omitempty"` // New session ID. If provided, must not exist.+ SrcId string `protobuf:"bytes,1,opt,name=src_id,json=srcId,proto3" json:"src_id,omitempty"`+ SrcCheckpointId string `protobuf:"bytes,2,opt,name=src_checkpoint_id,json=srcCheckpointId,proto3" json:"src_checkpoint_id,omitempty"` // Checkpoint ID within the source execution to fork from.+ DestId string `protobuf:"bytes,3,opt,name=dest_id,json=destId,proto3" json:"dest_id,omitempty"` // New ID. If provided, must not exist.}-func (x *ForkSessionRequest) Reset() {- *x = ForkSessionRequest{}+func (x *ForkRequest) Reset() {+ *x = ForkRequest{}mi := &file_proto_gar_proto_msgTypes[14]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}-func (x *ForkSessionRequest) String() string {+func (x *ForkRequest) String() string {return protoimpl.X.MessageStringOf(x)}-func (*ForkSessionRequest) ProtoMessage() {}+func (*ForkRequest) ProtoMessage() {}-func (x *ForkSessionRequest) ProtoReflect() protoreflect.Message {+func (x *ForkRequest) ProtoReflect() protoreflect.Message {mi := &file_proto_gar_proto_msgTypes[14]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))@@ -1013,54 +1005,54 @@ func (x *ForkSessionRequest) ProtoReflect() protoreflect.Message {return mi.MessageOf(x)}-// Deprecated: Use ForkSessionRequest.ProtoReflect.Descriptor instead.-func (*ForkSessionRequest) Descriptor() ([]byte, []int) {+// Deprecated: Use ForkRequest.ProtoReflect.Descriptor instead.+func (*ForkRequest) Descriptor() ([]byte, []int) {return file_proto_gar_proto_rawDescGZIP(), []int{14}}-func (x *ForkSessionRequest) GetSrcSessionId() string {+func (x *ForkRequest) GetSrcId() string {if x != nil {- return x.SrcSessionId+ return x.SrcId}return ""}-func (x *ForkSessionRequest) GetSrcCheckpointId() string {+func (x *ForkRequest) GetSrcCheckpointId() string {if x != nil {return x.SrcCheckpointId}return ""}-func (x *ForkSessionRequest) GetDestSessionId() string {+func (x *ForkRequest) GetDestId() string {if x != nil {- return x.DestSessionId+ return x.DestId}return ""}-type ForkSessionResponse struct {+type ForkResponse struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCacheunknownFields protoimpl.UnknownFields- NewSessionId string `protobuf:"bytes,1,opt,name=new_session_id,json=newSessionId,proto3" json:"new_session_id,omitempty"` // New session ID (in case it was generated or modified by server)+ NewId string `protobuf:"bytes,1,opt,name=new_id,json=newId,proto3" json:"new_id,omitempty"` // New task ID (in case it was generated or modified by server)}-func (x *ForkSessionResponse) Reset() {- *x = ForkSessionResponse{}+func (x *ForkResponse) Reset() {+ *x = ForkResponse{}mi := &file_proto_gar_proto_msgTypes[15]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}-func (x *ForkSessionResponse) String() string {+func (x *ForkResponse) String() string {return protoimpl.X.MessageStringOf(x)}-func (*ForkSessionResponse) ProtoMessage() {}+func (*ForkResponse) ProtoMessage() {}-func (x *ForkSessionResponse) ProtoReflect() protoreflect.Message {+func (x *ForkResponse) ProtoReflect() protoreflect.Message {mi := &file_proto_gar_proto_msgTypes[15]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))@@ -1072,14 +1064,14 @@ func (x *ForkSessionResponse) ProtoReflect() protoreflect.Message {return mi.MessageOf(x)}-// Deprecated: Use ForkSessionResponse.ProtoReflect.Descriptor instead.-func (*ForkSessionResponse) Descriptor() ([]byte, []int) {+// Deprecated: Use ForkResponse.ProtoReflect.Descriptor instead.+func (*ForkResponse) Descriptor() ([]byte, []int) {return file_proto_gar_proto_rawDescGZIP(), []int{15}}-func (x *ForkSessionResponse) GetNewSessionId() string {+func (x *ForkResponse) GetNewId() string {if x != nil {- return x.NewSessionId+ return x.NewId}return ""}@@ -1448,99 +1440,91 @@ var file_proto_gar_proto_rawDesc = []byte{0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x18, 0x01, 0x20,0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x12, 0x18, 0x0a, 0x07,0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d,- 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x6f, 0x0a, 0x0b, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65,- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,- 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69,- 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64,- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12,- 0x26, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,- 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52,- 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x22, 0x7b, 0x0a, 0x0c, 0x45, 0x78, 0x65, 0x63, 0x52,- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69,- 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73,- 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74,- 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,- 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73,- 0x12, 0x22, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32,- 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73,- 0x74, 0x61, 0x74, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x12, 0x46, 0x6f, 0x72, 0x6b, 0x53, 0x65, 0x73,- 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x73,- 0x72, 0x63, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,- 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x72, 0x63, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49,- 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x72, 0x63, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f,- 0x69, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x72,- 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a,- 0x0f, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64,- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73,- 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3b, 0x0a, 0x13, 0x46, 0x6f, 0x72, 0x6b, 0x53, 0x65, 0x73,- 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0e,- 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01,- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,- 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e,- 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65,- 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,- 0x73, 0x22, 0xa9, 0x02, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67,- 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67,- 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67,- 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,- 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73,- 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,- 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x08, 0x6d,- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e,- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67,- 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64,- 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,- 0x74, 0x61, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01,- 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74,- 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x06,- 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,- 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,- 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,- 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,- 0x02, 0x38, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x17, 0x0a,- 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65,- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x0a, 0x16, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69,+ 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x60, 0x0a, 0x0b, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69,+ 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64,+ 0x12, 0x26, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,+ 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,+ 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x22, 0x5c, 0x0a, 0x0c, 0x45, 0x78, 0x65, 0x63,+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70,+ 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74,+ 0x6f, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75,+ 0x74, 0x73, 0x12, 0x22, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,+ 0x0e, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52,+ 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x69, 0x0a, 0x0b, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x72, 0x63, 0x5f, 0x69, 0x64, 0x18,+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x72, 0x63, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11,+ 0x73, 0x72, 0x63, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x69,+ 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x72, 0x63, 0x43, 0x68, 0x65, 0x63,+ 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x65, 0x73, 0x74,+ 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x73, 0x74, 0x49,+ 0x64, 0x22, 0x25, 0x0a, 0x0c, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,+ 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x65, 0x77, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x05, 0x6e, 0x65, 0x77, 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f,+ 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a,+ 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,+ 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xa9, 0x02, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69,0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,- 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x55,- 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65,- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x58, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12,- 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,- 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f,- 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41,- 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53,- 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03,- 0x32, 0x92, 0x01, 0x0a, 0x0c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,- 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x15, 0x2e, 0x70,- 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75,- 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x63,- 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12,- 0x44, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x19,- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65,- 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74,- 0x6f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73,- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa3, 0x02, 0x0a, 0x0a, 0x47, 0x41, 0x52, 0x53, 0x65, 0x72,- 0x76, 0x69, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x12, 0x2e, 0x70,- 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,- 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73,- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x44, 0x0a, 0x0b, 0x46, 0x6f, 0x72, 0x6b, 0x53,- 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x46,- 0x6f, 0x72, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,- 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x53, 0x65,- 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a,- 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1b,- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41,- 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72,- 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e,- 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x55, 0x6e, 0x72,- 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x2e, 0x70,+ 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e,+ 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,+ 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,+ 0x6e, 0x12, 0x45, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20,+ 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69,+ 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,+ 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08,+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f,+ 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,+ 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66,+ 0x69, 0x67, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x1a, 0x3b, 0x0a, 0x0d,+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,+ 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,+ 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e,+ 0x66, 0x69, 0x67, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41,+ 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x0a, 0x16,+ 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52,+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f,+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49,+ 0x64, 0x22, 0x19, 0x0a, 0x17, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41,+ 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x58, 0x0a, 0x05,+ 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55,+ 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,+ 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12,+ 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10,+ 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c,+ 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x32, 0x92, 0x01, 0x0a, 0x0c, 0x41, 0x67, 0x65, 0x6e, 0x74,+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x63, 0x65,+ 0x73, 0x73, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65,+ 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74,+ 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,+ 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x44, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43,+ 0x68, 0x65, 0x63, 0x6b, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x65, 0x61,+ 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,+ 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68,+ 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8e, 0x02, 0x0a, 0x0a,+ 0x47, 0x41, 0x52, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x45, 0x78,+ 0x65, 0x63, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x52,+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45,+ 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x2f, 0x0a,+ 0x04, 0x46, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x46, 0x6f,+ 0x72, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74,+ 0x6f, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a,+ 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12,+ 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,+ 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70,+ 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65,+ 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x55, 0x6e,+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x2e,+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,+ 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70,0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41,- 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72,- 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67,- 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x1d, 0x5a, 0x1b, 0x67,- 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,- 0x2f, 0x67, 0x61, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,- 0x6f, 0x33,+ 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x1d, 0x5a, 0x1b,+ 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c,+ 0x65, 0x2f, 0x67, 0x61, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f,+ 0x74, 0x6f, 0x33,}var (@@ -1573,8 +1557,8 @@ var file_proto_gar_proto_goTypes = []any{(*HealthCheckResponse)(nil), // 12: proto.HealthCheckResponse(*ExecRequest)(nil), // 13: proto.ExecRequest(*ExecResponse)(nil), // 14: proto.ExecResponse- (*ForkSessionRequest)(nil), // 15: proto.ForkSessionRequest- (*ForkSessionResponse)(nil), // 16: proto.ForkSessionResponse+ (*ForkRequest)(nil), // 15: proto.ForkRequest+ (*ForkResponse)(nil), // 16: proto.ForkResponse(*RemoteAgentConfig)(nil), // 17: proto.RemoteAgentConfig(*RegisterAgentRequest)(nil), // 18: proto.RegisterAgentRequest(*RegisterAgentResponse)(nil), // 19: proto.RegisterAgentResponse@@ -1607,13 +1591,13 @@ var file_proto_gar_proto_depIdxs = []int32{1, // 19: proto.AgentService.Process:input_type -> proto.ProcessRequest11, // 20: proto.AgentService.HealthCheck:input_type -> proto.HealthCheckRequest13, // 21: proto.GARService.Exec:input_type -> proto.ExecRequest- 15, // 22: proto.GARService.ForkSession:input_type -> proto.ForkSessionRequest+ 15, // 22: proto.GARService.Fork:input_type -> proto.ForkRequest18, // 23: proto.GARService.RegisterAgent:input_type -> proto.RegisterAgentRequest20, // 24: proto.GARService.UnregisterAgent:input_type -> proto.UnregisterAgentRequest2, // 25: proto.AgentService.Process:output_type -> proto.ProcessResponse12, // 26: proto.AgentService.HealthCheck:output_type -> proto.HealthCheckResponse14, // 27: proto.GARService.Exec:output_type -> proto.ExecResponse- 16, // 28: proto.GARService.ForkSession:output_type -> proto.ForkSessionResponse+ 16, // 28: proto.GARService.Fork:output_type -> proto.ForkResponse19, // 29: proto.GARService.RegisterAgent:output_type -> proto.RegisterAgentResponse21, // 30: proto.GARService.UnregisterAgent:output_type -> proto.UnregisterAgentResponse25, // [25:31] is the sub-list for method output_typediff --git a/proto/gar.proto b/proto/gar.protoindex 50c178f..c45465a 100644--- a/proto/gar.proto+++ b/proto/gar.proto@@ -124,7 +124,7 @@ service AgentService {rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse);}-// State represents the state of a session+// State represents the state of an executionenum State {STATE_UNSPECIFIED = 0; // Unspecified stateSTATE_PENDING = 1;@@ -134,26 +134,25 @@ enum State {// ExecRequest for executing.message ExecRequest {- string session_id = 1; // Unique session identifier- string agent_id = 2; // Agent ID, if empty planner is used.- repeated Content inputs = 3; // Input content to process+ string id = 1; // Unique execution identifier+ string agent_id = 2; // Agent ID, if empty planner is used.+ repeated Content inputs = 3; // Input content to process}// ExecResponse contains the result of an execution.message ExecResponse {- string session_id = 1; // Session ID- repeated Content outputs = 2; // Output content- State state = 3; // Session state+ repeated Content outputs = 1; // Output content+ State state = 2; // Execution state}-message ForkSessionRequest {- string src_session_id = 1;- string src_checkpoint_id = 2; // Checkpoint ID within the source session to fork from.- string dest_session_id = 3; // New session ID. If provided, must not exist.+message ForkRequest {+ string src_id = 1;+ string src_checkpoint_id = 2; // Checkpoint ID within the source execution to fork from.+ string dest_id = 3; // New ID. If provided, must not exist.}-message ForkSessionResponse {- string new_session_id = 1; // New session ID (in case it was generated or modified by server)+message ForkResponse {+ string new_id = 1; // New task ID (in case it was generated or modified by server)}message RemoteAgentConfig {@@ -186,12 +185,12 @@ message UnregisterAgentResponse {// GARService defines the gRPC service for GAR operationsservice GARService {- // Exec executes a new agentic loop session or resumes an existing one with streaming responses- // If the session_id already exists, it will be resumed from the last checkpoint+ // Exec executes an agentic task or resumes an existing one with streaming responses+ // If the execution id already exists, it will be resumed from the last checkpoint.rpc Exec(ExecRequest) returns (stream ExecResponse);- // ForkSession forks a session from a specific checkpoint.- rpc ForkSession(ForkSessionRequest) returns (ForkSessionResponse);+ // Fork forks an event log from a specific checkpoint.+ rpc Fork(ForkRequest) returns (ForkResponse);// RegisterAgent registers a new agent with the controllerrpc RegisterAgent(RegisterAgentRequest) returns (RegisterAgentResponse);diff --git a/proto/gar_grpc.pb.go b/proto/gar_grpc.pb.goindex 737d7ca..bb56af2 100644--- a/proto/gar_grpc.pb.go+++ b/proto/gar_grpc.pb.go@@ -177,7 +177,7 @@ var AgentService_ServiceDesc = grpc.ServiceDesc{const (GARService_Exec_FullMethodName = "/proto.GARService/Exec"- GARService_ForkSession_FullMethodName = "/proto.GARService/ForkSession"+ GARService_Fork_FullMethodName = "/proto.GARService/Fork"GARService_RegisterAgent_FullMethodName = "/proto.GARService/RegisterAgent"GARService_UnregisterAgent_FullMethodName = "/proto.GARService/UnregisterAgent")@@ -188,11 +188,11 @@ const (//// GARService defines the gRPC service for GAR operationstype GARServiceClient interface {- // Exec executes a new agentic loop session or resumes an existing one with streaming responses- // If the session_id already exists, it will be resumed from the last checkpoint+ // Exec executes an agentic task or resumes an existing one with streaming responses+ // If the execution id already exists, it will be resumed from the last checkpoint.Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ExecResponse], error)- // ForkSession forks a session from a specific checkpoint.- ForkSession(ctx context.Context, in *ForkSessionRequest, opts ...grpc.CallOption) (*ForkSessionResponse, error)+ // Fork forks an event log from a specific checkpoint.+ Fork(ctx context.Context, in *ForkRequest, opts ...grpc.CallOption) (*ForkResponse, error)// RegisterAgent registers a new agent with the controllerRegisterAgent(ctx context.Context, in *RegisterAgentRequest, opts ...grpc.CallOption) (*RegisterAgentResponse, error)// UnregisterAgent removes an agent from the controller@@ -226,10 +226,10 @@ func (c *gARServiceClient) Exec(ctx context.Context, in *ExecRequest, opts ...gr// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.type GARService_ExecClient = grpc.ServerStreamingClient[ExecResponse]-func (c *gARServiceClient) ForkSession(ctx context.Context, in *ForkSessionRequest, opts ...grpc.CallOption) (*ForkSessionResponse, error) {+func (c *gARServiceClient) Fork(ctx context.Context, in *ForkRequest, opts ...grpc.CallOption) (*ForkResponse, error) {cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)- out := new(ForkSessionResponse)- err := c.cc.Invoke(ctx, GARService_ForkSession_FullMethodName, in, out, cOpts...)+ out := new(ForkResponse)+ err := c.cc.Invoke(ctx, GARService_Fork_FullMethodName, in, out, cOpts...)if err != nil {return nil, err}@@ -262,11 +262,11 @@ func (c *gARServiceClient) UnregisterAgent(ctx context.Context, in *UnregisterAg//// GARService defines the gRPC service for GAR operationstype GARServiceServer interface {- // Exec executes a new agentic loop session or resumes an existing one with streaming responses- // If the session_id already exists, it will be resumed from the last checkpoint+ // Exec executes an agentic task or resumes an existing one with streaming responses+ // If the execution id already exists, it will be resumed from the last checkpoint.Exec(*ExecRequest, grpc.ServerStreamingServer[ExecResponse]) error- // ForkSession forks a session from a specific checkpoint.- ForkSession(context.Context, *ForkSessionRequest) (*ForkSessionResponse, error)+ // Fork forks an event log from a specific checkpoint.+ Fork(context.Context, *ForkRequest) (*ForkResponse, error)// RegisterAgent registers a new agent with the controllerRegisterAgent(context.Context, *RegisterAgentRequest) (*RegisterAgentResponse, error)// UnregisterAgent removes an agent from the controller@@ -284,8 +284,8 @@ type UnimplementedGARServiceServer struct{}func (UnimplementedGARServiceServer) Exec(*ExecRequest, grpc.ServerStreamingServer[ExecResponse]) error {return status.Errorf(codes.Unimplemented, "method Exec not implemented")}-func (UnimplementedGARServiceServer) ForkSession(context.Context, *ForkSessionRequest) (*ForkSessionResponse, error) {- return nil, status.Errorf(codes.Unimplemented, "method ForkSession not implemented")+func (UnimplementedGARServiceServer) Fork(context.Context, *ForkRequest) (*ForkResponse, error) {+ return nil, status.Errorf(codes.Unimplemented, "method Fork not implemented")}func (UnimplementedGARServiceServer) RegisterAgent(context.Context, *RegisterAgentRequest) (*RegisterAgentResponse, error) {return nil, status.Errorf(codes.Unimplemented, "method RegisterAgent not implemented")@@ -325,20 +325,20 @@ func _GARService_Exec_Handler(srv interface{}, stream grpc.ServerStream) error {// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.type GARService_ExecServer = grpc.ServerStreamingServer[ExecResponse]-func _GARService_ForkSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(ForkSessionRequest)+func _GARService_Fork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(ForkRequest)if err := dec(in); err != nil {return nil, err}if interceptor == nil {- return srv.(GARServiceServer).ForkSession(ctx, in)+ return srv.(GARServiceServer).Fork(ctx, in)}info := &grpc.UnaryServerInfo{Server: srv,- FullMethod: GARService_ForkSession_FullMethodName,+ FullMethod: GARService_Fork_FullMethodName,}handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(GARServiceServer).ForkSession(ctx, req.(*ForkSessionRequest))+ return srv.(GARServiceServer).Fork(ctx, req.(*ForkRequest))}return interceptor(ctx, in, info, handler)}@@ -387,8 +387,8 @@ var GARService_ServiceDesc = grpc.ServiceDesc{HandlerType: (*GARServiceServer)(nil),Methods: []grpc.MethodDesc{{- MethodName: "ForkSession",- Handler: _GARService_ForkSession_Handler,+ MethodName: "Fork",+ Handler: _GARService_Fork_Handler,},{MethodName: "RegisterAgent",diff --git a/python/example_agent.py b/python/example_agent.pyindex fee97ef..1d438ea 100644--- a/python/example_agent.py+++ b/python/example_agent.py@@ -23,14 +23,14 @@ from gar import Agentimport proto.gar_pb2 as pb2-def process(session_id, inputs):+def process(execution_id, inputs):"""Process incoming content list and yield responses"""for content in inputs:yield pb2.Content(role="assistant",type="text",mimetype="text/plain",- data=f"Python processed (session {session_id}): {content.data.upper()}"+ data=f"Python processed (execution {execution_id}): {content.data.upper()}")diff --git a/python/gar.py b/python/gar.pyindex 51273d3..0933520 100644--- a/python/gar.py+++ b/python/gar.py@@ -28,7 +28,7 @@ class Agent:Agent provides a simple framework for building Python agents.Usage:- def process(session_id, inputs):+ def process(execution_id, inputs):for content in inputs:yield Content(role="assistant", type="text",mimetype="text/plain", data=f"Processed: {content.data}")@@ -46,7 +46,7 @@ class Agent:Initialize an agent.Args:- process_func: Function that takes (session_id: str, inputs: list) and yields Content responses+ process_func: Function that takes (execution_id: str, inputs: list) and yields Content responseshealth_check_func: Optional function that returns (healthy: bool, message: str, metadata: dict)"""self.process_func = process_func@@ -58,15 +58,15 @@ class Agent:class AgentServicer(pb2_grpc.AgentServiceServicer):def Process(self, request_iterator, context):- # Extract session_id from gRPC metadata+ # Extract id from gRPC metadatametadata = dict(context.invocation_metadata())- session_id = metadata.get('session-id', '')+ id = metadata.get('execution-id', '')# Collect all content into a listinputs = list(request_iterator)- # Process the list of content with session_id- for response in agent.process_func(session_id, inputs):+ # Process the list of content with id+ for response in agent.process_func(id, inputs):if response:yield response@@ -128,7 +128,7 @@ def create_agent(Create and start an agent in one call.Args:- process_func: Function that takes (session_id: str, inputs: list) and yields Content responses+ process_func: Function that takes (execution_id: str, inputs: list) and yields Content responseshealth_check_func: Optional function that returns (healthy: bool, message: str, metadata: dict)port: Port to listen on (default: 50051)"""diff --git a/test_multi.go b/test_multi.goindex 3f81a0e..c715b86 100644--- a/test_multi.go+++ b/test_multi.go@@ -30,7 +30,7 @@ import (func main() {ctx := context.Background()input := "Send the word 'oRanGe' to the local-echo-agent. Take its exact output and send it to the remote-text-processor. Take its exact output and send it to the uppercase agent. Return the final output."- sessionID := uuid.New().String()+ execID := uuid.New().String()// 1. Create a local agentechoAgent, err := createLocalAgent()@@ -93,7 +93,7 @@ func main() {},}- log.Printf("Session ID: %s\n", sessionID)+ log.Printf("ID: %s\n", execID)handler := agent.OutputHandler(func(outgoing *proto.ProcessResponse) error {for _, c := range outgoing.Contents {@@ -110,8 +110,8 @@ func main() {for i := 0; i < 4; i++ {log.Printf("\n--- Executing step %d ---\n", i+1)- if err := c.Exec(ctx, sessionID, "", req, handler); err != nil {- log.Fatalf("Error executing session step %d: %v\n", i+1, err)+ if err := c.Exec(ctx, execID, "", req, handler); err != nil {+ log.Fatalf("Error executing step %d: %v\n", i+1, err)}// Subsequent execs just ask the planner to continue processing the existing historyreq = &proto.ProcessRequest{}