Skip to content

armgit / ax

Public Imported from GitHub
0

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

Go

support forSession

JoyceLiu9f9622480fc2
diff --git a/.gitignore b/.gitignore
index abb80eb..08390a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
bin/*
eventlog/*
-./gar
-./local_agent
-./remote_agent
+/gar
+local_agent
+remote_agent
+*.log
diff --git a/README.md b/README.md
index 8c7e727..a71e5c0 100644
--- a/README.md
+++ b/README.md
@@ -119,6 +119,7 @@ gar trigger \
--input <text> \
[--session <id>] \
[--checkpoint <uuid>] \
+ [--destination_session <id>] \
[--server <address>]
```
@@ -128,6 +129,7 @@ Options:
- `--input`: Input message to send to agents (required)
- `--session`: Unique session identifier (optional, generates UUID if not provided, or resumes if exists)
- `--checkpoint`: Resume from specific checkpoint (empty for latest)
+- `--destination_session`: New Session ID when resuming from a checkpoint (optional, auto-generated if empty).
- `--server`: gRPC controller server address (default: "localhost:8494")
- `--headless`: Run in headless mode with a built-in GAR server
- `--config`: Path to YAML configuration file (only used in headless mode, default: "gar.yaml")
@@ -148,6 +150,44 @@ gar trigger --session abc123 \
# Trigger using headless mode (local controller)
gar trigger --headless --input "Quick test to upper case"
+
+# Trigger a session from a specific checkpoint - gar will auto fork the session to a new session id and resume from the checkpoint. User can provide desitination_session to specify the new session id, otherwise it will auto generate one.
+gar trigger \
+ --session session123 \
+ --checkpoint "550e8400-e29b-41d4-a716-446655440000" \
+ --destination_session session123-fork \
+ --input "Continue processing"
+```
+
+#### Fork a Session
+
+Fork an existing session from a specific checkpoint (or the latest state) into a new session.
+
+```bash
+gar fork \
+ --source_session <id> \
+ [--checkpoint <id>] \
+ [--destination_session <id>] \
+ [--server <address>]
+```
+
+Options:
+- `--source_session`: Source Session ID to fork from (required)
+- `--checkpoint`: Checkpoint ID to fork from (optional, defaults to latest)
+- `--destination_session`: Destination Session ID (optional, generates UUID if not provided)
+- `--server`: gRPC controller server address (default: "localhost:8494")
+
+**Example:**
+
+```bash
+# Fork from the latest state
+gar fork --source_session abc123
+
+# Fork from a specific checkpoint
+gar fork --source_session abc123 --checkpoint "550e..."
+
+# Fork from a specific checkpoint to a new session with a specific new session id
+gar fork --source_session abc123 --checkpoint "550e..." --destination_session new-session-id
```
#### Register a Remote Agent
diff --git a/cmd/gar/fork.go b/cmd/gar/fork.go
new file mode 100644
index 0000000..c9883db
--- /dev/null
+++ b/cmd/gar/fork.go
@@ -0,0 +1,87 @@
+// 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 (
+ "context"
+ "fmt"
+
+ "github.com/google/gar/proto"
+ "github.com/google/uuid"
+ "github.com/spf13/cobra"
+)
+
+var (
+ forkSourceSessionID string
+ forkCheckpointID string
+ forkDestSessionID string
+ forkInput 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 --destination_session is not provided, a new UUID will be generated.`,
+ RunE: runFork,
+}
+
+func init() {
+ forkCmd.Flags().StringVar(&forkSourceSessionID, "source_session", "", "Source Session ID to fork from (required)")
+ forkCmd.Flags().StringVar(&forkCheckpointID, "checkpoint", "", "Checkpoint ID to fork from (optional, defaults to latest)")
+ forkCmd.Flags().StringVar(&forkDestSessionID, "destination_session", "", "Destination Session ID (optional, generates UUID if not provided)")
+ forkCmd.Flags().StringVar(&forkServerAddr, "server", "localhost:8494", "gRPC controller server address (default: localhost:8494)")
+
+ forkCmd.MarkFlagRequired("source_session")
+}
+
+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)
+ }
+
+ conn, err := connect(forkServerAddr)
+ if err != nil {
+ return err
+ }
+ defer conn.Close()
+
+ client := proto.NewGARServiceClient(conn)
+
+ _, err = ForkSession(ctx, client, forkSourceSessionID, forkCheckpointID, forkDestSessionID)
+ 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{
+ SourceSessionId: sourceSessionID,
+ SourceCheckpointId: checkpointID,
+ DestSessionId: destSessionID,
+ })
+ if err != nil {
+ return "", fmt.Errorf("error forking session: %w", err)
+ }
+
+ fmt.Printf("Forked session ID: %s\n", resp.NewSessionId)
+ return resp.NewSessionId, nil
+}
diff --git a/cmd/gar/inspect.go b/cmd/gar/inspect.go
new file mode 100644
index 0000000..76f7dae
--- /dev/null
+++ b/cmd/gar/inspect.go
@@ -0,0 +1,74 @@
+// 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 (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/google/gar/proto"
+ "github.com/spf13/cobra"
+)
+
+var (
+ inspectSessionID string
+ inspectServerAddr string
+)
+
+var inspectCmd = &cobra.Command{
+ Use: "inspect",
+ Short: "Inspect a session",
+ Long: `Inspect a session to view its current state, step count, and other details.`,
+ RunE: runInspect,
+}
+
+func init() {
+ inspectCmd.Flags().StringVar(&inspectSessionID, "session", "", "Session ID (required)")
+ inspectCmd.Flags().StringVar(&inspectServerAddr, "server", "localhost:8494", "gRPC controller server address (default: localhost:8494)")
+ inspectCmd.MarkFlagRequired("session")
+}
+
+func runInspect(cmd *cobra.Command, args []string) error {
+ ctx := context.Background()
+ conn, err := connect(inspectServerAddr)
+ if err != nil {
+ return err
+ }
+ defer conn.Close()
+
+ client := proto.NewGARServiceClient(conn)
+
+ // Get session details
+ resp, err := client.GetSession(ctx, &proto.GetSessionRequest{
+ SessionId: inspectSessionID,
+ })
+ if err != nil {
+ return fmt.Errorf("error getting session: %w", err)
+ }
+
+ session := resp.Session
+
+ // Print session details
+ fmt.Println("\nSession Details:")
+ fmt.Printf(" ID: %s\n", inspectSessionID)
+ fmt.Printf(" State: %s\n", session.State)
+ fmt.Printf(" Created At: %s\n", session.CreatedAt.AsTime().Format(time.RFC3339))
+ fmt.Printf(" Updated At: %s\n", session.UpdatedAt.AsTime().Format(time.RFC3339))
+ fmt.Printf(" Checkpoints: %v\n", session.CheckpointIds)
+ fmt.Printf(" Active Agents: %v\n", session.ActiveAgents)
+
+ return nil
+}
diff --git a/cmd/gar/main.go b/cmd/gar/main.go
index 80b223f..c409d18 100644
--- a/cmd/gar/main.go
+++ b/cmd/gar/main.go
@@ -44,6 +44,8 @@ register agents, and run the controller server.`,
func init() {
// Add subcommands
rootCmd.AddCommand(triggerCmd)
+ rootCmd.AddCommand(forkCmd)
+ rootCmd.AddCommand(inspectCmd)
rootCmd.AddCommand(registerCmd)
rootCmd.AddCommand(serveCmd)
}
diff --git a/cmd/gar/trigger.go b/cmd/gar/trigger.go
index 7102d99..2f0c722 100644
--- a/cmd/gar/trigger.go
+++ b/cmd/gar/trigger.go
@@ -30,12 +30,13 @@ import (
)
var (
- triggerSessionID string
- triggerInput string
- triggerCheckpoint string
- triggerServerAddr string
- triggerHeadless bool
- triggerConfigFile string
+ triggerSessionID string
+ triggerInput string
+ triggerCheckpoint string
+ triggerDestSessionID string
+ triggerServerAddr string
+ triggerHeadless bool
+ triggerConfigFile string
)
var triggerCmd = &cobra.Command{
@@ -51,6 +52,7 @@ func init() {
triggerCmd.Flags().StringVar(&triggerSessionID, "session", "", "Session ID (optional, generates UUID if not provided)")
triggerCmd.Flags().StringVar(&triggerInput, "input", "", "Input message to send (required)")
triggerCmd.Flags().StringVar(&triggerCheckpoint, "checkpoint", "", "Resume from specific checkpoint UUID (empty for latest)")
+ triggerCmd.Flags().StringVar(&triggerDestSessionID, "destination_session", "", "Destination Session ID when forking from checkpoint (optional)")
triggerCmd.Flags().StringVar(&triggerServerAddr, "server", "localhost:8494", "gRPC controller server address (default: localhost:8494)")
triggerCmd.Flags().BoolVar(&triggerHeadless, "headless", false, "Run in headless mode with a built-in Controller")
triggerCmd.Flags().StringVar(&triggerConfigFile, "config", "gar.yaml", "Path to YAML configuration file (only used in headless mode)")
@@ -104,10 +106,24 @@ func runTrigger(cmd *cobra.Command, args []string) error {
defer conn.Close()
client := proto.NewGARServiceClient(conn)
+
+ // If checkpoint is provided, we fork the session first
+ if triggerCheckpoint != "" {
+ if triggerDestSessionID == "" {
+ triggerDestSessionID = uuid.New().String()
+ fmt.Printf("Generated new session ID: %s\n", triggerDestSessionID)
+ }
+
+ forkedID, err := ForkSession(ctx, client, triggerSessionID, triggerCheckpoint, triggerDestSessionID)
+ if err != nil {
+ return err
+ }
+ triggerSessionID = forkedID
+ }
+
stream, err := client.TriggerSession(ctx, &proto.TriggerSessionRequest{
SessionId: triggerSessionID,
Inputs: inputs,
- CheckpointId: triggerCheckpoint,
})
if err != nil {
return fmt.Errorf("error triggering session: %w", err)
@@ -123,6 +139,10 @@ func runTrigger(cmd *cobra.Command, args []string) error {
return fmt.Errorf("error receiving response: %w", err)
}
+ if resp.CheckpointId != "" {
+ fmt.Printf("Checkpoint ID: %s\n", resp.CheckpointId)
+ }
+
if resp.Outputs != nil {
printResponse(resp.State, resp.Outputs)
}
@@ -157,8 +177,8 @@ func runHeadless(ctx context.Context, sessionID string, inputs []*proto.Content)
})
req := &proto.ProcessRequest{
- Contents: inputs,
CheckpointId: triggerCheckpoint,
+ Contents: inputs,
}
if err := c.TriggerSession(ctx, sessionID, req, outputHandler); err != nil {
diff --git a/examples/remote_agent/main.go b/examples/remote_agent/main.go
index 8e71502..f0d9f0b 100644
--- a/examples/remote_agent/main.go
+++ b/examples/remote_agent/main.go
@@ -25,6 +25,7 @@ import (
"google.golang.org/grpc"
"github.com/google/gar/proto"
+ "github.com/google/uuid"
)
const port = ":50051"
@@ -59,7 +60,8 @@ func (s *server) Process(stream proto.AgentService_ProcessServer) error {
})
}
if err := stream.Send(&proto.ProcessResponse{
- Contents: contents,
+ Contents: contents,
+ CheckpointId: uuid.New().String(),
}); err != nil {
return err
}
diff --git a/internal/controller/controller.go b/internal/controller/controller.go
index 1ce132d..450c27a 100644
--- a/internal/controller/controller.go
+++ b/internal/controller/controller.go
@@ -116,11 +116,15 @@ func (d *Controller) TriggerSession(ctx context.Context, sessionID string, incom
d.inFlightSessionsMu.Lock()
_, ok := d.inFlightSessions[sessionID]
+ if !ok {
+ d.inFlightSessions[sessionID] = struct{}{}
+ }
d.inFlightSessionsMu.Unlock()
if ok {
return fmt.Errorf("session is already in flight")
}
+
defer func() {
d.inFlightSessionsMu.Lock()
delete(d.inFlightSessions, sessionID)
@@ -148,16 +152,40 @@ func (d *Controller) TriggerSession(ctx context.Context, sessionID string, incom
return nil
}
-func (d *Controller) TriggerForkedSession(ctx context.Context, sessionID string, incoming *proto.ProcessRequest, handler agent.OutputHandler) error {
- if sessionID == "" {
- return fmt.Errorf("session_id is required")
+// 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")
+ }
+ if destSessionID == "" {
+ return fmt.Errorf("new_session_id is required")
}
- if incoming.CheckpointId == "" {
- return fmt.Errorf("checkpoint_id is required")
+
+ d.inFlightSessionsMu.Lock()
+ _, ok := d.inFlightSessions[destSessionID]
+ if !ok {
+ d.inFlightSessions[destSessionID] = struct{}{}
+ }
+ d.inFlightSessionsMu.Unlock()
+
+ if ok {
+ return fmt.Errorf("newly generated session ID collision")
}
- // TODO(jbd): Fork a new session by copying all content to
- // the provided checkpoint ID, and execute the loop executor.
- panic("not yet implemented")
+
+ defer func() {
+ d.inFlightSessionsMu.Lock()
+ delete(d.inFlightSessions, destSessionID)
+ d.inFlightSessionsMu.Unlock()
+ }()
+
+ // Fork the session
+ _, err := d.sessionManager.ForkSession(ctx, sourceSessionID, sourceCheckpoint, destSessionID)
+ if err != nil {
+ return fmt.Errorf("failed to fork session: %w", err)
+ }
+
+ return nil
}
// LoadSession loads a session from event log.
diff --git a/internal/controller/session.go b/internal/controller/session.go
index 09dbd83..6ec3584 100644
--- a/internal/controller/session.go
+++ b/internal/controller/session.go
@@ -21,6 +21,7 @@ import (
"github.com/google/gar/internal/eventlog"
"github.com/google/gar/proto"
+ pbproto "google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/timestamppb"
)
@@ -60,7 +61,7 @@ func (sm *SessionManager) NewSession(sessionID string) (*Session, error) {
sm.mu.Lock()
defer sm.mu.Unlock()
- // Check if session already ok
+ // Check if session already exists
if _, ok := sm.sessions[sessionID]; ok {
return nil, fmt.Errorf("session %s already exists", sessionID)
}
@@ -92,77 +93,178 @@ func (sm *SessionManager) LoadSession(ctx context.Context, sessionID string) (*S
// LoadSessionFromCheckpoint loads an existing session from event log up to a specific checkpoint.
// If checkpointID is empty, loads to the latest state.
// If checkpointID is provided, loads up to and including that checkpoint UUID.
-func (sm *SessionManager) LoadSessionFromCheckpoint(ctx context.Context, sessionID string, checkpointID string) (*Session, error) {
+func (sm *SessionManager) LoadSessionFromCheckpoint(ctx context.Context, sessionID, checkpointID string) (*Session, error) {
if err := validateID(sessionID); err != nil {
return nil, err
}
+
+ // 1. Load events from storage (IO) - No Lock
+ // We do this without holding the lock to allow concurrent reads/writes on other sessions.
+ el, events, state, err := sm.loadEvents(ctx, sessionID, checkpointID)
+ if err != nil {
+ return nil, err
+ }
+
+ // 2. Construct session state in memory - No Lock
+ session := &Session{
+ id: sessionID,
+ state: state,
+ eventLog: el,
+ waitingAgents: make(map[string][]*proto.Content),
+ messageHistory: []*proto.Content{},
+ checkpointIDs: make(map[string]struct{}),
+ }
+
+ err = session.reconstructState(events)
+ if err != nil {
+ _ = el.Close()
+ return nil, err
+ }
+
+ // 3. Commit to manager (Write Lock)
sm.mu.Lock()
defer sm.mu.Unlock()
- // Check if already loaded - remove it to reload fresh from checkpoint
- delete(sm.sessions, sessionID)
+ // Overwrite existing session (atomic switch)
+ // If a session existed, it is replaced by the reloaded version.
+ // The old session instance (if any) is discarded from the map.
+ // Note: We don't explicitly close the session's event log here because it might be in use elsewhere.
+ sm.sessions[sessionID] = session
+ return session, nil
+}
- // Open event log for replay using the builder.
+// loadEvents opens the event log and loads events up to the checkpoint.
+func (sm *SessionManager) loadEvents(ctx context.Context, sessionID, checkpointID string) (eventlog.EventLog, []*proto.Event, proto.State, error) {
+ // Open event log for replay using the factory
el, err := sm.eventLogBuilder(sessionID)
if err != nil {
- return nil, fmt.Errorf("failed to open event log for replay: %w", err)
+ return nil, nil, proto.State_STATE_UNSPECIFIED, fmt.Errorf("failed to open event log for replay: %w", err)
}
events, state, err := el.LoadEvents(ctx, checkpointID)
if err != nil {
- return nil, fmt.Errorf("failed to get event log entries: %w", err)
+ // Clean up potentially opened event log
+ _ = el.Close()
+ return nil, nil, proto.State_STATE_UNSPECIFIED, fmt.Errorf("failed to get event log entries: %w", err)
+ }
+
+ return el, events, state, nil
+}
+
+// ForkSession creates a new session by forking from a source session's checkpoint.
+func (sm *SessionManager) ForkSession(ctx context.Context, sourceSessionID, sourceCheckpointID, newSessionID string) (*Session, error) {
+ if err := validateID(newSessionID); err != nil {
+ return nil, err
+ }
+
+ // 1. Check if session already exists in backend storage
+ newEL, existingEvents, _, err := sm.loadEvents(ctx, newSessionID, "")
+ if err != nil {
+ return nil, fmt.Errorf("failed to initialize new session: %w", err)
+ }
+ if len(existingEvents) > 0 {
+ _ = newEL.Close()
+ return nil, fmt.Errorf("session %s already exists in storage", newSessionID)
}
- // Reconstruct session state from event log
+ // 2. Load Source Events
+ sourceEL, sourceEvents, _, err := sm.loadEvents(ctx, sourceSessionID, sourceCheckpointID)
+ if err != nil {
+ _ = newEL.Close()
+ return nil, fmt.Errorf("failed to load source events: %w", err)
+ }
+ // Close source EL immediately as we only need the events
+ if sourceEL != nil {
+ _ = sourceEL.Close()
+ }
+
+ // 3. Fork the events
+ newEvents := make([]*proto.Event, 0, len(sourceEvents))
+ for _, e := range sourceEvents {
+ // Deep copy the event
+ newEvent := pbproto.Clone(e).(*proto.Event)
+ // Update SessionId for the new session
+ newEvent.SessionId = newSessionID
+
+ if err := newEL.AppendEvent(ctx, newEvent); err != nil {
+ _ = newEL.Close()
+ return nil, fmt.Errorf("failed to append forked event: %w", err)
+ }
+
+ newEvents = append(newEvents, newEvent)
+ }
+
+ // 4. Construct base session
session := &Session{
- id: sessionID,
- state: state,
- eventLog: el,
- waitingAgents: make(map[string][]*proto.Content),
+ id: newSessionID,
+ state: proto.State_STATE_UNSPECIFIED,
messageHistory: []*proto.Content{},
+ waitingAgents: make(map[string][]*proto.Content),
checkpointIDs: make(map[string]struct{}),
+ eventLog: newEL,
+ }
+
+ // Reconstruct session from new events
+ // Session state will be set to the latest state from events
+ err = session.reconstructState(newEvents)
+ if err != nil {
+ _ = newEL.Close()
+ return nil, err
+ }
+
+ // 5. Add new session to manager
+ sm.mu.Lock()
+ defer sm.mu.Unlock()
+
+ _, ok := sm.sessions[newSessionID]
+ if ok {
+ _ = newEL.Close()
+ return nil, fmt.Errorf("failed to add new session to manager: %s", newSessionID)
}
- // Replay entries to rebuild state
+ sm.sessions[newSessionID] = session
+ return session, nil
+}
+
+// Replay entries to rebuild state
+func (s *Session) reconstructState(events []*proto.Event) error {
for _, e := range events {
switch x := e.Kind.(type) {
case *proto.Event_AgentCallEvent:
event := x.AgentCallEvent
if event.AwaitingMore {
- session.waitingAgents[event.Sender] = append(
- session.waitingAgents[event.Sender], event.Contents...)
+ s.waitingAgents[event.Sender] = append(
+ s.waitingAgents[event.Sender], event.Contents...)
} else {
// If buffer already exists, append it to the history first.
// Then merge the new contents to the message history.
// Once we don't wait for new contents from an agent,
// we don't care about the origin of the contents anymore.
- if len(session.waitingAgents[event.Sender]) > 0 {
- session.messageHistory = append(
- session.messageHistory, session.waitingAgents[event.Sender]...)
+ if len(s.waitingAgents[event.Sender]) > 0 {
+ s.messageHistory = append(
+ s.messageHistory, s.waitingAgents[event.Sender]...)
}
- session.messageHistory = append(
- session.messageHistory, event.Contents...)
+ s.messageHistory = append(
+ s.messageHistory, event.Contents...)
// Cleanup the waiting buffer, it's now a part of the overall history.
- delete(session.waitingAgents, event.Sender)
+ delete(s.waitingAgents, event.Sender)
}
case *proto.Event_SessionStateEvent:
- session.state = x.SessionStateEvent.State
+ s.state = x.SessionStateEvent.State
case *proto.Event_HandoffEvent:
- return nil, fmt.Errorf("HandoffEvent is not yet supported")
+ return fmt.Errorf("HandoffEvent is not yet supported")
case *proto.Event_ContentEvent:
- session.messageHistory = append(session.messageHistory, x.ContentEvent.Contents...)
+ s.messageHistory = append(s.messageHistory, x.ContentEvent.Contents...)
default:
- return nil, fmt.Errorf("unknown event kind: %v", e.Kind)
+ return fmt.Errorf("unknown event kind: %v", e.Kind)
}
if e.CheckpointId != "" {
- session.checkpointIDs[e.CheckpointId] = struct{}{}
+ s.checkpointIDs[e.CheckpointId] = struct{}{}
}
}
-
- sm.sessions[sessionID] = session
- return session, nil
+ return nil
}
// GetSession retrieves a session by ID.
diff --git a/internal/controller/session_test.go b/internal/controller/session_test.go
new file mode 100644
index 0000000..4e71d2c
--- /dev/null
+++ b/internal/controller/session_test.go
@@ -0,0 +1,185 @@
+// 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"
+ "fmt"
+ "sync"
+ "testing"
+
+ "github.com/google/gar/internal/eventlog"
+ "github.com/google/gar/proto"
+)
+
+// MockEventLog implements eventlog.EventLog for testing.
+type MockEventLog struct {
+ sessionID string
+ events []*proto.Event
+ mu sync.Mutex
+ closed bool
+}
+
+func (m *MockEventLog) AppendEvent(ctx context.Context, e *proto.Event) error {
+ m.mu.Lock()
+ defer m.mu.Unlock()
+ if m.closed {
+ return fmt.Errorf("log closed")
+ }
+ m.events = append(m.events, e)
+ return nil
+}
+
+func (m *MockEventLog) LoadEvents(ctx context.Context, checkpointID string) ([]*proto.Event, proto.State, error) {
+ m.mu.Lock()
+ defer m.mu.Unlock()
+
+ var events []*proto.Event
+ var state proto.State
+ for _, e := range m.events {
+ switch x := e.Kind.(type) {
+ case *proto.Event_SessionStateEvent:
+ state = x.SessionStateEvent.State
+ }
+ events = append(events, e)
+ if checkpointID != "" && e.CheckpointId == checkpointID {
+ break
+ }
+ }
+ return events, state, nil
+}
+
+func (m *MockEventLog) Close() error {
+ m.mu.Lock()
+ defer m.mu.Unlock()
+ m.closed = true
+ return nil
+}
+
+func (m *MockEventLog) SessionID() string {
+ return m.sessionID
+}
+
+func TestSessionManager_ForkSession_Success(t *testing.T) {
+ ctx := context.Background()
+
+ // Create a storage for mocks to simulate persistence
+ storage := make(map[string]*MockEventLog)
+ factory := func(sessionID string) (eventlog.EventLog, error) {
+ if el, ok := storage[sessionID]; ok {
+ return el, nil
+ }
+ el := &MockEventLog{sessionID: sessionID}
+ storage[sessionID] = el
+ return el, nil
+ }
+
+ sm := &SessionManager{
+ sessions: make(map[string]*Session),
+ eventLogBuilder: factory,
+ }
+
+ sourceID := "source"
+ checkpointID := "cp1"
+ newID := "fork"
+
+ // Setup source session with events
+ sourceEL, _ := factory(sourceID)
+ sourceEvents := []*proto.Event{
+ {SessionId: sourceID, CheckpointId: checkpointID, Kind: &proto.Event_ContentEvent{ContentEvent: &proto.ContentEvent{Contents: []*proto.Content{{Role: "user"}}}}},
+ {SessionId: sourceID, Kind: &proto.Event_SessionStateEvent{SessionStateEvent: &proto.SessionStateEvent{State: proto.State_STATE_COMPLETED}}},
+ }
+ for _, e := range sourceEvents {
+ sourceEL.AppendEvent(ctx, e)
+ }
+
+ // Fork
+ session, err := sm.ForkSession(ctx, sourceID, checkpointID, newID)
+ if err != nil {
+ t.Fatalf("ForkSession failed: %v", err)
+ }
+
+ if session.ID() != newID {
+ t.Errorf("expected session ID %s, got %s", newID, session.ID())
+ }
+
+ // Verify events were replayed to new ID
+ forkEL := storage[newID]
+ if len(forkEL.events) != 1 { // Only one event up to checkpoint
+ t.Errorf("expected 1 event replayed, got %d", len(forkEL.events))
+ }
+ if forkEL.events[0].SessionId != newID {
+ t.Errorf("expected replayed event to have session ID %s, got %s", newID, forkEL.events[0].SessionId)
+ }
+}
+
+
+func TestSessionManager_ForkSession_Concurrent(t *testing.T) {
+ // Test if multiple concurrent forks to the same ID handle memory lock correctly
+ ctx := context.Background()
+ storage := make(map[string]*MockEventLog)
+ var mu sync.Mutex
+ factory := func(sessionID string) (eventlog.EventLog, error) {
+ mu.Lock()
+ defer mu.Unlock()
+ if el, ok := storage[sessionID]; ok {
+ return el, nil
+ }
+ el := &MockEventLog{sessionID: sessionID}
+ storage[sessionID] = el
+ return el, nil
+ }
+
+ sm := &SessionManager{
+ sessions: make(map[string]*Session),
+ eventLogBuilder: factory,
+ }
+
+ sourceID := "source"
+ newID := "shared-fork"
+
+ // Setup source
+ sourceEL, _ := factory(sourceID)
+ sourceEL.AppendEvent(ctx, &proto.Event{SessionId: sourceID, Kind: &proto.Event_ContentEvent{ContentEvent: &proto.ContentEvent{}}})
+
+ // Run multiple forks concurrently
+ var wg sync.WaitGroup
+ errs := make(chan error, 10)
+ for i := 0; i < 10; i++ {
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+ _, err := sm.ForkSession(ctx, sourceID, "", newID)
+ if err != nil {
+ errs <- err
+ }
+ }()
+ }
+ wg.Wait()
+ close(errs)
+
+ successCount := 0
+ collisionCount := 0
+ for err := range errs {
+ if err != nil {
+ collisionCount++
+ }
+ }
+ successCount = 10 - collisionCount
+
+ if successCount != 1 {
+ t.Errorf("expected exactly 1 successful fork, got %d", successCount)
+ }
+}
diff --git a/internal/controller/validation_test.go b/internal/controller/validation_test.go
index 0714399..3879ea3 100644
--- a/internal/controller/validation_test.go
+++ b/internal/controller/validation_test.go
@@ -65,7 +65,7 @@ func TestValidateSessionID(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
err := validateID(tt.sessionID)
if (err != nil) != tt.wantErr {
- t.Errorf("validateSessionID(%q) error = %v, wantErr %v", tt.sessionID, err, tt.wantErr)
+ t.Errorf("validateID(%q) error = %v, wantErr %v", tt.sessionID, err, tt.wantErr)
}
})
}
diff --git a/internal/server/server.go b/internal/server/server.go
index 0bb2a15..eebb796 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -14,6 +14,7 @@
// Package server implements the gRPC server for GARService,
// exposing session management and agent registration APIs.
+
package server
import (
@@ -57,26 +58,76 @@ func (s *Server) TriggerSession(req *proto.TriggerSessionRequest, stream grpc.Se
return err
}
- // Create output handler to stream outputs back to client
+ incoming := &proto.ProcessRequest{
+ CheckpointId: req.CheckpointId,
+ Contents: inputs,
+ }
+ if checkpointID == "" {
+ // Create output handler to stream outputs back to client
+ outputHandler := agent.OutputHandler(func(outgoing *proto.ProcessResponse) error {
+ return stream.Send(&proto.TriggerSessionResponse{
+ SessionId: sessionID,
+ CheckpointId: outgoing.CheckpointId,
+ Outputs: outgoing.Contents,
+ State: proto.State_STATE_RUNNING,
+ })
+ })
+ return s.controller.TriggerSession(
+ stream.Context(), sessionID, incoming, outputHandler)
+ }
+
+ return s.TriggerFromCheckpoint(stream.Context(), sessionID, checkpointID, sessionID, incoming, stream)
+}
+
+func (s *Server) TriggerFromCheckpoint(ctx context.Context, sourceSessionID, checkpointID, newSessionID string, incoming *proto.ProcessRequest, stream grpc.ServerStreamingServer[proto.TriggerSessionResponse]) error {
+ // Create output handler
outputHandler := agent.OutputHandler(func(outgoing *proto.ProcessResponse) error {
return stream.Send(&proto.TriggerSessionResponse{
- SessionId: sessionID,
+ SessionId: newSessionID,
CheckpointId: outgoing.CheckpointId,
Outputs: outgoing.Contents,
State: proto.State_STATE_RUNNING,
})
})
- incoming := &proto.ProcessRequest{
- CheckpointId: req.CheckpointId,
- Contents: inputs,
+ // Fork session
+ if err := s.controller.ForkSession(ctx, sourceSessionID, checkpointID, newSessionID); err != nil {
+ return fmt.Errorf("failed to prepare session from checkpoint: %w", err)
+ }
+
+ // Trigger new session
+ return s.controller.TriggerSession(ctx, newSessionID, incoming, outputHandler)
+}
+
+func (s *Server) ForkSession(ctx context.Context, req *proto.ForkSessionRequest) (*proto.ForkSessionResponse, error) {
+ if err := s.controller.ForkSession(ctx, req.SourceSessionId, req.SourceCheckpointId, req.DestSessionId); err != nil {
+ return nil, err
}
- if checkpointID == "" {
- return s.controller.TriggerSession(
- stream.Context(), sessionID, incoming, outputHandler)
+
+ return &proto.ForkSessionResponse{
+ NewSessionId: req.DestSessionId,
+ }, nil
+}
+
+// GetSession retrieves session details.
+func (s *Server) GetSession(ctx context.Context, req *proto.GetSessionRequest) (*proto.GetSessionResponse, error) {
+ if req.SessionId == "" {
+ return nil, fmt.Errorf("session_id is required")
}
- return s.controller.TriggerForkedSession(
- stream.Context(), sessionID, incoming, outputHandler)
+
+ session, err := s.controller.LoadSession(ctx, req.SessionId)
+ if err != nil {
+ return nil, err
+ }
+
+ // TODO(jbd): Populate CreatedAt and UpdatedAt from event log.
+ return &proto.GetSessionResponse{
+ Session: &proto.SessionInfo{
+ State: session.State(),
+ CheckpointIds: session.CheckpointIDs(),
+ ActiveAgents: session.WaitingAgents(),
+ },
+ }, nil
}
// RegisterAgent registers a new remote agent with the controller.
diff --git a/proto/gar.pb.go b/proto/gar.pb.go
index c7c011b..853f162 100644
--- a/proto/gar.pb.go
+++ b/proto/gar.pb.go
@@ -14,8 +14,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.35.1
-// protoc v5.28.2
+// protoc-gen-go v1.36.11
+// protoc v6.33.4
// source: proto/gar.proto
package proto
@@ -26,6 +26,7 @@ import (
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -90,15 +91,14 @@ func (State) EnumDescriptor() ([]byte, []int) {
// ProcessRequest is an input to an agent.
type ProcessRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Checkpoint is the optional checkpoint associated with
// the contents.
CheckpointId string `protobuf:"bytes,1,opt,name=checkpoint_id,json=checkpointId,proto3" json:"checkpoint_id,omitempty"`
// Contents as input.
- Contents []*Content `protobuf:"bytes,2,rep,name=contents,proto3" json:"contents,omitempty"`
+ Contents []*Content `protobuf:"bytes,2,rep,name=contents,proto3" json:"contents,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ProcessRequest) Reset() {
@@ -148,10 +148,7 @@ func (x *ProcessRequest) GetContents() []*Content {
// ProcessResponse is an output from an agent.
// It can be returned in a streaming fashion.
type ProcessResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Checkpoint is the optional checkpoint associated with
// the contents.
CheckpointId string `protobuf:"bytes,1,opt,name=checkpoint_id,json=checkpointId,proto3" json:"checkpoint_id,omitempty"`
@@ -159,7 +156,9 @@ type ProcessResponse struct {
Contents []*Content `protobuf:"bytes,2,rep,name=contents,proto3" json:"contents,omitempty"`
// Optional agent handoff. If set controller, hands off the
// execution to the provided agent.
- AgentHandoff string `protobuf:"bytes,3,opt,name=agent_handoff,json=agentHandoff,proto3" json:"agent_handoff,omitempty"`
+ AgentHandoff string `protobuf:"bytes,3,opt,name=agent_handoff,json=agentHandoff,proto3" json:"agent_handoff,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ProcessResponse) Reset() {
@@ -215,11 +214,10 @@ func (x *ProcessResponse) GetAgentHandoff() string {
// TextContent represents a text content.
type TextContent struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TextContent) Reset() {
@@ -261,15 +259,14 @@ func (x *TextContent) GetText() string {
// Content represents a message with role, type, mimetype, and data fields
type Content struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Types that are assignable to Content:
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to Content:
//
// *Content_Text
- Content isContent_Content `protobuf_oneof:"content"`
- Role string `protobuf:"bytes,1000,opt,name=role,proto3" json:"role,omitempty"` // The role of the content (e.g., "user", "assistant", "system")
+ Content isContent_Content `protobuf_oneof:"content"`
+ Role string `protobuf:"bytes,1000,opt,name=role,proto3" json:"role,omitempty"` // The role of the content (e.g., "user", "assistant", "system")
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Content) Reset() {
@@ -302,16 +299,18 @@ func (*Content) Descriptor() ([]byte, []int) {
return file_proto_gar_proto_rawDescGZIP(), []int{3}
}
-func (m *Content) GetContent() isContent_Content {
- if m != nil {
- return m.Content
+func (x *Content) GetContent() isContent_Content {
+ if x != nil {
+ return x.Content
}
return nil
}
func (x *Content) GetText() *TextContent {
- if x, ok := x.GetContent().(*Content_Text); ok {
- return x.Text
+ if x != nil {
+ if x, ok := x.Content.(*Content_Text); ok {
+ return x.Text
+ }
}
return nil
}
@@ -338,11 +337,10 @@ func (*Content_Text) isContent_Content() {}
// For example, controller doesn't continue a session once
// the state is set to STATE_FAILED.
type SessionStateEvent struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ State State `protobuf:"varint,1,opt,name=state,proto3,enum=proto.State" json:"state,omitempty"`
unknownFields protoimpl.UnknownFields
-
- State State `protobuf:"varint,1,opt,name=state,proto3,enum=proto.State" json:"state,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *SessionStateEvent) Reset() {
@@ -384,13 +382,12 @@ func (x *SessionStateEvent) GetState() State {
// AgentCallEvent represents an agent call.
type AgentCallEvent struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
+ Contents []*Content `protobuf:"bytes,4,rep,name=contents,proto3" json:"contents,omitempty"`
+ AwaitingMore bool `protobuf:"varint,5,opt,name=awaiting_more,json=awaitingMore,proto3" json:"awaiting_more,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
- Contents []*Content `protobuf:"bytes,4,rep,name=contents,proto3" json:"contents,omitempty"`
- AwaitingMore bool `protobuf:"varint,5,opt,name=awaiting_more,json=awaitingMore,proto3" json:"awaiting_more,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *AgentCallEvent) Reset() {
@@ -448,13 +445,12 @@ func (x *AgentCallEvent) GetAwaitingMore() bool {
// Controller records the agent handoff with
// associated content.
type HandoffEvent struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SourceAgentId string `protobuf:"bytes,3,opt,name=source_agent_id,json=sourceAgentId,proto3" json:"source_agent_id,omitempty"`
+ TargetAgentId string `protobuf:"bytes,4,opt,name=target_agent_id,json=targetAgentId,proto3" json:"target_agent_id,omitempty"`
+ Contents []*Content `protobuf:"bytes,5,rep,name=contents,proto3" json:"contents,omitempty"`
unknownFields protoimpl.UnknownFields
-
- SourceAgentId string `protobuf:"bytes,3,opt,name=source_agent_id,json=sourceAgentId,proto3" json:"source_agent_id,omitempty"`
- TargetAgentId string `protobuf:"bytes,4,opt,name=target_agent_id,json=targetAgentId,proto3" json:"target_agent_id,omitempty"`
- Contents []*Content `protobuf:"bytes,5,rep,name=contents,proto3" json:"contents,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *HandoffEvent) Reset() {
@@ -511,11 +507,10 @@ func (x *HandoffEvent) GetContents() []*Content {
// Content changes such as user inputs are recorded
// as content events.
type ContentEvent struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Contents []*Content `protobuf:"bytes,1,rep,name=contents,proto3" json:"contents,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Contents []*Content `protobuf:"bytes,1,rep,name=contents,proto3" json:"contents,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ContentEvent) Reset() {
@@ -559,23 +554,22 @@ func (x *ContentEvent) GetContents() []*Content {
// to record the actions taken place in the GAR controller.
// GAR controller can replay the events for resumability.
type Event struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
CheckpointId string `protobuf:"bytes,2,opt,name=checkpoint_id,json=checkpointId,proto3" json:"checkpoint_id,omitempty"`
SenderName string `protobuf:"bytes,3,opt,name=sender_name,json=senderName,proto3" json:"sender_name,omitempty"`
SenderId string `protobuf:"bytes,4,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"`
Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
ControllerTimestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=controller_timestamp,json=controllerTimestamp,proto3" json:"controller_timestamp,omitempty"`
- // Types that are assignable to Kind:
+ // Types that are valid to be assigned to Kind:
//
// *Event_SessionStateEvent
// *Event_AgentCallEvent
// *Event_HandoffEvent
// *Event_ContentEvent
- Kind isEvent_Kind `protobuf_oneof:"kind"`
+ Kind isEvent_Kind `protobuf_oneof:"kind"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Event) Reset() {
@@ -650,37 +644,45 @@ func (x *Event) GetControllerTimestamp() *timestamppb.Timestamp {
return nil
}
-func (m *Event) GetKind() isEvent_Kind {
- if m != nil {
- return m.Kind
+func (x *Event) GetKind() isEvent_Kind {
+ if x != nil {
+ return x.Kind
}
return nil
}
func (x *Event) GetSessionStateEvent() *SessionStateEvent {
- if x, ok := x.GetKind().(*Event_SessionStateEvent); ok {
- return x.SessionStateEvent
+ if x != nil {
+ if x, ok := x.Kind.(*Event_SessionStateEvent); ok {
+ return x.SessionStateEvent
+ }
}
return nil
}
func (x *Event) GetAgentCallEvent() *AgentCallEvent {
- if x, ok := x.GetKind().(*Event_AgentCallEvent); ok {
- return x.AgentCallEvent
+ if x != nil {
+ if x, ok := x.Kind.(*Event_AgentCallEvent); ok {
+ return x.AgentCallEvent
+ }
}
return nil
}
func (x *Event) GetHandoffEvent() *HandoffEvent {
- if x, ok := x.GetKind().(*Event_HandoffEvent); ok {
- return x.HandoffEvent
+ if x != nil {
+ if x, ok := x.Kind.(*Event_HandoffEvent); ok {
+ return x.HandoffEvent
+ }
}
return nil
}
func (x *Event) GetContentEvent() *ContentEvent {
- if x, ok := x.GetKind().(*Event_ContentEvent); ok {
- return x.ContentEvent
+ if x != nil {
+ if x, ok := x.Kind.(*Event_ContentEvent); ok {
+ return x.ContentEvent
+ }
}
return nil
}
@@ -715,9 +717,9 @@ func (*Event_ContentEvent) isEvent_Kind() {}
// HealthCheckRequest for agent health checks
type HealthCheckRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *HealthCheckRequest) Reset() {
@@ -752,12 +754,11 @@ func (*HealthCheckRequest) Descriptor() ([]byte, []int) {
// HealthCheckResponse contains agent health status
type HealthCheckResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Healthy bool `protobuf:"varint,1,opt,name=healthy,proto3" json:"healthy,omitempty"`
+ Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Healthy bool `protobuf:"varint,1,opt,name=healthy,proto3" json:"healthy,omitempty"`
- Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *HealthCheckResponse) Reset() {
@@ -806,13 +807,12 @@ func (x *HealthCheckResponse) GetMessage() string {
// TriggerSessionRequest for triggering a new session
type TriggerSessionRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // Unique session identifier
+ CheckpointId string `protobuf:"bytes,2,opt,name=checkpoint_id,json=checkpointId,proto3" json:"checkpoint_id,omitempty"` // Optional: Resume from specific checkpoint UUID (empty for latest)
+ Inputs []*Content `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"` // Input content to process
unknownFields protoimpl.UnknownFields
-
- SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // Unique session identifier
- CheckpointId string `protobuf:"bytes,2,opt,name=checkpoint_id,json=checkpointId,proto3" json:"checkpoint_id,omitempty"` // Optional: Resume from specific checkpoint UUID (empty for latest)
- Inputs []*Content `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"` // Input content to process
+ sizeCache protoimpl.SizeCache
}
func (x *TriggerSessionRequest) Reset() {
@@ -868,14 +868,13 @@ func (x *TriggerSessionRequest) GetInputs() []*Content {
// TriggerSessionResponse contains the result of triggering a session
type TriggerSessionResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // Session ID (in case it was generated or modified by server)
+ CheckpointId string `protobuf:"bytes,2,opt,name=checkpoint_id,json=checkpointId,proto3" json:"checkpoint_id,omitempty"` // Current checkpoint ID
+ Outputs []*Content `protobuf:"bytes,3,rep,name=outputs,proto3" json:"outputs,omitempty"` // Output content
+ State State `protobuf:"varint,4,opt,name=state,proto3,enum=proto.State" json:"state,omitempty"` // Session state
unknownFields protoimpl.UnknownFields
-
- SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // Session ID (in case it was generated or modified by server)
- CheckpointId string `protobuf:"bytes,2,opt,name=checkpoint_id,json=checkpointId,proto3" json:"checkpoint_id,omitempty"` // Current checkpoint ID
- Outputs []*Content `protobuf:"bytes,3,rep,name=outputs,proto3" json:"outputs,omitempty"` // Output content
- State State `protobuf:"varint,4,opt,name=state,proto3,enum=proto.State" json:"state,omitempty"` // Session state
+ sizeCache protoimpl.SizeCache
}
func (x *TriggerSessionResponse) Reset() {
@@ -936,22 +935,292 @@ func (x *TriggerSessionResponse) GetState() State {
return State_STATE_UNSPECIFIED
}
-// RegisterAgentRequest for registering an agent
-type RegisterAgentRequest struct {
- state protoimpl.MessageState
+// GetSessionRequest for retrieving session details.
+type GetSessionRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetSessionRequest) Reset() {
+ *x = GetSessionRequest{}
+ mi := &file_proto_gar_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetSessionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetSessionRequest) ProtoMessage() {}
+
+func (x *GetSessionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_proto_gar_proto_msgTypes[13]
+ 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 GetSessionRequest.ProtoReflect.Descriptor instead.
+func (*GetSessionRequest) Descriptor() ([]byte, []int) {
+ return file_proto_gar_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *GetSessionRequest) GetSessionId() string {
+ if x != nil {
+ return x.SessionId
+ }
+ return ""
+}
+
+// SessionInfo contains session details.
+type SessionInfo struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ State State `protobuf:"varint,1,opt,name=state,proto3,enum=proto.State" json:"state,omitempty"`
+ ActiveAgents []string `protobuf:"bytes,2,rep,name=active_agents,json=activeAgents,proto3" json:"active_agents,omitempty"`
+ CheckpointIds []string `protobuf:"bytes,3,rep,name=checkpoint_ids,json=checkpointIds,proto3" json:"checkpoint_ids,omitempty"`
+ CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Session creation time
+ UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // Last update time
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SessionInfo) Reset() {
+ *x = SessionInfo{}
+ mi := &file_proto_gar_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SessionInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SessionInfo) ProtoMessage() {}
+
+func (x *SessionInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_proto_gar_proto_msgTypes[14]
+ 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 SessionInfo.ProtoReflect.Descriptor instead.
+func (*SessionInfo) Descriptor() ([]byte, []int) {
+ return file_proto_gar_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *SessionInfo) GetState() State {
+ if x != nil {
+ return x.State
+ }
+ return State_STATE_UNSPECIFIED
+}
+
+func (x *SessionInfo) GetActiveAgents() []string {
+ if x != nil {
+ return x.ActiveAgents
+ }
+ return nil
+}
+
+func (x *SessionInfo) GetCheckpointIds() []string {
+ if x != nil {
+ return x.CheckpointIds
+ }
+ return nil
+}
+
+func (x *SessionInfo) GetCreatedAt() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreatedAt
+ }
+ return nil
+}
+
+func (x *SessionInfo) GetUpdatedAt() *timestamppb.Timestamp {
+ if x != nil {
+ return x.UpdatedAt
+ }
+ return nil
+}
+
+// GetSessionResponse contains session information.
+type GetSessionResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Session *SessionInfo `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
+ unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
+}
+
+func (x *GetSessionResponse) Reset() {
+ *x = GetSessionResponse{}
+ mi := &file_proto_gar_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetSessionResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetSessionResponse) ProtoMessage() {}
+
+func (x *GetSessionResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_proto_gar_proto_msgTypes[15]
+ 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 GetSessionResponse.ProtoReflect.Descriptor instead.
+func (*GetSessionResponse) Descriptor() ([]byte, []int) {
+ return file_proto_gar_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *GetSessionResponse) GetSession() *SessionInfo {
+ if x != nil {
+ return x.Session
+ }
+ return nil
+}
+
+type ForkSessionRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SourceSessionId string `protobuf:"bytes,1,opt,name=source_session_id,json=sourceSessionId,proto3" json:"source_session_id,omitempty"`
+ SourceCheckpointId string `protobuf:"bytes,2,opt,name=source_checkpoint_id,json=sourceCheckpointId,proto3" json:"source_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.
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ForkSessionRequest) Reset() {
+ *x = ForkSessionRequest{}
+ mi := &file_proto_gar_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ForkSessionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ForkSessionRequest) ProtoMessage() {}
+
+func (x *ForkSessionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_proto_gar_proto_msgTypes[16]
+ 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 ForkSessionRequest.ProtoReflect.Descriptor instead.
+func (*ForkSessionRequest) Descriptor() ([]byte, []int) {
+ return file_proto_gar_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *ForkSessionRequest) GetSourceSessionId() string {
+ if x != nil {
+ return x.SourceSessionId
+ }
+ return ""
+}
+
+func (x *ForkSessionRequest) GetSourceCheckpointId() string {
+ if x != nil {
+ return x.SourceCheckpointId
+ }
+ return ""
+}
+
+func (x *ForkSessionRequest) GetDestSessionId() string {
+ if x != nil {
+ return x.DestSessionId
+ }
+ return ""
+}
+
+type ForkSessionResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ 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)
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ForkSessionResponse) Reset() {
+ *x = ForkSessionResponse{}
+ mi := &file_proto_gar_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ForkSessionResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ForkSessionResponse) ProtoMessage() {}
- AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
- Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Human-readable name for the agent
- Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // Description of agent capabilities
- Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` // gRPC address for remote agents
- Metadata map[string]string `protobuf:"bytes,5,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+func (x *ForkSessionResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_proto_gar_proto_msgTypes[17]
+ 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 ForkSessionResponse.ProtoReflect.Descriptor instead.
+func (*ForkSessionResponse) Descriptor() ([]byte, []int) {
+ return file_proto_gar_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *ForkSessionResponse) GetNewSessionId() string {
+ if x != nil {
+ return x.NewSessionId
+ }
+ return ""
+}
+
+// RegisterAgentRequest for registering an agent
+type RegisterAgentRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Human-readable name for the agent
+ Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // Description of agent capabilities
+ Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` // gRPC address for remote agents
+ Metadata map[string]string `protobuf:"bytes,5,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *RegisterAgentRequest) Reset() {
*x = RegisterAgentRequest{}
- mi := &file_proto_gar_proto_msgTypes[13]
+ mi := &file_proto_gar_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -963,7 +1232,7 @@ func (x *RegisterAgentRequest) String() string {
func (*RegisterAgentRequest) ProtoMessage() {}
func (x *RegisterAgentRequest) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[13]
+ mi := &file_proto_gar_proto_msgTypes[18]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -976,7 +1245,7 @@ func (x *RegisterAgentRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use RegisterAgentRequest.ProtoReflect.Descriptor instead.
func (*RegisterAgentRequest) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{13}
+ return file_proto_gar_proto_rawDescGZIP(), []int{18}
}
func (x *RegisterAgentRequest) GetAgentId() string {
@@ -1016,14 +1285,14 @@ func (x *RegisterAgentRequest) GetMetadata() map[string]string {
// RegisterAgentResponse contains registration result
type RegisterAgentResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *RegisterAgentResponse) Reset() {
*x = RegisterAgentResponse{}
- mi := &file_proto_gar_proto_msgTypes[14]
+ mi := &file_proto_gar_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1035,7 +1304,7 @@ func (x *RegisterAgentResponse) String() string {
func (*RegisterAgentResponse) ProtoMessage() {}
func (x *RegisterAgentResponse) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[14]
+ mi := &file_proto_gar_proto_msgTypes[19]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1048,21 +1317,20 @@ func (x *RegisterAgentResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use RegisterAgentResponse.ProtoReflect.Descriptor instead.
func (*RegisterAgentResponse) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{14}
+ return file_proto_gar_proto_rawDescGZIP(), []int{19}
}
// UnregisterAgentRequest for unregistering an agent
type UnregisterAgentRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
unknownFields protoimpl.UnknownFields
-
- AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *UnregisterAgentRequest) Reset() {
*x = UnregisterAgentRequest{}
- mi := &file_proto_gar_proto_msgTypes[15]
+ mi := &file_proto_gar_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1074,7 +1342,7 @@ func (x *UnregisterAgentRequest) String() string {
func (*UnregisterAgentRequest) ProtoMessage() {}
func (x *UnregisterAgentRequest) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[15]
+ mi := &file_proto_gar_proto_msgTypes[20]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1087,7 +1355,7 @@ func (x *UnregisterAgentRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use UnregisterAgentRequest.ProtoReflect.Descriptor instead.
func (*UnregisterAgentRequest) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{15}
+ return file_proto_gar_proto_rawDescGZIP(), []int{20}
}
func (x *UnregisterAgentRequest) GetAgentId() string {
@@ -1099,14 +1367,14 @@ func (x *UnregisterAgentRequest) GetAgentId() string {
// UnregisterAgentResponse contains unregistration result
type UnregisterAgentResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *UnregisterAgentResponse) Reset() {
*x = UnregisterAgentResponse{}
- mi := &file_proto_gar_proto_msgTypes[16]
+ mi := &file_proto_gar_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1118,7 +1386,7 @@ func (x *UnregisterAgentResponse) String() string {
func (*UnregisterAgentResponse) ProtoMessage() {}
func (x *UnregisterAgentResponse) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[16]
+ mi := &file_proto_gar_proto_msgTypes[21]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1131,198 +1399,134 @@ func (x *UnregisterAgentResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use UnregisterAgentResponse.ProtoReflect.Descriptor instead.
func (*UnregisterAgentResponse) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{16}
+ return file_proto_gar_proto_rawDescGZIP(), []int{21}
}
var File_proto_gar_proto protoreflect.FileDescriptor
-var file_proto_gar_proto_rawDesc = []byte{
- 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x61, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
- 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x61, 0x0a, 0x0e, 0x50, 0x72, 0x6f,
- 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63,
- 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x64,
- 0x12, 0x2a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 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, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x87, 0x01, 0x0a,
- 0x0f, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x69,
- 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f,
- 0x69, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 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, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
- 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6f,
- 0x66, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x48,
- 0x61, 0x6e, 0x64, 0x6f, 0x66, 0x66, 0x22, 0x33, 0x0a, 0x0b, 0x54, 0x65, 0x78, 0x74, 0x43, 0x6f,
- 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a,
- 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x65, 0x0a, 0x07, 0x43,
- 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x0a,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x65, 0x78,
- 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74,
- 0x12, 0x13, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
- 0x4a, 0x04, 0x08, 0x01, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0b,
- 0x10, 0x1a, 0x22, 0x37, 0x0a, 0x11, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61,
- 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65,
- 0x18, 0x01, 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, 0x85, 0x01, 0x0a, 0x0e,
- 0x41, 0x67, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x16,
- 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
- 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
- 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
- 0x74, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x77, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d,
- 0x6f, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x77, 0x61, 0x69, 0x74,
- 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x72, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08,
- 0x02, 0x10, 0x03, 0x22, 0x96, 0x01, 0x0a, 0x0c, 0x48, 0x61, 0x6e, 0x64, 0x6f, 0x66, 0x66, 0x45,
- 0x76, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61,
- 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f,
- 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x67, 0x65,
- 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73,
- 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43,
- 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73,
- 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x3a, 0x0a, 0x0c,
- 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x08,
- 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 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, 0x08,
- 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xa1, 0x04, 0x0a, 0x05, 0x45, 0x76, 0x65,
- 0x6e, 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, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f,
- 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70,
- 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72,
- 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x6e,
- 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x65,
- 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64,
- 0x65, 0x72, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
- 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
- 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x4d,
- 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d,
- 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
- 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
- 0x6c, 0x6c, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x4a, 0x0a,
- 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x65,
- 0x76, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45,
- 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x11, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53,
- 0x74, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x10, 0x61, 0x67, 0x65,
- 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x67, 0x65, 0x6e,
- 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x67,
- 0x65, 0x6e, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x0d,
- 0x68, 0x61, 0x6e, 0x64, 0x6f, 0x66, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x61, 0x6e, 0x64,
- 0x6f, 0x66, 0x66, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x68, 0x61, 0x6e, 0x64,
- 0x6f, 0x66, 0x66, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74,
- 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x45,
- 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x45,
- 0x76, 0x65, 0x6e, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x14, 0x0a, 0x12,
- 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x22, 0x49, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63,
- 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 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, 0x83, 0x01,
- 0x0a, 0x15, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
- 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, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70,
- 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63,
- 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 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, 0xaa, 0x01, 0x0a, 0x16, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53,
- 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 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, 0x23, 0x0a,
- 0x0d, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74,
- 0x49, 0x64, 0x12, 0x28, 0x0a, 0x07, 0x6f, 0x75, 0x74, 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, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x22, 0x0a, 0x05,
- 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 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, 0x85, 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, 0x18, 0x0a, 0x07, 0x61, 0x64,
- 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64,
- 0x72, 0x65, 0x73, 0x73, 0x12, 0x45, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
- 0x18, 0x05, 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, 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, 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, 0x52, 0x55, 0x4e, 0x4e, 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, 0xfb, 0x01, 0x0a, 0x0a, 0x47, 0x41, 0x52, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
- 0x4f, 0x0a, 0x0e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,
- 0x6e, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65,
- 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53,
- 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01,
- 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, 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,
-}
+const file_proto_gar_proto_rawDesc = "" +
+ "\n" +
+ "\x0fproto/gar.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\"a\n" +
+ "\x0eProcessRequest\x12#\n" +
+ "\rcheckpoint_id\x18\x01 \x01(\tR\fcheckpointId\x12*\n" +
+ "\bcontents\x18\x02 \x03(\v2\x0e.proto.ContentR\bcontents\"\x87\x01\n" +
+ "\x0fProcessResponse\x12#\n" +
+ "\rcheckpoint_id\x18\x01 \x01(\tR\fcheckpointId\x12*\n" +
+ "\bcontents\x18\x02 \x03(\v2\x0e.proto.ContentR\bcontents\x12#\n" +
+ "\ragent_handoff\x18\x03 \x01(\tR\fagentHandoff\"3\n" +
+ "\vTextContent\x12\x12\n" +
+ "\x04text\x18\x03 \x01(\tR\x04textJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03R\x04type\"e\n" +
+ "\aContent\x12(\n" +
+ "\x04text\x18\n" +
+ " \x01(\v2\x12.proto.TextContentH\x00R\x04text\x12\x13\n" +
+ "\x04role\x18\xe8\a \x01(\tR\x04roleB\t\n" +
+ "\acontentJ\x04\b\x01\x10\x05J\x04\b\x06\x10\n" +
+ "J\x04\b\v\x10\x1a\"7\n" +
+ "\x11SessionStateEvent\x12\"\n" +
+ "\x05state\x18\x01 \x01(\x0e2\f.proto.StateR\x05state\"\x85\x01\n" +
+ "\x0eAgentCallEvent\x12\x16\n" +
+ "\x06sender\x18\x03 \x01(\tR\x06sender\x12*\n" +
+ "\bcontents\x18\x04 \x03(\v2\x0e.proto.ContentR\bcontents\x12#\n" +
+ "\rawaiting_more\x18\x05 \x01(\bR\fawaitingMoreJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03\"\x96\x01\n" +
+ "\fHandoffEvent\x12&\n" +
+ "\x0fsource_agent_id\x18\x03 \x01(\tR\rsourceAgentId\x12&\n" +
+ "\x0ftarget_agent_id\x18\x04 \x01(\tR\rtargetAgentId\x12*\n" +
+ "\bcontents\x18\x05 \x03(\v2\x0e.proto.ContentR\bcontentsJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03\":\n" +
+ "\fContentEvent\x12*\n" +
+ "\bcontents\x18\x01 \x03(\v2\x0e.proto.ContentR\bcontents\"\xa1\x04\n" +
+ "\x05Event\x12\x1d\n" +
+ "\n" +
+ "session_id\x18\x01 \x01(\tR\tsessionId\x12#\n" +
+ "\rcheckpoint_id\x18\x02 \x01(\tR\fcheckpointId\x12\x1f\n" +
+ "\vsender_name\x18\x03 \x01(\tR\n" +
+ "senderName\x12\x1b\n" +
+ "\tsender_id\x18\x04 \x01(\tR\bsenderId\x128\n" +
+ "\ttimestamp\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\ttimestamp\x12M\n" +
+ "\x14controller_timestamp\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\x13controllerTimestamp\x12J\n" +
+ "\x13session_state_event\x18\a \x01(\v2\x18.proto.SessionStateEventH\x00R\x11sessionStateEvent\x12A\n" +
+ "\x10agent_call_event\x18\b \x01(\v2\x15.proto.AgentCallEventH\x00R\x0eagentCallEvent\x12:\n" +
+ "\rhandoff_event\x18\t \x01(\v2\x13.proto.HandoffEventH\x00R\fhandoffEvent\x12:\n" +
+ "\rcontent_event\x18\n" +
+ " \x01(\v2\x13.proto.ContentEventH\x00R\fcontentEventB\x06\n" +
+ "\x04kind\"\x14\n" +
+ "\x12HealthCheckRequest\"I\n" +
+ "\x13HealthCheckResponse\x12\x18\n" +
+ "\ahealthy\x18\x01 \x01(\bR\ahealthy\x12\x18\n" +
+ "\amessage\x18\x02 \x01(\tR\amessage\"\x83\x01\n" +
+ "\x15TriggerSessionRequest\x12\x1d\n" +
+ "\n" +
+ "session_id\x18\x01 \x01(\tR\tsessionId\x12#\n" +
+ "\rcheckpoint_id\x18\x02 \x01(\tR\fcheckpointId\x12&\n" +
+ "\x06inputs\x18\x03 \x03(\v2\x0e.proto.ContentR\x06inputs\"\xaa\x01\n" +
+ "\x16TriggerSessionResponse\x12\x1d\n" +
+ "\n" +
+ "session_id\x18\x01 \x01(\tR\tsessionId\x12#\n" +
+ "\rcheckpoint_id\x18\x02 \x01(\tR\fcheckpointId\x12(\n" +
+ "\aoutputs\x18\x03 \x03(\v2\x0e.proto.ContentR\aoutputs\x12\"\n" +
+ "\x05state\x18\x04 \x01(\x0e2\f.proto.StateR\x05state\"2\n" +
+ "\x11GetSessionRequest\x12\x1d\n" +
+ "\n" +
+ "session_id\x18\x01 \x01(\tR\tsessionId\"\xf3\x01\n" +
+ "\vSessionInfo\x12\"\n" +
+ "\x05state\x18\x01 \x01(\x0e2\f.proto.StateR\x05state\x12#\n" +
+ "\ractive_agents\x18\x02 \x03(\tR\factiveAgents\x12%\n" +
+ "\x0echeckpoint_ids\x18\x03 \x03(\tR\rcheckpointIds\x129\n" +
+ "\n" +
+ "created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" +
+ "\n" +
+ "updated_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"B\n" +
+ "\x12GetSessionResponse\x12,\n" +
+ "\asession\x18\x01 \x01(\v2\x12.proto.SessionInfoR\asession\"\x9a\x01\n" +
+ "\x12ForkSessionRequest\x12*\n" +
+ "\x11source_session_id\x18\x01 \x01(\tR\x0fsourceSessionId\x120\n" +
+ "\x14source_checkpoint_id\x18\x02 \x01(\tR\x12sourceCheckpointId\x12&\n" +
+ "\x0fdest_session_id\x18\x03 \x01(\tR\rdestSessionId\";\n" +
+ "\x13ForkSessionResponse\x12$\n" +
+ "\x0enew_session_id\x18\x01 \x01(\tR\fnewSessionId\"\x85\x02\n" +
+ "\x14RegisterAgentRequest\x12\x19\n" +
+ "\bagent_id\x18\x01 \x01(\tR\aagentId\x12\x12\n" +
+ "\x04name\x18\x02 \x01(\tR\x04name\x12 \n" +
+ "\vdescription\x18\x03 \x01(\tR\vdescription\x12\x18\n" +
+ "\aaddress\x18\x04 \x01(\tR\aaddress\x12E\n" +
+ "\bmetadata\x18\x05 \x03(\v2).proto.RegisterAgentRequest.MetadataEntryR\bmetadata\x1a;\n" +
+ "\rMetadataEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
+ "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x17\n" +
+ "\x15RegisterAgentResponse\"3\n" +
+ "\x16UnregisterAgentRequest\x12\x19\n" +
+ "\bagent_id\x18\x01 \x01(\tR\aagentId\"\x19\n" +
+ "\x17UnregisterAgentResponse*X\n" +
+ "\x05State\x12\x15\n" +
+ "\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n" +
+ "\rSTATE_RUNNING\x10\x01\x12\x10\n" +
+ "\fSTATE_FAILED\x10\x02\x12\x13\n" +
+ "\x0fSTATE_COMPLETED\x10\x032\x92\x01\n" +
+ "\fAgentService\x12<\n" +
+ "\aProcess\x12\x15.proto.ProcessRequest\x1a\x16.proto.ProcessResponse(\x010\x01\x12D\n" +
+ "\vHealthCheck\x12\x19.proto.HealthCheckRequest\x1a\x1a.proto.HealthCheckResponse2\x84\x03\n" +
+ "\n" +
+ "GARService\x12O\n" +
+ "\x0eTriggerSession\x12\x1c.proto.TriggerSessionRequest\x1a\x1d.proto.TriggerSessionResponse0\x01\x12A\n" +
+ "\n" +
+ "GetSession\x12\x18.proto.GetSessionRequest\x1a\x19.proto.GetSessionResponse\x12D\n" +
+ "\vForkSession\x12\x19.proto.ForkSessionRequest\x1a\x1a.proto.ForkSessionResponse\x12J\n" +
+ "\rRegisterAgent\x12\x1b.proto.RegisterAgentRequest\x1a\x1c.proto.RegisterAgentResponse\x12P\n" +
+ "\x0fUnregisterAgent\x12\x1d.proto.UnregisterAgentRequest\x1a\x1e.proto.UnregisterAgentResponseB\x1dZ\x1bgithub.com/google/gar/protob\x06proto3"
var (
file_proto_gar_proto_rawDescOnce sync.Once
- file_proto_gar_proto_rawDescData = file_proto_gar_proto_rawDesc
+ file_proto_gar_proto_rawDescData []byte
)
func file_proto_gar_proto_rawDescGZIP() []byte {
file_proto_gar_proto_rawDescOnce.Do(func() {
- file_proto_gar_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_gar_proto_rawDescData)
+ file_proto_gar_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_gar_proto_rawDesc), len(file_proto_gar_proto_rawDesc)))
})
return file_proto_gar_proto_rawDescData
}
var file_proto_gar_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_proto_gar_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
+var file_proto_gar_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
var file_proto_gar_proto_goTypes = []any{
(State)(0), // 0: proto.State
(*ProcessRequest)(nil), // 1: proto.ProcessRequest
@@ -1338,12 +1542,17 @@ var file_proto_gar_proto_goTypes = []any{
(*HealthCheckResponse)(nil), // 11: proto.HealthCheckResponse
(*TriggerSessionRequest)(nil), // 12: proto.TriggerSessionRequest
(*TriggerSessionResponse)(nil), // 13: proto.TriggerSessionResponse
- (*RegisterAgentRequest)(nil), // 14: proto.RegisterAgentRequest
- (*RegisterAgentResponse)(nil), // 15: proto.RegisterAgentResponse
- (*UnregisterAgentRequest)(nil), // 16: proto.UnregisterAgentRequest
- (*UnregisterAgentResponse)(nil), // 17: proto.UnregisterAgentResponse
- nil, // 18: proto.RegisterAgentRequest.MetadataEntry
- (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp
+ (*GetSessionRequest)(nil), // 14: proto.GetSessionRequest
+ (*SessionInfo)(nil), // 15: proto.SessionInfo
+ (*GetSessionResponse)(nil), // 16: proto.GetSessionResponse
+ (*ForkSessionRequest)(nil), // 17: proto.ForkSessionRequest
+ (*ForkSessionResponse)(nil), // 18: proto.ForkSessionResponse
+ (*RegisterAgentRequest)(nil), // 19: proto.RegisterAgentRequest
+ (*RegisterAgentResponse)(nil), // 20: proto.RegisterAgentResponse
+ (*UnregisterAgentRequest)(nil), // 21: proto.UnregisterAgentRequest
+ (*UnregisterAgentResponse)(nil), // 22: proto.UnregisterAgentResponse
+ nil, // 23: proto.RegisterAgentRequest.MetadataEntry
+ (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp
}
var file_proto_gar_proto_depIdxs = []int32{
4, // 0: proto.ProcessRequest.contents:type_name -> proto.Content
@@ -1353,8 +1562,8 @@ var file_proto_gar_proto_depIdxs = []int32{
4, // 4: proto.AgentCallEvent.contents:type_name -> proto.Content
4, // 5: proto.HandoffEvent.contents:type_name -> proto.Content
4, // 6: proto.ContentEvent.contents:type_name -> proto.Content
- 19, // 7: proto.Event.timestamp:type_name -> google.protobuf.Timestamp
- 19, // 8: proto.Event.controller_timestamp:type_name -> google.protobuf.Timestamp
+ 24, // 7: proto.Event.timestamp:type_name -> google.protobuf.Timestamp
+ 24, // 8: proto.Event.controller_timestamp:type_name -> google.protobuf.Timestamp
5, // 9: proto.Event.session_state_event:type_name -> proto.SessionStateEvent
6, // 10: proto.Event.agent_call_event:type_name -> proto.AgentCallEvent
7, // 11: proto.Event.handoff_event:type_name -> proto.HandoffEvent
@@ -1362,22 +1571,30 @@ var file_proto_gar_proto_depIdxs = []int32{
4, // 13: proto.TriggerSessionRequest.inputs:type_name -> proto.Content
4, // 14: proto.TriggerSessionResponse.outputs:type_name -> proto.Content
0, // 15: proto.TriggerSessionResponse.state:type_name -> proto.State
- 18, // 16: proto.RegisterAgentRequest.metadata:type_name -> proto.RegisterAgentRequest.MetadataEntry
- 1, // 17: proto.AgentService.Process:input_type -> proto.ProcessRequest
- 10, // 18: proto.AgentService.HealthCheck:input_type -> proto.HealthCheckRequest
- 12, // 19: proto.GARService.TriggerSession:input_type -> proto.TriggerSessionRequest
- 14, // 20: proto.GARService.RegisterAgent:input_type -> proto.RegisterAgentRequest
- 16, // 21: proto.GARService.UnregisterAgent:input_type -> proto.UnregisterAgentRequest
- 2, // 22: proto.AgentService.Process:output_type -> proto.ProcessResponse
- 11, // 23: proto.AgentService.HealthCheck:output_type -> proto.HealthCheckResponse
- 13, // 24: proto.GARService.TriggerSession:output_type -> proto.TriggerSessionResponse
- 15, // 25: proto.GARService.RegisterAgent:output_type -> proto.RegisterAgentResponse
- 17, // 26: proto.GARService.UnregisterAgent:output_type -> proto.UnregisterAgentResponse
- 22, // [22:27] is the sub-list for method output_type
- 17, // [17:22] is the sub-list for method input_type
- 17, // [17:17] is the sub-list for extension type_name
- 17, // [17:17] is the sub-list for extension extendee
- 0, // [0:17] is the sub-list for field type_name
+ 0, // 16: proto.SessionInfo.state:type_name -> proto.State
+ 24, // 17: proto.SessionInfo.created_at:type_name -> google.protobuf.Timestamp
+ 24, // 18: proto.SessionInfo.updated_at:type_name -> google.protobuf.Timestamp
+ 15, // 19: proto.GetSessionResponse.session:type_name -> proto.SessionInfo
+ 23, // 20: proto.RegisterAgentRequest.metadata:type_name -> proto.RegisterAgentRequest.MetadataEntry
+ 1, // 21: proto.AgentService.Process:input_type -> proto.ProcessRequest
+ 10, // 22: proto.AgentService.HealthCheck:input_type -> proto.HealthCheckRequest
+ 12, // 23: proto.GARService.TriggerSession:input_type -> proto.TriggerSessionRequest
+ 14, // 24: proto.GARService.GetSession:input_type -> proto.GetSessionRequest
+ 17, // 25: proto.GARService.ForkSession:input_type -> proto.ForkSessionRequest
+ 19, // 26: proto.GARService.RegisterAgent:input_type -> proto.RegisterAgentRequest
+ 21, // 27: proto.GARService.UnregisterAgent:input_type -> proto.UnregisterAgentRequest
+ 2, // 28: proto.AgentService.Process:output_type -> proto.ProcessResponse
+ 11, // 29: proto.AgentService.HealthCheck:output_type -> proto.HealthCheckResponse
+ 13, // 30: proto.GARService.TriggerSession:output_type -> proto.TriggerSessionResponse
+ 16, // 31: proto.GARService.GetSession:output_type -> proto.GetSessionResponse
+ 18, // 32: proto.GARService.ForkSession:output_type -> proto.ForkSessionResponse
+ 20, // 33: proto.GARService.RegisterAgent:output_type -> proto.RegisterAgentResponse
+ 22, // 34: proto.GARService.UnregisterAgent:output_type -> proto.UnregisterAgentResponse
+ 28, // [28:35] is the sub-list for method output_type
+ 21, // [21:28] is the sub-list for method input_type
+ 21, // [21:21] is the sub-list for extension type_name
+ 21, // [21:21] is the sub-list for extension extendee
+ 0, // [0:21] is the sub-list for field type_name
}
func init() { file_proto_gar_proto_init() }
@@ -1398,9 +1615,9 @@ func file_proto_gar_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_proto_gar_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_gar_proto_rawDesc), len(file_proto_gar_proto_rawDesc)),
NumEnums: 1,
- NumMessages: 18,
+ NumMessages: 23,
NumExtensions: 0,
NumServices: 2,
},
@@ -1410,7 +1627,6 @@ func file_proto_gar_proto_init() {
MessageInfos: file_proto_gar_proto_msgTypes,
}.Build()
File_proto_gar_proto = out.File
- file_proto_gar_proto_rawDesc = nil
file_proto_gar_proto_goTypes = nil
file_proto_gar_proto_depIdxs = nil
}
diff --git a/proto/gar.proto b/proto/gar.proto
index 6b9be0a..ea276af 100644
--- a/proto/gar.proto
+++ b/proto/gar.proto
@@ -165,6 +165,35 @@ message TriggerSessionResponse {
State state = 4; // Session state
}
+// GetSessionRequest for retrieving session details.
+message GetSessionRequest {
+ string session_id = 1;
+}
+
+// SessionInfo contains session details.
+message SessionInfo {
+ State state = 1;
+ repeated string active_agents = 2;
+ repeated string checkpoint_ids = 3;
+ google.protobuf.Timestamp created_at = 4; // Session creation time
+ google.protobuf.Timestamp updated_at = 5; // Last update time
+}
+
+// GetSessionResponse contains session information.
+message GetSessionResponse {
+ SessionInfo session = 1;
+}
+
+message ForkSessionRequest {
+ string source_session_id = 1;
+ string source_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 ForkSessionResponse {
+ string new_session_id = 1; // New session ID (in case it was generated or modified by server)
+}
+
// RegisterAgentRequest for registering an agent
message RegisterAgentRequest {
string agent_id = 1;
@@ -193,6 +222,12 @@ service GARService {
// If the session_id already exists, it will be resumed from the last checkpoint
rpc TriggerSession(TriggerSessionRequest) returns (stream TriggerSessionResponse);
+ // GetSession retrieves session details
+ rpc GetSession(GetSessionRequest) returns (GetSessionResponse);
+
+ // ForkSession forks a session from a specific checkpoint.
+ rpc ForkSession(ForkSessionRequest) returns (ForkSessionResponse);
+
// RegisterAgent registers a new agent with the controller
rpc RegisterAgent(RegisterAgentRequest) returns (RegisterAgentResponse);
diff --git a/proto/gar_grpc.pb.go b/proto/gar_grpc.pb.go
index 04a824d..9939863 100644
--- a/proto/gar_grpc.pb.go
+++ b/proto/gar_grpc.pb.go
@@ -14,8 +14,8 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.5.1
-// - protoc v5.28.2
+// - protoc-gen-go-grpc v1.6.1
+// - protoc v6.33.4
// source: proto/gar.proto
package proto
@@ -101,10 +101,10 @@ type AgentServiceServer interface {
type UnimplementedAgentServiceServer struct{}
func (UnimplementedAgentServiceServer) Process(grpc.BidiStreamingServer[ProcessRequest, ProcessResponse]) error {
- return status.Errorf(codes.Unimplemented, "method Process not implemented")
+ return status.Error(codes.Unimplemented, "method Process not implemented")
}
func (UnimplementedAgentServiceServer) HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method HealthCheck not implemented")
+ return nil, status.Error(codes.Unimplemented, "method HealthCheck not implemented")
}
func (UnimplementedAgentServiceServer) mustEmbedUnimplementedAgentServiceServer() {}
func (UnimplementedAgentServiceServer) testEmbeddedByValue() {}
@@ -117,7 +117,7 @@ type UnsafeAgentServiceServer interface {
}
func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer) {
- // If the following call pancis, it indicates UnimplementedAgentServiceServer was
+ // If the following call panics, it indicates UnimplementedAgentServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
@@ -177,6 +177,8 @@ var AgentService_ServiceDesc = grpc.ServiceDesc{
const (
GARService_TriggerSession_FullMethodName = "/proto.GARService/TriggerSession"
+ GARService_GetSession_FullMethodName = "/proto.GARService/GetSession"
+ GARService_ForkSession_FullMethodName = "/proto.GARService/ForkSession"
GARService_RegisterAgent_FullMethodName = "/proto.GARService/RegisterAgent"
GARService_UnregisterAgent_FullMethodName = "/proto.GARService/UnregisterAgent"
)
@@ -190,6 +192,10 @@ type GARServiceClient interface {
// TriggerSession triggers 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
TriggerSession(ctx context.Context, in *TriggerSessionRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TriggerSessionResponse], error)
+ // GetSession retrieves session details
+ GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionResponse, error)
+ // ForkSession forks a session from a specific checkpoint.
+ ForkSession(ctx context.Context, in *ForkSessionRequest, opts ...grpc.CallOption) (*ForkSessionResponse, error)
// RegisterAgent registers a new agent with the controller
RegisterAgent(ctx context.Context, in *RegisterAgentRequest, opts ...grpc.CallOption) (*RegisterAgentResponse, error)
// UnregisterAgent removes an agent from the controller
@@ -223,6 +229,26 @@ func (c *gARServiceClient) TriggerSession(ctx context.Context, in *TriggerSessio
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type GARService_TriggerSessionClient = grpc.ServerStreamingClient[TriggerSessionResponse]
+func (c *gARServiceClient) GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(GetSessionResponse)
+ err := c.cc.Invoke(ctx, GARService_GetSession_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *gARServiceClient) ForkSession(ctx context.Context, in *ForkSessionRequest, opts ...grpc.CallOption) (*ForkSessionResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ForkSessionResponse)
+ err := c.cc.Invoke(ctx, GARService_ForkSession_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
func (c *gARServiceClient) RegisterAgent(ctx context.Context, in *RegisterAgentRequest, opts ...grpc.CallOption) (*RegisterAgentResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RegisterAgentResponse)
@@ -252,6 +278,10 @@ type GARServiceServer interface {
// TriggerSession triggers 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
TriggerSession(*TriggerSessionRequest, grpc.ServerStreamingServer[TriggerSessionResponse]) error
+ // GetSession retrieves session details
+ GetSession(context.Context, *GetSessionRequest) (*GetSessionResponse, error)
+ // ForkSession forks a session from a specific checkpoint.
+ ForkSession(context.Context, *ForkSessionRequest) (*ForkSessionResponse, error)
// RegisterAgent registers a new agent with the controller
RegisterAgent(context.Context, *RegisterAgentRequest) (*RegisterAgentResponse, error)
// UnregisterAgent removes an agent from the controller
@@ -267,13 +297,19 @@ type GARServiceServer interface {
type UnimplementedGARServiceServer struct{}
func (UnimplementedGARServiceServer) TriggerSession(*TriggerSessionRequest, grpc.ServerStreamingServer[TriggerSessionResponse]) error {
- return status.Errorf(codes.Unimplemented, "method TriggerSession not implemented")
+ return status.Error(codes.Unimplemented, "method TriggerSession not implemented")
+}
+func (UnimplementedGARServiceServer) GetSession(context.Context, *GetSessionRequest) (*GetSessionResponse, error) {
+ return nil, status.Error(codes.Unimplemented, "method GetSession not implemented")
+}
+func (UnimplementedGARServiceServer) ForkSession(context.Context, *ForkSessionRequest) (*ForkSessionResponse, error) {
+ return nil, status.Error(codes.Unimplemented, "method ForkSession not implemented")
}
func (UnimplementedGARServiceServer) RegisterAgent(context.Context, *RegisterAgentRequest) (*RegisterAgentResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RegisterAgent not implemented")
+ return nil, status.Error(codes.Unimplemented, "method RegisterAgent not implemented")
}
func (UnimplementedGARServiceServer) UnregisterAgent(context.Context, *UnregisterAgentRequest) (*UnregisterAgentResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UnregisterAgent not implemented")
+ return nil, status.Error(codes.Unimplemented, "method UnregisterAgent not implemented")
}
func (UnimplementedGARServiceServer) mustEmbedUnimplementedGARServiceServer() {}
func (UnimplementedGARServiceServer) testEmbeddedByValue() {}
@@ -286,7 +322,7 @@ type UnsafeGARServiceServer interface {
}
func RegisterGARServiceServer(s grpc.ServiceRegistrar, srv GARServiceServer) {
- // If the following call pancis, it indicates UnimplementedGARServiceServer was
+ // If the following call panics, it indicates UnimplementedGARServiceServer 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.
@@ -307,6 +343,42 @@ func _GARService_TriggerSession_Handler(srv interface{}, stream grpc.ServerStrea
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type GARService_TriggerSessionServer = grpc.ServerStreamingServer[TriggerSessionResponse]
+func _GARService_GetSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetSessionRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(GARServiceServer).GetSession(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: GARService_GetSession_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(GARServiceServer).GetSession(ctx, req.(*GetSessionRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _GARService_ForkSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ForkSessionRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(GARServiceServer).ForkSession(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: GARService_ForkSession_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(GARServiceServer).ForkSession(ctx, req.(*ForkSessionRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _GARService_RegisterAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegisterAgentRequest)
if err := dec(in); err != nil {
@@ -350,6 +422,14 @@ var GARService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.GARService",
HandlerType: (*GARServiceServer)(nil),
Methods: []grpc.MethodDesc{
+ {
+ MethodName: "GetSession",
+ Handler: _GARService_GetSession_Handler,
+ },
+ {
+ MethodName: "ForkSession",
+ Handler: _GARService_ForkSession_Handler,
+ },
{
MethodName: "RegisterAgent",
Handler: _GARService_RegisterAgent_Handler,