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 ¶
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
- type AgentRun
- type AgentRunCancelResponse
- type AgentRunCancelResponseState
- type AgentRunCompaction
- type AgentRunCompactionPage
- type AgentRunDefinition
- type AgentRunEvent
- type AgentRunEventPage
- type AgentRunEventPageState
- type AgentRunID
- type AgentRunMessage
- type AgentRunMessagePage
- type AgentRunMessageRole
- type AgentRunPage
- type AgentRunState
- type AgentSpace
- type AgentSpaceDocker
- type AgentSpaceKind
- type AgentSpaceList
- type AgentSpaceNetwork
- type CancelResponse
- type CancelSession202JSONResponse
- type CancelSession202ResponseHeaders
- type CancelSession400JSONResponse
- type CancelSession401JSONResponse
- type CancelSession404JSONResponse
- type CancelSession406JSONResponse
- type CancelSession500JSONResponse
- type CancelSessionAgentRun202JSONResponse
- type CancelSessionAgentRun202ResponseHeaders
- type CancelSessionAgentRun400JSONResponse
- type CancelSessionAgentRun401JSONResponse
- type CancelSessionAgentRun404JSONResponse
- type CancelSessionAgentRun406JSONResponse
- type CancelSessionAgentRun500JSONResponse
- type CancelSessionAgentRunParams
- type CancelSessionAgentRunRequestObject
- type CancelSessionAgentRunResponseObject
- type CancelSessionParams
- type CancelSessionRequestObject
- type CancelSessionResponseObject
- type Compaction
- type CompactionID
- type CompactionPage
- type ContextHash
- type ContextManifestEntry
- type ContextSnapshot
- type CronJob
- type CronJobList
- type CronRun
- type CronRunPage
- type CronRunState
- type DeleteSessionLearnedFile204Response
- type DeleteSessionLearnedFile204ResponseHeaders
- type DeleteSessionLearnedFile400JSONResponse
- type DeleteSessionLearnedFile401JSONResponse
- type DeleteSessionLearnedFile404JSONResponse
- type DeleteSessionLearnedFile406JSONResponse
- type DeleteSessionLearnedFile500JSONResponse
- type DeleteSessionLearnedFileParams
- type DeleteSessionLearnedFileRequestObject
- type DeleteSessionLearnedFileResponseObject
- type DeleteWorkspaceFile204Response
- type DeleteWorkspaceFile204ResponseHeaders
- type DeleteWorkspaceFile400JSONResponse
- type DeleteWorkspaceFile401JSONResponse
- type DeleteWorkspaceFile403JSONResponse
- type DeleteWorkspaceFile404JSONResponse
- type DeleteWorkspaceFile406JSONResponse
- type DeleteWorkspaceFile409JSONResponse
- type DeleteWorkspaceFile500JSONResponse
- type DeleteWorkspaceFileParams
- type DeleteWorkspaceFileRequestObject
- type DeleteWorkspaceFileResponseObject
- type Error
- type ErrorBadRequest
- type ErrorBadRequestJSONResponse
- type ErrorConflict
- type ErrorConflictJSONResponse
- type ErrorForbidden
- type ErrorForbiddenJSONResponse
- type ErrorInternal
- type ErrorInternalJSONResponse
- type ErrorNotAcceptable
- type ErrorNotAcceptableJSONResponse
- type ErrorNotFound
- type ErrorNotFoundJSONResponse
- type ErrorUnauthorized
- type ErrorUnauthorizedJSONResponse
- type FeedFrame
- type FeedPage
- type GetSession200JSONResponse
- type GetSession200ResponseHeaders
- type GetSession400JSONResponse
- type GetSession401JSONResponse
- type GetSession404JSONResponse
- type GetSession406JSONResponse
- type GetSession500JSONResponse
- type GetSessionAgentRun200JSONResponse
- type GetSessionAgentRun200ResponseHeaders
- type GetSessionAgentRun400JSONResponse
- type GetSessionAgentRun401JSONResponse
- type GetSessionAgentRun404JSONResponse
- type GetSessionAgentRun406JSONResponse
- type GetSessionAgentRun500JSONResponse
- type GetSessionAgentRunCompaction200JSONResponse
- type GetSessionAgentRunCompaction200ResponseHeaders
- type GetSessionAgentRunCompaction400JSONResponse
- type GetSessionAgentRunCompaction401JSONResponse
- type GetSessionAgentRunCompaction404JSONResponse
- type GetSessionAgentRunCompaction406JSONResponse
- type GetSessionAgentRunCompaction500JSONResponse
- type GetSessionAgentRunCompactionParams
- type GetSessionAgentRunCompactionRequestObject
- type GetSessionAgentRunCompactionResponseObject
- type GetSessionAgentRunParams
- type GetSessionAgentRunRequestObject
- type GetSessionAgentRunResponseObject
- type GetSessionCompaction200JSONResponse
- type GetSessionCompaction200ResponseHeaders
- type GetSessionCompaction400JSONResponse
- type GetSessionCompaction401JSONResponse
- type GetSessionCompaction404JSONResponse
- type GetSessionCompaction406JSONResponse
- type GetSessionCompaction500JSONResponse
- type GetSessionCompactionParams
- type GetSessionCompactionRequestObject
- type GetSessionCompactionResponseObject
- type GetSessionContextSnapshot200JSONResponse
- type GetSessionContextSnapshot200ResponseHeaders
- type GetSessionContextSnapshot400JSONResponse
- type GetSessionContextSnapshot401JSONResponse
- type GetSessionContextSnapshot404JSONResponse
- type GetSessionContextSnapshot406JSONResponse
- type GetSessionContextSnapshot500JSONResponse
- type GetSessionContextSnapshotParams
- type GetSessionContextSnapshotRequestObject
- type GetSessionContextSnapshotResponseObject
- type GetSessionLearnedFile200JSONResponse
- type GetSessionLearnedFile200ResponseHeaders
- type GetSessionLearnedFile400JSONResponse
- type GetSessionLearnedFile401JSONResponse
- type GetSessionLearnedFile404JSONResponse
- type GetSessionLearnedFile406JSONResponse
- type GetSessionLearnedFile500JSONResponse
- type GetSessionLearnedFileParams
- type GetSessionLearnedFileRequestObject
- type GetSessionLearnedFileResponseObject
- type GetSessionMCPStatus200JSONResponse
- type GetSessionMCPStatus200ResponseHeaders
- type GetSessionMCPStatus400JSONResponse
- type GetSessionMCPStatus401JSONResponse
- type GetSessionMCPStatus404JSONResponse
- type GetSessionMCPStatus406JSONResponse
- type GetSessionMCPStatus500JSONResponse
- type GetSessionMCPStatusParams
- type GetSessionMCPStatusRequestObject
- type GetSessionMCPStatusResponseObject
- type GetSessionParams
- type GetSessionPromptSnapshot200JSONResponse
- type GetSessionPromptSnapshot200ResponseHeaders
- type GetSessionPromptSnapshot400JSONResponse
- type GetSessionPromptSnapshot401JSONResponse
- type GetSessionPromptSnapshot404JSONResponse
- type GetSessionPromptSnapshot406JSONResponse
- type GetSessionPromptSnapshot500JSONResponse
- type GetSessionPromptSnapshotParams
- type GetSessionPromptSnapshotRequestObject
- type GetSessionPromptSnapshotResponseObject
- type GetSessionRequestObject
- type GetSessionResponseObject
- type InvalidParamFormatError
- type Job
- type JobID
- type JobOutput
- type JobOutputLine
- type JobOutputLineStream
- type JobOutputState
- type JobPage
- type JobSignalRecord
- type JobSignalRecordPage
- type JobSignalRecordSignal
- type JobSignalRecordStateAtRequest
- type JobSignalRequest
- type JobSignalRequestSignal
- type JobSignalResponse
- type JobSignalResponseState
- type JobState
- type LearnedFile
- type LearnedFileContent
- type LearnedFileList
- type LearnedKind
- type LearnedName
- type LearnedScope
- type Limit
- type ListAgentSpaces200JSONResponse
- type ListAgentSpaces200ResponseHeaders
- type ListAgentSpaces401JSONResponse
- type ListAgentSpaces406JSONResponse
- type ListAgentSpaces500JSONResponse
- type ListAgentSpacesRequestObject
- type ListAgentSpacesResponseObject
- type ListCronJobs200JSONResponse
- type ListCronJobs200ResponseHeaders
- type ListCronJobs401JSONResponse
- type ListCronJobs406JSONResponse
- type ListCronJobs500JSONResponse
- type ListCronJobsRequestObject
- type ListCronJobsResponseObject
- type ListCronRuns200JSONResponse
- type ListCronRuns200ResponseHeaders
- type ListCronRuns400JSONResponse
- type ListCronRuns401JSONResponse
- type ListCronRuns406JSONResponse
- type ListCronRuns500JSONResponse
- type ListCronRunsParams
- type ListCronRunsRequestObject
- type ListCronRunsResponseObject
- type ListMessages200JSONResponse
- type ListMessages200ResponseHeaders
- type ListMessages400JSONResponse
- type ListMessages401JSONResponse
- type ListMessages404JSONResponse
- type ListMessages406JSONResponse
- type ListMessages500JSONResponse
- type ListMessagesParams
- type ListMessagesParamsOrder
- type ListMessagesRequestObject
- type ListMessagesResponseObject
- type ListModels200JSONResponse
- type ListModels200ResponseHeaders
- type ListModels401JSONResponse
- type ListModels406JSONResponse
- type ListModels500JSONResponse
- type ListModelsRequestObject
- type ListModelsResponseObject
- type ListSessionAgentRunCompactions200JSONResponse
- type ListSessionAgentRunCompactions200ResponseHeaders
- type ListSessionAgentRunCompactions400JSONResponse
- type ListSessionAgentRunCompactions401JSONResponse
- type ListSessionAgentRunCompactions404JSONResponse
- type ListSessionAgentRunCompactions406JSONResponse
- type ListSessionAgentRunCompactions500JSONResponse
- type ListSessionAgentRunCompactionsParams
- type ListSessionAgentRunCompactionsRequestObject
- type ListSessionAgentRunCompactionsResponseObject
- type ListSessionAgentRunEvents200JSONResponse
- type ListSessionAgentRunEvents200ResponseHeaders
- type ListSessionAgentRunEvents400JSONResponse
- type ListSessionAgentRunEvents401JSONResponse
- type ListSessionAgentRunEvents404JSONResponse
- type ListSessionAgentRunEvents406JSONResponse
- type ListSessionAgentRunEvents500JSONResponse
- type ListSessionAgentRunEventsParams
- type ListSessionAgentRunEventsRequestObject
- type ListSessionAgentRunEventsResponseObject
- type ListSessionAgentRunMessages200JSONResponse
- type ListSessionAgentRunMessages200ResponseHeaders
- type ListSessionAgentRunMessages400JSONResponse
- type ListSessionAgentRunMessages401JSONResponse
- type ListSessionAgentRunMessages404JSONResponse
- type ListSessionAgentRunMessages406JSONResponse
- type ListSessionAgentRunMessages500JSONResponse
- type ListSessionAgentRunMessagesParams
- type ListSessionAgentRunMessagesRequestObject
- type ListSessionAgentRunMessagesResponseObject
- type ListSessionAgentRuns200JSONResponse
- type ListSessionAgentRuns200ResponseHeaders
- type ListSessionAgentRuns400JSONResponse
- type ListSessionAgentRuns401JSONResponse
- type ListSessionAgentRuns404JSONResponse
- type ListSessionAgentRuns406JSONResponse
- type ListSessionAgentRuns500JSONResponse
- type ListSessionAgentRunsParams
- type ListSessionAgentRunsParamsState
- type ListSessionAgentRunsRequestObject
- type ListSessionAgentRunsResponseObject
- type ListSessionAgentSpaceDecisions200JSONResponse
- type ListSessionAgentSpaceDecisions200ResponseHeaders
- type ListSessionAgentSpaceDecisions400JSONResponse
- type ListSessionAgentSpaceDecisions401JSONResponse
- type ListSessionAgentSpaceDecisions404JSONResponse
- type ListSessionAgentSpaceDecisions406JSONResponse
- type ListSessionAgentSpaceDecisions500JSONResponse
- type ListSessionAgentSpaceDecisionsParams
- type ListSessionAgentSpaceDecisionsRequestObject
- type ListSessionAgentSpaceDecisionsResponseObject
- type ListSessionCompactions200JSONResponse
- type ListSessionCompactions200ResponseHeaders
- type ListSessionCompactions400JSONResponse
- type ListSessionCompactions401JSONResponse
- type ListSessionCompactions404JSONResponse
- type ListSessionCompactions406JSONResponse
- type ListSessionCompactions500JSONResponse
- type ListSessionCompactionsParams
- type ListSessionCompactionsRequestObject
- type ListSessionCompactionsResponseObject
- type ListSessionEvents200JSONResponse
- type ListSessionEvents200ResponseHeaders
- type ListSessionEvents400JSONResponse
- type ListSessionEvents401JSONResponse
- type ListSessionEvents404JSONResponse
- type ListSessionEvents406JSONResponse
- type ListSessionEvents500JSONResponse
- type ListSessionEventsParams
- type ListSessionEventsParamsOrder
- type ListSessionEventsRequestObject
- type ListSessionEventsResponseObject
- type ListSessionFeed200JSONResponse
- type ListSessionFeed200ResponseHeaders
- type ListSessionFeed400JSONResponse
- type ListSessionFeed401JSONResponse
- type ListSessionFeed404JSONResponse
- type ListSessionFeed406JSONResponse
- type ListSessionFeed500JSONResponse
- type ListSessionFeedParams
- type ListSessionFeedRequestObject
- type ListSessionFeedResponseObject
- type ListSessionJobSignalRequests200JSONResponse
- type ListSessionJobSignalRequests200ResponseHeaders
- type ListSessionJobSignalRequests400JSONResponse
- type ListSessionJobSignalRequests401JSONResponse
- type ListSessionJobSignalRequests404JSONResponse
- type ListSessionJobSignalRequests406JSONResponse
- type ListSessionJobSignalRequests500JSONResponse
- type ListSessionJobSignalRequestsParams
- type ListSessionJobSignalRequestsRequestObject
- type ListSessionJobSignalRequestsResponseObject
- type ListSessionJobs200JSONResponse
- type ListSessionJobs200ResponseHeaders
- type ListSessionJobs400JSONResponse
- type ListSessionJobs401JSONResponse
- type ListSessionJobs404JSONResponse
- type ListSessionJobs406JSONResponse
- type ListSessionJobs500JSONResponse
- type ListSessionJobsParams
- type ListSessionJobsParamsState
- type ListSessionJobsRequestObject
- type ListSessionJobsResponseObject
- type ListSessionLearnedFiles200JSONResponse
- type ListSessionLearnedFiles200ResponseHeaders
- type ListSessionLearnedFiles400JSONResponse
- type ListSessionLearnedFiles401JSONResponse
- type ListSessionLearnedFiles404JSONResponse
- type ListSessionLearnedFiles406JSONResponse
- type ListSessionLearnedFiles500JSONResponse
- type ListSessionLearnedFilesParams
- type ListSessionLearnedFilesRequestObject
- type ListSessionLearnedFilesResponseObject
- type ListSessionModelRunCalls200JSONResponse
- type ListSessionModelRunCalls200ResponseHeaders
- type ListSessionModelRunCalls400JSONResponse
- type ListSessionModelRunCalls401JSONResponse
- type ListSessionModelRunCalls404JSONResponse
- type ListSessionModelRunCalls406JSONResponse
- type ListSessionModelRunCalls500JSONResponse
- type ListSessionModelRunCallsParams
- type ListSessionModelRunCallsRequestObject
- type ListSessionModelRunCallsResponseObject
- type ListSessionModelRuns200JSONResponse
- type ListSessionModelRuns200ResponseHeaders
- type ListSessionModelRuns400JSONResponse
- type ListSessionModelRuns401JSONResponse
- type ListSessionModelRuns404JSONResponse
- type ListSessionModelRuns406JSONResponse
- type ListSessionModelRuns500JSONResponse
- type ListSessionModelRunsParams
- type ListSessionModelRunsParamsStage
- type ListSessionModelRunsParamsState
- type ListSessionModelRunsRequestObject
- type ListSessionModelRunsResponseObject
- type ListSessionNotices200JSONResponse
- type ListSessionNotices200ResponseHeaders
- type ListSessionNotices400JSONResponse
- type ListSessionNotices401JSONResponse
- type ListSessionNotices404JSONResponse
- type ListSessionNotices406JSONResponse
- type ListSessionNotices500JSONResponse
- type ListSessionNoticesParams
- type ListSessionNoticesRequestObject
- type ListSessionNoticesResponseObject
- type ListSessionTurns200JSONResponse
- type ListSessionTurns200ResponseHeaders
- type ListSessionTurns400JSONResponse
- type ListSessionTurns401JSONResponse
- type ListSessionTurns404JSONResponse
- type ListSessionTurns406JSONResponse
- type ListSessionTurns500JSONResponse
- type ListSessionTurnsParams
- type ListSessionTurnsRequestObject
- type ListSessionTurnsResponseObject
- type ListSessionWorkers200JSONResponse
- type ListSessionWorkers200ResponseHeaders
- type ListSessionWorkers400JSONResponse
- type ListSessionWorkers401JSONResponse
- type ListSessionWorkers404JSONResponse
- type ListSessionWorkers406JSONResponse
- type ListSessionWorkers500JSONResponse
- type ListSessionWorkersParams
- type ListSessionWorkersRequestObject
- type ListSessionWorkersResponseObject
- type ListSessions200JSONResponse
- type ListSessions200ResponseHeaders
- type ListSessions400JSONResponse
- type ListSessions401JSONResponse
- type ListSessions406JSONResponse
- type ListSessions500JSONResponse
- type ListSessionsParams
- type ListSessionsRequestObject
- type ListSessionsResponseObject
- type ListWorkspaceFiles200JSONResponse
- type ListWorkspaceFiles200ResponseHeaders
- type ListWorkspaceFiles400JSONResponse
- type ListWorkspaceFiles401JSONResponse
- type ListWorkspaceFiles403JSONResponse
- type ListWorkspaceFiles404JSONResponse
- type ListWorkspaceFiles406JSONResponse
- type ListWorkspaceFiles500JSONResponse
- type ListWorkspaceFilesParams
- type ListWorkspaceFilesRequestObject
- type ListWorkspaceFilesResponseObject
- type ListWorkspaceRoots200JSONResponse
- type ListWorkspaceRoots200ResponseHeaders
- type ListWorkspaceRoots401JSONResponse
- type ListWorkspaceRoots406JSONResponse
- type ListWorkspaceRoots500JSONResponse
- type ListWorkspaceRootsRequestObject
- type ListWorkspaceRootsResponseObject
- type MCPPrompt
- type MCPPromptArgument
- type MCPServerFeature
- type MCPServerInfo
- type MCPServerStatus
- type MCPServerStatusSource
- type MCPServerStatusState
- type MCPServerStatusTransport
- type MCPStatusReport
- type Message
- type MessageImageInfo
- type MessageInjectedKind
- type MessagePage
- type MessageRole
- type MessageToolCall
- type MiddlewareFunc
- type Model
- type ModelCall
- type ModelCallPage
- type ModelCallState
- type ModelList
- type ModelRun
- type ModelRunID
- type ModelRunPage
- type ModelRunStage
- type ModelRunState
- type Offset
- type OpenSession200JSONResponse
- type OpenSession200ResponseHeaders
- type OpenSession400JSONResponse
- type OpenSession401JSONResponse
- type OpenSession403JSONResponse
- type OpenSession404JSONResponse
- type OpenSession406JSONResponse
- type OpenSession409JSONResponse
- type OpenSession500JSONResponse
- type OpenSessionJSONRequestBody
- type OpenSessionRequest
- type OpenSessionRequestObject
- type OpenSessionResponseObject
- type OpenSystemSession200JSONResponse
- type OpenSystemSession200ResponseHeaders
- type OpenSystemSession401JSONResponse
- type OpenSystemSession403JSONResponse
- type OpenSystemSession406JSONResponse
- type OpenSystemSession500JSONResponse
- type OpenSystemSessionRequestObject
- type OpenSystemSessionResponseObject
- type OpenedSession
- type Order
- type PromptHash
- type PromptSnapshot
- type PublishSessionNotice202JSONResponse
- type PublishSessionNotice202ResponseHeaders
- type PublishSessionNotice400JSONResponse
- type PublishSessionNotice401JSONResponse
- type PublishSessionNotice404JSONResponse
- type PublishSessionNotice406JSONResponse
- type PublishSessionNotice500JSONResponse
- type PublishSessionNoticeJSONRequestBody
- type PublishSessionNoticeParams
- type PublishSessionNoticeRequestObject
- type PublishSessionNoticeResponseObject
- type ReadSessionJobOutput200JSONResponse
- type ReadSessionJobOutput200ResponseHeaders
- type ReadSessionJobOutput400JSONResponse
- type ReadSessionJobOutput401JSONResponse
- type ReadSessionJobOutput404JSONResponse
- type ReadSessionJobOutput406JSONResponse
- type ReadSessionJobOutput500JSONResponse
- type ReadSessionJobOutputParams
- type ReadSessionJobOutputParamsStream
- type ReadSessionJobOutputRequestObject
- type ReadSessionJobOutputResponseObject
- type ReadWorkspaceFile200JSONResponse
- type ReadWorkspaceFile200ResponseHeaders
- type ReadWorkspaceFile400JSONResponse
- type ReadWorkspaceFile401JSONResponse
- type ReadWorkspaceFile403JSONResponse
- type ReadWorkspaceFile404JSONResponse
- type ReadWorkspaceFile406JSONResponse
- type ReadWorkspaceFile500JSONResponse
- type ReadWorkspaceFileParams
- type ReadWorkspaceFileRequestObject
- type ReadWorkspaceFileResponseObject
- type ReconfigureSession200JSONResponse
- type ReconfigureSession200ResponseHeaders
- type ReconfigureSession400JSONResponse
- type ReconfigureSession401JSONResponse
- type ReconfigureSession403JSONResponse
- type ReconfigureSession404JSONResponse
- type ReconfigureSession406JSONResponse
- type ReconfigureSession409JSONResponse
- type ReconfigureSession500JSONResponse
- type ReconfigureSessionJSONRequestBody
- type ReconfigureSessionParams
- type ReconfigureSessionRequest
- type ReconfigureSessionRequestObject
- type ReconfigureSessionResponseObject
- type RequiredHeaderError
- type RequiredParamError
- type ServeMux
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CancelSession(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CancelSessionAgentRun(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteSessionLearnedFile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteWorkspaceFile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSession(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSessionAgentRun(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSessionAgentRunCompaction(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSessionCompaction(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSessionContextSnapshot(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSessionLearnedFile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSessionMCPStatus(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSessionPromptSnapshot(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListAgentSpaces(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListCronJobs(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListCronRuns(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListMessages(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListModels(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionAgentRunCompactions(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionAgentRunEvents(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionAgentRunMessages(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionAgentRuns(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionAgentSpaceDecisions(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionCompactions(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionEvents(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionFeed(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionJobSignalRequests(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionJobs(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionLearnedFiles(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionModelRunCalls(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionModelRuns(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionNotices(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionTurns(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessionWorkers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSessions(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListWorkspaceFiles(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListWorkspaceRoots(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) OpenSession(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) OpenSystemSession(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PublishSessionNotice(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReadSessionJobOutput(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReadWorkspaceFile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReconfigureSession(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) SignalSessionJob(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) WriteWorkspaceFile(w http.ResponseWriter, r *http.Request)
- type Session
- type SessionAgentSpaceDecision
- type SessionAgentSpaceDecisionPage
- type SessionIDRequired
- type SessionNotice
- type SessionNoticeDelivery
- type SessionNoticePage
- type SessionNoticeRequest
- type SessionNoticeRequestDelivery
- type SessionPage
- type SignalSessionJob202JSONResponse
- type SignalSessionJob202ResponseHeaders
- type SignalSessionJob400JSONResponse
- type SignalSessionJob401JSONResponse
- type SignalSessionJob404JSONResponse
- type SignalSessionJob406JSONResponse
- type SignalSessionJob500JSONResponse
- type SignalSessionJobJSONRequestBody
- type SignalSessionJobParams
- type SignalSessionJobRequestObject
- type SignalSessionJobResponseObject
- type StdHTTPServerOptions
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- type TranscriptEvent
- type TranscriptEventPage
- type Turn
- type TurnPage
- type TurnState
- type UnescapedCookieParamError
- type UnmarshalingParamError
- type WorkerGeneration
- type WorkerGenerationKind
- type WorkerGenerationPage
- type WorkerGenerationState
- type WorkspaceFileContent
- type WorkspaceFileEntry
- type WorkspaceFileListing
- type WorkspaceFileType
- type WorkspaceFileWrite
- type WorkspaceRootList
- type WriteWorkspaceFile200JSONResponse
- type WriteWorkspaceFile200ResponseHeaders
- type WriteWorkspaceFile400JSONResponse
- type WriteWorkspaceFile401JSONResponse
- type WriteWorkspaceFile403JSONResponse
- type WriteWorkspaceFile404JSONResponse
- type WriteWorkspaceFile406JSONResponse
- type WriteWorkspaceFile500JSONResponse
- type WriteWorkspaceFileJSONRequestBody
- type WriteWorkspaceFileParams
- type WriteWorkspaceFileRequestObject
- type WriteWorkspaceFileResponseObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
Types ¶
type AgentRun ¶
type AgentRun struct {
// AgentRunId The run's ID. Agents and clients use it to address the child, for example as the `to` of a message.
AgentRunId openapi_types.UUID `json:"agentRunId"`
// AllowedTools The tool names the agent definition limits the child to. An empty array means the child may use every tool.
AllowedTools []interface{} `json:"allowedTools"`
// CancelRequested True once a cancellation was requested for the run, through `POST /session/agents/{agentRunId}/cancel`, the `stopAgent` tool, or the control surface.
CancelRequested bool `json:"cancelRequested"`
// CompletionTokenCount The completion tokens the provider reported for the run. 0 until the run ends.
CompletionTokenCount int64 `json:"completionTokenCount"`
// Definition Where the child's instructions came from.
//
// - `stored`: an agent file under `.agents/agents/` in a harness layer, or a core agent.
// - `ad-hoc`: a one-off definition the launching agent passed inline to `launchAgent`, which is never written to disk.
Definition AgentRunDefinition `json:"definition"`
// Depth How deep the run sits below the root conversation. A child of the root has depth 1, its children depth 2, and so on, up to the deployment's maximum child agent depth.
Depth int64 `json:"depth"`
// EndedAt When the run ended, in RFC 3339 format. Absent while it is `running`.
EndedAt *time.Time `json:"endedAt,omitempty"`
// EventCount How many events the run has stored, which is also the `sequence` of its latest event.
EventCount int64 `json:"eventCount"`
// FailureClassification Why the run did not complete: `agentRun` when it failed, `cancelled` when it was stopped, or `interrupted` when a restart cut it off. Empty for a run that is running or completed.
FailureClassification string `json:"failureClassification"`
// FailureDetail The error text for a failed, cancelled, or interrupted run. Empty otherwise.
FailureDetail string `json:"failureDetail"`
// FinishReason The finish reason the provider reported for the final model response, such as `stop`. Empty until the run ends.
FinishReason string `json:"finishReason"`
// Instructions The child's agent instructions: the body of the stored agent file, or the inline definition's instructions.
Instructions string `json:"instructions"`
// Model The provider's model ID for `modelReference`.
Model string `json:"model"`
// ModelReference The qualified model reference the child runs on, in `provider/model` form. A child always uses the model of the turn that launched it.
ModelReference string `json:"modelReference"`
// Name The agent's name: the stored agent's name, or the name given in an inline definition.
Name string `json:"name"`
// ParentAgentRunId The agent run that launched this child. Absent when the session's root conversation launched it.
ParentAgentRunId *openapi_types.UUID `json:"parentAgentRunId,omitempty"`
// ParentToolCallId The ID of the `launchAgent` tool call that started this run. Absent when none was recorded.
ParentToolCallId *string `json:"parentToolCallId,omitempty"`
// ParentTurnId The session turn during which the run was launched. A child can keep running after that turn ends.
ParentTurnId openapi_types.UUID `json:"parentTurnId"`
// Paused True while the run is `running` but its work is paused by a Stop, a crash, or a failure. A message to the run resumes it. Absent when the run is not paused.
Paused *bool `json:"paused,omitempty"`
// PromptTokenCount The prompt tokens the provider reported for the run. 0 until the run ends.
PromptTokenCount int64 `json:"promptTokenCount"`
// Question The question a waiting run asked. Absent when `waiting` is false.
Question *string `json:"question,omitempty"`
// RequestId The request ID of the turn that launched the run.
RequestId openapi_types.UUID `json:"requestId"`
// ResponseMessages The model messages recorded when the run ended. An empty array until then.
ResponseMessages []interface{} `json:"responseMessages"`
// ResponseText The child's whole final answer. Empty until the run ends, and empty when it did not complete.
ResponseText string `json:"responseText"`
// ResponseThinking The reasoning text the model returned with the final answer, when the provider reports it. Empty otherwise.
ResponseThinking string `json:"responseThinking"`
// SessionId The session the run belongs to.
SessionId openapi_types.UUID `json:"sessionId"`
// StartedAt When the run started, in RFC 3339 format.
StartedAt time.Time `json:"startedAt"`
// State The stored state of the run.
//
// - `running`: the child is working, waiting on a question, or paused.
// - `completed`: it gave its final answer.
// - `failed`: it ended with an error.
// - `cancelled`: it was stopped.
// - `interrupted`: the controller restarted while the run was still marked running; the run stays readable and can be resumed, which returns it to `running`.
State AgentRunState `json:"state"`
// SystemPrompt The full system prompt the child runs with. It is updated when a `changeDirectory` call resolves a new harness.
SystemPrompt string `json:"systemPrompt"`
// Task The task text the launching agent gave the child.
Task string `json:"task"`
// Waiting True while the run is `running` and waits for an answer to a question it asked with the `ask` tool. Computed when you read the run, from its `agent.run.question` and `agent.run.answer` events.
Waiting bool `json:"waiting"`
// WorkerGenerationId The worker generation currently running this child, or the last one that ran it. Absent when none was recorded.
WorkerGenerationId *string `json:"workerGenerationId,omitempty"`
// Workspace The child's current directory, updated each time it changes directory with `changeDirectory`. It starts as the launching agent's current directory.
Workspace string `json:"workspace"`
}
AgentRun One child agent run: a separate agent conversation that an agent in the session started with the `launchAgent` tool. The record is written before the child does any work and is updated as it runs and when it ends. Returned by `GET /session/agents` and `GET /session/agents/{agentRunId}`.
type AgentRunCancelResponse ¶
type AgentRunCancelResponse struct {
// AgentRunId The run the request named.
AgentRunId openapi_types.UUID `json:"agentRunId"`
// CancelRequested True when this request recorded the cancellation of a `running` or `interrupted` run. False when the run had already ended or a cancellation was already recorded; that is not an error, and `state` reports the current state. An unknown run returns `404` instead.
CancelRequested bool `json:"cancelRequested"`
// State The run's state after the request, with the same values as `AgentRun.state`. `cancelled` when the cancellation took effect at once. `running` while the worker is still stopping the child; follow its events or read the run to see it end.
State AgentRunCancelResponseState `json:"state"`
}
AgentRunCancelResponse The outcome of a cancellation request for one child agent run. Returned by `POST /session/agents/{agentRunId}/cancel`.
type AgentRunCancelResponseState ¶
type AgentRunCancelResponseState string
AgentRunCancelResponseState The run's state after the request, with the same values as `AgentRun.state`. `cancelled` when the cancellation took effect at once. `running` while the worker is still stopping the child; follow its events or read the run to see it end.
const ( AgentRunCancelResponseStateCancelled AgentRunCancelResponseState = "cancelled" AgentRunCancelResponseStateCompleted AgentRunCancelResponseState = "completed" AgentRunCancelResponseStateFailed AgentRunCancelResponseState = "failed" AgentRunCancelResponseStateInterrupted AgentRunCancelResponseState = "interrupted" AgentRunCancelResponseStateRunning AgentRunCancelResponseState = "running" )
Defines values for AgentRunCancelResponseState.
func (AgentRunCancelResponseState) Valid ¶
func (e AgentRunCancelResponseState) Valid() bool
Valid indicates whether the value is a known member of the AgentRunCancelResponseState enum.
type AgentRunCompaction ¶ added in v0.11.0
type AgentRunCompaction struct {
// AgentRunId The child agent run whose transcript the compaction summarizes.
AgentRunId openapi_types.UUID `json:"agentRunId"`
// CreatedAt When the compaction was stored, in RFC 3339 format.
CreatedAt time.Time `json:"createdAt"`
// DirectFromSequence The `sequence` of the first raw message this compaction covered itself.
DirectFromSequence int64 `json:"directFromSequence"`
// DirectToSequence The `sequence` of the last raw message this compaction covered itself.
DirectToSequence int64 `json:"directToSequence"`
// FromMessageId The first child message of the whole lineage this summary covers, including what earlier summaries covered.
FromMessageId openapi_types.UUID `json:"fromMessageId"`
// FromSequence The `sequence` of the first message of the whole covered lineage.
FromSequence int64 `json:"fromSequence"`
// Id The compaction's ID.
Id openapi_types.UUID `json:"id"`
// InputTokenCount The prompt tokens the provider reported for the summarizing call.
InputTokenCount int64 `json:"inputTokenCount"`
// Model The model ID that wrote the summary.
Model string `json:"model"`
// ParentCompactionId The earlier compaction this one supersedes. Absent for the first compaction in the chain.
ParentCompactionId *openapi_types.UUID `json:"parentCompactionId,omitempty"`
// PromptHash The hex SHA-256 of the compaction instructions that produced the summary, so you can tell which instructions were used after the file changes.
PromptHash string `json:"promptHash"`
// SessionId The session the run belongs to.
SessionId openapi_types.UUID `json:"sessionId"`
// SourceMessageCount How many messages the summary covers, including those its predecessors covered.
SourceMessageCount int64 `json:"sourceMessageCount"`
// Summary The summary text that replaces the covered messages in the child's context.
Summary string `json:"summary"`
// SummaryTokenCount The completion tokens the provider reported for the summary.
SummaryTokenCount int64 `json:"summaryTokenCount"`
// ToMessageId The last child message this summary covers.
ToMessageId openapi_types.UUID `json:"toMessageId"`
// ToSequence The `sequence` of the last covered message. Messages after it stay raw.
ToSequence int64 `json:"toSequence"`
}
AgentRunCompaction One immutable summary covering a completed prefix of one child agent run's transcript. `directFromSequence` and `directToSequence` name only the messages this row covered itself; `fromSequence` and `toSequence` span the whole superseded lineage. Returned by the child compaction endpoints.
type AgentRunCompactionPage ¶ added in v0.11.0
type AgentRunCompactionPage struct {
// Compactions The compaction records on this page, newest first.
Compactions []AgentRunCompaction `json:"compactions"`
// HasMore True when more records follow this page. Request the next page with `offset` increased by `limit`.
HasMore bool `json:"hasMore"`
// Limit The page size the server used.
Limit int32 `json:"limit"`
// Offset The number of records skipped before this page.
Offset int32 `json:"offset"`
}
AgentRunCompactionPage One page of a child agent run's compaction records, newest first. Returned by `GET /session/agents/{agentRunId}/compactions`.
type AgentRunDefinition ¶
type AgentRunDefinition string
AgentRunDefinition Where the child's instructions came from.
- `stored`: an agent file under `.agents/agents/` in a harness layer, or a core agent. - `ad-hoc`: a one-off definition the launching agent passed inline to `launchAgent`, which is never written to disk.
const ( AgentRunDefinitionAdHoc AgentRunDefinition = "ad-hoc" 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 When the event was recorded, in RFC 3339 format.
CreatedAt time.Time `json:"createdAt"`
// Payload Child step data. Queued, delivered and undelivered message events carry `message` and an optional `acceptanceId` UUID linking the same accepted message. Question and answer events carry an optional `callId` linking the `ask` tool call. Older stored events omit these IDs. Absent when the event has no data.
Payload *map[string]interface{} `json:"payload,omitempty"`
// Sequence The event's position in this run's own event stream, starting at 1. It is separate from the session feed sequence.
Sequence int64 `json:"sequence"`
// Type The event type: `agent.run.started`, `agent.run.text.delta`, `agent.run.thinking.delta`, `agent.run.tool.use`, `agent.run.tool.result`, `agent.run.assistant.message`, `agent.run.message.injected`, `agent.run.message.queued`, `agent.run.message.delivered`, `agent.run.message.undelivered`, `agent.run.question`, `agent.run.answer`, `agent.run.provider.retry`, or one of the terminal types `agent.run.completed`, `agent.run.failed`, and `agent.run.cancelled`.
Type string `json:"type"`
}
AgentRunEvent One stored step of a child agent run, such as `agent.run.text.delta` or `agent.run.tool.use`. The same step reaches connected WebSocket clients live as an `agent.run.*` frame.
type AgentRunEventPage ¶
type AgentRunEventPage struct {
// AgentRunId The run the events belong to.
AgentRunId openapi_types.UUID `json:"agentRunId"`
// Events The events on this page, oldest first.
Events []AgentRunEvent `json:"events"`
// HasMore True when more events already exist after this page. False does not mean the run has ended; check `state`.
HasMore bool `json:"hasMore"`
// NextCursor Pass this back as `cursor` to continue after this page. It is the `sequence` of the last event returned, or the `cursor` you sent when the page is empty.
NextCursor int64 `json:"nextCursor"`
// State The run's stored state when the page was read, with the same values as `AgentRun.state`. A run waiting on a question reports `running`.
State AgentRunEventPageState `json:"state"`
}
AgentRunEventPage One page of a child agent run's events in ascending `sequence` order, with a cursor to continue from. Returned by `GET /session/agents/{agentRunId}/events`.
type AgentRunEventPageState ¶
type AgentRunEventPageState string
AgentRunEventPageState The run's stored state when the page was read, with the same values as `AgentRun.state`. A run waiting on a question reports `running`.
const ( AgentRunEventPageStateCancelled AgentRunEventPageState = "cancelled" AgentRunEventPageStateCompleted AgentRunEventPageState = "completed" AgentRunEventPageStateFailed AgentRunEventPageState = "failed" AgentRunEventPageStateInterrupted AgentRunEventPageState = "interrupted" 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 AgentRunMessage ¶ added in v0.11.0
type AgentRunMessage struct {
// AgentRunId The child agent run whose transcript holds the message.
AgentRunId openapi_types.UUID `json:"agentRunId"`
// CompactionId The child compaction that directly covered this message. Absent while the message is still raw.
CompactionId *openapi_types.UUID `json:"compactionId,omitempty"`
// Content The message text. For a received message, a `<message>` block that names the sender.
Content string `json:"content"`
// CreatedAt When the message was stored, in RFC 3339 format.
CreatedAt time.Time `json:"createdAt"`
// Id The message's ID.
Id openapi_types.UUID `json:"id"`
// Images The images the message carries, without their bytes, such as an image the child's readFile read. Absent when it has none.
Images *[]MessageImageInfo `json:"images,omitempty"`
// Incomplete True when the run was interrupted by a restart before it finished. Peen clears the flag when the run resumes.
Incomplete bool `json:"incomplete"`
// IsError True when a tool result reports an error.
IsError bool `json:"isError"`
// Model The qualified model reference that produced an assistant message, in `provider/model` form. Absent on other messages.
Model *string `json:"model,omitempty"`
// Role Who the message is from.
//
// - `user`: the task, or a message the child received from another agent, from you, or an injected image.
// - `assistant`: a model reply.
// - `tool`: a tool result.
Role AgentRunMessageRole `json:"role"`
// Sequence The message's position in the child's transcript, starting at 1.
Sequence int64 `json:"sequence"`
// SessionId The session the run belongs to.
SessionId openapi_types.UUID `json:"sessionId"`
// Thinking The reasoning text the model returned with an assistant message. Absent when there is none.
Thinking *string `json:"thinking,omitempty"`
// ToolCallId The ID of the tool call a `tool` message answers. Absent on other messages.
ToolCallId *string `json:"toolCallId,omitempty"`
// ToolCalls The tool calls an assistant message made, in the same shape as a session message's `toolCalls`. An empty array when it made none.
ToolCalls *[]MessageToolCall `json:"toolCalls,omitempty"`
}
AgentRunMessage One prompt-visible record in a child agent run's own transcript. It carries no turn: a child belongs to its agent run, not to a session turn's message sequence. Returned by `GET /session/agents/{agentRunId}/messages`.
type AgentRunMessagePage ¶ added in v0.11.0
type AgentRunMessagePage struct {
// HasMore True when more messages follow this page. Request the next page with `offset` increased by `limit`.
HasMore bool `json:"hasMore"`
// Limit The page size the server used.
Limit int32 `json:"limit"`
// Messages The messages on this page, in `sequence` order.
Messages []AgentRunMessage `json:"messages"`
// Offset The number of messages skipped before this page.
Offset int32 `json:"offset"`
}
AgentRunMessagePage One page of a child agent run's transcript, oldest first. Returned by `GET /session/agents/{agentRunId}/messages`.
type AgentRunMessageRole ¶ added in v0.11.0
type AgentRunMessageRole string
AgentRunMessageRole Who the message is from.
- `user`: the task, or a message the child received from another agent, from you, or an injected image. - `assistant`: a model reply. - `tool`: a tool result.
const ( AgentRunMessageRoleAssistant AgentRunMessageRole = "assistant" AgentRunMessageRoleTool AgentRunMessageRole = "tool" AgentRunMessageRoleUser AgentRunMessageRole = "user" )
Defines values for AgentRunMessageRole.
func (AgentRunMessageRole) Valid ¶ added in v0.11.0
func (e AgentRunMessageRole) Valid() bool
Valid indicates whether the value is a known member of the AgentRunMessageRole enum.
type AgentRunPage ¶
type AgentRunPage struct {
// Agents The runs on this page, newest first.
Agents []AgentRun `json:"agents"`
// HasMore True when more runs follow this page. Request the next page with `offset` increased by `limit`.
HasMore bool `json:"hasMore"`
// Limit The page size the server used.
Limit int32 `json:"limit"`
// Offset The number of runs skipped before this page.
Offset int32 `json:"offset"`
}
AgentRunPage One page of a session's child agent runs, newest first. Returned by `GET /session/agents`.
type AgentRunState ¶
type AgentRunState string
AgentRunState The stored state of the run.
- `running`: the child is working, waiting on a question, or paused. - `completed`: it gave its final answer. - `failed`: it ended with an error. - `cancelled`: it was stopped. - `interrupted`: the controller restarted while the run was still marked running; the run stays readable and can be resumed, which returns it to `running`.
const ( AgentRunStateCancelled AgentRunState = "cancelled" AgentRunStateCompleted AgentRunState = "completed" AgentRunStateFailed AgentRunState = "failed" AgentRunStateInterrupted AgentRunState = "interrupted" 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 AgentSpace ¶ added in v0.19.0
type AgentSpace struct {
// CapabilityWarnings One operator-facing sentence for each risky grant this space makes (`docker: full`, `docker: readonly`, `network: host`, `sudo: true`). Empty for a space that grants nothing risky.
CapabilityWarnings []string `json:"capabilityWarnings"`
// Docker How much of the host Docker daemon the space reaches. Set only for kind `docker`.
//
// - `none`: no access.
// - `readonly`: the worker gets a controller-run proxy that answers only read requests (list and inspect containers, images, networks, and volumes, and watch events), with environment values redacted from inspect output.
// - `full`: the controller's Docker socket is mounted, which is host root.
Docker *AgentSpaceDocker `json:"docker,omitempty"`
// HostRootEquivalent True when this space grants access that is effectively host root, which is `docker: full`.
HostRootEquivalent bool `json:"hostRootEquivalent"`
// Kind Where the agent runs.
//
// - `control`: where the controller runs. Offered only when the controller cannot reach a Docker daemon.
// - `docker`: in its own container, shaped by a Docker profile.
Kind AgentSpaceKind `json:"kind"`
// Name What a client names to pick this agent space: `control` or `docker:<profile>`.
Name string `json:"name"`
// Network The network the worker container gets. Set only for kind `docker`.
//
// - `none`: no network.
// - `bridge`: Docker's default bridge network.
// - `host`: the host's network, so the worker can reach every service the host can.
Network *AgentSpaceNetwork `json:"network,omitempty"`
// Profile The Docker profile behind the space, the part of `name` after `docker:`. Set only for kind `docker`.
Profile *string `json:"profile,omitempty"`
// Revision The revision the operator gave this Docker profile in its configuration, `0` when unset and for `control`. Each worker generation records the revision it started under, so a durable record says which definition ran.
Revision int64 `json:"revision"`
// Sudo True when the agent may run commands as root inside the worker container. Set only for kind `docker`.
Sudo *bool `json:"sudo,omitempty"`
}
AgentSpace One place a session's agent can run, as listed by `GET /agent-spaces`. Every field comes from deployment configuration; a client only names the space.
type AgentSpaceDocker ¶ added in v0.19.0
type AgentSpaceDocker string
AgentSpaceDocker How much of the host Docker daemon the space reaches. Set only for kind `docker`.
- `none`: no access. - `readonly`: the worker gets a controller-run proxy that answers only read requests (list and inspect containers, images, networks, and volumes, and watch events), with environment values redacted from inspect output. - `full`: the controller's Docker socket is mounted, which is host root.
const ( AgentSpaceDockerFull AgentSpaceDocker = "full" AgentSpaceDockerNone AgentSpaceDocker = "none" AgentSpaceDockerReadonly AgentSpaceDocker = "readonly" )
Defines values for AgentSpaceDocker.
func (AgentSpaceDocker) Valid ¶ added in v0.19.0
func (e AgentSpaceDocker) Valid() bool
Valid indicates whether the value is a known member of the AgentSpaceDocker enum.
type AgentSpaceKind ¶ added in v0.19.0
type AgentSpaceKind string
AgentSpaceKind Where the agent runs.
- `control`: where the controller runs. Offered only when the controller cannot reach a Docker daemon. - `docker`: in its own container, shaped by a Docker profile.
const ( AgentSpaceKindControl AgentSpaceKind = "control" AgentSpaceKindDocker AgentSpaceKind = "docker" )
Defines values for AgentSpaceKind.
func (AgentSpaceKind) Valid ¶ added in v0.19.0
func (e AgentSpaceKind) Valid() bool
Valid indicates whether the value is a known member of the AgentSpaceKind enum.
type AgentSpaceList ¶ added in v0.19.0
type AgentSpaceList struct {
// Default The agent space a workspace's first session gets when `POST /sessions/open` names none. `docker:default` when the controller can reach a Docker daemon, `control` when it cannot, unless `PEEN_DEFAULT_AGENT_SPACE` names another.
Default string `json:"default"`
// Items The offered agent spaces, sorted by `name`.
Items []AgentSpace `json:"items"`
}
AgentSpaceList The response of `GET /agent-spaces`: every agent space the deployment offers, sorted by name, and the default.
type AgentSpaceNetwork ¶ added in v0.19.0
type AgentSpaceNetwork string
AgentSpaceNetwork The network the worker container gets. Set only for kind `docker`.
- `none`: no network. - `bridge`: Docker's default bridge network. - `host`: the host's network, so the worker can reach every service the host can.
const ( AgentSpaceNetworkBridge AgentSpaceNetwork = "bridge" AgentSpaceNetworkHost AgentSpaceNetwork = "host" AgentSpaceNetworkNone AgentSpaceNetwork = "none" )
Defines values for AgentSpaceNetwork.
func (AgentSpaceNetwork) Valid ¶ added in v0.19.0
func (e AgentSpaceNetwork) Valid() bool
Valid indicates whether the value is a known member of the AgentSpaceNetwork enum.
type CancelResponse ¶
type CancelResponse struct {
// CancelRequested True when the call found something to stop: a message waiting to start a turn, a running turn, a running child agent, or an unfinished workflow. False when the session was already idle.
CancelRequested bool `json:"cancelRequested"`
}
CancelResponse The response of `POST /session/cancel`.
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 ¶
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 CancelSession406JSONResponse ¶ added in v0.52.0
type CancelSession406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (CancelSession406JSONResponse) VisitCancelSessionResponse ¶ added in v0.52.0
func (response CancelSession406JSONResponse) 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 ¶
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 CancelSessionAgentRun406JSONResponse ¶ added in v0.52.0
type CancelSessionAgentRun406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (CancelSessionAgentRun406JSONResponse) VisitCancelSessionAgentRunResponse ¶ added in v0.52.0
func (response CancelSessionAgentRun406JSONResponse) 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 The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
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 The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
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 Compaction ¶ added in v0.4.0
type Compaction struct {
// CreatedAt When Peen stored the record, as an RFC 3339 timestamp.
CreatedAt time.Time `json:"createdAt"`
// FromMessageId ID of the first stored message the summary covers. For a compaction with a parent, this is where the parent's range started.
FromMessageId openapi_types.UUID `json:"fromMessageId"`
// FromSequence Session message sequence of the first covered message, inclusive.
FromSequence int64 `json:"fromSequence"`
// Id The compaction record's ID. Messages it summarized carry it as their `compactionId`.
Id openapi_types.UUID `json:"id"`
// InputTokenCount Prompt tokens the provider reported for the summarizing request.
InputTokenCount int64 `json:"inputTokenCount"`
// Model The model ID the provider reported for the summarizing request.
Model string `json:"model"`
// ParentCompactionId The earlier compaction this one replaces, when it summarized that compaction's summary plus newer messages. Absent for the first compaction in a lineage.
ParentCompactionId *openapi_types.UUID `json:"parentCompactionId,omitempty"`
// PromptHash Lowercase hex SHA-256 of the compaction instructions used to write the summary, so you can tell which version of the instructions produced it. It does not name a prompt snapshot.
PromptHash string `json:"promptHash"`
// SessionId The session this compaction belongs to.
SessionId openapi_types.UUID `json:"sessionId"`
// SourceMessageCount How many stored messages the summary covers, including those its parent already covered.
SourceMessageCount int64 `json:"sourceMessageCount"`
// Summary The summary text the model receives in place of the covered messages.
Summary string `json:"summary"`
// SummaryTokenCount Completion tokens the provider reported for the summary.
SummaryTokenCount int64 `json:"summaryTokenCount"`
// ToMessageId ID of the last stored message the summary covers.
ToMessageId openapi_types.UUID `json:"toMessageId"`
// ToSequence Session message sequence of the last covered message, inclusive.
ToSequence int64 `json:"toSequence"`
}
Compaction One stored summary that replaced a range of the session's messages in what the model receives. A record never changes once written. It appears in `CompactionPage` and as the response of `GET /session/compactions/{compactionId}`.
type CompactionID ¶ added in v0.4.0
type CompactionID = openapi_types.UUID
CompactionID defines model for CompactionID.
type CompactionPage ¶ added in v0.4.0
type CompactionPage struct {
// Compactions The compaction records on this page, ordered by `createdAt` descending.
Compactions []Compaction `json:"compactions"`
// HasMore `true` when at least one more record exists after this page. Request the next page with `offset` increased by `limit`.
HasMore bool `json:"hasMore"`
// Limit The page size the server used.
Limit int32 `json:"limit"`
// Offset The number of records skipped before this page.
Offset int32 `json:"offset"`
}
CompactionPage One page of a session's compaction records, newest first, returned by `GET /session/compactions`.
type ContextHash ¶ added in v0.4.0
type ContextHash = string
ContextHash defines model for ContextHash.
type ContextManifestEntry ¶ added in v0.8.0
type ContextManifestEntry struct {
// Hash Lowercase hex SHA-256 of the source file's content.
Hash string `json:"hash"`
// Kind What the source is.
//
// - `instruction`: an instruction file such as `AGENTS.md`.
// - `rule`: a rule file.
// - `skill`: a skill.
// - `agent`: a stored agent definition.
// - `event-handler`: a notice handler.
// - `hook`: a hook group.
Kind string `json:"kind"`
// Name The source's name within its kind: a rule's path under `rules/` without `.md`, a skill's or agent's name, an event handler's notice type, or a hook's event name. Empty for an instruction file.
Name string `json:"name"`
// Priority The layer the source came from. Built-in instructions are -1, the configuration layer is 0, and the number grows for layers closer to the workspace, so a higher number is more specific. Skills, agents and event handlers report 0.
Priority int32 `json:"priority"`
// Source Where the source came from: the file's path, or an `embedded://` address for a file built into Peen.
Source string `json:"source"`
}
ContextManifestEntry One harness source a context snapshot was resolved from, such as an instruction file, a rule, a skill, an agent definition, an event handler or a hook file.
type ContextSnapshot ¶ added in v0.4.0
type ContextSnapshot struct {
// CreatedAt When Peen first stored this snapshot, as an RFC 3339 timestamp. A later turn that produces the same hash reuses the row and leaves this unchanged.
CreatedAt time.Time `json:"createdAt"`
// Hash Lowercase hex SHA-256 that identifies the snapshot, computed over the resolved harness sources and the resolved content. A turn names it in `contextSnapshotHash`.
Hash string `json:"hash"`
// Manifest The harness sources this context was resolved from. Instruction and rule files come first, in resolution order from the built-in files and the configuration layer down to the workspace, followed by skills, agents, event handlers and hooks. The same name can appear at more than one layer, which is why this is a list.
Manifest []ContextManifestEntry `json:"manifest"`
// ResolvedContent The system prompt Peen built from these sources for the turn, including any context pre-user-message hooks added.
ResolvedContent string `json:"resolvedContent"`
}
ContextSnapshot The harness context one or more turns ran with, stored once by hash. It holds the manifest of sources Peen resolved and the content it built from them. Returned by `GET /session/context-snapshots/{contextHash}`.
type CronJob ¶ added in v0.51.0
type CronJob struct {
// LastRun One durable record of a scheduled occurrence: when it was due, how it ended, and the session it ran in. Records are kept for jobs that are no longer configured.
LastRun *CronRun `json:"lastRun,omitempty"`
// Name The job's unique name, 1 to 64 ASCII letters, digits, underscores or hyphens. Filter `GET /cron/runs` with it.
Name string `json:"name"`
// NextScheduledAt The next occurrence the scheduler will fire, as an RFC 3339 UTC time.
NextScheduledAt time.Time `json:"nextScheduledAt"`
// Schedule The schedule exactly as written in the cron file, such as `0 9 * * *`, a six-field expression with leading seconds, or a descriptor such as `@daily` or `@every 30m`.
Schedule string `json:"schedule"`
// TimeZone The IANA time zone the schedule is evaluated in, such as `UTC` or `Europe/Berlin`. `UTC` when the cron file leaves it out.
TimeZone string `json:"timeZone"`
}
CronJob One scheduled job loaded from the operator's cron file at startup, as `GET /cron/jobs` reports it.
type CronJobList ¶ added in v0.51.0
type CronJobList struct {
// Items The scheduled jobs, sorted by `name`. Not paged.
Items []CronJob `json:"items"`
}
CronJobList All scheduled jobs loaded at startup, sorted by name. Empty while `PEEN_CRON` is off.
type CronRun ¶ added in v0.51.0
type CronRun struct {
// Error A fixed reason for a `failed`, `cancelled` or `skipped` run, one of `scheduled run failed`, `scheduled turn failed`, `scheduled turn cancelled`, `scheduled turn timed out`, `previous run still running`, `workspace session is busy`, `controller was offline`, `scheduled turn interrupted`, `workspace unavailable`, `session unavailable`, `workspace agent space conflict` or `scheduled output invalid`. It never holds prompts, provider errors or schemas. Absent on running and completed runs. Treat any other value as an unknown failure.
Error *string `json:"error,omitempty"`
// FinishedAt When the run ended, as an RFC 3339 time. Absent while the run is `running`.
FinishedAt *time.Time `json:"finishedAt,omitempty"`
// Id The run's ID. The scheduled turn uses the same value as its request ID, so the run's turn is the one whose `requestId` matches.
Id openapi_types.UUID `json:"id"`
// JobName The name of the job this run belongs to.
JobName string `json:"jobName"`
// ScheduledAt The occurrence this run was for, as an RFC 3339 UTC time. A job never records two runs for the same occurrence.
ScheduledAt time.Time `json:"scheduledAt"`
// SessionId The session the run's turn used. Pass it as `X-Session-ID` to read the conversation. Absent when no session was opened: on a run skipped because the previous run was still going or the controller was offline, and on a run whose session could not be prepared. A run skipped because the workspace session was busy names that session.
SessionId *openapi_types.UUID `json:"sessionId,omitempty"`
// StartedAt When Peen began the run, as an RFC 3339 time. Absent on a run skipped because the previous run was still going or the controller was offline. A run skipped because the workspace session was busy has it, because Peen began that run before it found the session busy.
StartedAt *time.Time `json:"startedAt,omitempty"`
// State The state of a scheduled run. After downtime Peen records one `skipped` run for the latest missed occurrence and does not replay missed work.
//
// - `running`: the run is in progress.
// - `completed`: the turn finished, with valid structured output when the job asked for it.
// - `failed`: the run or its turn failed, including a turn that ended without valid structured output; `error` says why.
// - `cancelled`: the turn was cancelled or reached its deadline; `error` says which.
// - `skipped`: the occurrence did not run because the job's previous run was still going, the workspace session already had an active turn, or the controller was offline at the time; `error` says why.
State CronRunState `json:"state"`
}
CronRun One durable record of a scheduled occurrence: when it was due, how it ended, and the session it ran in. Records are kept for jobs that are no longer configured.
type CronRunPage ¶ added in v0.51.0
type CronRunPage struct {
// HasMore `true` when more runs follow this page. Request the next page with `offset` increased by `limit`.
HasMore bool `json:"hasMore"`
// Items The runs on this page, ordered by `scheduledAt`, newest first.
Items []CronRun `json:"items"`
// Limit The page size used, 50 when the request left `limit` out.
Limit int32 `json:"limit"`
// Offset The number of runs skipped before this page.
Offset int32 `json:"offset"`
}
CronRunPage One page of scheduled runs, newest scheduled occurrence first, as `GET /cron/runs` returns it.
type CronRunState ¶ added in v0.51.0
type CronRunState string
CronRunState The state of a scheduled run. After downtime Peen records one `skipped` run for the latest missed occurrence and does not replay missed work.
- `running`: the run is in progress. - `completed`: the turn finished, with valid structured output when the job asked for it. - `failed`: the run or its turn failed, including a turn that ended without valid structured output; `error` says why. - `cancelled`: the turn was cancelled or reached its deadline; `error` says which. - `skipped`: the occurrence did not run because the job's previous run was still going, the workspace session already had an active turn, or the controller was offline at the time; `error` says why.
const ( CronRunStateCancelled CronRunState = "cancelled" CronRunStateCompleted CronRunState = "completed" CronRunStateFailed CronRunState = "failed" CronRunStateRunning CronRunState = "running" CronRunStateSkipped CronRunState = "skipped" )
Defines values for CronRunState.
func (CronRunState) Valid ¶ added in v0.51.0
func (e CronRunState) Valid() bool
Valid indicates whether the value is a known member of the CronRunState enum.
type DeleteSessionLearnedFile204Response ¶ added in v0.37.0
type DeleteSessionLearnedFile204Response struct {
Headers DeleteSessionLearnedFile204ResponseHeaders
}
func (DeleteSessionLearnedFile204Response) VisitDeleteSessionLearnedFileResponse ¶ added in v0.37.0
func (response DeleteSessionLearnedFile204Response) VisitDeleteSessionLearnedFileResponse(w http.ResponseWriter) error
type DeleteSessionLearnedFile204ResponseHeaders ¶ added in v0.37.0
type DeleteSessionLearnedFile204ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type DeleteSessionLearnedFile400JSONResponse ¶ added in v0.37.0
type DeleteSessionLearnedFile400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (DeleteSessionLearnedFile400JSONResponse) VisitDeleteSessionLearnedFileResponse ¶ added in v0.37.0
func (response DeleteSessionLearnedFile400JSONResponse) VisitDeleteSessionLearnedFileResponse(w http.ResponseWriter) error
type DeleteSessionLearnedFile401JSONResponse ¶ added in v0.37.0
func (DeleteSessionLearnedFile401JSONResponse) VisitDeleteSessionLearnedFileResponse ¶ added in v0.37.0
func (response DeleteSessionLearnedFile401JSONResponse) VisitDeleteSessionLearnedFileResponse(w http.ResponseWriter) error
type DeleteSessionLearnedFile404JSONResponse ¶ added in v0.37.0
type DeleteSessionLearnedFile404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (DeleteSessionLearnedFile404JSONResponse) VisitDeleteSessionLearnedFileResponse ¶ added in v0.37.0
func (response DeleteSessionLearnedFile404JSONResponse) VisitDeleteSessionLearnedFileResponse(w http.ResponseWriter) error
type DeleteSessionLearnedFile406JSONResponse ¶ added in v0.52.0
type DeleteSessionLearnedFile406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (DeleteSessionLearnedFile406JSONResponse) VisitDeleteSessionLearnedFileResponse ¶ added in v0.52.0
func (response DeleteSessionLearnedFile406JSONResponse) VisitDeleteSessionLearnedFileResponse(w http.ResponseWriter) error
type DeleteSessionLearnedFile500JSONResponse ¶ added in v0.37.0
type DeleteSessionLearnedFile500JSONResponse struct{ ErrorInternalJSONResponse }
func (DeleteSessionLearnedFile500JSONResponse) VisitDeleteSessionLearnedFileResponse ¶ added in v0.37.0
func (response DeleteSessionLearnedFile500JSONResponse) VisitDeleteSessionLearnedFileResponse(w http.ResponseWriter) error
type DeleteSessionLearnedFileParams ¶ added in v0.37.0
type DeleteSessionLearnedFileParams struct {
// Scope Which learned directory the file lives in. `workspace` is `.agents/learned/` in the session's workspace; `global` is the global learned directory every session reads, `PEEN_CONFIG_DIR/.agents/learned/` unless `PEEN_LEARNED_DIR` moves it.
Scope LearnedScope `form:"scope" json:"scope"`
// Kind Whether the name refers to a learned `rule`, a Markdown file under `rules/`, or a learned `skill`, a directory under `skills/` that holds a `SKILL.md`.
Kind LearnedKind `form:"kind" json:"kind"`
// Name The learned file's name, as the `name` field of `GET /session/learned` reports it. For a rule it is the path under `rules/` without `.md`, such as `go-errors` or `go/errors`, with at most 8 directory levels. For a skill it is the skill's directory name and cannot contain `/`. A name with an empty, `.` or `..` segment, or a backslash, answers `400`.
Name LearnedName `form:"name" json:"name"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
DeleteSessionLearnedFileParams defines parameters for DeleteSessionLearnedFile.
type DeleteSessionLearnedFileRequestObject ¶ added in v0.37.0
type DeleteSessionLearnedFileRequestObject struct {
Params DeleteSessionLearnedFileParams
}
type DeleteSessionLearnedFileResponseObject ¶ added in v0.37.0
type DeleteSessionLearnedFileResponseObject interface {
VisitDeleteSessionLearnedFileResponse(w http.ResponseWriter) error
}
type DeleteWorkspaceFile204Response ¶ added in v0.51.0
type DeleteWorkspaceFile204Response struct {
Headers DeleteWorkspaceFile204ResponseHeaders
}
func (DeleteWorkspaceFile204Response) VisitDeleteWorkspaceFileResponse ¶ added in v0.51.0
func (response DeleteWorkspaceFile204Response) VisitDeleteWorkspaceFileResponse(w http.ResponseWriter) error
type DeleteWorkspaceFile204ResponseHeaders ¶ added in v0.51.0
type DeleteWorkspaceFile204ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type DeleteWorkspaceFile400JSONResponse ¶ added in v0.51.0
type DeleteWorkspaceFile400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (DeleteWorkspaceFile400JSONResponse) VisitDeleteWorkspaceFileResponse ¶ added in v0.51.0
func (response DeleteWorkspaceFile400JSONResponse) VisitDeleteWorkspaceFileResponse(w http.ResponseWriter) error
type DeleteWorkspaceFile401JSONResponse ¶ added in v0.51.0
func (DeleteWorkspaceFile401JSONResponse) VisitDeleteWorkspaceFileResponse ¶ added in v0.51.0
func (response DeleteWorkspaceFile401JSONResponse) VisitDeleteWorkspaceFileResponse(w http.ResponseWriter) error
type DeleteWorkspaceFile403JSONResponse ¶ added in v0.51.0
type DeleteWorkspaceFile403JSONResponse struct{ ErrorForbiddenJSONResponse }
func (DeleteWorkspaceFile403JSONResponse) VisitDeleteWorkspaceFileResponse ¶ added in v0.51.0
func (response DeleteWorkspaceFile403JSONResponse) VisitDeleteWorkspaceFileResponse(w http.ResponseWriter) error
type DeleteWorkspaceFile404JSONResponse ¶ added in v0.51.0
type DeleteWorkspaceFile404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (DeleteWorkspaceFile404JSONResponse) VisitDeleteWorkspaceFileResponse ¶ added in v0.51.0
func (response DeleteWorkspaceFile404JSONResponse) VisitDeleteWorkspaceFileResponse(w http.ResponseWriter) error
type DeleteWorkspaceFile406JSONResponse ¶ added in v0.52.0
type DeleteWorkspaceFile406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (DeleteWorkspaceFile406JSONResponse) VisitDeleteWorkspaceFileResponse ¶ added in v0.52.0
func (response DeleteWorkspaceFile406JSONResponse) VisitDeleteWorkspaceFileResponse(w http.ResponseWriter) error
type DeleteWorkspaceFile409JSONResponse ¶ added in v0.51.0
type DeleteWorkspaceFile409JSONResponse struct{ ErrorConflictJSONResponse }
func (DeleteWorkspaceFile409JSONResponse) VisitDeleteWorkspaceFileResponse ¶ added in v0.51.0
func (response DeleteWorkspaceFile409JSONResponse) VisitDeleteWorkspaceFileResponse(w http.ResponseWriter) error
type DeleteWorkspaceFile500JSONResponse ¶ added in v0.51.0
type DeleteWorkspaceFile500JSONResponse struct{ ErrorInternalJSONResponse }
func (DeleteWorkspaceFile500JSONResponse) VisitDeleteWorkspaceFileResponse ¶ added in v0.51.0
func (response DeleteWorkspaceFile500JSONResponse) VisitDeleteWorkspaceFileResponse(w http.ResponseWriter) error
type DeleteWorkspaceFileParams ¶ added in v0.51.0
type DeleteWorkspaceFileParams struct {
// Path The path to delete, relative to the workspace, such as `notes/draft.md`.
Path string `form:"path" json:"path"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
DeleteWorkspaceFileParams defines parameters for DeleteWorkspaceFile.
type DeleteWorkspaceFileRequestObject ¶ added in v0.51.0
type DeleteWorkspaceFileRequestObject struct {
Params DeleteWorkspaceFileParams
}
type DeleteWorkspaceFileResponseObject ¶ added in v0.51.0
type DeleteWorkspaceFileResponseObject interface {
VisitDeleteWorkspaceFileResponse(w http.ResponseWriter) error
}
type Error ¶
type Error struct {
// Code A stable, machine-readable error code such as `VALIDATION_FAILED` or `SESSION_NOT_FOUND`. Branch on this value.
Code string `json:"code"`
// Message Short, human-readable text safe to show a user. It never contains source paths or credentials, and its wording can change between versions.
Message string `json:"message"`
}
Error The body of every REST error response. The table on the API's front page lists each `code`.
type ErrorBadRequest ¶
type ErrorBadRequest = Error
ErrorBadRequest The body of every REST error response. The table on the API's front page lists each `code`.
type ErrorBadRequestJSONResponse ¶
type ErrorBadRequestJSONResponse Error
type ErrorConflict ¶
type ErrorConflict = Error
ErrorConflict The body of every REST error response. The table on the API's front page lists each `code`.
type ErrorConflictJSONResponse ¶
type ErrorConflictJSONResponse Error
type ErrorForbidden ¶ added in v0.8.0
type ErrorForbidden = Error
ErrorForbidden The body of every REST error response. The table on the API's front page lists each `code`.
type ErrorForbiddenJSONResponse ¶ added in v0.8.0
type ErrorForbiddenJSONResponse Error
type ErrorInternal ¶
type ErrorInternal = Error
ErrorInternal The body of every REST error response. The table on the API's front page lists each `code`.
type ErrorInternalJSONResponse ¶
type ErrorInternalJSONResponse Error
type ErrorNotAcceptable ¶
type ErrorNotAcceptable = Error
ErrorNotAcceptable The body of every REST error response. The table on the API's front page lists each `code`.
type ErrorNotAcceptableJSONResponse ¶
type ErrorNotAcceptableJSONResponse Error
type ErrorNotFound ¶
type ErrorNotFound = Error
ErrorNotFound The body of every REST error response. The table on the API's front page lists each `code`.
type ErrorNotFoundJSONResponse ¶
type ErrorNotFoundJSONResponse Error
type ErrorUnauthorized ¶
type ErrorUnauthorized = Error
ErrorUnauthorized The body of every REST error response. The table on the API's front page lists each `code`.
type ErrorUnauthorizedJSONResponse ¶
type ErrorUnauthorizedJSONResponse Error
type FeedFrame ¶ added in v0.26.0
type FeedFrame struct {
// CreatedAt When the record was stored, RFC 3339.
CreatedAt time.Time `json:"createdAt"`
// Data The frame's data, exactly as sent live. For a protocol event it is the event payload. For an `agent.run.*` frame it is an object with `agentRunId`, `parentTurnId`, `parentAgentRunId` (absent for a child of the root conversation), and `event`, the child's event payload. For `notice.created` it is the notice, in the shape of `SessionNotice`.
Data interface{} `json:"data"`
// Id ID of the stored record (protocol event, child agent run event, or notice), also the live frame's `id`.
Id openapi_types.UUID `json:"id"`
// RequestId The request ID of the turn that produced a root protocol event. Null for child agent steps and notices.
RequestId *openapi_types.UUID `json:"requestId"`
// Sequence Position in the session feed. Consecutive across all frame kinds, starting at 1.
Sequence int64 `json:"sequence"`
// SessionId The session the frame belongs to.
SessionId openapi_types.UUID `json:"sessionId"`
// Type The frame type: a protocol event type such as `tool.use`, an `agent.run.*` type for a child agent step, or `notice.created` for a notice.
Type string `json:"type"`
}
FeedFrame One sequenced frame of a session's live feed, as `GET /session/feed` replays it. It carries the same `type`, `data`, and `sequence` the WebSocket frame carried when it was sent live.
type FeedPage ¶ added in v0.26.0
type FeedPage struct {
// HasMore True when more frames follow this page.
HasMore bool `json:"hasMore"`
// Head The session's newest feed sequence when the page was read.
Head int64 `json:"head"`
// Items Frames with a sequence greater than the requested `cursor`, oldest first.
Items []FeedFrame `json:"items"`
// Limit The page size this response used: the requested `limit`, or 100 when none was sent.
Limit int32 `json:"limit"`
// NextCursor Pass back as `cursor` to continue. It is the sequence of the last frame in `items`, or the `cursor` sent when the page is empty.
NextCursor int64 `json:"nextCursor"`
}
FeedPage One page of `GET /session/feed`, oldest first.
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 ¶
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 GetSession406JSONResponse ¶ added in v0.52.0
type GetSession406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (GetSession406JSONResponse) VisitGetSessionResponse ¶ added in v0.52.0
func (response GetSession406JSONResponse) VisitGetSessionResponse(w http.ResponseWriter) error
type GetSession500JSONResponse ¶
type GetSession500JSONResponse struct{ ErrorInternalJSONResponse }
func (GetSession500JSONResponse) VisitGetSessionResponse ¶
func (response GetSession500JSONResponse) VisitGetSessionResponse(w http.ResponseWriter) error
type GetSessionAgentRun200JSONResponse ¶ added in v0.4.0
type GetSessionAgentRun200JSONResponse struct {
Body AgentRun
Headers GetSessionAgentRun200ResponseHeaders
}
func (GetSessionAgentRun200JSONResponse) VisitGetSessionAgentRunResponse ¶ added in v0.4.0
func (response GetSessionAgentRun200JSONResponse) VisitGetSessionAgentRunResponse(w http.ResponseWriter) error
type GetSessionAgentRun200ResponseHeaders ¶ added in v0.4.0
type GetSessionAgentRun200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type GetSessionAgentRun400JSONResponse ¶ added in v0.4.0
type GetSessionAgentRun400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (GetSessionAgentRun400JSONResponse) VisitGetSessionAgentRunResponse ¶ added in v0.4.0
func (response GetSessionAgentRun400JSONResponse) VisitGetSessionAgentRunResponse(w http.ResponseWriter) error
type GetSessionAgentRun401JSONResponse ¶ added in v0.4.0
func (GetSessionAgentRun401JSONResponse) VisitGetSessionAgentRunResponse ¶ added in v0.4.0
func (response GetSessionAgentRun401JSONResponse) VisitGetSessionAgentRunResponse(w http.ResponseWriter) error
type GetSessionAgentRun404JSONResponse ¶ added in v0.4.0
type GetSessionAgentRun404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (GetSessionAgentRun404JSONResponse) VisitGetSessionAgentRunResponse ¶ added in v0.4.0
func (response GetSessionAgentRun404JSONResponse) VisitGetSessionAgentRunResponse(w http.ResponseWriter) error
type GetSessionAgentRun406JSONResponse ¶ added in v0.52.0
type GetSessionAgentRun406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (GetSessionAgentRun406JSONResponse) VisitGetSessionAgentRunResponse ¶ added in v0.52.0
func (response GetSessionAgentRun406JSONResponse) VisitGetSessionAgentRunResponse(w http.ResponseWriter) error
type GetSessionAgentRun500JSONResponse ¶ added in v0.4.0
type GetSessionAgentRun500JSONResponse struct{ ErrorInternalJSONResponse }
func (GetSessionAgentRun500JSONResponse) VisitGetSessionAgentRunResponse ¶ added in v0.4.0
func (response GetSessionAgentRun500JSONResponse) VisitGetSessionAgentRunResponse(w http.ResponseWriter) error
type GetSessionAgentRunCompaction200JSONResponse ¶ added in v0.11.0
type GetSessionAgentRunCompaction200JSONResponse struct {
Body AgentRunCompaction
Headers GetSessionAgentRunCompaction200ResponseHeaders
}
func (GetSessionAgentRunCompaction200JSONResponse) VisitGetSessionAgentRunCompactionResponse ¶ added in v0.11.0
func (response GetSessionAgentRunCompaction200JSONResponse) VisitGetSessionAgentRunCompactionResponse(w http.ResponseWriter) error
type GetSessionAgentRunCompaction200ResponseHeaders ¶ added in v0.11.0
type GetSessionAgentRunCompaction200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type GetSessionAgentRunCompaction400JSONResponse ¶ added in v0.11.0
type GetSessionAgentRunCompaction400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (GetSessionAgentRunCompaction400JSONResponse) VisitGetSessionAgentRunCompactionResponse ¶ added in v0.11.0
func (response GetSessionAgentRunCompaction400JSONResponse) VisitGetSessionAgentRunCompactionResponse(w http.ResponseWriter) error
type GetSessionAgentRunCompaction401JSONResponse ¶ added in v0.11.0
func (GetSessionAgentRunCompaction401JSONResponse) VisitGetSessionAgentRunCompactionResponse ¶ added in v0.11.0
func (response GetSessionAgentRunCompaction401JSONResponse) VisitGetSessionAgentRunCompactionResponse(w http.ResponseWriter) error
type GetSessionAgentRunCompaction404JSONResponse ¶ added in v0.11.0
type GetSessionAgentRunCompaction404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (GetSessionAgentRunCompaction404JSONResponse) VisitGetSessionAgentRunCompactionResponse ¶ added in v0.11.0
func (response GetSessionAgentRunCompaction404JSONResponse) VisitGetSessionAgentRunCompactionResponse(w http.ResponseWriter) error
type GetSessionAgentRunCompaction406JSONResponse ¶ added in v0.52.0
type GetSessionAgentRunCompaction406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (GetSessionAgentRunCompaction406JSONResponse) VisitGetSessionAgentRunCompactionResponse ¶ added in v0.52.0
func (response GetSessionAgentRunCompaction406JSONResponse) VisitGetSessionAgentRunCompactionResponse(w http.ResponseWriter) error
type GetSessionAgentRunCompaction500JSONResponse ¶ added in v0.11.0
type GetSessionAgentRunCompaction500JSONResponse struct{ ErrorInternalJSONResponse }
func (GetSessionAgentRunCompaction500JSONResponse) VisitGetSessionAgentRunCompactionResponse ¶ added in v0.11.0
func (response GetSessionAgentRunCompaction500JSONResponse) VisitGetSessionAgentRunCompactionResponse(w http.ResponseWriter) error
type GetSessionAgentRunCompactionParams ¶ added in v0.11.0
type GetSessionAgentRunCompactionParams struct {
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
GetSessionAgentRunCompactionParams defines parameters for GetSessionAgentRunCompaction.
type GetSessionAgentRunCompactionRequestObject ¶ added in v0.11.0
type GetSessionAgentRunCompactionRequestObject struct {
AgentRunId AgentRunID `json:"agentRunId"`
CompactionId CompactionID `json:"compactionId"`
Params GetSessionAgentRunCompactionParams
}
type GetSessionAgentRunCompactionResponseObject ¶ added in v0.11.0
type GetSessionAgentRunCompactionResponseObject interface {
VisitGetSessionAgentRunCompactionResponse(w http.ResponseWriter) error
}
type GetSessionAgentRunParams ¶ added in v0.4.0
type GetSessionAgentRunParams struct {
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
GetSessionAgentRunParams defines parameters for GetSessionAgentRun.
type GetSessionAgentRunRequestObject ¶ added in v0.4.0
type GetSessionAgentRunRequestObject struct {
AgentRunId AgentRunID `json:"agentRunId"`
Params GetSessionAgentRunParams
}
type GetSessionAgentRunResponseObject ¶ added in v0.4.0
type GetSessionAgentRunResponseObject interface {
VisitGetSessionAgentRunResponse(w http.ResponseWriter) error
}
type GetSessionCompaction200JSONResponse ¶ added in v0.4.0
type GetSessionCompaction200JSONResponse struct {
Body Compaction
Headers GetSessionCompaction200ResponseHeaders
}
func (GetSessionCompaction200JSONResponse) VisitGetSessionCompactionResponse ¶ added in v0.4.0
func (response GetSessionCompaction200JSONResponse) VisitGetSessionCompactionResponse(w http.ResponseWriter) error
type GetSessionCompaction200ResponseHeaders ¶ added in v0.4.0
type GetSessionCompaction200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type GetSessionCompaction400JSONResponse ¶ added in v0.4.0
type GetSessionCompaction400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (GetSessionCompaction400JSONResponse) VisitGetSessionCompactionResponse ¶ added in v0.4.0
func (response GetSessionCompaction400JSONResponse) VisitGetSessionCompactionResponse(w http.ResponseWriter) error
type GetSessionCompaction401JSONResponse ¶ added in v0.4.0
func (GetSessionCompaction401JSONResponse) VisitGetSessionCompactionResponse ¶ added in v0.4.0
func (response GetSessionCompaction401JSONResponse) VisitGetSessionCompactionResponse(w http.ResponseWriter) error
type GetSessionCompaction404JSONResponse ¶ added in v0.4.0
type GetSessionCompaction404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (GetSessionCompaction404JSONResponse) VisitGetSessionCompactionResponse ¶ added in v0.4.0
func (response GetSessionCompaction404JSONResponse) VisitGetSessionCompactionResponse(w http.ResponseWriter) error
type GetSessionCompaction406JSONResponse ¶ added in v0.52.0
type GetSessionCompaction406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (GetSessionCompaction406JSONResponse) VisitGetSessionCompactionResponse ¶ added in v0.52.0
func (response GetSessionCompaction406JSONResponse) VisitGetSessionCompactionResponse(w http.ResponseWriter) error
type GetSessionCompaction500JSONResponse ¶ added in v0.4.0
type GetSessionCompaction500JSONResponse struct{ ErrorInternalJSONResponse }
func (GetSessionCompaction500JSONResponse) VisitGetSessionCompactionResponse ¶ added in v0.4.0
func (response GetSessionCompaction500JSONResponse) VisitGetSessionCompactionResponse(w http.ResponseWriter) error
type GetSessionCompactionParams ¶ added in v0.4.0
type GetSessionCompactionParams struct {
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
GetSessionCompactionParams defines parameters for GetSessionCompaction.
type GetSessionCompactionRequestObject ¶ added in v0.4.0
type GetSessionCompactionRequestObject struct {
CompactionId CompactionID `json:"compactionId"`
Params GetSessionCompactionParams
}
type GetSessionCompactionResponseObject ¶ added in v0.4.0
type GetSessionCompactionResponseObject interface {
VisitGetSessionCompactionResponse(w http.ResponseWriter) error
}
type GetSessionContextSnapshot200JSONResponse ¶ added in v0.4.0
type GetSessionContextSnapshot200JSONResponse struct {
Body ContextSnapshot
Headers GetSessionContextSnapshot200ResponseHeaders
}
func (GetSessionContextSnapshot200JSONResponse) VisitGetSessionContextSnapshotResponse ¶ added in v0.4.0
func (response GetSessionContextSnapshot200JSONResponse) VisitGetSessionContextSnapshotResponse(w http.ResponseWriter) error
type GetSessionContextSnapshot200ResponseHeaders ¶ added in v0.4.0
type GetSessionContextSnapshot200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type GetSessionContextSnapshot400JSONResponse ¶ added in v0.4.0
type GetSessionContextSnapshot400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (GetSessionContextSnapshot400JSONResponse) VisitGetSessionContextSnapshotResponse ¶ added in v0.4.0
func (response GetSessionContextSnapshot400JSONResponse) VisitGetSessionContextSnapshotResponse(w http.ResponseWriter) error
type GetSessionContextSnapshot401JSONResponse ¶ added in v0.4.0
func (GetSessionContextSnapshot401JSONResponse) VisitGetSessionContextSnapshotResponse ¶ added in v0.4.0
func (response GetSessionContextSnapshot401JSONResponse) VisitGetSessionContextSnapshotResponse(w http.ResponseWriter) error
type GetSessionContextSnapshot404JSONResponse ¶ added in v0.4.0
type GetSessionContextSnapshot404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (GetSessionContextSnapshot404JSONResponse) VisitGetSessionContextSnapshotResponse ¶ added in v0.4.0
func (response GetSessionContextSnapshot404JSONResponse) VisitGetSessionContextSnapshotResponse(w http.ResponseWriter) error
type GetSessionContextSnapshot406JSONResponse ¶ added in v0.52.0
type GetSessionContextSnapshot406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (GetSessionContextSnapshot406JSONResponse) VisitGetSessionContextSnapshotResponse ¶ added in v0.52.0
func (response GetSessionContextSnapshot406JSONResponse) VisitGetSessionContextSnapshotResponse(w http.ResponseWriter) error
type GetSessionContextSnapshot500JSONResponse ¶ added in v0.4.0
type GetSessionContextSnapshot500JSONResponse struct{ ErrorInternalJSONResponse }
func (GetSessionContextSnapshot500JSONResponse) VisitGetSessionContextSnapshotResponse ¶ added in v0.4.0
func (response GetSessionContextSnapshot500JSONResponse) VisitGetSessionContextSnapshotResponse(w http.ResponseWriter) error
type GetSessionContextSnapshotParams ¶ added in v0.4.0
type GetSessionContextSnapshotParams struct {
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
GetSessionContextSnapshotParams defines parameters for GetSessionContextSnapshot.
type GetSessionContextSnapshotRequestObject ¶ added in v0.4.0
type GetSessionContextSnapshotRequestObject struct {
ContextHash ContextHash `json:"contextHash"`
Params GetSessionContextSnapshotParams
}
type GetSessionContextSnapshotResponseObject ¶ added in v0.4.0
type GetSessionContextSnapshotResponseObject interface {
VisitGetSessionContextSnapshotResponse(w http.ResponseWriter) error
}
type GetSessionLearnedFile200JSONResponse ¶ added in v0.37.0
type GetSessionLearnedFile200JSONResponse struct {
Body LearnedFileContent
Headers GetSessionLearnedFile200ResponseHeaders
}
func (GetSessionLearnedFile200JSONResponse) VisitGetSessionLearnedFileResponse ¶ added in v0.37.0
func (response GetSessionLearnedFile200JSONResponse) VisitGetSessionLearnedFileResponse(w http.ResponseWriter) error
type GetSessionLearnedFile200ResponseHeaders ¶ added in v0.37.0
type GetSessionLearnedFile200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type GetSessionLearnedFile400JSONResponse ¶ added in v0.37.0
type GetSessionLearnedFile400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (GetSessionLearnedFile400JSONResponse) VisitGetSessionLearnedFileResponse ¶ added in v0.37.0
func (response GetSessionLearnedFile400JSONResponse) VisitGetSessionLearnedFileResponse(w http.ResponseWriter) error
type GetSessionLearnedFile401JSONResponse ¶ added in v0.37.0
func (GetSessionLearnedFile401JSONResponse) VisitGetSessionLearnedFileResponse ¶ added in v0.37.0
func (response GetSessionLearnedFile401JSONResponse) VisitGetSessionLearnedFileResponse(w http.ResponseWriter) error
type GetSessionLearnedFile404JSONResponse ¶ added in v0.37.0
type GetSessionLearnedFile404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (GetSessionLearnedFile404JSONResponse) VisitGetSessionLearnedFileResponse ¶ added in v0.37.0
func (response GetSessionLearnedFile404JSONResponse) VisitGetSessionLearnedFileResponse(w http.ResponseWriter) error
type GetSessionLearnedFile406JSONResponse ¶ added in v0.52.0
type GetSessionLearnedFile406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (GetSessionLearnedFile406JSONResponse) VisitGetSessionLearnedFileResponse ¶ added in v0.52.0
func (response GetSessionLearnedFile406JSONResponse) VisitGetSessionLearnedFileResponse(w http.ResponseWriter) error
type GetSessionLearnedFile500JSONResponse ¶ added in v0.37.0
type GetSessionLearnedFile500JSONResponse struct{ ErrorInternalJSONResponse }
func (GetSessionLearnedFile500JSONResponse) VisitGetSessionLearnedFileResponse ¶ added in v0.37.0
func (response GetSessionLearnedFile500JSONResponse) VisitGetSessionLearnedFileResponse(w http.ResponseWriter) error
type GetSessionLearnedFileParams ¶ added in v0.37.0
type GetSessionLearnedFileParams struct {
// Scope Which learned directory the file lives in. `workspace` is `.agents/learned/` in the session's workspace; `global` is the global learned directory every session reads, `PEEN_CONFIG_DIR/.agents/learned/` unless `PEEN_LEARNED_DIR` moves it.
Scope LearnedScope `form:"scope" json:"scope"`
// Kind Whether the name refers to a learned `rule`, a Markdown file under `rules/`, or a learned `skill`, a directory under `skills/` that holds a `SKILL.md`.
Kind LearnedKind `form:"kind" json:"kind"`
// Name The learned file's name, as the `name` field of `GET /session/learned` reports it. For a rule it is the path under `rules/` without `.md`, such as `go-errors` or `go/errors`, with at most 8 directory levels. For a skill it is the skill's directory name and cannot contain `/`. A name with an empty, `.` or `..` segment, or a backslash, answers `400`.
Name LearnedName `form:"name" json:"name"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
GetSessionLearnedFileParams defines parameters for GetSessionLearnedFile.
type GetSessionLearnedFileRequestObject ¶ added in v0.37.0
type GetSessionLearnedFileRequestObject struct {
Params GetSessionLearnedFileParams
}
type GetSessionLearnedFileResponseObject ¶ added in v0.37.0
type GetSessionLearnedFileResponseObject interface {
VisitGetSessionLearnedFileResponse(w http.ResponseWriter) error
}
type GetSessionMCPStatus200JSONResponse ¶ added in v0.38.0
type GetSessionMCPStatus200JSONResponse struct {
Body MCPStatusReport
Headers GetSessionMCPStatus200ResponseHeaders
}
func (GetSessionMCPStatus200JSONResponse) VisitGetSessionMCPStatusResponse ¶ added in v0.38.0
func (response GetSessionMCPStatus200JSONResponse) VisitGetSessionMCPStatusResponse(w http.ResponseWriter) error
type GetSessionMCPStatus200ResponseHeaders ¶ added in v0.38.0
type GetSessionMCPStatus200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type GetSessionMCPStatus400JSONResponse ¶ added in v0.38.0
type GetSessionMCPStatus400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (GetSessionMCPStatus400JSONResponse) VisitGetSessionMCPStatusResponse ¶ added in v0.38.0
func (response GetSessionMCPStatus400JSONResponse) VisitGetSessionMCPStatusResponse(w http.ResponseWriter) error
type GetSessionMCPStatus401JSONResponse ¶ added in v0.38.0
func (GetSessionMCPStatus401JSONResponse) VisitGetSessionMCPStatusResponse ¶ added in v0.38.0
func (response GetSessionMCPStatus401JSONResponse) VisitGetSessionMCPStatusResponse(w http.ResponseWriter) error
type GetSessionMCPStatus404JSONResponse ¶ added in v0.38.0
type GetSessionMCPStatus404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (GetSessionMCPStatus404JSONResponse) VisitGetSessionMCPStatusResponse ¶ added in v0.38.0
func (response GetSessionMCPStatus404JSONResponse) VisitGetSessionMCPStatusResponse(w http.ResponseWriter) error
type GetSessionMCPStatus406JSONResponse ¶ added in v0.52.0
type GetSessionMCPStatus406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (GetSessionMCPStatus406JSONResponse) VisitGetSessionMCPStatusResponse ¶ added in v0.52.0
func (response GetSessionMCPStatus406JSONResponse) VisitGetSessionMCPStatusResponse(w http.ResponseWriter) error
type GetSessionMCPStatus500JSONResponse ¶ added in v0.38.0
type GetSessionMCPStatus500JSONResponse struct{ ErrorInternalJSONResponse }
func (GetSessionMCPStatus500JSONResponse) VisitGetSessionMCPStatusResponse ¶ added in v0.38.0
func (response GetSessionMCPStatus500JSONResponse) VisitGetSessionMCPStatusResponse(w http.ResponseWriter) error
type GetSessionMCPStatusParams ¶ added in v0.38.0
type GetSessionMCPStatusParams struct {
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
GetSessionMCPStatusParams defines parameters for GetSessionMCPStatus.
type GetSessionMCPStatusRequestObject ¶ added in v0.38.0
type GetSessionMCPStatusRequestObject struct {
Params GetSessionMCPStatusParams
}
type GetSessionMCPStatusResponseObject ¶ added in v0.38.0
type GetSessionMCPStatusResponseObject interface {
VisitGetSessionMCPStatusResponse(w http.ResponseWriter) error
}
type GetSessionParams ¶
type GetSessionParams struct {
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
GetSessionParams defines parameters for GetSession.
type GetSessionPromptSnapshot200JSONResponse ¶ added in v0.4.0
type GetSessionPromptSnapshot200JSONResponse struct {
Body PromptSnapshot
Headers GetSessionPromptSnapshot200ResponseHeaders
}
func (GetSessionPromptSnapshot200JSONResponse) VisitGetSessionPromptSnapshotResponse ¶ added in v0.4.0
func (response GetSessionPromptSnapshot200JSONResponse) VisitGetSessionPromptSnapshotResponse(w http.ResponseWriter) error
type GetSessionPromptSnapshot200ResponseHeaders ¶ added in v0.4.0
type GetSessionPromptSnapshot200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type GetSessionPromptSnapshot400JSONResponse ¶ added in v0.4.0
type GetSessionPromptSnapshot400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (GetSessionPromptSnapshot400JSONResponse) VisitGetSessionPromptSnapshotResponse ¶ added in v0.4.0
func (response GetSessionPromptSnapshot400JSONResponse) VisitGetSessionPromptSnapshotResponse(w http.ResponseWriter) error
type GetSessionPromptSnapshot401JSONResponse ¶ added in v0.4.0
func (GetSessionPromptSnapshot401JSONResponse) VisitGetSessionPromptSnapshotResponse ¶ added in v0.4.0
func (response GetSessionPromptSnapshot401JSONResponse) VisitGetSessionPromptSnapshotResponse(w http.ResponseWriter) error
type GetSessionPromptSnapshot404JSONResponse ¶ added in v0.4.0
type GetSessionPromptSnapshot404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (GetSessionPromptSnapshot404JSONResponse) VisitGetSessionPromptSnapshotResponse ¶ added in v0.4.0
func (response GetSessionPromptSnapshot404JSONResponse) VisitGetSessionPromptSnapshotResponse(w http.ResponseWriter) error
type GetSessionPromptSnapshot406JSONResponse ¶ added in v0.52.0
type GetSessionPromptSnapshot406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (GetSessionPromptSnapshot406JSONResponse) VisitGetSessionPromptSnapshotResponse ¶ added in v0.52.0
func (response GetSessionPromptSnapshot406JSONResponse) VisitGetSessionPromptSnapshotResponse(w http.ResponseWriter) error
type GetSessionPromptSnapshot500JSONResponse ¶ added in v0.4.0
type GetSessionPromptSnapshot500JSONResponse struct{ ErrorInternalJSONResponse }
func (GetSessionPromptSnapshot500JSONResponse) VisitGetSessionPromptSnapshotResponse ¶ added in v0.4.0
func (response GetSessionPromptSnapshot500JSONResponse) VisitGetSessionPromptSnapshotResponse(w http.ResponseWriter) error
type GetSessionPromptSnapshotParams ¶ added in v0.4.0
type GetSessionPromptSnapshotParams struct {
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
GetSessionPromptSnapshotParams defines parameters for GetSessionPromptSnapshot.
type GetSessionPromptSnapshotRequestObject ¶ added in v0.4.0
type GetSessionPromptSnapshotRequestObject struct {
PromptHash PromptHash `json:"promptHash"`
Params GetSessionPromptSnapshotParams
}
type GetSessionPromptSnapshotResponseObject ¶ added in v0.4.0
type GetSessionPromptSnapshotResponseObject interface {
VisitGetSessionPromptSnapshotResponse(w http.ResponseWriter) error
}
type GetSessionRequestObject ¶
type GetSessionRequestObject struct {
Params GetSessionParams
}
type GetSessionResponseObject ¶
type GetSessionResponseObject interface {
VisitGetSessionResponse(w http.ResponseWriter) error
}
type InvalidParamFormatError ¶ added in v0.2.0
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 {
// AgentRunId The child agent run whose `runCommand` call started the job, as listed by `GET /session/agents`. Absent for a job the session's root conversation started.
AgentRunId *openapi_types.UUID `json:"agentRunId,omitempty"`
// Command The shell command line the job runs.
Command string `json:"command"`
// Directory The directory the command runs in.
Directory string `json:"directory"`
// EndedAt When the job reached a terminal state, as an RFC 3339 timestamp. Absent while the job is running.
EndedAt *time.Time `json:"endedAt,omitempty"`
// ExitCode The process's exit status once known. It is -1 while the job runs and stays -1 when the status is not known, which is always the case for `signalled`, `failed` and `interrupted`.
ExitCode int64 `json:"exitCode"`
// FailureDetail Why the job failed or was interrupted. Empty unless Peen recorded a terminal failure detail.
FailureDetail string `json:"failureDetail"`
// JobId The job's ID. Use it in the job's output, signals and signal endpoints.
JobId openapi_types.UUID `json:"jobId"`
// Pid Operating-system process ID of the job's shell, as the worker that ran it sees it. In a Docker worker it is a process ID inside the container.
Pid int64 `json:"pid"`
// Purpose Why the agent said it was running this command.
Purpose string `json:"purpose"`
// SessionId The session that started the job.
SessionId openapi_types.UUID `json:"sessionId"`
// StartedAt When the job started, as an RFC 3339 timestamp.
StartedAt time.Time `json:"startedAt"`
// State The job's lifecycle state.
//
// - `running`: the process is still running.
// - `exited`: the process ended on its own. `exitCode` holds its status, 0 for success.
// - `signalled`: the process ended because of a signal, usually from a stop or kill request.
// - `failed`: Peen could not run or supervise the process to its end, for example because storing its output failed; `failureDetail` says why.
// - `interrupted`: Peen or its worker stopped while the process was running, so it could not be followed further.
State JobState `json:"state"`
// ToolCallId The `runCommand` tool call that started this job. Absent when none was recorded.
ToolCallId *string `json:"toolCallId,omitempty"`
// TurnId The turn during which the job was started.
TurnId openapi_types.UUID `json:"turnId"`
// WorkerGenerationId The worker generation that ran this job, as listed by `GET /session/workers`. Absent when none was recorded.
WorkerGenerationId *string `json:"workerGenerationId,omitempty"`
}
Job One shell command the agent started with `runCommand`, recorded before it produced output and kept after it ended. It appears in `JobPage` and in `JobSignalRecordPage`.
type JobOutput ¶
type JobOutput struct {
// HasMore `true` when more stored lines match the request after this window. A running job can still add lines when this is `false`.
HasMore bool `json:"hasMore"`
// JobId The job this output belongs to.
JobId openapi_types.UUID `json:"jobId"`
// Lines The output lines with a `sequence` greater than the requested `cursor`, oldest first, filtered to the requested stream. Stored lines never change.
Lines []JobOutputLine `json:"lines"`
// NextCursor The `sequence` of the last line in this window, or the requested `cursor` when the window is empty. Pass it back as `cursor` to read the lines after it.
NextCursor int64 `json:"nextCursor"`
// State The job's state when this window was read, with the same values as `Job.state`. Keep reading while it is `running` or `hasMore` is `true`.
State JobOutputState `json:"state"`
}
JobOutput One window of a job's stored output, returned by `GET /session/jobs/{jobId}/output`. Pass `nextCursor` back as `cursor` to continue.
type JobOutputLine ¶ added in v0.4.0
type JobOutputLine struct {
// Content The line's text, without its trailing newline.
Content string `json:"content"`
// CreatedAt When Peen read the line from the process, as an RFC 3339 timestamp.
CreatedAt time.Time `json:"createdAt"`
// Id The stored line's ID.
Id openapi_types.UUID `json:"id"`
// JobId The job that wrote the line.
JobId openapi_types.UUID `json:"jobId"`
// Sequence The line's position in the job's output, counting from 1. stdout and stderr share one counter per job, so sorting by it restores the order Peen saw lines in across both streams.
Sequence int64 `json:"sequence"`
// SessionId The session that owns the job.
SessionId openapi_types.UUID `json:"sessionId"`
// Stream Which stream the line came from, `stdout` or `stderr`.
Stream JobOutputLineStream `json:"stream"`
}
JobOutputLine One line a job wrote to stdout or stderr, stored in the order Peen read it. It appears in `JobOutput.lines`.
type JobOutputLineStream ¶ added in v0.4.0
type JobOutputLineStream string
JobOutputLineStream Which stream the line came from, `stdout` or `stderr`.
const ( JobOutputLineStreamStderr JobOutputLineStream = "stderr" JobOutputLineStreamStdout JobOutputLineStream = "stdout" )
Defines values for JobOutputLineStream.
func (JobOutputLineStream) Valid ¶ added in v0.4.0
func (e JobOutputLineStream) Valid() bool
Valid indicates whether the value is a known member of the JobOutputLineStream enum.
type JobOutputState ¶
type JobOutputState string
JobOutputState The job's state when this window was read, with the same values as `Job.state`. Keep reading while it is `running` or `hasMore` is `true`.
const ( JobOutputStateExited JobOutputState = "exited" JobOutputStateFailed JobOutputState = "failed" JobOutputStateInterrupted JobOutputState = "interrupted" 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 {
// HasMore `true` when at least one more job exists after this page. Request the next page with `offset` increased by `limit`.
HasMore bool `json:"hasMore"`
// Jobs The jobs on this page, ordered by `startedAt` descending.
Jobs []Job `json:"jobs"`
// Limit The page size the server used.
Limit int32 `json:"limit"`
// Offset The number of jobs skipped before this page.
Offset int32 `json:"offset"`
}
JobPage One page of a session's jobs, newest first, returned by `GET /session/jobs`.
type JobSignalRecord ¶ added in v0.4.0
type JobSignalRecord struct {
// Accepted `true` when the job was running and the signal was sent to its process group. `false` when the job had already ended or no worker held it, so nothing changed.
Accepted bool `json:"accepted"`
// Id The record's ID.
Id openapi_types.UUID `json:"id"`
// JobId The job the request named.
JobId openapi_types.UUID `json:"jobId"`
// RequestedAt When Peen recorded the request, as an RFC 3339 timestamp.
RequestedAt time.Time `json:"requestedAt"`
// SessionId The session that owns the job.
SessionId openapi_types.UUID `json:"sessionId"`
// Signal The requested signal.
//
// - `stop`: asks the process group to end with `SIGTERM` and escalates to `SIGKILL` after a grace period.
// - `kill`: sends `SIGKILL` at once.
Signal JobSignalRecordSignal `json:"signal"`
// StateAtRequest The job's state when the request arrived, with the same values as `Job.state`.
StateAtRequest JobSignalRecordStateAtRequest `json:"stateAtRequest"`
}
JobSignalRecord The stored record of one request to stop or kill a job. Peen writes one for every request, whether or not it reached a running process, so it is history, not a command. It appears in `JobSignalRecordPage.signalRequests`.
type JobSignalRecordPage ¶ added in v0.4.0
type JobSignalRecordPage struct {
// HasMore `true` when at least one more request exists after this page. Request the next page with `offset` increased by `limit`.
HasMore bool `json:"hasMore"`
// Job One shell command the agent started with `runCommand`, recorded before it produced output and kept after it ended. It appears in `JobPage` and in `JobSignalRecordPage`.
Job Job `json:"job"`
// Limit The page size the server used.
Limit int32 `json:"limit"`
// Offset The number of requests skipped before this page.
Offset int32 `json:"offset"`
// SignalRequests The signal requests on this page, ordered by `requestedAt` ascending.
SignalRequests []JobSignalRecord `json:"signalRequests"`
}
JobSignalRecordPage One job and a page of its signal history, oldest first, returned by `GET /session/jobs/{jobId}/signals`.
type JobSignalRecordSignal ¶ added in v0.4.0
type JobSignalRecordSignal string
JobSignalRecordSignal The requested signal.
- `stop`: asks the process group to end with `SIGTERM` and escalates to `SIGKILL` after a grace period. - `kill`: sends `SIGKILL` at once.
const ( JobSignalRecordSignalKill JobSignalRecordSignal = "kill" JobSignalRecordSignalStop JobSignalRecordSignal = "stop" )
Defines values for JobSignalRecordSignal.
func (JobSignalRecordSignal) Valid ¶ added in v0.4.0
func (e JobSignalRecordSignal) Valid() bool
Valid indicates whether the value is a known member of the JobSignalRecordSignal enum.
type JobSignalRecordStateAtRequest ¶ added in v0.4.0
type JobSignalRecordStateAtRequest string
JobSignalRecordStateAtRequest The job's state when the request arrived, with the same values as `Job.state`.
const ( JobSignalRecordStateAtRequestExited JobSignalRecordStateAtRequest = "exited" JobSignalRecordStateAtRequestFailed JobSignalRecordStateAtRequest = "failed" JobSignalRecordStateAtRequestInterrupted JobSignalRecordStateAtRequest = "interrupted" JobSignalRecordStateAtRequestRunning JobSignalRecordStateAtRequest = "running" JobSignalRecordStateAtRequestSignalled JobSignalRecordStateAtRequest = "signalled" )
Defines values for JobSignalRecordStateAtRequest.
func (JobSignalRecordStateAtRequest) Valid ¶ added in v0.4.0
func (e JobSignalRecordStateAtRequest) Valid() bool
Valid indicates whether the value is a known member of the JobSignalRecordStateAtRequest enum.
type JobSignalRequest ¶
type JobSignalRequest struct {
// Signal The signal to send to the job's process group.
//
// - `stop`: `SIGTERM`, then `SIGKILL` if the process group is still running 10 seconds later.
// - `kill`: `SIGKILL` at once.
Signal JobSignalRequestSignal `json:"signal"`
}
JobSignalRequest The body of `POST /session/jobs/{jobId}/signal`, naming the signal to send to the job's process group.
type JobSignalRequestSignal ¶
type JobSignalRequestSignal string
JobSignalRequestSignal The signal to send to the job's process group.
- `stop`: `SIGTERM`, then `SIGKILL` if the process group is still running 10 seconds later. - `kill`: `SIGKILL` at once.
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 The job the request named.
JobId openapi_types.UUID `json:"jobId"`
// Signalled `true` when this request found the job running and sent the signal. The process may still be ending when the response arrives. Signalling an exited or already signalled job, or one no live worker holds, is not an error and reports `false` with the current state.
Signalled bool `json:"signalled"`
// State The job's state when the request arrived, with the same values as `Job.state`. A successful signal reports `running`, because the process ends after the response. Read the job again to see `signalled`.
State JobSignalResponseState `json:"state"`
}
JobSignalResponse The result of `POST /session/jobs/{jobId}/signal`. Peen records the request in the job's signal history either way.
type JobSignalResponseState ¶
type JobSignalResponseState string
JobSignalResponseState The job's state when the request arrived, with the same values as `Job.state`. A successful signal reports `running`, because the process ends after the response. Read the job again to see `signalled`.
const ( JobSignalResponseStateExited JobSignalResponseState = "exited" JobSignalResponseStateFailed JobSignalResponseState = "failed" JobSignalResponseStateInterrupted JobSignalResponseState = "interrupted" 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 The job's lifecycle state.
- `running`: the process is still running. - `exited`: the process ended on its own. `exitCode` holds its status, 0 for success. - `signalled`: the process ended because of a signal, usually from a stop or kill request. - `failed`: Peen could not run or supervise the process to its end, for example because storing its output failed; `failureDetail` says why. - `interrupted`: Peen or its worker stopped while the process was running, so it could not be followed further.
type LearnedFile ¶ added in v0.37.0
type LearnedFile struct {
// AlwaysLoaded True for a rule that is part of every system prompt: one without `paths`, `globs`, or `applyTo` frontmatter. Such a rule counts against `PEEN_MAX_SYSTEM_PROMPT_PERCENT`. Always false for a skill, and false for a file over 128 KiB.
AlwaysLoaded bool `json:"alwaysLoaded"`
// EstimatedTokens The file's size in tokens, estimated with the o200k tokenizer. 0 for a file over 128 KiB, which the harness does not load.
EstimatedTokens int64 `json:"estimatedTokens"`
// Kind Whether a learned file is a rule or a skill.
//
// - `rule`: a Markdown file under `rules/` in a learned directory, possibly in subdirectories.
// - `skill`: a `skills/<name>/` directory whose `SKILL.md` holds the skill.
Kind LearnedKind `json:"kind"`
// ModifiedAt When the file was last modified, in RFC 3339 format.
ModifiedAt time.Time `json:"modifiedAt"`
// Name The rule's path under `rules/` without `.md`, using `/` between directories, such as `go-errors` or `go/errors`, or the skill's directory name. A learned rule loads under the name `learned/<name>`. Pass it as the `name` query parameter to read or delete the file.
Name string `json:"name"`
// Path The absolute path of the rule file, or the skill's `SKILL.md`, on the controller's host.
Path string `json:"path"`
// Scope Which learned directory a learned file lives in.
//
// - `workspace`: `.agents/learned/` in the session's workspace root, which holds what belongs to that project.
// - `global`: the deployment's global learned directory, which every session reads (by default `.agents/learned/` in the config directory).
Scope LearnedScope `json:"scope"`
// SizeBytes The file's size in bytes.
SizeBytes int64 `json:"sizeBytes"`
}
LearnedFile One learned rule, or one learned skill's `SKILL.md`, that an agent saved while auto-evolve was on or that you placed in a learned directory. Returned by `GET /session/learned` and inside `LearnedFileContent`.
type LearnedFileContent ¶ added in v0.37.0
type LearnedFileContent struct {
// Content The file's text exactly as stored, including any frontmatter. Empty for a file over 128 KiB.
Content string `json:"content"`
// File One learned rule, or one learned skill's `SKILL.md`, that an agent saved while auto-evolve was on or that you placed in a learned directory. Returned by `GET /session/learned` and inside `LearnedFileContent`.
File LearnedFile `json:"file"`
}
LearnedFileContent One learned file and its text. Returned by `GET /session/learned/file`.
type LearnedFileList ¶ added in v0.37.0
type LearnedFileList struct {
// Items Workspace files first, then global ones, each sorted by kind and name.
Items []LearnedFile `json:"items"`
}
LearnedFileList Every learned rule and skill a session loads. Returned by `GET /session/learned`.
type LearnedKind ¶ added in v0.37.0
type LearnedKind string
LearnedKind Whether a learned file is a rule or a skill.
- `rule`: a Markdown file under `rules/` in a learned directory, possibly in subdirectories. - `skill`: a `skills/<name>/` directory whose `SKILL.md` holds the skill.
const ( LearnedKindRule LearnedKind = "rule" LearnedKindSkill LearnedKind = "skill" )
Defines values for LearnedKind.
func (LearnedKind) Valid ¶ added in v0.37.0
func (e LearnedKind) Valid() bool
Valid indicates whether the value is a known member of the LearnedKind enum.
type LearnedName ¶ added in v0.37.0
type LearnedName = string
LearnedName defines model for LearnedName.
type LearnedScope ¶ added in v0.37.0
type LearnedScope string
LearnedScope Which learned directory a learned file lives in.
- `workspace`: `.agents/learned/` in the session's workspace root, which holds what belongs to that project. - `global`: the deployment's global learned directory, which every session reads (by default `.agents/learned/` in the config directory).
const ( LearnedScopeGlobal LearnedScope = "global" LearnedScopeWorkspace LearnedScope = "workspace" )
Defines values for LearnedScope.
func (LearnedScope) Valid ¶ added in v0.37.0
func (e LearnedScope) Valid() bool
Valid indicates whether the value is a known member of the LearnedScope enum.
type ListAgentSpaces200JSONResponse ¶ added in v0.19.0
type ListAgentSpaces200JSONResponse struct {
Body AgentSpaceList
Headers ListAgentSpaces200ResponseHeaders
}
func (ListAgentSpaces200JSONResponse) VisitListAgentSpacesResponse ¶ added in v0.19.0
func (response ListAgentSpaces200JSONResponse) VisitListAgentSpacesResponse(w http.ResponseWriter) error
type ListAgentSpaces200ResponseHeaders ¶ added in v0.19.0
type ListAgentSpaces200ResponseHeaders struct {
XRequestID openapi_types.UUID
}
type ListAgentSpaces401JSONResponse ¶ added in v0.19.0
func (ListAgentSpaces401JSONResponse) VisitListAgentSpacesResponse ¶ added in v0.19.0
func (response ListAgentSpaces401JSONResponse) VisitListAgentSpacesResponse(w http.ResponseWriter) error
type ListAgentSpaces406JSONResponse ¶ added in v0.52.0
type ListAgentSpaces406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListAgentSpaces406JSONResponse) VisitListAgentSpacesResponse ¶ added in v0.52.0
func (response ListAgentSpaces406JSONResponse) VisitListAgentSpacesResponse(w http.ResponseWriter) error
type ListAgentSpaces500JSONResponse ¶ added in v0.19.0
type ListAgentSpaces500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListAgentSpaces500JSONResponse) VisitListAgentSpacesResponse ¶ added in v0.19.0
func (response ListAgentSpaces500JSONResponse) VisitListAgentSpacesResponse(w http.ResponseWriter) error
type ListAgentSpacesRequestObject ¶ added in v0.19.0
type ListAgentSpacesRequestObject struct {
}
type ListAgentSpacesResponseObject ¶ added in v0.19.0
type ListAgentSpacesResponseObject interface {
VisitListAgentSpacesResponse(w http.ResponseWriter) error
}
type ListCronJobs200JSONResponse ¶ added in v0.51.0
type ListCronJobs200JSONResponse struct {
Body CronJobList
Headers ListCronJobs200ResponseHeaders
}
func (ListCronJobs200JSONResponse) VisitListCronJobsResponse ¶ added in v0.51.0
func (response ListCronJobs200JSONResponse) VisitListCronJobsResponse(w http.ResponseWriter) error
type ListCronJobs200ResponseHeaders ¶ added in v0.51.0
type ListCronJobs200ResponseHeaders struct {
XRequestID openapi_types.UUID
}
type ListCronJobs401JSONResponse ¶ added in v0.51.0
func (ListCronJobs401JSONResponse) VisitListCronJobsResponse ¶ added in v0.51.0
func (response ListCronJobs401JSONResponse) VisitListCronJobsResponse(w http.ResponseWriter) error
type ListCronJobs406JSONResponse ¶ added in v0.52.0
type ListCronJobs406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListCronJobs406JSONResponse) VisitListCronJobsResponse ¶ added in v0.52.0
func (response ListCronJobs406JSONResponse) VisitListCronJobsResponse(w http.ResponseWriter) error
type ListCronJobs500JSONResponse ¶ added in v0.51.0
type ListCronJobs500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListCronJobs500JSONResponse) VisitListCronJobsResponse ¶ added in v0.51.0
func (response ListCronJobs500JSONResponse) VisitListCronJobsResponse(w http.ResponseWriter) error
type ListCronJobsRequestObject ¶ added in v0.51.0
type ListCronJobsRequestObject struct {
}
type ListCronJobsResponseObject ¶ added in v0.51.0
type ListCronJobsResponseObject interface {
VisitListCronJobsResponse(w http.ResponseWriter) error
}
type ListCronRuns200JSONResponse ¶ added in v0.51.0
type ListCronRuns200JSONResponse struct {
Body CronRunPage
Headers ListCronRuns200ResponseHeaders
}
func (ListCronRuns200JSONResponse) VisitListCronRunsResponse ¶ added in v0.51.0
func (response ListCronRuns200JSONResponse) VisitListCronRunsResponse(w http.ResponseWriter) error
type ListCronRuns200ResponseHeaders ¶ added in v0.51.0
type ListCronRuns200ResponseHeaders struct {
XRequestID openapi_types.UUID
}
type ListCronRuns400JSONResponse ¶ added in v0.51.0
type ListCronRuns400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ListCronRuns400JSONResponse) VisitListCronRunsResponse ¶ added in v0.51.0
func (response ListCronRuns400JSONResponse) VisitListCronRunsResponse(w http.ResponseWriter) error
type ListCronRuns401JSONResponse ¶ added in v0.51.0
func (ListCronRuns401JSONResponse) VisitListCronRunsResponse ¶ added in v0.51.0
func (response ListCronRuns401JSONResponse) VisitListCronRunsResponse(w http.ResponseWriter) error
type ListCronRuns406JSONResponse ¶ added in v0.52.0
type ListCronRuns406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListCronRuns406JSONResponse) VisitListCronRunsResponse ¶ added in v0.52.0
func (response ListCronRuns406JSONResponse) VisitListCronRunsResponse(w http.ResponseWriter) error
type ListCronRuns500JSONResponse ¶ added in v0.51.0
type ListCronRuns500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListCronRuns500JSONResponse) VisitListCronRunsResponse ¶ added in v0.51.0
func (response ListCronRuns500JSONResponse) VisitListCronRunsResponse(w http.ResponseWriter) error
type ListCronRunsParams ¶ added in v0.51.0
type ListCronRunsParams struct {
// Job Return only the runs of the job with this name, 1 to 64 ASCII letters, digits, underscores or hyphens. The name may belong to a job that is no longer configured. Omit it to list every job's runs.
Job *string `form:"job,omitempty" json:"job,omitempty"`
// Limit The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListCronRunsParams defines parameters for ListCronRuns.
type ListCronRunsRequestObject ¶ added in v0.51.0
type ListCronRunsRequestObject struct {
Params ListCronRunsParams
}
type ListCronRunsResponseObject ¶ added in v0.51.0
type ListCronRunsResponseObject interface {
VisitListCronRunsResponse(w http.ResponseWriter) error
}
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 ¶
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 ListMessages406JSONResponse ¶ added in v0.52.0
type ListMessages406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListMessages406JSONResponse) VisitListMessagesResponse ¶ added in v0.52.0
func (response ListMessages406JSONResponse) 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 The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// Order The direction of the list by stored sequence. `asc`, the default, returns the oldest items first; `desc` returns the newest first. `offset` counts from the start of the chosen direction.
Order *ListMessagesParamsOrder `form:"order,omitempty" json:"order,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
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 ListModels200JSONResponse ¶ added in v0.12.0
type ListModels200JSONResponse struct {
Body ModelList
Headers ListModels200ResponseHeaders
}
func (ListModels200JSONResponse) VisitListModelsResponse ¶ added in v0.12.0
func (response ListModels200JSONResponse) VisitListModelsResponse(w http.ResponseWriter) error
type ListModels200ResponseHeaders ¶ added in v0.12.0
type ListModels200ResponseHeaders struct {
XRequestID openapi_types.UUID
}
type ListModels401JSONResponse ¶ added in v0.12.0
func (ListModels401JSONResponse) VisitListModelsResponse ¶ added in v0.12.0
func (response ListModels401JSONResponse) VisitListModelsResponse(w http.ResponseWriter) error
type ListModels406JSONResponse ¶ added in v0.52.0
type ListModels406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListModels406JSONResponse) VisitListModelsResponse ¶ added in v0.52.0
func (response ListModels406JSONResponse) VisitListModelsResponse(w http.ResponseWriter) error
type ListModels500JSONResponse ¶ added in v0.12.0
type ListModels500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListModels500JSONResponse) VisitListModelsResponse ¶ added in v0.12.0
func (response ListModels500JSONResponse) VisitListModelsResponse(w http.ResponseWriter) error
type ListModelsRequestObject ¶ added in v0.12.0
type ListModelsRequestObject struct {
}
type ListModelsResponseObject ¶ added in v0.12.0
type ListModelsResponseObject interface {
VisitListModelsResponse(w http.ResponseWriter) error
}
type ListSessionAgentRunCompactions200JSONResponse ¶ added in v0.11.0
type ListSessionAgentRunCompactions200JSONResponse struct {
Body AgentRunCompactionPage
Headers ListSessionAgentRunCompactions200ResponseHeaders
}
func (ListSessionAgentRunCompactions200JSONResponse) VisitListSessionAgentRunCompactionsResponse ¶ added in v0.11.0
func (response ListSessionAgentRunCompactions200JSONResponse) VisitListSessionAgentRunCompactionsResponse(w http.ResponseWriter) error
type ListSessionAgentRunCompactions200ResponseHeaders ¶ added in v0.11.0
type ListSessionAgentRunCompactions200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type ListSessionAgentRunCompactions400JSONResponse ¶ added in v0.11.0
type ListSessionAgentRunCompactions400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ListSessionAgentRunCompactions400JSONResponse) VisitListSessionAgentRunCompactionsResponse ¶ added in v0.11.0
func (response ListSessionAgentRunCompactions400JSONResponse) VisitListSessionAgentRunCompactionsResponse(w http.ResponseWriter) error
type ListSessionAgentRunCompactions401JSONResponse ¶ added in v0.11.0
func (ListSessionAgentRunCompactions401JSONResponse) VisitListSessionAgentRunCompactionsResponse ¶ added in v0.11.0
func (response ListSessionAgentRunCompactions401JSONResponse) VisitListSessionAgentRunCompactionsResponse(w http.ResponseWriter) error
type ListSessionAgentRunCompactions404JSONResponse ¶ added in v0.11.0
type ListSessionAgentRunCompactions404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (ListSessionAgentRunCompactions404JSONResponse) VisitListSessionAgentRunCompactionsResponse ¶ added in v0.11.0
func (response ListSessionAgentRunCompactions404JSONResponse) VisitListSessionAgentRunCompactionsResponse(w http.ResponseWriter) error
type ListSessionAgentRunCompactions406JSONResponse ¶ added in v0.52.0
type ListSessionAgentRunCompactions406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionAgentRunCompactions406JSONResponse) VisitListSessionAgentRunCompactionsResponse ¶ added in v0.52.0
func (response ListSessionAgentRunCompactions406JSONResponse) VisitListSessionAgentRunCompactionsResponse(w http.ResponseWriter) error
type ListSessionAgentRunCompactions500JSONResponse ¶ added in v0.11.0
type ListSessionAgentRunCompactions500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListSessionAgentRunCompactions500JSONResponse) VisitListSessionAgentRunCompactionsResponse ¶ added in v0.11.0
func (response ListSessionAgentRunCompactions500JSONResponse) VisitListSessionAgentRunCompactionsResponse(w http.ResponseWriter) error
type ListSessionAgentRunCompactionsParams ¶ added in v0.11.0
type ListSessionAgentRunCompactionsParams struct {
// Limit The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ListSessionAgentRunCompactionsParams defines parameters for ListSessionAgentRunCompactions.
type ListSessionAgentRunCompactionsRequestObject ¶ added in v0.11.0
type ListSessionAgentRunCompactionsRequestObject struct {
AgentRunId AgentRunID `json:"agentRunId"`
Params ListSessionAgentRunCompactionsParams
}
type ListSessionAgentRunCompactionsResponseObject ¶ added in v0.11.0
type ListSessionAgentRunCompactionsResponseObject interface {
VisitListSessionAgentRunCompactionsResponse(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 ¶
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 ListSessionAgentRunEvents406JSONResponse ¶ added in v0.52.0
type ListSessionAgentRunEvents406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionAgentRunEvents406JSONResponse) VisitListSessionAgentRunEventsResponse ¶ added in v0.52.0
func (response ListSessionAgentRunEvents406JSONResponse) 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 Return only events whose `sequence` is greater than this value. Pass `0` for the first page and the previous page's `nextCursor` after that. Defaults to 0.
Cursor *int64 `form:"cursor,omitempty" json:"cursor,omitempty"`
// Limit Maximum number of events to return, from 1 to 200. Defaults to 100.
Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
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 ListSessionAgentRunMessages200JSONResponse ¶ added in v0.11.0
type ListSessionAgentRunMessages200JSONResponse struct {
Body AgentRunMessagePage
Headers ListSessionAgentRunMessages200ResponseHeaders
}
func (ListSessionAgentRunMessages200JSONResponse) VisitListSessionAgentRunMessagesResponse ¶ added in v0.11.0
func (response ListSessionAgentRunMessages200JSONResponse) VisitListSessionAgentRunMessagesResponse(w http.ResponseWriter) error
type ListSessionAgentRunMessages200ResponseHeaders ¶ added in v0.11.0
type ListSessionAgentRunMessages200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type ListSessionAgentRunMessages400JSONResponse ¶ added in v0.11.0
type ListSessionAgentRunMessages400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ListSessionAgentRunMessages400JSONResponse) VisitListSessionAgentRunMessagesResponse ¶ added in v0.11.0
func (response ListSessionAgentRunMessages400JSONResponse) VisitListSessionAgentRunMessagesResponse(w http.ResponseWriter) error
type ListSessionAgentRunMessages401JSONResponse ¶ added in v0.11.0
func (ListSessionAgentRunMessages401JSONResponse) VisitListSessionAgentRunMessagesResponse ¶ added in v0.11.0
func (response ListSessionAgentRunMessages401JSONResponse) VisitListSessionAgentRunMessagesResponse(w http.ResponseWriter) error
type ListSessionAgentRunMessages404JSONResponse ¶ added in v0.11.0
type ListSessionAgentRunMessages404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (ListSessionAgentRunMessages404JSONResponse) VisitListSessionAgentRunMessagesResponse ¶ added in v0.11.0
func (response ListSessionAgentRunMessages404JSONResponse) VisitListSessionAgentRunMessagesResponse(w http.ResponseWriter) error
type ListSessionAgentRunMessages406JSONResponse ¶ added in v0.52.0
type ListSessionAgentRunMessages406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionAgentRunMessages406JSONResponse) VisitListSessionAgentRunMessagesResponse ¶ added in v0.52.0
func (response ListSessionAgentRunMessages406JSONResponse) VisitListSessionAgentRunMessagesResponse(w http.ResponseWriter) error
type ListSessionAgentRunMessages500JSONResponse ¶ added in v0.11.0
type ListSessionAgentRunMessages500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListSessionAgentRunMessages500JSONResponse) VisitListSessionAgentRunMessagesResponse ¶ added in v0.11.0
func (response ListSessionAgentRunMessages500JSONResponse) VisitListSessionAgentRunMessagesResponse(w http.ResponseWriter) error
type ListSessionAgentRunMessagesParams ¶ added in v0.11.0
type ListSessionAgentRunMessagesParams struct {
// Limit The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ListSessionAgentRunMessagesParams defines parameters for ListSessionAgentRunMessages.
type ListSessionAgentRunMessagesRequestObject ¶ added in v0.11.0
type ListSessionAgentRunMessagesRequestObject struct {
AgentRunId AgentRunID `json:"agentRunId"`
Params ListSessionAgentRunMessagesParams
}
type ListSessionAgentRunMessagesResponseObject ¶ added in v0.11.0
type ListSessionAgentRunMessagesResponseObject interface {
VisitListSessionAgentRunMessagesResponse(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 ¶
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 ListSessionAgentRuns406JSONResponse ¶ added in v0.52.0
type ListSessionAgentRuns406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionAgentRuns406JSONResponse) VisitListSessionAgentRunsResponse ¶ added in v0.52.0
func (response ListSessionAgentRuns406JSONResponse) 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 The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// State Keep only runs in this state. `running`, `completed`, `failed`, `cancelled`, and `interrupted` match the stored state. `waiting` is not a stored state: it keeps the `running` runs that asked a question with the `ask` tool that nobody has answered yet.
State *ListSessionAgentRunsParamsState `form:"state,omitempty" json:"state,omitempty"`
// ParentAgentRunId Keep only the direct children of one agent run. Pass an agent run ID, or `root` for the children the session's root conversation launched. Any other value answers `400 VALIDATION_FAILED`. An agent run ID the session does not have returns an empty page.
ParentAgentRunId *string `form:"parentAgentRunId,omitempty" json:"parentAgentRunId,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
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" ListSessionAgentRunsParamsStateInterrupted ListSessionAgentRunsParamsState = "interrupted" ListSessionAgentRunsParamsStateRunning ListSessionAgentRunsParamsState = "running" ListSessionAgentRunsParamsStateWaiting ListSessionAgentRunsParamsState = "waiting" )
Defines values for ListSessionAgentRunsParamsState.
func (ListSessionAgentRunsParamsState) Valid ¶
func (e ListSessionAgentRunsParamsState) Valid() bool
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 ListSessionAgentSpaceDecisions200JSONResponse ¶ added in v0.19.0
type ListSessionAgentSpaceDecisions200JSONResponse struct {
Body SessionAgentSpaceDecisionPage
Headers ListSessionAgentSpaceDecisions200ResponseHeaders
}
func (ListSessionAgentSpaceDecisions200JSONResponse) VisitListSessionAgentSpaceDecisionsResponse ¶ added in v0.19.0
func (response ListSessionAgentSpaceDecisions200JSONResponse) VisitListSessionAgentSpaceDecisionsResponse(w http.ResponseWriter) error
type ListSessionAgentSpaceDecisions200ResponseHeaders ¶ added in v0.19.0
type ListSessionAgentSpaceDecisions200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type ListSessionAgentSpaceDecisions400JSONResponse ¶ added in v0.19.0
type ListSessionAgentSpaceDecisions400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ListSessionAgentSpaceDecisions400JSONResponse) VisitListSessionAgentSpaceDecisionsResponse ¶ added in v0.19.0
func (response ListSessionAgentSpaceDecisions400JSONResponse) VisitListSessionAgentSpaceDecisionsResponse(w http.ResponseWriter) error
type ListSessionAgentSpaceDecisions401JSONResponse ¶ added in v0.19.0
func (ListSessionAgentSpaceDecisions401JSONResponse) VisitListSessionAgentSpaceDecisionsResponse ¶ added in v0.19.0
func (response ListSessionAgentSpaceDecisions401JSONResponse) VisitListSessionAgentSpaceDecisionsResponse(w http.ResponseWriter) error
type ListSessionAgentSpaceDecisions404JSONResponse ¶ added in v0.19.0
type ListSessionAgentSpaceDecisions404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (ListSessionAgentSpaceDecisions404JSONResponse) VisitListSessionAgentSpaceDecisionsResponse ¶ added in v0.19.0
func (response ListSessionAgentSpaceDecisions404JSONResponse) VisitListSessionAgentSpaceDecisionsResponse(w http.ResponseWriter) error
type ListSessionAgentSpaceDecisions406JSONResponse ¶ added in v0.52.0
type ListSessionAgentSpaceDecisions406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionAgentSpaceDecisions406JSONResponse) VisitListSessionAgentSpaceDecisionsResponse ¶ added in v0.52.0
func (response ListSessionAgentSpaceDecisions406JSONResponse) VisitListSessionAgentSpaceDecisionsResponse(w http.ResponseWriter) error
type ListSessionAgentSpaceDecisions500JSONResponse ¶ added in v0.19.0
type ListSessionAgentSpaceDecisions500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListSessionAgentSpaceDecisions500JSONResponse) VisitListSessionAgentSpaceDecisionsResponse ¶ added in v0.19.0
func (response ListSessionAgentSpaceDecisions500JSONResponse) VisitListSessionAgentSpaceDecisionsResponse(w http.ResponseWriter) error
type ListSessionAgentSpaceDecisionsParams ¶ added in v0.19.0
type ListSessionAgentSpaceDecisionsParams struct {
// Limit The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ListSessionAgentSpaceDecisionsParams defines parameters for ListSessionAgentSpaceDecisions.
type ListSessionAgentSpaceDecisionsRequestObject ¶ added in v0.19.0
type ListSessionAgentSpaceDecisionsRequestObject struct {
Params ListSessionAgentSpaceDecisionsParams
}
type ListSessionAgentSpaceDecisionsResponseObject ¶ added in v0.19.0
type ListSessionAgentSpaceDecisionsResponseObject interface {
VisitListSessionAgentSpaceDecisionsResponse(w http.ResponseWriter) error
}
type ListSessionCompactions200JSONResponse ¶ added in v0.4.0
type ListSessionCompactions200JSONResponse struct {
Body CompactionPage
Headers ListSessionCompactions200ResponseHeaders
}
func (ListSessionCompactions200JSONResponse) VisitListSessionCompactionsResponse ¶ added in v0.4.0
func (response ListSessionCompactions200JSONResponse) VisitListSessionCompactionsResponse(w http.ResponseWriter) error
type ListSessionCompactions200ResponseHeaders ¶ added in v0.4.0
type ListSessionCompactions200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type ListSessionCompactions400JSONResponse ¶ added in v0.4.0
type ListSessionCompactions400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ListSessionCompactions400JSONResponse) VisitListSessionCompactionsResponse ¶ added in v0.4.0
func (response ListSessionCompactions400JSONResponse) VisitListSessionCompactionsResponse(w http.ResponseWriter) error
type ListSessionCompactions401JSONResponse ¶ added in v0.4.0
func (ListSessionCompactions401JSONResponse) VisitListSessionCompactionsResponse ¶ added in v0.4.0
func (response ListSessionCompactions401JSONResponse) VisitListSessionCompactionsResponse(w http.ResponseWriter) error
type ListSessionCompactions404JSONResponse ¶ added in v0.4.0
type ListSessionCompactions404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (ListSessionCompactions404JSONResponse) VisitListSessionCompactionsResponse ¶ added in v0.4.0
func (response ListSessionCompactions404JSONResponse) VisitListSessionCompactionsResponse(w http.ResponseWriter) error
type ListSessionCompactions406JSONResponse ¶ added in v0.52.0
type ListSessionCompactions406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionCompactions406JSONResponse) VisitListSessionCompactionsResponse ¶ added in v0.52.0
func (response ListSessionCompactions406JSONResponse) VisitListSessionCompactionsResponse(w http.ResponseWriter) error
type ListSessionCompactions500JSONResponse ¶ added in v0.4.0
type ListSessionCompactions500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListSessionCompactions500JSONResponse) VisitListSessionCompactionsResponse ¶ added in v0.4.0
func (response ListSessionCompactions500JSONResponse) VisitListSessionCompactionsResponse(w http.ResponseWriter) error
type ListSessionCompactionsParams ¶ added in v0.4.0
type ListSessionCompactionsParams struct {
// Limit The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ListSessionCompactionsParams defines parameters for ListSessionCompactions.
type ListSessionCompactionsRequestObject ¶ added in v0.4.0
type ListSessionCompactionsRequestObject struct {
Params ListSessionCompactionsParams
}
type ListSessionCompactionsResponseObject ¶ added in v0.4.0
type ListSessionCompactionsResponseObject interface {
VisitListSessionCompactionsResponse(w http.ResponseWriter) error
}
type ListSessionEvents200JSONResponse ¶
type ListSessionEvents200JSONResponse struct {
Body TranscriptEventPage
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 ¶
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 ListSessionEvents406JSONResponse ¶ added in v0.52.0
type ListSessionEvents406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionEvents406JSONResponse) VisitListSessionEventsResponse ¶ added in v0.52.0
func (response ListSessionEvents406JSONResponse) 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 {
// Limit The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// Order The direction of the list by stored sequence. `asc`, the default, returns the oldest items first; `desc` returns the newest first. `offset` counts from the start of the chosen direction.
Order *ListSessionEventsParamsOrder `form:"order,omitempty" json:"order,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ListSessionEventsParams defines parameters for ListSessionEvents.
type ListSessionEventsParamsOrder ¶ added in v0.4.0
type ListSessionEventsParamsOrder string
ListSessionEventsParamsOrder defines parameters for ListSessionEvents.
const ( ListSessionEventsParamsOrderAsc ListSessionEventsParamsOrder = "asc" ListSessionEventsParamsOrderDesc ListSessionEventsParamsOrder = "desc" )
Defines values for ListSessionEventsParamsOrder.
func (ListSessionEventsParamsOrder) Valid ¶ added in v0.4.0
func (e ListSessionEventsParamsOrder) Valid() bool
Valid indicates whether the value is a known member of the ListSessionEventsParamsOrder enum.
type ListSessionEventsRequestObject ¶
type ListSessionEventsRequestObject struct {
Params ListSessionEventsParams
}
type ListSessionEventsResponseObject ¶
type ListSessionEventsResponseObject interface {
VisitListSessionEventsResponse(w http.ResponseWriter) error
}
type ListSessionFeed200JSONResponse ¶ added in v0.26.0
type ListSessionFeed200JSONResponse struct {
Body FeedPage
Headers ListSessionFeed200ResponseHeaders
}
func (ListSessionFeed200JSONResponse) VisitListSessionFeedResponse ¶ added in v0.26.0
func (response ListSessionFeed200JSONResponse) VisitListSessionFeedResponse(w http.ResponseWriter) error
type ListSessionFeed200ResponseHeaders ¶ added in v0.26.0
type ListSessionFeed200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type ListSessionFeed400JSONResponse ¶ added in v0.26.0
type ListSessionFeed400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ListSessionFeed400JSONResponse) VisitListSessionFeedResponse ¶ added in v0.26.0
func (response ListSessionFeed400JSONResponse) VisitListSessionFeedResponse(w http.ResponseWriter) error
type ListSessionFeed401JSONResponse ¶ added in v0.26.0
func (ListSessionFeed401JSONResponse) VisitListSessionFeedResponse ¶ added in v0.26.0
func (response ListSessionFeed401JSONResponse) VisitListSessionFeedResponse(w http.ResponseWriter) error
type ListSessionFeed404JSONResponse ¶ added in v0.26.0
type ListSessionFeed404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (ListSessionFeed404JSONResponse) VisitListSessionFeedResponse ¶ added in v0.26.0
func (response ListSessionFeed404JSONResponse) VisitListSessionFeedResponse(w http.ResponseWriter) error
type ListSessionFeed406JSONResponse ¶ added in v0.52.0
type ListSessionFeed406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionFeed406JSONResponse) VisitListSessionFeedResponse ¶ added in v0.52.0
func (response ListSessionFeed406JSONResponse) VisitListSessionFeedResponse(w http.ResponseWriter) error
type ListSessionFeed500JSONResponse ¶ added in v0.26.0
type ListSessionFeed500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListSessionFeed500JSONResponse) VisitListSessionFeedResponse ¶ added in v0.26.0
func (response ListSessionFeed500JSONResponse) VisitListSessionFeedResponse(w http.ResponseWriter) error
type ListSessionFeedParams ¶ added in v0.26.0
type ListSessionFeedParams struct {
// Cursor Return frames with a sequence greater than this value. Pass the last sequence you applied, or `0` to start from the beginning. Default `0`.
Cursor *int64 `form:"cursor,omitempty" json:"cursor,omitempty"`
// Limit Maximum number of frames to return, 1 to 200. Default `100`.
Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ListSessionFeedParams defines parameters for ListSessionFeed.
type ListSessionFeedRequestObject ¶ added in v0.26.0
type ListSessionFeedRequestObject struct {
Params ListSessionFeedParams
}
type ListSessionFeedResponseObject ¶ added in v0.26.0
type ListSessionFeedResponseObject interface {
VisitListSessionFeedResponse(w http.ResponseWriter) error
}
type ListSessionJobSignalRequests200JSONResponse ¶ added in v0.4.0
type ListSessionJobSignalRequests200JSONResponse struct {
Body JobSignalRecordPage
Headers ListSessionJobSignalRequests200ResponseHeaders
}
func (ListSessionJobSignalRequests200JSONResponse) VisitListSessionJobSignalRequestsResponse ¶ added in v0.4.0
func (response ListSessionJobSignalRequests200JSONResponse) VisitListSessionJobSignalRequestsResponse(w http.ResponseWriter) error
type ListSessionJobSignalRequests200ResponseHeaders ¶ added in v0.4.0
type ListSessionJobSignalRequests200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type ListSessionJobSignalRequests400JSONResponse ¶ added in v0.4.0
type ListSessionJobSignalRequests400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ListSessionJobSignalRequests400JSONResponse) VisitListSessionJobSignalRequestsResponse ¶ added in v0.4.0
func (response ListSessionJobSignalRequests400JSONResponse) VisitListSessionJobSignalRequestsResponse(w http.ResponseWriter) error
type ListSessionJobSignalRequests401JSONResponse ¶ added in v0.4.0
func (ListSessionJobSignalRequests401JSONResponse) VisitListSessionJobSignalRequestsResponse ¶ added in v0.4.0
func (response ListSessionJobSignalRequests401JSONResponse) VisitListSessionJobSignalRequestsResponse(w http.ResponseWriter) error
type ListSessionJobSignalRequests404JSONResponse ¶ added in v0.4.0
type ListSessionJobSignalRequests404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (ListSessionJobSignalRequests404JSONResponse) VisitListSessionJobSignalRequestsResponse ¶ added in v0.4.0
func (response ListSessionJobSignalRequests404JSONResponse) VisitListSessionJobSignalRequestsResponse(w http.ResponseWriter) error
type ListSessionJobSignalRequests406JSONResponse ¶ added in v0.52.0
type ListSessionJobSignalRequests406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionJobSignalRequests406JSONResponse) VisitListSessionJobSignalRequestsResponse ¶ added in v0.52.0
func (response ListSessionJobSignalRequests406JSONResponse) VisitListSessionJobSignalRequestsResponse(w http.ResponseWriter) error
type ListSessionJobSignalRequests500JSONResponse ¶ added in v0.4.0
type ListSessionJobSignalRequests500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListSessionJobSignalRequests500JSONResponse) VisitListSessionJobSignalRequestsResponse ¶ added in v0.4.0
func (response ListSessionJobSignalRequests500JSONResponse) VisitListSessionJobSignalRequestsResponse(w http.ResponseWriter) error
type ListSessionJobSignalRequestsParams ¶ added in v0.4.0
type ListSessionJobSignalRequestsParams struct {
// Limit The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ListSessionJobSignalRequestsParams defines parameters for ListSessionJobSignalRequests.
type ListSessionJobSignalRequestsRequestObject ¶ added in v0.4.0
type ListSessionJobSignalRequestsRequestObject struct {
JobId JobID `json:"jobId"`
Params ListSessionJobSignalRequestsParams
}
type ListSessionJobSignalRequestsResponseObject ¶ added in v0.4.0
type ListSessionJobSignalRequestsResponseObject interface {
VisitListSessionJobSignalRequestsResponse(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 ¶
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 ListSessionJobs406JSONResponse ¶ added in v0.52.0
type ListSessionJobs406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionJobs406JSONResponse) VisitListSessionJobsResponse ¶ added in v0.52.0
func (response ListSessionJobs406JSONResponse) 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 The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// State Keep only jobs in this state. Omit it to list every job.
//
// - `running`: still running.
// - `exited`: ended on its own.
// - `signalled`: ended by a signal.
// - `failed`: could not be run or supervised to the end.
// - `interrupted`: was still running when Peen or its worker stopped.
State *ListSessionJobsParamsState `form:"state,omitempty" json:"state,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
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" ListSessionJobsParamsStateInterrupted ListSessionJobsParamsState = "interrupted" 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 ListSessionLearnedFiles200JSONResponse ¶ added in v0.37.0
type ListSessionLearnedFiles200JSONResponse struct {
Body LearnedFileList
Headers ListSessionLearnedFiles200ResponseHeaders
}
func (ListSessionLearnedFiles200JSONResponse) VisitListSessionLearnedFilesResponse ¶ added in v0.37.0
func (response ListSessionLearnedFiles200JSONResponse) VisitListSessionLearnedFilesResponse(w http.ResponseWriter) error
type ListSessionLearnedFiles200ResponseHeaders ¶ added in v0.37.0
type ListSessionLearnedFiles200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type ListSessionLearnedFiles400JSONResponse ¶ added in v0.37.0
type ListSessionLearnedFiles400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ListSessionLearnedFiles400JSONResponse) VisitListSessionLearnedFilesResponse ¶ added in v0.37.0
func (response ListSessionLearnedFiles400JSONResponse) VisitListSessionLearnedFilesResponse(w http.ResponseWriter) error
type ListSessionLearnedFiles401JSONResponse ¶ added in v0.37.0
func (ListSessionLearnedFiles401JSONResponse) VisitListSessionLearnedFilesResponse ¶ added in v0.37.0
func (response ListSessionLearnedFiles401JSONResponse) VisitListSessionLearnedFilesResponse(w http.ResponseWriter) error
type ListSessionLearnedFiles404JSONResponse ¶ added in v0.37.0
type ListSessionLearnedFiles404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (ListSessionLearnedFiles404JSONResponse) VisitListSessionLearnedFilesResponse ¶ added in v0.37.0
func (response ListSessionLearnedFiles404JSONResponse) VisitListSessionLearnedFilesResponse(w http.ResponseWriter) error
type ListSessionLearnedFiles406JSONResponse ¶ added in v0.52.0
type ListSessionLearnedFiles406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionLearnedFiles406JSONResponse) VisitListSessionLearnedFilesResponse ¶ added in v0.52.0
func (response ListSessionLearnedFiles406JSONResponse) VisitListSessionLearnedFilesResponse(w http.ResponseWriter) error
type ListSessionLearnedFiles500JSONResponse ¶ added in v0.37.0
type ListSessionLearnedFiles500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListSessionLearnedFiles500JSONResponse) VisitListSessionLearnedFilesResponse ¶ added in v0.37.0
func (response ListSessionLearnedFiles500JSONResponse) VisitListSessionLearnedFilesResponse(w http.ResponseWriter) error
type ListSessionLearnedFilesParams ¶ added in v0.37.0
type ListSessionLearnedFilesParams struct {
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ListSessionLearnedFilesParams defines parameters for ListSessionLearnedFiles.
type ListSessionLearnedFilesRequestObject ¶ added in v0.37.0
type ListSessionLearnedFilesRequestObject struct {
Params ListSessionLearnedFilesParams
}
type ListSessionLearnedFilesResponseObject ¶ added in v0.37.0
type ListSessionLearnedFilesResponseObject interface {
VisitListSessionLearnedFilesResponse(w http.ResponseWriter) error
}
type ListSessionModelRunCalls200JSONResponse ¶ added in v0.4.0
type ListSessionModelRunCalls200JSONResponse struct {
Body ModelCallPage
Headers ListSessionModelRunCalls200ResponseHeaders
}
func (ListSessionModelRunCalls200JSONResponse) VisitListSessionModelRunCallsResponse ¶ added in v0.4.0
func (response ListSessionModelRunCalls200JSONResponse) VisitListSessionModelRunCallsResponse(w http.ResponseWriter) error
type ListSessionModelRunCalls200ResponseHeaders ¶ added in v0.4.0
type ListSessionModelRunCalls200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type ListSessionModelRunCalls400JSONResponse ¶ added in v0.4.0
type ListSessionModelRunCalls400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ListSessionModelRunCalls400JSONResponse) VisitListSessionModelRunCallsResponse ¶ added in v0.4.0
func (response ListSessionModelRunCalls400JSONResponse) VisitListSessionModelRunCallsResponse(w http.ResponseWriter) error
type ListSessionModelRunCalls401JSONResponse ¶ added in v0.4.0
func (ListSessionModelRunCalls401JSONResponse) VisitListSessionModelRunCallsResponse ¶ added in v0.4.0
func (response ListSessionModelRunCalls401JSONResponse) VisitListSessionModelRunCallsResponse(w http.ResponseWriter) error
type ListSessionModelRunCalls404JSONResponse ¶ added in v0.4.0
type ListSessionModelRunCalls404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (ListSessionModelRunCalls404JSONResponse) VisitListSessionModelRunCallsResponse ¶ added in v0.4.0
func (response ListSessionModelRunCalls404JSONResponse) VisitListSessionModelRunCallsResponse(w http.ResponseWriter) error
type ListSessionModelRunCalls406JSONResponse ¶ added in v0.52.0
type ListSessionModelRunCalls406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionModelRunCalls406JSONResponse) VisitListSessionModelRunCallsResponse ¶ added in v0.52.0
func (response ListSessionModelRunCalls406JSONResponse) VisitListSessionModelRunCallsResponse(w http.ResponseWriter) error
type ListSessionModelRunCalls500JSONResponse ¶ added in v0.4.0
type ListSessionModelRunCalls500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListSessionModelRunCalls500JSONResponse) VisitListSessionModelRunCallsResponse ¶ added in v0.4.0
func (response ListSessionModelRunCalls500JSONResponse) VisitListSessionModelRunCallsResponse(w http.ResponseWriter) error
type ListSessionModelRunCallsParams ¶ added in v0.4.0
type ListSessionModelRunCallsParams struct {
// Limit The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ListSessionModelRunCallsParams defines parameters for ListSessionModelRunCalls.
type ListSessionModelRunCallsRequestObject ¶ added in v0.4.0
type ListSessionModelRunCallsRequestObject struct {
ModelRunId ModelRunID `json:"modelRunId"`
Params ListSessionModelRunCallsParams
}
type ListSessionModelRunCallsResponseObject ¶ added in v0.4.0
type ListSessionModelRunCallsResponseObject interface {
VisitListSessionModelRunCallsResponse(w http.ResponseWriter) error
}
type ListSessionModelRuns200JSONResponse ¶ added in v0.4.0
type ListSessionModelRuns200JSONResponse struct {
Body ModelRunPage
Headers ListSessionModelRuns200ResponseHeaders
}
func (ListSessionModelRuns200JSONResponse) VisitListSessionModelRunsResponse ¶ added in v0.4.0
func (response ListSessionModelRuns200JSONResponse) VisitListSessionModelRunsResponse(w http.ResponseWriter) error
type ListSessionModelRuns200ResponseHeaders ¶ added in v0.4.0
type ListSessionModelRuns200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type ListSessionModelRuns400JSONResponse ¶ added in v0.4.0
type ListSessionModelRuns400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ListSessionModelRuns400JSONResponse) VisitListSessionModelRunsResponse ¶ added in v0.4.0
func (response ListSessionModelRuns400JSONResponse) VisitListSessionModelRunsResponse(w http.ResponseWriter) error
type ListSessionModelRuns401JSONResponse ¶ added in v0.4.0
func (ListSessionModelRuns401JSONResponse) VisitListSessionModelRunsResponse ¶ added in v0.4.0
func (response ListSessionModelRuns401JSONResponse) VisitListSessionModelRunsResponse(w http.ResponseWriter) error
type ListSessionModelRuns404JSONResponse ¶ added in v0.4.0
type ListSessionModelRuns404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (ListSessionModelRuns404JSONResponse) VisitListSessionModelRunsResponse ¶ added in v0.4.0
func (response ListSessionModelRuns404JSONResponse) VisitListSessionModelRunsResponse(w http.ResponseWriter) error
type ListSessionModelRuns406JSONResponse ¶ added in v0.52.0
type ListSessionModelRuns406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionModelRuns406JSONResponse) VisitListSessionModelRunsResponse ¶ added in v0.52.0
func (response ListSessionModelRuns406JSONResponse) VisitListSessionModelRunsResponse(w http.ResponseWriter) error
type ListSessionModelRuns500JSONResponse ¶ added in v0.4.0
type ListSessionModelRuns500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListSessionModelRuns500JSONResponse) VisitListSessionModelRunsResponse ¶ added in v0.4.0
func (response ListSessionModelRuns500JSONResponse) VisitListSessionModelRunsResponse(w http.ResponseWriter) error
type ListSessionModelRunsParams ¶ added in v0.4.0
type ListSessionModelRunsParams struct {
// Limit The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// Stage Keep only runs from one kind of work. Omit it to list every stage.
//
// - `turn`: the root conversation's model work.
// - `child`: a child agent's model work.
// - `compaction`: a summary of older messages, for the root conversation or a child agent.
Stage *ListSessionModelRunsParamsStage `form:"stage,omitempty" json:"stage,omitempty"`
// State Keep only runs in one state. Omit it to list every state.
//
// - `running`: has not ended.
// - `completed`: returned a response.
// - `failed`: ended with a provider or model error.
// - `cancelled`: was cancelled or ran past its deadline.
// - `interrupted`: was still running when Peen stopped.
State *ListSessionModelRunsParamsState `form:"state,omitempty" json:"state,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ListSessionModelRunsParams defines parameters for ListSessionModelRuns.
type ListSessionModelRunsParamsStage ¶ added in v0.4.0
type ListSessionModelRunsParamsStage string
ListSessionModelRunsParamsStage defines parameters for ListSessionModelRuns.
const ( ListSessionModelRunsParamsStageChild ListSessionModelRunsParamsStage = "child" ListSessionModelRunsParamsStageCompaction ListSessionModelRunsParamsStage = "compaction" ListSessionModelRunsParamsStageTurn ListSessionModelRunsParamsStage = "turn" )
Defines values for ListSessionModelRunsParamsStage.
func (ListSessionModelRunsParamsStage) Valid ¶ added in v0.4.0
func (e ListSessionModelRunsParamsStage) Valid() bool
Valid indicates whether the value is a known member of the ListSessionModelRunsParamsStage enum.
type ListSessionModelRunsParamsState ¶ added in v0.4.0
type ListSessionModelRunsParamsState string
ListSessionModelRunsParamsState defines parameters for ListSessionModelRuns.
const ( ListSessionModelRunsParamsStateCancelled ListSessionModelRunsParamsState = "cancelled" ListSessionModelRunsParamsStateCompleted ListSessionModelRunsParamsState = "completed" ListSessionModelRunsParamsStateFailed ListSessionModelRunsParamsState = "failed" ListSessionModelRunsParamsStateInterrupted ListSessionModelRunsParamsState = "interrupted" ListSessionModelRunsParamsStateRunning ListSessionModelRunsParamsState = "running" )
Defines values for ListSessionModelRunsParamsState.
func (ListSessionModelRunsParamsState) Valid ¶ added in v0.4.0
func (e ListSessionModelRunsParamsState) Valid() bool
Valid indicates whether the value is a known member of the ListSessionModelRunsParamsState enum.
type ListSessionModelRunsRequestObject ¶ added in v0.4.0
type ListSessionModelRunsRequestObject struct {
Params ListSessionModelRunsParams
}
type ListSessionModelRunsResponseObject ¶ added in v0.4.0
type ListSessionModelRunsResponseObject interface {
VisitListSessionModelRunsResponse(w http.ResponseWriter) error
}
type ListSessionNotices200JSONResponse ¶ added in v0.4.0
type ListSessionNotices200JSONResponse struct {
Body SessionNoticePage
Headers ListSessionNotices200ResponseHeaders
}
func (ListSessionNotices200JSONResponse) VisitListSessionNoticesResponse ¶ added in v0.4.0
func (response ListSessionNotices200JSONResponse) VisitListSessionNoticesResponse(w http.ResponseWriter) error
type ListSessionNotices200ResponseHeaders ¶ added in v0.4.0
type ListSessionNotices200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type ListSessionNotices400JSONResponse ¶ added in v0.4.0
type ListSessionNotices400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ListSessionNotices400JSONResponse) VisitListSessionNoticesResponse ¶ added in v0.4.0
func (response ListSessionNotices400JSONResponse) VisitListSessionNoticesResponse(w http.ResponseWriter) error
type ListSessionNotices401JSONResponse ¶ added in v0.4.0
func (ListSessionNotices401JSONResponse) VisitListSessionNoticesResponse ¶ added in v0.4.0
func (response ListSessionNotices401JSONResponse) VisitListSessionNoticesResponse(w http.ResponseWriter) error
type ListSessionNotices404JSONResponse ¶ added in v0.4.0
type ListSessionNotices404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (ListSessionNotices404JSONResponse) VisitListSessionNoticesResponse ¶ added in v0.4.0
func (response ListSessionNotices404JSONResponse) VisitListSessionNoticesResponse(w http.ResponseWriter) error
type ListSessionNotices406JSONResponse ¶ added in v0.52.0
type ListSessionNotices406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionNotices406JSONResponse) VisitListSessionNoticesResponse ¶ added in v0.52.0
func (response ListSessionNotices406JSONResponse) VisitListSessionNoticesResponse(w http.ResponseWriter) error
type ListSessionNotices500JSONResponse ¶ added in v0.4.0
type ListSessionNotices500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListSessionNotices500JSONResponse) VisitListSessionNoticesResponse ¶ added in v0.4.0
func (response ListSessionNotices500JSONResponse) VisitListSessionNoticesResponse(w http.ResponseWriter) error
type ListSessionNoticesParams ¶ added in v0.4.0
type ListSessionNoticesParams struct {
// Limit The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ListSessionNoticesParams defines parameters for ListSessionNotices.
type ListSessionNoticesRequestObject ¶ added in v0.4.0
type ListSessionNoticesRequestObject struct {
Params ListSessionNoticesParams
}
type ListSessionNoticesResponseObject ¶ added in v0.4.0
type ListSessionNoticesResponseObject interface {
VisitListSessionNoticesResponse(w http.ResponseWriter) error
}
type ListSessionTurns200JSONResponse ¶ added in v0.4.0
type ListSessionTurns200JSONResponse struct {
Body TurnPage
Headers ListSessionTurns200ResponseHeaders
}
func (ListSessionTurns200JSONResponse) VisitListSessionTurnsResponse ¶ added in v0.4.0
func (response ListSessionTurns200JSONResponse) VisitListSessionTurnsResponse(w http.ResponseWriter) error
type ListSessionTurns200ResponseHeaders ¶ added in v0.4.0
type ListSessionTurns200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type ListSessionTurns400JSONResponse ¶ added in v0.4.0
type ListSessionTurns400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ListSessionTurns400JSONResponse) VisitListSessionTurnsResponse ¶ added in v0.4.0
func (response ListSessionTurns400JSONResponse) VisitListSessionTurnsResponse(w http.ResponseWriter) error
type ListSessionTurns401JSONResponse ¶ added in v0.4.0
func (ListSessionTurns401JSONResponse) VisitListSessionTurnsResponse ¶ added in v0.4.0
func (response ListSessionTurns401JSONResponse) VisitListSessionTurnsResponse(w http.ResponseWriter) error
type ListSessionTurns404JSONResponse ¶ added in v0.4.0
type ListSessionTurns404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (ListSessionTurns404JSONResponse) VisitListSessionTurnsResponse ¶ added in v0.4.0
func (response ListSessionTurns404JSONResponse) VisitListSessionTurnsResponse(w http.ResponseWriter) error
type ListSessionTurns406JSONResponse ¶ added in v0.52.0
type ListSessionTurns406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionTurns406JSONResponse) VisitListSessionTurnsResponse ¶ added in v0.52.0
func (response ListSessionTurns406JSONResponse) VisitListSessionTurnsResponse(w http.ResponseWriter) error
type ListSessionTurns500JSONResponse ¶ added in v0.4.0
type ListSessionTurns500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListSessionTurns500JSONResponse) VisitListSessionTurnsResponse ¶ added in v0.4.0
func (response ListSessionTurns500JSONResponse) VisitListSessionTurnsResponse(w http.ResponseWriter) error
type ListSessionTurnsParams ¶ added in v0.4.0
type ListSessionTurnsParams struct {
// Limit The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ListSessionTurnsParams defines parameters for ListSessionTurns.
type ListSessionTurnsRequestObject ¶ added in v0.4.0
type ListSessionTurnsRequestObject struct {
Params ListSessionTurnsParams
}
type ListSessionTurnsResponseObject ¶ added in v0.4.0
type ListSessionTurnsResponseObject interface {
VisitListSessionTurnsResponse(w http.ResponseWriter) error
}
type ListSessionWorkers200JSONResponse ¶ added in v0.8.0
type ListSessionWorkers200JSONResponse struct {
Body WorkerGenerationPage
Headers ListSessionWorkers200ResponseHeaders
}
func (ListSessionWorkers200JSONResponse) VisitListSessionWorkersResponse ¶ added in v0.8.0
func (response ListSessionWorkers200JSONResponse) VisitListSessionWorkersResponse(w http.ResponseWriter) error
type ListSessionWorkers200ResponseHeaders ¶ added in v0.8.0
type ListSessionWorkers200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type ListSessionWorkers400JSONResponse ¶ added in v0.8.0
type ListSessionWorkers400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ListSessionWorkers400JSONResponse) VisitListSessionWorkersResponse ¶ added in v0.8.0
func (response ListSessionWorkers400JSONResponse) VisitListSessionWorkersResponse(w http.ResponseWriter) error
type ListSessionWorkers401JSONResponse ¶ added in v0.8.0
func (ListSessionWorkers401JSONResponse) VisitListSessionWorkersResponse ¶ added in v0.8.0
func (response ListSessionWorkers401JSONResponse) VisitListSessionWorkersResponse(w http.ResponseWriter) error
type ListSessionWorkers404JSONResponse ¶ added in v0.8.0
type ListSessionWorkers404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (ListSessionWorkers404JSONResponse) VisitListSessionWorkersResponse ¶ added in v0.8.0
func (response ListSessionWorkers404JSONResponse) VisitListSessionWorkersResponse(w http.ResponseWriter) error
type ListSessionWorkers406JSONResponse ¶ added in v0.52.0
type ListSessionWorkers406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessionWorkers406JSONResponse) VisitListSessionWorkersResponse ¶ added in v0.52.0
func (response ListSessionWorkers406JSONResponse) VisitListSessionWorkersResponse(w http.ResponseWriter) error
type ListSessionWorkers500JSONResponse ¶ added in v0.8.0
type ListSessionWorkers500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListSessionWorkers500JSONResponse) VisitListSessionWorkersResponse ¶ added in v0.8.0
func (response ListSessionWorkers500JSONResponse) VisitListSessionWorkersResponse(w http.ResponseWriter) error
type ListSessionWorkersParams ¶ added in v0.8.0
type ListSessionWorkersParams struct {
// Limit The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ListSessionWorkersParams defines parameters for ListSessionWorkers.
type ListSessionWorkersRequestObject ¶ added in v0.8.0
type ListSessionWorkersRequestObject struct {
Params ListSessionWorkersParams
}
type ListSessionWorkersResponseObject ¶ added in v0.8.0
type ListSessionWorkersResponseObject interface {
VisitListSessionWorkersResponse(w http.ResponseWriter) error
}
type ListSessions200JSONResponse ¶ added in v0.8.0
type ListSessions200JSONResponse struct {
Body SessionPage
Headers ListSessions200ResponseHeaders
}
func (ListSessions200JSONResponse) VisitListSessionsResponse ¶ added in v0.8.0
func (response ListSessions200JSONResponse) VisitListSessionsResponse(w http.ResponseWriter) error
type ListSessions200ResponseHeaders ¶ added in v0.8.0
type ListSessions200ResponseHeaders struct {
XRequestID openapi_types.UUID
}
type ListSessions400JSONResponse ¶ added in v0.8.0
type ListSessions400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ListSessions400JSONResponse) VisitListSessionsResponse ¶ added in v0.8.0
func (response ListSessions400JSONResponse) VisitListSessionsResponse(w http.ResponseWriter) error
type ListSessions401JSONResponse ¶ added in v0.8.0
func (ListSessions401JSONResponse) VisitListSessionsResponse ¶ added in v0.8.0
func (response ListSessions401JSONResponse) VisitListSessionsResponse(w http.ResponseWriter) error
type ListSessions406JSONResponse ¶ added in v0.52.0
type ListSessions406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListSessions406JSONResponse) VisitListSessionsResponse ¶ added in v0.52.0
func (response ListSessions406JSONResponse) VisitListSessionsResponse(w http.ResponseWriter) error
type ListSessions500JSONResponse ¶ added in v0.8.0
type ListSessions500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListSessions500JSONResponse) VisitListSessionsResponse ¶ added in v0.8.0
func (response ListSessions500JSONResponse) VisitListSessionsResponse(w http.ResponseWriter) error
type ListSessionsParams ¶ added in v0.8.0
type ListSessionsParams struct {
// Limit The largest number of items to return, from 1 to 200. Defaults to 50. A value outside that range answers `400 VALIDATION_FAILED`.
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
// Offset How many items of the ordered list to skip before the page starts. Defaults to 0. To read the next page, add the previous page's `limit` to its `offset`. An offset past the end returns an empty page.
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
}
ListSessionsParams defines parameters for ListSessions.
type ListSessionsRequestObject ¶ added in v0.8.0
type ListSessionsRequestObject struct {
Params ListSessionsParams
}
type ListSessionsResponseObject ¶ added in v0.8.0
type ListSessionsResponseObject interface {
VisitListSessionsResponse(w http.ResponseWriter) error
}
type ListWorkspaceFiles200JSONResponse ¶ added in v0.51.0
type ListWorkspaceFiles200JSONResponse struct {
Body WorkspaceFileListing
Headers ListWorkspaceFiles200ResponseHeaders
}
func (ListWorkspaceFiles200JSONResponse) VisitListWorkspaceFilesResponse ¶ added in v0.51.0
func (response ListWorkspaceFiles200JSONResponse) VisitListWorkspaceFilesResponse(w http.ResponseWriter) error
type ListWorkspaceFiles200ResponseHeaders ¶ added in v0.51.0
type ListWorkspaceFiles200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type ListWorkspaceFiles400JSONResponse ¶ added in v0.51.0
type ListWorkspaceFiles400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ListWorkspaceFiles400JSONResponse) VisitListWorkspaceFilesResponse ¶ added in v0.51.0
func (response ListWorkspaceFiles400JSONResponse) VisitListWorkspaceFilesResponse(w http.ResponseWriter) error
type ListWorkspaceFiles401JSONResponse ¶ added in v0.51.0
func (ListWorkspaceFiles401JSONResponse) VisitListWorkspaceFilesResponse ¶ added in v0.51.0
func (response ListWorkspaceFiles401JSONResponse) VisitListWorkspaceFilesResponse(w http.ResponseWriter) error
type ListWorkspaceFiles403JSONResponse ¶ added in v0.51.0
type ListWorkspaceFiles403JSONResponse struct{ ErrorForbiddenJSONResponse }
func (ListWorkspaceFiles403JSONResponse) VisitListWorkspaceFilesResponse ¶ added in v0.51.0
func (response ListWorkspaceFiles403JSONResponse) VisitListWorkspaceFilesResponse(w http.ResponseWriter) error
type ListWorkspaceFiles404JSONResponse ¶ added in v0.51.0
type ListWorkspaceFiles404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (ListWorkspaceFiles404JSONResponse) VisitListWorkspaceFilesResponse ¶ added in v0.51.0
func (response ListWorkspaceFiles404JSONResponse) VisitListWorkspaceFilesResponse(w http.ResponseWriter) error
type ListWorkspaceFiles406JSONResponse ¶ added in v0.52.0
type ListWorkspaceFiles406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListWorkspaceFiles406JSONResponse) VisitListWorkspaceFilesResponse ¶ added in v0.52.0
func (response ListWorkspaceFiles406JSONResponse) VisitListWorkspaceFilesResponse(w http.ResponseWriter) error
type ListWorkspaceFiles500JSONResponse ¶ added in v0.51.0
type ListWorkspaceFiles500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListWorkspaceFiles500JSONResponse) VisitListWorkspaceFilesResponse ¶ added in v0.51.0
func (response ListWorkspaceFiles500JSONResponse) VisitListWorkspaceFilesResponse(w http.ResponseWriter) error
type ListWorkspaceFilesParams ¶ added in v0.51.0
type ListWorkspaceFilesParams struct {
// Path The path to inspect, relative to the workspace, such as `src` or `src/main.go`. Omit it or pass an empty value to list the workspace root.
Path *string `form:"path,omitempty" json:"path,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ListWorkspaceFilesParams defines parameters for ListWorkspaceFiles.
type ListWorkspaceFilesRequestObject ¶ added in v0.51.0
type ListWorkspaceFilesRequestObject struct {
Params ListWorkspaceFilesParams
}
type ListWorkspaceFilesResponseObject ¶ added in v0.51.0
type ListWorkspaceFilesResponseObject interface {
VisitListWorkspaceFilesResponse(w http.ResponseWriter) error
}
type ListWorkspaceRoots200JSONResponse ¶ added in v0.13.0
type ListWorkspaceRoots200JSONResponse struct {
Body WorkspaceRootList
Headers ListWorkspaceRoots200ResponseHeaders
}
func (ListWorkspaceRoots200JSONResponse) VisitListWorkspaceRootsResponse ¶ added in v0.13.0
func (response ListWorkspaceRoots200JSONResponse) VisitListWorkspaceRootsResponse(w http.ResponseWriter) error
type ListWorkspaceRoots200ResponseHeaders ¶ added in v0.13.0
type ListWorkspaceRoots200ResponseHeaders struct {
XRequestID openapi_types.UUID
}
type ListWorkspaceRoots401JSONResponse ¶ added in v0.13.0
func (ListWorkspaceRoots401JSONResponse) VisitListWorkspaceRootsResponse ¶ added in v0.13.0
func (response ListWorkspaceRoots401JSONResponse) VisitListWorkspaceRootsResponse(w http.ResponseWriter) error
type ListWorkspaceRoots406JSONResponse ¶ added in v0.52.0
type ListWorkspaceRoots406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ListWorkspaceRoots406JSONResponse) VisitListWorkspaceRootsResponse ¶ added in v0.52.0
func (response ListWorkspaceRoots406JSONResponse) VisitListWorkspaceRootsResponse(w http.ResponseWriter) error
type ListWorkspaceRoots500JSONResponse ¶ added in v0.13.0
type ListWorkspaceRoots500JSONResponse struct{ ErrorInternalJSONResponse }
func (ListWorkspaceRoots500JSONResponse) VisitListWorkspaceRootsResponse ¶ added in v0.13.0
func (response ListWorkspaceRoots500JSONResponse) VisitListWorkspaceRootsResponse(w http.ResponseWriter) error
type ListWorkspaceRootsRequestObject ¶ added in v0.13.0
type ListWorkspaceRootsRequestObject struct {
}
type ListWorkspaceRootsResponseObject ¶ added in v0.13.0
type ListWorkspaceRootsResponseObject interface {
VisitListWorkspaceRootsResponse(w http.ResponseWriter) error
}
type MCPPrompt ¶ added in v0.54.0
type MCPPrompt struct {
// Arguments The arguments the prompt takes, each passed as `name=value`. Empty when it takes none.
Arguments []MCPPromptArgument `json:"arguments"`
// Description What the prompt does, cut to 256 bytes. Absent when it gave none.
Description *string `json:"description,omitempty"`
// Name The prompt name to put after `/mcp:<server>:`.
Name string `json:"name"`
// Title The prompt's display name, cut to 256 bytes. Absent when it gave none.
Title *string `json:"title,omitempty"`
}
MCPPrompt One prompt an MCP server offers. The server writes every field.
type MCPPromptArgument ¶ added in v0.54.0
type MCPPromptArgument struct {
// Description What the argument holds, cut to 256 bytes. Absent when the server gave none.
Description *string `json:"description,omitempty"`
// Name The argument name.
Name string `json:"name"`
// Required Whether the prompt needs the argument.
Required bool `json:"required"`
}
MCPPromptArgument One argument an MCP prompt takes.
type MCPServerFeature ¶ added in v0.54.0
type MCPServerFeature string
MCPServerFeature An MCP capability a server advertised.
- `tools`: tools the agent can call. - `resources`: resources and resource templates, which the agent reads with `listMcpResources` and `readMcpResource`. - `resourceSubscribe`: change notifications for single resources. Peen does not subscribe. - `prompts`: prompts a user invokes with `/mcp:<server>:<prompt>` and the agent reads with `listMcpPrompts` and `getMcpPrompt`. - `completions`: argument completion for prompts and resource templates. Peen does not use it.
const ( MCPServerFeatureCompletions MCPServerFeature = "completions" MCPServerFeaturePrompts MCPServerFeature = "prompts" MCPServerFeatureResourceSubscribe MCPServerFeature = "resourceSubscribe" MCPServerFeatureResources MCPServerFeature = "resources" MCPServerFeatureTools MCPServerFeature = "tools" )
Defines values for MCPServerFeature.
func (MCPServerFeature) Valid ¶ added in v0.54.0
func (e MCPServerFeature) Valid() bool
Valid indicates whether the value is a known member of the MCPServerFeature enum.
type MCPServerInfo ¶ added in v0.54.0
type MCPServerInfo struct {
// Name The server implementation's name.
Name string `json:"name"`
// Title The server's display name. Absent when it gave none.
Title *string `json:"title,omitempty"`
// Version The server's version. Absent when it gave none.
Version *string `json:"version,omitempty"`
}
MCPServerInfo What an MCP server says it is. The server writes every field, each cut to 128 bytes. Absent when the server gave no name.
type MCPServerStatus ¶ added in v0.38.0
type MCPServerStatus struct {
// Error Why the server failed. Absent for a ready server.
Error *string `json:"error,omitempty"`
// Features The MCP capabilities the server advertised, whether or not its mcp.json entry turns them off. Absent for a failed server.
Features *[]MCPServerFeature `json:"features,omitempty"`
// InstructionsBytes The size in bytes of the instructions the server sent, after the `PEEN_MCP_MAX_INSTRUCTIONS_BYTES` cut when that limit is above zero. Absent when the server sent none or failed.
InstructionsBytes *int `json:"instructionsBytes,omitempty"`
// InstructionsCut Whether the server's instructions were longer than `PEEN_MCP_MAX_INSTRUCTIONS_BYTES` and only their start is kept. Absent when false.
InstructionsCut *bool `json:"instructionsCut,omitempty"`
// InstructionsIncluded Whether the server's instructions reach the agent's system prompt. They do when the server sent some, its mcp.json entry does not set `instructions` to false, and `PEEN_MCP_MAX_INSTRUCTIONS_BYTES` is above zero. Absent when false.
InstructionsIncluded *bool `json:"instructionsIncluded,omitempty"`
// Name The server name from mcp.json. Empty when a whole mcp.json file was refused.
Name string `json:"name"`
// Prompts The prompts the server offers, which a user invokes with a message that starts with `/mcp:<server>:<prompt>`. At most the first 50 of the server's first page. Absent when the server offers none, its mcp.json entry sets `prompts` to false, or it failed.
Prompts *[]MCPPrompt `json:"prompts,omitempty"`
// ProtocolVersion The MCP protocol version the connection speaks, such as `2026-07-28`, or `2025-11-25` for a server that predates it. At most 128 bytes. Absent for a failed server.
ProtocolVersion *string `json:"protocolVersion,omitempty"`
// ServerInfo What an MCP server says it is. The server writes every field, each cut to 128 bytes. Absent when the server gave no name.
ServerInfo *MCPServerInfo `json:"serverInfo,omitempty"`
// Source The layer whose `.agents/mcp.json` defines the server.
//
// - `config`: the config directory's `.agents/mcp.json`.
// - `workspace`: the session workspace's `.agents/mcp.json`, read only when the deployment enables workspace MCP servers.
Source MCPServerStatusSource `json:"source"`
// State The server's state when the worker reported.
//
// - `ready`: the server started and listed its tools.
// - `failed`: its entry was refused, it could not start, or its connection had failed when the worker reported.
State MCPServerStatusState `json:"state"`
// Tools The exposed tool names the agent can call, each `mcp__<server>__<tool>`. Empty for a failed server.
Tools []string `json:"tools"`
// Transport How Peen reaches the server. Absent when a whole file was refused.
//
// - `stdio`: a server process the worker starts.
// - `http`: a Streamable HTTP endpoint.
Transport *MCPServerStatusTransport `json:"transport,omitempty"`
// Warnings Problems that did not stop the server, such as a name in its `tools` list that the server does not offer. Absent when there are none.
Warnings *[]string `json:"warnings,omitempty"`
}
MCPServerStatus One MCP server from an `.agents/mcp.json` file and its state when the worker last started it. A whole `mcp.json` file that could not be read or parsed also appears as one entry, with an empty `name`.
type MCPServerStatusSource ¶ added in v0.38.0
type MCPServerStatusSource string
MCPServerStatusSource The layer whose `.agents/mcp.json` defines the server.
- `config`: the config directory's `.agents/mcp.json`. - `workspace`: the session workspace's `.agents/mcp.json`, read only when the deployment enables workspace MCP servers.
const ( MCPServerStatusSourceConfig MCPServerStatusSource = "config" MCPServerStatusSourceWorkspace MCPServerStatusSource = "workspace" )
Defines values for MCPServerStatusSource.
func (MCPServerStatusSource) Valid ¶ added in v0.38.0
func (e MCPServerStatusSource) Valid() bool
Valid indicates whether the value is a known member of the MCPServerStatusSource enum.
type MCPServerStatusState ¶ added in v0.38.0
type MCPServerStatusState string
MCPServerStatusState The server's state when the worker reported.
- `ready`: the server started and listed its tools. - `failed`: its entry was refused, it could not start, or its connection had failed when the worker reported.
const ( MCPServerStatusStateFailed MCPServerStatusState = "failed" MCPServerStatusStateReady MCPServerStatusState = "ready" )
Defines values for MCPServerStatusState.
func (MCPServerStatusState) Valid ¶ added in v0.38.0
func (e MCPServerStatusState) Valid() bool
Valid indicates whether the value is a known member of the MCPServerStatusState enum.
type MCPServerStatusTransport ¶ added in v0.38.0
type MCPServerStatusTransport string
MCPServerStatusTransport How Peen reaches the server. Absent when a whole file was refused.
- `stdio`: a server process the worker starts. - `http`: a Streamable HTTP endpoint.
const ( MCPServerStatusTransportHttp MCPServerStatusTransport = "http" MCPServerStatusTransportStdio MCPServerStatusTransport = "stdio" )
Defines values for MCPServerStatusTransport.
func (MCPServerStatusTransport) Valid ¶ added in v0.38.0
func (e MCPServerStatusTransport) Valid() bool
Valid indicates whether the value is a known member of the MCPServerStatusTransport enum.
type MCPStatusReport ¶ added in v0.38.0
type MCPStatusReport struct {
// ReportedAt When the worker reported, at the start of a turn. Null before the first report.
ReportedAt *time.Time `json:"reportedAt"`
// Servers Every configured server and what happened when the worker started it. Servers that loaded come first, then entries refused while reading `mcp.json`. Empty before the first report and when the latest turn had no MCP configuration.
Servers []MCPServerStatus `json:"servers"`
}
MCPStatusReport The session's MCP servers as the worker last reported them, at the start of a turn. Returned by `GET /session/mcp`.
type Message ¶
type Message struct {
// CompactionId The compaction that summarized this message, when one did. A later compaction that includes the earlier summary never rewrites it. Absent otherwise.
CompactionId *openapi_types.UUID `json:"compactionId,omitempty"`
// Content The message text.
Content string `json:"content"`
// CreatedAt When the message was stored, RFC 3339.
CreatedAt time.Time `json:"createdAt"`
// Id The message ID.
Id openapi_types.UUID `json:"id"`
// Images The images the message carries, without their bytes, in the order the model sees them after the text. Absent when it has none.
Images *[]MessageImageInfo `json:"images,omitempty"`
// Incomplete True when the message was written by a turn that did not complete, for example one that was cancelled or failed. Absent when false.
Incomplete *bool `json:"incomplete,omitempty"`
// Injected True when Peen added this message to the conversation itself, such as a report of session events delivered during a turn or the instructions of an event handler that started a turn, rather than a person or the model writing it.
Injected *bool `json:"injected,omitempty"`
// InjectedKind What an injected message is, when it is more than a generic update. Absent for every other message.
//
// - `skill`: a skill the user invoked with `:name`, delivered as its own message after the message that named it, or the note that the skill was already loaded.
// - `image`: the message that shows the model an image readFile read, after that tool round.
InjectedKind *MessageInjectedKind `json:"injectedKind,omitempty"`
// IsError True when a `tool` message reports a failed tool call. Absent when false.
IsError *bool `json:"isError,omitempty"`
// Model The `connection/model` reference that wrote an assistant message. Absent for other messages.
Model *string `json:"model,omitempty"`
// Role Who wrote the message. The model receives a `system` message as a system message.
//
// - `system`: a notice Peen added to the conversation, such as how the previous turn ended and what it was asked.
// - `user`: a person's message, or an update Peen injected as user input.
// - `assistant`: a model response.
// - `tool`: a tool result.
Role MessageRole `json:"role"`
// Sequence Position in the session's conversation, starting at 1.
Sequence int64 `json:"sequence"`
// Thinking The model's reasoning text for an assistant message, when the provider returned any. Absent otherwise.
Thinking *string `json:"thinking,omitempty"`
// ToolCallId For a `tool` message, the ID of the tool call this result answers. Absent otherwise.
ToolCallId *string `json:"toolCallId,omitempty"`
// ToolCalls The tool calls an assistant message made, in order. Absent when it made none.
ToolCalls *[]MessageToolCall `json:"toolCalls,omitempty"`
// TurnId The turn that wrote this message. Messages that share it belong to one turn.
TurnId *openapi_types.UUID `json:"turnId,omitempty"`
// Workspace The workspace directory the session was in when the message was stored.
Workspace string `json:"workspace"`
}
Message One stored message of a session's root conversation, as `GET /messages` returns it. Optional fields are absent, not null, when they do not apply.
type MessageImageInfo ¶ added in v0.38.0
type MessageImageInfo struct {
// MediaType The image's media type: `image/png`, `image/jpeg`, `image/gif`, or `image/webp`.
MediaType string `json:"mediaType"`
// SizeBytes The image's decoded size in bytes.
SizeBytes int64 `json:"sizeBytes"`
}
MessageImageInfo An image carried by a message, described without its bytes.
type MessageInjectedKind ¶ added in v0.18.0
type MessageInjectedKind string
MessageInjectedKind What an injected message is, when it is more than a generic update. Absent for every other message.
- `skill`: a skill the user invoked with `:name`, delivered as its own message after the message that named it, or the note that the skill was already loaded. - `image`: the message that shows the model an image readFile read, after that tool round.
const ( MessageInjectedKindImage MessageInjectedKind = "image" MessageInjectedKindSkill MessageInjectedKind = "skill" )
Defines values for MessageInjectedKind.
func (MessageInjectedKind) Valid ¶ added in v0.18.0
func (e MessageInjectedKind) Valid() bool
Valid indicates whether the value is a known member of the MessageInjectedKind enum.
type MessagePage ¶
type MessagePage struct {
// HasMore True when more messages follow this page.
HasMore bool `json:"hasMore"`
// Items The messages on this page, in the requested order.
Items []Message `json:"items"`
// Limit The page size this response used.
Limit int32 `json:"limit"`
// Offset The number of messages skipped before this page.
Offset int32 `json:"offset"`
}
MessagePage One page of `GET /messages`.
type MessageRole ¶
type MessageRole string
MessageRole Who wrote the message. The model receives a `system` message as a system message.
- `system`: a notice Peen added to the conversation, such as how the previous turn ended and what it was asked. - `user`: a person's message, or an update Peen injected as user input. - `assistant`: a model response. - `tool`: a tool result.
const ( MessageRoleAssistant MessageRole = "assistant" MessageRoleSystem MessageRole = "system" 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 The arguments the model passed, as a JSON object.
Arguments map[string]interface{} `json:"arguments"`
// Id The call ID. The `tool` message that answers it carries the same value in `toolCallId`.
Id string `json:"id"`
// Name The tool name.
Name string `json:"name"`
}
MessageToolCall One tool call an assistant message made. It appears in `Message.toolCalls` and `AgentRunMessage.toolCalls`.
type Model ¶ added in v0.12.0
type Model struct {
// ConnectionName The configured connection part of `name`, before the first `/`.
ConnectionName string `json:"connectionName"`
// ContextWindowTokens The context window Peen enforces for this model, in tokens. It comes from the provider driver's model catalog; for a model the catalog does not cover, it is `PEEN_MAX_CONTEXT_TOKENS`.
ContextWindowTokens int64 `json:"contextWindowTokens"`
// ImageInput Whether the model takes images, in message.send and from readFile. An upstream with "imageInput": false makes every one of its models text-only.
ImageInput bool `json:"imageInput"`
// ModelId The raw model identifier the upstream accepted, the part of `name` after the first `/`.
ModelId string `json:"modelId"`
// Name The exact `connection/model` reference a WebSocket `message.send` frame passes as `data.model` to run one turn on this model.
Name string `json:"name"`
}
Model One model Peen found on a configured connection at controller startup, as `GET /models` lists it.
type ModelCall ¶ added in v0.4.0
type ModelCall struct {
// BilledCostAmount `responseCostAmount` plus `retryCostAmount`, as an exact decimal string. Empty when `costKnown` is `false`.
BilledCostAmount string `json:"billedCostAmount"`
// CacheReadTokens Prompt tokens the provider served from its cache.
CacheReadTokens int64 `json:"cacheReadTokens"`
// CacheWriteLongTtlTokens Prompt tokens the provider wrote to its long-lived cache.
CacheWriteLongTtlTokens int64 `json:"cacheWriteLongTtlTokens"`
// CacheWriteTokens Prompt tokens the provider wrote to its cache.
CacheWriteTokens int64 `json:"cacheWriteTokens"`
// CompletedAt When the round ended, as an RFC 3339 timestamp. Absent while it runs.
CompletedAt *time.Time `json:"completedAt,omitempty"`
// CompletionTokens Completion tokens the provider reported for the successful attempt.
CompletionTokens int64 `json:"completionTokens"`
// CostKnown `true` when the model has prices configured, so the cost amounts are filled in. `false` means the cost is unknown, not zero.
CostKnown bool `json:"costKnown"`
// FailureClassification Why the round did not complete: `model` for a provider or model error, `cancelled` for a cancellation or deadline, or `interrupted` when Peen stopped. Empty for a running or completed round.
FailureClassification string `json:"failureClassification"`
// FailureDetail The error text for a round that did not complete. Empty otherwise.
FailureDetail string `json:"failureDetail"`
// FinishReason Why the provider stopped generating, as the provider reported it. Empty until the round ends.
FinishReason string `json:"finishReason"`
// Id The round's ID.
Id openapi_types.UUID `json:"id"`
// ModelRunId The model run this round belongs to.
ModelRunId openapi_types.UUID `json:"modelRunId"`
// PromptTokens Prompt tokens the provider reported for the successful attempt.
PromptTokens int64 `json:"promptTokens"`
// ReasoningTokens Reasoning tokens the provider reported, a part of the completion tokens.
ReasoningTokens int64 `json:"reasoningTokens"`
// RequestMessages The exact messages sent to the provider for this round, the whole conversation so far. Images are base64 encoded.
RequestMessages []interface{} `json:"requestMessages"`
// RequestTools The tool definitions the provider saw for this round. Each has `name`, `description`, `argumentsSchema`, `strictArguments`, and `timeoutMs`.
RequestTools []interface{} `json:"requestTools"`
// ResponseCostAmount Cost of the successful attempt as an exact decimal string, in the currency of the model's prices. Empty when `costKnown` is `false`.
ResponseCostAmount string `json:"responseCostAmount"`
// ResponseMessage The assistant message the provider returned for this round. `null` while the round runs and when it ended before a message arrived.
ResponseMessage *map[string]interface{} `json:"responseMessage"`
// ResponseModelId The model ID the provider reported. Empty until the round ends.
ResponseModelId string `json:"responseModelId"`
// ResponseUsage The provider's usage report for this round, an object with the token counts (`prompt`, `completion`, `total`, `reasoning`, `cacheRead`, `cacheWrite`, `cacheWriteLongTtl`), `model`, `finishReason`, `totalAttempts`, `failedAttempts`, and the wasted token counts. Empty while the round runs.
ResponseUsage map[string]interface{} `json:"responseUsage"`
// RetryAttemptCount How many times the round was tried again after a failure.
RetryAttemptCount int64 `json:"retryAttemptCount"`
// RetryAttempts The failed attempts of this round that Peen retried or gave up on, oldest first. Peen saves each one as it happens.
RetryAttempts []map[string]interface{} `json:"retryAttempts"`
// RetryCostAmount Cost of the failed attempts as an exact decimal string. Empty when `costKnown` is `false`.
RetryCostAmount string `json:"retryCostAmount"`
// Round The round's position within its model run, counting from 0.
Round int64 `json:"round"`
// SessionId The session that made the request.
SessionId openapi_types.UUID `json:"sessionId"`
// StartedAt When Peen stored the request, just before sending it, as an RFC 3339 timestamp.
StartedAt time.Time `json:"startedAt"`
// State The round's lifecycle state.
//
// - `running`: has not ended.
// - `completed`: returned a response.
// - `failed`: ended with a provider or model error.
// - `cancelled`: was cancelled or ran past its deadline.
// - `interrupted`: was still running when Peen stopped.
State ModelCallState `json:"state"`
// TotalAttempts How many attempts the round made, the successful one included. 0 until the round ends.
TotalAttempts int64 `json:"totalAttempts"`
// TotalTokens Total tokens the provider reported for the successful attempt.
TotalTokens int64 `json:"totalTokens"`
// WastedCompletionTokens Completion tokens spent on failed attempts of this round.
WastedCompletionTokens int64 `json:"wastedCompletionTokens"`
// WastedPromptTokens Prompt tokens spent on failed attempts of this round.
WastedPromptTokens int64 `json:"wastedPromptTokens"`
// WastedTotalTokens Total tokens spent on failed attempts of this round.
WastedTotalTokens int64 `json:"wastedTotalTokens"`
}
ModelCall One provider round within a model run: the exact request Peen sent and the response, usage, retries and costs of that round. It appears in `ModelCallPage.calls`.
type ModelCallPage ¶ added in v0.4.0
type ModelCallPage struct {
// Calls The rounds on this page, ordered by `round` ascending.
Calls []ModelCall `json:"calls"`
// HasMore `true` when at least one more round exists after this page. Request the next page with `offset` increased by `limit`.
HasMore bool `json:"hasMore"`
// Limit The page size the server used.
Limit int32 `json:"limit"`
// ModelRun One logical model request Peen made for a turn, a child agent or a compaction, which can span several provider rounds. Peen writes it before provider work starts and finalizes it when the run ends. It appears in `ModelRunPage` and in `ModelCallPage`.
ModelRun ModelRun `json:"modelRun"`
// Offset The number of rounds skipped before this page.
Offset int32 `json:"offset"`
}
ModelCallPage One model run and a page of its provider rounds, returned by `GET /session/model-runs/{modelRunId}/calls`.
type ModelCallState ¶ added in v0.4.0
type ModelCallState string
ModelCallState The round's lifecycle state.
- `running`: has not ended. - `completed`: returned a response. - `failed`: ended with a provider or model error. - `cancelled`: was cancelled or ran past its deadline. - `interrupted`: was still running when Peen stopped.
const ( ModelCallStateCancelled ModelCallState = "cancelled" ModelCallStateCompleted ModelCallState = "completed" ModelCallStateFailed ModelCallState = "failed" ModelCallStateInterrupted ModelCallState = "interrupted" ModelCallStateRunning ModelCallState = "running" )
Defines values for ModelCallState.
func (ModelCallState) Valid ¶ added in v0.4.0
func (e ModelCallState) Valid() bool
Valid indicates whether the value is a known member of the ModelCallState enum.
type ModelList ¶ added in v0.12.0
type ModelList struct {
// Models The discovered models, sorted by `name`. Empty when the controller has no model catalog.
Models []Model `json:"models"`
}
ModelList The response of `GET /models`.
type ModelRun ¶ added in v0.4.0
type ModelRun struct {
// AgentRunId The child agent run that made the request. Set for `child` runs and for compactions of a child agent's conversation. Absent for the root conversation.
AgentRunId *openapi_types.UUID `json:"agentRunId,omitempty"`
// BilledCostAmount `responseCostAmount` plus `retryCostAmount`, as an exact decimal string. Empty when `costKnown` is `false`.
BilledCostAmount string `json:"billedCostAmount"`
// CompletedAt When the run ended, as an RFC 3339 timestamp. Absent while it runs.
CompletedAt *time.Time `json:"completedAt,omitempty"`
// ConnectionName The connection part of `modelReference`, before the first `/`.
ConnectionName string `json:"connectionName"`
// CostKnown `true` when the model has prices configured, so the cost amounts are filled in. `false` means the cost is unknown, not zero.
CostKnown bool `json:"costKnown"`
// FailureClassification Why the run did not complete: `model` for a provider or model error, `cancelled` for a cancellation or deadline, or `interrupted` when Peen stopped. Empty for a running or completed run.
FailureClassification string `json:"failureClassification"`
// FailureDetail The error text for a run that did not complete. Empty otherwise.
FailureDetail string `json:"failureDetail"`
// FinishReason Why the model stopped, as the provider reported it for the last round. Empty until the run returns.
FinishReason string `json:"finishReason"`
// Id The model run's ID. Use it with `GET /session/model-runs/{modelRunId}/calls`.
Id openapi_types.UUID `json:"id"`
// ModelReference The configured model reference the run asked for, in the form `<connection>/<model>`.
ModelReference string `json:"modelReference"`
// RequestSettings The request settings in effect, without endpoint URLs or credentials, such as `model`, `autoToolCalls`, `streaming`, `maxRounds`, `maxContextTokens`, `maxOutputTokens`, `maxConcurrentTools`, `toolTimeoutMs`, `maxToolResultTokens`, `timeoutMs`, and `generationParams`.
RequestSettings map[string]interface{} `json:"requestSettings"`
// RequestedModelId The model part of `modelReference`, after the first `/`.
RequestedModelId string `json:"requestedModelId"`
// ResponseCostAmount Cost of the run's successful attempts as an exact decimal string, in the currency of the model's prices. Empty when `costKnown` is `false`.
ResponseCostAmount string `json:"responseCostAmount"`
// ResponseInjections The messages tool injectors added during the run, in the order they fired. They also appear in `responseMessages`; this list is the audit trail.
ResponseInjections []interface{} `json:"responseInjections"`
// ResponseMessages The full message list the run ended with: the conversation it was given plus every message it added, tool calls and results included. Empty until the run returns.
ResponseMessages []interface{} `json:"responseMessages"`
// ResponseModelId The model ID the provider reported in its response. Empty until the run returns a response.
ResponseModelId string `json:"responseModelId"`
// ResponseText The final text the model returned. Empty until the run completes.
ResponseText string `json:"responseText"`
// ResponseThinking The reasoning text the model returned, when it exposes one. Empty otherwise.
ResponseThinking string `json:"responseThinking"`
// ResponseUsage The usage summed over every round of the run, with the same keys as a round's `responseUsage`. Empty until the run returns.
ResponseUsage map[string]interface{} `json:"responseUsage"`
// RetryCostAmount Cost of the run's failed attempts as an exact decimal string. Empty when `costKnown` is `false`.
RetryCostAmount string `json:"retryCostAmount"`
// SessionId The session that made the request.
SessionId openapi_types.UUID `json:"sessionId"`
// Stage Which kind of work issued the run.
//
// - `turn`: the root conversation.
// - `child`: a child agent.
// - `compaction`: a summary of older messages.
Stage ModelRunStage `json:"stage"`
// StartedAt When Peen stored the run, before any provider work, as an RFC 3339 timestamp.
StartedAt time.Time `json:"startedAt"`
// State The run's lifecycle state.
//
// - `running`: has not ended.
// - `completed`: returned a response.
// - `failed`: ended with a provider or model error.
// - `cancelled`: was cancelled or ran past its deadline.
// - `interrupted`: was still running when Peen stopped.
State ModelRunState `json:"state"`
// TurnId The root turn during which the run happened. Child agent and compaction runs carry the turn they ran under.
TurnId openapi_types.UUID `json:"turnId"`
}
ModelRun One logical model request Peen made for a turn, a child agent or a compaction, which can span several provider rounds. Peen writes it before provider work starts and finalizes it when the run ends. It appears in `ModelRunPage` and in `ModelCallPage`.
type ModelRunID ¶ added in v0.4.0
type ModelRunID = openapi_types.UUID
ModelRunID defines model for ModelRunID.
type ModelRunPage ¶ added in v0.4.0
type ModelRunPage struct {
// HasMore `true` when at least one more run exists after this page. Request the next page with `offset` increased by `limit`.
HasMore bool `json:"hasMore"`
// Limit The page size the server used.
Limit int32 `json:"limit"`
// ModelRuns The model runs on this page, ordered by `startedAt` descending.
ModelRuns []ModelRun `json:"modelRuns"`
// Offset The number of runs skipped before this page.
Offset int32 `json:"offset"`
}
ModelRunPage One page of a session's model runs, newest first, returned by `GET /session/model-runs`.
type ModelRunStage ¶ added in v0.4.0
type ModelRunStage string
ModelRunStage Which kind of work issued the run.
- `turn`: the root conversation. - `child`: a child agent. - `compaction`: a summary of older messages.
const ( ModelRunStageChild ModelRunStage = "child" ModelRunStageCompaction ModelRunStage = "compaction" ModelRunStageTurn ModelRunStage = "turn" )
Defines values for ModelRunStage.
func (ModelRunStage) Valid ¶ added in v0.4.0
func (e ModelRunStage) Valid() bool
Valid indicates whether the value is a known member of the ModelRunStage enum.
type ModelRunState ¶ added in v0.4.0
type ModelRunState string
ModelRunState The run's lifecycle state.
- `running`: has not ended. - `completed`: returned a response. - `failed`: ended with a provider or model error. - `cancelled`: was cancelled or ran past its deadline. - `interrupted`: was still running when Peen stopped.
const ( ModelRunStateCancelled ModelRunState = "cancelled" ModelRunStateCompleted ModelRunState = "completed" ModelRunStateFailed ModelRunState = "failed" ModelRunStateInterrupted ModelRunState = "interrupted" ModelRunStateRunning ModelRunState = "running" )
Defines values for ModelRunState.
func (ModelRunState) Valid ¶ added in v0.4.0
func (e ModelRunState) Valid() bool
Valid indicates whether the value is a known member of the ModelRunState enum.
type OpenSession200JSONResponse ¶ added in v0.8.0
type OpenSession200JSONResponse struct {
Body OpenedSession
Headers OpenSession200ResponseHeaders
}
func (OpenSession200JSONResponse) VisitOpenSessionResponse ¶ added in v0.8.0
func (response OpenSession200JSONResponse) VisitOpenSessionResponse(w http.ResponseWriter) error
type OpenSession200ResponseHeaders ¶ added in v0.8.0
type OpenSession200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type OpenSession400JSONResponse ¶ added in v0.8.0
type OpenSession400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (OpenSession400JSONResponse) VisitOpenSessionResponse ¶ added in v0.8.0
func (response OpenSession400JSONResponse) VisitOpenSessionResponse(w http.ResponseWriter) error
type OpenSession401JSONResponse ¶ added in v0.8.0
func (OpenSession401JSONResponse) VisitOpenSessionResponse ¶ added in v0.8.0
func (response OpenSession401JSONResponse) VisitOpenSessionResponse(w http.ResponseWriter) error
type OpenSession403JSONResponse ¶ added in v0.8.0
type OpenSession403JSONResponse struct{ ErrorForbiddenJSONResponse }
func (OpenSession403JSONResponse) VisitOpenSessionResponse ¶ added in v0.8.0
func (response OpenSession403JSONResponse) VisitOpenSessionResponse(w http.ResponseWriter) error
type OpenSession404JSONResponse ¶ added in v0.13.0
type OpenSession404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (OpenSession404JSONResponse) VisitOpenSessionResponse ¶ added in v0.13.0
func (response OpenSession404JSONResponse) VisitOpenSessionResponse(w http.ResponseWriter) error
type OpenSession406JSONResponse ¶ added in v0.52.0
type OpenSession406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (OpenSession406JSONResponse) VisitOpenSessionResponse ¶ added in v0.52.0
func (response OpenSession406JSONResponse) VisitOpenSessionResponse(w http.ResponseWriter) error
type OpenSession409JSONResponse ¶ added in v0.51.0
type OpenSession409JSONResponse struct{ ErrorConflictJSONResponse }
func (OpenSession409JSONResponse) VisitOpenSessionResponse ¶ added in v0.51.0
func (response OpenSession409JSONResponse) VisitOpenSessionResponse(w http.ResponseWriter) error
type OpenSession500JSONResponse ¶ added in v0.8.0
type OpenSession500JSONResponse struct{ ErrorInternalJSONResponse }
func (OpenSession500JSONResponse) VisitOpenSessionResponse ¶ added in v0.8.0
func (response OpenSession500JSONResponse) VisitOpenSessionResponse(w http.ResponseWriter) error
type OpenSessionJSONRequestBody ¶ added in v0.8.0
type OpenSessionJSONRequestBody = OpenSessionRequest
OpenSessionJSONRequestBody defines body for OpenSession for application/json ContentType.
type OpenSessionRequest ¶ added in v0.8.0
type OpenSessionRequest struct {
// AgentSpace The agent space to run in, `control` or `docker:<profile>` (see `GET /agent-spaces`). Leave it out to get the workspace's agent space, or the deployment default for a workspace with no session yet. Naming a different agent space than the workspace's returns 409 `AGENT_SPACE_CONFLICT`, and naming one the deployment does not offer returns 403 `AGENT_SPACE_NOT_ALLOWED`. This is the only environment choice a client makes: images, mounts, network, and capabilities come from deployment configuration alone.
AgentSpace *string `json:"agentSpace,omitempty"`
// Workspace Absolute host path of the workspace directory. It is resolved through its symbolic links and must be an existing directory beneath a configured workspace root (see `GET /workspace-roots`).
Workspace string `json:"workspace"`
}
OpenSessionRequest The body of `POST /sessions/open`.
type OpenSessionRequestObject ¶ added in v0.8.0
type OpenSessionRequestObject struct {
Body *OpenSessionJSONRequestBody
}
type OpenSessionResponseObject ¶ added in v0.8.0
type OpenSessionResponseObject interface {
VisitOpenSessionResponse(w http.ResponseWriter) error
}
type OpenSystemSession200JSONResponse ¶ added in v0.45.0
type OpenSystemSession200JSONResponse struct {
Body OpenedSession
Headers OpenSystemSession200ResponseHeaders
}
func (OpenSystemSession200JSONResponse) VisitOpenSystemSessionResponse ¶ added in v0.45.0
func (response OpenSystemSession200JSONResponse) VisitOpenSystemSessionResponse(w http.ResponseWriter) error
type OpenSystemSession200ResponseHeaders ¶ added in v0.45.0
type OpenSystemSession200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type OpenSystemSession401JSONResponse ¶ added in v0.45.0
func (OpenSystemSession401JSONResponse) VisitOpenSystemSessionResponse ¶ added in v0.45.0
func (response OpenSystemSession401JSONResponse) VisitOpenSystemSessionResponse(w http.ResponseWriter) error
type OpenSystemSession403JSONResponse ¶ added in v0.45.0
type OpenSystemSession403JSONResponse struct{ ErrorForbiddenJSONResponse }
func (OpenSystemSession403JSONResponse) VisitOpenSystemSessionResponse ¶ added in v0.45.0
func (response OpenSystemSession403JSONResponse) VisitOpenSystemSessionResponse(w http.ResponseWriter) error
type OpenSystemSession406JSONResponse ¶ added in v0.52.0
type OpenSystemSession406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (OpenSystemSession406JSONResponse) VisitOpenSystemSessionResponse ¶ added in v0.52.0
func (response OpenSystemSession406JSONResponse) VisitOpenSystemSessionResponse(w http.ResponseWriter) error
type OpenSystemSession500JSONResponse ¶ added in v0.45.0
type OpenSystemSession500JSONResponse struct{ ErrorInternalJSONResponse }
func (OpenSystemSession500JSONResponse) VisitOpenSystemSessionResponse ¶ added in v0.45.0
func (response OpenSystemSession500JSONResponse) VisitOpenSystemSessionResponse(w http.ResponseWriter) error
type OpenSystemSessionRequestObject ¶ added in v0.45.0
type OpenSystemSessionRequestObject struct {
}
type OpenSystemSessionResponseObject ¶ added in v0.45.0
type OpenSystemSessionResponseObject interface {
VisitOpenSystemSessionResponse(w http.ResponseWriter) error
}
type OpenedSession ¶ added in v0.8.0
type OpenedSession struct {
// Created True when this call created the session, false when it resumed an existing one.
Created bool `json:"created"`
// Session A durable session: one conversation in one workspace directory, with its counters and the agent space its tools run in. Returned by `GET /session`, `GET /sessions`, and the open operations. Optional fields are absent, not null, when they do not apply.
Session Session `json:"session"`
}
OpenedSession The response of `POST /sessions/open` and `POST /sessions/system`.
type PromptSnapshot ¶ added in v0.4.0
type PromptSnapshot struct {
// CreatedAt When Peen first stored this snapshot, as an RFC 3339 timestamp. A later turn with the same prompt reuses the row and leaves this unchanged.
CreatedAt time.Time `json:"createdAt"`
// EffectivePrompt The full system prompt the model received, including any context pre-user-message hooks added.
EffectivePrompt string `json:"effectivePrompt"`
// Hash Lowercase hex SHA-256 of `effectivePrompt`. A turn names it in `promptSnapshotHash`.
Hash string `json:"hash"`
}
PromptSnapshot The exact system prompt one or more turns sent to the model, stored once by hash. Returned by `GET /session/prompt-snapshots/{promptHash}`.
type PublishSessionNotice202JSONResponse ¶ added in v0.4.0
type PublishSessionNotice202JSONResponse struct {
Body SessionNotice
Headers PublishSessionNotice202ResponseHeaders
}
func (PublishSessionNotice202JSONResponse) VisitPublishSessionNoticeResponse ¶ added in v0.4.0
func (response PublishSessionNotice202JSONResponse) VisitPublishSessionNoticeResponse(w http.ResponseWriter) error
type PublishSessionNotice202ResponseHeaders ¶ added in v0.4.0
type PublishSessionNotice202ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type PublishSessionNotice400JSONResponse ¶ added in v0.4.0
type PublishSessionNotice400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (PublishSessionNotice400JSONResponse) VisitPublishSessionNoticeResponse ¶ added in v0.4.0
func (response PublishSessionNotice400JSONResponse) VisitPublishSessionNoticeResponse(w http.ResponseWriter) error
type PublishSessionNotice401JSONResponse ¶ added in v0.4.0
func (PublishSessionNotice401JSONResponse) VisitPublishSessionNoticeResponse ¶ added in v0.4.0
func (response PublishSessionNotice401JSONResponse) VisitPublishSessionNoticeResponse(w http.ResponseWriter) error
type PublishSessionNotice404JSONResponse ¶ added in v0.4.0
type PublishSessionNotice404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (PublishSessionNotice404JSONResponse) VisitPublishSessionNoticeResponse ¶ added in v0.4.0
func (response PublishSessionNotice404JSONResponse) VisitPublishSessionNoticeResponse(w http.ResponseWriter) error
type PublishSessionNotice406JSONResponse ¶ added in v0.52.0
type PublishSessionNotice406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (PublishSessionNotice406JSONResponse) VisitPublishSessionNoticeResponse ¶ added in v0.52.0
func (response PublishSessionNotice406JSONResponse) VisitPublishSessionNoticeResponse(w http.ResponseWriter) error
type PublishSessionNotice500JSONResponse ¶ added in v0.4.0
type PublishSessionNotice500JSONResponse struct{ ErrorInternalJSONResponse }
func (PublishSessionNotice500JSONResponse) VisitPublishSessionNoticeResponse ¶ added in v0.4.0
func (response PublishSessionNotice500JSONResponse) VisitPublishSessionNoticeResponse(w http.ResponseWriter) error
type PublishSessionNoticeJSONRequestBody ¶ added in v0.4.0
type PublishSessionNoticeJSONRequestBody = SessionNoticeRequest
PublishSessionNoticeJSONRequestBody defines body for PublishSessionNotice for application/json ContentType.
type PublishSessionNoticeParams ¶ added in v0.4.0
type PublishSessionNoticeParams struct {
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
PublishSessionNoticeParams defines parameters for PublishSessionNotice.
type PublishSessionNoticeRequestObject ¶ added in v0.4.0
type PublishSessionNoticeRequestObject struct {
Params PublishSessionNoticeParams
Body *PublishSessionNoticeJSONRequestBody
}
type PublishSessionNoticeResponseObject ¶ added in v0.4.0
type PublishSessionNoticeResponseObject interface {
VisitPublishSessionNoticeResponse(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 ¶
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 ReadSessionJobOutput406JSONResponse ¶ added in v0.52.0
type ReadSessionJobOutput406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ReadSessionJobOutput406JSONResponse) VisitReadSessionJobOutputResponse ¶ added in v0.52.0
func (response ReadSessionJobOutput406JSONResponse) 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 Which stream to return. `stdout` or `stderr` returns only that stream's lines, and `both`, the default, returns them interleaved in sequence order. With one stream selected, the sequence numbers of the returned lines have gaps where the other stream's lines were.
Stream *ReadSessionJobOutputParamsStream `form:"stream,omitempty" json:"stream,omitempty"`
// Cursor Return only lines whose `sequence` is greater than this value. Start at 0, the default, to read from the first line, then pass the previous response's `nextCursor`.
Cursor *int64 `form:"cursor,omitempty" json:"cursor,omitempty"`
// Limit The most lines to return in one window, 1 to 200. Defaults to 50.
Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
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 ¶
func (e ReadSessionJobOutputParamsStream) Valid() bool
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 ReadWorkspaceFile200JSONResponse ¶ added in v0.51.0
type ReadWorkspaceFile200JSONResponse struct {
Body WorkspaceFileContent
Headers ReadWorkspaceFile200ResponseHeaders
}
func (ReadWorkspaceFile200JSONResponse) VisitReadWorkspaceFileResponse ¶ added in v0.51.0
func (response ReadWorkspaceFile200JSONResponse) VisitReadWorkspaceFileResponse(w http.ResponseWriter) error
type ReadWorkspaceFile200ResponseHeaders ¶ added in v0.51.0
type ReadWorkspaceFile200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type ReadWorkspaceFile400JSONResponse ¶ added in v0.51.0
type ReadWorkspaceFile400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ReadWorkspaceFile400JSONResponse) VisitReadWorkspaceFileResponse ¶ added in v0.51.0
func (response ReadWorkspaceFile400JSONResponse) VisitReadWorkspaceFileResponse(w http.ResponseWriter) error
type ReadWorkspaceFile401JSONResponse ¶ added in v0.51.0
func (ReadWorkspaceFile401JSONResponse) VisitReadWorkspaceFileResponse ¶ added in v0.51.0
func (response ReadWorkspaceFile401JSONResponse) VisitReadWorkspaceFileResponse(w http.ResponseWriter) error
type ReadWorkspaceFile403JSONResponse ¶ added in v0.51.0
type ReadWorkspaceFile403JSONResponse struct{ ErrorForbiddenJSONResponse }
func (ReadWorkspaceFile403JSONResponse) VisitReadWorkspaceFileResponse ¶ added in v0.51.0
func (response ReadWorkspaceFile403JSONResponse) VisitReadWorkspaceFileResponse(w http.ResponseWriter) error
type ReadWorkspaceFile404JSONResponse ¶ added in v0.51.0
type ReadWorkspaceFile404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (ReadWorkspaceFile404JSONResponse) VisitReadWorkspaceFileResponse ¶ added in v0.51.0
func (response ReadWorkspaceFile404JSONResponse) VisitReadWorkspaceFileResponse(w http.ResponseWriter) error
type ReadWorkspaceFile406JSONResponse ¶ added in v0.52.0
type ReadWorkspaceFile406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ReadWorkspaceFile406JSONResponse) VisitReadWorkspaceFileResponse ¶ added in v0.52.0
func (response ReadWorkspaceFile406JSONResponse) VisitReadWorkspaceFileResponse(w http.ResponseWriter) error
type ReadWorkspaceFile500JSONResponse ¶ added in v0.51.0
type ReadWorkspaceFile500JSONResponse struct{ ErrorInternalJSONResponse }
func (ReadWorkspaceFile500JSONResponse) VisitReadWorkspaceFileResponse ¶ added in v0.51.0
func (response ReadWorkspaceFile500JSONResponse) VisitReadWorkspaceFileResponse(w http.ResponseWriter) error
type ReadWorkspaceFileParams ¶ added in v0.51.0
type ReadWorkspaceFileParams struct {
// Path The file to read, relative to the workspace, such as `src/main.go`.
Path string `form:"path" json:"path"`
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ReadWorkspaceFileParams defines parameters for ReadWorkspaceFile.
type ReadWorkspaceFileRequestObject ¶ added in v0.51.0
type ReadWorkspaceFileRequestObject struct {
Params ReadWorkspaceFileParams
}
type ReadWorkspaceFileResponseObject ¶ added in v0.51.0
type ReadWorkspaceFileResponseObject interface {
VisitReadWorkspaceFileResponse(w http.ResponseWriter) error
}
type ReconfigureSession200JSONResponse ¶ added in v0.8.0
type ReconfigureSession200JSONResponse struct {
Body SessionAgentSpaceDecision
Headers ReconfigureSession200ResponseHeaders
}
func (ReconfigureSession200JSONResponse) VisitReconfigureSessionResponse ¶ added in v0.8.0
func (response ReconfigureSession200JSONResponse) VisitReconfigureSessionResponse(w http.ResponseWriter) error
type ReconfigureSession200ResponseHeaders ¶ added in v0.8.0
type ReconfigureSession200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type ReconfigureSession400JSONResponse ¶ added in v0.8.0
type ReconfigureSession400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (ReconfigureSession400JSONResponse) VisitReconfigureSessionResponse ¶ added in v0.8.0
func (response ReconfigureSession400JSONResponse) VisitReconfigureSessionResponse(w http.ResponseWriter) error
type ReconfigureSession401JSONResponse ¶ added in v0.8.0
func (ReconfigureSession401JSONResponse) VisitReconfigureSessionResponse ¶ added in v0.8.0
func (response ReconfigureSession401JSONResponse) VisitReconfigureSessionResponse(w http.ResponseWriter) error
type ReconfigureSession403JSONResponse ¶ added in v0.8.0
type ReconfigureSession403JSONResponse struct{ ErrorForbiddenJSONResponse }
func (ReconfigureSession403JSONResponse) VisitReconfigureSessionResponse ¶ added in v0.8.0
func (response ReconfigureSession403JSONResponse) VisitReconfigureSessionResponse(w http.ResponseWriter) error
type ReconfigureSession404JSONResponse ¶ added in v0.8.0
type ReconfigureSession404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (ReconfigureSession404JSONResponse) VisitReconfigureSessionResponse ¶ added in v0.8.0
func (response ReconfigureSession404JSONResponse) VisitReconfigureSessionResponse(w http.ResponseWriter) error
type ReconfigureSession406JSONResponse ¶ added in v0.52.0
type ReconfigureSession406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (ReconfigureSession406JSONResponse) VisitReconfigureSessionResponse ¶ added in v0.52.0
func (response ReconfigureSession406JSONResponse) VisitReconfigureSessionResponse(w http.ResponseWriter) error
type ReconfigureSession409JSONResponse ¶ added in v0.8.0
type ReconfigureSession409JSONResponse struct{ ErrorConflictJSONResponse }
func (ReconfigureSession409JSONResponse) VisitReconfigureSessionResponse ¶ added in v0.8.0
func (response ReconfigureSession409JSONResponse) VisitReconfigureSessionResponse(w http.ResponseWriter) error
type ReconfigureSession500JSONResponse ¶ added in v0.8.0
type ReconfigureSession500JSONResponse struct{ ErrorInternalJSONResponse }
func (ReconfigureSession500JSONResponse) VisitReconfigureSessionResponse ¶ added in v0.8.0
func (response ReconfigureSession500JSONResponse) VisitReconfigureSessionResponse(w http.ResponseWriter) error
type ReconfigureSessionJSONRequestBody ¶ added in v0.8.0
type ReconfigureSessionJSONRequestBody = ReconfigureSessionRequest
ReconfigureSessionJSONRequestBody defines body for ReconfigureSession for application/json ContentType.
type ReconfigureSessionParams ¶ added in v0.8.0
type ReconfigureSessionParams struct {
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
ReconfigureSessionParams defines parameters for ReconfigureSession.
type ReconfigureSessionRequest ¶ added in v0.8.0
type ReconfigureSessionRequest struct {
// AgentSpace The agent space to move the workspace session to, `control` or `docker:<profile>`. A name the deployment does not offer returns 403 `AGENT_SPACE_NOT_ALLOWED`, and the agent space the workspace already runs in returns 409 `CONFLICT`. This is the only environment choice a client makes.
AgentSpace string `json:"agentSpace"`
// Reason Why the agent space changed, kept in each session's decision history. Must contain a non-whitespace character.
Reason string `json:"reason"`
}
ReconfigureSessionRequest The body of `POST /session/reconfigure`. Both fields are required and no other field is accepted.
type ReconfigureSessionRequestObject ¶ added in v0.8.0
type ReconfigureSessionRequestObject struct {
Params ReconfigureSessionParams
Body *ReconfigureSessionJSONRequestBody
}
type ReconfigureSessionResponseObject ¶ added in v0.8.0
type ReconfigureSessionResponseObject interface {
VisitReconfigureSessionResponse(w http.ResponseWriter) error
}
type RequiredHeaderError ¶ added in v0.2.0
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 {
// ListAgentSpaces List the agent spaces a client may name
// (GET /agent-spaces)
ListAgentSpaces(w http.ResponseWriter, r *http.Request)
// ListCronJobs List configured scheduled jobs
// (GET /cron/jobs)
ListCronJobs(w http.ResponseWriter, r *http.Request)
// ListCronRuns List scheduled run history
// (GET /cron/runs)
ListCronRuns(w http.ResponseWriter, r *http.Request, params ListCronRunsParams)
// ListMessages List a session's conversation messages
// (GET /messages)
ListMessages(w http.ResponseWriter, r *http.Request, params ListMessagesParams)
// ListModels List the models discovered from configured connections
// (GET /models)
ListModels(w http.ResponseWriter, r *http.Request)
// GetSession Read one session
// (GET /session)
GetSession(w http.ResponseWriter, r *http.Request, params GetSessionParams)
// ListSessionAgentSpaceDecisions List a session's agent space decisions
// (GET /session/agent-space-decisions)
ListSessionAgentSpaceDecisions(w http.ResponseWriter, r *http.Request, params ListSessionAgentSpaceDecisionsParams)
// ListSessionAgentRuns List the child agent runs this session has started
// (GET /session/agents)
ListSessionAgentRuns(w http.ResponseWriter, r *http.Request, params ListSessionAgentRunsParams)
// GetSessionAgentRun Read one durable child agent run
// (GET /session/agents/{agentRunId})
GetSessionAgentRun(w http.ResponseWriter, r *http.Request, agentRunId AgentRunID, params GetSessionAgentRunParams)
// 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)
// ListSessionAgentRunCompactions List one child agent run's compaction lineage
// (GET /session/agents/{agentRunId}/compactions)
ListSessionAgentRunCompactions(w http.ResponseWriter, r *http.Request, agentRunId AgentRunID, params ListSessionAgentRunCompactionsParams)
// GetSessionAgentRunCompaction Read one immutable child compaction record
// (GET /session/agents/{agentRunId}/compactions/{compactionId})
GetSessionAgentRunCompaction(w http.ResponseWriter, r *http.Request, agentRunId AgentRunID, compactionId CompactionID, params GetSessionAgentRunCompactionParams)
// ListSessionAgentRunEvents Follow what one child agent run is doing
// (GET /session/agents/{agentRunId}/events)
ListSessionAgentRunEvents(w http.ResponseWriter, r *http.Request, agentRunId AgentRunID, params ListSessionAgentRunEventsParams)
// ListSessionAgentRunMessages List one child agent run's own durable transcript
// (GET /session/agents/{agentRunId}/messages)
ListSessionAgentRunMessages(w http.ResponseWriter, r *http.Request, agentRunId AgentRunID, params ListSessionAgentRunMessagesParams)
// CancelSession Stop the session's running work
// (POST /session/cancel)
CancelSession(w http.ResponseWriter, r *http.Request, params CancelSessionParams)
// ListSessionCompactions List durable compaction records
// (GET /session/compactions)
ListSessionCompactions(w http.ResponseWriter, r *http.Request, params ListSessionCompactionsParams)
// GetSessionCompaction Read one durable compaction record
// (GET /session/compactions/{compactionId})
GetSessionCompaction(w http.ResponseWriter, r *http.Request, compactionId CompactionID, params GetSessionCompactionParams)
// GetSessionContextSnapshot Read a context snapshot referenced by this session
// (GET /session/context-snapshots/{contextHash})
GetSessionContextSnapshot(w http.ResponseWriter, r *http.Request, contextHash ContextHash, params GetSessionContextSnapshotParams)
// ListSessionEvents List stored protocol events
// (GET /session/events)
ListSessionEvents(w http.ResponseWriter, r *http.Request, params ListSessionEventsParams)
// ListSessionFeed Replay a session's live feed from a sequence
// (GET /session/feed)
ListSessionFeed(w http.ResponseWriter, r *http.Request, params ListSessionFeedParams)
// DeleteWorkspaceFile Delete a file or empty workspace directory
// (DELETE /session/files)
DeleteWorkspaceFile(w http.ResponseWriter, r *http.Request, params DeleteWorkspaceFileParams)
// ListWorkspaceFiles List a workspace directory or inspect a file
// (GET /session/files)
ListWorkspaceFiles(w http.ResponseWriter, r *http.Request, params ListWorkspaceFilesParams)
// ReadWorkspaceFile Read a workspace file as base64
// (GET /session/files/content)
ReadWorkspaceFile(w http.ResponseWriter, r *http.Request, params ReadWorkspaceFileParams)
// WriteWorkspaceFile Write a workspace file atomically
// (PUT /session/files/content)
WriteWorkspaceFile(w http.ResponseWriter, r *http.Request, params WriteWorkspaceFileParams)
// 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)
// ListSessionJobSignalRequests List the durable signal-request history for one job
// (GET /session/jobs/{jobId}/signals)
ListSessionJobSignalRequests(w http.ResponseWriter, r *http.Request, jobId JobID, params ListSessionJobSignalRequestsParams)
// ListSessionLearnedFiles List the learned rules and skills this session loads
// (GET /session/learned)
ListSessionLearnedFiles(w http.ResponseWriter, r *http.Request, params ListSessionLearnedFilesParams)
// DeleteSessionLearnedFile Delete one learned rule or skill
// (DELETE /session/learned/file)
DeleteSessionLearnedFile(w http.ResponseWriter, r *http.Request, params DeleteSessionLearnedFileParams)
// GetSessionLearnedFile Read one learned rule or skill
// (GET /session/learned/file)
GetSessionLearnedFile(w http.ResponseWriter, r *http.Request, params GetSessionLearnedFileParams)
// GetSessionMCPStatus Report the session's MCP servers
// (GET /session/mcp)
GetSessionMCPStatus(w http.ResponseWriter, r *http.Request, params GetSessionMCPStatusParams)
// ListSessionModelRuns List complete durable model invocations
// (GET /session/model-runs)
ListSessionModelRuns(w http.ResponseWriter, r *http.Request, params ListSessionModelRunsParams)
// ListSessionModelRunCalls Read every provider round for one model invocation
// (GET /session/model-runs/{modelRunId}/calls)
ListSessionModelRunCalls(w http.ResponseWriter, r *http.Request, modelRunId ModelRunID, params ListSessionModelRunCallsParams)
// ListSessionNotices List a session's notices
// (GET /session/notices)
ListSessionNotices(w http.ResponseWriter, r *http.Request, params ListSessionNoticesParams)
// PublishSessionNotice Report a notice to a session
// (POST /session/notices)
PublishSessionNotice(w http.ResponseWriter, r *http.Request, params PublishSessionNoticeParams)
// GetSessionPromptSnapshot Read a prompt snapshot referenced by this session
// (GET /session/prompt-snapshots/{promptHash})
GetSessionPromptSnapshot(w http.ResponseWriter, r *http.Request, promptHash PromptHash, params GetSessionPromptSnapshotParams)
// ReconfigureSession Move a workspace session to another agent space
// (POST /session/reconfigure)
ReconfigureSession(w http.ResponseWriter, r *http.Request, params ReconfigureSessionParams)
// ListSessionTurns List durable turns
// (GET /session/turns)
ListSessionTurns(w http.ResponseWriter, r *http.Request, params ListSessionTurnsParams)
// ListSessionWorkers List a session's worker generations
// (GET /session/workers)
ListSessionWorkers(w http.ResponseWriter, r *http.Request, params ListSessionWorkersParams)
// ListSessions List every session
// (GET /sessions)
ListSessions(w http.ResponseWriter, r *http.Request, params ListSessionsParams)
// OpenSession Open or resume the session for a workspace
// (POST /sessions/open)
OpenSession(w http.ResponseWriter, r *http.Request)
// OpenSystemSession Open or resume the system session
// (POST /sessions/system)
OpenSystemSession(w http.ResponseWriter, r *http.Request)
// ListWorkspaceRoots List the workspace roots this controller may open
// (GET /workspace-roots)
ListWorkspaceRoots(w http.ResponseWriter, r *http.Request)
}
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) DeleteSessionLearnedFile ¶ added in v0.37.0
func (siw *ServerInterfaceWrapper) DeleteSessionLearnedFile(w http.ResponseWriter, r *http.Request)
DeleteSessionLearnedFile operation middleware
func (*ServerInterfaceWrapper) DeleteWorkspaceFile ¶ added in v0.51.0
func (siw *ServerInterfaceWrapper) DeleteWorkspaceFile(w http.ResponseWriter, r *http.Request)
DeleteWorkspaceFile operation middleware
func (*ServerInterfaceWrapper) GetSession ¶
func (siw *ServerInterfaceWrapper) GetSession(w http.ResponseWriter, r *http.Request)
GetSession operation middleware
func (*ServerInterfaceWrapper) GetSessionAgentRun ¶ added in v0.4.0
func (siw *ServerInterfaceWrapper) GetSessionAgentRun(w http.ResponseWriter, r *http.Request)
GetSessionAgentRun operation middleware
func (*ServerInterfaceWrapper) GetSessionAgentRunCompaction ¶ added in v0.11.0
func (siw *ServerInterfaceWrapper) GetSessionAgentRunCompaction(w http.ResponseWriter, r *http.Request)
GetSessionAgentRunCompaction operation middleware
func (*ServerInterfaceWrapper) GetSessionCompaction ¶ added in v0.4.0
func (siw *ServerInterfaceWrapper) GetSessionCompaction(w http.ResponseWriter, r *http.Request)
GetSessionCompaction operation middleware
func (*ServerInterfaceWrapper) GetSessionContextSnapshot ¶ added in v0.4.0
func (siw *ServerInterfaceWrapper) GetSessionContextSnapshot(w http.ResponseWriter, r *http.Request)
GetSessionContextSnapshot operation middleware
func (*ServerInterfaceWrapper) GetSessionLearnedFile ¶ added in v0.37.0
func (siw *ServerInterfaceWrapper) GetSessionLearnedFile(w http.ResponseWriter, r *http.Request)
GetSessionLearnedFile operation middleware
func (*ServerInterfaceWrapper) GetSessionMCPStatus ¶ added in v0.38.0
func (siw *ServerInterfaceWrapper) GetSessionMCPStatus(w http.ResponseWriter, r *http.Request)
GetSessionMCPStatus operation middleware
func (*ServerInterfaceWrapper) GetSessionPromptSnapshot ¶ added in v0.4.0
func (siw *ServerInterfaceWrapper) GetSessionPromptSnapshot(w http.ResponseWriter, r *http.Request)
GetSessionPromptSnapshot operation middleware
func (*ServerInterfaceWrapper) ListAgentSpaces ¶ added in v0.19.0
func (siw *ServerInterfaceWrapper) ListAgentSpaces(w http.ResponseWriter, r *http.Request)
ListAgentSpaces operation middleware
func (*ServerInterfaceWrapper) ListCronJobs ¶ added in v0.51.0
func (siw *ServerInterfaceWrapper) ListCronJobs(w http.ResponseWriter, r *http.Request)
ListCronJobs operation middleware
func (*ServerInterfaceWrapper) ListCronRuns ¶ added in v0.51.0
func (siw *ServerInterfaceWrapper) ListCronRuns(w http.ResponseWriter, r *http.Request)
ListCronRuns operation middleware
func (*ServerInterfaceWrapper) ListMessages ¶
func (siw *ServerInterfaceWrapper) ListMessages(w http.ResponseWriter, r *http.Request)
ListMessages operation middleware
func (*ServerInterfaceWrapper) ListModels ¶ added in v0.12.0
func (siw *ServerInterfaceWrapper) ListModels(w http.ResponseWriter, r *http.Request)
ListModels operation middleware
func (*ServerInterfaceWrapper) ListSessionAgentRunCompactions ¶ added in v0.11.0
func (siw *ServerInterfaceWrapper) ListSessionAgentRunCompactions(w http.ResponseWriter, r *http.Request)
ListSessionAgentRunCompactions operation middleware
func (*ServerInterfaceWrapper) ListSessionAgentRunEvents ¶
func (siw *ServerInterfaceWrapper) ListSessionAgentRunEvents(w http.ResponseWriter, r *http.Request)
ListSessionAgentRunEvents operation middleware
func (*ServerInterfaceWrapper) ListSessionAgentRunMessages ¶ added in v0.11.0
func (siw *ServerInterfaceWrapper) ListSessionAgentRunMessages(w http.ResponseWriter, r *http.Request)
ListSessionAgentRunMessages operation middleware
func (*ServerInterfaceWrapper) ListSessionAgentRuns ¶
func (siw *ServerInterfaceWrapper) ListSessionAgentRuns(w http.ResponseWriter, r *http.Request)
ListSessionAgentRuns operation middleware
func (*ServerInterfaceWrapper) ListSessionAgentSpaceDecisions ¶ added in v0.19.0
func (siw *ServerInterfaceWrapper) ListSessionAgentSpaceDecisions(w http.ResponseWriter, r *http.Request)
ListSessionAgentSpaceDecisions operation middleware
func (*ServerInterfaceWrapper) ListSessionCompactions ¶ added in v0.4.0
func (siw *ServerInterfaceWrapper) ListSessionCompactions(w http.ResponseWriter, r *http.Request)
ListSessionCompactions operation middleware
func (*ServerInterfaceWrapper) ListSessionEvents ¶
func (siw *ServerInterfaceWrapper) ListSessionEvents(w http.ResponseWriter, r *http.Request)
ListSessionEvents operation middleware
func (*ServerInterfaceWrapper) ListSessionFeed ¶ added in v0.26.0
func (siw *ServerInterfaceWrapper) ListSessionFeed(w http.ResponseWriter, r *http.Request)
ListSessionFeed operation middleware
func (*ServerInterfaceWrapper) ListSessionJobSignalRequests ¶ added in v0.4.0
func (siw *ServerInterfaceWrapper) ListSessionJobSignalRequests(w http.ResponseWriter, r *http.Request)
ListSessionJobSignalRequests operation middleware
func (*ServerInterfaceWrapper) ListSessionJobs ¶
func (siw *ServerInterfaceWrapper) ListSessionJobs(w http.ResponseWriter, r *http.Request)
ListSessionJobs operation middleware
func (*ServerInterfaceWrapper) ListSessionLearnedFiles ¶ added in v0.37.0
func (siw *ServerInterfaceWrapper) ListSessionLearnedFiles(w http.ResponseWriter, r *http.Request)
ListSessionLearnedFiles operation middleware
func (*ServerInterfaceWrapper) ListSessionModelRunCalls ¶ added in v0.4.0
func (siw *ServerInterfaceWrapper) ListSessionModelRunCalls(w http.ResponseWriter, r *http.Request)
ListSessionModelRunCalls operation middleware
func (*ServerInterfaceWrapper) ListSessionModelRuns ¶ added in v0.4.0
func (siw *ServerInterfaceWrapper) ListSessionModelRuns(w http.ResponseWriter, r *http.Request)
ListSessionModelRuns operation middleware
func (*ServerInterfaceWrapper) ListSessionNotices ¶ added in v0.4.0
func (siw *ServerInterfaceWrapper) ListSessionNotices(w http.ResponseWriter, r *http.Request)
ListSessionNotices operation middleware
func (*ServerInterfaceWrapper) ListSessionTurns ¶ added in v0.4.0
func (siw *ServerInterfaceWrapper) ListSessionTurns(w http.ResponseWriter, r *http.Request)
ListSessionTurns operation middleware
func (*ServerInterfaceWrapper) ListSessionWorkers ¶ added in v0.8.0
func (siw *ServerInterfaceWrapper) ListSessionWorkers(w http.ResponseWriter, r *http.Request)
ListSessionWorkers operation middleware
func (*ServerInterfaceWrapper) ListSessions ¶ added in v0.8.0
func (siw *ServerInterfaceWrapper) ListSessions(w http.ResponseWriter, r *http.Request)
ListSessions operation middleware
func (*ServerInterfaceWrapper) ListWorkspaceFiles ¶ added in v0.51.0
func (siw *ServerInterfaceWrapper) ListWorkspaceFiles(w http.ResponseWriter, r *http.Request)
ListWorkspaceFiles operation middleware
func (*ServerInterfaceWrapper) ListWorkspaceRoots ¶ added in v0.13.0
func (siw *ServerInterfaceWrapper) ListWorkspaceRoots(w http.ResponseWriter, r *http.Request)
ListWorkspaceRoots operation middleware
func (*ServerInterfaceWrapper) OpenSession ¶ added in v0.8.0
func (siw *ServerInterfaceWrapper) OpenSession(w http.ResponseWriter, r *http.Request)
OpenSession operation middleware
func (*ServerInterfaceWrapper) OpenSystemSession ¶ added in v0.45.0
func (siw *ServerInterfaceWrapper) OpenSystemSession(w http.ResponseWriter, r *http.Request)
OpenSystemSession operation middleware
func (*ServerInterfaceWrapper) PublishSessionNotice ¶ added in v0.4.0
func (siw *ServerInterfaceWrapper) PublishSessionNotice(w http.ResponseWriter, r *http.Request)
PublishSessionNotice operation middleware
func (*ServerInterfaceWrapper) ReadSessionJobOutput ¶
func (siw *ServerInterfaceWrapper) ReadSessionJobOutput(w http.ResponseWriter, r *http.Request)
ReadSessionJobOutput operation middleware
func (*ServerInterfaceWrapper) ReadWorkspaceFile ¶ added in v0.51.0
func (siw *ServerInterfaceWrapper) ReadWorkspaceFile(w http.ResponseWriter, r *http.Request)
ReadWorkspaceFile operation middleware
func (*ServerInterfaceWrapper) ReconfigureSession ¶ added in v0.8.0
func (siw *ServerInterfaceWrapper) ReconfigureSession(w http.ResponseWriter, r *http.Request)
ReconfigureSession operation middleware
func (*ServerInterfaceWrapper) SignalSessionJob ¶
func (siw *ServerInterfaceWrapper) SignalSessionJob(w http.ResponseWriter, r *http.Request)
SignalSessionJob operation middleware
func (*ServerInterfaceWrapper) WriteWorkspaceFile ¶ added in v0.51.0
func (siw *ServerInterfaceWrapper) WriteWorkspaceFile(w http.ResponseWriter, r *http.Request)
WriteWorkspaceFile operation middleware
type Session ¶
type Session struct {
// ActiveTurn True while a turn is running in the session.
ActiveTurn bool `json:"activeTurn"`
// ActiveTurnFeedSequence The first feed sequence of the running turn. Set only by `GET /session`, and only while a turn runs and has written at least one frame; absent otherwise. Pass one less than it as `cursor` to `GET /session/feed` to rebuild that turn's live view.
ActiveTurnFeedSequence *int64 `json:"activeTurnFeedSequence,omitempty"`
// Agent The root agent that runs the session's turns, such as `core:general-purpose`, or `core:system` for the system session.
Agent string `json:"agent"`
// AgentSpace The agent space this session's tools run in, `control` or `docker:<profile>`. Absent for a session recorded before agent spaces existed, which runs in the deployment default.
AgentSpace *string `json:"agentSpace,omitempty"`
// CompletedTurnCount Number of turns that completed.
CompletedTurnCount int64 `json:"completedTurnCount"`
// CreatedAt When the session was created, RFC 3339.
CreatedAt time.Time `json:"createdAt"`
// FeedSequence The session's newest feed sequence, the `head` that `GET /session/feed` would return now. `0` before anything was sent.
FeedSequence int64 `json:"feedSequence"`
// Id The session ID. Pass it as `X-Session-ID` on REST calls and as `metadata.sessionId` on the WebSocket.
Id openapi_types.UUID `json:"id"`
// LastMessageAt When the newest message was stored, RFC 3339. Absent until the session has a message.
LastMessageAt *time.Time `json:"lastMessageAt,omitempty"`
// MessageCount Number of messages stored in the session's root conversation.
MessageCount int64 `json:"messageCount"`
// Model The `connection/model` reference the session uses by default, set when the session was created.
Model string `json:"model"`
// UpdatedAt When the session record last changed, RFC 3339. `GET /sessions` orders by it.
UpdatedAt time.Time `json:"updatedAt"`
// Workspace The canonical absolute path of the session's workspace directory.
Workspace string `json:"workspace"`
}
Session A durable session: one conversation in one workspace directory, with its counters and the agent space its tools run in. Returned by `GET /session`, `GET /sessions`, and the open operations. Optional fields are absent, not null, when they do not apply.
type SessionAgentSpaceDecision ¶ added in v0.19.0
type SessionAgentSpaceDecision struct {
// DecidedAt When the change was recorded, RFC 3339.
DecidedAt time.Time `json:"decidedAt"`
// FromAgentSpace The agent space the session ran in before this decision. Absent when the session had no recorded agent space.
FromAgentSpace *string `json:"fromAgentSpace,omitempty"`
// Id The decision ID.
Id openapi_types.UUID `json:"id"`
// Reason The reason the caller gave.
Reason string `json:"reason"`
// SessionId The session that moved.
SessionId openapi_types.UUID `json:"sessionId"`
// ToAgentSpace The agent space the session moved to.
ToAgentSpace string `json:"toAgentSpace"`
}
SessionAgentSpaceDecision One recorded agent space change of one session, made by `POST /session/reconfigure`.
type SessionAgentSpaceDecisionPage ¶ added in v0.19.0
type SessionAgentSpaceDecisionPage struct {
// HasMore True when more decisions follow this page.
HasMore bool `json:"hasMore"`
// Items The decisions on this page, newest first.
Items []SessionAgentSpaceDecision `json:"items"`
// Limit The page size this response used.
Limit int32 `json:"limit"`
// Offset The number of decisions skipped before this page.
Offset int32 `json:"offset"`
}
SessionAgentSpaceDecisionPage One page of `GET /session/agent-space-decisions`, newest first.
type SessionIDRequired ¶
type SessionIDRequired = openapi_types.UUID
SessionIDRequired defines model for SessionIDRequired.
type SessionNotice ¶ added in v0.4.0
type SessionNotice struct {
// CreatedAt When the notice was stored, RFC 3339.
CreatedAt time.Time `json:"createdAt"`
// Data Structured payload for programmatic consumers. Absent when the notice has none.
Data *map[string]interface{} `json:"data,omitempty"`
// Delivery The delivery the producer requested. A handler's own `delivery` can override it.
//
// - `queue`: delivered at the next turn or tool boundary.
// - `wake`: may start a turn on an idle session when a handler for the type exists; otherwise queued.
Delivery SessionNoticeDelivery `json:"delivery"`
// Id The notice ID.
Id openapi_types.UUID `json:"id"`
// Source Who reported it: `api` for `POST /session/notices`, or a Peen producer such as `tools.job`, `agent.launchAgent`, or `session.turn`.
Source string `json:"source"`
// Summary The one line describing what happened.
Summary string `json:"summary"`
// Type The notice type, a dotted lowercase name such as `job.exited` or `ci.build.failed`.
Type string `json:"type"`
}
SessionNotice One stored notice: a report waiting for, or already delivered to, a session's model. Returned by `GET /session/notices`, `POST /session/notices`, and as the `data` of a `notice.created` feed frame.
type SessionNoticeDelivery ¶ added in v0.4.0
type SessionNoticeDelivery string
SessionNoticeDelivery The delivery the producer requested. A handler's own `delivery` can override it.
- `queue`: delivered at the next turn or tool boundary. - `wake`: may start a turn on an idle session when a handler for the type exists; otherwise queued.
const ( SessionNoticeDeliveryQueue SessionNoticeDelivery = "queue" SessionNoticeDeliveryWake SessionNoticeDelivery = "wake" )
Defines values for SessionNoticeDelivery.
func (SessionNoticeDelivery) Valid ¶ added in v0.4.0
func (e SessionNoticeDelivery) Valid() bool
Valid indicates whether the value is a known member of the SessionNoticeDelivery enum.
type SessionNoticePage ¶ added in v0.4.0
type SessionNoticePage struct {
// HasMore True when more notices follow this page.
HasMore bool `json:"hasMore"`
// Limit The page size this response used.
Limit int32 `json:"limit"`
// Notices The notices on this page, oldest first.
Notices []SessionNotice `json:"notices"`
// Offset The number of notices skipped before this page.
Offset int32 `json:"offset"`
}
SessionNoticePage One page of `GET /session/notices`, oldest first.
type SessionNoticeRequest ¶ added in v0.4.0
type SessionNoticeRequest struct {
// Data Structured payload for programmatic consumers. Its JSON encoding must not exceed `PEEN_MAX_EVENT_DATA_BYTES` (default 65536 bytes). An empty object is stored as no data.
Data *map[string]interface{} `json:"data,omitempty"`
// Delivery When the model sees the notice. A handler's own `delivery` overrides this value.
//
// - `queue` (the default): waits for the next turn or tool boundary.
// - `wake`: also starts a turn when the session is idle and a handler for this type exists at `.agents/events/<type>.md`. A wake that cannot start (a turn is running, or the hourly wake limit is reached) leaves the notice queued.
Delivery *SessionNoticeRequestDelivery `json:"delivery,omitempty"`
// Summary The one line describing what happened. Must not be empty or longer than `PEEN_MAX_EVENT_SUMMARY_BYTES` (default 4096 bytes).
Summary string `json:"summary"`
// Type Dotted lowercase type: one to eight segments separated by `.`, each a lowercase letter followed by lowercase letters or digits, at most 128 characters in total, such as `ci.build.failed`. The `job.`, `agent.`, and `turn.` prefixes are reserved for Peen's own producers and are rejected here.
Type string `json:"type"`
}
SessionNoticeRequest The body of `POST /session/notices`.
type SessionNoticeRequestDelivery ¶ added in v0.4.0
type SessionNoticeRequestDelivery string
SessionNoticeRequestDelivery When the model sees the notice. A handler's own `delivery` overrides this value.
- `queue` (the default): waits for the next turn or tool boundary. - `wake`: also starts a turn when the session is idle and a handler for this type exists at `.agents/events/<type>.md`. A wake that cannot start (a turn is running, or the hourly wake limit is reached) leaves the notice queued.
const ( SessionNoticeRequestDeliveryQueue SessionNoticeRequestDelivery = "queue" SessionNoticeRequestDeliveryWake SessionNoticeRequestDelivery = "wake" )
Defines values for SessionNoticeRequestDelivery.
func (SessionNoticeRequestDelivery) Valid ¶ added in v0.4.0
func (e SessionNoticeRequestDelivery) Valid() bool
Valid indicates whether the value is a known member of the SessionNoticeRequestDelivery enum.
type SessionPage ¶ added in v0.8.0
type SessionPage struct {
// HasMore True when more sessions follow this page.
HasMore bool `json:"hasMore"`
// Items The sessions on this page, newest updated first.
Items []Session `json:"items"`
// Limit The page size this response used.
Limit int32 `json:"limit"`
// Offset The number of sessions skipped before this page.
Offset int32 `json:"offset"`
}
SessionPage One page of `GET /sessions`, newest updated first.
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 ¶
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 SignalSessionJob406JSONResponse ¶ added in v0.52.0
type SignalSessionJob406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (SignalSessionJob406JSONResponse) VisitSignalSessionJobResponse ¶ added in v0.52.0
func (response SignalSessionJob406JSONResponse) 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 The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
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 StrictMiddlewareFunc ¶
type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// ListAgentSpaces List the agent spaces a client may name
// (GET /agent-spaces)
ListAgentSpaces(ctx context.Context, request ListAgentSpacesRequestObject) (ListAgentSpacesResponseObject, error)
// ListCronJobs List configured scheduled jobs
// (GET /cron/jobs)
ListCronJobs(ctx context.Context, request ListCronJobsRequestObject) (ListCronJobsResponseObject, error)
// ListCronRuns List scheduled run history
// (GET /cron/runs)
ListCronRuns(ctx context.Context, request ListCronRunsRequestObject) (ListCronRunsResponseObject, error)
// ListMessages List a session's conversation messages
// (GET /messages)
ListMessages(ctx context.Context, request ListMessagesRequestObject) (ListMessagesResponseObject, error)
// ListModels List the models discovered from configured connections
// (GET /models)
ListModels(ctx context.Context, request ListModelsRequestObject) (ListModelsResponseObject, error)
// GetSession Read one session
// (GET /session)
GetSession(ctx context.Context, request GetSessionRequestObject) (GetSessionResponseObject, error)
// ListSessionAgentSpaceDecisions List a session's agent space decisions
// (GET /session/agent-space-decisions)
ListSessionAgentSpaceDecisions(ctx context.Context, request ListSessionAgentSpaceDecisionsRequestObject) (ListSessionAgentSpaceDecisionsResponseObject, error)
// ListSessionAgentRuns List the child agent runs this session has started
// (GET /session/agents)
ListSessionAgentRuns(ctx context.Context, request ListSessionAgentRunsRequestObject) (ListSessionAgentRunsResponseObject, error)
// GetSessionAgentRun Read one durable child agent run
// (GET /session/agents/{agentRunId})
GetSessionAgentRun(ctx context.Context, request GetSessionAgentRunRequestObject) (GetSessionAgentRunResponseObject, 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)
// ListSessionAgentRunCompactions List one child agent run's compaction lineage
// (GET /session/agents/{agentRunId}/compactions)
ListSessionAgentRunCompactions(ctx context.Context, request ListSessionAgentRunCompactionsRequestObject) (ListSessionAgentRunCompactionsResponseObject, error)
// GetSessionAgentRunCompaction Read one immutable child compaction record
// (GET /session/agents/{agentRunId}/compactions/{compactionId})
GetSessionAgentRunCompaction(ctx context.Context, request GetSessionAgentRunCompactionRequestObject) (GetSessionAgentRunCompactionResponseObject, error)
// ListSessionAgentRunEvents Follow what one child agent run is doing
// (GET /session/agents/{agentRunId}/events)
ListSessionAgentRunEvents(ctx context.Context, request ListSessionAgentRunEventsRequestObject) (ListSessionAgentRunEventsResponseObject, error)
// ListSessionAgentRunMessages List one child agent run's own durable transcript
// (GET /session/agents/{agentRunId}/messages)
ListSessionAgentRunMessages(ctx context.Context, request ListSessionAgentRunMessagesRequestObject) (ListSessionAgentRunMessagesResponseObject, error)
// CancelSession Stop the session's running work
// (POST /session/cancel)
CancelSession(ctx context.Context, request CancelSessionRequestObject) (CancelSessionResponseObject, error)
// ListSessionCompactions List durable compaction records
// (GET /session/compactions)
ListSessionCompactions(ctx context.Context, request ListSessionCompactionsRequestObject) (ListSessionCompactionsResponseObject, error)
// GetSessionCompaction Read one durable compaction record
// (GET /session/compactions/{compactionId})
GetSessionCompaction(ctx context.Context, request GetSessionCompactionRequestObject) (GetSessionCompactionResponseObject, error)
// GetSessionContextSnapshot Read a context snapshot referenced by this session
// (GET /session/context-snapshots/{contextHash})
GetSessionContextSnapshot(ctx context.Context, request GetSessionContextSnapshotRequestObject) (GetSessionContextSnapshotResponseObject, error)
// ListSessionEvents List stored protocol events
// (GET /session/events)
ListSessionEvents(ctx context.Context, request ListSessionEventsRequestObject) (ListSessionEventsResponseObject, error)
// ListSessionFeed Replay a session's live feed from a sequence
// (GET /session/feed)
ListSessionFeed(ctx context.Context, request ListSessionFeedRequestObject) (ListSessionFeedResponseObject, error)
// DeleteWorkspaceFile Delete a file or empty workspace directory
// (DELETE /session/files)
DeleteWorkspaceFile(ctx context.Context, request DeleteWorkspaceFileRequestObject) (DeleteWorkspaceFileResponseObject, error)
// ListWorkspaceFiles List a workspace directory or inspect a file
// (GET /session/files)
ListWorkspaceFiles(ctx context.Context, request ListWorkspaceFilesRequestObject) (ListWorkspaceFilesResponseObject, error)
// ReadWorkspaceFile Read a workspace file as base64
// (GET /session/files/content)
ReadWorkspaceFile(ctx context.Context, request ReadWorkspaceFileRequestObject) (ReadWorkspaceFileResponseObject, error)
// WriteWorkspaceFile Write a workspace file atomically
// (PUT /session/files/content)
WriteWorkspaceFile(ctx context.Context, request WriteWorkspaceFileRequestObject) (WriteWorkspaceFileResponseObject, 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)
// ListSessionJobSignalRequests List the durable signal-request history for one job
// (GET /session/jobs/{jobId}/signals)
ListSessionJobSignalRequests(ctx context.Context, request ListSessionJobSignalRequestsRequestObject) (ListSessionJobSignalRequestsResponseObject, error)
// ListSessionLearnedFiles List the learned rules and skills this session loads
// (GET /session/learned)
ListSessionLearnedFiles(ctx context.Context, request ListSessionLearnedFilesRequestObject) (ListSessionLearnedFilesResponseObject, error)
// DeleteSessionLearnedFile Delete one learned rule or skill
// (DELETE /session/learned/file)
DeleteSessionLearnedFile(ctx context.Context, request DeleteSessionLearnedFileRequestObject) (DeleteSessionLearnedFileResponseObject, error)
// GetSessionLearnedFile Read one learned rule or skill
// (GET /session/learned/file)
GetSessionLearnedFile(ctx context.Context, request GetSessionLearnedFileRequestObject) (GetSessionLearnedFileResponseObject, error)
// GetSessionMCPStatus Report the session's MCP servers
// (GET /session/mcp)
GetSessionMCPStatus(ctx context.Context, request GetSessionMCPStatusRequestObject) (GetSessionMCPStatusResponseObject, error)
// ListSessionModelRuns List complete durable model invocations
// (GET /session/model-runs)
ListSessionModelRuns(ctx context.Context, request ListSessionModelRunsRequestObject) (ListSessionModelRunsResponseObject, error)
// ListSessionModelRunCalls Read every provider round for one model invocation
// (GET /session/model-runs/{modelRunId}/calls)
ListSessionModelRunCalls(ctx context.Context, request ListSessionModelRunCallsRequestObject) (ListSessionModelRunCallsResponseObject, error)
// ListSessionNotices List a session's notices
// (GET /session/notices)
ListSessionNotices(ctx context.Context, request ListSessionNoticesRequestObject) (ListSessionNoticesResponseObject, error)
// PublishSessionNotice Report a notice to a session
// (POST /session/notices)
PublishSessionNotice(ctx context.Context, request PublishSessionNoticeRequestObject) (PublishSessionNoticeResponseObject, error)
// GetSessionPromptSnapshot Read a prompt snapshot referenced by this session
// (GET /session/prompt-snapshots/{promptHash})
GetSessionPromptSnapshot(ctx context.Context, request GetSessionPromptSnapshotRequestObject) (GetSessionPromptSnapshotResponseObject, error)
// ReconfigureSession Move a workspace session to another agent space
// (POST /session/reconfigure)
ReconfigureSession(ctx context.Context, request ReconfigureSessionRequestObject) (ReconfigureSessionResponseObject, error)
// ListSessionTurns List durable turns
// (GET /session/turns)
ListSessionTurns(ctx context.Context, request ListSessionTurnsRequestObject) (ListSessionTurnsResponseObject, error)
// ListSessionWorkers List a session's worker generations
// (GET /session/workers)
ListSessionWorkers(ctx context.Context, request ListSessionWorkersRequestObject) (ListSessionWorkersResponseObject, error)
// ListSessions List every session
// (GET /sessions)
ListSessions(ctx context.Context, request ListSessionsRequestObject) (ListSessionsResponseObject, error)
// OpenSession Open or resume the session for a workspace
// (POST /sessions/open)
OpenSession(ctx context.Context, request OpenSessionRequestObject) (OpenSessionResponseObject, error)
// OpenSystemSession Open or resume the system session
// (POST /sessions/system)
OpenSystemSession(ctx context.Context, request OpenSystemSessionRequestObject) (OpenSystemSessionResponseObject, error)
// ListWorkspaceRoots List the workspace roots this controller may open
// (GET /workspace-roots)
ListWorkspaceRoots(ctx context.Context, request ListWorkspaceRootsRequestObject) (ListWorkspaceRootsResponseObject, error)
}
StrictServerInterface represents all server handlers.
type TooManyValuesForParamError ¶ added in v0.2.0
func (*TooManyValuesForParamError) Error ¶ added in v0.2.0
func (e *TooManyValuesForParamError) Error() string
type TranscriptEvent ¶ added in v0.4.0
type TranscriptEvent struct {
// CreatedAt When the event was stored, RFC 3339.
CreatedAt time.Time `json:"createdAt"`
// Id The event ID.
Id openapi_types.UUID `json:"id"`
// Payload The event payload, the same `data` the live frame carried.
Payload map[string]interface{} `json:"payload"`
// RequestId The request ID of the turn that produced the event.
RequestId openapi_types.UUID `json:"requestId"`
// Sequence Position among the session's protocol events, consecutive across turns and starting at 1. It is not the feed sequence.
Sequence int64 `json:"sequence"`
// SessionId The session the event belongs to.
SessionId openapi_types.UUID `json:"sessionId"`
// TurnId The turn that produced the event.
TurnId openapi_types.UUID `json:"turnId"`
// Type The protocol event type, such as `tool.use`. The WebSocket protocol event types table lists every value.
Type string `json:"type"`
// WorkerGenerationId The worker generation that produced the event, as listed by `GET /session/workers`. Absent for events recorded before a worker started.
WorkerGenerationId *string `json:"workerGenerationId,omitempty"`
}
TranscriptEvent One protocol event Peen stored while it ran a session's turn, as `GET /session/events` returns it. Optional fields are absent, not null, when they do not apply.
type TranscriptEventPage ¶ added in v0.4.0
type TranscriptEventPage struct {
// Events The events on this page, in the requested order.
Events []TranscriptEvent `json:"events"`
// HasMore True when more events follow this page.
HasMore bool `json:"hasMore"`
// Limit The page size this response used.
Limit int32 `json:"limit"`
// Offset The number of events skipped before this page.
Offset int32 `json:"offset"`
}
TranscriptEventPage One page of `GET /session/events`.
type Turn ¶ added in v0.4.0
type Turn struct {
// CancelRequested True when a Stop was requested for this turn.
CancelRequested bool `json:"cancelRequested"`
// CompletedAt When the turn ended, as an RFC 3339 timestamp. Absent while it runs.
CompletedAt *time.Time `json:"completedAt,omitempty"`
// ContextSnapshotHash The hash of the context snapshot the turn ran with. Read it from `GET /session/context-snapshots/{contextHash}`. Absent until the turn ends.
ContextSnapshotHash *string `json:"contextSnapshotHash,omitempty"`
// FailureClassification Why the turn did not complete: `agentRun` for a failed or interrupted turn, `cancelled` for a Stop, or `timeout` for a turn that passed its deadline. Empty for a running or completed turn.
FailureClassification string `json:"failureClassification"`
// Id The turn's ID. Jobs, model runs and events of this turn carry it as `turnId`.
Id openapi_types.UUID `json:"id"`
// Output The JSON value validated against the turn's `outputSchema`. Absent when the turn did not ask for structured output or no attempt passed validation.
Output interface{} `json:"output,omitempty"`
// OutputError Why every structured output attempt failed. Absent unless the turn asked for structured output and none passed.
OutputError *string `json:"outputError,omitempty"`
// PromptSnapshotHash The hash of the system prompt the turn ran with. Read it from `GET /session/prompt-snapshots/{promptHash}`. Absent until the turn ends.
PromptSnapshotHash *string `json:"promptSnapshotHash,omitempty"`
// RequestId The request ID of the message that started the turn. Every live frame of the turn carries it.
RequestId openapi_types.UUID `json:"requestId"`
// SessionId The session the turn belongs to.
SessionId openapi_types.UUID `json:"sessionId"`
// StartedAt When the turn started, as an RFC 3339 timestamp.
StartedAt time.Time `json:"startedAt"`
// State The turn's lifecycle state.
//
// - `running`: the turn has not ended.
// - `completed`: the turn finished normally.
// - `failed`: the turn ended with an error.
// - `cancelled`: a Stop request or the turn's deadline ended the turn.
// - `interrupted`: the turn did not reach an end, for example because Peen or its worker stopped while it ran.
State TurnState `json:"state"`
// Workspace The workspace directory the turn ran in.
Workspace string `json:"workspace"`
}
Turn One run of the agent for a session, from the message that started it until it ends. It appears in `TurnPage`.
type TurnPage ¶ added in v0.4.0
type TurnPage struct {
// HasMore `true` when at least one more turn exists after this page. Request the next page with `offset` increased by `limit`.
HasMore bool `json:"hasMore"`
// Limit The page size the server used.
Limit int32 `json:"limit"`
// Offset The number of turns skipped before this page.
Offset int32 `json:"offset"`
// Turns The turns on this page, ordered by `startedAt` descending.
Turns []Turn `json:"turns"`
}
TurnPage One page of a session's turns, newest first, returned by `GET /session/turns`.
type TurnState ¶ added in v0.4.0
type TurnState string
TurnState The turn's lifecycle state.
- `running`: the turn has not ended. - `completed`: the turn finished normally. - `failed`: the turn ended with an error. - `cancelled`: a Stop request or the turn's deadline ended the turn. - `interrupted`: the turn did not reach an end, for example because Peen or its worker stopped while it ran.
type UnescapedCookieParamError ¶ added in v0.2.0
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
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
type WorkerGeneration ¶ added in v0.8.0
type WorkerGeneration struct {
// AgentSpace The agent space the generation started in, `control` or `docker:<profile>`.
AgentSpace string `json:"agentSpace"`
// AgentSpaceRevision The agent space's `revision` when the generation started, so the record says which profile definition ran.
AgentSpaceRevision int64 `json:"agentSpaceRevision"`
// ContainerId The Docker container ID. Set only for a Docker generation once its container exists.
ContainerId *string `json:"containerId,omitempty"`
// CreatedAt When the generation was recorded, RFC 3339.
CreatedAt time.Time `json:"createdAt"`
// EndedAt When the generation reached `stopped` or `failed`, RFC 3339. Absent until then.
EndedAt *time.Time `json:"endedAt,omitempty"`
// FailureDetail Why the generation failed. Set only on a `failed` generation. Never carries credentials.
FailureDetail *string `json:"failureDetail,omitempty"`
// Id The generation ID. Protocol events carry it as `workerGenerationId`.
Id openapi_types.UUID `json:"id"`
// ImageDigest The repository digest of the worker image, such as `example/image@sha256:...`, never a moving tag. Set only for a Docker generation, and only when the daemon reported a repository digest for the image; a locally built image has none.
ImageDigest *string `json:"imageDigest,omitempty"`
// Kind Where the worker ran.
//
// - `control`: a worker process where the controller runs.
// - `docker`: a worker container.
Kind WorkerGenerationKind `json:"kind"`
// SessionId The session the worker served.
SessionId openapi_types.UUID `json:"sessionId"`
// StartedAt When the worker became `ready`, RFC 3339. Absent until then.
StartedAt *time.Time `json:"startedAt,omitempty"`
// State The generation's lifecycle state.
//
// - `requested`: recorded, nothing launched yet.
// - `starting`: the process or container is coming up.
// - `ready`: the worker registered and may run turns.
// - `stopping`: the worker was asked to finish and exit.
// - `stopped`: it ended as asked.
// - `failed`: it ended without being asked to, or never became ready.
State WorkerGenerationState `json:"state"`
// Workspace The workspace directory the worker was started for.
Workspace string `json:"workspace"`
}
WorkerGeneration One worker process or container that ran a session's turns, as `GET /session/workers` lists it. Optional fields are absent, not null, when they do not apply.
type WorkerGenerationKind ¶ added in v0.8.0
type WorkerGenerationKind string
WorkerGenerationKind Where the worker ran.
- `control`: a worker process where the controller runs. - `docker`: a worker container.
const ( WorkerGenerationKindControl WorkerGenerationKind = "control" WorkerGenerationKindDocker WorkerGenerationKind = "docker" )
Defines values for WorkerGenerationKind.
func (WorkerGenerationKind) Valid ¶ added in v0.8.0
func (e WorkerGenerationKind) Valid() bool
Valid indicates whether the value is a known member of the WorkerGenerationKind enum.
type WorkerGenerationPage ¶ added in v0.8.0
type WorkerGenerationPage struct {
// HasMore True when more generations follow this page.
HasMore bool `json:"hasMore"`
// Items The generations on this page, newest first.
Items []WorkerGeneration `json:"items"`
// Limit The page size this response used.
Limit int32 `json:"limit"`
// Offset The number of generations skipped before this page.
Offset int32 `json:"offset"`
}
WorkerGenerationPage One page of `GET /session/workers`, newest first.
type WorkerGenerationState ¶ added in v0.8.0
type WorkerGenerationState string
WorkerGenerationState The generation's lifecycle state.
- `requested`: recorded, nothing launched yet. - `starting`: the process or container is coming up. - `ready`: the worker registered and may run turns. - `stopping`: the worker was asked to finish and exit. - `stopped`: it ended as asked. - `failed`: it ended without being asked to, or never became ready.
const ( WorkerGenerationStateFailed WorkerGenerationState = "failed" WorkerGenerationStateReady WorkerGenerationState = "ready" WorkerGenerationStateRequested WorkerGenerationState = "requested" WorkerGenerationStateStarting WorkerGenerationState = "starting" WorkerGenerationStateStopped WorkerGenerationState = "stopped" WorkerGenerationStateStopping WorkerGenerationState = "stopping" )
Defines values for WorkerGenerationState.
func (WorkerGenerationState) Valid ¶ added in v0.8.0
func (e WorkerGenerationState) Valid() bool
Valid indicates whether the value is a known member of the WorkerGenerationState enum.
type WorkspaceFileContent ¶ added in v0.51.0
type WorkspaceFileContent struct {
// ContentBase64 The file's bytes in standard base64 with padding. At most `PEEN_MAX_FILE_API_BYTES` bytes, 16 MiB by default, after decoding.
ContentBase64 string `json:"contentBase64"`
// Path The path as the request gave it.
Path string `json:"path"`
// Size The number of bytes in the file, which is the length of `contentBase64` after decoding.
Size int64 `json:"size"`
}
WorkspaceFileContent The full content of one regular workspace file, base64 encoded. Returned by `GET /session/files/content`.
type WorkspaceFileEntry ¶ added in v0.51.0
type WorkspaceFileEntry struct {
// ModifiedAt The entry's last modification time, as an RFC 3339 UTC time.
ModifiedAt time.Time `json:"modifiedAt"`
// Name The entry's base name, without its directory, such as `main.go`.
Name string `json:"name"`
// Size The entry's size in bytes as the filesystem reports it. For a link it is the size of the link itself, and for a directory it is the filesystem's directory size, not the size of its contents.
Size int64 `json:"size"`
// Type The kind of a workspace path, read without following symbolic links.
//
// - `file`: a regular file, or another non-directory entry such as a pipe or socket.
// - `directory`: a directory.
// - `symlink`: a symbolic link, reported as the link itself rather than its target.
Type WorkspaceFileType `json:"type"`
}
WorkspaceFileEntry Metadata for one workspace path, read without following symbolic links. It appears as an item of a directory listing and as the response of `PUT /session/files/content`.
type WorkspaceFileListing ¶ added in v0.51.0
type WorkspaceFileListing struct {
// Entries The directory's direct entries, sorted by name, including hidden ones. Empty when the path is a file or a symbolic link.
Entries []WorkspaceFileEntry `json:"entries"`
// ModifiedAt The path's last modification time, as an RFC 3339 UTC time.
ModifiedAt time.Time `json:"modifiedAt"`
// Path The path as the request gave it. Empty for the workspace root.
Path string `json:"path"`
// Size The path's size in bytes as the filesystem reports it.
Size int64 `json:"size"`
// Type The kind of a workspace path, read without following symbolic links.
//
// - `file`: a regular file, or another non-directory entry such as a pipe or socket.
// - `directory`: a directory.
// - `symlink`: a symbolic link, reported as the link itself rather than its target.
Type WorkspaceFileType `json:"type"`
}
WorkspaceFileListing Metadata for one workspace path and, when it is a directory, its direct entries. Returned by `GET /session/files`.
type WorkspaceFileType ¶ added in v0.51.0
type WorkspaceFileType string
WorkspaceFileType The kind of a workspace path, read without following symbolic links.
- `file`: a regular file, or another non-directory entry such as a pipe or socket. - `directory`: a directory. - `symlink`: a symbolic link, reported as the link itself rather than its target.
const ( WorkspaceFileTypeDirectory WorkspaceFileType = "directory" WorkspaceFileTypeFile WorkspaceFileType = "file" WorkspaceFileTypeSymlink WorkspaceFileType = "symlink" )
Defines values for WorkspaceFileType.
func (WorkspaceFileType) Valid ¶ added in v0.51.0
func (e WorkspaceFileType) Valid() bool
Valid indicates whether the value is a known member of the WorkspaceFileType enum.
type WorkspaceFileWrite ¶ added in v0.51.0
type WorkspaceFileWrite struct {
// ContentBase64 The new content in standard base64 with padding. URL-safe or unpadded base64 is refused. At most `PEEN_MAX_FILE_API_BYTES` bytes, 16 MiB by default, after decoding. An empty string writes an empty file.
ContentBase64 string `json:"contentBase64"`
// CreateDirectories When `true`, missing parent directories are created with mode `0750`. When `false`, the default, a missing parent answers `404`.
CreateDirectories *bool `json:"createDirectories,omitempty"`
// Path The file's path relative to the workspace, following the rules of `GET /session/files`, such as `notes/todo.md`.
Path string `json:"path"`
}
WorkspaceFileWrite The body of `PUT /session/files/content`: the file to create or replace, and its content.
type WorkspaceRootList ¶ added in v0.13.0
type WorkspaceRootList struct {
// Roots Absolute directories, resolved through symbolic links, under which `POST /sessions/open` accepts a workspace. Peen currently supports one root, so the list holds exactly one entry.
Roots []string `json:"roots"`
}
WorkspaceRootList The response of `GET /workspace-roots`.
type WriteWorkspaceFile200JSONResponse ¶ added in v0.51.0
type WriteWorkspaceFile200JSONResponse struct {
Body WorkspaceFileEntry
Headers WriteWorkspaceFile200ResponseHeaders
}
func (WriteWorkspaceFile200JSONResponse) VisitWriteWorkspaceFileResponse ¶ added in v0.51.0
func (response WriteWorkspaceFile200JSONResponse) VisitWriteWorkspaceFileResponse(w http.ResponseWriter) error
type WriteWorkspaceFile200ResponseHeaders ¶ added in v0.51.0
type WriteWorkspaceFile200ResponseHeaders struct {
XRequestID openapi_types.UUID
XSessionID openapi_types.UUID
}
type WriteWorkspaceFile400JSONResponse ¶ added in v0.51.0
type WriteWorkspaceFile400JSONResponse struct{ ErrorBadRequestJSONResponse }
func (WriteWorkspaceFile400JSONResponse) VisitWriteWorkspaceFileResponse ¶ added in v0.51.0
func (response WriteWorkspaceFile400JSONResponse) VisitWriteWorkspaceFileResponse(w http.ResponseWriter) error
type WriteWorkspaceFile401JSONResponse ¶ added in v0.51.0
func (WriteWorkspaceFile401JSONResponse) VisitWriteWorkspaceFileResponse ¶ added in v0.51.0
func (response WriteWorkspaceFile401JSONResponse) VisitWriteWorkspaceFileResponse(w http.ResponseWriter) error
type WriteWorkspaceFile403JSONResponse ¶ added in v0.51.0
type WriteWorkspaceFile403JSONResponse struct{ ErrorForbiddenJSONResponse }
func (WriteWorkspaceFile403JSONResponse) VisitWriteWorkspaceFileResponse ¶ added in v0.51.0
func (response WriteWorkspaceFile403JSONResponse) VisitWriteWorkspaceFileResponse(w http.ResponseWriter) error
type WriteWorkspaceFile404JSONResponse ¶ added in v0.51.0
type WriteWorkspaceFile404JSONResponse struct{ ErrorNotFoundJSONResponse }
func (WriteWorkspaceFile404JSONResponse) VisitWriteWorkspaceFileResponse ¶ added in v0.51.0
func (response WriteWorkspaceFile404JSONResponse) VisitWriteWorkspaceFileResponse(w http.ResponseWriter) error
type WriteWorkspaceFile406JSONResponse ¶ added in v0.52.0
type WriteWorkspaceFile406JSONResponse struct{ ErrorNotAcceptableJSONResponse }
func (WriteWorkspaceFile406JSONResponse) VisitWriteWorkspaceFileResponse ¶ added in v0.52.0
func (response WriteWorkspaceFile406JSONResponse) VisitWriteWorkspaceFileResponse(w http.ResponseWriter) error
type WriteWorkspaceFile500JSONResponse ¶ added in v0.51.0
type WriteWorkspaceFile500JSONResponse struct{ ErrorInternalJSONResponse }
func (WriteWorkspaceFile500JSONResponse) VisitWriteWorkspaceFileResponse ¶ added in v0.51.0
func (response WriteWorkspaceFile500JSONResponse) VisitWriteWorkspaceFileResponse(w http.ResponseWriter) error
type WriteWorkspaceFileJSONRequestBody ¶ added in v0.51.0
type WriteWorkspaceFileJSONRequestBody = WorkspaceFileWrite
WriteWorkspaceFileJSONRequestBody defines body for WriteWorkspaceFile for application/json ContentType.
type WriteWorkspaceFileParams ¶ added in v0.51.0
type WriteWorkspaceFileParams struct {
// XSessionID The session to act on, as a UUID from `POST /sessions/open`, `GET /sessions` or `POST /sessions/system`. A missing header answers `400 VALIDATION_FAILED`, a malformed value `400 INVALID_SESSION_ID`, and an unknown session `404`.
XSessionID SessionIDRequired `json:"X-Session-ID"`
}
WriteWorkspaceFileParams defines parameters for WriteWorkspaceFile.
type WriteWorkspaceFileRequestObject ¶ added in v0.51.0
type WriteWorkspaceFileRequestObject struct {
Params WriteWorkspaceFileParams
Body *WriteWorkspaceFileJSONRequestBody
}
type WriteWorkspaceFileResponseObject ¶ added in v0.51.0
type WriteWorkspaceFileResponseObject interface {
VisitWriteWorkspaceFileResponse(w http.ResponseWriter) error
}