api

package
v1.0.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 22 Imported by: ? 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

View Source
const (
	ConfigDirEnv = "LANGQUAIL_CONFIG_DIR"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	ProjectID() string
	PromptRegistry() *prompt.Registry
	Workflow(string) (graph.Workflow, bool)
	Workflows() []graph.Workflow
	Snapshot(string) (graph.Snapshot, bool)
	Context(context.Context) context.Context
}

type EventFilter

type EventFilter struct {
	WorkflowID string
	SessionID  string
	RunID      string
	NodeID     string
}

type EventHub

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

func NewEventHub

func NewEventHub() *EventHub

func (*EventHub) Publish

func (h *EventHub) Publish(event trace.Event)

func (*EventHub) Subscribe

func (h *EventHub) Subscribe(filter EventFilter) *EventSubscription

type EventSubscription

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

func (*EventSubscription) Close

func (s *EventSubscription) Close()

func (*EventSubscription) Events

func (s *EventSubscription) Events() <-chan trace.Event

type ExecutableWorkflow

type ExecutableWorkflow interface {
	graph.Workflow
	InvokeJSON(context.Context, json.RawMessage, ...runtime.InvokeOption) (json.RawMessage, error)
	ResumeJSON(context.Context, ResumeJSONRequest) (json.RawMessage, error)
}

func Executable

func Executable[S any](stateGraph *graph.StateGraph[S], opts ...runtime.Option[S]) ExecutableWorkflow

type ResumeJSONRequest

type ResumeJSONRequest struct {
	Run          runtime.Run     `json:"run"`
	State        json.RawMessage `json:"state"`
	ResumeNode   string          `json:"resume_node"`
	Response     hitl.Response   `json:"response"`
	InterruptID  string          `json:"interrupt_id,omitempty"`
	CheckpointID string          `json:"checkpoint_id,omitempty"`
}

type ServeOption

type ServeOption func(*serveConfig)

func WithConfigDir

func WithConfigDir(path string) ServeOption

func WithOutput

func WithOutput(output io.Writer) ServeOption

func WithToken

func WithToken(token string) ServeOption

func WithTokenFile

func WithTokenFile(path string) ServeOption

type Server

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

func NewServer

func NewServer(app Application, opts ...ServeOption) (*Server, error)

func (*Server) EventHub

func (s *Server) EventHub() *EventHub

func (*Server) Handler

func (s *Server) Handler() http.Handler

func (*Server) Serve

func (s *Server) Serve(addr string) error

func (*Server) Token

func (s *Server) Token() string

func (*Server) TokenPath

func (s *Server) TokenPath() string

Jump to

Keyboard shortcuts

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