1000 lines
35 KiB
Go
1000 lines
35 KiB
Go
// Package agent is the Agent Orchestration bounded context: the agentic
|
|
// run loop (prompt -> vLLM -> tool calls -> final reply), the chat-run
|
|
// quota/concurrency guard, and the in-flight/just-finished run registry
|
|
// that used to live in internal/handlers/chat.go's StreamManager.
|
|
//
|
|
// This is a saga coordinator, not a data owner: it holds no SQL table of
|
|
// its own. It calls billing (usage quota), conversation (persisting
|
|
// turns) and knowledge (the search_codebase tool) over gRPC, and
|
|
// workspace (every filesystem/bash tool) over gRPC, exactly replacing
|
|
// internal/llm/agent.go + internal/llm/tools.go's direct, in-process
|
|
// calls into internal/db and the local filesystem.
|
|
//
|
|
// Rendering (Markdown, syntax highlighting, deliverable cards) stays out
|
|
// of this service on purpose — see internal/render's doc comment in the
|
|
// gateway service — so this API deals in plain text and structured tool
|
|
// results, never HTML.
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.34.2
|
|
// protoc v3.21.12
|
|
// source: agent/v1/agent.proto
|
|
|
|
package agentv1
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
type StartTurnOutcome int32
|
|
|
|
const (
|
|
StartTurnOutcome_START_TURN_OUTCOME_UNSPECIFIED StartTurnOutcome = 0
|
|
StartTurnOutcome_START_TURN_OUTCOME_OK StartTurnOutcome = 1
|
|
StartTurnOutcome_START_TURN_OUTCOME_CONVERSATION_NOT_FOUND StartTurnOutcome = 2
|
|
StartTurnOutcome_START_TURN_OUTCOME_CONVERSATION_BUSY StartTurnOutcome = 3
|
|
StartTurnOutcome_START_TURN_OUTCOME_TOO_MANY_STREAMS StartTurnOutcome = 4
|
|
StartTurnOutcome_START_TURN_OUTCOME_RATE_LIMITED StartTurnOutcome = 5
|
|
StartTurnOutcome_START_TURN_OUTCOME_QUOTA_EXCEEDED StartTurnOutcome = 6
|
|
StartTurnOutcome_START_TURN_OUTCOME_INTERNAL_ERROR StartTurnOutcome = 7
|
|
)
|
|
|
|
// Enum value maps for StartTurnOutcome.
|
|
var (
|
|
StartTurnOutcome_name = map[int32]string{
|
|
0: "START_TURN_OUTCOME_UNSPECIFIED",
|
|
1: "START_TURN_OUTCOME_OK",
|
|
2: "START_TURN_OUTCOME_CONVERSATION_NOT_FOUND",
|
|
3: "START_TURN_OUTCOME_CONVERSATION_BUSY",
|
|
4: "START_TURN_OUTCOME_TOO_MANY_STREAMS",
|
|
5: "START_TURN_OUTCOME_RATE_LIMITED",
|
|
6: "START_TURN_OUTCOME_QUOTA_EXCEEDED",
|
|
7: "START_TURN_OUTCOME_INTERNAL_ERROR",
|
|
}
|
|
StartTurnOutcome_value = map[string]int32{
|
|
"START_TURN_OUTCOME_UNSPECIFIED": 0,
|
|
"START_TURN_OUTCOME_OK": 1,
|
|
"START_TURN_OUTCOME_CONVERSATION_NOT_FOUND": 2,
|
|
"START_TURN_OUTCOME_CONVERSATION_BUSY": 3,
|
|
"START_TURN_OUTCOME_TOO_MANY_STREAMS": 4,
|
|
"START_TURN_OUTCOME_RATE_LIMITED": 5,
|
|
"START_TURN_OUTCOME_QUOTA_EXCEEDED": 6,
|
|
"START_TURN_OUTCOME_INTERNAL_ERROR": 7,
|
|
}
|
|
)
|
|
|
|
func (x StartTurnOutcome) Enum() *StartTurnOutcome {
|
|
p := new(StartTurnOutcome)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x StartTurnOutcome) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (StartTurnOutcome) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_agent_v1_agent_proto_enumTypes[0].Descriptor()
|
|
}
|
|
|
|
func (StartTurnOutcome) Type() protoreflect.EnumType {
|
|
return &file_agent_v1_agent_proto_enumTypes[0]
|
|
}
|
|
|
|
func (x StartTurnOutcome) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use StartTurnOutcome.Descriptor instead.
|
|
func (StartTurnOutcome) EnumDescriptor() ([]byte, []int) {
|
|
return file_agent_v1_agent_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
type StartTurnRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
ConversationId int64 `protobuf:"varint,2,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"`
|
|
Prompt string `protobuf:"bytes,3,opt,name=prompt,proto3" json:"prompt,omitempty"`
|
|
}
|
|
|
|
func (x *StartTurnRequest) Reset() {
|
|
*x = StartTurnRequest{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *StartTurnRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*StartTurnRequest) ProtoMessage() {}
|
|
|
|
func (x *StartTurnRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[0]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use StartTurnRequest.ProtoReflect.Descriptor instead.
|
|
func (*StartTurnRequest) Descriptor() ([]byte, []int) {
|
|
return file_agent_v1_agent_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *StartTurnRequest) GetUserId() int64 {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *StartTurnRequest) GetConversationId() int64 {
|
|
if x != nil {
|
|
return x.ConversationId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *StartTurnRequest) GetPrompt() string {
|
|
if x != nil {
|
|
return x.Prompt
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type StartTurnResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Outcome StartTurnOutcome `protobuf:"varint,1,opt,name=outcome,proto3,enum=enkly.agent.v1.StartTurnOutcome" json:"outcome,omitempty"`
|
|
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // user-facing text for any non-OK outcome
|
|
StreamId string `protobuf:"bytes,3,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"` // set when outcome == OK
|
|
}
|
|
|
|
func (x *StartTurnResponse) Reset() {
|
|
*x = StartTurnResponse{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *StartTurnResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*StartTurnResponse) ProtoMessage() {}
|
|
|
|
func (x *StartTurnResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[1]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use StartTurnResponse.ProtoReflect.Descriptor instead.
|
|
func (*StartTurnResponse) Descriptor() ([]byte, []int) {
|
|
return file_agent_v1_agent_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *StartTurnResponse) GetOutcome() StartTurnOutcome {
|
|
if x != nil {
|
|
return x.Outcome
|
|
}
|
|
return StartTurnOutcome_START_TURN_OUTCOME_UNSPECIFIED
|
|
}
|
|
|
|
func (x *StartTurnResponse) GetMessage() string {
|
|
if x != nil {
|
|
return x.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *StartTurnResponse) GetStreamId() string {
|
|
if x != nil {
|
|
return x.StreamId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type StreamTurnRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
StreamId string `protobuf:"bytes,2,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
|
|
ResumeFromToolIndex int32 `protobuf:"varint,3,opt,name=resume_from_tool_index,json=resumeFromToolIndex,proto3" json:"resume_from_tool_index,omitempty"`
|
|
}
|
|
|
|
func (x *StreamTurnRequest) Reset() {
|
|
*x = StreamTurnRequest{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *StreamTurnRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*StreamTurnRequest) ProtoMessage() {}
|
|
|
|
func (x *StreamTurnRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[2]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use StreamTurnRequest.ProtoReflect.Descriptor instead.
|
|
func (*StreamTurnRequest) Descriptor() ([]byte, []int) {
|
|
return file_agent_v1_agent_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *StreamTurnRequest) GetUserId() int64 {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *StreamTurnRequest) GetStreamId() string {
|
|
if x != nil {
|
|
return x.StreamId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *StreamTurnRequest) GetResumeFromToolIndex() int32 {
|
|
if x != nil {
|
|
return x.ResumeFromToolIndex
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ToolCall struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
ArgumentsJson string `protobuf:"bytes,2,opt,name=arguments_json,json=argumentsJson,proto3" json:"arguments_json,omitempty"`
|
|
Result string `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
|
|
IsError bool `protobuf:"varint,4,opt,name=is_error,json=isError,proto3" json:"is_error,omitempty"`
|
|
}
|
|
|
|
func (x *ToolCall) Reset() {
|
|
*x = ToolCall{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *ToolCall) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ToolCall) ProtoMessage() {}
|
|
|
|
func (x *ToolCall) ProtoReflect() protoreflect.Message {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[3]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ToolCall.ProtoReflect.Descriptor instead.
|
|
func (*ToolCall) Descriptor() ([]byte, []int) {
|
|
return file_agent_v1_agent_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *ToolCall) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ToolCall) GetArgumentsJson() string {
|
|
if x != nil {
|
|
return x.ArgumentsJson
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ToolCall) GetResult() string {
|
|
if x != nil {
|
|
return x.Result
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ToolCall) GetIsError() bool {
|
|
if x != nil {
|
|
return x.IsError
|
|
}
|
|
return false
|
|
}
|
|
|
|
// ThinkingRound is one agent round's own reasoning trace, standalone
|
|
// rather than folded into the running total thinking_delta carries —
|
|
// the same per-step granularity Claude's interleaved thinking exposes
|
|
// (one distinct thinking block per tool-use step) rather than one
|
|
// cumulative blob for the whole turn. round is 0-indexed and matches
|
|
// the round the agent service's internal run loop was on when this
|
|
// trace was produced; a client can use it to render reasoning as
|
|
// discrete, collapsible steps next to the tool call each one preceded,
|
|
// instead of a single growing "thinking" pane.
|
|
type ThinkingRound struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"`
|
|
Thinking string `protobuf:"bytes,2,opt,name=thinking,proto3" json:"thinking,omitempty"`
|
|
}
|
|
|
|
func (x *ThinkingRound) Reset() {
|
|
*x = ThinkingRound{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *ThinkingRound) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ThinkingRound) ProtoMessage() {}
|
|
|
|
func (x *ThinkingRound) ProtoReflect() protoreflect.Message {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[4]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ThinkingRound.ProtoReflect.Descriptor instead.
|
|
func (*ThinkingRound) Descriptor() ([]byte, []int) {
|
|
return file_agent_v1_agent_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *ThinkingRound) GetRound() int32 {
|
|
if x != nil {
|
|
return x.Round
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ThinkingRound) GetThinking() string {
|
|
if x != nil {
|
|
return x.Thinking
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type TurnEvent struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
// Types that are assignable to Event:
|
|
//
|
|
// *TurnEvent_ThinkingDelta
|
|
// *TurnEvent_TokenDelta
|
|
// *TurnEvent_ToolCall
|
|
// *TurnEvent_Done
|
|
// *TurnEvent_ThinkingRound
|
|
Event isTurnEvent_Event `protobuf_oneof:"event"`
|
|
}
|
|
|
|
func (x *TurnEvent) Reset() {
|
|
*x = TurnEvent{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *TurnEvent) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*TurnEvent) ProtoMessage() {}
|
|
|
|
func (x *TurnEvent) ProtoReflect() protoreflect.Message {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[5]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use TurnEvent.ProtoReflect.Descriptor instead.
|
|
func (*TurnEvent) Descriptor() ([]byte, []int) {
|
|
return file_agent_v1_agent_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (m *TurnEvent) GetEvent() isTurnEvent_Event {
|
|
if m != nil {
|
|
return m.Event
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *TurnEvent) GetThinkingDelta() string {
|
|
if x, ok := x.GetEvent().(*TurnEvent_ThinkingDelta); ok {
|
|
return x.ThinkingDelta
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TurnEvent) GetTokenDelta() string {
|
|
if x, ok := x.GetEvent().(*TurnEvent_TokenDelta); ok {
|
|
return x.TokenDelta
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TurnEvent) GetToolCall() *ToolCall {
|
|
if x, ok := x.GetEvent().(*TurnEvent_ToolCall); ok {
|
|
return x.ToolCall
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *TurnEvent) GetDone() *TurnDone {
|
|
if x, ok := x.GetEvent().(*TurnEvent_Done); ok {
|
|
return x.Done
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *TurnEvent) GetThinkingRound() *ThinkingRound {
|
|
if x, ok := x.GetEvent().(*TurnEvent_ThinkingRound); ok {
|
|
return x.ThinkingRound
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type isTurnEvent_Event interface {
|
|
isTurnEvent_Event()
|
|
}
|
|
|
|
type TurnEvent_ThinkingDelta struct {
|
|
ThinkingDelta string `protobuf:"bytes,1,opt,name=thinking_delta,json=thinkingDelta,proto3,oneof"` // cumulative reasoning text so far, plain
|
|
}
|
|
|
|
type TurnEvent_TokenDelta struct {
|
|
TokenDelta string `protobuf:"bytes,2,opt,name=token_delta,json=tokenDelta,proto3,oneof"` // cumulative reply text so far, plain
|
|
}
|
|
|
|
type TurnEvent_ToolCall struct {
|
|
ToolCall *ToolCall `protobuf:"bytes,3,opt,name=tool_call,json=toolCall,proto3,oneof"` // one completed tool call
|
|
}
|
|
|
|
type TurnEvent_Done struct {
|
|
Done *TurnDone `protobuf:"bytes,4,opt,name=done,proto3,oneof"`
|
|
}
|
|
|
|
type TurnEvent_ThinkingRound struct {
|
|
ThinkingRound *ThinkingRound `protobuf:"bytes,5,opt,name=thinking_round,json=thinkingRound,proto3,oneof"` // one round's own reasoning trace, standalone
|
|
}
|
|
|
|
func (*TurnEvent_ThinkingDelta) isTurnEvent_Event() {}
|
|
|
|
func (*TurnEvent_TokenDelta) isTurnEvent_Event() {}
|
|
|
|
func (*TurnEvent_ToolCall) isTurnEvent_Event() {}
|
|
|
|
func (*TurnEvent_Done) isTurnEvent_Event() {}
|
|
|
|
func (*TurnEvent_ThinkingRound) isTurnEvent_Event() {}
|
|
|
|
type TurnDone struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
FinalText string `protobuf:"bytes,1,opt,name=final_text,json=finalText,proto3" json:"final_text,omitempty"` // plain Markdown source, not yet rendered
|
|
// every tool call made during the turn, successful or not — the
|
|
// gateway uses this to build deliverable (download) cards exactly
|
|
// like internal/handlers/deliverables.go.attachDeliverables.
|
|
ToolCalls []*ToolCall `protobuf:"bytes,2,rep,name=tool_calls,json=toolCalls,proto3" json:"tool_calls,omitempty"`
|
|
}
|
|
|
|
func (x *TurnDone) Reset() {
|
|
*x = TurnDone{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *TurnDone) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*TurnDone) ProtoMessage() {}
|
|
|
|
func (x *TurnDone) ProtoReflect() protoreflect.Message {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[6]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use TurnDone.ProtoReflect.Descriptor instead.
|
|
func (*TurnDone) Descriptor() ([]byte, []int) {
|
|
return file_agent_v1_agent_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *TurnDone) GetFinalText() string {
|
|
if x != nil {
|
|
return x.FinalText
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TurnDone) GetToolCalls() []*ToolCall {
|
|
if x != nil {
|
|
return x.ToolCalls
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type StopTurnRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
StreamId string `protobuf:"bytes,2,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
|
|
}
|
|
|
|
func (x *StopTurnRequest) Reset() {
|
|
*x = StopTurnRequest{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[7]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *StopTurnRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*StopTurnRequest) ProtoMessage() {}
|
|
|
|
func (x *StopTurnRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[7]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use StopTurnRequest.ProtoReflect.Descriptor instead.
|
|
func (*StopTurnRequest) Descriptor() ([]byte, []int) {
|
|
return file_agent_v1_agent_proto_rawDescGZIP(), []int{7}
|
|
}
|
|
|
|
func (x *StopTurnRequest) GetUserId() int64 {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *StopTurnRequest) GetStreamId() string {
|
|
if x != nil {
|
|
return x.StreamId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type StopTurnResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
}
|
|
|
|
func (x *StopTurnResponse) Reset() {
|
|
*x = StopTurnResponse{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[8]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *StopTurnResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*StopTurnResponse) ProtoMessage() {}
|
|
|
|
func (x *StopTurnResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_agent_v1_agent_proto_msgTypes[8]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use StopTurnResponse.ProtoReflect.Descriptor instead.
|
|
func (*StopTurnResponse) Descriptor() ([]byte, []int) {
|
|
return file_agent_v1_agent_proto_rawDescGZIP(), []int{8}
|
|
}
|
|
|
|
var File_agent_v1_agent_proto protoreflect.FileDescriptor
|
|
|
|
var file_agent_v1_agent_proto_rawDesc = []byte{
|
|
0x0a, 0x14, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74,
|
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x65, 0x6e, 0x6b, 0x6c, 0x79, 0x2e, 0x61, 0x67,
|
|
0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x22, 0x6c, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54,
|
|
0x75, 0x72, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73,
|
|
0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65,
|
|
0x72, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
|
0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f,
|
|
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06,
|
|
0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72,
|
|
0x6f, 0x6d, 0x70, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x75,
|
|
0x72, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x6f, 0x75,
|
|
0x74, 0x63, 0x6f, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x65, 0x6e,
|
|
0x6b, 0x6c, 0x79, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61,
|
|
0x72, 0x74, 0x54, 0x75, 0x72, 0x6e, 0x4f, 0x75, 0x74, 0x63, 0x6f, 0x6d, 0x65, 0x52, 0x07, 0x6f,
|
|
0x75, 0x74, 0x63, 0x6f, 0x6d, 0x65, 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,
|
|
0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20,
|
|
0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x22, 0x7e, 0x0a,
|
|
0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
|
0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
|
|
0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73,
|
|
0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
|
0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x75,
|
|
0x6d, 0x65, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x74, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x6e, 0x64,
|
|
0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65,
|
|
0x46, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x78, 0x0a,
|
|
0x08, 0x54, 0x6f, 0x6f, 0x6c, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
|
|
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a,
|
|
0x0e, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18,
|
|
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73,
|
|
0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03,
|
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x08,
|
|
0x69, 0x73, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,
|
|
0x69, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x41, 0x0a, 0x0d, 0x54, 0x68, 0x69, 0x6e, 0x6b,
|
|
0x69, 0x6e, 0x67, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e,
|
|
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1a,
|
|
0x0a, 0x08, 0x74, 0x68, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
|
0x52, 0x08, 0x74, 0x68, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x91, 0x02, 0x0a, 0x09, 0x54,
|
|
0x75, 0x72, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0e, 0x74, 0x68, 0x69, 0x6e,
|
|
0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
|
0x48, 0x00, 0x52, 0x0d, 0x74, 0x68, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x74,
|
|
0x61, 0x12, 0x21, 0x0a, 0x0b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61,
|
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x44,
|
|
0x65, 0x6c, 0x74, 0x61, 0x12, 0x37, 0x0a, 0x09, 0x74, 0x6f, 0x6f, 0x6c, 0x5f, 0x63, 0x61, 0x6c,
|
|
0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x65, 0x6e, 0x6b, 0x6c, 0x79, 0x2e,
|
|
0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6f, 0x6c, 0x43, 0x61, 0x6c,
|
|
0x6c, 0x48, 0x00, 0x52, 0x08, 0x74, 0x6f, 0x6f, 0x6c, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x2e, 0x0a,
|
|
0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x65, 0x6e,
|
|
0x6b, 0x6c, 0x79, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x72,
|
|
0x6e, 0x44, 0x6f, 0x6e, 0x65, 0x48, 0x00, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x12, 0x46, 0x0a,
|
|
0x0e, 0x74, 0x68, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18,
|
|
0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x6b, 0x6c, 0x79, 0x2e, 0x61, 0x67,
|
|
0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x52,
|
|
0x6f, 0x75, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x68, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67,
|
|
0x52, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x62,
|
|
0x0a, 0x08, 0x54, 0x75, 0x72, 0x6e, 0x44, 0x6f, 0x6e, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69,
|
|
0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
|
0x66, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x65, 0x78, 0x74, 0x12, 0x37, 0x0a, 0x0a, 0x74, 0x6f, 0x6f,
|
|
0x6c, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e,
|
|
0x65, 0x6e, 0x6b, 0x6c, 0x79, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54,
|
|
0x6f, 0x6f, 0x6c, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x09, 0x74, 0x6f, 0x6f, 0x6c, 0x43, 0x61, 0x6c,
|
|
0x6c, 0x73, 0x22, 0x47, 0x0a, 0x0f, 0x53, 0x74, 0x6f, 0x70, 0x54, 0x75, 0x72, 0x6e, 0x52, 0x65,
|
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64,
|
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1b,
|
|
0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
|
0x09, 0x52, 0x08, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x22, 0x12, 0x0a, 0x10, 0x53,
|
|
0x74, 0x6f, 0x70, 0x54, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a,
|
|
0xc6, 0x02, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x75, 0x72, 0x6e, 0x4f, 0x75, 0x74,
|
|
0x63, 0x6f, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x54, 0x55,
|
|
0x52, 0x4e, 0x5f, 0x4f, 0x55, 0x54, 0x43, 0x4f, 0x4d, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,
|
|
0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x54, 0x41, 0x52,
|
|
0x54, 0x5f, 0x54, 0x55, 0x52, 0x4e, 0x5f, 0x4f, 0x55, 0x54, 0x43, 0x4f, 0x4d, 0x45, 0x5f, 0x4f,
|
|
0x4b, 0x10, 0x01, 0x12, 0x2d, 0x0a, 0x29, 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x54, 0x55, 0x52,
|
|
0x4e, 0x5f, 0x4f, 0x55, 0x54, 0x43, 0x4f, 0x4d, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52,
|
|
0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44,
|
|
0x10, 0x02, 0x12, 0x28, 0x0a, 0x24, 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x54, 0x55, 0x52, 0x4e,
|
|
0x5f, 0x4f, 0x55, 0x54, 0x43, 0x4f, 0x4d, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53,
|
|
0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x53, 0x59, 0x10, 0x03, 0x12, 0x27, 0x0a, 0x23,
|
|
0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x54, 0x55, 0x52, 0x4e, 0x5f, 0x4f, 0x55, 0x54, 0x43, 0x4f,
|
|
0x4d, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x53, 0x54, 0x52, 0x45,
|
|
0x41, 0x4d, 0x53, 0x10, 0x04, 0x12, 0x23, 0x0a, 0x1f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x54,
|
|
0x55, 0x52, 0x4e, 0x5f, 0x4f, 0x55, 0x54, 0x43, 0x4f, 0x4d, 0x45, 0x5f, 0x52, 0x41, 0x54, 0x45,
|
|
0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x05, 0x12, 0x25, 0x0a, 0x21, 0x53, 0x54,
|
|
0x41, 0x52, 0x54, 0x5f, 0x54, 0x55, 0x52, 0x4e, 0x5f, 0x4f, 0x55, 0x54, 0x43, 0x4f, 0x4d, 0x45,
|
|
0x5f, 0x51, 0x55, 0x4f, 0x54, 0x41, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10,
|
|
0x06, 0x12, 0x25, 0x0a, 0x21, 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x54, 0x55, 0x52, 0x4e, 0x5f,
|
|
0x4f, 0x55, 0x54, 0x43, 0x4f, 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c,
|
|
0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x07, 0x32, 0xfd, 0x01, 0x0a, 0x0c, 0x41, 0x67, 0x65,
|
|
0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x50, 0x0a, 0x09, 0x53, 0x74, 0x61,
|
|
0x72, 0x74, 0x54, 0x75, 0x72, 0x6e, 0x12, 0x20, 0x2e, 0x65, 0x6e, 0x6b, 0x6c, 0x79, 0x2e, 0x61,
|
|
0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x75, 0x72,
|
|
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x6e, 0x6b, 0x6c, 0x79,
|
|
0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54,
|
|
0x75, 0x72, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0a, 0x53,
|
|
0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x75, 0x72, 0x6e, 0x12, 0x21, 0x2e, 0x65, 0x6e, 0x6b, 0x6c,
|
|
0x79, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61,
|
|
0x6d, 0x54, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x65,
|
|
0x6e, 0x6b, 0x6c, 0x79, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75,
|
|
0x72, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, 0x4d, 0x0a, 0x08, 0x53, 0x74, 0x6f,
|
|
0x70, 0x54, 0x75, 0x72, 0x6e, 0x12, 0x1f, 0x2e, 0x65, 0x6e, 0x6b, 0x6c, 0x79, 0x2e, 0x61, 0x67,
|
|
0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x54, 0x75, 0x72, 0x6e, 0x52,
|
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x65, 0x6e, 0x6b, 0x6c, 0x79, 0x2e, 0x61,
|
|
0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x54, 0x75, 0x72, 0x6e,
|
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x1c, 0x5a, 0x1a, 0x65, 0x6e, 0x6b, 0x6c,
|
|
0x79, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x61,
|
|
0x67, 0x65, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
}
|
|
|
|
var (
|
|
file_agent_v1_agent_proto_rawDescOnce sync.Once
|
|
file_agent_v1_agent_proto_rawDescData = file_agent_v1_agent_proto_rawDesc
|
|
)
|
|
|
|
func file_agent_v1_agent_proto_rawDescGZIP() []byte {
|
|
file_agent_v1_agent_proto_rawDescOnce.Do(func() {
|
|
file_agent_v1_agent_proto_rawDescData = protoimpl.X.CompressGZIP(file_agent_v1_agent_proto_rawDescData)
|
|
})
|
|
return file_agent_v1_agent_proto_rawDescData
|
|
}
|
|
|
|
var file_agent_v1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
|
var file_agent_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
|
var file_agent_v1_agent_proto_goTypes = []any{
|
|
(StartTurnOutcome)(0), // 0: enkly.agent.v1.StartTurnOutcome
|
|
(*StartTurnRequest)(nil), // 1: enkly.agent.v1.StartTurnRequest
|
|
(*StartTurnResponse)(nil), // 2: enkly.agent.v1.StartTurnResponse
|
|
(*StreamTurnRequest)(nil), // 3: enkly.agent.v1.StreamTurnRequest
|
|
(*ToolCall)(nil), // 4: enkly.agent.v1.ToolCall
|
|
(*ThinkingRound)(nil), // 5: enkly.agent.v1.ThinkingRound
|
|
(*TurnEvent)(nil), // 6: enkly.agent.v1.TurnEvent
|
|
(*TurnDone)(nil), // 7: enkly.agent.v1.TurnDone
|
|
(*StopTurnRequest)(nil), // 8: enkly.agent.v1.StopTurnRequest
|
|
(*StopTurnResponse)(nil), // 9: enkly.agent.v1.StopTurnResponse
|
|
}
|
|
var file_agent_v1_agent_proto_depIdxs = []int32{
|
|
0, // 0: enkly.agent.v1.StartTurnResponse.outcome:type_name -> enkly.agent.v1.StartTurnOutcome
|
|
4, // 1: enkly.agent.v1.TurnEvent.tool_call:type_name -> enkly.agent.v1.ToolCall
|
|
7, // 2: enkly.agent.v1.TurnEvent.done:type_name -> enkly.agent.v1.TurnDone
|
|
5, // 3: enkly.agent.v1.TurnEvent.thinking_round:type_name -> enkly.agent.v1.ThinkingRound
|
|
4, // 4: enkly.agent.v1.TurnDone.tool_calls:type_name -> enkly.agent.v1.ToolCall
|
|
1, // 5: enkly.agent.v1.AgentService.StartTurn:input_type -> enkly.agent.v1.StartTurnRequest
|
|
3, // 6: enkly.agent.v1.AgentService.StreamTurn:input_type -> enkly.agent.v1.StreamTurnRequest
|
|
8, // 7: enkly.agent.v1.AgentService.StopTurn:input_type -> enkly.agent.v1.StopTurnRequest
|
|
2, // 8: enkly.agent.v1.AgentService.StartTurn:output_type -> enkly.agent.v1.StartTurnResponse
|
|
6, // 9: enkly.agent.v1.AgentService.StreamTurn:output_type -> enkly.agent.v1.TurnEvent
|
|
9, // 10: enkly.agent.v1.AgentService.StopTurn:output_type -> enkly.agent.v1.StopTurnResponse
|
|
8, // [8:11] is the sub-list for method output_type
|
|
5, // [5:8] is the sub-list for method input_type
|
|
5, // [5:5] is the sub-list for extension type_name
|
|
5, // [5:5] is the sub-list for extension extendee
|
|
0, // [0:5] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_agent_v1_agent_proto_init() }
|
|
func file_agent_v1_agent_proto_init() {
|
|
if File_agent_v1_agent_proto != nil {
|
|
return
|
|
}
|
|
if !protoimpl.UnsafeEnabled {
|
|
file_agent_v1_agent_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
|
switch v := v.(*StartTurnRequest); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_agent_v1_agent_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
|
switch v := v.(*StartTurnResponse); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_agent_v1_agent_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
|
switch v := v.(*StreamTurnRequest); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_agent_v1_agent_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
|
switch v := v.(*ToolCall); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_agent_v1_agent_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
|
switch v := v.(*ThinkingRound); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_agent_v1_agent_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
|
switch v := v.(*TurnEvent); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_agent_v1_agent_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
|
switch v := v.(*TurnDone); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_agent_v1_agent_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
|
switch v := v.(*StopTurnRequest); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_agent_v1_agent_proto_msgTypes[8].Exporter = func(v any, i int) any {
|
|
switch v := v.(*StopTurnResponse); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
}
|
|
file_agent_v1_agent_proto_msgTypes[5].OneofWrappers = []any{
|
|
(*TurnEvent_ThinkingDelta)(nil),
|
|
(*TurnEvent_TokenDelta)(nil),
|
|
(*TurnEvent_ToolCall)(nil),
|
|
(*TurnEvent_Done)(nil),
|
|
(*TurnEvent_ThinkingRound)(nil),
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: file_agent_v1_agent_proto_rawDesc,
|
|
NumEnums: 1,
|
|
NumMessages: 9,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_agent_v1_agent_proto_goTypes,
|
|
DependencyIndexes: file_agent_v1_agent_proto_depIdxs,
|
|
EnumInfos: file_agent_v1_agent_proto_enumTypes,
|
|
MessageInfos: file_agent_v1_agent_proto_msgTypes,
|
|
}.Build()
|
|
File_agent_v1_agent_proto = out.File
|
|
file_agent_v1_agent_proto_rawDesc = nil
|
|
file_agent_v1_agent_proto_goTypes = nil
|
|
file_agent_v1_agent_proto_depIdxs = nil
|
|
}
|