agentapi

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package agentapi serves the provider-neutral Agent Operations V1 HTTP API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthFailureFunc

type AuthFailureFunc func()

AuthFailureFunc records a redacted authentication failure.

type AuthenticateFunc

type AuthenticateFunc func(string) (string, error)

AuthenticateFunc resolves one bearer header to a provider client identity.

type CancelFunc

type CancelFunc func(context.Context, string, string) (agentv1.Operation, error)

CancelFunc performs provider cleanup while canceling requester-owned work.

type Error

type Error struct {
	Status  int
	Code    string
	Message string
}

Error is a provider-safe stable Agent V1 HTTP failure.

func (*Error) Error

func (e *Error) Error() string

type Handler

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

Handler implements the generated Agent V1 Echo interface.

func New

func New(options Options) (*Handler, error)

New validates and constructs an Agent V1 HTTP handler.

func (*Handler) CancelAgentOperation

func (h *Handler) CancelAgentOperation(c echo.Context, id agentwire.OperationID) error

func (*Handler) DiscoverAgent

func (h *Handler) DiscoverAgent(c echo.Context) error

func (*Handler) GetAgentOperation

func (h *Handler) GetAgentOperation(c echo.Context, id agentwire.OperationID) error

func (*Handler) Register

func (h *Handler) Register(router *echo.Echo)

Register installs only the generated Agent V1 routes on router.

func (*Handler) SubmitAgentOperation

func (h *Handler) SubmitAgentOperation(c echo.Context) error

func (*Handler) WaitForAgentOperation

func (h *Handler) WaitForAgentOperation(c echo.Context, id agentwire.OperationID, params agentwire.WaitForAgentOperationParams) error

type Options

type Options struct {
	Store        Store
	Authenticate AuthenticateFunc
	Submit       SubmitFunc
	Cancel       CancelFunc
	AuthFailure  AuthFailureFunc
	Realm        string
}

Options configures the shared Agent V1 server boundary.

type Store

type Store interface {
	Get(clientID, id string) (agentv1.Operation, error)
	Wait(context.Context, string, string, int64) (agentv1.Operation, error)
	Cancel(clientID, id string) (agentv1.Operation, error)
}

Store is the durable operation lifecycle required by the HTTP boundary.

type SubmitFunc

SubmitFunc validates, classifies, and starts one provider operation.

Jump to

Keyboard shortcuts

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