http

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMaxBodyBytes = int64(1 << 20)

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(config HandlerConfig) (*Handler, error)

func (*Handler) ServeHTTP

func (handler *Handler) ServeHTTP(w nethttp.ResponseWriter, r *nethttp.Request)

type HandlerConfig

type HandlerConfig struct {
	Queue        asyncpkg.Queue
	RunState     runstate.Repository
	Policy       security.Policy
	Audit        audit.Sink
	IDGenerator  func() string
	Now          func() time.Time
	MaxBodyBytes int64
	// InsecureAllowNoAuth explicitly restores the legacy open behavior when
	// Policy is nil. Production callers should configure a policy instead.
	InsecureAllowNoAuth bool
}

type JobResponse

type JobResponse struct {
	Job asyncpkg.Job `json:"job"`
}

type JobsResponse added in v0.1.4

type JobsResponse struct {
	Jobs []asyncpkg.Job `json:"jobs"`
}

type SubmitEventRequest added in v0.1.2

type SubmitEventRequest struct {
	Type        string            `json:"type"`
	RunID       string            `json:"run_id,omitempty"`
	Payload     json.RawMessage   `json:"payload,omitempty"`
	JobID       string            `json:"job_id,omitempty"`
	MaxAttempts int               `json:"max_attempts,omitempty"`
	Metadata    map[string]string `json:"metadata,omitempty"`
}

type SubmitResumeContinueRequest added in v0.1.2

type SubmitResumeContinueRequest struct {
	Token       string            `json:"token"`
	Decision    string            `json:"decision"`
	Amendment   json.RawMessage   `json:"amendment,omitempty"`
	JobID       string            `json:"job_id,omitempty"`
	RunID       string            `json:"run_id,omitempty"`
	MaxAttempts int               `json:"max_attempts,omitempty"`
	Metadata    map[string]string `json:"metadata,omitempty"`
}

type SubmitRunRequest

type SubmitRunRequest struct {
	RunID       string            `json:"run_id,omitempty"`
	ScenarioID  string            `json:"scenario_id,omitempty"`
	Scenario    json.RawMessage   `json:"scenario,omitempty"`
	Agent       string            `json:"agent,omitempty"`
	Prompt      string            `json:"prompt,omitempty"`
	Context     json.RawMessage   `json:"context,omitempty"`
	MaxAttempts int               `json:"max_attempts,omitempty"`
	Metadata    map[string]string `json:"metadata,omitempty"`
}

Jump to

Keyboard shortcuts

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