agentv1

package
v1.0.0-alpha.51 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentRuntime_Chat_FullMethodName         = "/openotters.agent.v1.AgentRuntime/Chat"
	AgentRuntime_ChatStream_FullMethodName   = "/openotters.agent.v1.AgentRuntime/ChatStream"
	AgentRuntime_PromptObject_FullMethodName = "/openotters.agent.v1.AgentRuntime/PromptObject"
	AgentRuntime_Health_FullMethodName       = "/openotters.agent.v1.AgentRuntime/Health"
	AgentRuntime_Ready_FullMethodName        = "/openotters.agent.v1.AgentRuntime/Ready"
)

Variables

View Source
var AgentRuntime_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "openotters.agent.v1.AgentRuntime",
	HandlerType: (*AgentRuntimeServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Chat",
			Handler:    _AgentRuntime_Chat_Handler,
		},
		{
			MethodName: "PromptObject",
			Handler:    _AgentRuntime_PromptObject_Handler,
		},
		{
			MethodName: "Health",
			Handler:    _AgentRuntime_Health_Handler,
		},
		{
			MethodName: "Ready",
			Handler:    _AgentRuntime_Ready_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ChatStream",
			Handler:       _AgentRuntime_ChatStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "agent.proto",
}

AgentRuntime_ServiceDesc is the grpc.ServiceDesc for AgentRuntime service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_agent_proto protoreflect.FileDescriptor

Functions

func RegisterAgentRuntimeServer

func RegisterAgentRuntimeServer(s grpc.ServiceRegistrar, srv AgentRuntimeServer)

Types

type AgentRuntimeClient

type AgentRuntimeClient interface {
	// Chat
	Chat(ctx context.Context, in *ChatRequest, opts ...grpc.CallOption) (*ChatResponse, error)
	ChatStream(ctx context.Context, in *ChatStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ChatStreamEvent], error)
	// Structured output — one-shot, stateless. The runtime hands a
	// user prompt + JSON schema to the underlying LanguageModel via
	// fantasy.GenerateObject; the schema drives whichever native
	// JSON / tool / text mode the provider supports. No session
	// memory, no tool loop.
	PromptObject(ctx context.Context, in *PromptObjectRequest, opts ...grpc.CallOption) (*PromptObjectResponse, error)
	// Probes
	Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error)
	Ready(ctx context.Context, in *ReadyRequest, opts ...grpc.CallOption) (*ReadyResponse, error)
}

AgentRuntimeClient is the client API for AgentRuntime service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type AgentRuntimeServer

type AgentRuntimeServer interface {
	// Chat
	Chat(context.Context, *ChatRequest) (*ChatResponse, error)
	ChatStream(*ChatStreamRequest, grpc.ServerStreamingServer[ChatStreamEvent]) error
	// Structured output — one-shot, stateless. The runtime hands a
	// user prompt + JSON schema to the underlying LanguageModel via
	// fantasy.GenerateObject; the schema drives whichever native
	// JSON / tool / text mode the provider supports. No session
	// memory, no tool loop.
	PromptObject(context.Context, *PromptObjectRequest) (*PromptObjectResponse, error)
	// Probes
	Health(context.Context, *HealthRequest) (*HealthResponse, error)
	Ready(context.Context, *ReadyRequest) (*ReadyResponse, error)
	// contains filtered or unexported methods
}

AgentRuntimeServer is the server API for AgentRuntime service. All implementations must embed UnimplementedAgentRuntimeServer for forward compatibility.

type AgentRuntime_ChatStreamClient

type AgentRuntime_ChatStreamClient = grpc.ServerStreamingClient[ChatStreamEvent]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type AgentRuntime_ChatStreamServer

type AgentRuntime_ChatStreamServer = grpc.ServerStreamingServer[ChatStreamEvent]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ChatRequest

type ChatRequest struct {
	SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	Prompt    string `protobuf:"bytes,2,opt,name=prompt,proto3" json:"prompt,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatRequest) Descriptor deprecated

func (*ChatRequest) Descriptor() ([]byte, []int)

Deprecated: Use ChatRequest.ProtoReflect.Descriptor instead.

func (*ChatRequest) GetPrompt

func (x *ChatRequest) GetPrompt() string

func (*ChatRequest) GetSessionId

func (x *ChatRequest) GetSessionId() string

func (*ChatRequest) ProtoMessage

func (*ChatRequest) ProtoMessage()

func (*ChatRequest) ProtoReflect

func (x *ChatRequest) ProtoReflect() protoreflect.Message

func (*ChatRequest) Reset

func (x *ChatRequest) Reset()

func (*ChatRequest) String

func (x *ChatRequest) String() string

type ChatResponse

type ChatResponse struct {
	Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatResponse) Descriptor deprecated

func (*ChatResponse) Descriptor() ([]byte, []int)

Deprecated: Use ChatResponse.ProtoReflect.Descriptor instead.

func (*ChatResponse) GetResponse

func (x *ChatResponse) GetResponse() string

func (*ChatResponse) ProtoMessage

func (*ChatResponse) ProtoMessage()

func (*ChatResponse) ProtoReflect

func (x *ChatResponse) ProtoReflect() protoreflect.Message

func (*ChatResponse) Reset

func (x *ChatResponse) Reset()

func (*ChatResponse) String

func (x *ChatResponse) String() string

type ChatStreamEvent

type ChatStreamEvent struct {
	Type    string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Step    int32  `protobuf:"varint,2,opt,name=step,proto3" json:"step,omitempty"`
	Tool    string `protobuf:"bytes,3,opt,name=tool,proto3" json:"tool,omitempty"`
	Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
	// tool_id correlates tool.call and tool.result events for the
	// same invocation. Stable for the lifetime of one tool call.
	ToolId string `protobuf:"bytes,5,opt,name=tool_id,json=toolId,proto3" json:"tool_id,omitempty"`
	// duration_ms is the wall-clock time the tool spent executing.
	// Populated on tool.result events (and on step.finish where it
	// covers the whole step). Zero on other event types.
	DurationMs int64 `protobuf:"varint,6,opt,name=duration_ms,json=durationMs,proto3" json:"duration_ms,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatStreamEvent) Descriptor deprecated

func (*ChatStreamEvent) Descriptor() ([]byte, []int)

Deprecated: Use ChatStreamEvent.ProtoReflect.Descriptor instead.

func (*ChatStreamEvent) GetContent

func (x *ChatStreamEvent) GetContent() string

func (*ChatStreamEvent) GetDurationMs

func (x *ChatStreamEvent) GetDurationMs() int64

func (*ChatStreamEvent) GetStep

func (x *ChatStreamEvent) GetStep() int32

func (*ChatStreamEvent) GetTool

func (x *ChatStreamEvent) GetTool() string

func (*ChatStreamEvent) GetToolId

func (x *ChatStreamEvent) GetToolId() string

func (*ChatStreamEvent) GetType

func (x *ChatStreamEvent) GetType() string

func (*ChatStreamEvent) ProtoMessage

func (*ChatStreamEvent) ProtoMessage()

func (*ChatStreamEvent) ProtoReflect

func (x *ChatStreamEvent) ProtoReflect() protoreflect.Message

func (*ChatStreamEvent) Reset

func (x *ChatStreamEvent) Reset()

func (*ChatStreamEvent) String

func (x *ChatStreamEvent) String() string

type ChatStreamRequest

type ChatStreamRequest struct {
	SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	Prompt    string `protobuf:"bytes,2,opt,name=prompt,proto3" json:"prompt,omitempty"`
	// When true, the runtime appends the produced parts as a new
	// branch onto the most recent assistant turn for session_id
	// instead of inserting a fresh row. Falls back to insert when
	// no prior assistant turn exists.
	Regenerate bool `protobuf:"varint,3,opt,name=regenerate,proto3" json:"regenerate,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatStreamRequest) Descriptor deprecated

func (*ChatStreamRequest) Descriptor() ([]byte, []int)

Deprecated: Use ChatStreamRequest.ProtoReflect.Descriptor instead.

func (*ChatStreamRequest) GetPrompt

func (x *ChatStreamRequest) GetPrompt() string

func (*ChatStreamRequest) GetRegenerate

func (x *ChatStreamRequest) GetRegenerate() bool

func (*ChatStreamRequest) GetSessionId

func (x *ChatStreamRequest) GetSessionId() string

func (*ChatStreamRequest) ProtoMessage

func (*ChatStreamRequest) ProtoMessage()

func (*ChatStreamRequest) ProtoReflect

func (x *ChatStreamRequest) ProtoReflect() protoreflect.Message

func (*ChatStreamRequest) Reset

func (x *ChatStreamRequest) Reset()

func (*ChatStreamRequest) String

func (x *ChatStreamRequest) String() string

type HealthRequest

type HealthRequest struct {
	// contains filtered or unexported fields
}

func (*HealthRequest) Descriptor deprecated

func (*HealthRequest) Descriptor() ([]byte, []int)

Deprecated: Use HealthRequest.ProtoReflect.Descriptor instead.

func (*HealthRequest) ProtoMessage

func (*HealthRequest) ProtoMessage()

func (*HealthRequest) ProtoReflect

func (x *HealthRequest) ProtoReflect() protoreflect.Message

func (*HealthRequest) Reset

func (x *HealthRequest) Reset()

func (*HealthRequest) String

func (x *HealthRequest) String() string

type HealthResponse

type HealthResponse struct {
	Status    string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	AgentName string `protobuf:"bytes,2,opt,name=agent_name,json=agentName,proto3" json:"agent_name,omitempty"`
	Model     string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthResponse) Descriptor deprecated

func (*HealthResponse) Descriptor() ([]byte, []int)

Deprecated: Use HealthResponse.ProtoReflect.Descriptor instead.

func (*HealthResponse) GetAgentName

func (x *HealthResponse) GetAgentName() string

func (*HealthResponse) GetModel

func (x *HealthResponse) GetModel() string

func (*HealthResponse) GetStatus

func (x *HealthResponse) GetStatus() string

func (*HealthResponse) ProtoMessage

func (*HealthResponse) ProtoMessage()

func (*HealthResponse) ProtoReflect

func (x *HealthResponse) ProtoReflect() protoreflect.Message

func (*HealthResponse) Reset

func (x *HealthResponse) Reset()

func (*HealthResponse) String

func (x *HealthResponse) String() string

type PromptObjectRequest

type PromptObjectRequest struct {

	// Plain-text user prompt (single turn; stateless).
	Prompt string `protobuf:"bytes,1,opt,name=prompt,proto3" json:"prompt,omitempty"`
	// Raw JSON Schema bytes. Unmarshalled into fantasy/schema.Schema
	// server-side; the common subset (type, properties, required,
	// items, enum, format, min/max) is supported.
	SchemaJson []byte `protobuf:"bytes,2,opt,name=schema_json,json=schemaJson,proto3" json:"schema_json,omitempty"`
	// Optional — surfaces in tool-mode providers as the synthetic
	// tool's name / description. Ignored otherwise.
	SchemaName string `protobuf:"bytes,3,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"`
	SchemaDesc string `protobuf:"bytes,4,opt,name=schema_desc,json=schemaDesc,proto3" json:"schema_desc,omitempty"`
	// contains filtered or unexported fields
}

func (*PromptObjectRequest) Descriptor deprecated

func (*PromptObjectRequest) Descriptor() ([]byte, []int)

Deprecated: Use PromptObjectRequest.ProtoReflect.Descriptor instead.

func (*PromptObjectRequest) GetPrompt

func (x *PromptObjectRequest) GetPrompt() string

func (*PromptObjectRequest) GetSchemaDesc

func (x *PromptObjectRequest) GetSchemaDesc() string

func (*PromptObjectRequest) GetSchemaJson

func (x *PromptObjectRequest) GetSchemaJson() []byte

func (*PromptObjectRequest) GetSchemaName

func (x *PromptObjectRequest) GetSchemaName() string

func (*PromptObjectRequest) ProtoMessage

func (*PromptObjectRequest) ProtoMessage()

func (*PromptObjectRequest) ProtoReflect

func (x *PromptObjectRequest) ProtoReflect() protoreflect.Message

func (*PromptObjectRequest) Reset

func (x *PromptObjectRequest) Reset()

func (*PromptObjectRequest) String

func (x *PromptObjectRequest) String() string

type PromptObjectResponse

type PromptObjectResponse struct {

	// Marshalled structured object (valid JSON bytes).
	ObjectJson []byte `protobuf:"bytes,1,opt,name=object_json,json=objectJson,proto3" json:"object_json,omitempty"`
	// The raw assistant text, mostly useful when the model returned
	// repaired or otherwise interesting content alongside the parse.
	RawText string `protobuf:"bytes,2,opt,name=raw_text,json=rawText,proto3" json:"raw_text,omitempty"`
	// contains filtered or unexported fields
}

func (*PromptObjectResponse) Descriptor deprecated

func (*PromptObjectResponse) Descriptor() ([]byte, []int)

Deprecated: Use PromptObjectResponse.ProtoReflect.Descriptor instead.

func (*PromptObjectResponse) GetObjectJson

func (x *PromptObjectResponse) GetObjectJson() []byte

func (*PromptObjectResponse) GetRawText

func (x *PromptObjectResponse) GetRawText() string

func (*PromptObjectResponse) ProtoMessage

func (*PromptObjectResponse) ProtoMessage()

func (*PromptObjectResponse) ProtoReflect

func (x *PromptObjectResponse) ProtoReflect() protoreflect.Message

func (*PromptObjectResponse) Reset

func (x *PromptObjectResponse) Reset()

func (*PromptObjectResponse) String

func (x *PromptObjectResponse) String() string

type ReadyRequest

type ReadyRequest struct {
	// contains filtered or unexported fields
}

func (*ReadyRequest) Descriptor deprecated

func (*ReadyRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReadyRequest.ProtoReflect.Descriptor instead.

func (*ReadyRequest) ProtoMessage

func (*ReadyRequest) ProtoMessage()

func (*ReadyRequest) ProtoReflect

func (x *ReadyRequest) ProtoReflect() protoreflect.Message

func (*ReadyRequest) Reset

func (x *ReadyRequest) Reset()

func (*ReadyRequest) String

func (x *ReadyRequest) String() string

type ReadyResponse

type ReadyResponse struct {
	Ready bool `protobuf:"varint,1,opt,name=ready,proto3" json:"ready,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadyResponse) Descriptor deprecated

func (*ReadyResponse) Descriptor() ([]byte, []int)

Deprecated: Use ReadyResponse.ProtoReflect.Descriptor instead.

func (*ReadyResponse) GetReady

func (x *ReadyResponse) GetReady() bool

func (*ReadyResponse) ProtoMessage

func (*ReadyResponse) ProtoMessage()

func (*ReadyResponse) ProtoReflect

func (x *ReadyResponse) ProtoReflect() protoreflect.Message

func (*ReadyResponse) Reset

func (x *ReadyResponse) Reset()

func (*ReadyResponse) String

func (x *ReadyResponse) String() string

type UnimplementedAgentRuntimeServer

type UnimplementedAgentRuntimeServer struct{}

UnimplementedAgentRuntimeServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedAgentRuntimeServer) Chat

func (UnimplementedAgentRuntimeServer) ChatStream

func (UnimplementedAgentRuntimeServer) Health

func (UnimplementedAgentRuntimeServer) PromptObject

func (UnimplementedAgentRuntimeServer) Ready

type UnsafeAgentRuntimeServer

type UnsafeAgentRuntimeServer interface {
	// contains filtered or unexported methods
}

UnsafeAgentRuntimeServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgentRuntimeServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL