internal

package
v1.0.0-alpha.23 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGRPCServer

func NewGRPCServer(
	svc *agent.Service,
	notesStore *notes.Store, notesMaxBytes, notesMaxCount int,
	agentName, model string,
) runtimev1.AgentRuntimeServer

NewGRPCServer constructs the runtime's gRPC server. notesStore / maxBytes / maxCount are optional: when nil/0 the Notes RPCs reply with codes.Unavailable so a dev invocation of the runtime binary without a notes store doesn't silently accept writes.

Types

type GRPCServer

type GRPCServer struct {
	runtimev1.UnimplementedAgentRuntimeServer
	// contains filtered or unexported fields
}

func (*GRPCServer) Chat

func (*GRPCServer) ChatStream

func (*GRPCServer) DeleteNote

func (*GRPCServer) DeleteSession

func (*GRPCServer) GetNote

func (*GRPCServer) Health

func (*GRPCServer) ListNotes

func (*GRPCServer) ListSessions

func (*GRPCServer) PromptObject

func (*GRPCServer) Ready

Ready is the daemon supervisor's readiness probe. The daemon hits this in a backoff loop after spawning the runtime subprocess; the first successful response flips the agent from Starting → Ready.

Two layers of "ready" stack here:

  • Reachability: until the gRPC listener has bound and accepted the dial, the daemon's probe gets Unavailable / connection- refused and retries. So just answering this RPC at all already means "process up, gRPC alive, accepting traffic."
  • Service: svc != nil means the agent.Service was constructed — i.e. the model client is loaded, context files are read, the session store is open. The current runtime startup (serve.go) guarantees this before NewGRPCServer is called, so in practice this is always true once the server is up.

Returning {Ready: false} is reserved for a future world where the server starts before svc finishes loading (e.g. lazy model init). We keep the field so the daemon can keep probing without a wire change when that lands.

func (*GRPCServer) SaveNote

func (*GRPCServer) SetNoteInContext

Jump to

Keyboard shortcuts

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