api

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.

Package api holds Peen's generated standard HTTP server contract.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSpec

func GetSpec() (swagger *openapi3.T, err error)

GetSpec returns the OpenAPI specification corresponding to the generated code in this file. External references in the spec are resolved through PathToRawSpec; externally-referenced files must be embedded in their corresponding Go packages (via the import-mapping feature). URL-based external refs are not supported.

func GetSpecJSON

func GetSpecJSON() ([]byte, error)

GetSpecJSON returns the raw JSON bytes of the embedded OpenAPI specification: decompressed but not unmarshaled. External references are not resolved here; the bytes are the spec exactly as embedded by codegen. The result is cached at package init time, so repeated calls are cheap.

func GetSwagger deprecated

func GetSwagger() (*openapi3.T, error)

GetSwagger returns the OpenAPI specification corresponding to the generated code in this file.

Deprecated: GetSwagger predates kin-openapi renaming openapi3.Swagger to openapi3.T. Use GetSpec instead. This wrapper is retained for backwards compatibility.

func Handler added in v0.2.0

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux added in v0.2.0

func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL added in v0.2.0

func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler

func HandlerWithOptions added in v0.2.0

func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type AgentRun

type AgentRun struct {
	AgentRunId openapi_types.UUID `json:"agentRunId"`

	// Definition Whether the agent came from a file or was defined inline.
	Definition AgentRunDefinition `json:"definition"`

	// Depth Nesting level. The root turn is 0.
	Depth              int32      `json:"depth"`
	EndedAt            *time.Time `json:"endedAt,omitempty"`
	EventBufferedCount int32      `json:"eventBufferedCount"`

	// EventDroppedCount Events evicted because the bounded buffer filled.
	EventDroppedCount int32 `json:"eventDroppedCount"`

	// Name The agent's name. Identification only for an ad-hoc run.
	Name             string        `json:"name"`
	ParentToolCallId *string       `json:"parentToolCallId,omitempty"`
	StartedAt        time.Time     `json:"startedAt"`
	State            AgentRunState `json:"state"`
}

AgentRun defines model for AgentRun.

type AgentRunCancelResponse

type AgentRunCancelResponse struct {
	AgentRunId openapi_types.UUID `json:"agentRunId"`

	// CancelRequested True when this request found a running agent and signalled it. Cancelling an unknown, completed, or already cancelled run is not an error and reports false with the current state.
	CancelRequested bool                        `json:"cancelRequested"`
	State           AgentRunCancelResponseState `json:"state"`
}

AgentRunCancelResponse defines model for AgentRunCancelResponse.

type AgentRunCancelResponseState

type AgentRunCancelResponseState string

AgentRunCancelResponseState defines model for AgentRunCancelResponse.State.

const (
	AgentRunCancelResponseStateCancelled AgentRunCancelResponseState = "cancelled"
	AgentRunCancelResponseStateCompleted AgentRunCancelResponseState = "completed"
	AgentRunCancelResponseStateFailed    AgentRunCancelResponseState = "failed"
	AgentRunCancelResponseStateRunning   AgentRunCancelResponseState = "running"
)

Defines values for AgentRunCancelResponseState.

func (AgentRunCancelResponseState) Valid

Valid indicates whether the value is a known member of the AgentRunCancelResponseState enum.

type AgentRunDefinition

type AgentRunDefinition string

AgentRunDefinition Whether the agent came from a file or was defined inline.

const (
	AgentRunDefinitionAdhoc  AgentRunDefinition = "adhoc"
	AgentRunDefinitionStored AgentRunDefinition = "stored"
)

Defines values for AgentRunDefinition.

func (AgentRunDefinition) Valid

func (e AgentRunDefinition) Valid() bool

Valid indicates whether the value is a known member of the AgentRunDefinition enum.

type AgentRunEvent

type AgentRunEvent struct {
	CreatedAt time.Time               `json:"createdAt"`
	Payload   *map[string]interface{} `json:"payload,omitempty"`
	Sequence  int32                   `json:"sequence"`
	Type      string                  `json:"type"`
}

AgentRunEvent defines model for AgentRunEvent.

type AgentRunEventPage

type AgentRunEventPage struct {
	AgentRunId openapi_types.UUID `json:"agentRunId"`

	// Dropped Events dropped before this window.
	Dropped int32           `json:"dropped"`
	Events  []AgentRunEvent `json:"events"`

	// NextCursor Pass back as cursor to continue from here.
	NextCursor int32                  `json:"nextCursor"`
	State      AgentRunEventPageState `json:"state"`
}

AgentRunEventPage defines model for AgentRunEventPage.

type AgentRunEventPageState

type AgentRunEventPageState string

AgentRunEventPageState defines model for AgentRunEventPage.State.

const (
	AgentRunEventPageStateCancelled AgentRunEventPageState = "cancelled"
	AgentRunEventPageStateCompleted AgentRunEventPageState = "completed"
	AgentRunEventPageStateFailed    AgentRunEventPageState = "failed"
	AgentRunEventPageStateRunning   AgentRunEventPageState = "running"
)

Defines values for AgentRunEventPageState.

func (AgentRunEventPageState) Valid

func (e AgentRunEventPageState) Valid() bool

Valid indicates whether the value is a known member of the AgentRunEventPageState enum.

type AgentRunID

type AgentRunID = openapi_types.UUID

AgentRunID defines model for AgentRunID.

type AgentRunPage

type AgentRunPage struct {
	Agents  []AgentRun `json:"agents"`
	HasMore bool       `json:"hasMore"`
}

AgentRunPage defines model for AgentRunPage.

type AgentRunState

type AgentRunState string

AgentRunState defines model for AgentRun.State.

const (
	AgentRunStateCancelled AgentRunState = "cancelled"
	AgentRunStateCompleted AgentRunState = "completed"
	AgentRunStateFailed    AgentRunState = "failed"
	AgentRunStateRunning   AgentRunState = "running"
)

Defines values for AgentRunState.

func (AgentRunState) Valid

func (e AgentRunState) Valid() bool

Valid indicates whether the value is a known member of the AgentRunState enum.

type CancelResponse

type CancelResponse struct {
	CancelRequested bool `json:"cancelRequested"`
}

CancelResponse defines model for CancelResponse.

type CancelSession202JSONResponse

type CancelSession202JSONResponse struct {
	Body    CancelResponse
	Headers CancelSession202ResponseHeaders
}

func (CancelSession202JSONResponse) VisitCancelSessionResponse

func (response CancelSession202JSONResponse) VisitCancelSessionResponse(w http.ResponseWriter) error

type CancelSession202ResponseHeaders

type CancelSession202ResponseHeaders struct {
	XRequestID openapi_types.UUID
	XSessionID openapi_types.UUID
}

type CancelSession400JSONResponse

type CancelSession400JSONResponse struct{ ErrorBadRequestJSONResponse }

func (CancelSession400JSONResponse) VisitCancelSessionResponse

func (response CancelSession400JSONResponse) VisitCancelSessionResponse(w http.ResponseWriter) error

type CancelSession401JSONResponse

type CancelSession401JSONResponse struct{ ErrorUnauthorizedJSONResponse }

func (CancelSession401JSONResponse) VisitCancelSessionResponse

func (response CancelSession401JSONResponse) VisitCancelSessionResponse(w http.ResponseWriter) error

type CancelSession404JSONResponse

type CancelSession404JSONResponse struct{ ErrorNotFoundJSONResponse }

func (CancelSession404JSONResponse) VisitCancelSessionResponse

func (response CancelSession404JSONResponse) VisitCancelSessionResponse(w http.ResponseWriter) error

type CancelSession500JSONResponse

type CancelSession500JSONResponse struct{ ErrorInternalJSONResponse }

func (CancelSession500JSONResponse) VisitCancelSessionResponse

func (response CancelSession500JSONResponse) VisitCancelSessionResponse(w http.ResponseWriter) error

type CancelSessionAgentRun202JSONResponse

type CancelSessionAgentRun202JSONResponse struct {
	Body    AgentRunCancelResponse
	Headers CancelSessionAgentRun202ResponseHeaders
}

func (CancelSessionAgentRun202JSONResponse) VisitCancelSessionAgentRunResponse

func (response CancelSessionAgentRun202JSONResponse) VisitCancelSessionAgentRunResponse(w http.ResponseWriter) error

type CancelSessionAgentRun202ResponseHeaders

type CancelSessionAgentRun202ResponseHeaders struct {
	XRequestID openapi_types.UUID
	XSessionID openapi_types.UUID
}

type CancelSessionAgentRun400JSONResponse

type CancelSessionAgentRun400JSONResponse struct{ ErrorBadRequestJSONResponse }

func (CancelSessionAgentRun400JSONResponse) VisitCancelSessionAgentRunResponse

func (response CancelSessionAgentRun400JSONResponse) VisitCancelSessionAgentRunResponse(w http.ResponseWriter) error

type CancelSessionAgentRun401JSONResponse

type CancelSessionAgentRun401JSONResponse struct{ ErrorUnauthorizedJSONResponse }

func (CancelSessionAgentRun401JSONResponse) VisitCancelSessionAgentRunResponse

func (response CancelSessionAgentRun401JSONResponse) VisitCancelSessionAgentRunResponse(w http.ResponseWriter) error

type CancelSessionAgentRun404JSONResponse

type CancelSessionAgentRun404JSONResponse struct{ ErrorNotFoundJSONResponse }

func (CancelSessionAgentRun404JSONResponse) VisitCancelSessionAgentRunResponse

func (response CancelSessionAgentRun404JSONResponse) VisitCancelSessionAgentRunResponse(w http.ResponseWriter) error

type CancelSessionAgentRun500JSONResponse

type CancelSessionAgentRun500JSONResponse struct{ ErrorInternalJSONResponse }

func (CancelSessionAgentRun500JSONResponse) VisitCancelSessionAgentRunResponse

func (response CancelSessionAgentRun500JSONResponse) VisitCancelSessionAgentRunResponse(w http.ResponseWriter) error

type CancelSessionAgentRunParams

type CancelSessionAgentRunParams struct {
	XSessionID SessionIDRequired `json:"X-Session-ID"`
}

CancelSessionAgentRunParams defines parameters for CancelSessionAgentRun.

type CancelSessionAgentRunRequestObject

type CancelSessionAgentRunRequestObject struct {
	AgentRunId AgentRunID `json:"agentRunId"`
	Params     CancelSessionAgentRunParams
}

type CancelSessionAgentRunResponseObject

type CancelSessionAgentRunResponseObject interface {
	VisitCancelSessionAgentRunResponse(w http.ResponseWriter) error
}

type CancelSessionParams

type CancelSessionParams struct {
	XSessionID SessionIDRequired `json:"X-Session-ID"`
}

CancelSessionParams defines parameters for CancelSession.

type CancelSessionRequestObject

type CancelSessionRequestObject struct {
	Params CancelSessionParams
}

type CancelSessionResponseObject

type CancelSessionResponseObject interface {
	VisitCancelSessionResponse(w http.ResponseWriter) error
}

type Error

type Error struct {
	Code    string                  `json:"code"`
	Details *map[string]interface{} `json:"details,omitempty"`
	Message string                  `json:"message"`
}

Error defines model for Error.

type ErrorBadRequest

type ErrorBadRequest = Error

ErrorBadRequest defines model for ErrorBadRequest.

type ErrorBadRequestJSONResponse

type ErrorBadRequestJSONResponse Error

type ErrorInternal

type ErrorInternal = Error

ErrorInternal defines model for ErrorInternal.

type ErrorInternalJSONResponse

type ErrorInternalJSONResponse Error

type ErrorNotFound

type ErrorNotFound = Error

ErrorNotFound defines model for ErrorNotFound.

type ErrorNotFoundJSONResponse

type ErrorNotFoundJSONResponse Error

type ErrorUnauthorized

type ErrorUnauthorized = Error

ErrorUnauthorized defines model for ErrorUnauthorized.

type ErrorUnauthorizedJSONResponse

type ErrorUnauthorizedJSONResponse Error

type GetSession200JSONResponse

type GetSession200JSONResponse struct {
	Body    Session
	Headers GetSession200ResponseHeaders
}

func (GetSession200JSONResponse) VisitGetSessionResponse

func (response GetSession200JSONResponse) VisitGetSessionResponse(w http.ResponseWriter) error

type GetSession200ResponseHeaders

type GetSession200ResponseHeaders struct {
	XRequestID openapi_types.UUID
	XSessionID openapi_types.UUID
}

type GetSession400JSONResponse

type GetSession400JSONResponse struct{ ErrorBadRequestJSONResponse }

func (GetSession400JSONResponse) VisitGetSessionResponse

func (response GetSession400JSONResponse) VisitGetSessionResponse(w http.ResponseWriter) error

type GetSession401JSONResponse

type GetSession401JSONResponse struct{ ErrorUnauthorizedJSONResponse }

func (GetSession401JSONResponse) VisitGetSessionResponse

func (response GetSession401JSONResponse) VisitGetSessionResponse(w http.ResponseWriter) error

type GetSession404JSONResponse

type GetSession404JSONResponse struct{ ErrorNotFoundJSONResponse }

func (GetSession404JSONResponse) VisitGetSessionResponse

func (response GetSession404JSONResponse) VisitGetSessionResponse(w http.ResponseWriter) error

type GetSession500JSONResponse

type GetSession500JSONResponse struct{ ErrorInternalJSONResponse }

func (GetSession500JSONResponse) VisitGetSessionResponse

func (response GetSession500JSONResponse) VisitGetSessionResponse(w http.ResponseWriter) error

type GetSessionParams

type GetSessionParams struct {
	XSessionID SessionIDRequired `json:"X-Session-ID"`
}

GetSessionParams defines parameters for GetSession.

type GetSessionRequestObject

type GetSessionRequestObject struct {
	Params GetSessionParams
}

type GetSessionResponseObject

type GetSessionResponseObject interface {
	VisitGetSessionResponse(w http.ResponseWriter) error
}

type InvalidParamFormatError added in v0.2.0

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error added in v0.2.0

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap added in v0.2.0

func (e *InvalidParamFormatError) Unwrap() error

type Job

type Job struct {
	Command   string     `json:"command"`
	Directory string     `json:"directory"`
	EndedAt   *time.Time `json:"endedAt,omitempty"`

	// ExitCode Exit status once known, or -1 while it is not.
	ExitCode int32              `json:"exitCode"`
	JobId    openapi_types.UUID `json:"jobId"`

	// Pid Operating-system process ID of the job's shell.
	Pid int32 `json:"pid"`

	// Purpose Why the agent said it was running this command.
	Purpose             string    `json:"purpose"`
	StartedAt           time.Time `json:"startedAt"`
	State               JobState  `json:"state"`
	StderrBufferedLines int32     `json:"stderrBufferedLines"`
	StderrDroppedLines  int32     `json:"stderrDroppedLines"`
	StdoutBufferedLines int32     `json:"stdoutBufferedLines"`

	// StdoutDroppedLines Lines evicted because the bounded buffer filled.
	StdoutDroppedLines int32 `json:"stdoutDroppedLines"`

	// ToolCallId The tool call that started this job.
	ToolCallId *string `json:"toolCallId,omitempty"`
}

Job defines model for Job.

type JobID

type JobID = openapi_types.UUID

JobID defines model for JobID.

type JobOutput

type JobOutput struct {
	JobId            openapi_types.UUID `json:"jobId"`
	NextStderrCursor int32              `json:"nextStderrCursor"`

	// NextStdoutCursor Pass back as stdoutCursor to continue from here.
	NextStdoutCursor   int32          `json:"nextStdoutCursor"`
	State              JobOutputState `json:"state"`
	Stderr             string         `json:"stderr"`
	StderrDroppedLines int32          `json:"stderrDroppedLines"`
	Stdout             string         `json:"stdout"`
	StdoutDroppedLines int32          `json:"stdoutDroppedLines"`
}

JobOutput defines model for JobOutput.

type JobOutputState

type JobOutputState string

JobOutputState defines model for JobOutput.State.

const (
	JobOutputStateExited    JobOutputState = "exited"
	JobOutputStateFailed    JobOutputState = "failed"
	JobOutputStateRunning   JobOutputState = "running"
	JobOutputStateSignalled JobOutputState = "signalled"
)

Defines values for JobOutputState.

func (JobOutputState) Valid

func (e JobOutputState) Valid() bool

Valid indicates whether the value is a known member of the JobOutputState enum.

type JobPage

type JobPage struct {
	Jobs      []Job `json:"jobs"`
	Truncated bool  `json:"truncated"`
}

JobPage defines model for JobPage.

type JobSignalRequest

type JobSignalRequest struct {
	// Signal stop sends SIGTERM to the process group then escalates to SIGKILL. kill goes straight to SIGKILL.
	Signal JobSignalRequestSignal `json:"signal"`
}

JobSignalRequest defines model for JobSignalRequest.

type JobSignalRequestSignal

type JobSignalRequestSignal string

JobSignalRequestSignal stop sends SIGTERM to the process group then escalates to SIGKILL. kill goes straight to SIGKILL.

const (
	JobSignalRequestSignalKill JobSignalRequestSignal = "kill"
	JobSignalRequestSignalStop JobSignalRequestSignal = "stop"
)

Defines values for JobSignalRequestSignal.

func (JobSignalRequestSignal) Valid

func (e JobSignalRequestSignal) Valid() bool

Valid indicates whether the value is a known member of the JobSignalRequestSignal enum.

type JobSignalResponse

type JobSignalResponse struct {
	JobId openapi_types.UUID `json:"jobId"`

	// Signalled True when this request found a running job and signalled it. Signalling an unknown, exited, or already signalled job is not an error and reports false with the current state.
	Signalled bool                   `json:"signalled"`
	State     JobSignalResponseState `json:"state"`
}

JobSignalResponse defines model for JobSignalResponse.

type JobSignalResponseState

type JobSignalResponseState string

JobSignalResponseState defines model for JobSignalResponse.State.

const (
	JobSignalResponseStateExited    JobSignalResponseState = "exited"
	JobSignalResponseStateFailed    JobSignalResponseState = "failed"
	JobSignalResponseStateRunning   JobSignalResponseState = "running"
	JobSignalResponseStateSignalled JobSignalResponseState = "signalled"
)

Defines values for JobSignalResponseState.

func (JobSignalResponseState) Valid

func (e JobSignalResponseState) Valid() bool

Valid indicates whether the value is a known member of the JobSignalResponseState enum.

type JobState

type JobState string

JobState defines model for Job.State.

const (
	JobStateExited    JobState = "exited"
	JobStateFailed    JobState = "failed"
	JobStateRunning   JobState = "running"
	JobStateSignalled JobState = "signalled"
)

Defines values for JobState.

func (JobState) Valid

func (e JobState) Valid() bool

Valid indicates whether the value is a known member of the JobState enum.

type Limit

type Limit = int32

Limit defines model for Limit.

type ListMessages200JSONResponse

type ListMessages200JSONResponse struct {
	Body    MessagePage
	Headers ListMessages200ResponseHeaders
}

func (ListMessages200JSONResponse) VisitListMessagesResponse

func (response ListMessages200JSONResponse) VisitListMessagesResponse(w http.ResponseWriter) error

type ListMessages200ResponseHeaders

type ListMessages200ResponseHeaders struct {
	XRequestID openapi_types.UUID
	XSessionID openapi_types.UUID
}

type ListMessages400JSONResponse

type ListMessages400JSONResponse struct{ ErrorBadRequestJSONResponse }

func (ListMessages400JSONResponse) VisitListMessagesResponse

func (response ListMessages400JSONResponse) VisitListMessagesResponse(w http.ResponseWriter) error

type ListMessages401JSONResponse

type ListMessages401JSONResponse struct{ ErrorUnauthorizedJSONResponse }

func (ListMessages401JSONResponse) VisitListMessagesResponse

func (response ListMessages401JSONResponse) VisitListMessagesResponse(w http.ResponseWriter) error

type ListMessages404JSONResponse

type ListMessages404JSONResponse struct{ ErrorNotFoundJSONResponse }

func (ListMessages404JSONResponse) VisitListMessagesResponse

func (response ListMessages404JSONResponse) VisitListMessagesResponse(w http.ResponseWriter) error

type ListMessages500JSONResponse

type ListMessages500JSONResponse struct{ ErrorInternalJSONResponse }

func (ListMessages500JSONResponse) VisitListMessagesResponse

func (response ListMessages500JSONResponse) VisitListMessagesResponse(w http.ResponseWriter) error

type ListMessagesParams

type ListMessagesParams struct {
	Limit      *Limit                   `form:"limit,omitempty" json:"limit,omitempty"`
	Offset     *Offset                  `form:"offset,omitempty" json:"offset,omitempty"`
	Order      *ListMessagesParamsOrder `form:"order,omitempty" json:"order,omitempty"`
	XSessionID SessionIDRequired        `json:"X-Session-ID"`
}

ListMessagesParams defines parameters for ListMessages.

type ListMessagesParamsOrder

type ListMessagesParamsOrder string

ListMessagesParamsOrder defines parameters for ListMessages.

const (
	ListMessagesParamsOrderAsc  ListMessagesParamsOrder = "asc"
	ListMessagesParamsOrderDesc ListMessagesParamsOrder = "desc"
)

Defines values for ListMessagesParamsOrder.

func (ListMessagesParamsOrder) Valid

func (e ListMessagesParamsOrder) Valid() bool

Valid indicates whether the value is a known member of the ListMessagesParamsOrder enum.

type ListMessagesRequestObject

type ListMessagesRequestObject struct {
	Params ListMessagesParams
}

type ListMessagesResponseObject

type ListMessagesResponseObject interface {
	VisitListMessagesResponse(w http.ResponseWriter) error
}

type ListSessionAgentRunEvents200JSONResponse

type ListSessionAgentRunEvents200JSONResponse struct {
	Body    AgentRunEventPage
	Headers ListSessionAgentRunEvents200ResponseHeaders
}

func (ListSessionAgentRunEvents200JSONResponse) VisitListSessionAgentRunEventsResponse

func (response ListSessionAgentRunEvents200JSONResponse) VisitListSessionAgentRunEventsResponse(w http.ResponseWriter) error

type ListSessionAgentRunEvents200ResponseHeaders

type ListSessionAgentRunEvents200ResponseHeaders struct {
	XRequestID openapi_types.UUID
	XSessionID openapi_types.UUID
}

type ListSessionAgentRunEvents400JSONResponse

type ListSessionAgentRunEvents400JSONResponse struct{ ErrorBadRequestJSONResponse }

func (ListSessionAgentRunEvents400JSONResponse) VisitListSessionAgentRunEventsResponse

func (response ListSessionAgentRunEvents400JSONResponse) VisitListSessionAgentRunEventsResponse(w http.ResponseWriter) error

type ListSessionAgentRunEvents401JSONResponse

type ListSessionAgentRunEvents401JSONResponse struct{ ErrorUnauthorizedJSONResponse }

func (ListSessionAgentRunEvents401JSONResponse) VisitListSessionAgentRunEventsResponse

func (response ListSessionAgentRunEvents401JSONResponse) VisitListSessionAgentRunEventsResponse(w http.ResponseWriter) error

type ListSessionAgentRunEvents404JSONResponse

type ListSessionAgentRunEvents404JSONResponse struct{ ErrorNotFoundJSONResponse }

func (ListSessionAgentRunEvents404JSONResponse) VisitListSessionAgentRunEventsResponse

func (response ListSessionAgentRunEvents404JSONResponse) VisitListSessionAgentRunEventsResponse(w http.ResponseWriter) error

type ListSessionAgentRunEvents500JSONResponse

type ListSessionAgentRunEvents500JSONResponse struct{ ErrorInternalJSONResponse }

func (ListSessionAgentRunEvents500JSONResponse) VisitListSessionAgentRunEventsResponse

func (response ListSessionAgentRunEvents500JSONResponse) VisitListSessionAgentRunEventsResponse(w http.ResponseWriter) error

type ListSessionAgentRunEventsParams

type ListSessionAgentRunEventsParams struct {
	Cursor     *int32            `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit      *int32            `form:"limit,omitempty" json:"limit,omitempty"`
	XSessionID SessionIDRequired `json:"X-Session-ID"`
}

ListSessionAgentRunEventsParams defines parameters for ListSessionAgentRunEvents.

type ListSessionAgentRunEventsRequestObject

type ListSessionAgentRunEventsRequestObject struct {
	AgentRunId AgentRunID `json:"agentRunId"`
	Params     ListSessionAgentRunEventsParams
}

type ListSessionAgentRunEventsResponseObject

type ListSessionAgentRunEventsResponseObject interface {
	VisitListSessionAgentRunEventsResponse(w http.ResponseWriter) error
}

type ListSessionAgentRuns200JSONResponse

type ListSessionAgentRuns200JSONResponse struct {
	Body    AgentRunPage
	Headers ListSessionAgentRuns200ResponseHeaders
}

func (ListSessionAgentRuns200JSONResponse) VisitListSessionAgentRunsResponse

func (response ListSessionAgentRuns200JSONResponse) VisitListSessionAgentRunsResponse(w http.ResponseWriter) error

type ListSessionAgentRuns200ResponseHeaders

type ListSessionAgentRuns200ResponseHeaders struct {
	XRequestID openapi_types.UUID
	XSessionID openapi_types.UUID
}

type ListSessionAgentRuns400JSONResponse

type ListSessionAgentRuns400JSONResponse struct{ ErrorBadRequestJSONResponse }

func (ListSessionAgentRuns400JSONResponse) VisitListSessionAgentRunsResponse

func (response ListSessionAgentRuns400JSONResponse) VisitListSessionAgentRunsResponse(w http.ResponseWriter) error

type ListSessionAgentRuns401JSONResponse

type ListSessionAgentRuns401JSONResponse struct{ ErrorUnauthorizedJSONResponse }

func (ListSessionAgentRuns401JSONResponse) VisitListSessionAgentRunsResponse

func (response ListSessionAgentRuns401JSONResponse) VisitListSessionAgentRunsResponse(w http.ResponseWriter) error

type ListSessionAgentRuns404JSONResponse

type ListSessionAgentRuns404JSONResponse struct{ ErrorNotFoundJSONResponse }

func (ListSessionAgentRuns404JSONResponse) VisitListSessionAgentRunsResponse

func (response ListSessionAgentRuns404JSONResponse) VisitListSessionAgentRunsResponse(w http.ResponseWriter) error

type ListSessionAgentRuns500JSONResponse

type ListSessionAgentRuns500JSONResponse struct{ ErrorInternalJSONResponse }

func (ListSessionAgentRuns500JSONResponse) VisitListSessionAgentRunsResponse

func (response ListSessionAgentRuns500JSONResponse) VisitListSessionAgentRunsResponse(w http.ResponseWriter) error

type ListSessionAgentRunsParams

type ListSessionAgentRunsParams struct {
	Limit      *Limit                           `form:"limit,omitempty" json:"limit,omitempty"`
	Offset     *Offset                          `form:"offset,omitempty" json:"offset,omitempty"`
	State      *ListSessionAgentRunsParamsState `form:"state,omitempty" json:"state,omitempty"`
	XSessionID SessionIDRequired                `json:"X-Session-ID"`
}

ListSessionAgentRunsParams defines parameters for ListSessionAgentRuns.

type ListSessionAgentRunsParamsState

type ListSessionAgentRunsParamsState string

ListSessionAgentRunsParamsState defines parameters for ListSessionAgentRuns.

const (
	ListSessionAgentRunsParamsStateCancelled ListSessionAgentRunsParamsState = "cancelled"
	ListSessionAgentRunsParamsStateCompleted ListSessionAgentRunsParamsState = "completed"
	ListSessionAgentRunsParamsStateFailed    ListSessionAgentRunsParamsState = "failed"
	ListSessionAgentRunsParamsStateRunning   ListSessionAgentRunsParamsState = "running"
)

Defines values for ListSessionAgentRunsParamsState.

func (ListSessionAgentRunsParamsState) Valid

Valid indicates whether the value is a known member of the ListSessionAgentRunsParamsState enum.

type ListSessionAgentRunsRequestObject

type ListSessionAgentRunsRequestObject struct {
	Params ListSessionAgentRunsParams
}

type ListSessionAgentRunsResponseObject

type ListSessionAgentRunsResponseObject interface {
	VisitListSessionAgentRunsResponse(w http.ResponseWriter) error
}

type ListSessionEvents200JSONResponse

type ListSessionEvents200JSONResponse struct {
	Body    SessionEventPage
	Headers ListSessionEvents200ResponseHeaders
}

func (ListSessionEvents200JSONResponse) VisitListSessionEventsResponse

func (response ListSessionEvents200JSONResponse) VisitListSessionEventsResponse(w http.ResponseWriter) error

type ListSessionEvents200ResponseHeaders

type ListSessionEvents200ResponseHeaders struct {
	XRequestID openapi_types.UUID
	XSessionID openapi_types.UUID
}

type ListSessionEvents400JSONResponse

type ListSessionEvents400JSONResponse struct{ ErrorBadRequestJSONResponse }

func (ListSessionEvents400JSONResponse) VisitListSessionEventsResponse

func (response ListSessionEvents400JSONResponse) VisitListSessionEventsResponse(w http.ResponseWriter) error

type ListSessionEvents401JSONResponse

type ListSessionEvents401JSONResponse struct{ ErrorUnauthorizedJSONResponse }

func (ListSessionEvents401JSONResponse) VisitListSessionEventsResponse

func (response ListSessionEvents401JSONResponse) VisitListSessionEventsResponse(w http.ResponseWriter) error

type ListSessionEvents404JSONResponse

type ListSessionEvents404JSONResponse struct{ ErrorNotFoundJSONResponse }

func (ListSessionEvents404JSONResponse) VisitListSessionEventsResponse

func (response ListSessionEvents404JSONResponse) VisitListSessionEventsResponse(w http.ResponseWriter) error

type ListSessionEvents500JSONResponse

type ListSessionEvents500JSONResponse struct{ ErrorInternalJSONResponse }

func (ListSessionEvents500JSONResponse) VisitListSessionEventsResponse

func (response ListSessionEvents500JSONResponse) VisitListSessionEventsResponse(w http.ResponseWriter) error

type ListSessionEventsParams

type ListSessionEventsParams struct {
	XSessionID SessionIDRequired `json:"X-Session-ID"`
}

ListSessionEventsParams defines parameters for ListSessionEvents.

type ListSessionEventsRequestObject

type ListSessionEventsRequestObject struct {
	Params ListSessionEventsParams
}

type ListSessionEventsResponseObject

type ListSessionEventsResponseObject interface {
	VisitListSessionEventsResponse(w http.ResponseWriter) error
}

type ListSessionJobs200JSONResponse

type ListSessionJobs200JSONResponse struct {
	Body    JobPage
	Headers ListSessionJobs200ResponseHeaders
}

func (ListSessionJobs200JSONResponse) VisitListSessionJobsResponse

func (response ListSessionJobs200JSONResponse) VisitListSessionJobsResponse(w http.ResponseWriter) error

type ListSessionJobs200ResponseHeaders

type ListSessionJobs200ResponseHeaders struct {
	XRequestID openapi_types.UUID
	XSessionID openapi_types.UUID
}

type ListSessionJobs400JSONResponse

type ListSessionJobs400JSONResponse struct{ ErrorBadRequestJSONResponse }

func (ListSessionJobs400JSONResponse) VisitListSessionJobsResponse

func (response ListSessionJobs400JSONResponse) VisitListSessionJobsResponse(w http.ResponseWriter) error

type ListSessionJobs401JSONResponse

type ListSessionJobs401JSONResponse struct{ ErrorUnauthorizedJSONResponse }

func (ListSessionJobs401JSONResponse) VisitListSessionJobsResponse

func (response ListSessionJobs401JSONResponse) VisitListSessionJobsResponse(w http.ResponseWriter) error

type ListSessionJobs404JSONResponse

type ListSessionJobs404JSONResponse struct{ ErrorNotFoundJSONResponse }

func (ListSessionJobs404JSONResponse) VisitListSessionJobsResponse

func (response ListSessionJobs404JSONResponse) VisitListSessionJobsResponse(w http.ResponseWriter) error

type ListSessionJobs500JSONResponse

type ListSessionJobs500JSONResponse struct{ ErrorInternalJSONResponse }

func (ListSessionJobs500JSONResponse) VisitListSessionJobsResponse

func (response ListSessionJobs500JSONResponse) VisitListSessionJobsResponse(w http.ResponseWriter) error

type ListSessionJobsParams

type ListSessionJobsParams struct {
	Limit      *Limit                      `form:"limit,omitempty" json:"limit,omitempty"`
	Offset     *Offset                     `form:"offset,omitempty" json:"offset,omitempty"`
	State      *ListSessionJobsParamsState `form:"state,omitempty" json:"state,omitempty"`
	XSessionID SessionIDRequired           `json:"X-Session-ID"`
}

ListSessionJobsParams defines parameters for ListSessionJobs.

type ListSessionJobsParamsState

type ListSessionJobsParamsState string

ListSessionJobsParamsState defines parameters for ListSessionJobs.

const (
	ListSessionJobsParamsStateExited    ListSessionJobsParamsState = "exited"
	ListSessionJobsParamsStateFailed    ListSessionJobsParamsState = "failed"
	ListSessionJobsParamsStateRunning   ListSessionJobsParamsState = "running"
	ListSessionJobsParamsStateSignalled ListSessionJobsParamsState = "signalled"
)

Defines values for ListSessionJobsParamsState.

func (ListSessionJobsParamsState) Valid

func (e ListSessionJobsParamsState) Valid() bool

Valid indicates whether the value is a known member of the ListSessionJobsParamsState enum.

type ListSessionJobsRequestObject

type ListSessionJobsRequestObject struct {
	Params ListSessionJobsParams
}

type ListSessionJobsResponseObject

type ListSessionJobsResponseObject interface {
	VisitListSessionJobsResponse(w http.ResponseWriter) error
}

type Message

type Message struct {
	Content    string             `json:"content"`
	CreatedAt  time.Time          `json:"createdAt"`
	Id         openapi_types.UUID `json:"id"`
	Incomplete *bool              `json:"incomplete,omitempty"`
	IsError    *bool              `json:"isError,omitempty"`
	Model      *string            `json:"model,omitempty"`
	Role       MessageRole        `json:"role"`
	Sequence   int64              `json:"sequence"`
	Thinking   *string            `json:"thinking,omitempty"`
	ToolCallId *string            `json:"toolCallId,omitempty"`
	ToolCalls  *[]MessageToolCall `json:"toolCalls,omitempty"`
	Workspace  string             `json:"workspace"`
}

Message defines model for Message.

type MessagePage

type MessagePage struct {
	HasMore bool      `json:"hasMore"`
	Items   []Message `json:"items"`
	Limit   int32     `json:"limit"`
	Offset  int32     `json:"offset"`
}

MessagePage defines model for MessagePage.

type MessageRole

type MessageRole string

MessageRole defines model for Message.Role.

const (
	MessageRoleAssistant MessageRole = "assistant"
	MessageRoleTool      MessageRole = "tool"
	MessageRoleUser      MessageRole = "user"
)

Defines values for MessageRole.

func (MessageRole) Valid

func (e MessageRole) Valid() bool

Valid indicates whether the value is a known member of the MessageRole enum.

type MessageToolCall

type MessageToolCall struct {
	Arguments map[string]interface{} `json:"arguments"`
	Id        string                 `json:"id"`
	Name      string                 `json:"name"`
}

MessageToolCall defines model for MessageToolCall.

type MiddlewareFunc added in v0.2.0

type MiddlewareFunc func(http.Handler) http.Handler

type Offset

type Offset = int32

Offset defines model for Offset.

type Order

type Order string

Order defines model for Order.

const (
	OrderAsc  Order = "asc"
	OrderDesc Order = "desc"
)

Defines values for Order.

func (Order) Valid

func (e Order) Valid() bool

Valid indicates whether the value is a known member of the Order enum.

type PublishSessionEvent202JSONResponse

type PublishSessionEvent202JSONResponse struct {
	Body    SessionEvent
	Headers PublishSessionEvent202ResponseHeaders
}

func (PublishSessionEvent202JSONResponse) VisitPublishSessionEventResponse

func (response PublishSessionEvent202JSONResponse) VisitPublishSessionEventResponse(w http.ResponseWriter) error

type PublishSessionEvent202ResponseHeaders

type PublishSessionEvent202ResponseHeaders struct {
	XRequestID openapi_types.UUID
	XSessionID openapi_types.UUID
}

type PublishSessionEvent400JSONResponse

type PublishSessionEvent400JSONResponse struct{ ErrorBadRequestJSONResponse }

func (PublishSessionEvent400JSONResponse) VisitPublishSessionEventResponse

func (response PublishSessionEvent400JSONResponse) VisitPublishSessionEventResponse(w http.ResponseWriter) error

type PublishSessionEvent401JSONResponse

type PublishSessionEvent401JSONResponse struct{ ErrorUnauthorizedJSONResponse }

func (PublishSessionEvent401JSONResponse) VisitPublishSessionEventResponse

func (response PublishSessionEvent401JSONResponse) VisitPublishSessionEventResponse(w http.ResponseWriter) error

type PublishSessionEvent404JSONResponse

type PublishSessionEvent404JSONResponse struct{ ErrorNotFoundJSONResponse }

func (PublishSessionEvent404JSONResponse) VisitPublishSessionEventResponse

func (response PublishSessionEvent404JSONResponse) VisitPublishSessionEventResponse(w http.ResponseWriter) error

type PublishSessionEvent500JSONResponse

type PublishSessionEvent500JSONResponse struct{ ErrorInternalJSONResponse }

func (PublishSessionEvent500JSONResponse) VisitPublishSessionEventResponse

func (response PublishSessionEvent500JSONResponse) VisitPublishSessionEventResponse(w http.ResponseWriter) error

type PublishSessionEventJSONRequestBody

type PublishSessionEventJSONRequestBody = SessionEventRequest

PublishSessionEventJSONRequestBody defines body for PublishSessionEvent for application/json ContentType.

type PublishSessionEventParams

type PublishSessionEventParams struct {
	XSessionID SessionIDRequired `json:"X-Session-ID"`
}

PublishSessionEventParams defines parameters for PublishSessionEvent.

type PublishSessionEventRequestObject

type PublishSessionEventRequestObject struct {
	Params PublishSessionEventParams
	Body   *PublishSessionEventJSONRequestBody
}

type PublishSessionEventResponseObject

type PublishSessionEventResponseObject interface {
	VisitPublishSessionEventResponse(w http.ResponseWriter) error
}

type ReadSessionJobOutput200JSONResponse

type ReadSessionJobOutput200JSONResponse struct {
	Body    JobOutput
	Headers ReadSessionJobOutput200ResponseHeaders
}

func (ReadSessionJobOutput200JSONResponse) VisitReadSessionJobOutputResponse

func (response ReadSessionJobOutput200JSONResponse) VisitReadSessionJobOutputResponse(w http.ResponseWriter) error

type ReadSessionJobOutput200ResponseHeaders

type ReadSessionJobOutput200ResponseHeaders struct {
	XRequestID openapi_types.UUID
	XSessionID openapi_types.UUID
}

type ReadSessionJobOutput400JSONResponse

type ReadSessionJobOutput400JSONResponse struct{ ErrorBadRequestJSONResponse }

func (ReadSessionJobOutput400JSONResponse) VisitReadSessionJobOutputResponse

func (response ReadSessionJobOutput400JSONResponse) VisitReadSessionJobOutputResponse(w http.ResponseWriter) error

type ReadSessionJobOutput401JSONResponse

type ReadSessionJobOutput401JSONResponse struct{ ErrorUnauthorizedJSONResponse }

func (ReadSessionJobOutput401JSONResponse) VisitReadSessionJobOutputResponse

func (response ReadSessionJobOutput401JSONResponse) VisitReadSessionJobOutputResponse(w http.ResponseWriter) error

type ReadSessionJobOutput404JSONResponse

type ReadSessionJobOutput404JSONResponse struct{ ErrorNotFoundJSONResponse }

func (ReadSessionJobOutput404JSONResponse) VisitReadSessionJobOutputResponse

func (response ReadSessionJobOutput404JSONResponse) VisitReadSessionJobOutputResponse(w http.ResponseWriter) error

type ReadSessionJobOutput500JSONResponse

type ReadSessionJobOutput500JSONResponse struct{ ErrorInternalJSONResponse }

func (ReadSessionJobOutput500JSONResponse) VisitReadSessionJobOutputResponse

func (response ReadSessionJobOutput500JSONResponse) VisitReadSessionJobOutputResponse(w http.ResponseWriter) error

type ReadSessionJobOutputParams

type ReadSessionJobOutputParams struct {
	Stream       *ReadSessionJobOutputParamsStream `form:"stream,omitempty" json:"stream,omitempty"`
	StdoutCursor *int32                            `form:"stdoutCursor,omitempty" json:"stdoutCursor,omitempty"`
	StderrCursor *int32                            `form:"stderrCursor,omitempty" json:"stderrCursor,omitempty"`
	MaxLines     *int32                            `form:"maxLines,omitempty" json:"maxLines,omitempty"`
	XSessionID   SessionIDRequired                 `json:"X-Session-ID"`
}

ReadSessionJobOutputParams defines parameters for ReadSessionJobOutput.

type ReadSessionJobOutputParamsStream

type ReadSessionJobOutputParamsStream string

ReadSessionJobOutputParamsStream defines parameters for ReadSessionJobOutput.

const (
	ReadSessionJobOutputParamsStreamBoth   ReadSessionJobOutputParamsStream = "both"
	ReadSessionJobOutputParamsStreamStderr ReadSessionJobOutputParamsStream = "stderr"
	ReadSessionJobOutputParamsStreamStdout ReadSessionJobOutputParamsStream = "stdout"
)

Defines values for ReadSessionJobOutputParamsStream.

func (ReadSessionJobOutputParamsStream) Valid

Valid indicates whether the value is a known member of the ReadSessionJobOutputParamsStream enum.

type ReadSessionJobOutputRequestObject

type ReadSessionJobOutputRequestObject struct {
	JobId  JobID `json:"jobId"`
	Params ReadSessionJobOutputParams
}

type ReadSessionJobOutputResponseObject

type ReadSessionJobOutputResponseObject interface {
	VisitReadSessionJobOutputResponse(w http.ResponseWriter) error
}

type RequiredHeaderError added in v0.2.0

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error added in v0.2.0

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap added in v0.2.0

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError added in v0.2.0

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error added in v0.2.0

func (e *RequiredParamError) Error() string

type ServeMux added in v0.2.0

type ServeMux interface {
	HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
	http.Handler
}

ServeMux is an abstraction of http.ServeMux.

type ServerInterface

type ServerInterface interface {
	// ListMessages List stored conversation messages
	// (GET /messages)
	ListMessages(w http.ResponseWriter, r *http.Request, params ListMessagesParams)
	// GetSession Read session details
	// (GET /session)
	GetSession(w http.ResponseWriter, r *http.Request, params GetSessionParams)
	// ListSessionAgentRuns List the child agent runs this session has started
	// (GET /session/agents)
	ListSessionAgentRuns(w http.ResponseWriter, r *http.Request, params ListSessionAgentRunsParams)
	// CancelSessionAgentRun Cancel one child agent run without ending its parent turn
	// (POST /session/agents/{agentRunId}/cancel)
	CancelSessionAgentRun(w http.ResponseWriter, r *http.Request, agentRunId AgentRunID, params CancelSessionAgentRunParams)
	// ListSessionAgentRunEvents Follow what one child agent run is doing
	// (GET /session/agents/{agentRunId}/messages)
	ListSessionAgentRunEvents(w http.ResponseWriter, r *http.Request, agentRunId AgentRunID, params ListSessionAgentRunEventsParams)
	// CancelSession Request cancellation for the active turn
	// (POST /session/cancel)
	CancelSession(w http.ResponseWriter, r *http.Request, params CancelSessionParams)
	// ListSessionEvents List the session's pending events
	// (GET /session/events)
	ListSessionEvents(w http.ResponseWriter, r *http.Request, params ListSessionEventsParams)
	// PublishSessionEvent Report an event to the session from outside
	// (POST /session/events)
	PublishSessionEvent(w http.ResponseWriter, r *http.Request, params PublishSessionEventParams)
	// ListSessionJobs List the commands this session has started
	// (GET /session/jobs)
	ListSessionJobs(w http.ResponseWriter, r *http.Request, params ListSessionJobsParams)
	// ReadSessionJobOutput Read a bounded window of one job's output
	// (GET /session/jobs/{jobId}/output)
	ReadSessionJobOutput(w http.ResponseWriter, r *http.Request, jobId JobID, params ReadSessionJobOutputParams)
	// SignalSessionJob Stop one running job
	// (POST /session/jobs/{jobId}/signal)
	SignalSessionJob(w http.ResponseWriter, r *http.Request, jobId JobID, params SignalSessionJobParams)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions added in v0.2.0

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) CancelSession

func (siw *ServerInterfaceWrapper) CancelSession(w http.ResponseWriter, r *http.Request)

CancelSession operation middleware

func (*ServerInterfaceWrapper) CancelSessionAgentRun

func (siw *ServerInterfaceWrapper) CancelSessionAgentRun(w http.ResponseWriter, r *http.Request)

CancelSessionAgentRun operation middleware

func (*ServerInterfaceWrapper) GetSession

func (siw *ServerInterfaceWrapper) GetSession(w http.ResponseWriter, r *http.Request)

GetSession operation middleware

func (*ServerInterfaceWrapper) ListMessages

func (siw *ServerInterfaceWrapper) ListMessages(w http.ResponseWriter, r *http.Request)

ListMessages operation middleware

func (*ServerInterfaceWrapper) ListSessionAgentRunEvents

func (siw *ServerInterfaceWrapper) ListSessionAgentRunEvents(w http.ResponseWriter, r *http.Request)

ListSessionAgentRunEvents operation middleware

func (*ServerInterfaceWrapper) ListSessionAgentRuns

func (siw *ServerInterfaceWrapper) ListSessionAgentRuns(w http.ResponseWriter, r *http.Request)

ListSessionAgentRuns operation middleware

func (*ServerInterfaceWrapper) ListSessionEvents

func (siw *ServerInterfaceWrapper) ListSessionEvents(w http.ResponseWriter, r *http.Request)

ListSessionEvents operation middleware

func (*ServerInterfaceWrapper) ListSessionJobs

func (siw *ServerInterfaceWrapper) ListSessionJobs(w http.ResponseWriter, r *http.Request)

ListSessionJobs operation middleware

func (*ServerInterfaceWrapper) PublishSessionEvent

func (siw *ServerInterfaceWrapper) PublishSessionEvent(w http.ResponseWriter, r *http.Request)

PublishSessionEvent operation middleware

func (*ServerInterfaceWrapper) ReadSessionJobOutput

func (siw *ServerInterfaceWrapper) ReadSessionJobOutput(w http.ResponseWriter, r *http.Request)

ReadSessionJobOutput operation middleware

func (*ServerInterfaceWrapper) SignalSessionJob

func (siw *ServerInterfaceWrapper) SignalSessionJob(w http.ResponseWriter, r *http.Request)

SignalSessionJob operation middleware

type Session

type Session struct {
	ActiveTurn         bool               `json:"activeTurn"`
	Agent              string             `json:"agent"`
	CompletedTurnCount int64              `json:"completedTurnCount"`
	CreatedAt          time.Time          `json:"createdAt"`
	Id                 openapi_types.UUID `json:"id"`
	LastMessageAt      *time.Time         `json:"lastMessageAt,omitempty"`
	MessageCount       int64              `json:"messageCount"`
	Model              string             `json:"model"`
	UpdatedAt          time.Time          `json:"updatedAt"`
}

Session defines model for Session.

type SessionEvent

type SessionEvent struct {
	CreatedAt time.Time               `json:"createdAt"`
	Data      *map[string]interface{} `json:"data,omitempty"`
	Delivery  SessionEventDelivery    `json:"delivery"`
	Id        openapi_types.UUID      `json:"id"`
	Source    string                  `json:"source"`
	Summary   string                  `json:"summary"`
	Type      string                  `json:"type"`
}

SessionEvent defines model for SessionEvent.

type SessionEventDelivery

type SessionEventDelivery string

SessionEventDelivery defines model for SessionEvent.Delivery.

const (
	SessionEventDeliveryQueue SessionEventDelivery = "queue"
	SessionEventDeliveryWake  SessionEventDelivery = "wake"
)

Defines values for SessionEventDelivery.

func (SessionEventDelivery) Valid

func (e SessionEventDelivery) Valid() bool

Valid indicates whether the value is a known member of the SessionEventDelivery enum.

type SessionEventPage

type SessionEventPage struct {
	// Dropped Events dropped before these because the queue was full.
	Dropped int32          `json:"dropped"`
	Events  []SessionEvent `json:"events"`
}

SessionEventPage defines model for SessionEventPage.

type SessionEventRequest

type SessionEventRequest struct {
	// Data Structured payload for programmatic consumers.
	Data *map[string]interface{} `json:"data,omitempty"`

	// Delivery queue waits for the next turn. wake starts a turn when the session is idle and .agents/events declares a handler for this type.
	Delivery *SessionEventRequestDelivery `json:"delivery,omitempty"`

	// Summary The one line describing what happened.
	Summary string `json:"summary"`

	// Type Dotted lowercase namespaced type. The job. and agent. prefixes are reserved for Peen's own producers and are rejected here.
	Type string `json:"type"`
}

SessionEventRequest defines model for SessionEventRequest.

type SessionEventRequestDelivery

type SessionEventRequestDelivery string

SessionEventRequestDelivery queue waits for the next turn. wake starts a turn when the session is idle and .agents/events declares a handler for this type.

const (
	SessionEventRequestDeliveryQueue SessionEventRequestDelivery = "queue"
	SessionEventRequestDeliveryWake  SessionEventRequestDelivery = "wake"
)

Defines values for SessionEventRequestDelivery.

func (SessionEventRequestDelivery) Valid

Valid indicates whether the value is a known member of the SessionEventRequestDelivery enum.

type SessionIDRequired

type SessionIDRequired = openapi_types.UUID

SessionIDRequired defines model for SessionIDRequired.

type SignalSessionJob202JSONResponse

type SignalSessionJob202JSONResponse struct {
	Body    JobSignalResponse
	Headers SignalSessionJob202ResponseHeaders
}

func (SignalSessionJob202JSONResponse) VisitSignalSessionJobResponse

func (response SignalSessionJob202JSONResponse) VisitSignalSessionJobResponse(w http.ResponseWriter) error

type SignalSessionJob202ResponseHeaders

type SignalSessionJob202ResponseHeaders struct {
	XRequestID openapi_types.UUID
	XSessionID openapi_types.UUID
}

type SignalSessionJob400JSONResponse

type SignalSessionJob400JSONResponse struct{ ErrorBadRequestJSONResponse }

func (SignalSessionJob400JSONResponse) VisitSignalSessionJobResponse

func (response SignalSessionJob400JSONResponse) VisitSignalSessionJobResponse(w http.ResponseWriter) error

type SignalSessionJob401JSONResponse

type SignalSessionJob401JSONResponse struct{ ErrorUnauthorizedJSONResponse }

func (SignalSessionJob401JSONResponse) VisitSignalSessionJobResponse

func (response SignalSessionJob401JSONResponse) VisitSignalSessionJobResponse(w http.ResponseWriter) error

type SignalSessionJob404JSONResponse

type SignalSessionJob404JSONResponse struct{ ErrorNotFoundJSONResponse }

func (SignalSessionJob404JSONResponse) VisitSignalSessionJobResponse

func (response SignalSessionJob404JSONResponse) VisitSignalSessionJobResponse(w http.ResponseWriter) error

type SignalSessionJob500JSONResponse

type SignalSessionJob500JSONResponse struct{ ErrorInternalJSONResponse }

func (SignalSessionJob500JSONResponse) VisitSignalSessionJobResponse

func (response SignalSessionJob500JSONResponse) VisitSignalSessionJobResponse(w http.ResponseWriter) error

type SignalSessionJobJSONRequestBody

type SignalSessionJobJSONRequestBody = JobSignalRequest

SignalSessionJobJSONRequestBody defines body for SignalSessionJob for application/json ContentType.

type SignalSessionJobParams

type SignalSessionJobParams struct {
	XSessionID SessionIDRequired `json:"X-Session-ID"`
}

SignalSessionJobParams defines parameters for SignalSessionJob.

type SignalSessionJobRequestObject

type SignalSessionJobRequestObject struct {
	JobId  JobID `json:"jobId"`
	Params SignalSessionJobParams
	Body   *SignalSessionJobJSONRequestBody
}

type SignalSessionJobResponseObject

type SignalSessionJobResponseObject interface {
	VisitSignalSessionJobResponse(w http.ResponseWriter) error
}

type StdHTTPServerOptions added in v0.2.0

type StdHTTPServerOptions struct {
	BaseURL          string
	BaseRouter       ServeMux
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictHTTPServerOptions added in v0.2.0

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictHandlerFunc

type StrictHandlerFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request, request any) (any, error)

type StrictMiddlewareFunc

type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc

type StrictServerInterface

type StrictServerInterface interface {
	// ListMessages List stored conversation messages
	// (GET /messages)
	ListMessages(ctx context.Context, request ListMessagesRequestObject) (ListMessagesResponseObject, error)
	// GetSession Read session details
	// (GET /session)
	GetSession(ctx context.Context, request GetSessionRequestObject) (GetSessionResponseObject, error)
	// ListSessionAgentRuns List the child agent runs this session has started
	// (GET /session/agents)
	ListSessionAgentRuns(ctx context.Context, request ListSessionAgentRunsRequestObject) (ListSessionAgentRunsResponseObject, error)
	// CancelSessionAgentRun Cancel one child agent run without ending its parent turn
	// (POST /session/agents/{agentRunId}/cancel)
	CancelSessionAgentRun(ctx context.Context, request CancelSessionAgentRunRequestObject) (CancelSessionAgentRunResponseObject, error)
	// ListSessionAgentRunEvents Follow what one child agent run is doing
	// (GET /session/agents/{agentRunId}/messages)
	ListSessionAgentRunEvents(ctx context.Context, request ListSessionAgentRunEventsRequestObject) (ListSessionAgentRunEventsResponseObject, error)
	// CancelSession Request cancellation for the active turn
	// (POST /session/cancel)
	CancelSession(ctx context.Context, request CancelSessionRequestObject) (CancelSessionResponseObject, error)
	// ListSessionEvents List the session's pending events
	// (GET /session/events)
	ListSessionEvents(ctx context.Context, request ListSessionEventsRequestObject) (ListSessionEventsResponseObject, error)
	// PublishSessionEvent Report an event to the session from outside
	// (POST /session/events)
	PublishSessionEvent(ctx context.Context, request PublishSessionEventRequestObject) (PublishSessionEventResponseObject, error)
	// ListSessionJobs List the commands this session has started
	// (GET /session/jobs)
	ListSessionJobs(ctx context.Context, request ListSessionJobsRequestObject) (ListSessionJobsResponseObject, error)
	// ReadSessionJobOutput Read a bounded window of one job's output
	// (GET /session/jobs/{jobId}/output)
	ReadSessionJobOutput(ctx context.Context, request ReadSessionJobOutputRequestObject) (ReadSessionJobOutputResponseObject, error)
	// SignalSessionJob Stop one running job
	// (POST /session/jobs/{jobId}/signal)
	SignalSessionJob(ctx context.Context, request SignalSessionJobRequestObject) (SignalSessionJobResponseObject, error)
}

StrictServerInterface represents all server handlers.

type TooManyValuesForParamError added in v0.2.0

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error added in v0.2.0

type UnescapedCookieParamError added in v0.2.0

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error added in v0.2.0

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap added in v0.2.0

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshalingParamError added in v0.2.0

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error added in v0.2.0

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap added in v0.2.0

func (e *UnmarshalingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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