Versions in this module Expand all Collapse all v0 v0.3.2 Nov 29, 2026 v0.3.1 Nov 28, 2026 Changes in this version + func Unsuccessful(format string, args ...any) error v0.3.0 Nov 28, 2026 Changes in this version + const ExitFailed + const ExitInternal + const ExitInterrupted + const ExitOK + const ExitTimeout + const ExitUsage + func AddRite(s *server.Server, r *Registry, o RiteOptions) + func CLI(ctx context.Context, r *Registry, args []string, o IO) int + func Fail(format string, args ...any) error + func IsFail(err error) bool + func MCPServer(r *Registry, impl *mcp.Implementation, o MCPOptions) *mcp.Server + func MustRegister[In, Out, Event any](r *Registry, t Tool[In, Out, Event]) + func Register[In, Out, Event any](r *Registry, t Tool[In, Out, Event]) error + type Annotations struct + Destructive bool + Idempotent bool + OpenWorld bool + ReadOnly bool + type Call struct + Adapter string + Principal string + Tool string + type Flag struct + Arg string + Default any + Help string + Name string + Repeat bool + Required bool + Short string + Type string + Unsigned bool + type Hooks struct + Admit func(ctx context.Context, c Call) error + Record func(ctx context.Context, c Call, o Outcome) + type IO struct + Color bool + Log *slog.Logger + Stderr io.Writer + Stdout io.Writer + type Info struct + Annotations Annotations + Description string + Event *Schema + Flags []Flag + Input *Schema + Name string + Output *Schema + Summary string + Usage string + type MCPOptions struct + Log *slog.Logger + Principal func(req *mcp.CallToolRequest) string + Server *mcp.ServerOptions + type None struct + type Outcome struct + Duration time.Duration + Err error + Status Status + type Registry struct + Hooks Hooks + func NewRegistry() *Registry + func (r *Registry) Run(ctx context.Context, c Call, words []string, o IO) int + func (r *Registry) Tools() []*Info + type Render struct + Color bool + type RiteOptions struct + Log *slog.Logger + type Schema = jsonschema.Schema + type Status string + const StatusFailed + const StatusInternal + const StatusInterrupted + const StatusOK + const StatusRefused + const StatusTimeout + type Text struct + Event func(w io.Writer, ev Event, o Render) error + Result func(w io.Writer, out Out, o Render) error + type Tool struct + Annotations Annotations + Description string + Name string + Run func(ctx context.Context, c Call, in In, emit func(Event)) (Out, error) + Schema func(in *Schema) + Summary string + Text Text[Out, Event] + Timeout time.Duration + type UsageError struct + Msg string + func (e *UsageError) Error() string