Skip to content

armgit / ax

Public Imported from GitHub
0

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

Go

integrate skills into gemini planner / agent loop (#60)

JoyceLiu76f68c5b4715
diff --git a/cmd/gar/serve.go b/cmd/gar/serve.go
index f44ba75..050e2e1 100644
--- a/cmd/gar/serve.go
+++ b/cmd/gar/serve.go
@@ -107,6 +107,7 @@ func newControllerFromConfig(ctx context.Context, cfg *config.Config) (*controll
MaxTokens: cfg.Planner.Gemini.MaxTokens,
Timeout: cfg.Planner.Gemini.Timeout,
SystemPrompt: cfg.Planner.Gemini.SystemPrompt,
+ SkillsDir: cfg.Planner.Gemini.SkillsDir,
})
}
diff --git a/cmd/gar/trigger.go b/cmd/gar/trigger.go
index 150f90e..c42347b 100644
--- a/cmd/gar/trigger.go
+++ b/cmd/gar/trigger.go
@@ -262,6 +262,14 @@ func displayContents(d *internal.Display, contents []*proto.Content) {
d.DisplayOutput(o.Text.Text)
case *proto.Content_Confirmation:
// Let the confirmation prompt handle displaying the question.
+ case *proto.Content_FunctionCall:
+ // No-op for cleaner CLI logs
+ case *proto.Content_FunctionResponse:
+ // Only print if the tool returned an error, otherwise skip
+ respMap := o.FunctionResponse.Response.AsMap()
+ if errStr, ok := respMap["error"]; ok {
+ d.DisplayOutput(fmt.Sprintf("\n[TOOL ERROR for %s]\n%v\n", o.FunctionResponse.Name, errStr))
+ }
default:
d.DisplayOutput(fmt.Sprintf("unknown output type: %v", o))
}
diff --git a/examples/skills/emoji/SKILL.md b/examples/skills/emoji/SKILL.md
new file mode 100644
index 0000000..4a50246
--- /dev/null
+++ b/examples/skills/emoji/SKILL.md
@@ -0,0 +1,9 @@
+---
+name: emoji
+description: Returns a corresponding emoji for a given word (e.g. happy, magic etc).
+---
+
+# Instructions
+When the user asks for an emoji for a specific word or concept, use this skill.
+1. Call `run_skill_script` to execute `emoji.sh`, passing the word as the first argument.
+2. Return the output emoji directly to the user.
diff --git a/examples/skills/emoji/scripts/emoji.sh b/examples/skills/emoji/scripts/emoji.sh
new file mode 100755
index 0000000..7ee7c06
--- /dev/null
+++ b/examples/skills/emoji/scripts/emoji.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# Return an ASCII emoticon based on the input word
+# Convert input to lowercase using tr for case-insensitive matching
+word=$(echo "$1" | tr '[:upper:]' '[:lower:]')
+
+case "$word" in
+ "happy"|"smile"|"joy") echo ":-)" ;;
+ "sad"|"cry") echo ":-(" ;;
+ "shrug"|"dunno"|"whatever") echo "¯\_(ツ)_/¯" ;;
+ "flip"|"angry"|"rage") echo "(╯°□°)╯︵ ┻━┻" ;;
+ "table"|"putback") echo "┬─┬ノ( º _ ºノ)" ;;
+ "magic"|"sparkle") echo "(ノ◕ヮ◕)ノ*:・゚✧" ;;
+ "sunglasses"|"cool") echo "(•_•) / ( •_•)>⌐■-■ / (⌐■_■)" ;;
+ "sundar"|"ceo") echo "👓(⌐■_■) 👍" ;;
+ "dance"|"party") echo "♪~ ᕕ(ᐛ)ᕗ" ;;
+ "wink") echo ";-)" ;;
+ "surprise"|"gasp") echo "(O_O)" ;;
+ *) echo "¯\_(ツ)_/¯ (unknown word)" ;;
+esac
diff --git a/examples/skills/lowercase/SKILL.md b/examples/skills/lowercase/SKILL.md
new file mode 100644
index 0000000..47a2c77
--- /dev/null
+++ b/examples/skills/lowercase/SKILL.md
@@ -0,0 +1,9 @@
+---
+name: lowercase
+description: Converts the provided input string to lowercase.
+---
+
+# Instructions
+When the user asks to convert a text to lowercase, or if you need to lowercase a string for processing, use this skill.
+1. Call `run_skill_script` to execute `lowercase.sh`, passing the text as the first argument.
+2. Return the lowered text directly to the user.
diff --git a/examples/skills/lowercase/scripts/lowercase.sh b/examples/skills/lowercase/scripts/lowercase.sh
new file mode 100755
index 0000000..130fdd4
--- /dev/null
+++ b/examples/skills/lowercase/scripts/lowercase.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+# Converts argument to lowercase
+echo "$1" | tr '[:upper:]' '[:lower:]'
diff --git a/examples/skills/main.go b/examples/skills/main.go
new file mode 100644
index 0000000..3f77b08
--- /dev/null
+++ b/examples/skills/main.go
@@ -0,0 +1,65 @@
+package main
+
+import (
+ "context"
+ "fmt"
+ "log"
+ "os"
+ "path/filepath"
+ "runtime"
+
+ "github.com/google/gar/internal/skills"
+ "google.golang.org/genai"
+)
+
+func main() {
+ ctx := context.Background()
+
+ // 1. Get the absolute path of the current skills directory
+ _, filename, _, _ := runtime.Caller(0)
+ skillsDir := filepath.Dir(filename) // Pointing to examples/skills/
+
+ fmt.Println("=== 1. Discovering Skills ===")
+ found, err := skills.Discover(skillsDir)
+ if err != nil {
+ log.Fatalf("Failed to discover skills: %v", err)
+ }
+ for _, s := range found {
+ fmt.Printf(" - Found Skill: %s\n", s.Name)
+ }
+
+ fmt.Println("\n=== 2. Initializing AI Executor ===")
+ apiKey := os.Getenv("GEMINI_API_KEY")
+ if apiKey == "" {
+ log.Fatal("GEMINI_API_KEY environment variable is required")
+ }
+
+ client, err := genai.NewClient(ctx, &genai.ClientConfig{APIKey: apiKey})
+ if err != nil {
+ log.Fatalf("Failed to create Gemini client: %v", err)
+ }
+
+ executor, err := skills.NewExecutor(client, "gemini-3-flash-preview", skillsDir)
+ if err != nil {
+ log.Fatalf("Failed to create executor: %v", err)
+ }
+
+ executor.OnUpdate(func(ev skills.UpdateEvent) {
+ switch ev.Kind {
+ case skills.UpdateSkillActivated:
+ fmt.Printf("\n[System Notification: The LLM activated skill '%s']\n", ev.Skill)
+ case skills.UpdateScriptRunning:
+ fmt.Printf("\n[System Notification: The LLM is running script '%s' from skill '%s']\n", ev.Script, ev.Skill)
+ }
+ })
+
+ prompt := "Please give me an emoji for: 'magic'"
+ fmt.Printf("\n=== 3. Running Agentic Loop with Prompt ===\nUser: %s\n\n", prompt)
+
+ response, err := executor.Run(ctx, prompt)
+ if err != nil {
+ log.Fatalf("Execution failed: %v", err)
+ }
+
+ fmt.Printf("\n=== Final Response ===\n%s\n", response)
+}
diff --git a/gar.yaml b/gar.yaml
index e3deec9..b924773 100644
--- a/gar.yaml
+++ b/gar.yaml
@@ -32,27 +32,30 @@ health_check:
interval: 30s
# Planner configuration (optional)
-# planner:
-# # Gemini planner configuration
-# # The Gemini planner uses Google's Gemini models for intelligent agent selection.
-# gemini:
-# # Model name (e.g., "gemini-3-flash")
-# model: "gemini-3-flash-preview"
-#
-# # Temperature for generation (0.0 to 1.0)
-# temperature: 0.7
-#
-# # Maximum output tokens
-# max_tokens: 8192
-#
-# # Request timeout (e.g., "30s", "1m")
-# timeout: 60s
-#
-# # Number of recent messages to include in context
-# context_window: 30
-#
-# # Custom system prompt for the planner (optional)
-# system_prompt: ""
+planner:
+ # Gemini planner configuration
+ # The Gemini planner uses Google's Gemini models for intelligent agent selection.
+ gemini:
+ # Model name (e.g., "gemini-3-flash")
+ model: "gemini-3-flash-preview"
+
+ # Temperature for generation (0.0 to 1.0)
+ temperature: 0.7
+
+ # Maximum output tokens
+ max_tokens: 8192
+
+ # Request timeout (e.g., "30s", "1m")
+ timeout: 60s
+
+ # Number of recent messages to include in context
+ context_window: 30
+
+ # Custom system prompt for the planner (optional)
+ system_prompt: ""
+
+ # Directory to load standalone skills from
+ skills_dir: "./examples/skills"
# Remote agents configuration (optional)
# List of remote agents to register on startup.
diff --git a/internal/config/config.go b/internal/config/config.go
index c9ec9c1..a00faea 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -74,6 +74,7 @@ type GeminiPlannerConfig struct {
Timeout time.Duration `yaml:"timeout,omitempty"`
ContextWindow int `yaml:"context_window,omitempty"`
SystemPrompt string `yaml:"system_prompt,omitempty"`
+ SkillsDir string `yaml:"skills_dir,omitempty"` // Directory to discover skills from
}
// RemoteAgentConfig configures a remote agent to register on startup.
@@ -86,10 +87,10 @@ type RemoteAgentConfig struct {
}
type LocalAgentConfig struct {
- ID string // Unique agent identifier
- Name string // Human-readable name
- Description string // Description of agent capabilities
- Metadata map[string]string // Optional metadata
+ ID string `yaml:"id"` // Unique agent identifier
+ Name string `yaml:"name"` // Human-readable name
+ Description string `yaml:"description"` // Description of agent capabilities
+ Metadata map[string]string `yaml:"metadata,omitempty"` // Optional metadata
Agent agent.Agent // In-process agent instance (not in YAML)
}
diff --git a/internal/controller/gemini.go b/internal/controller/gemini.go
index 2a75ea0..2e2cc6e 100644
--- a/internal/controller/gemini.go
+++ b/internal/controller/gemini.go
@@ -18,6 +18,8 @@ import (
"context"
"errors"
"fmt"
+ "io"
+ "log"
"os"
"os/exec"
"runtime"
@@ -25,9 +27,11 @@ import (
"time"
"github.com/google/gar/agent"
+ "github.com/google/gar/internal/skills"
"github.com/google/gar/proto"
"github.com/google/uuid"
"google.golang.org/genai"
+ "google.golang.org/protobuf/types/known/structpb"
)
const fsToolName = "filesystem"
@@ -39,6 +43,7 @@ type GeminiPlannerConfig struct {
MaxTokens int32 // Max output tokens (default: 8192)
Timeout time.Duration // Request timeout (default: 60s)
SystemPrompt string // Custom system prompt (optional)
+ SkillsDir string // Directory for discovering skills (optional)
}
func NewGeminiPlanner(ctx context.Context, registry *Registry, config GeminiPlannerConfig) (agent.Agent, error) {
@@ -87,19 +92,42 @@ Guidelines:
return nil, fmt.Errorf("failed to create Gemini client: %w", err)
}
+ skillsDir := config.SkillsDir
+ if skillsDir == "" {
+ skillsDir = os.Getenv("SKILLS_DIR")
+ }
+ if skillsDir == "" {
+ skillsDir = skills.DefaultDir()
+ }
+
+ skillExec, err := skills.NewExecutor(client, config.Model, skillsDir)
+ if err != nil && err != io.EOF {
+ log.Printf("Warning: failed to initialize skill executor for %q: %v\n", skillsDir, err)
+ }
+
+ if skillExec != nil && skillExec.HasSkills() {
+ config.SystemPrompt += "\n\n" + skillExec.SystemPrompt()
+
+ skillExec.OnUpdate(func(ev skills.UpdateEvent) {
+ // No-op for cleaner CLI logs
+ })
+ }
+
return &geminiPlannerAgent{
- client: client,
- fsTool: newFilesystemTool(),
- registry: registry,
- config: config,
+ client: client,
+ fsTool: newFilesystemTool(),
+ registry: registry,
+ config: config,
+ skillExec: skillExec,
}, nil
}
type geminiPlannerAgent struct {
- client *genai.Client
- fsTool *filesystemTool
- registry *Registry
- config GeminiPlannerConfig
+ client *genai.Client
+ fsTool *filesystemTool
+ registry *Registry
+ config GeminiPlannerConfig
+ skillExec *skills.Executor
}
// agentsToTools converts registry agents to Gemini function declarations.
@@ -134,6 +162,9 @@ func (p *geminiPlannerAgent) Process(ctx context.Context, sessionID string, inco
if err != nil {
return fmt.Errorf("failed to convert agents to tools: %w", err)
}
+ if p.skillExec != nil && p.skillExec.HasSkills() {
+ tools = append(tools, skills.BuildTool(p.skillExec.SkillNames()))
+ }
// Convert session to conversation history
contents := protoToContents(incoming.Contents)
@@ -186,7 +217,94 @@ func (p *geminiPlannerAgent) Process(ctx context.Context, sessionID string, inco
}
if fc := part.FunctionCall; fc != nil {
+ argsStruct, err := structpb.NewStruct(fc.Args)
+ if err != nil {
+ return fmt.Errorf("failed to convert function call args to structpb: %w", err)
+ }
+ if err := handler(&proto.ProcessResponse{
+ Contents: []*proto.Content{{
+ Role: "assistant",
+ Content: &proto.Content_FunctionCall{
+ FunctionCall: &proto.FunctionCallContent{
+ Name: fc.Name,
+ Args: argsStruct,
+ Id: fc.ID,
+ ThoughtSignature: part.ThoughtSignature,
+ },
+ },
+ }},
+ }); err != nil {
+ return err
+ }
+
switch fc.Name {
+ case "activate_skill", "run_skill_script":
+ if p.skillExec == nil {
+ return fmt.Errorf("skill executor not initialized")
+ }
+
+ if fc.Name == "run_skill_script" {
+ skill, _ := fc.Args["skill"].(string)
+ script, _ := fc.Args["script"].(string)
+ question := fmt.Sprintf("Can I run script %q from skill %q?", script, skill)
+
+ continueProcessing, err := checkCommandApproval(incoming.Contents, question, handler)
+ if err != nil {
+ return err
+ }
+ if !continueProcessing {
+ return nil
+ }
+ }
+
+ resultPart := p.skillExec.HandleCall(ctx, fc)
+
+ // Format the output for GAR's text-based history log
+ var output string
+ if resultPart != nil && resultPart.FunctionResponse != nil {
+ resultMap := resultPart.FunctionResponse.Response
+ if body, ok := resultMap["instructions"]; ok {
+ output = body.(string)
+ } else if errStr, ok := resultMap["error"]; ok {
+ output = "Error: " + errStr.(string)
+ } else {
+ if so, ok := resultMap["stdout"].(string); ok && so != "" {
+ output += so
+ }
+ if se, ok := resultMap["stderr"].(string); ok && se != "" {
+ if output != "" {
+ output += "\n"
+ }
+ output += "Stderr: " + se
+ }
+ if output == "" {
+ output = "Command executed successfully (no output)"
+ }
+ }
+ } else {
+ output = "Error: nil response from executor"
+ }
+
+ // Explicitly format as a tool result so the reconstructed history doesn't confuse the model
+ respStruct, err := structpb.NewStruct(map[string]interface{}{"result": output})
+ if err != nil {
+ return fmt.Errorf("failed to convert function response to structpb: %w", err)
+ }
+
+ return handler(&proto.ProcessResponse{
+ Contents: []*proto.Content{{
+ Role: "assistant",
+ Content: &proto.Content_FunctionResponse{
+ FunctionResponse: &proto.FunctionResponseContent{
+ Name: fc.Name,
+ Response: respStruct,
+ Id: fc.ID,
+ },
+ },
+ }},
+ AgentHandoff: plannerAgentID,
+ })
+
case fsToolName:
command, ok := fc.Args["command"].(string)
if !ok {
@@ -207,11 +325,20 @@ func (p *geminiPlannerAgent) Process(ctx context.Context, sessionID string, inco
return err
}
+ respStruct, err := structpb.NewStruct(map[string]interface{}{"result": output})
+ if err != nil {
+ return fmt.Errorf("failed to convert function response to structpb: %w", err)
+ }
+
return handler(&proto.ProcessResponse{
Contents: []*proto.Content{{
- Role: "assistant",
- Content: &proto.Content_Text{
- Text: &proto.TextContent{Text: output},
+ Role: "assistant", // Note: The history uses assistant for now
+ Content: &proto.Content_FunctionResponse{
+ FunctionResponse: &proto.FunctionResponseContent{
+ Name: fc.Name,
+ Response: respStruct,
+ Id: fc.ID,
+ },
},
}},
AgentHandoff: plannerAgentID, // Explicitly return to planner in same response
@@ -263,9 +390,7 @@ func protoToContents(inputs []*proto.Content) []*genai.Content {
contents = append(contents, &genai.Content{
Role: "model",
Parts: []*genai.Part{
- {
- Text: m.Confirmation.Question,
- },
+ {Text: m.Confirmation.Question},
},
})
}
@@ -277,13 +402,38 @@ func protoToContents(inputs []*proto.Content) []*genai.Content {
contents = append(contents, &genai.Content{
Role: "user",
Parts: []*genai.Part{
- {
- Text: "Approved.",
- },
+ {Text: "Approved."},
},
})
}
}
+ case *proto.Content_FunctionCall:
+ contents = append(contents, &genai.Content{
+ Role: "model",
+ Parts: []*genai.Part{
+ {
+ ThoughtSignature: m.FunctionCall.ThoughtSignature,
+ FunctionCall: &genai.FunctionCall{
+ ID: m.FunctionCall.Id,
+ Name: m.FunctionCall.Name,
+ Args: m.FunctionCall.Args.AsMap(),
+ },
+ },
+ },
+ })
+ case *proto.Content_FunctionResponse:
+ contents = append(contents, &genai.Content{
+ Role: "user",
+ Parts: []*genai.Part{
+ {
+ FunctionResponse: &genai.FunctionResponse{
+ ID: m.FunctionResponse.Id,
+ Name: m.FunctionResponse.Name,
+ Response: m.FunctionResponse.Response.AsMap(),
+ },
+ },
+ },
+ })
}
// TODO(jbd): Handle other content types (e.g., images, files)
}
diff --git a/internal/skills/exec.go b/internal/skills/exec.go
index 184a125..3a7ad33 100644
--- a/internal/skills/exec.go
+++ b/internal/skills/exec.go
@@ -18,7 +18,6 @@ import (
"context"
"io"
"os"
- "path/filepath"
"google.golang.org/genai"
)
@@ -47,6 +46,7 @@ type Executor struct {
cfg *genai.GenerateContentConfig
byName map[string]Skill
+ names []string
onUpdate func(UpdateEvent)
}
@@ -69,7 +69,7 @@ func NewExecutor(client *genai.Client, model, dir string) (*Executor, error) {
dir = os.Getenv("SKILLS_DIR")
}
if dir == "" {
- dir = filepath.Join(os.Getenv("HOME"), ".agents", "skills")
+ dir = DefaultDir()
}
found, err := Discover(dir)
@@ -90,16 +90,17 @@ func NewExecutor(client *genai.Client, model, dir string) (*Executor, error) {
si := "You are a helpful AI assistant with access to a set of skills.\n" +
"When a user task matches one or more skills, call activate_skill to load\n" +
"its full instructions before answering.\n\n" +
- systemPrompt(found)
+ SystemPrompt(found)
cfg := &genai.GenerateContentConfig{
SystemInstruction: genai.NewContentFromText(si, genai.RoleUser),
- Tools: []*genai.Tool{buildTool(names)},
+ Tools: []*genai.Tool{BuildTool(names)},
}
return &Executor{
client: client,
byName: byName,
+ names: names,
cfg: cfg,
model: model,
}, nil
@@ -128,13 +129,15 @@ func (e *Executor) Run(ctx context.Context, prompt string) (string, error) {
var results []*genai.Part
for _, call := range calls {
- results = append(results, e.handleCall(ctx, call))
+ results = append(results, e.HandleCall(ctx, call))
}
history = append(history, genai.NewContentFromParts(results, genai.RoleUser))
}
}
-func (e *Executor) handleCall(ctx context.Context, call *genai.FunctionCall) *genai.Part {
+// HandleCall processes an 'activate_skill' or 'run_skill_script' call.
+// It returns a genai.Part containing the function response.
+func (e *Executor) HandleCall(ctx context.Context, call *genai.FunctionCall) *genai.Part {
respond := func(v map[string]any) *genai.Part {
return genai.NewPartFromFunctionResponse(call.Name, v)
}
@@ -177,6 +180,7 @@ func (e *Executor) handleCall(ctx context.Context, call *genai.FunctionCall) *ge
if !ok {
return respond(map[string]any{"error": "unknown skill: " + skillName})
}
+
e.update(UpdateEvent{Kind: UpdateScriptRunning, Skill: skillName, Script: script})
result, err := s.RunScript(ctx, script, args)
if err != nil {
@@ -194,7 +198,8 @@ func (e *Executor) handleCall(ctx context.Context, call *genai.FunctionCall) *ge
}
}
-func buildTool(names []string) *genai.Tool {
+// BuildTool creates the Gemini Tool definition for skill invocation.
+func BuildTool(names []string) *genai.Tool {
return &genai.Tool{
FunctionDeclarations: []*genai.FunctionDeclaration{
{
@@ -239,3 +244,28 @@ func buildTool(names []string) *genai.Tool {
},
}
}
+
+// HasSkills returns true if the executor has any skills.
+func (e *Executor) HasSkills() bool {
+ return len(e.names) > 0
+}
+
+// SystemPrompt returns the agentskills.io instructional block for all skills.
+func (e *Executor) SystemPrompt() string {
+ if !e.HasSkills() {
+ return ""
+ }
+ var b []Skill
+ for _, name := range e.names {
+ b = append(b, e.byName[name])
+ }
+ return SystemPrompt(b)
+}
+
+// SkillNames returns the names of all discovered skills.
+func (e *Executor) SkillNames() []string {
+ if !e.HasSkills() {
+ return nil
+ }
+ return append([]string(nil), e.names...)
+}
diff --git a/internal/skills/skills.go b/internal/skills/skills.go
index 1b1a4b2..3333e33 100644
--- a/internal/skills/skills.go
+++ b/internal/skills/skills.go
@@ -48,14 +48,30 @@ type ScriptResult struct {
ExitCode int
}
+// DefaultDir returns the default system-wide directory for discovering skills.
+// It resolves to ~/.agents/skills on all platforms.
+func DefaultDir() string {
+ homeDir, err := os.UserHomeDir()
+ if err != nil {
+ // Fallback to Unix HOME if UserHomeDir fails (though rare).
+ homeDir = os.Getenv("HOME")
+ }
+ return filepath.Join(homeDir, ".agents", "skills")
+}
+
// Discover scans dir for agentskills.io-compatible skill directories and
// returns their parsed metadata. Invisible entries (names starting with ".")
// and entries that are not directories (including broken symlinks) are skipped.
// Directories that lack a valid SKILL.md are silently skipped.
func Discover(dir string) ([]Skill, error) {
- entries, err := os.ReadDir(dir)
+ absDir, err := filepath.Abs(dir)
if err != nil {
- return nil, fmt.Errorf("read skills dir %s: %w", dir, err)
+ return nil, fmt.Errorf("resolve skills dir path %s: %w", dir, err)
+ }
+
+ entries, err := os.ReadDir(absDir)
+ if err != nil {
+ return nil, fmt.Errorf("read skills dir %s: %w", absDir, err)
}
var out []Skill
@@ -63,7 +79,7 @@ func Discover(dir string) ([]Skill, error) {
if strings.HasPrefix(e.Name(), ".") {
continue
}
- skillDir := filepath.Join(dir, e.Name())
+ skillDir := filepath.Join(absDir, e.Name())
// os.Stat follows symlinks, so symlinked skill directories are supported.
info, err := os.Stat(skillDir)
if err != nil || !info.IsDir() {
@@ -111,14 +127,15 @@ func (s Skill) RunScript(ctx context.Context, script string, args []string) (*Sc
return nil, fmt.Errorf("invalid script name: %q", script)
}
scriptPath := filepath.Join(s.Dir, "scripts", script)
+
if _, err := os.Stat(scriptPath); err != nil {
return nil, fmt.Errorf("script %q not found or inaccessible: %w", script, err)
}
cmd := exec.CommandContext(ctx, scriptPath, args...)
cmd.Dir = s.Dir
-
- var stdout, stderr bytes.Buffer
+
+ var stdout, stderr bytes.Buffer
cmd.Stdout = &stdout
cmd.Stderr = &stderr
@@ -137,9 +154,9 @@ func (s Skill) RunScript(ctx context.Context, script string, args []string) (*Sc
}, nil
}
-// systemPrompt returns the <available_skills> XML block for injection into a
+// SystemPrompt returns the <available_skills> XML block for injection into a
// model system prompt, following the agentskills.io integration guide.
-func systemPrompt(skills []Skill) string {
+func SystemPrompt(skills []Skill) string {
var b strings.Builder
b.WriteString("<available_skills>\n")
for _, s := range skills {
diff --git a/internal/skills/skills_test.go b/internal/skills/skills_test.go
new file mode 100644
index 0000000..99a4455
--- /dev/null
+++ b/internal/skills/skills_test.go
@@ -0,0 +1,104 @@
+// 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 skills
+
+import (
+ "context"
+ "os"
+ "path/filepath"
+ "testing"
+)
+
+func TestDiscover(t *testing.T) {
+ // Create a temporary skills directory
+ tmpDir := t.TempDir()
+
+ // 1. Valid skill
+ skill1Dir := filepath.Join(tmpDir, "test-skill-1")
+ os.MkdirAll(skill1Dir, 0755)
+ err := os.WriteFile(filepath.Join(skill1Dir, "SKILL.md"), []byte("---\nname: Test Skill 1\ndescription: Description 1\n---\nBody 1"), 0644)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ // 2. Skill without SKILL.md (should be skipped)
+ skill2Dir := filepath.Join(tmpDir, "test-skill-2")
+ os.MkdirAll(skill2Dir, 0755)
+
+ // 3. Skill with invalid frontmatter (should be skipped)
+ skill3Dir := filepath.Join(tmpDir, "test-skill-3")
+ os.MkdirAll(skill3Dir, 0755)
+ os.WriteFile(filepath.Join(skill3Dir, "SKILL.md"), []byte("invalid content"), 0644)
+
+ skills, err := Discover(tmpDir)
+ if err != nil {
+ t.Fatalf("Discover failed: %v", err)
+ }
+
+ if len(skills) != 1 {
+ t.Errorf("Expected 1 skill, got %d", len(skills))
+ }
+
+ if skills[0].Name != "Test Skill 1" {
+ t.Errorf("Expected name 'Test Skill 1', got %q", skills[0].Name)
+ }
+}
+
+func TestSkillBody(t *testing.T) {
+ tmpDir := t.TempDir()
+ skillDir := filepath.Join(tmpDir, "test-skill")
+ os.MkdirAll(skillDir, 0755)
+ content := "---\nname: Test\ndescription: Test\n---\nThis is the body content."
+ os.WriteFile(filepath.Join(skillDir, "SKILL.md"), []byte(content), 0644)
+
+ s := Skill{Dir: skillDir}
+ body, err := s.Body()
+ if err != nil {
+ t.Fatalf("Body() failed: %v", err)
+ }
+
+ expected := "This is the body content."
+ if body != expected {
+ t.Errorf("Expected body %q, got %q", expected, body)
+ }
+}
+
+func TestRunScript(t *testing.T) {
+ tmpDir := t.TempDir()
+ skillDir := filepath.Join(tmpDir, "test-skill")
+ scriptsDir := filepath.Join(skillDir, "scripts")
+ os.MkdirAll(scriptsDir, 0755)
+
+ scriptContent := "#!/bin/sh\necho \"hello $1\""
+ scriptPath := filepath.Join(scriptsDir, "hello.sh")
+ os.WriteFile(scriptPath, []byte(scriptContent), 0755)
+
+ ctx := context.Background()
+ s := Skill{Dir: skillDir, Name: "test-skill"}
+
+ result, err := s.RunScript(ctx, "hello.sh", []string{"world"})
+ if err != nil {
+ t.Fatalf("RunScript() failed: %v", err)
+ }
+
+ if result.ExitCode != 0 {
+ t.Errorf("Expected exit code 0, got %d", result.ExitCode)
+ }
+
+ expectedStdout := "hello world\n"
+ if result.Stdout != expectedStdout {
+ t.Errorf("Expected stdout %q, got %q", expectedStdout, result.Stdout)
+ }
+}
diff --git a/proto/gar.pb.go b/proto/gar.pb.go
index 96fe373..5e72ec6 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
@@ -23,9 +23,11 @@ package proto
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ structpb "google.golang.org/protobuf/types/known/structpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -90,15 +92,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 +149,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 +157,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 +215,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() {
@@ -260,11 +259,10 @@ func (x *TextContent) GetText() string {
}
type ApprovalDecision struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Approved bool `protobuf:"varint,1,opt,name=approved,proto3" json:"approved,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Approved bool `protobuf:"varint,1,opt,name=approved,proto3" json:"approved,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ApprovalDecision) Reset() {
@@ -305,11 +303,10 @@ func (x *ApprovalDecision) GetApproved() bool {
}
type DeclineDecision struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Declined bool `protobuf:"varint,1,opt,name=declined,proto3" json:"declined,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Declined bool `protobuf:"varint,1,opt,name=declined,proto3" json:"declined,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *DeclineDecision) Reset() {
@@ -350,17 +347,16 @@ func (x *DeclineDecision) GetDeclined() bool {
}
type ConfirmationContent struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
- Question string `protobuf:"bytes,4,opt,name=question,proto3" json:"question,omitempty"`
- // Types that are assignable to Decision:
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
+ Question string `protobuf:"bytes,4,opt,name=question,proto3" json:"question,omitempty"`
+ // Types that are valid to be assigned to Decision:
//
// *ConfirmationContent_Approval
// *ConfirmationContent_Decline
- Decision isConfirmationContent_Decision `protobuf_oneof:"decision"`
+ Decision isConfirmationContent_Decision `protobuf_oneof:"decision"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ConfirmationContent) Reset() {
@@ -407,23 +403,27 @@ func (x *ConfirmationContent) GetQuestion() string {
return ""
}
-func (m *ConfirmationContent) GetDecision() isConfirmationContent_Decision {
- if m != nil {
- return m.Decision
+func (x *ConfirmationContent) GetDecision() isConfirmationContent_Decision {
+ if x != nil {
+ return x.Decision
}
return nil
}
func (x *ConfirmationContent) GetApproval() *ApprovalDecision {
- if x, ok := x.GetDecision().(*ConfirmationContent_Approval); ok {
- return x.Approval
+ if x != nil {
+ if x, ok := x.Decision.(*ConfirmationContent_Approval); ok {
+ return x.Approval
+ }
}
return nil
}
func (x *ConfirmationContent) GetDecline() *DeclineDecision {
- if x, ok := x.GetDecision().(*ConfirmationContent_Decline); ok {
- return x.Decline
+ if x != nil {
+ if x, ok := x.Decision.(*ConfirmationContent_Decline); ok {
+ return x.Decline
+ }
}
return nil
}
@@ -444,23 +444,152 @@ func (*ConfirmationContent_Approval) isConfirmationContent_Decision() {}
func (*ConfirmationContent_Decline) isConfirmationContent_Decision() {}
-// Content represents a message with role, type, mimetype, and data fields
-type Content struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type FunctionCallContent struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Args *structpb.Struct `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"`
+ Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
+ ThoughtSignature []byte `protobuf:"bytes,4,opt,name=thought_signature,json=thoughtSignature,proto3" json:"thought_signature,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *FunctionCallContent) Reset() {
+ *x = FunctionCallContent{}
+ mi := &file_proto_gar_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *FunctionCallContent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FunctionCallContent) ProtoMessage() {}
+
+func (x *FunctionCallContent) ProtoReflect() protoreflect.Message {
+ mi := &file_proto_gar_proto_msgTypes[6]
+ 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 FunctionCallContent.ProtoReflect.Descriptor instead.
+func (*FunctionCallContent) Descriptor() ([]byte, []int) {
+ return file_proto_gar_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *FunctionCallContent) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *FunctionCallContent) GetArgs() *structpb.Struct {
+ if x != nil {
+ return x.Args
+ }
+ return nil
+}
+
+func (x *FunctionCallContent) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *FunctionCallContent) GetThoughtSignature() []byte {
+ if x != nil {
+ return x.ThoughtSignature
+ }
+ return nil
+}
+
+type FunctionResponseContent struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Response *structpb.Struct `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"`
+ Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *FunctionResponseContent) Reset() {
+ *x = FunctionResponseContent{}
+ mi := &file_proto_gar_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *FunctionResponseContent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FunctionResponseContent) ProtoMessage() {}
+
+func (x *FunctionResponseContent) ProtoReflect() protoreflect.Message {
+ mi := &file_proto_gar_proto_msgTypes[7]
+ 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 FunctionResponseContent.ProtoReflect.Descriptor instead.
+func (*FunctionResponseContent) Descriptor() ([]byte, []int) {
+ return file_proto_gar_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *FunctionResponseContent) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *FunctionResponseContent) GetResponse() *structpb.Struct {
+ if x != nil {
+ return x.Response
+ }
+ return nil
+}
- // Types that are assignable to Content:
+func (x *FunctionResponseContent) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+// Content represents a message with role, type, mimetype, and data fields
+type Content struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to Content:
//
// *Content_Text
// *Content_Confirmation
- 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_FunctionCall
+ // *Content_FunctionResponse
+ 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() {
*x = Content{}
- mi := &file_proto_gar_proto_msgTypes[6]
+ mi := &file_proto_gar_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -472,7 +601,7 @@ func (x *Content) String() string {
func (*Content) ProtoMessage() {}
func (x *Content) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[6]
+ mi := &file_proto_gar_proto_msgTypes[8]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -485,26 +614,48 @@ func (x *Content) ProtoReflect() protoreflect.Message {
// Deprecated: Use Content.ProtoReflect.Descriptor instead.
func (*Content) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{6}
+ return file_proto_gar_proto_rawDescGZIP(), []int{8}
}
-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
}
func (x *Content) GetConfirmation() *ConfirmationContent {
- if x, ok := x.GetContent().(*Content_Confirmation); ok {
- return x.Confirmation
+ if x != nil {
+ if x, ok := x.Content.(*Content_Confirmation); ok {
+ return x.Confirmation
+ }
+ }
+ return nil
+}
+
+func (x *Content) GetFunctionCall() *FunctionCallContent {
+ if x != nil {
+ if x, ok := x.Content.(*Content_FunctionCall); ok {
+ return x.FunctionCall
+ }
+ }
+ return nil
+}
+
+func (x *Content) GetFunctionResponse() *FunctionResponseContent {
+ if x != nil {
+ if x, ok := x.Content.(*Content_FunctionResponse); ok {
+ return x.FunctionResponse
+ }
}
return nil
}
@@ -528,25 +679,36 @@ type Content_Confirmation struct {
Confirmation *ConfirmationContent `protobuf:"bytes,26,opt,name=confirmation,proto3,oneof"`
}
+type Content_FunctionCall struct {
+ FunctionCall *FunctionCallContent `protobuf:"bytes,27,opt,name=function_call,json=functionCall,proto3,oneof"`
+}
+
+type Content_FunctionResponse struct {
+ FunctionResponse *FunctionResponseContent `protobuf:"bytes,28,opt,name=function_response,json=functionResponse,proto3,oneof"`
+}
+
func (*Content_Text) isContent_Content() {}
func (*Content_Confirmation) isContent_Content() {}
+func (*Content_FunctionCall) isContent_Content() {}
+
+func (*Content_FunctionResponse) isContent_Content() {}
+
// Event that represents a session state change.
// Some sessions may not be resumable based on their latest state.
// 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() {
*x = SessionStateEvent{}
- mi := &file_proto_gar_proto_msgTypes[7]
+ mi := &file_proto_gar_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -558,7 +720,7 @@ func (x *SessionStateEvent) String() string {
func (*SessionStateEvent) ProtoMessage() {}
func (x *SessionStateEvent) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[7]
+ mi := &file_proto_gar_proto_msgTypes[9]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -571,7 +733,7 @@ func (x *SessionStateEvent) ProtoReflect() protoreflect.Message {
// Deprecated: Use SessionStateEvent.ProtoReflect.Descriptor instead.
func (*SessionStateEvent) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{7}
+ return file_proto_gar_proto_rawDescGZIP(), []int{9}
}
func (x *SessionStateEvent) GetState() State {
@@ -583,18 +745,17 @@ 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() {
*x = AgentCallEvent{}
- mi := &file_proto_gar_proto_msgTypes[8]
+ mi := &file_proto_gar_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -606,7 +767,7 @@ func (x *AgentCallEvent) String() string {
func (*AgentCallEvent) ProtoMessage() {}
func (x *AgentCallEvent) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[8]
+ mi := &file_proto_gar_proto_msgTypes[10]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -619,7 +780,7 @@ func (x *AgentCallEvent) ProtoReflect() protoreflect.Message {
// Deprecated: Use AgentCallEvent.ProtoReflect.Descriptor instead.
func (*AgentCallEvent) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{8}
+ return file_proto_gar_proto_rawDescGZIP(), []int{10}
}
func (x *AgentCallEvent) GetSender() string {
@@ -647,18 +808,17 @@ 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() {
*x = HandoffEvent{}
- mi := &file_proto_gar_proto_msgTypes[9]
+ mi := &file_proto_gar_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -670,7 +830,7 @@ func (x *HandoffEvent) String() string {
func (*HandoffEvent) ProtoMessage() {}
func (x *HandoffEvent) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[9]
+ mi := &file_proto_gar_proto_msgTypes[11]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -683,7 +843,7 @@ func (x *HandoffEvent) ProtoReflect() protoreflect.Message {
// Deprecated: Use HandoffEvent.ProtoReflect.Descriptor instead.
func (*HandoffEvent) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{9}
+ return file_proto_gar_proto_rawDescGZIP(), []int{11}
}
func (x *HandoffEvent) GetSourceAgentId() string {
@@ -710,16 +870,15 @@ 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() {
*x = ContentEvent{}
- mi := &file_proto_gar_proto_msgTypes[10]
+ mi := &file_proto_gar_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -731,7 +890,7 @@ func (x *ContentEvent) String() string {
func (*ContentEvent) ProtoMessage() {}
func (x *ContentEvent) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[10]
+ mi := &file_proto_gar_proto_msgTypes[12]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -744,7 +903,7 @@ func (x *ContentEvent) ProtoReflect() protoreflect.Message {
// Deprecated: Use ContentEvent.ProtoReflect.Descriptor instead.
func (*ContentEvent) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{10}
+ return file_proto_gar_proto_rawDescGZIP(), []int{12}
}
func (x *ContentEvent) GetContents() []*Content {
@@ -758,28 +917,27 @@ 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() {
*x = Event{}
- mi := &file_proto_gar_proto_msgTypes[11]
+ mi := &file_proto_gar_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -791,7 +949,7 @@ func (x *Event) String() string {
func (*Event) ProtoMessage() {}
func (x *Event) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[11]
+ mi := &file_proto_gar_proto_msgTypes[13]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -804,7 +962,7 @@ func (x *Event) ProtoReflect() protoreflect.Message {
// Deprecated: Use Event.ProtoReflect.Descriptor instead.
func (*Event) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{11}
+ return file_proto_gar_proto_rawDescGZIP(), []int{13}
}
func (x *Event) GetSessionId() string {
@@ -849,37 +1007,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
}
@@ -914,14 +1080,14 @@ 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() {
*x = HealthCheckRequest{}
- mi := &file_proto_gar_proto_msgTypes[12]
+ mi := &file_proto_gar_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -933,7 +1099,7 @@ func (x *HealthCheckRequest) String() string {
func (*HealthCheckRequest) ProtoMessage() {}
func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[12]
+ mi := &file_proto_gar_proto_msgTypes[14]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -946,22 +1112,21 @@ func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.
func (*HealthCheckRequest) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{12}
+ return file_proto_gar_proto_rawDescGZIP(), []int{14}
}
// 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() {
*x = HealthCheckResponse{}
- mi := &file_proto_gar_proto_msgTypes[13]
+ mi := &file_proto_gar_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -973,7 +1138,7 @@ func (x *HealthCheckResponse) String() string {
func (*HealthCheckResponse) ProtoMessage() {}
func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[13]
+ mi := &file_proto_gar_proto_msgTypes[15]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -986,7 +1151,7 @@ func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.
func (*HealthCheckResponse) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{13}
+ return file_proto_gar_proto_rawDescGZIP(), []int{15}
}
func (x *HealthCheckResponse) GetHealthy() bool {
@@ -1005,17 +1170,16 @@ 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
+ Inputs []*Content `protobuf:"bytes,2,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
- Inputs []*Content `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"` // Input content to process
+ sizeCache protoimpl.SizeCache
}
func (x *TriggerSessionRequest) Reset() {
*x = TriggerSessionRequest{}
- mi := &file_proto_gar_proto_msgTypes[14]
+ mi := &file_proto_gar_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1027,7 +1191,7 @@ func (x *TriggerSessionRequest) String() string {
func (*TriggerSessionRequest) ProtoMessage() {}
func (x *TriggerSessionRequest) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[14]
+ mi := &file_proto_gar_proto_msgTypes[16]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1040,7 +1204,7 @@ func (x *TriggerSessionRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use TriggerSessionRequest.ProtoReflect.Descriptor instead.
func (*TriggerSessionRequest) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{14}
+ return file_proto_gar_proto_rawDescGZIP(), []int{16}
}
func (x *TriggerSessionRequest) GetSessionId() string {
@@ -1059,19 +1223,18 @@ 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() {
*x = TriggerSessionResponse{}
- mi := &file_proto_gar_proto_msgTypes[15]
+ mi := &file_proto_gar_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1083,7 +1246,7 @@ func (x *TriggerSessionResponse) String() string {
func (*TriggerSessionResponse) ProtoMessage() {}
func (x *TriggerSessionResponse) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[15]
+ mi := &file_proto_gar_proto_msgTypes[17]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1096,7 +1259,7 @@ func (x *TriggerSessionResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use TriggerSessionResponse.ProtoReflect.Descriptor instead.
func (*TriggerSessionResponse) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{15}
+ return file_proto_gar_proto_rawDescGZIP(), []int{17}
}
func (x *TriggerSessionResponse) GetSessionId() string {
@@ -1128,18 +1291,17 @@ func (x *TriggerSessionResponse) GetState() State {
}
type ForkSessionRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- SrcSessionId string `protobuf:"bytes,1,opt,name=src_session_id,json=srcSessionId,proto3" json:"src_session_id,omitempty"`
- SrcCheckpointId string `protobuf:"bytes,2,opt,name=src_checkpoint_id,json=srcCheckpointId,proto3" json:"src_checkpoint_id,omitempty"` // Checkpoint ID within the source session to fork from.
- DestSessionId string `protobuf:"bytes,3,opt,name=dest_session_id,json=destSessionId,proto3" json:"dest_session_id,omitempty"` // New session ID. If provided, must not exist.
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SrcSessionId string `protobuf:"bytes,1,opt,name=src_session_id,json=srcSessionId,proto3" json:"src_session_id,omitempty"`
+ SrcCheckpointId string `protobuf:"bytes,2,opt,name=src_checkpoint_id,json=srcCheckpointId,proto3" json:"src_checkpoint_id,omitempty"` // Checkpoint ID within the source session to fork from.
+ DestSessionId string `protobuf:"bytes,3,opt,name=dest_session_id,json=destSessionId,proto3" json:"dest_session_id,omitempty"` // New session ID. If provided, must not exist.
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ForkSessionRequest) Reset() {
*x = ForkSessionRequest{}
- mi := &file_proto_gar_proto_msgTypes[16]
+ mi := &file_proto_gar_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1151,7 +1313,7 @@ func (x *ForkSessionRequest) String() string {
func (*ForkSessionRequest) ProtoMessage() {}
func (x *ForkSessionRequest) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[16]
+ mi := &file_proto_gar_proto_msgTypes[18]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1164,7 +1326,7 @@ func (x *ForkSessionRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ForkSessionRequest.ProtoReflect.Descriptor instead.
func (*ForkSessionRequest) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{16}
+ return file_proto_gar_proto_rawDescGZIP(), []int{18}
}
func (x *ForkSessionRequest) GetSrcSessionId() string {
@@ -1189,16 +1351,15 @@ func (x *ForkSessionRequest) GetDestSessionId() string {
}
type ForkSessionResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ 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
-
- 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)
+ sizeCache protoimpl.SizeCache
}
func (x *ForkSessionResponse) Reset() {
*x = ForkSessionResponse{}
- mi := &file_proto_gar_proto_msgTypes[17]
+ mi := &file_proto_gar_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1210,7 +1371,7 @@ func (x *ForkSessionResponse) String() string {
func (*ForkSessionResponse) ProtoMessage() {}
func (x *ForkSessionResponse) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[17]
+ mi := &file_proto_gar_proto_msgTypes[19]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1223,7 +1384,7 @@ func (x *ForkSessionResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ForkSessionResponse.ProtoReflect.Descriptor instead.
func (*ForkSessionResponse) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{17}
+ return file_proto_gar_proto_rawDescGZIP(), []int{19}
}
func (x *ForkSessionResponse) GetNewSessionId() string {
@@ -1234,16 +1395,15 @@ func (x *ForkSessionResponse) GetNewSessionId() string {
}
type RemoteAgentConfig struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // gRPC address for remote agents
unknownFields protoimpl.UnknownFields
-
- Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // gRPC address for remote agents
+ sizeCache protoimpl.SizeCache
}
func (x *RemoteAgentConfig) Reset() {
*x = RemoteAgentConfig{}
- mi := &file_proto_gar_proto_msgTypes[18]
+ mi := &file_proto_gar_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1255,7 +1415,7 @@ func (x *RemoteAgentConfig) String() string {
func (*RemoteAgentConfig) ProtoMessage() {}
func (x *RemoteAgentConfig) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[18]
+ mi := &file_proto_gar_proto_msgTypes[20]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1268,7 +1428,7 @@ func (x *RemoteAgentConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use RemoteAgentConfig.ProtoReflect.Descriptor instead.
func (*RemoteAgentConfig) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{18}
+ return file_proto_gar_proto_rawDescGZIP(), []int{20}
}
func (x *RemoteAgentConfig) GetAddress() string {
@@ -1280,23 +1440,22 @@ func (x *RemoteAgentConfig) GetAddress() string {
// RegisterAgentRequest for registering an agent
type RegisterAgentRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- 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
- Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- // Types that are assignable to Config:
+ 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
+ Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ // Types that are valid to be assigned to Config:
//
// *RegisterAgentRequest_Remote
- Config isRegisterAgentRequest_Config `protobuf_oneof:"config"`
+ Config isRegisterAgentRequest_Config `protobuf_oneof:"config"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *RegisterAgentRequest) Reset() {
*x = RegisterAgentRequest{}
- mi := &file_proto_gar_proto_msgTypes[19]
+ mi := &file_proto_gar_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1308,7 +1467,7 @@ func (x *RegisterAgentRequest) String() string {
func (*RegisterAgentRequest) ProtoMessage() {}
func (x *RegisterAgentRequest) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[19]
+ mi := &file_proto_gar_proto_msgTypes[21]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1321,7 +1480,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{19}
+ return file_proto_gar_proto_rawDescGZIP(), []int{21}
}
func (x *RegisterAgentRequest) GetAgentId() string {
@@ -1352,16 +1511,18 @@ func (x *RegisterAgentRequest) GetMetadata() map[string]string {
return nil
}
-func (m *RegisterAgentRequest) GetConfig() isRegisterAgentRequest_Config {
- if m != nil {
- return m.Config
+func (x *RegisterAgentRequest) GetConfig() isRegisterAgentRequest_Config {
+ if x != nil {
+ return x.Config
}
return nil
}
func (x *RegisterAgentRequest) GetRemote() *RemoteAgentConfig {
- if x, ok := x.GetConfig().(*RegisterAgentRequest_Remote); ok {
- return x.Remote
+ if x != nil {
+ if x, ok := x.Config.(*RegisterAgentRequest_Remote); ok {
+ return x.Remote
+ }
}
return nil
}
@@ -1378,14 +1539,14 @@ func (*RegisterAgentRequest_Remote) isRegisterAgentRequest_Config() {}
// 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[20]
+ mi := &file_proto_gar_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1397,7 +1558,7 @@ func (x *RegisterAgentResponse) String() string {
func (*RegisterAgentResponse) ProtoMessage() {}
func (x *RegisterAgentResponse) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[20]
+ mi := &file_proto_gar_proto_msgTypes[22]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1410,21 +1571,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{20}
+ return file_proto_gar_proto_rawDescGZIP(), []int{22}
}
// 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[21]
+ mi := &file_proto_gar_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1436,7 +1596,7 @@ func (x *UnregisterAgentRequest) String() string {
func (*UnregisterAgentRequest) ProtoMessage() {}
func (x *UnregisterAgentRequest) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[21]
+ mi := &file_proto_gar_proto_msgTypes[23]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1449,7 +1609,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{21}
+ return file_proto_gar_proto_rawDescGZIP(), []int{23}
}
func (x *UnregisterAgentRequest) GetAgentId() string {
@@ -1461,14 +1621,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[22]
+ mi := &file_proto_gar_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1480,7 +1640,7 @@ func (x *UnregisterAgentResponse) String() string {
func (*UnregisterAgentResponse) ProtoMessage() {}
func (x *UnregisterAgentResponse) ProtoReflect() protoreflect.Message {
- mi := &file_proto_gar_proto_msgTypes[22]
+ mi := &file_proto_gar_proto_msgTypes[24]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1493,242 +1653,144 @@ func (x *UnregisterAgentResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use UnregisterAgentResponse.ProtoReflect.Descriptor instead.
func (*UnregisterAgentResponse) Descriptor() ([]byte, []int) {
- return file_proto_gar_proto_rawDescGZIP(), []int{22}
+ return file_proto_gar_proto_rawDescGZIP(), []int{24}
}
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, 0x2e, 0x0a, 0x10, 0x41,
- 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12,
- 0x1a, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x08, 0x52, 0x08, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x3b, 0x0a, 0x0f, 0x44,
- 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a,
- 0x0a, 0x08, 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
- 0x52, 0x08, 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x64, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03,
- 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0xca, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
- 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
- 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x08,
- 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x44,
- 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x61, 0x70, 0x70, 0x72, 0x6f,
- 0x76, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x06,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x63,
- 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x07,
- 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73,
- 0x69, 0x6f, 0x6e, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52,
- 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa7, 0x01, 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, 0x40, 0x0a, 0x0c, 0x63,
- 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1a, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72,
- 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52,
- 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x5e, 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, 0x26, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65,
- 0x6e, 0x74, 0x52, 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, 0x8e, 0x01, 0x0a, 0x12, 0x46, 0x6f, 0x72, 0x6b,
- 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24,
- 0x0a, 0x0e, 0x73, 0x72, 0x63, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x72, 0x63, 0x53, 0x65, 0x73, 0x73, 0x69,
- 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x72, 0x63, 0x5f, 0x63, 0x68, 0x65, 0x63,
- 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x0f, 0x73, 0x72, 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x64,
- 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
- 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x74, 0x53,
- 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3b, 0x0a, 0x13, 0x46, 0x6f, 0x72, 0x6b,
- 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
- 0x24, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69,
- 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x53, 0x65, 0x73, 0x73,
- 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41,
- 0x67, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64,
- 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64,
- 0x72, 0x65, 0x73, 0x73, 0x22, 0xa9, 0x02, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
- 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a,
- 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b,
- 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45,
- 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
- 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65,
- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x18,
- 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65,
- 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48,
- 0x00, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
- 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e,
- 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x0a, 0x16, 0x55, 0x6e, 0x72,
- 0x65, 0x67, 0x69, 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, 0xc1, 0x02, 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, 0x44, 0x0a, 0x0b, 0x46, 0x6f, 0x72, 0x6b,
- 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
- 0x46, 0x6f, 0x72, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x53,
- 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a,
- 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12,
- 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
- 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65,
- 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x55, 0x6e,
- 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x2e,
- 0x70, 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\x1a\x1cgoogle/protobuf/struct.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\".\n" +
+ "\x10ApprovalDecision\x12\x1a\n" +
+ "\bapproved\x18\x01 \x01(\bR\bapproved\";\n" +
+ "\x0fDeclineDecision\x12\x1a\n" +
+ "\bdeclined\x18\x01 \x01(\bR\bdeclinedJ\x04\b\x02\x10\x03R\x06reason\"\xca\x01\n" +
+ "\x13ConfirmationContent\x12\x0e\n" +
+ "\x02id\x18\x03 \x01(\tR\x02id\x12\x1a\n" +
+ "\bquestion\x18\x04 \x01(\tR\bquestion\x125\n" +
+ "\bapproval\x18\x05 \x01(\v2\x17.proto.ApprovalDecisionH\x00R\bapproval\x122\n" +
+ "\adecline\x18\x06 \x01(\v2\x16.proto.DeclineDecisionH\x00R\adeclineB\n" +
+ "\n" +
+ "\bdecisionJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03R\x04type\"\x93\x01\n" +
+ "\x13FunctionCallContent\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12+\n" +
+ "\x04args\x18\x02 \x01(\v2\x17.google.protobuf.StructR\x04args\x12\x0e\n" +
+ "\x02id\x18\x03 \x01(\tR\x02id\x12+\n" +
+ "\x11thought_signature\x18\x04 \x01(\fR\x10thoughtSignature\"r\n" +
+ "\x17FunctionResponseContent\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x123\n" +
+ "\bresponse\x18\x02 \x01(\v2\x17.google.protobuf.StructR\bresponse\x12\x0e\n" +
+ "\x02id\x18\x03 \x01(\tR\x02id\"\xb9\x02\n" +
+ "\aContent\x12(\n" +
+ "\x04text\x18\n" +
+ " \x01(\v2\x12.proto.TextContentH\x00R\x04text\x12@\n" +
+ "\fconfirmation\x18\x1a \x01(\v2\x1a.proto.ConfirmationContentH\x00R\fconfirmation\x12A\n" +
+ "\rfunction_call\x18\x1b \x01(\v2\x1a.proto.FunctionCallContentH\x00R\ffunctionCall\x12M\n" +
+ "\x11function_response\x18\x1c \x01(\v2\x1e.proto.FunctionResponseContentH\x00R\x10functionResponse\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\"^\n" +
+ "\x15TriggerSessionRequest\x12\x1d\n" +
+ "\n" +
+ "session_id\x18\x01 \x01(\tR\tsessionId\x12&\n" +
+ "\x06inputs\x18\x02 \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\"\x8e\x01\n" +
+ "\x12ForkSessionRequest\x12$\n" +
+ "\x0esrc_session_id\x18\x01 \x01(\tR\fsrcSessionId\x12*\n" +
+ "\x11src_checkpoint_id\x18\x02 \x01(\tR\x0fsrcCheckpointId\x12&\n" +
+ "\x0fdest_session_id\x18\x03 \x01(\tR\rdestSessionId\";\n" +
+ "\x13ForkSessionResponse\x12$\n" +
+ "\x0enew_session_id\x18\x01 \x01(\tR\fnewSessionId\"-\n" +
+ "\x11RemoteAgentConfig\x12\x18\n" +
+ "\aaddress\x18\x01 \x01(\tR\aaddress\"\xa9\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\x12E\n" +
+ "\bmetadata\x18\x04 \x03(\v2).proto.RegisterAgentRequest.MetadataEntryR\bmetadata\x122\n" +
+ "\x06remote\x18\x05 \x01(\v2\x18.proto.RemoteAgentConfigH\x00R\x06remote\x1a;\n" +
+ "\rMetadataEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
+ "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\b\n" +
+ "\x06config\"\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\xc1\x02\n" +
+ "\n" +
+ "GARService\x12O\n" +
+ "\x0eTriggerSession\x12\x1c.proto.TriggerSessionRequest\x1a\x1d.proto.TriggerSessionResponse0\x01\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, 24)
+var file_proto_gar_proto_msgTypes = make([]protoimpl.MessageInfo, 26)
var file_proto_gar_proto_goTypes = []any{
(State)(0), // 0: proto.State
(*ProcessRequest)(nil), // 1: proto.ProcessRequest
@@ -1737,65 +1799,72 @@ var file_proto_gar_proto_goTypes = []any{
(*ApprovalDecision)(nil), // 4: proto.ApprovalDecision
(*DeclineDecision)(nil), // 5: proto.DeclineDecision
(*ConfirmationContent)(nil), // 6: proto.ConfirmationContent
- (*Content)(nil), // 7: proto.Content
- (*SessionStateEvent)(nil), // 8: proto.SessionStateEvent
- (*AgentCallEvent)(nil), // 9: proto.AgentCallEvent
- (*HandoffEvent)(nil), // 10: proto.HandoffEvent
- (*ContentEvent)(nil), // 11: proto.ContentEvent
- (*Event)(nil), // 12: proto.Event
- (*HealthCheckRequest)(nil), // 13: proto.HealthCheckRequest
- (*HealthCheckResponse)(nil), // 14: proto.HealthCheckResponse
- (*TriggerSessionRequest)(nil), // 15: proto.TriggerSessionRequest
- (*TriggerSessionResponse)(nil), // 16: proto.TriggerSessionResponse
- (*ForkSessionRequest)(nil), // 17: proto.ForkSessionRequest
- (*ForkSessionResponse)(nil), // 18: proto.ForkSessionResponse
- (*RemoteAgentConfig)(nil), // 19: proto.RemoteAgentConfig
- (*RegisterAgentRequest)(nil), // 20: proto.RegisterAgentRequest
- (*RegisterAgentResponse)(nil), // 21: proto.RegisterAgentResponse
- (*UnregisterAgentRequest)(nil), // 22: proto.UnregisterAgentRequest
- (*UnregisterAgentResponse)(nil), // 23: proto.UnregisterAgentResponse
- nil, // 24: proto.RegisterAgentRequest.MetadataEntry
- (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp
+ (*FunctionCallContent)(nil), // 7: proto.FunctionCallContent
+ (*FunctionResponseContent)(nil), // 8: proto.FunctionResponseContent
+ (*Content)(nil), // 9: proto.Content
+ (*SessionStateEvent)(nil), // 10: proto.SessionStateEvent
+ (*AgentCallEvent)(nil), // 11: proto.AgentCallEvent
+ (*HandoffEvent)(nil), // 12: proto.HandoffEvent
+ (*ContentEvent)(nil), // 13: proto.ContentEvent
+ (*Event)(nil), // 14: proto.Event
+ (*HealthCheckRequest)(nil), // 15: proto.HealthCheckRequest
+ (*HealthCheckResponse)(nil), // 16: proto.HealthCheckResponse
+ (*TriggerSessionRequest)(nil), // 17: proto.TriggerSessionRequest
+ (*TriggerSessionResponse)(nil), // 18: proto.TriggerSessionResponse
+ (*ForkSessionRequest)(nil), // 19: proto.ForkSessionRequest
+ (*ForkSessionResponse)(nil), // 20: proto.ForkSessionResponse
+ (*RemoteAgentConfig)(nil), // 21: proto.RemoteAgentConfig
+ (*RegisterAgentRequest)(nil), // 22: proto.RegisterAgentRequest
+ (*RegisterAgentResponse)(nil), // 23: proto.RegisterAgentResponse
+ (*UnregisterAgentRequest)(nil), // 24: proto.UnregisterAgentRequest
+ (*UnregisterAgentResponse)(nil), // 25: proto.UnregisterAgentResponse
+ nil, // 26: proto.RegisterAgentRequest.MetadataEntry
+ (*structpb.Struct)(nil), // 27: google.protobuf.Struct
+ (*timestamppb.Timestamp)(nil), // 28: google.protobuf.Timestamp
}
var file_proto_gar_proto_depIdxs = []int32{
- 7, // 0: proto.ProcessRequest.contents:type_name -> proto.Content
- 7, // 1: proto.ProcessResponse.contents:type_name -> proto.Content
+ 9, // 0: proto.ProcessRequest.contents:type_name -> proto.Content
+ 9, // 1: proto.ProcessResponse.contents:type_name -> proto.Content
4, // 2: proto.ConfirmationContent.approval:type_name -> proto.ApprovalDecision
5, // 3: proto.ConfirmationContent.decline:type_name -> proto.DeclineDecision
- 3, // 4: proto.Content.text:type_name -> proto.TextContent
- 6, // 5: proto.Content.confirmation:type_name -> proto.ConfirmationContent
- 0, // 6: proto.SessionStateEvent.state:type_name -> proto.State
- 7, // 7: proto.AgentCallEvent.contents:type_name -> proto.Content
- 7, // 8: proto.HandoffEvent.contents:type_name -> proto.Content
- 7, // 9: proto.ContentEvent.contents:type_name -> proto.Content
- 25, // 10: proto.Event.timestamp:type_name -> google.protobuf.Timestamp
- 25, // 11: proto.Event.controller_timestamp:type_name -> google.protobuf.Timestamp
- 8, // 12: proto.Event.session_state_event:type_name -> proto.SessionStateEvent
- 9, // 13: proto.Event.agent_call_event:type_name -> proto.AgentCallEvent
- 10, // 14: proto.Event.handoff_event:type_name -> proto.HandoffEvent
- 11, // 15: proto.Event.content_event:type_name -> proto.ContentEvent
- 7, // 16: proto.TriggerSessionRequest.inputs:type_name -> proto.Content
- 7, // 17: proto.TriggerSessionResponse.outputs:type_name -> proto.Content
- 0, // 18: proto.TriggerSessionResponse.state:type_name -> proto.State
- 24, // 19: proto.RegisterAgentRequest.metadata:type_name -> proto.RegisterAgentRequest.MetadataEntry
- 19, // 20: proto.RegisterAgentRequest.remote:type_name -> proto.RemoteAgentConfig
- 1, // 21: proto.AgentService.Process:input_type -> proto.ProcessRequest
- 13, // 22: proto.AgentService.HealthCheck:input_type -> proto.HealthCheckRequest
- 15, // 23: proto.GARService.TriggerSession:input_type -> proto.TriggerSessionRequest
- 17, // 24: proto.GARService.ForkSession:input_type -> proto.ForkSessionRequest
- 20, // 25: proto.GARService.RegisterAgent:input_type -> proto.RegisterAgentRequest
- 22, // 26: proto.GARService.UnregisterAgent:input_type -> proto.UnregisterAgentRequest
- 2, // 27: proto.AgentService.Process:output_type -> proto.ProcessResponse
- 14, // 28: proto.AgentService.HealthCheck:output_type -> proto.HealthCheckResponse
- 16, // 29: proto.GARService.TriggerSession:output_type -> proto.TriggerSessionResponse
- 18, // 30: proto.GARService.ForkSession:output_type -> proto.ForkSessionResponse
- 21, // 31: proto.GARService.RegisterAgent:output_type -> proto.RegisterAgentResponse
- 23, // 32: proto.GARService.UnregisterAgent:output_type -> proto.UnregisterAgentResponse
- 27, // [27:33] is the sub-list for method output_type
- 21, // [21:27] 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
+ 27, // 4: proto.FunctionCallContent.args:type_name -> google.protobuf.Struct
+ 27, // 5: proto.FunctionResponseContent.response:type_name -> google.protobuf.Struct
+ 3, // 6: proto.Content.text:type_name -> proto.TextContent
+ 6, // 7: proto.Content.confirmation:type_name -> proto.ConfirmationContent
+ 7, // 8: proto.Content.function_call:type_name -> proto.FunctionCallContent
+ 8, // 9: proto.Content.function_response:type_name -> proto.FunctionResponseContent
+ 0, // 10: proto.SessionStateEvent.state:type_name -> proto.State
+ 9, // 11: proto.AgentCallEvent.contents:type_name -> proto.Content
+ 9, // 12: proto.HandoffEvent.contents:type_name -> proto.Content
+ 9, // 13: proto.ContentEvent.contents:type_name -> proto.Content
+ 28, // 14: proto.Event.timestamp:type_name -> google.protobuf.Timestamp
+ 28, // 15: proto.Event.controller_timestamp:type_name -> google.protobuf.Timestamp
+ 10, // 16: proto.Event.session_state_event:type_name -> proto.SessionStateEvent
+ 11, // 17: proto.Event.agent_call_event:type_name -> proto.AgentCallEvent
+ 12, // 18: proto.Event.handoff_event:type_name -> proto.HandoffEvent
+ 13, // 19: proto.Event.content_event:type_name -> proto.ContentEvent
+ 9, // 20: proto.TriggerSessionRequest.inputs:type_name -> proto.Content
+ 9, // 21: proto.TriggerSessionResponse.outputs:type_name -> proto.Content
+ 0, // 22: proto.TriggerSessionResponse.state:type_name -> proto.State
+ 26, // 23: proto.RegisterAgentRequest.metadata:type_name -> proto.RegisterAgentRequest.MetadataEntry
+ 21, // 24: proto.RegisterAgentRequest.remote:type_name -> proto.RemoteAgentConfig
+ 1, // 25: proto.AgentService.Process:input_type -> proto.ProcessRequest
+ 15, // 26: proto.AgentService.HealthCheck:input_type -> proto.HealthCheckRequest
+ 17, // 27: proto.GARService.TriggerSession:input_type -> proto.TriggerSessionRequest
+ 19, // 28: proto.GARService.ForkSession:input_type -> proto.ForkSessionRequest
+ 22, // 29: proto.GARService.RegisterAgent:input_type -> proto.RegisterAgentRequest
+ 24, // 30: proto.GARService.UnregisterAgent:input_type -> proto.UnregisterAgentRequest
+ 2, // 31: proto.AgentService.Process:output_type -> proto.ProcessResponse
+ 16, // 32: proto.AgentService.HealthCheck:output_type -> proto.HealthCheckResponse
+ 18, // 33: proto.GARService.TriggerSession:output_type -> proto.TriggerSessionResponse
+ 20, // 34: proto.GARService.ForkSession:output_type -> proto.ForkSessionResponse
+ 23, // 35: proto.GARService.RegisterAgent:output_type -> proto.RegisterAgentResponse
+ 25, // 36: proto.GARService.UnregisterAgent:output_type -> proto.UnregisterAgentResponse
+ 31, // [31:37] is the sub-list for method output_type
+ 25, // [25:31] is the sub-list for method input_type
+ 25, // [25:25] is the sub-list for extension type_name
+ 25, // [25:25] is the sub-list for extension extendee
+ 0, // [0:25] is the sub-list for field type_name
}
func init() { file_proto_gar_proto_init() }
@@ -1807,26 +1876,28 @@ func file_proto_gar_proto_init() {
(*ConfirmationContent_Approval)(nil),
(*ConfirmationContent_Decline)(nil),
}
- file_proto_gar_proto_msgTypes[6].OneofWrappers = []any{
+ file_proto_gar_proto_msgTypes[8].OneofWrappers = []any{
(*Content_Text)(nil),
(*Content_Confirmation)(nil),
+ (*Content_FunctionCall)(nil),
+ (*Content_FunctionResponse)(nil),
}
- file_proto_gar_proto_msgTypes[11].OneofWrappers = []any{
+ file_proto_gar_proto_msgTypes[13].OneofWrappers = []any{
(*Event_SessionStateEvent)(nil),
(*Event_AgentCallEvent)(nil),
(*Event_HandoffEvent)(nil),
(*Event_ContentEvent)(nil),
}
- file_proto_gar_proto_msgTypes[19].OneofWrappers = []any{
+ file_proto_gar_proto_msgTypes[21].OneofWrappers = []any{
(*RegisterAgentRequest_Remote)(nil),
}
type x struct{}
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: 24,
+ NumMessages: 26,
NumExtensions: 0,
NumServices: 2,
},
@@ -1836,7 +1907,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 17db6bc..0ab5264 100644
--- a/proto/gar.proto
+++ b/proto/gar.proto
@@ -17,6 +17,7 @@ syntax = "proto3";
package proto;
import "google/protobuf/timestamp.proto";
+import "google/protobuf/struct.proto";
option go_package = "github.com/google/gar/proto";
@@ -73,6 +74,19 @@ message ConfirmationContent {
}
}
+message FunctionCallContent {
+ string name = 1;
+ google.protobuf.Struct args = 2;
+ string id = 3;
+ bytes thought_signature = 4;
+}
+
+message FunctionResponseContent {
+ string name = 1;
+ google.protobuf.Struct response = 2;
+ string id = 3;
+}
+
// Content represents a message with role, type, mimetype, and data fields
message Content {
@@ -81,6 +95,8 @@ message Content {
oneof content {
TextContent text = 10;
ConfirmationContent confirmation = 26;
+ FunctionCallContent function_call = 27;
+ FunctionResponseContent function_response = 28;
}
string role = 1000; // The role of the content (e.g., "user", "assistant", "system")
diff --git a/proto/gar_grpc.pb.go b/proto/gar_grpc.pb.go
index 2ef8ed7..9fc7b7c 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.
@@ -282,16 +282,16 @@ 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) ForkSession(context.Context, *ForkSessionRequest) (*ForkSessionResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ForkSession not implemented")
+ 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() {}
@@ -304,7 +304,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.