admin

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentRouteView added in v0.5.0

type AgentRouteView struct {
	agentroute.AgentRouteConfig
	Source   string `json:"source"`
	ReadOnly bool   `json:"read_only"`
}

func (AgentRouteView) MarshalJSON added in v0.5.0

func (v AgentRouteView) MarshalJSON() ([]byte, error)

func (*AgentRouteView) UnmarshalJSON added in v0.5.0

func (v *AgentRouteView) UnmarshalJSON(data []byte) error

type AgentView added in v0.4.0

type AgentView struct {
	agentpkg.Agent
	Source        string                       `json:"source"`
	RuntimeStatus *agentruntime.RuntimeSummary `json:"runtime_status,omitempty"`
	Capabilities  *agentruntime.Capabilities   `json:"capabilities,omitempty"`
}

type AgentWorkspace added in v0.4.0

type AgentWorkspace struct {
	Agent          agentpkg.Agent               `json:"agent"`
	RuntimeType    string                       `json:"runtime_type"`
	Runtime        *agentruntime.RuntimeSummary `json:"runtime,omitempty"`
	RuntimeDetails json.RawMessage              `json:"runtime_details,omitempty"`
	Capabilities   *agentruntime.Capabilities   `json:"capabilities,omitempty"`
	AgentRoutes    []agentRouteRef              `json:"agent_routes,omitempty"`
	Builtin        *BuiltinWorkspaceView        `json:"builtin,omitempty"`
	RuntimeView    *agentRuntimeSummary         `json:"runtime_view,omitempty"`
	Links          map[string]string            `json:"links,omitempty"`
}

AgentWorkspace is the summary/index read model for the agent detail page. It returns summaries, counts, runtime state, and references — never full session transcripts. The frontend drills into the linked ACP endpoints for content.

type BuiltinDefinitionSummary added in v0.5.0

type BuiltinDefinitionSummary struct {
	LLMRouteID           string   `json:"llm_route_id"`
	Model                string   `json:"model,omitempty"`
	TopologyKind         string   `json:"topology_kind"`
	ToolServiceIDs       []string `json:"tool_service_ids,omitempty"`
	MaxConcurrentTurns   int      `json:"max_concurrent_turns,omitempty"`
	TurnTimeoutSeconds   int      `json:"turn_timeout_seconds,omitempty"`
	SummarizationEnabled bool     `json:"summarization_enabled"`
}

BuiltinDefinitionSummary condenses the persisted builtin definition. Limits report configured values only; zero means the host default applies.

type BuiltinWorkspaceView added in v0.5.0

type BuiltinWorkspaceView struct {
	Definition BuiltinDefinitionSummary `json:"definition"`
	HostState  builtinpkg.EntryState    `json:"host_state"`
}

BuiltinWorkspaceView is the builtin-runtime slice of the agent workspace: a condensed definition summary, the ADK host materialization state, and the agent's builtin routes.

type CredentialView

type CredentialView struct {
	credential.ManagedCredential
	ReadOnly bool `json:"read_only"`
}

type GatewaySessionView added in v0.1.0

type GatewaySessionView struct {
	ID                string                   `json:"id"`
	ServiceID         string                   `json:"service_id"`
	UpstreamSessionID string                   `json:"upstream_session_id,omitempty"`
	Transport         mcpservice.TransportType `json:"transport"`
	State             mcpservice.SessionState  `json:"state"`
	CreatedAt         time.Time                `json:"created_at"`
	LastUsedAt        time.Time                `json:"last_used_at"`
}

GatewaySessionView is the Admin API representation of a GatewaySession. The upstream_session_id field is masked to hide transport-internal identifiers.

type Handler

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

Handler handles Admin API requests under /admin/.

func NewHandler

func NewHandler(agentGateway *gateway.AgentGateway, logger *zap.Logger) *Handler

NewHandler constructs an admin Handler. logger may be nil (a no-op logger is used in that case).

func (*Handler) Routes

func (h *Handler) Routes() []Route

Routes returns all admin API routes.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP dispatches admin API requests, including CORS preflight handling.

type LLMApiHandlerTypeView

type LLMApiHandlerTypeView struct {
	LLMApiHandlerType string `json:"llm_api_handler_type"`
}

type LLMRouteView added in v0.1.0

type LLMRouteView struct {
	ID           string                       `json:"id"`
	Kind         llmroutepkg.RouteKind        `json:"kind,omitempty"`
	Protocol     llmroutepkg.RouteProtocol    `json:"protocol,omitempty"`
	Description  string                       `json:"description,omitempty"`
	Disabled     bool                         `json:"disabled"`
	MatchPolicy  llmroutepkg.RouteMatchPolicy `json:"match_policy"`
	TargetPolicy json.RawMessage              `json:"target_policy"`
	AuthPolicy   llmroutepkg.RouteAuthPolicy  `json:"auth_policy"`
	CreatedAt    time.Time                    `json:"created_at"`
	UpdatedAt    time.Time                    `json:"updated_at"`
	Source       string                       `json:"source"`
	ReadOnly     bool                         `json:"read_only"`
}

func (LLMRouteView) LLMRouteConfig added in v0.1.0

func (v LLMRouteView) LLMRouteConfig() (llmroutepkg.LLMRouteConfig, error)

type MCPDispatcherRuntimeView added in v0.1.0

type MCPDispatcherRuntimeView struct {
	InFlight []mcpruntime.InFlightRequest      `json:"in_flight"`
	Progress []mcpruntime.ProgressNotification `json:"progress"`
}

type MCPPromptGetRequest added in v0.1.0

type MCPPromptGetRequest struct {
	Name      string         `json:"name"`
	Arguments map[string]any `json:"arguments,omitempty"`
}

type MCPResourceReadRequest added in v0.1.0

type MCPResourceReadRequest struct {
	URI string `json:"uri"`
}

type MCPRouteView added in v0.1.0

type MCPRouteView struct {
	mcproute.MCPRouteConfig
	Source   string `json:"source"`
	ReadOnly bool   `json:"read_only"`
}

func (MCPRouteView) MarshalJSON added in v0.3.0

func (v MCPRouteView) MarshalJSON() ([]byte, error)

MarshalJSON merges the view fields into the embedded config JSON. Without this the embedded MCPRouteConfig.MarshalJSON is promoted and silently drops source and read_only from admin responses.

func (*MCPRouteView) UnmarshalJSON added in v0.3.0

func (v *MCPRouteView) UnmarshalJSON(data []byte) error

type MCPServiceView added in v0.1.0

type MCPServiceView struct {
	mcpservice.MCPServiceConfig
	Source   string `json:"source"`
	ReadOnly bool   `json:"read_only"`
}

type MCPToolCallRequest added in v0.1.0

type MCPToolCallRequest struct {
	Name      string         `json:"name"`
	Arguments map[string]any `json:"arguments,omitempty"`
}

type ManagedConcreteModelView

type ManagedConcreteModelView struct {
	modelcatalog.ManagedModel
	ProviderType  string                      `json:"provider_type,omitempty"`
	DisplayName   string                      `json:"display_name,omitempty"`
	Description   string                      `json:"description,omitempty"`
	Capabilities  provider.ModelCapabilities  `json:"capabilities,omitempty"`
	SnapshotState modelcatalog.SnapshotStatus `json:"snapshot_status,omitempty"`
	FetchedAt     time.Time                   `json:"fetched_at,omitempty"`
	LastError     string                      `json:"last_error,omitempty"`
}

type ProviderTypeView

type ProviderTypeView struct {
	ProviderType string `json:"provider_type"`
	Enabled      bool   `json:"enabled"`
}

type ProviderView

type ProviderView struct {
	provider.ProviderConfig
	Source   string `json:"source"`
	ReadOnly bool   `json:"read_only"`
}

type Route

type Route struct {
	Method  string
	Path    string
	Handler http.HandlerFunc
}

Route defines an admin API route.

type VirtualKeyView

type VirtualKeyView struct {
	virtualkeypkg.VirtualKey
	Source   string `json:"source"`
	ReadOnly bool   `json:"read_only"`
}

Jump to

Keyboard shortcuts

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