server

package
v0.1.0-rc2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: Apache-2.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func A2A

func A2A(ctx context.Context, p *pipeline.Pipeline, addr string) error

A2A serves the pipeline's root agent as an A2A JSON-RPC service over HTTP. Publishes an AgentCard at /.well-known/agent.json and dispatches JSON-RPC requests at /. Sessions are kept in-memory.

func MCPHTTP

func MCPHTTP(ctx context.Context, p *pipeline.Pipeline, addr string, requireSampling bool) error

MCPHTTP exposes the pipeline's root agent as an MCP server over streamable HTTP. Same tool surface as MCPStdio; supports multiple concurrent clients and is addressable by URL. When the pipeline declares any borrowed model the connecting client must advertise the `sampling` capability.

func MCPStdio

func MCPStdio(ctx context.Context, p *pipeline.Pipeline, requireSampling bool) error

MCPStdio exposes the pipeline's root agent as an MCP tool over stdin/stdout. Each tool invocation drives one agent turn and returns the final text. When the pipeline declares any borrowed model, the connecting client must advertise the `sampling` capability; completions for those models round-trip back via sampling/createMessage.

func RunOnce

func RunOnce(ctx context.Context, p *pipeline.Pipeline, verbose bool) (string, error)

RunOnce builds a runner, sends a single trigger to the pipeline, and returns the final output. Used by transport=none for fire-and-forget agents (bots, cron jobs, event handlers).

func Stdio

func Stdio(ctx context.Context, p *pipeline.Pipeline, once string, verbose bool) error

Stdio runs the pipeline interactively over stdin/stdout: a minimal line REPL for dev and CI. When once is non-empty, it sends that single prompt, prints the reply, and exits. Rich UX lives in smithy-cli's chat TUI; this is the bare scripting/dev entry point.

Types

type SessionMessage

type SessionMessage struct {
	Role      string    `json:"role"` // "user" | "assistant"
	Text      string    `json:"text"`
	Timestamp time.Time `json:"timestamp,omitempty"`
}

SessionMessage is one visible chat turn returned by GET /sessions/{id}/messages. Tool calls and function responses are dropped; only user input and assistant text replies are kept.

Jump to

Keyboard shortcuts

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