adminapi

package
v0.1.0-rc.29 Latest Latest
Warning

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

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

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

Documentation

Overview

Package adminapi serves Koinon's admin API: REST under /admin/v1, described by api/admin/v1/openapi.yaml (ADR 0056, plan item PV1).

The types and the strict server interface in api.gen.go are generated from that document by oapi-codegen (pinned as a tool in go.mod; make generate), so a handler cannot drift from the spec without failing to compile, and CI fails when the generated file is stale. oapi-codegen does not validate request bodies against the schema's constraints; the shared service layer (packages catalog and tokens) does, with the same rules, and the tests exercise both.

Authentication is a bearer token only: an org-scoped token with the role admin or owner. Cookie sessions are not accepted here, so the API has no CSRF surface. Every call, including refused ones, is audited with the token's ID; changes are audited by the service layer in the same transaction as the change.

Package adminapi 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.

Index

Constants

View Source
const BasePath = "/admin/v1"

BasePath is where the API is mounted.

Variables

This section is empty.

Functions

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

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

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

func HandlerFromMuxWithBaseURL

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

func HandlerWithOptions

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

HandlerWithOptions creates http.Handler with additional options

func PrincipalFrom

func PrincipalFrom(ctx context.Context) tokens.Principal

PrincipalFrom returns the token that Server.Gate authenticated, or the zero Principal.

Types

type AcknowledgeMcpToolReview200JSONResponse

type AcknowledgeMcpToolReview200JSONResponse McpTool

func (AcknowledgeMcpToolReview200JSONResponse) VisitAcknowledgeMcpToolReviewResponse

func (response AcknowledgeMcpToolReview200JSONResponse) VisitAcknowledgeMcpToolReviewResponse(w http.ResponseWriter) error

type AcknowledgeMcpToolReviewJSONRequestBody

type AcknowledgeMcpToolReviewJSONRequestBody = McpToolReview

AcknowledgeMcpToolReviewJSONRequestBody defines body for AcknowledgeMcpToolReview for application/json ContentType.

type AcknowledgeMcpToolReviewRequestObject

type AcknowledgeMcpToolReviewRequestObject struct {
	ServerId ServerId `json:"serverId"`
	ToolName ToolName `json:"toolName"`
	Body     *AcknowledgeMcpToolReviewJSONRequestBody
}

type AcknowledgeMcpToolReviewResponseObject

type AcknowledgeMcpToolReviewResponseObject interface {
	VisitAcknowledgeMcpToolReviewResponse(w http.ResponseWriter) error
}

type AcknowledgeMcpToolReviewdefaultJSONResponse

type AcknowledgeMcpToolReviewdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (AcknowledgeMcpToolReviewdefaultJSONResponse) VisitAcknowledgeMcpToolReviewResponse

func (response AcknowledgeMcpToolReviewdefaultJSONResponse) VisitAcknowledgeMcpToolReviewResponse(w http.ResponseWriter) error

type AddFetchTrustedHost200JSONResponse

type AddFetchTrustedHost200JSONResponse LeakGuard

func (AddFetchTrustedHost200JSONResponse) VisitAddFetchTrustedHostResponse

func (response AddFetchTrustedHost200JSONResponse) VisitAddFetchTrustedHostResponse(w http.ResponseWriter) error

type AddFetchTrustedHostJSONRequestBody

type AddFetchTrustedHostJSONRequestBody = FetchTrustedHost

AddFetchTrustedHostJSONRequestBody defines body for AddFetchTrustedHost for application/json ContentType.

type AddFetchTrustedHostRequestObject

type AddFetchTrustedHostRequestObject struct {
	Body *AddFetchTrustedHostJSONRequestBody
}

type AddFetchTrustedHostResponseObject

type AddFetchTrustedHostResponseObject interface {
	VisitAddFetchTrustedHostResponse(w http.ResponseWriter) error
}

type AddFetchTrustedHostdefaultJSONResponse

type AddFetchTrustedHostdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (AddFetchTrustedHostdefaultJSONResponse) VisitAddFetchTrustedHostResponse

func (response AddFetchTrustedHostdefaultJSONResponse) VisitAddFetchTrustedHostResponse(w http.ResponseWriter) error

type AgentBudget

type AgentBudget struct {
	AgentId       openapi_types.UUID `json:"agentId"`
	DailyLimitUsd string             `json:"dailyLimitUsd"`
	DayStart      time.Time          `json:"dayStart"`
	SpentTodayUsd string             `json:"spentTodayUsd"`
}

AgentBudget defines model for AgentBudget.

type AgentBudgetUpdate

type AgentBudgetUpdate struct {
	DailyLimitUsd string `json:"dailyLimitUsd"`
}

AgentBudgetUpdate defines model for AgentBudgetUpdate.

type AgentMcpServers

type AgentMcpServers struct {
	Servers []struct {
		ServerId openapi_types.UUID `json:"serverId"`

		// Tools Narrows the allowance to these tools. Omit to allow the whole server.
		Tools *[]string `json:"tools,omitempty"`
	} `json:"servers"`
}

AgentMcpServers defines model for AgentMcpServers.

type AgentModel

type AgentModel struct {
	// Available The models the org serves and has a price for.
	Available []struct {
		Name     string `json:"name"`
		Provider string `json:"provider"`
	} `json:"available"`

	// Effective The model the next run uses; empty when `source` is `none`.
	Effective string `json:"effective"`

	// Problem Set when the agent's setting is no longer served or priced; runs fail until it is changed.
	Problem *string `json:"problem,omitempty"`

	// Setting The agent's own setting; `default` when it has none.
	Setting string `json:"setting"`

	// Source Where `effective` comes from, in order of precedence.
	Source AgentModelSource `json:"source"`

	// Thinking The agent's thinking setting and what it resolves to (ADR 0069 amendment 2026-10-29).
	Thinking *ThinkingState `json:"thinking,omitempty"`

	// VersionModel The active version's model; unset when it names none.
	VersionModel *string `json:"versionModel,omitempty"`
}

AgentModel defines model for AgentModel.

type AgentModelSource

type AgentModelSource string

AgentModelSource Where `effective` comes from, in order of precedence.

const (
	AgentModelSourceAgent      AgentModelSource = "agent"
	AgentModelSourceNone       AgentModelSource = "none"
	AgentModelSourceOrgDefault AgentModelSource = "org_default"
	AgentModelSourceVersion    AgentModelSource = "version"
)

Defines values for AgentModelSource.

func (AgentModelSource) Valid

func (e AgentModelSource) Valid() bool

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

type AgentModelUpdate

type AgentModelUpdate struct {
	// Model `default`, or a model the org serves and has a price for.
	Model string `json:"model"`
}

AgentModelUpdate defines model for AgentModelUpdate.

type AgentThinkingUpdate

type AgentThinkingUpdate struct {
	// Thinking `default` clears the setting.
	Thinking AgentThinkingUpdateThinking `json:"thinking"`
}

AgentThinkingUpdate defines model for AgentThinkingUpdate.

type AgentThinkingUpdateThinking

type AgentThinkingUpdateThinking string

AgentThinkingUpdateThinking `default` clears the setting.

const (
	AgentThinkingUpdateThinkingDefault AgentThinkingUpdateThinking = "default"
	AgentThinkingUpdateThinkingOff     AgentThinkingUpdateThinking = "off"
	AgentThinkingUpdateThinkingOn      AgentThinkingUpdateThinking = "on"
)

Defines values for AgentThinkingUpdateThinking.

func (AgentThinkingUpdateThinking) Valid

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

type AuditEvent

type AuditEvent struct {
	// Action <area>.<verb>, for example approval.approve.
	Action    string              `json:"action"`
	ActorId   string              `json:"actorId"`
	ActorKind AuditEventActorKind `json:"actorKind"`

	// ChainSeq Position in the org's hash chain (the install chain for scope=install), from 1.
	ChainSeq  int64     `json:"chainSeq"`
	CreatedAt time.Time `json:"createdAt"`

	// Hash sha256 of the canonical event and prevHash, lower-case hex.
	Hash string             `json:"hash"`
	Id   openapi_types.UUID `json:"id"`

	// PrevHash Hash of the previous event, lower-case hex.
	PrevHash  string `json:"prevHash"`
	RequestId string `json:"requestId"`

	// Summary {before, after} without secret values.
	Summary    map[string]interface{} `json:"summary"`
	TargetId   string                 `json:"targetId"`
	TargetKind string                 `json:"targetKind"`
}

AuditEvent defines model for AuditEvent.

type AuditEventActorKind

type AuditEventActorKind string

AuditEventActorKind defines model for AuditEvent.ActorKind.

const (
	AuditEventActorKindAgent  AuditEventActorKind = "agent"
	AuditEventActorKindCli    AuditEventActorKind = "cli"
	AuditEventActorKindSecret AuditEventActorKind = "secret"
	AuditEventActorKindSystem AuditEventActorKind = "system"
	AuditEventActorKindToken  AuditEventActorKind = "token"
	AuditEventActorKindUser   AuditEventActorKind = "user"
)

Defines values for AuditEventActorKind.

func (AuditEventActorKind) Valid

func (e AuditEventActorKind) Valid() bool

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

type AuditEventList

type AuditEventList struct {
	Events []AuditEvent `json:"events"`

	// NextPageToken Absent on the last page.
	NextPageToken *string `json:"nextPageToken,omitempty"`
}

AuditEventList defines model for AuditEventList.

type CheckProviderEcho200JSONResponse

type CheckProviderEcho200JSONResponse EchoCheck

func (CheckProviderEcho200JSONResponse) VisitCheckProviderEchoResponse

func (response CheckProviderEcho200JSONResponse) VisitCheckProviderEchoResponse(w http.ResponseWriter) error

type CheckProviderEchoJSONRequestBody

type CheckProviderEchoJSONRequestBody = EchoCheckRequest

CheckProviderEchoJSONRequestBody defines body for CheckProviderEcho for application/json ContentType.

type CheckProviderEchoRequestObject

type CheckProviderEchoRequestObject struct {
	ProviderId ProviderId `json:"providerId"`
	Body       *CheckProviderEchoJSONRequestBody
}

type CheckProviderEchoResponseObject

type CheckProviderEchoResponseObject interface {
	VisitCheckProviderEchoResponse(w http.ResponseWriter) error
}

type CheckProviderEchodefaultJSONResponse

type CheckProviderEchodefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (CheckProviderEchodefaultJSONResponse) VisitCheckProviderEchoResponse

func (response CheckProviderEchodefaultJSONResponse) VisitCheckProviderEchoResponse(w http.ResponseWriter) error

type CodeHostScope

type CodeHostScope struct {
	Internal        int        `json:"internal"`
	OldestCheckedAt *time.Time `json:"oldestCheckedAt,omitempty"`
	Private         int        `json:"private"`
	Public          int        `json:"public"`
	Repositories    int        `json:"repositories"`

	// Stale Repositories whose reading is older than the freshness window. They count as unknown.
	Stale *int `json:"stale,omitempty"`

	// Unknown Repositories whose visibility the connector could not read. They count as external-high.
	Unknown                 int `json:"unknown"`
	VisibilityMaxAgeSeconds int `json:"visibilityMaxAgeSeconds"`
}

CodeHostScope The org's code-host scope (ADR 0091): the repositories of its code-host connections with the visibility the connector last read. The code-host derivation calls a write internal only for a listed repository that is not public and whose reading is fresh.

type CreateMcpServer201JSONResponse

type CreateMcpServer201JSONResponse McpServer

func (CreateMcpServer201JSONResponse) VisitCreateMcpServerResponse

func (response CreateMcpServer201JSONResponse) VisitCreateMcpServerResponse(w http.ResponseWriter) error

type CreateMcpServerJSONRequestBody

type CreateMcpServerJSONRequestBody = McpServerCreate

CreateMcpServerJSONRequestBody defines body for CreateMcpServer for application/json ContentType.

type CreateMcpServerRequestObject

type CreateMcpServerRequestObject struct {
	Body *CreateMcpServerJSONRequestBody
}

type CreateMcpServerResponseObject

type CreateMcpServerResponseObject interface {
	VisitCreateMcpServerResponse(w http.ResponseWriter) error
}

type CreateMcpServerdefaultJSONResponse

type CreateMcpServerdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (CreateMcpServerdefaultJSONResponse) VisitCreateMcpServerResponse

func (response CreateMcpServerdefaultJSONResponse) VisitCreateMcpServerResponse(w http.ResponseWriter) error

type CreateModel201JSONResponse

type CreateModel201JSONResponse ModelCreated

func (CreateModel201JSONResponse) VisitCreateModelResponse

func (response CreateModel201JSONResponse) VisitCreateModelResponse(w http.ResponseWriter) error

type CreateModelJSONRequestBody

type CreateModelJSONRequestBody = ModelCreate

CreateModelJSONRequestBody defines body for CreateModel for application/json ContentType.

type CreateModelRequestObject

type CreateModelRequestObject struct {
	Body *CreateModelJSONRequestBody
}

type CreateModelResponseObject

type CreateModelResponseObject interface {
	VisitCreateModelResponse(w http.ResponseWriter) error
}

type CreateModeldefaultJSONResponse

type CreateModeldefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (CreateModeldefaultJSONResponse) VisitCreateModelResponse

func (response CreateModeldefaultJSONResponse) VisitCreateModelResponse(w http.ResponseWriter) error

type CreateProvider201JSONResponse

type CreateProvider201JSONResponse Provider

func (CreateProvider201JSONResponse) VisitCreateProviderResponse

func (response CreateProvider201JSONResponse) VisitCreateProviderResponse(w http.ResponseWriter) error

type CreateProviderJSONRequestBody

type CreateProviderJSONRequestBody = ProviderCreate

CreateProviderJSONRequestBody defines body for CreateProvider for application/json ContentType.

type CreateProviderRequestObject

type CreateProviderRequestObject struct {
	Body *CreateProviderJSONRequestBody
}

type CreateProviderResponseObject

type CreateProviderResponseObject interface {
	VisitCreateProviderResponse(w http.ResponseWriter) error
}

type CreateProviderdefaultJSONResponse

type CreateProviderdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (CreateProviderdefaultJSONResponse) VisitCreateProviderResponse

func (response CreateProviderdefaultJSONResponse) VisitCreateProviderResponse(w http.ResponseWriter) error

type CreateToken201JSONResponse

type CreateToken201JSONResponse TokenCreated

func (CreateToken201JSONResponse) VisitCreateTokenResponse

func (response CreateToken201JSONResponse) VisitCreateTokenResponse(w http.ResponseWriter) error

type CreateTokenJSONRequestBody

type CreateTokenJSONRequestBody = TokenCreate

CreateTokenJSONRequestBody defines body for CreateToken for application/json ContentType.

type CreateTokenRequestObject

type CreateTokenRequestObject struct {
	Body *CreateTokenJSONRequestBody
}

type CreateTokenResponseObject

type CreateTokenResponseObject interface {
	VisitCreateTokenResponse(w http.ResponseWriter) error
}

type CreateTokendefaultJSONResponse

type CreateTokendefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (CreateTokendefaultJSONResponse) VisitCreateTokenResponse

func (response CreateTokendefaultJSONResponse) VisitCreateTokenResponse(w http.ResponseWriter) error

type DefaultModel

type DefaultModel struct {
	// Model The model name. Absent: the org has no default model.
	Model *string `json:"model,omitempty"`
}

DefaultModel defines model for DefaultModel.

type DefaultPriceChanges

type DefaultPriceChanges struct {
	Changes []PriceChange `json:"changes"`
	From    *string       `json:"from,omitempty"`
	To      string        `json:"to"`
}

DefaultPriceChanges defines model for DefaultPriceChanges.

type DefaultPrices

type DefaultPrices struct {
	Entries          []PriceEntry `json:"entries"`
	PreviousVersions []string     `json:"previousVersions"`
	Version          string       `json:"version"`
}

DefaultPrices defines model for DefaultPrices.

type DeleteMcpServer204Response

type DeleteMcpServer204Response struct {
}

func (DeleteMcpServer204Response) VisitDeleteMcpServerResponse

func (response DeleteMcpServer204Response) VisitDeleteMcpServerResponse(w http.ResponseWriter) error

type DeleteMcpServerRequestObject

type DeleteMcpServerRequestObject struct {
	ServerId ServerId `json:"serverId"`
}

type DeleteMcpServerResponseObject

type DeleteMcpServerResponseObject interface {
	VisitDeleteMcpServerResponse(w http.ResponseWriter) error
}

type DeleteMcpServerdefaultJSONResponse

type DeleteMcpServerdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (DeleteMcpServerdefaultJSONResponse) VisitDeleteMcpServerResponse

func (response DeleteMcpServerdefaultJSONResponse) VisitDeleteMcpServerResponse(w http.ResponseWriter) error

type DeleteModel204Response

type DeleteModel204Response struct {
}

func (DeleteModel204Response) VisitDeleteModelResponse

func (response DeleteModel204Response) VisitDeleteModelResponse(w http.ResponseWriter) error

type DeleteModelRequestObject

type DeleteModelRequestObject struct {
	ModelId ModelId `json:"modelId"`
}

type DeleteModelResponseObject

type DeleteModelResponseObject interface {
	VisitDeleteModelResponse(w http.ResponseWriter) error
}

type DeleteModeldefaultJSONResponse

type DeleteModeldefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (DeleteModeldefaultJSONResponse) VisitDeleteModelResponse

func (response DeleteModeldefaultJSONResponse) VisitDeleteModelResponse(w http.ResponseWriter) error

type DeleteProvider204Response

type DeleteProvider204Response struct {
}

func (DeleteProvider204Response) VisitDeleteProviderResponse

func (response DeleteProvider204Response) VisitDeleteProviderResponse(w http.ResponseWriter) error

type DeleteProviderRequestObject

type DeleteProviderRequestObject struct {
	ProviderId ProviderId `json:"providerId"`
}

type DeleteProviderResponseObject

type DeleteProviderResponseObject interface {
	VisitDeleteProviderResponse(w http.ResponseWriter) error
}

type DeleteProviderdefaultJSONResponse

type DeleteProviderdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (DeleteProviderdefaultJSONResponse) VisitDeleteProviderResponse

func (response DeleteProviderdefaultJSONResponse) VisitDeleteProviderResponse(w http.ResponseWriter) error

type EchoCheck

type EchoCheck struct {
	CheckedAt time.Time `json:"checkedAt"`

	// Diff The difference between the line and the reply, in order.
	Diff []struct {
		// Op `deleted` is in the line but not in the reply, `inserted` the other way.
		Op   EchoCheckDiffOp `json:"op"`
		Text string          `json:"text"`
	} `json:"diff"`
	Model string `json:"model"`

	// Received The model's reply.
	Received string `json:"received"`

	// Sent The line the model was asked to repeat.
	Sent string `json:"sent"`

	// Unchanged True when the reply was the line, character for character.
	Unchanged bool `json:"unchanged"`
}

EchoCheck The latest echo check of a provider.

type EchoCheckDiffOp

type EchoCheckDiffOp string

EchoCheckDiffOp `deleted` is in the line but not in the reply, `inserted` the other way.

const (
	Deleted  EchoCheckDiffOp = "deleted"
	Equal    EchoCheckDiffOp = "equal"
	Inserted EchoCheckDiffOp = "inserted"
)

Defines values for EchoCheckDiffOp.

func (EchoCheckDiffOp) Valid

func (e EchoCheckDiffOp) Valid() bool

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

type EchoCheckRequest

type EchoCheckRequest struct {
	// Model A model of the provider that the org serves and has a price for.
	Model string `json:"model"`
}

EchoCheckRequest defines model for EchoCheckRequest.

type Error

type Error struct {
	Error struct {
		Code    ErrorCode `json:"code"`
		Message string    `json:"message"`
	} `json:"error"`
}

Error defines model for Error.

type ErrorCode

type ErrorCode string

ErrorCode defines model for ErrorCode.

const (
	Conflict         ErrorCode = "conflict"
	Internal         ErrorCode = "internal"
	InvalidRequest   ErrorCode = "invalid_request"
	NotFound         ErrorCode = "not_found"
	PermissionDenied ErrorCode = "permission_denied"
	Unauthenticated  ErrorCode = "unauthenticated"
	Unavailable      ErrorCode = "unavailable"
)

Defines values for ErrorCode.

func (ErrorCode) Valid

func (e ErrorCode) Valid() bool

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

type ErrorJSONResponse

type ErrorJSONResponse Error

type ExportAudit200ApplicationxNdjsonResponse

type ExportAudit200ApplicationxNdjsonResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (ExportAudit200ApplicationxNdjsonResponse) VisitExportAuditResponse

func (response ExportAudit200ApplicationxNdjsonResponse) VisitExportAuditResponse(w http.ResponseWriter) error

type ExportAuditParams

type ExportAuditParams struct {
	// Scope `org` (the default) or `install`.
	Scope *ExportAuditParamsScope `form:"scope,omitempty" json:"scope,omitempty"`

	// Org With `scope=org`, the token's own org; any other org is 403.
	Org *openapi_types.UUID `form:"org,omitempty" json:"org,omitempty"`

	// FromSeq Start at this `chain_seq` (a partial export); 1 by default.
	FromSeq *int64 `form:"fromSeq,omitempty" json:"fromSeq,omitempty"`
}

ExportAuditParams defines parameters for ExportAudit.

type ExportAuditParamsScope

type ExportAuditParamsScope string

ExportAuditParamsScope defines parameters for ExportAudit.

const (
	ExportAuditParamsScopeInstall ExportAuditParamsScope = "install"
	ExportAuditParamsScopeOrg     ExportAuditParamsScope = "org"
)

Defines values for ExportAuditParamsScope.

func (ExportAuditParamsScope) Valid

func (e ExportAuditParamsScope) Valid() bool

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

type ExportAuditRequestObject

type ExportAuditRequestObject struct {
	Params ExportAuditParams
}

type ExportAuditResponseObject

type ExportAuditResponseObject interface {
	VisitExportAuditResponse(w http.ResponseWriter) error
}

type ExportAuditdefaultJSONResponse

type ExportAuditdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (ExportAuditdefaultJSONResponse) VisitExportAuditResponse

func (response ExportAuditdefaultJSONResponse) VisitExportAuditResponse(w http.ResponseWriter) error

type FetchTrustedHost

type FetchTrustedHost struct {
	Host string `json:"host"`
}

FetchTrustedHost defines model for FetchTrustedHost.

type FlaggedPrice

type FlaggedPrice struct {
	// CostUsd What Koinon computed (counts for limits and reports).
	CostUsd        string    `json:"costUsd"`
	GatewayCostUsd string    `json:"gatewayCostUsd"`
	LastSeen       time.Time `json:"lastSeen"`
	Model          string    `json:"model"`
	PriceRef       string    `json:"priceRef"`
	Requests       int64     `json:"requests"`
}

FlaggedPrice defines model for FlaggedPrice.

type FlaggedPriceList

type FlaggedPriceList struct {
	Flagged []FlaggedPrice `json:"flagged"`
}

FlaggedPriceList defines model for FlaggedPriceList.

type GetAgentBudget200JSONResponse

type GetAgentBudget200JSONResponse AgentBudget

func (GetAgentBudget200JSONResponse) VisitGetAgentBudgetResponse

func (response GetAgentBudget200JSONResponse) VisitGetAgentBudgetResponse(w http.ResponseWriter) error

type GetAgentBudgetRequestObject

type GetAgentBudgetRequestObject struct {
	AgentId openapi_types.UUID `json:"agentId"`
}

type GetAgentBudgetResponseObject

type GetAgentBudgetResponseObject interface {
	VisitGetAgentBudgetResponse(w http.ResponseWriter) error
}

type GetAgentBudgetdefaultJSONResponse

type GetAgentBudgetdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (GetAgentBudgetdefaultJSONResponse) VisitGetAgentBudgetResponse

func (response GetAgentBudgetdefaultJSONResponse) VisitGetAgentBudgetResponse(w http.ResponseWriter) error

type GetAgentMcpServers200JSONResponse

type GetAgentMcpServers200JSONResponse AgentMcpServers

func (GetAgentMcpServers200JSONResponse) VisitGetAgentMcpServersResponse

func (response GetAgentMcpServers200JSONResponse) VisitGetAgentMcpServersResponse(w http.ResponseWriter) error

type GetAgentMcpServersRequestObject

type GetAgentMcpServersRequestObject struct {
	AgentId openapi_types.UUID `json:"agentId"`
}

type GetAgentMcpServersResponseObject

type GetAgentMcpServersResponseObject interface {
	VisitGetAgentMcpServersResponse(w http.ResponseWriter) error
}

type GetAgentMcpServersdefaultJSONResponse

type GetAgentMcpServersdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (GetAgentMcpServersdefaultJSONResponse) VisitGetAgentMcpServersResponse

func (response GetAgentMcpServersdefaultJSONResponse) VisitGetAgentMcpServersResponse(w http.ResponseWriter) error

type GetAgentModel200JSONResponse

type GetAgentModel200JSONResponse AgentModel

func (GetAgentModel200JSONResponse) VisitGetAgentModelResponse

func (response GetAgentModel200JSONResponse) VisitGetAgentModelResponse(w http.ResponseWriter) error

type GetAgentModelRequestObject

type GetAgentModelRequestObject struct {
	AgentId openapi_types.UUID `json:"agentId"`
}

type GetAgentModelResponseObject

type GetAgentModelResponseObject interface {
	VisitGetAgentModelResponse(w http.ResponseWriter) error
}

type GetAgentModeldefaultJSONResponse

type GetAgentModeldefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (GetAgentModeldefaultJSONResponse) VisitGetAgentModelResponse

func (response GetAgentModeldefaultJSONResponse) VisitGetAgentModelResponse(w http.ResponseWriter) error

type GetBudget200JSONResponse

type GetBudget200JSONResponse OrgBudget

func (GetBudget200JSONResponse) VisitGetBudgetResponse

func (response GetBudget200JSONResponse) VisitGetBudgetResponse(w http.ResponseWriter) error

type GetBudgetRequestObject

type GetBudgetRequestObject struct {
}

type GetBudgetResponseObject

type GetBudgetResponseObject interface {
	VisitGetBudgetResponse(w http.ResponseWriter) error
}

type GetBudgetdefaultJSONResponse

type GetBudgetdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (GetBudgetdefaultJSONResponse) VisitGetBudgetResponse

func (response GetBudgetdefaultJSONResponse) VisitGetBudgetResponse(w http.ResponseWriter) error

type GetDefaultModel200JSONResponse

type GetDefaultModel200JSONResponse DefaultModel

func (GetDefaultModel200JSONResponse) VisitGetDefaultModelResponse

func (response GetDefaultModel200JSONResponse) VisitGetDefaultModelResponse(w http.ResponseWriter) error

type GetDefaultModelRequestObject

type GetDefaultModelRequestObject struct {
}

type GetDefaultModelResponseObject

type GetDefaultModelResponseObject interface {
	VisitGetDefaultModelResponse(w http.ResponseWriter) error
}

type GetDefaultModeldefaultJSONResponse

type GetDefaultModeldefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (GetDefaultModeldefaultJSONResponse) VisitGetDefaultModelResponse

func (response GetDefaultModeldefaultJSONResponse) VisitGetDefaultModelResponse(w http.ResponseWriter) error

type GetDefaultPriceChanges200JSONResponse

type GetDefaultPriceChanges200JSONResponse DefaultPriceChanges

func (GetDefaultPriceChanges200JSONResponse) VisitGetDefaultPriceChangesResponse

func (response GetDefaultPriceChanges200JSONResponse) VisitGetDefaultPriceChangesResponse(w http.ResponseWriter) error

type GetDefaultPriceChangesParams

type GetDefaultPriceChangesParams struct {
	From *string `form:"from,omitempty" json:"from,omitempty"`
	To   *string `form:"to,omitempty" json:"to,omitempty"`
}

GetDefaultPriceChangesParams defines parameters for GetDefaultPriceChanges.

type GetDefaultPriceChangesRequestObject

type GetDefaultPriceChangesRequestObject struct {
	Params GetDefaultPriceChangesParams
}

type GetDefaultPriceChangesResponseObject

type GetDefaultPriceChangesResponseObject interface {
	VisitGetDefaultPriceChangesResponse(w http.ResponseWriter) error
}

type GetDefaultPriceChangesdefaultJSONResponse

type GetDefaultPriceChangesdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (GetDefaultPriceChangesdefaultJSONResponse) VisitGetDefaultPriceChangesResponse

func (response GetDefaultPriceChangesdefaultJSONResponse) VisitGetDefaultPriceChangesResponse(w http.ResponseWriter) error

type GetDefaultPrices200JSONResponse

type GetDefaultPrices200JSONResponse DefaultPrices

func (GetDefaultPrices200JSONResponse) VisitGetDefaultPricesResponse

func (response GetDefaultPrices200JSONResponse) VisitGetDefaultPricesResponse(w http.ResponseWriter) error

type GetDefaultPricesRequestObject

type GetDefaultPricesRequestObject struct {
}

type GetDefaultPricesResponseObject

type GetDefaultPricesResponseObject interface {
	VisitGetDefaultPricesResponse(w http.ResponseWriter) error
}

type GetDefaultPricesdefaultJSONResponse

type GetDefaultPricesdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (GetDefaultPricesdefaultJSONResponse) VisitGetDefaultPricesResponse

func (response GetDefaultPricesdefaultJSONResponse) VisitGetDefaultPricesResponse(w http.ResponseWriter) error

type GetHomeBackupRetention200JSONResponse

type GetHomeBackupRetention200JSONResponse HomeBackupRetention

func (GetHomeBackupRetention200JSONResponse) VisitGetHomeBackupRetentionResponse

func (response GetHomeBackupRetention200JSONResponse) VisitGetHomeBackupRetentionResponse(w http.ResponseWriter) error

type GetHomeBackupRetentionRequestObject

type GetHomeBackupRetentionRequestObject struct {
}

type GetHomeBackupRetentionResponseObject

type GetHomeBackupRetentionResponseObject interface {
	VisitGetHomeBackupRetentionResponse(w http.ResponseWriter) error
}

type GetHomeBackupRetentiondefaultJSONResponse

type GetHomeBackupRetentiondefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (GetHomeBackupRetentiondefaultJSONResponse) VisitGetHomeBackupRetentionResponse

func (response GetHomeBackupRetentiondefaultJSONResponse) VisitGetHomeBackupRetentionResponse(w http.ResponseWriter) error

type GetLeakGuard200JSONResponse

type GetLeakGuard200JSONResponse LeakGuard

func (GetLeakGuard200JSONResponse) VisitGetLeakGuardResponse

func (response GetLeakGuard200JSONResponse) VisitGetLeakGuardResponse(w http.ResponseWriter) error

type GetLeakGuardRequestObject

type GetLeakGuardRequestObject struct {
}

type GetLeakGuardResponseObject

type GetLeakGuardResponseObject interface {
	VisitGetLeakGuardResponse(w http.ResponseWriter) error
}

type GetLeakGuarddefaultJSONResponse

type GetLeakGuarddefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (GetLeakGuarddefaultJSONResponse) VisitGetLeakGuardResponse

func (response GetLeakGuarddefaultJSONResponse) VisitGetLeakGuardResponse(w http.ResponseWriter) error

type GetMcpServer200JSONResponse

type GetMcpServer200JSONResponse McpServer

func (GetMcpServer200JSONResponse) VisitGetMcpServerResponse

func (response GetMcpServer200JSONResponse) VisitGetMcpServerResponse(w http.ResponseWriter) error

type GetMcpServerRequestObject

type GetMcpServerRequestObject struct {
	ServerId ServerId `json:"serverId"`
}

type GetMcpServerResponseObject

type GetMcpServerResponseObject interface {
	VisitGetMcpServerResponse(w http.ResponseWriter) error
}

type GetMcpServerdefaultJSONResponse

type GetMcpServerdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (GetMcpServerdefaultJSONResponse) VisitGetMcpServerResponse

func (response GetMcpServerdefaultJSONResponse) VisitGetMcpServerResponse(w http.ResponseWriter) error

type GetModel200JSONResponse

type GetModel200JSONResponse Model

func (GetModel200JSONResponse) VisitGetModelResponse

func (response GetModel200JSONResponse) VisitGetModelResponse(w http.ResponseWriter) error

type GetModelRequestObject

type GetModelRequestObject struct {
	ModelId ModelId `json:"modelId"`
}

type GetModelResponseObject

type GetModelResponseObject interface {
	VisitGetModelResponse(w http.ResponseWriter) error
}

type GetModeldefaultJSONResponse

type GetModeldefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (GetModeldefaultJSONResponse) VisitGetModelResponse

func (response GetModeldefaultJSONResponse) VisitGetModelResponse(w http.ResponseWriter) error

type GetProvider200JSONResponse

type GetProvider200JSONResponse Provider

func (GetProvider200JSONResponse) VisitGetProviderResponse

func (response GetProvider200JSONResponse) VisitGetProviderResponse(w http.ResponseWriter) error

type GetProviderRequestObject

type GetProviderRequestObject struct {
	ProviderId ProviderId `json:"providerId"`
}

type GetProviderResponseObject

type GetProviderResponseObject interface {
	VisitGetProviderResponse(w http.ResponseWriter) error
}

type GetProviderdefaultJSONResponse

type GetProviderdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (GetProviderdefaultJSONResponse) VisitGetProviderResponse

func (response GetProviderdefaultJSONResponse) VisitGetProviderResponse(w http.ResponseWriter) error

type GetRestoreStatus200JSONResponse

type GetRestoreStatus200JSONResponse RestoreStatus

func (GetRestoreStatus200JSONResponse) VisitGetRestoreStatusResponse

func (response GetRestoreStatus200JSONResponse) VisitGetRestoreStatusResponse(w http.ResponseWriter) error

type GetRestoreStatusRequestObject

type GetRestoreStatusRequestObject struct {
}

type GetRestoreStatusResponseObject

type GetRestoreStatusResponseObject interface {
	VisitGetRestoreStatusResponse(w http.ResponseWriter) error
}

type GetRestoreStatusdefaultJSONResponse

type GetRestoreStatusdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (GetRestoreStatusdefaultJSONResponse) VisitGetRestoreStatusResponse

func (response GetRestoreStatusdefaultJSONResponse) VisitGetRestoreStatusResponse(w http.ResponseWriter) error

type GetRunContentRetention200JSONResponse

type GetRunContentRetention200JSONResponse RunContentRetention

func (GetRunContentRetention200JSONResponse) VisitGetRunContentRetentionResponse

func (response GetRunContentRetention200JSONResponse) VisitGetRunContentRetentionResponse(w http.ResponseWriter) error

type GetRunContentRetentionRequestObject

type GetRunContentRetentionRequestObject struct {
}

type GetRunContentRetentionResponseObject

type GetRunContentRetentionResponseObject interface {
	VisitGetRunContentRetentionResponse(w http.ResponseWriter) error
}

type GetRunContentRetentiondefaultJSONResponse

type GetRunContentRetentiondefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (GetRunContentRetentiondefaultJSONResponse) VisitGetRunContentRetentionResponse

func (response GetRunContentRetentiondefaultJSONResponse) VisitGetRunContentRetentionResponse(w http.ResponseWriter) error

type GetSpendReport200JSONResponse

type GetSpendReport200JSONResponse SpendReport

func (GetSpendReport200JSONResponse) VisitGetSpendReportResponse

func (response GetSpendReport200JSONResponse) VisitGetSpendReportResponse(w http.ResponseWriter) error

type GetSpendReportParams

type GetSpendReportParams struct {
	// Since RFC 3339 time; default the start of the current month (UTC).
	Since *time.Time `form:"since,omitempty" json:"since,omitempty"`
}

GetSpendReportParams defines parameters for GetSpendReport.

type GetSpendReportRequestObject

type GetSpendReportRequestObject struct {
	Params GetSpendReportParams
}

type GetSpendReportResponseObject

type GetSpendReportResponseObject interface {
	VisitGetSpendReportResponse(w http.ResponseWriter) error
}

type GetSpendReportdefaultJSONResponse

type GetSpendReportdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (GetSpendReportdefaultJSONResponse) VisitGetSpendReportResponse

func (response GetSpendReportdefaultJSONResponse) VisitGetSpendReportResponse(w http.ResponseWriter) error

type HomeBackupRetention

type HomeBackupRetention struct {
	Days        int `json:"days"`
	DefaultDays int `json:"defaultDays"`
	MaxDays     int `json:"maxDays"`
	MinDays     int `json:"minDays"`
}

HomeBackupRetention A key change starts a new backup repository for each agent's home. The old one stays readable for the checkpoints written to it for `days`, then it is deleted. The deadline is set when the new repository starts, so a change applies to later key changes only.

type HomeBackupRetentionSettings

type HomeBackupRetentionSettings struct {
	// Days Days to keep an old home backup repository. Leave out for the default (7).
	Days *int `json:"days,omitempty"`
}

HomeBackupRetentionSettings defines model for HomeBackupRetentionSettings.

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type LeakGuard

type LeakGuard struct {
	// CodeHostScope The org's code-host scope (ADR 0091): the repositories of its code-host connections with the
	// visibility the connector last read. The code-host derivation calls a write internal only for a
	// listed repository that is not public and whose reading is fresh.
	CodeHostScope         CodeHostScope `json:"codeHostScope"`
	DefaultMatchThreshold int           `json:"defaultMatchThreshold"`

	// MatchThreshold The shortest tainted text, in characters after normalisation, that blocks a call. Default 24.
	MatchThreshold    int `json:"matchThreshold"`
	MaxMatchThreshold int `json:"maxMatchThreshold"`
	MinMatchThreshold int `json:"minMatchThreshold"`

	// TrustedHosts The fetch-trusted host list, sorted. Empty for a new org.
	TrustedHosts []string `json:"trustedHosts"`
}

LeakGuard defines model for LeakGuard.

type LeakGuardSettings

type LeakGuardSettings struct {
	// MatchThreshold Characters. Leave out for the default (24).
	MatchThreshold *int `json:"matchThreshold,omitempty"`
}

LeakGuardSettings defines model for LeakGuardSettings.

type ListAuditEvents200JSONResponse

type ListAuditEvents200JSONResponse AuditEventList

func (ListAuditEvents200JSONResponse) VisitListAuditEventsResponse

func (response ListAuditEvents200JSONResponse) VisitListAuditEventsResponse(w http.ResponseWriter) error

type ListAuditEventsParams

type ListAuditEventsParams struct {
	// Scope `org` (the default) or `install`.
	Scope *ListAuditEventsParamsScope `form:"scope,omitempty" json:"scope,omitempty"`

	// Since RFC 3339 time; keeps events created at or after it.
	Since *time.Time `form:"since,omitempty" json:"since,omitempty"`

	// Until RFC 3339 time; keeps events created before it.
	Until *time.Time `form:"until,omitempty" json:"until,omitempty"`

	// ActionPrefix Keeps events whose action starts with it, for example `approval.` or `agent.create`.
	ActionPrefix *string                         `form:"actionPrefix,omitempty" json:"actionPrefix,omitempty"`
	ActorKind    *ListAuditEventsParamsActorKind `form:"actorKind,omitempty" json:"actorKind,omitempty"`

	// ActorId Keeps the events of one actor; needs `actorKind`.
	ActorId *string `form:"actorId,omitempty" json:"actorId,omitempty"`

	// PageSize 50 by default, at most 200.
	PageSize  *int    `form:"pageSize,omitempty" json:"pageSize,omitempty"`
	PageToken *string `form:"pageToken,omitempty" json:"pageToken,omitempty"`
}

ListAuditEventsParams defines parameters for ListAuditEvents.

type ListAuditEventsParamsActorKind

type ListAuditEventsParamsActorKind string

ListAuditEventsParamsActorKind defines parameters for ListAuditEvents.

const (
	ListAuditEventsParamsActorKindAgent  ListAuditEventsParamsActorKind = "agent"
	ListAuditEventsParamsActorKindCli    ListAuditEventsParamsActorKind = "cli"
	ListAuditEventsParamsActorKindSecret ListAuditEventsParamsActorKind = "secret"
	ListAuditEventsParamsActorKindSystem ListAuditEventsParamsActorKind = "system"
	ListAuditEventsParamsActorKindToken  ListAuditEventsParamsActorKind = "token"
	ListAuditEventsParamsActorKindUser   ListAuditEventsParamsActorKind = "user"
)

Defines values for ListAuditEventsParamsActorKind.

func (ListAuditEventsParamsActorKind) Valid

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

type ListAuditEventsParamsScope

type ListAuditEventsParamsScope string

ListAuditEventsParamsScope defines parameters for ListAuditEvents.

const (
	ListAuditEventsParamsScopeInstall ListAuditEventsParamsScope = "install"
	ListAuditEventsParamsScopeOrg     ListAuditEventsParamsScope = "org"
)

Defines values for ListAuditEventsParamsScope.

func (ListAuditEventsParamsScope) Valid

func (e ListAuditEventsParamsScope) Valid() bool

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

type ListAuditEventsRequestObject

type ListAuditEventsRequestObject struct {
	Params ListAuditEventsParams
}

type ListAuditEventsResponseObject

type ListAuditEventsResponseObject interface {
	VisitListAuditEventsResponse(w http.ResponseWriter) error
}

type ListAuditEventsdefaultJSONResponse

type ListAuditEventsdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (ListAuditEventsdefaultJSONResponse) VisitListAuditEventsResponse

func (response ListAuditEventsdefaultJSONResponse) VisitListAuditEventsResponse(w http.ResponseWriter) error

type ListFlaggedPrices200JSONResponse

type ListFlaggedPrices200JSONResponse FlaggedPriceList

func (ListFlaggedPrices200JSONResponse) VisitListFlaggedPricesResponse

func (response ListFlaggedPrices200JSONResponse) VisitListFlaggedPricesResponse(w http.ResponseWriter) error

type ListFlaggedPricesParams

type ListFlaggedPricesParams struct {
	// Since RFC 3339 time; default 7 days ago.
	Since *time.Time `form:"since,omitempty" json:"since,omitempty"`
}

ListFlaggedPricesParams defines parameters for ListFlaggedPrices.

type ListFlaggedPricesRequestObject

type ListFlaggedPricesRequestObject struct {
	Params ListFlaggedPricesParams
}

type ListFlaggedPricesResponseObject

type ListFlaggedPricesResponseObject interface {
	VisitListFlaggedPricesResponse(w http.ResponseWriter) error
}

type ListFlaggedPricesdefaultJSONResponse

type ListFlaggedPricesdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (ListFlaggedPricesdefaultJSONResponse) VisitListFlaggedPricesResponse

func (response ListFlaggedPricesdefaultJSONResponse) VisitListFlaggedPricesResponse(w http.ResponseWriter) error

type ListMcpServers200JSONResponse

type ListMcpServers200JSONResponse McpServerList

func (ListMcpServers200JSONResponse) VisitListMcpServersResponse

func (response ListMcpServers200JSONResponse) VisitListMcpServersResponse(w http.ResponseWriter) error

type ListMcpServersRequestObject

type ListMcpServersRequestObject struct {
}

type ListMcpServersResponseObject

type ListMcpServersResponseObject interface {
	VisitListMcpServersResponse(w http.ResponseWriter) error
}

type ListMcpServersdefaultJSONResponse

type ListMcpServersdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (ListMcpServersdefaultJSONResponse) VisitListMcpServersResponse

func (response ListMcpServersdefaultJSONResponse) VisitListMcpServersResponse(w http.ResponseWriter) error

type ListMcpTools200JSONResponse

type ListMcpTools200JSONResponse McpToolList

func (ListMcpTools200JSONResponse) VisitListMcpToolsResponse

func (response ListMcpTools200JSONResponse) VisitListMcpToolsResponse(w http.ResponseWriter) error

type ListMcpToolsRequestObject

type ListMcpToolsRequestObject struct {
	ServerId ServerId `json:"serverId"`
}

type ListMcpToolsResponseObject

type ListMcpToolsResponseObject interface {
	VisitListMcpToolsResponse(w http.ResponseWriter) error
}

type ListMcpToolsdefaultJSONResponse

type ListMcpToolsdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (ListMcpToolsdefaultJSONResponse) VisitListMcpToolsResponse

func (response ListMcpToolsdefaultJSONResponse) VisitListMcpToolsResponse(w http.ResponseWriter) error

type ListModels200JSONResponse

type ListModels200JSONResponse ModelList

func (ListModels200JSONResponse) VisitListModelsResponse

func (response ListModels200JSONResponse) VisitListModelsResponse(w http.ResponseWriter) error

type ListModelsRequestObject

type ListModelsRequestObject struct {
}

type ListModelsResponseObject

type ListModelsResponseObject interface {
	VisitListModelsResponse(w http.ResponseWriter) error
}

type ListModelsdefaultJSONResponse

type ListModelsdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (ListModelsdefaultJSONResponse) VisitListModelsResponse

func (response ListModelsdefaultJSONResponse) VisitListModelsResponse(w http.ResponseWriter) error

type ListPrices200JSONResponse

type ListPrices200JSONResponse PriceList

func (ListPrices200JSONResponse) VisitListPricesResponse

func (response ListPrices200JSONResponse) VisitListPricesResponse(w http.ResponseWriter) error

type ListPricesRequestObject

type ListPricesRequestObject struct {
}

type ListPricesResponseObject

type ListPricesResponseObject interface {
	VisitListPricesResponse(w http.ResponseWriter) error
}

type ListPricesdefaultJSONResponse

type ListPricesdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (ListPricesdefaultJSONResponse) VisitListPricesResponse

func (response ListPricesdefaultJSONResponse) VisitListPricesResponse(w http.ResponseWriter) error

type ListProviders200JSONResponse

type ListProviders200JSONResponse ProviderList

func (ListProviders200JSONResponse) VisitListProvidersResponse

func (response ListProviders200JSONResponse) VisitListProvidersResponse(w http.ResponseWriter) error

type ListProvidersRequestObject

type ListProvidersRequestObject struct {
}

type ListProvidersResponseObject

type ListProvidersResponseObject interface {
	VisitListProvidersResponse(w http.ResponseWriter) error
}

type ListProvidersdefaultJSONResponse

type ListProvidersdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (ListProvidersdefaultJSONResponse) VisitListProvidersResponse

func (response ListProvidersdefaultJSONResponse) VisitListProvidersResponse(w http.ResponseWriter) error

type ListTokens200JSONResponse

type ListTokens200JSONResponse TokenList

func (ListTokens200JSONResponse) VisitListTokensResponse

func (response ListTokens200JSONResponse) VisitListTokensResponse(w http.ResponseWriter) error

type ListTokensRequestObject

type ListTokensRequestObject struct {
}

type ListTokensResponseObject

type ListTokensResponseObject interface {
	VisitListTokensResponse(w http.ResponseWriter) error
}

type ListTokensdefaultJSONResponse

type ListTokensdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (ListTokensdefaultJSONResponse) VisitListTokensResponse

func (response ListTokensdefaultJSONResponse) VisitListTokensResponse(w http.ResponseWriter) error

type McpDataClass

type McpDataClass = []string

McpDataClass The session legs (ADR 0091) the server's results can set: `untrusted_input` (returns text an outsider controls) and `private_data` (returns data the org does not want to leave). A server may carry both; empty carries none. A server nobody classified carries both. Where a call goes is not a server leg: it is the sink class of each tool.

type McpServer

type McpServer struct {
	// AdminDisabled Present while an admin holds the target off (the outward switch). Absent means enabled.
	AdminDisabled *OutwardAdminDisabled `json:"adminDisabled,omitempty"`

	// CaBundle PEM certificates of the one CA that signs this server's certificate. Only this CA is trusted for this server (it replaces the public roots, as curl --cacert does). Public. Absent for the public roots.
	CaBundle *string `json:"caBundle,omitempty"`

	// CodeHostConnectionId The org's code-host connection the server acts through. Absent for none, which makes a code-host tool of the server external-high.
	CodeHostConnectionId *openapi_types.UUID `json:"codeHostConnectionId,omitempty"`
	CreatedAt            time.Time           `json:"createdAt"`
	CredentialHeader     *string             `json:"credentialHeader,omitempty"`

	// CredentialLostAt Set when the credential was lost with the key that encrypted it (`koinon-api keys forget`): the server is not served until the credential is entered again.
	CredentialLostAt *time.Time `json:"credentialLostAt,omitempty"`
	CredentialPrefix *string    `json:"credentialPrefix,omitempty"`

	// DataClass The session legs (ADR 0091) the server's results can set: `untrusted_input` (returns text an
	// outsider controls) and `private_data` (returns data the org does not want to leave). A server
	// may carry both; empty carries none. A server nobody classified carries both. Where a call
	// goes is not a server leg: it is the sink class of each tool.
	DataClass      McpDataClass `json:"dataClass"`
	DisabledReason *string      `json:"disabledReason,omitempty"`

	// HasCredential Whether a credential is stored. The credential itself is never returned.
	HasCredential   bool            `json:"hasCredential"`
	Health          McpServerHealth `json:"health"`
	HealthCheckedAt *time.Time      `json:"healthCheckedAt,omitempty"`

	// HealthReason Why the server is unhealthy.
	HealthReason *string            `json:"healthReason,omitempty"`
	HealthSince  *time.Time         `json:"healthSince,omitempty"`
	Id           openapi_types.UUID `json:"id"`

	// InsecureSkipVerify Present and true when the server's certificate is NOT verified (as curl -k). TLS is used, but the server's identity is not checked and its credential can be sent to an impostor. https only; never with caBundle.
	InsecureSkipVerify *bool `json:"insecureSkipVerify,omitempty"`

	// Kind What the server is for. `other` is the default.
	Kind            McpServerKind `json:"kind"`
	ManagedBySecret *string       `json:"managedBySecret,omitempty"`
	Name            string        `json:"name"`

	// Removed The declaring Secret was deleted; the server is disabled.
	Removed *bool `json:"removed,omitempty"`

	// Source `secret` entries are declared by a Kubernetes Secret and read-only here.
	Source        Source             `json:"source"`
	ToolsSyncedAt *time.Time         `json:"toolsSyncedAt,omitempty"`
	Transport     McpServerTransport `json:"transport"`
	UpdatedAt     time.Time          `json:"updatedAt"`
	Url           string             `json:"url"`
}

McpServer defines model for McpServer.

type McpServerCreate

type McpServerCreate struct {
	// CaBundle PEM certificates of the one CA that signs the server's certificate (an https url only, certificates only, at most 64 KiB). Only this CA is trusted for this server; it replaces the public roots. Omit for the public roots. Refused together with insecureSkipVerify.
	CaBundle *string `json:"caBundle,omitempty"`

	// CredentialHeader Defaults to Authorization when a credential value is given.
	CredentialHeader *string `json:"credentialHeader,omitempty"`

	// CredentialPrefix What precedes the secret in the header value, for example `Bearer `.
	CredentialPrefix *string `json:"credentialPrefix,omitempty"`

	// CredentialValue The secret. Omit for a server that needs none.
	CredentialValue *string `json:"credentialValue,omitempty"`

	// DataClass The session legs (ADR 0091) the server's results can set: `untrusted_input` (returns text an
	// outsider controls) and `private_data` (returns data the org does not want to leave). A server
	// may carry both; empty carries none. A server nobody classified carries both. Where a call
	// goes is not a server leg: it is the sink class of each tool.
	DataClass *McpDataClass `json:"dataClass,omitempty"`

	// InsecureSkipVerify Turns the certificate check off for this server (as curl -k). https only. Refused together with caBundle. Default false.
	InsecureSkipVerify *bool `json:"insecureSkipVerify,omitempty"`

	// Kind What the server is for. `other` is the default.
	Kind *McpServerKind `json:"kind,omitempty"`

	// Name A DNS label of at most 24 characters. The gateway target is `<org slug>-<name>`.
	Name      string                    `json:"name"`
	Transport *McpServerCreateTransport `json:"transport,omitempty"`
	Url       string                    `json:"url"`
}

McpServerCreate defines model for McpServerCreate.

type McpServerCreateTransport

type McpServerCreateTransport string

McpServerCreateTransport defines model for McpServerCreate.Transport.

const (
	McpServerCreateTransportSse            McpServerCreateTransport = "sse"
	McpServerCreateTransportStreamableHttp McpServerCreateTransport = "streamable-http"
)

Defines values for McpServerCreateTransport.

func (McpServerCreateTransport) Valid

func (e McpServerCreateTransport) Valid() bool

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

type McpServerDataClass

type McpServerDataClass struct {
	// CodeHostConnectionId Link the server to one of the org's code-host connections (ADR 0091 decision 3). A code-host
	// tool looks the repository up in that connection's list only. Leave out to unlink. A changed
	// server URL clears the link.
	CodeHostConnectionId *openapi_types.UUID `json:"codeHostConnectionId,omitempty"`

	// DataClass The session legs (ADR 0091) the server's results can set: `untrusted_input` (returns text an
	// outsider controls) and `private_data` (returns data the org does not want to leave). A server
	// may carry both; empty carries none. A server nobody classified carries both. Where a call
	// goes is not a server leg: it is the sink class of each tool.
	DataClass McpDataClass `json:"dataClass"`

	// Kind What the server is for. `other` is the default.
	Kind McpServerKind `json:"kind"`
}

McpServerDataClass defines model for McpServerDataClass.

type McpServerHealth

type McpServerHealth string

McpServerHealth defines model for McpServer.Health.

const (
	Healthy   McpServerHealth = "healthy"
	Unhealthy McpServerHealth = "unhealthy"
	Unknown   McpServerHealth = "unknown"
)

Defines values for McpServerHealth.

func (McpServerHealth) Valid

func (e McpServerHealth) Valid() bool

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

type McpServerKind

type McpServerKind string

McpServerKind What the server is for. `other` is the default.

const (
	Fetch  McpServerKind = "fetch"
	Other  McpServerKind = "other"
	Search McpServerKind = "search"
)

Defines values for McpServerKind.

func (McpServerKind) Valid

func (e McpServerKind) Valid() bool

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

type McpServerList

type McpServerList struct {
	Servers []McpServer `json:"servers"`
}

McpServerList defines model for McpServerList.

type McpServerTransport

type McpServerTransport string

McpServerTransport defines model for McpServer.Transport.

const (
	McpServerTransportSse            McpServerTransport = "sse"
	McpServerTransportStreamableHttp McpServerTransport = "streamable-http"
)

Defines values for McpServerTransport.

func (McpServerTransport) Valid

func (e McpServerTransport) Valid() bool

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

type McpServerUpdate

type McpServerUpdate struct {
	// CaBundle Replaces the server's CA bundle; an empty string goes back to the public roots. Leave out to keep it.
	CaBundle         *string `json:"caBundle,omitempty"`
	CredentialHeader *string `json:"credentialHeader,omitempty"`
	CredentialPrefix *string `json:"credentialPrefix,omitempty"`

	// CredentialValue Replaces the secret. Leave out to keep it while changing the header or prefix.
	CredentialValue *string `json:"credentialValue,omitempty"`

	// InsecureSkipVerify Turns the certificate check off (true) or on (false). Leave out to keep it. https only; refused together with a caBundle.
	InsecureSkipVerify *bool                     `json:"insecureSkipVerify,omitempty"`
	RemoveCredential   *bool                     `json:"removeCredential,omitempty"`
	Transport          *McpServerUpdateTransport `json:"transport,omitempty"`
	Url                *string                   `json:"url,omitempty"`
}

McpServerUpdate defines model for McpServerUpdate.

type McpServerUpdateTransport

type McpServerUpdateTransport string

McpServerUpdateTransport defines model for McpServerUpdate.Transport.

const (
	McpServerUpdateTransportSse            McpServerUpdateTransport = "sse"
	McpServerUpdateTransportStreamableHttp McpServerUpdateTransport = "streamable-http"
)

Defines values for McpServerUpdateTransport.

func (McpServerUpdateTransport) Valid

func (e McpServerUpdateTransport) Valid() bool

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

type McpTool

type McpTool struct {
	// ApprovedHash Hash of the text an admin approved; empty while none did. When `toolHash` differs, the text is pending: the gateway does not serve it until an admin approves it.
	ApprovedHash *string `json:"approvedHash,omitempty"`

	// ContentHash SHA-256 of the sanitised description and input schema as last published.
	ContentHash string `json:"contentHash"`
	Description string `json:"description"`

	// DescriptionCapped The description, or a description in the input schema, was cut to its length cap.
	DescriptionCapped bool `json:"descriptionCapped"`

	// DescriptionCleaned Control, invisible or tag characters were removed, or harness-lookalike tags escaped, in the description or the input schema's strings.
	DescriptionCleaned bool `json:"descriptionCleaned"`

	// DescriptionOriginalLength Length in characters of the description as the server published it. `description` is the sanitised text.
	DescriptionOriginalLength int       `json:"descriptionOriginalLength"`
	FirstSeenAt               time.Time `json:"firstSeenAt"`
	LastSeenAt                time.Time `json:"lastSeenAt"`
	Name                      string    `json:"name"`

	// Present False once the server stopped listing the tool.
	Present bool `json:"present"`

	// ReadOnlyHint The server's own readOnlyHint annotation. A suggestion; an admin decides the tier.
	ReadOnlyHint bool `json:"readOnlyHint"`

	// RequiresTwoApprovers A call in the ask tier needs two approvers.
	RequiresTwoApprovers *bool `json:"requiresTwoApprovers,omitempty"`

	// ReviewReason Set while the tool's description or input schema changed since an admin last reviewed it.
	ReviewReason *string            `json:"reviewReason,omitempty"`
	ServerId     openapi_types.UUID `json:"serverId"`
	Sink         McpToolSink        `json:"sink"`
	Tier         McpToolTier        `json:"tier"`
	TierSetAt    *time.Time         `json:"tierSetAt,omitempty"`
	TierSetBy    *string            `json:"tierSetBy,omitempty"`

	// ToolHash Hash of the tool text the server published last, as the gateway pins it (every member the model sees, sanitised). An approval approves this text and takes this hash. Empty before the first sync that recorded it.
	ToolHash *string `json:"toolHash,omitempty"`

	// ToolJson That text. Shown to an admin before an approval.
	ToolJson *map[string]interface{} `json:"toolJson,omitempty"`

	// Unavailable Why agents are not offered the tool, for example a name too long.
	Unavailable *string `json:"unavailable,omitempty"`
}

McpTool defines model for McpTool.

type McpToolList

type McpToolList struct {
	Tools []McpTool `json:"tools"`
}

McpToolList defines model for McpToolList.

type McpToolReview

type McpToolReview struct {
	// ToolHash As for `McpToolTierUpdate.toolHash`.
	ToolHash *string `json:"toolHash,omitempty"`
}

McpToolReview defines model for McpToolReview.

type McpToolSink

type McpToolSink struct {
	// AddressArgs The arguments that say where a call goes, in the order the derivation reads them: code_host [owner, repo], fetch [url]. Every other argument is payload.
	AddressArgs []string `json:"addressArgs"`

	// Derivation `fixed` (use sinkClass), `code_host` (owner and repo arguments) or `fetch` (the url argument).
	Derivation string `json:"derivation"`

	// ResultPrivateData The tool's results carry data the org does not want to leave. Leave out for the server's own leg.
	ResultPrivateData *bool `json:"resultPrivateData,omitempty"`

	// ResultUntrustedInput The tool's results carry text an outsider controls. Leave out for the server's own leg.
	ResultUntrustedInput *bool `json:"resultUntrustedInput,omitempty"`

	// SinkClass `none`, `internal`, `external-low` or `external-high`. The fixed class of a tool; for a
	// derived tool, the class of a call whose address arguments do not parse (`external-high`).
	SinkClass string `json:"sinkClass"`
}

McpToolSink defines model for McpToolSink.

type McpToolSinkUpdate

type McpToolSinkUpdate struct {
	// ContentHash The `contentHash` of the tool as the caller read it.
	ContentHash string      `json:"contentHash"`
	Sink        McpToolSink `json:"sink"`
}

McpToolSinkUpdate defines model for McpToolSinkUpdate.

type McpToolTier

type McpToolTier string

McpToolTier defines model for McpTool.Tier.

const (
	McpToolTierAsk   McpToolTier = "ask"
	McpToolTierAuto  McpToolTier = "auto"
	McpToolTierNever McpToolTier = "never"
)

Defines values for McpToolTier.

func (McpToolTier) Valid

func (e McpToolTier) Valid() bool

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

type McpToolTierUpdate

type McpToolTierUpdate struct {
	Tier McpToolTierUpdateTier `json:"tier"`

	// ToolHash The `toolHash` of the tool as the caller read it. Setting a tier approves that text. Required while the tool's text is pending; a hash that is not the stored one is refused (409) and nothing changes.
	ToolHash *string `json:"toolHash,omitempty"`
}

McpToolTierUpdate defines model for McpToolTierUpdate.

type McpToolTierUpdateTier

type McpToolTierUpdateTier string

McpToolTierUpdateTier defines model for McpToolTierUpdate.Tier.

const (
	McpToolTierUpdateTierAsk   McpToolTierUpdateTier = "ask"
	McpToolTierUpdateTierAuto  McpToolTierUpdateTier = "auto"
	McpToolTierUpdateTierNever McpToolTierUpdateTier = "never"
)

Defines values for McpToolTierUpdateTier.

func (McpToolTierUpdateTier) Valid

func (e McpToolTierUpdateTier) Valid() bool

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

type McpToolTwoApprovers

type McpToolTwoApprovers struct {
	Required bool `json:"required"`
}

McpToolTwoApprovers defines model for McpToolTwoApprovers.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type Model

type Model struct {
	CreatedAt      time.Time `json:"createdAt"`
	DisabledReason *string   `json:"disabledReason,omitempty"`

	// Format A model's wire format (ADR 0069). The set is open and grows with the formats Koinon supports;
	// today `openai` is chat completions and `anthropic` is the Messages API. A provider's `formats`
	// lists the values it accepts.
	Format ModelFormat `json:"format"`

	// FormatOverridden Whether an admin set the format. Otherwise it follows the default and is re-derived when the default changes.
	FormatOverridden bool `json:"formatOverridden"`

	// Guard The routing guard (ADR 0048), for OpenRouter providers.
	Guard           bool               `json:"guard"`
	Id              openapi_types.UUID `json:"id"`
	ManagedBySecret *string            `json:"managedBySecret,omitempty"`

	// Name The name agents use. The gateway serves it per org as `<org slug>/<name>`.
	Name       string             `json:"name"`
	ProviderId openapi_types.UUID `json:"providerId"`

	// Rates Deprecated and never returned. Setting it on a request answers 400: add a price with
	// `POST /admin/v1/prices` instead.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Rates *Rates `json:"rates,omitempty"`

	// Source `secret` entries are declared by a Kubernetes Secret and read-only here.
	Source    Source    `json:"source"`
	UpdatedAt time.Time `json:"updatedAt"`
}

Model defines model for Model.

type ModelCreate

type ModelCreate struct {
	// Format A `ModelFormat` within what the provider offers. Omit for the default.
	Format     *string            `json:"format,omitempty"`
	Guard      *bool              `json:"guard,omitempty"`
	Name       string             `json:"name"`
	ProviderId openapi_types.UUID `json:"providerId"`

	// Rates Deprecated and never returned. Setting it on a request answers 400: add a price with
	// `POST /admin/v1/prices` instead.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Rates *Rates `json:"rates,omitempty"`
}

ModelCreate defines model for ModelCreate.

type ModelCreated

type ModelCreated struct {
	CreatedAt      time.Time `json:"createdAt"`
	DisabledReason *string   `json:"disabledReason,omitempty"`

	// Format A model's wire format (ADR 0069). The set is open and grows with the formats Koinon supports;
	// today `openai` is chat completions and `anthropic` is the Messages API. A provider's `formats`
	// lists the values it accepts.
	Format ModelFormat `json:"format"`

	// FormatOverridden Whether an admin set the format. Otherwise it follows the default and is re-derived when the default changes.
	FormatOverridden bool `json:"formatOverridden"`

	// Guard The routing guard (ADR 0048), for OpenRouter providers.
	Guard           bool               `json:"guard"`
	Id              openapi_types.UUID `json:"id"`
	ManagedBySecret *string            `json:"managedBySecret,omitempty"`

	// Name The name agents use. The gateway serves it per org as `<org slug>/<name>`.
	Name       string             `json:"name"`
	ProviderId openapi_types.UUID `json:"providerId"`

	// Rates Deprecated and never returned. Setting it on a request answers 400: add a price with
	// `POST /admin/v1/prices` instead.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Rates *Rates `json:"rates,omitempty"`

	// Source `secret` entries are declared by a Kubernetes Secret and read-only here.
	Source    Source    `json:"source"`
	UpdatedAt time.Time `json:"updatedAt"`

	// Warnings Only on this response. For example, the model's price has a cache_read price but its provider format cannot cache, so it runs uncached (ADR 0068).
	Warnings *[]string `json:"warnings,omitempty"`
}

ModelCreated The model just created, with the warnings of the save.

type ModelFormat

type ModelFormat = string

ModelFormat A model's wire format (ADR 0069). The set is open and grows with the formats Koinon supports; today `openai` is chat completions and `anthropic` is the Messages API. A provider's `formats` lists the values it accepts.

type ModelId

type ModelId = openapi_types.UUID

ModelId defines model for modelId.

type ModelList

type ModelList struct {
	Models []Model `json:"models"`
}

ModelList defines model for ModelList.

type ModelUpdate

type ModelUpdate struct {
	// ClearRates Deprecated; setting it answers 400.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	ClearRates *bool `json:"clearRates,omitempty"`

	// Format Overrides the format with a `ModelFormat` within what the provider offers. An empty string goes back to the default.
	Format *string `json:"format,omitempty"`
	Guard  *bool   `json:"guard,omitempty"`

	// Rates Deprecated and never returned. Setting it on a request answers 400: add a price with
	// `POST /admin/v1/prices` instead.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Rates *Rates `json:"rates,omitempty"`
}

ModelUpdate defines model for ModelUpdate.

type OrgBudget

type OrgBudget struct {
	MonthStart time.Time `json:"monthStart"`

	// MonthlyCapUsd Calendar month in UTC. Absent: no cap.
	MonthlyCapUsd *string `json:"monthlyCapUsd,omitempty"`

	// PlatformCeilingUsd Set by a platform admin; absent: off.
	PlatformCeilingUsd *string `json:"platformCeilingUsd,omitempty"`
	SpentThisMonthUsd  string  `json:"spentThisMonthUsd"`
}

OrgBudget defines model for OrgBudget.

type OrgBudgetUpdate

type OrgBudgetUpdate struct {
	// MonthlyCapUsd Decimal with at most 12 fraction digits, above 0 and at most 1000000. Leave out to clear.
	MonthlyCapUsd *string `json:"monthlyCapUsd,omitempty"`
}

OrgBudgetUpdate defines model for OrgBudgetUpdate.

type OutwardAdminDisabled

type OutwardAdminDisabled struct {
	At time.Time `json:"at"`

	// By The actor as the audit log reads it, for example `token <id>` or `secret <name>`.
	By string `json:"by"`

	// Declared True when the declaring Secret says `disabled: true`; the API cannot enable it.
	Declared bool    `json:"declared"`
	Note     *string `json:"note,omitempty"`
}

OutwardAdminDisabled Present while an admin holds the target off (the outward switch). Absent means enabled.

type OutwardTargetDisabled

type OutwardTargetDisabled struct {
	Disabled bool `json:"disabled"`

	// Note Why. Kept while the target is disabled.
	Note *string `json:"note,omitempty"`
}

OutwardTargetDisabled defines model for OutwardTargetDisabled.

type OutwardTargetKind

type OutwardTargetKind string

OutwardTargetKind defines model for OutwardTargetKind.

const (
	OutwardTargetKindConnection       OutwardTargetKind = "connection"
	OutwardTargetKindMcpServer        OutwardTargetKind = "mcp-server"
	OutwardTargetKindModelProvider    OutwardTargetKind = "model-provider"
	OutwardTargetKindTraceDestination OutwardTargetKind = "trace-destination"
)

Defines values for OutwardTargetKind.

func (OutwardTargetKind) Valid

func (e OutwardTargetKind) Valid() bool

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

type OutwardTargetState

type OutwardTargetState struct {
	Disabled   bool       `json:"disabled"`
	DisabledAt *time.Time `json:"disabledAt,omitempty"`

	// DisabledBy The actor as the audit log reads it, for example `token <id>` or `secret <name>`.
	DisabledBy *string            `json:"disabledBy,omitempty"`
	Kind       OutwardTargetKind  `json:"kind"`
	Name       string             `json:"name"`
	Note       *string            `json:"note,omitempty"`
	TargetId   openapi_types.UUID `json:"targetId"`
}

OutwardTargetState defines model for OutwardTargetState.

type PriceChange

type PriceChange struct {
	After     *PriceEntry     `json:"after,omitempty"`
	Before    *PriceEntry     `json:"before,omitempty"`
	Fields    *[]string       `json:"fields,omitempty"`
	Id        string          `json:"id"`
	Kind      PriceChangeKind `json:"kind"`
	ValidFrom string          `json:"validFrom"`
}

PriceChange defines model for PriceChange.

type PriceChangeKind

type PriceChangeKind string

PriceChangeKind defines model for PriceChange.Kind.

const (
	Added   PriceChangeKind = "added"
	Changed PriceChangeKind = "changed"
	Removed PriceChangeKind = "removed"
)

Defines values for PriceChangeKind.

func (PriceChangeKind) Valid

func (e PriceChangeKind) Valid() bool

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

type PriceEntry

type PriceEntry struct {
	HiddenThinking *bool  `json:"hiddenThinking,omitempty"`
	Id             string `json:"id"`

	// Match Exactly one of glob (`*` any characters, `?` one, case-insensitive) and regex (RE2, whole name).
	Match PriceMatch `json:"match"`

	// MaxOutput Largest output in tokens; an aborted response without usage settles at the request max_tokens, or at this when it was not logged.
	MaxOutput *int    `json:"maxOutput,omitempty"`
	Note      *string `json:"note,omitempty"`

	// Prices USD per million tokens as decimal strings with at most 6 fraction digits. A free model needs an explicit "0".
	Prices PriceRates `json:"prices"`

	// Provider Provider type the price applies to, or *.
	Provider string `json:"provider"`

	// Ratio UTF-8 bytes per token, used to estimate usage a provider did not report.
	Ratio  string `json:"ratio"`
	Source struct {
		Accessed string `json:"accessed"`
		Url      string `json:"url"`
	} `json:"source"`
	Tiers              *[]PriceTier        `json:"tiers,omitempty"`
	Tokenizer          PriceEntryTokenizer `json:"tokenizer"`
	ToolOverheadTokens *int                `json:"toolOverheadTokens,omitempty"`

	// ValidFrom Date yyyy-mm-dd (UTC).
	ValidFrom string `json:"validFrom"`
}

PriceEntry defines model for PriceEntry.

type PriceEntryTokenizer

type PriceEntryTokenizer string

PriceEntryTokenizer defines model for PriceEntry.Tokenizer.

const (
	PriceEntryTokenizerBytes              PriceEntryTokenizer = "bytes"
	PriceEntryTokenizerTiktokenCl100kBase PriceEntryTokenizer = "tiktoken:cl100k_base"
	PriceEntryTokenizerTiktokenO200kBase  PriceEntryTokenizer = "tiktoken:o200k_base"
)

Defines values for PriceEntryTokenizer.

func (PriceEntryTokenizer) Valid

func (e PriceEntryTokenizer) Valid() bool

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

type PriceInput

type PriceInput struct {
	HiddenThinking *bool `json:"hiddenThinking,omitempty"`

	// Match Exactly one of glob (`*` any characters, `?` one, case-insensitive) and regex (RE2, whole name).
	Match PriceMatch `json:"match"`

	// MaxOutput Largest output in tokens; an aborted response without usage settles at the request max_tokens, or at this when it was not logged.
	MaxOutput *int `json:"maxOutput,omitempty"`

	// Name Names the price; a new version of the same name replaces it from validFrom on.
	Name string `json:"name"`

	// Prices USD per million tokens as decimal strings with at most 6 fraction digits. A free model needs an explicit "0".
	Prices             PriceRates           `json:"prices"`
	Provider           string               `json:"provider"`
	Ratio              *string              `json:"ratio,omitempty"`
	Tiers              *[]PriceTier         `json:"tiers,omitempty"`
	Tokenizer          *PriceInputTokenizer `json:"tokenizer,omitempty"`
	ToolOverheadTokens *int                 `json:"toolOverheadTokens,omitempty"`

	// ValidFrom Default now.
	ValidFrom *time.Time `json:"validFrom,omitempty"`
}

PriceInput defines model for PriceInput.

type PriceInputTokenizer

type PriceInputTokenizer string

PriceInputTokenizer defines model for PriceInput.Tokenizer.

const (
	PriceInputTokenizerBytes              PriceInputTokenizer = "bytes"
	PriceInputTokenizerTiktokenCl100kBase PriceInputTokenizer = "tiktoken:cl100k_base"
	PriceInputTokenizerTiktokenO200kBase  PriceInputTokenizer = "tiktoken:o200k_base"
)

Defines values for PriceInputTokenizer.

func (PriceInputTokenizer) Valid

func (e PriceInputTokenizer) Valid() bool

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

type PriceList

type PriceList struct {
	Prices []PriceVersion `json:"prices"`
}

PriceList defines model for PriceList.

type PriceMatch

type PriceMatch struct {
	Glob  *string `json:"glob,omitempty"`
	Regex *string `json:"regex,omitempty"`
}

PriceMatch Exactly one of glob (`*` any characters, `?` one, case-insensitive) and regex (RE2, whole name).

type PriceRates

type PriceRates struct {
	CacheRead  *string `json:"cacheRead,omitempty"`
	CacheWrite *string `json:"cacheWrite,omitempty"`
	Input      *string `json:"input,omitempty"`
	Output     *string `json:"output,omitempty"`
	Reasoning  *string `json:"reasoning,omitempty"`
}

PriceRates USD per million tokens as decimal strings with at most 6 fraction digits. A free model needs an explicit "0".

type PriceSaved

type PriceSaved struct {
	CreatedAt time.Time `json:"createdAt"`
	CreatedBy string    `json:"createdBy"`

	// Id The ledger cites it as org#<id>.
	Id openapi_types.UUID `json:"id"`

	// Match Exactly one of glob (`*` any characters, `?` one, case-insensitive) and regex (RE2, whole name).
	Match PriceMatch `json:"match"`
	Name  string     `json:"name"`

	// Prices USD per million tokens as decimal strings with at most 6 fraction digits. A free model needs an explicit "0".
	Prices    PriceRates   `json:"prices"`
	Provider  string       `json:"provider"`
	Ratio     *string      `json:"ratio,omitempty"`
	RetiredAt *time.Time   `json:"retiredAt,omitempty"`
	Tiers     *[]PriceTier `json:"tiers,omitempty"`
	Tokenizer *string      `json:"tokenizer,omitempty"`
	ValidFrom time.Time    `json:"validFrom"`

	// Warnings Only on this response. For example, a cache_read price whose provider format cannot cache runs uncached (ADR 0068).
	Warnings *[]string `json:"warnings,omitempty"`
}

PriceSaved The price version just saved, with the warnings of the save.

type PriceTier

type PriceTier struct {
	// ContextOver The tier applies when the input side of a request (input, cache reads and writes) exceeds this many tokens; its rates replace the base rates they name.
	ContextOver int64 `json:"contextOver"`

	// Prices USD per million tokens as decimal strings with at most 6 fraction digits. A free model needs an explicit "0".
	Prices PriceRates `json:"prices"`
}

PriceTier defines model for PriceTier.

type PriceVersion

type PriceVersion struct {
	CreatedAt time.Time `json:"createdAt"`
	CreatedBy string    `json:"createdBy"`

	// Id The ledger cites it as org#<id>.
	Id openapi_types.UUID `json:"id"`

	// Match Exactly one of glob (`*` any characters, `?` one, case-insensitive) and regex (RE2, whole name).
	Match PriceMatch `json:"match"`
	Name  string     `json:"name"`

	// Prices USD per million tokens as decimal strings with at most 6 fraction digits. A free model needs an explicit "0".
	Prices    PriceRates   `json:"prices"`
	Provider  string       `json:"provider"`
	Ratio     *string      `json:"ratio,omitempty"`
	RetiredAt *time.Time   `json:"retiredAt,omitempty"`
	Tiers     *[]PriceTier `json:"tiers,omitempty"`
	Tokenizer *string      `json:"tokenizer,omitempty"`
	ValidFrom time.Time    `json:"validFrom"`
}

PriceVersion defines model for PriceVersion.

type Provider

type Provider struct {
	// AdminDisabled Present while an admin holds the target off (the outward switch). Absent means enabled.
	AdminDisabled *OutwardAdminDisabled `json:"adminDisabled,omitempty"`

	// AnthropicWorkspaceId The Anthropic workspace the gateway names for this provider's models. Only for type `anthropic`; unset when not given.
	AnthropicWorkspaceId *string `json:"anthropicWorkspaceId,omitempty"`

	// CostKeyLostAt Set when the cost API key was lost with the key that encrypted it; enter it again.
	CostKeyLostAt *time.Time `json:"costKeyLostAt,omitempty"`

	// CostScope The workspace, project or API key whose cost the daily reconciliation compares with the ledger. Unset without a cost API key.
	CostScope *string   `json:"costScope,omitempty"`
	CreatedAt time.Time `json:"createdAt"`

	// CredentialLostAt Set when the API key was lost with the key that encrypted it (`koinon-api keys forget`): the provider is not served until the key is entered again.
	CredentialLostAt *time.Time `json:"credentialLostAt,omitempty"`

	// DisabledReason Set while a declared provider of the same name shadows this one; it is not served.
	DisabledReason *string `json:"disabledReason,omitempty"`

	// EchoCheck The latest echo check of a provider.
	EchoCheck *EchoCheck `json:"echoCheck,omitempty"`

	// Formats The model formats the provider's type offers, preferred first (ADR 0069).
	Formats []ModelFormat `json:"formats"`

	// HasCostKey Whether a cost API key is stored. The key itself is never returned.
	HasCostKey bool `json:"hasCostKey"`

	// HasKey Whether an API key is stored. The key itself is never returned.
	HasKey bool               `json:"hasKey"`
	Id     openapi_types.UUID `json:"id"`

	// ManagedBySecret The declaring Secret, for source `secret`.
	ManagedBySecret *string `json:"managedBySecret,omitempty"`
	Name            string  `json:"name"`

	// ServingDetail What the gateway or the reconciler said about the failure, for an admin; never a key.
	ServingDetail *string `json:"servingDetail,omitempty"`

	// ServingReason Set with `servingState` `failed`; one of `no key`, `gateway rejected config`, `upstream unreachable`, `unknown`.
	ServingReason *string `json:"servingReason,omitempty"`

	// ServingState Whether the gateway serves the provider, from what the reconciler recorded (it never reads the gateway). `saved`: not served yet, the reconciler applies it on its next pass. `serving`: every enabled model is served. `failed`: the gateway does not serve it and `servingReason` says why. Unset when the provider is disabled, removed or has no enabled model.
	ServingState *ProviderServingState `json:"servingState,omitempty"`

	// Source `secret` entries are declared by a Kubernetes Secret and read-only here.
	Source Source `json:"source"`

	// Type The upstream's provider type (agentgateway providerOverride).
	Type      string    `json:"type"`
	UpdatedAt time.Time `json:"updatedAt"`
	Url       string    `json:"url"`
}

Provider defines model for Provider.

type ProviderCreate

type ProviderCreate struct {
	// AnthropicWorkspaceId Only for type `anthropic`.
	AnthropicWorkspaceId *string `json:"anthropicWorkspaceId,omitempty"`

	// ApiKey Omit for keyless upstreams such as Ollama.
	ApiKey *string `json:"apiKey,omitempty"`

	// CostApiKey An admin key with which the daily reconciliation reads the provider's cost API. Write-only, never returned. Only for `anthropic` and `openai` providers at their own API URL; needs `costScope`.
	CostApiKey *string `json:"costApiKey,omitempty"`

	// CostScope The part of the account whose cost is this provider's: the Anthropic workspace ID (`wrkspc_...`) or API key ID (`apikey_...`), or the OpenAI project ID (`proj_...`) or API key ID (`key_...`).
	CostScope *string `json:"costScope,omitempty"`
	Name      string  `json:"name"`
	Type      string  `json:"type"`
	Url       string  `json:"url"`
}

ProviderCreate defines model for ProviderCreate.

type ProviderId

type ProviderId = openapi_types.UUID

ProviderId defines model for providerId.

type ProviderList

type ProviderList struct {
	Providers []Provider `json:"providers"`
}

ProviderList defines model for ProviderList.

type ProviderServingState

type ProviderServingState string

ProviderServingState Whether the gateway serves the provider, from what the reconciler recorded (it never reads the gateway). `saved`: not served yet, the reconciler applies it on its next pass. `serving`: every enabled model is served. `failed`: the gateway does not serve it and `servingReason` says why. Unset when the provider is disabled, removed or has no enabled model.

const (
	Failed  ProviderServingState = "failed"
	Saved   ProviderServingState = "saved"
	Serving ProviderServingState = "serving"
)

Defines values for ProviderServingState.

func (ProviderServingState) Valid

func (e ProviderServingState) Valid() bool

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

type ProviderUpdate

type ProviderUpdate struct {
	// AnthropicWorkspaceId Replaces the workspace ID; an empty string removes it. Only for type `anthropic`.
	AnthropicWorkspaceId *string `json:"anthropicWorkspaceId,omitempty"`

	// ApiKey Replaces the key; an empty string removes it.
	ApiKey *string `json:"apiKey,omitempty"`

	// CostApiKey Replaces the cost API key; an empty string removes it and its scope. Write-only, never returned. Only for `anthropic` and `openai` providers at their own API URL.
	CostApiKey *string `json:"costApiKey,omitempty"`

	// CostScope Replaces the cost scope. A cost API key needs one.
	CostScope *string `json:"costScope,omitempty"`
	Type      *string `json:"type,omitempty"`
	Url       *string `json:"url,omitempty"`
}

ProviderUpdate defines model for ProviderUpdate.

type Rates deprecated

type Rates struct {
	CacheRead *string `json:"cacheRead,omitempty"`
	Input     string  `json:"input"`
	Output    string  `json:"output"`
}

Rates Deprecated and never returned. Setting it on a request answers 400: add a price with `POST /admin/v1/prices` instead.

Deprecated: this type has been marked as deprecated upstream, but no `x-deprecated-reason` was set

type RemoveFetchTrustedHost200JSONResponse

type RemoveFetchTrustedHost200JSONResponse LeakGuard

func (RemoveFetchTrustedHost200JSONResponse) VisitRemoveFetchTrustedHostResponse

func (response RemoveFetchTrustedHost200JSONResponse) VisitRemoveFetchTrustedHostResponse(w http.ResponseWriter) error

type RemoveFetchTrustedHostRequestObject

type RemoveFetchTrustedHostRequestObject struct {
	Host string `json:"host"`
}

type RemoveFetchTrustedHostResponseObject

type RemoveFetchTrustedHostResponseObject interface {
	VisitRemoveFetchTrustedHostResponse(w http.ResponseWriter) error
}

type RemoveFetchTrustedHostdefaultJSONResponse

type RemoveFetchTrustedHostdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (RemoveFetchTrustedHostdefaultJSONResponse) VisitRemoveFetchTrustedHostResponse

func (response RemoveFetchTrustedHostdefaultJSONResponse) VisitRemoveFetchTrustedHostResponse(w http.ResponseWriter) error

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type RestoreStatus

type RestoreStatus map[string]interface{}

RestoreStatus The restore status report; its sections are described on the operation.

type RetirePrice204Response

type RetirePrice204Response struct {
}

func (RetirePrice204Response) VisitRetirePriceResponse

func (response RetirePrice204Response) VisitRetirePriceResponse(w http.ResponseWriter) error

type RetirePriceRequestObject

type RetirePriceRequestObject struct {
	Name string `json:"name"`
}

type RetirePriceResponseObject

type RetirePriceResponseObject interface {
	VisitRetirePriceResponse(w http.ResponseWriter) error
}

type RetirePricedefaultJSONResponse

type RetirePricedefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (RetirePricedefaultJSONResponse) VisitRetirePriceResponse

func (response RetirePricedefaultJSONResponse) VisitRetirePriceResponse(w http.ResponseWriter) error

type RevokeToken204Response

type RevokeToken204Response struct {
}

func (RevokeToken204Response) VisitRevokeTokenResponse

func (response RevokeToken204Response) VisitRevokeTokenResponse(w http.ResponseWriter) error

type RevokeTokenRequestObject

type RevokeTokenRequestObject struct {
	TokenId TokenId `json:"tokenId"`
}

type RevokeTokenResponseObject

type RevokeTokenResponseObject interface {
	VisitRevokeTokenResponse(w http.ResponseWriter) error
}

type RevokeTokendefaultJSONResponse

type RevokeTokendefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (RevokeTokendefaultJSONResponse) VisitRevokeTokenResponse

func (response RevokeTokendefaultJSONResponse) VisitRevokeTokenResponse(w http.ResponseWriter) error

type Role

type Role string

Role defines model for Role.

const (
	Admin Role = "admin"
	Owner Role = "owner"
)

Defines values for Role.

func (Role) Valid

func (e Role) Valid() bool

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

type RunAgentTrigger202JSONResponse

type RunAgentTrigger202JSONResponse TriggerRun

func (RunAgentTrigger202JSONResponse) VisitRunAgentTriggerResponse

func (response RunAgentTrigger202JSONResponse) VisitRunAgentTriggerResponse(w http.ResponseWriter) error

type RunAgentTriggerRequestObject

type RunAgentTriggerRequestObject struct {
	AgentId   openapi_types.UUID `json:"agentId"`
	TriggerId string             `json:"triggerId"`
}

type RunAgentTriggerResponseObject

type RunAgentTriggerResponseObject interface {
	VisitRunAgentTriggerResponse(w http.ResponseWriter) error
}

type RunAgentTriggerdefaultJSONResponse

type RunAgentTriggerdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (RunAgentTriggerdefaultJSONResponse) VisitRunAgentTriggerResponse

func (response RunAgentTriggerdefaultJSONResponse) VisitRunAgentTriggerResponse(w http.ResponseWriter) error

type RunContentRetention

type RunContentRetention struct {
	Days        int `json:"days"`
	DefaultDays int `json:"defaultDays"`
	MaxDays     int `json:"maxDays"`
	MinDays     int `json:"minDays"`
}

RunContentRetention Once a finished run is older than `days`, the purge job blanks the payload of its content events (messages, thoughts and tool calls) and strips the text from prompt, permission and refusal events, whose state fields stay. Other events, the run's status, traces and the spend ledger stay.

type RunContentRetentionSettings

type RunContentRetentionSettings struct {
	// Days Days to keep a finished run's content. Leave out for the default (30).
	Days *int `json:"days,omitempty"`
}

RunContentRetentionSettings defines model for RunContentRetentionSettings.

type ServeMux

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

ServeMux is an abstraction of http.ServeMux.

type Server

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

Server implements the admin API.

func New

func New(pool *pgxpool.Pool, c *catalog.Service, t *tokens.Service, log *slog.Logger, src pricing.ListSource) *Server

New returns a Server.

func (*Server) AcknowledgeMcpToolReview

AcknowledgeMcpToolReview implements StrictServerInterface.

func (*Server) AddFetchTrustedHost

AddFetchTrustedHost implements StrictServerInterface.

func (*Server) CheckProviderEcho

CheckProviderEcho implements StrictServerInterface.

func (*Server) CreateMcpServer

CreateMcpServer implements StrictServerInterface.

func (*Server) CreateModel

CreateModel implements StrictServerInterface.

func (*Server) CreateProvider

CreateProvider implements StrictServerInterface.

func (*Server) CreateToken

CreateToken implements StrictServerInterface. The new token carries at most the calling token's role.

func (*Server) DeleteMcpServer

DeleteMcpServer implements StrictServerInterface.

func (*Server) DeleteModel

DeleteModel implements StrictServerInterface.

func (*Server) DeleteProvider

DeleteProvider implements StrictServerInterface.

func (*Server) ExportAudit

ExportAudit implements StrictServerInterface: GET /audit/export (ADR 0100 decision 5). The scope rules are those of ListAuditEvents: org scope is the token's own org and never another; install scope needs a token whose root user is a platform admin (installAuditDenied, the check the install read uses). The authorization runs before the first byte; the chain is then streamed through a pipe (audit.Export pages through it), so a long chain is never held in memory.

func (*Server) Gate

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

Gate wraps next with the bearer-token check of the admin API: the same token lookup, failure rate limit and audit event per call. Another surface that takes org API tokens (the A2A edge, ADR 0123) mounts behind it, so one gate decides who is a caller.

func (*Server) GetAgentBudget

GetAgentBudget implements StrictServerInterface.

func (*Server) GetAgentMcpServers

GetAgentMcpServers implements StrictServerInterface.

func (*Server) GetAgentModel

GetAgentModel implements StrictServerInterface.

func (*Server) GetBudget

GetBudget implements StrictServerInterface.

func (*Server) GetDefaultModel

GetDefaultModel implements StrictServerInterface.

func (*Server) GetDefaultPriceChanges

GetDefaultPriceChanges implements StrictServerInterface.

func (*Server) GetDefaultPrices

GetDefaultPrices implements StrictServerInterface.

func (*Server) GetHomeBackupRetention

GetHomeBackupRetention implements StrictServerInterface.

func (*Server) GetLeakGuard

GetLeakGuard implements StrictServerInterface.

func (*Server) GetMcpServer

GetMcpServer implements StrictServerInterface.

func (*Server) GetModel

GetModel implements StrictServerInterface.

func (*Server) GetProvider

GetProvider implements StrictServerInterface.

func (*Server) GetRestoreStatus

GetRestoreStatus implements StrictServerInterface. It needs a token whose root user is a platform admin, checked on every request, the rule of the install audit chain.

func (*Server) GetRunContentRetention

GetRunContentRetention implements StrictServerInterface.

func (*Server) GetSpendReport

GetSpendReport implements StrictServerInterface.

func (*Server) ListAuditEvents

ListAuditEvents implements StrictServerInterface.

func (*Server) ListFlaggedPrices

ListFlaggedPrices implements StrictServerInterface.

func (*Server) ListMcpServers

ListMcpServers implements StrictServerInterface.

func (*Server) ListMcpTools

ListMcpTools implements StrictServerInterface.

func (*Server) ListModels

ListModels implements StrictServerInterface.

func (*Server) ListPrices

ListPrices implements StrictServerInterface.

func (*Server) ListProviders

ListProviders implements StrictServerInterface.

func (*Server) ListTokens

ListTokens implements StrictServerInterface.

func (*Server) Mount

func (s *Server) Mount(mux *http.ServeMux)

Mount registers the API on mux under BasePath.

func (*Server) RemoveFetchTrustedHost

RemoveFetchTrustedHost implements StrictServerInterface.

func (*Server) RetirePrice

RetirePrice implements StrictServerInterface.

func (*Server) RevokeToken

RevokeToken implements StrictServerInterface.

func (*Server) RunAgentTrigger

RunAgentTrigger implements StrictServerInterface.

func (*Server) SetAgentBudget

SetAgentBudget implements StrictServerInterface.

func (*Server) SetAgentMcpServers

SetAgentMcpServers implements StrictServerInterface.

func (*Server) SetAgentModel

SetAgentModel implements StrictServerInterface.

func (*Server) SetAgentThinking

SetAgentThinking implements StrictServerInterface.

func (*Server) SetBudget

SetBudget implements StrictServerInterface.

func (*Server) SetDefaultModel

SetDefaultModel implements StrictServerInterface.

func (*Server) SetHomeBackupRetention

SetHomeBackupRetention implements StrictServerInterface.

func (*Server) SetLeakGuard

SetLeakGuard implements StrictServerInterface.

func (*Server) SetMcpServerDataClass

SetMcpServerDataClass implements StrictServerInterface.

func (*Server) SetMcpToolSink

SetMcpToolSink implements StrictServerInterface.

func (*Server) SetMcpToolTier

SetMcpToolTier implements StrictServerInterface.

func (*Server) SetMcpToolTwoApprovers

SetMcpToolTwoApprovers implements StrictServerInterface.

func (*Server) SetOutwardTargetDisabled

SetOutwardTargetDisabled implements StrictServerInterface. The token's org owns the target; the platform trace destination is not reachable here (it needs a platform admin signed in to the UI API).

func (*Server) SetPrice

SetPrice implements StrictServerInterface.

func (*Server) SetRunContentRetention

SetRunContentRetention implements StrictServerInterface.

func (*Server) UpdateMcpServer

UpdateMcpServer implements StrictServerInterface.

func (*Server) UpdateModel

UpdateModel implements StrictServerInterface.

func (*Server) UpdateProvider

UpdateProvider implements StrictServerInterface.

func (*Server) WithMCP

func (s *Server) WithMCP(m *mcpservers.Service) *Server

WithMCP sets the service behind the remote MCP server endpoints (plan item MC1). Without it they answer 503.

func (*Server) WithModelCheck

func (s *Server) WithModelCheck(m *modelcheck.Service) *Server

WithModelCheck sets the provider echo check. Without it the check answers 503.

func (*Server) WithOutward

func (s *Server) WithOutward(o *outward.Service) *Server

WithOutward sets the service behind the outward switch (ADR 0110 decision 5); koinon-api passes the one that knows the restore hold.

func (*Server) WithRestoreStatus

func (s *Server) WithRestoreStatus(f func(ctx context.Context) (any, error)) *Server

WithRestoreStatus sets the report behind GET /restore/status (ADR 0110 decision 7); koinon-api passes restorestatus.Build with this install's mark and the importer's plan.

func (*Server) WithTriggers

func (s *Server) WithTriggers(r TriggerRunner) *Server

WithTriggers sets what fires a schedule trigger now. Without it run-now answers 503.

type ServerId

type ServerId = openapi_types.UUID

ServerId defines model for serverId.

type ServerInterface

type ServerInterface interface {
	// GetAgentBudget An agent's daily limit (UTC day) and today's spend.
	// (GET /agents/{agentId}/budget)
	GetAgentBudget(w http.ResponseWriter, r *http.Request, agentId openapi_types.UUID)
	// SetAgentBudget Set an agent's daily limit. A template's spendUSD is only the default for a new agent.
	// (PUT /agents/{agentId}/budget)
	SetAgentBudget(w http.ResponseWriter, r *http.Request, agentId openapi_types.UUID)
	// GetAgentMcpServers The servers an agent may use.
	// (GET /agents/{agentId}/mcp-servers)
	GetAgentMcpServers(w http.ResponseWriter, r *http.Request, agentId openapi_types.UUID)
	// SetAgentMcpServers Replace the servers an agent may use, each optionally narrowed to some tools. Tools are
	// offered by tier; a tool the server adds later enters the ask tier for an agent that allows the
	// whole server.
	// (PUT /agents/{agentId}/mcp-servers)
	SetAgentMcpServers(w http.ResponseWriter, r *http.Request, agentId openapi_types.UUID)
	// GetAgentModel The model an agent's next run uses, and where that choice comes from.
	// (GET /agents/{agentId}/model)
	GetAgentModel(w http.ResponseWriter, r *http.Request, agentId openapi_types.UUID)
	// SetAgentModel Set an agent's model, or clear it with `default`.
	// (PUT /agents/{agentId}/model)
	SetAgentModel(w http.ResponseWriter, r *http.Request, agentId openapi_types.UUID)
	// SetAgentThinking Turn an agent's thinking on or off, or clear the setting.
	// (PUT /agents/{agentId}/thinking)
	SetAgentThinking(w http.ResponseWriter, r *http.Request, agentId openapi_types.UUID)
	// RunAgentTrigger Fire a schedule trigger now ("run now").
	// (POST /agents/{agentId}/triggers/{triggerId}/run)
	RunAgentTrigger(w http.ResponseWriter, r *http.Request, agentId openapi_types.UUID, triggerId string)
	// ListAuditEvents Read the org's audit log, newest first.
	// (GET /audit)
	ListAuditEvents(w http.ResponseWriter, r *http.Request, params ListAuditEventsParams)
	// ExportAudit Export an audit chain as JSON lines, verifiable off the cluster.
	// (GET /audit/export)
	ExportAudit(w http.ResponseWriter, r *http.Request, params ExportAuditParams)
	// GetBudget The org's monthly cap (calendar month, UTC), its platform ceiling and this month's spend.
	// (GET /budget)
	GetBudget(w http.ResponseWriter, r *http.Request)
	// SetBudget Set the org's monthly cap, or clear it by leaving `monthlyCapUsd` out.
	// (PUT /budget)
	SetBudget(w http.ResponseWriter, r *http.Request)
	// GetDefaultModel The org's default model, which agents without a model setting run on.
	// (GET /default-model)
	GetDefaultModel(w http.ResponseWriter, r *http.Request)
	// SetDefaultModel Set the org's default model, or clear it by leaving `model` out. Audited.
	// (PUT /default-model)
	SetDefaultModel(w http.ResponseWriter, r *http.Request)
	// GetHomeBackupRetention How long an old home backup repository is kept after a key change (issue
	// (GET /home-backup-retention)
	GetHomeBackupRetention(w http.ResponseWriter, r *http.Request)
	// SetHomeBackupRetention Set the retention in days, or return it to the default (7) by leaving `days` out. Audited.
	// (PUT /home-backup-retention)
	SetHomeBackupRetention(w http.ResponseWriter, r *http.Request)
	// GetLeakGuard The org's leak-guard settings, with defaults filled in, and its fetch-trusted host list.
	// (GET /leak-guard)
	GetLeakGuard(w http.ResponseWriter, r *http.Request)
	// SetLeakGuard Set the match threshold, or return it to the default by leaving `matchThreshold` out. Audited.
	// (PUT /leak-guard)
	SetLeakGuard(w http.ResponseWriter, r *http.Request)
	// AddFetchTrustedHost Put a host on the fetch-trusted list, which the automatic URL rule exempts. Audited.
	// (POST /leak-guard/trusted-hosts)
	AddFetchTrustedHost(w http.ResponseWriter, r *http.Request)
	// RemoveFetchTrustedHost Take a host off the fetch-trusted list. Audited.
	// (DELETE /leak-guard/trusted-hosts/{host})
	RemoveFetchTrustedHost(w http.ResponseWriter, r *http.Request, host string)
	// ListMcpServers List the org's remote MCP servers, entered and declared, with their health.
	// (GET /mcp-servers)
	ListMcpServers(w http.ResponseWriter, r *http.Request)
	// CreateMcpServer Add a remote MCP server. A server that asks each user to sign in with OAuth is refused (planned
	// for v0.2).
	// (POST /mcp-servers)
	CreateMcpServer(w http.ResponseWriter, r *http.Request)
	// DeleteMcpServer Delete a server, its tools and the agents' allowances of it. Declared servers answer 409.
	// (DELETE /mcp-servers/{serverId})
	DeleteMcpServer(w http.ResponseWriter, r *http.Request, serverId ServerId)
	// GetMcpServer Get a server.
	// (GET /mcp-servers/{serverId})
	GetMcpServer(w http.ResponseWriter, r *http.Request, serverId ServerId)
	// UpdateMcpServer Change a server's URL, transport or credential. Declared servers answer 409.
	// (PATCH /mcp-servers/{serverId})
	UpdateMcpServer(w http.ResponseWriter, r *http.Request, serverId ServerId)
	// SetMcpServerDataClass Set what a server exposes, its kind and the legs of the leak guard it carries. Audited.
	// (PUT /mcp-servers/{serverId}/data-class)
	SetMcpServerDataClass(w http.ResponseWriter, r *http.Request, serverId ServerId)
	// ListMcpTools The server's tools with their tiers and review flags.
	// (GET /mcp-servers/{serverId}/tools)
	ListMcpTools(w http.ResponseWriter, r *http.Request, serverId ServerId)
	// AcknowledgeMcpToolReview Mark a changed tool as reviewed without changing its tier. Approves the tool text `toolHash` names.
	// (POST /mcp-servers/{serverId}/tools/{toolName}/review)
	AcknowledgeMcpToolReview(w http.ResponseWriter, r *http.Request, serverId ServerId, toolName ToolName)
	// SetMcpToolSink Declare a tool's sink class, its address arguments and what its results carry. Audited.
	// (PUT /mcp-servers/{serverId}/tools/{toolName}/sink)
	SetMcpToolSink(w http.ResponseWriter, r *http.Request, serverId ServerId, toolName ToolName)
	// SetMcpToolTier Move a tool to a tier: `ask` (a human approves each call), `auto` (the agent calls it) or
	// `never`. Works on declared servers too. Clears the tool's review flag.
	// (PUT /mcp-servers/{serverId}/tools/{toolName}/tier)
	SetMcpToolTier(w http.ResponseWriter, r *http.Request, serverId ServerId, toolName ToolName)
	// SetMcpToolTwoApprovers Require two approvers for calls to a tool in the ask tier: distinct admins or owners, neither the
	// ticket's creator. Off by default.
	// (PUT /mcp-servers/{serverId}/tools/{toolName}/two-approvers)
	SetMcpToolTwoApprovers(w http.ResponseWriter, r *http.Request, serverId ServerId, toolName ToolName)
	// ListModels List the org's models, entered and declared.
	// (GET /models)
	ListModels(w http.ResponseWriter, r *http.Request)
	// CreateModel Add a model to a provider. Its price is an org price or a default one.
	// (POST /models)
	CreateModel(w http.ResponseWriter, r *http.Request)
	// DeleteModel Delete a model. Declared models answer 409.
	// (DELETE /models/{modelId})
	DeleteModel(w http.ResponseWriter, r *http.Request, modelId ModelId)
	// GetModel Get a model.
	// (GET /models/{modelId})
	GetModel(w http.ResponseWriter, r *http.Request, modelId ModelId)
	// UpdateModel Change a model's routing guard. Declared models answer 409.
	// (PATCH /models/{modelId})
	UpdateModel(w http.ResponseWriter, r *http.Request, modelId ModelId)
	// SetOutwardTargetDisabled Switch one outward target off or on. Audited as outward.disable or outward.enable.
	// (PUT /outward-targets/{kind}/{targetId}/disabled)
	SetOutwardTargetDisabled(w http.ResponseWriter, r *http.Request, kind OutwardTargetKind, targetId openapi_types.UUID)
	// ListPrices List the org's own prices, every version, newest first per name.
	// (GET /prices)
	ListPrices(w http.ResponseWriter, r *http.Request)
	// SetPrice Add a version of a named price. Earlier versions never change.
	// (POST /prices)
	SetPrice(w http.ResponseWriter, r *http.Request)
	// GetDefaultPrices The default price list this installation runs and the versions before it.
	// (GET /prices/defaults)
	GetDefaultPrices(w http.ResponseWriter, r *http.Request)
	// GetDefaultPriceChanges What changed in the default price list between two versions (after an upgrade).
	// (GET /prices/defaults/changes)
	GetDefaultPriceChanges(w http.ResponseWriter, r *http.Request, params GetDefaultPriceChangesParams)
	// ListFlaggedPrices Price entries whose recomputed cost differs from the gateway's by more than 1%.
	// (GET /prices/flagged)
	ListFlaggedPrices(w http.ResponseWriter, r *http.Request, params ListFlaggedPricesParams)
	// RetirePrice End a named price now. Its versions stay for the ledger entries that cite them.
	// (DELETE /prices/{name})
	RetirePrice(w http.ResponseWriter, r *http.Request, name string)
	// ListProviders List the org's providers, entered and declared.
	// (GET /providers)
	ListProviders(w http.ResponseWriter, r *http.Request)
	// CreateProvider Add a provider.
	// (POST /providers)
	CreateProvider(w http.ResponseWriter, r *http.Request)
	// DeleteProvider Delete a provider and its models. Declared providers answer 409.
	// (DELETE /providers/{providerId})
	DeleteProvider(w http.ResponseWriter, r *http.Request, providerId ProviderId)
	// GetProvider Get a provider.
	// (GET /providers/{providerId})
	GetProvider(w http.ResponseWriter, r *http.Request, providerId ProviderId)
	// UpdateProvider Change a provider's type, URL or key. Declared providers answer 409.
	// (PATCH /providers/{providerId})
	UpdateProvider(w http.ResponseWriter, r *http.Request, providerId ProviderId)
	// CheckProviderEcho Check whether the provider changes the text it is sent.
	// (POST /providers/{providerId}/echo-check)
	CheckProviderEcho(w http.ResponseWriter, r *http.Request, providerId ProviderId)
	// GetRestoreStatus What a restored copy would do outward and what its release starts (platform admin).
	// (GET /restore/status)
	GetRestoreStatus(w http.ResponseWriter, r *http.Request)
	// GetRunContentRetention How long a finished run's stored content is kept (issue
	// (GET /run-content-retention)
	GetRunContentRetention(w http.ResponseWriter, r *http.Request)
	// SetRunContentRetention Set the retention in days, or return it to the default (30) by leaving `days` out. Audited.
	// (PUT /run-content-retention)
	SetRunContentRetention(w http.ResponseWriter, r *http.Request)
	// GetSpendReport Spend per model, with estimated usage shown apart from reported usage.
	// (GET /spend)
	GetSpendReport(w http.ResponseWriter, r *http.Request, params GetSpendReportParams)
	// ListTokens List the org's API tokens, newest first.
	// (GET /tokens)
	ListTokens(w http.ResponseWriter, r *http.Request)
	// CreateToken Create an API token. The secret is shown once.
	// (POST /tokens)
	CreateToken(w http.ResponseWriter, r *http.Request)
	// RevokeToken Revoke a token. Revoking twice is fine.
	// (DELETE /tokens/{tokenId})
	RevokeToken(w http.ResponseWriter, r *http.Request, tokenId TokenId)
}

ServerInterface represents all server handlers.

func NewStrictHandler

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

func NewStrictHandlerWithOptions

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) AcknowledgeMcpToolReview

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

AcknowledgeMcpToolReview operation middleware

func (*ServerInterfaceWrapper) AddFetchTrustedHost

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

AddFetchTrustedHost operation middleware

func (*ServerInterfaceWrapper) CheckProviderEcho

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

CheckProviderEcho operation middleware

func (*ServerInterfaceWrapper) CreateMcpServer

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

CreateMcpServer operation middleware

func (*ServerInterfaceWrapper) CreateModel

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

CreateModel operation middleware

func (*ServerInterfaceWrapper) CreateProvider

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

CreateProvider operation middleware

func (*ServerInterfaceWrapper) CreateToken

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

CreateToken operation middleware

func (*ServerInterfaceWrapper) DeleteMcpServer

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

DeleteMcpServer operation middleware

func (*ServerInterfaceWrapper) DeleteModel

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

DeleteModel operation middleware

func (*ServerInterfaceWrapper) DeleteProvider

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

DeleteProvider operation middleware

func (*ServerInterfaceWrapper) ExportAudit

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

ExportAudit operation middleware

func (*ServerInterfaceWrapper) GetAgentBudget

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

GetAgentBudget operation middleware

func (*ServerInterfaceWrapper) GetAgentMcpServers

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

GetAgentMcpServers operation middleware

func (*ServerInterfaceWrapper) GetAgentModel

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

GetAgentModel operation middleware

func (*ServerInterfaceWrapper) GetBudget

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

GetBudget operation middleware

func (*ServerInterfaceWrapper) GetDefaultModel

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

GetDefaultModel operation middleware

func (*ServerInterfaceWrapper) GetDefaultPriceChanges

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

GetDefaultPriceChanges operation middleware

func (*ServerInterfaceWrapper) GetDefaultPrices

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

GetDefaultPrices operation middleware

func (*ServerInterfaceWrapper) GetHomeBackupRetention

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

GetHomeBackupRetention operation middleware

func (*ServerInterfaceWrapper) GetLeakGuard

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

GetLeakGuard operation middleware

func (*ServerInterfaceWrapper) GetMcpServer

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

GetMcpServer operation middleware

func (*ServerInterfaceWrapper) GetModel

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

GetModel operation middleware

func (*ServerInterfaceWrapper) GetProvider

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

GetProvider operation middleware

func (*ServerInterfaceWrapper) GetRestoreStatus

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

GetRestoreStatus operation middleware

func (*ServerInterfaceWrapper) GetRunContentRetention

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

GetRunContentRetention operation middleware

func (*ServerInterfaceWrapper) GetSpendReport

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

GetSpendReport operation middleware

func (*ServerInterfaceWrapper) ListAuditEvents

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

ListAuditEvents operation middleware

func (*ServerInterfaceWrapper) ListFlaggedPrices

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

ListFlaggedPrices operation middleware

func (*ServerInterfaceWrapper) ListMcpServers

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

ListMcpServers operation middleware

func (*ServerInterfaceWrapper) ListMcpTools

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

ListMcpTools operation middleware

func (*ServerInterfaceWrapper) ListModels

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

ListModels operation middleware

func (*ServerInterfaceWrapper) ListPrices

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

ListPrices operation middleware

func (*ServerInterfaceWrapper) ListProviders

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

ListProviders operation middleware

func (*ServerInterfaceWrapper) ListTokens

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

ListTokens operation middleware

func (*ServerInterfaceWrapper) RemoveFetchTrustedHost

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

RemoveFetchTrustedHost operation middleware

func (*ServerInterfaceWrapper) RetirePrice

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

RetirePrice operation middleware

func (*ServerInterfaceWrapper) RevokeToken

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

RevokeToken operation middleware

func (*ServerInterfaceWrapper) RunAgentTrigger

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

RunAgentTrigger operation middleware

func (*ServerInterfaceWrapper) SetAgentBudget

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

SetAgentBudget operation middleware

func (*ServerInterfaceWrapper) SetAgentMcpServers

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

SetAgentMcpServers operation middleware

func (*ServerInterfaceWrapper) SetAgentModel

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

SetAgentModel operation middleware

func (*ServerInterfaceWrapper) SetAgentThinking

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

SetAgentThinking operation middleware

func (*ServerInterfaceWrapper) SetBudget

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

SetBudget operation middleware

func (*ServerInterfaceWrapper) SetDefaultModel

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

SetDefaultModel operation middleware

func (*ServerInterfaceWrapper) SetHomeBackupRetention

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

SetHomeBackupRetention operation middleware

func (*ServerInterfaceWrapper) SetLeakGuard

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

SetLeakGuard operation middleware

func (*ServerInterfaceWrapper) SetMcpServerDataClass

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

SetMcpServerDataClass operation middleware

func (*ServerInterfaceWrapper) SetMcpToolSink

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

SetMcpToolSink operation middleware

func (*ServerInterfaceWrapper) SetMcpToolTier

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

SetMcpToolTier operation middleware

func (*ServerInterfaceWrapper) SetMcpToolTwoApprovers

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

SetMcpToolTwoApprovers operation middleware

func (*ServerInterfaceWrapper) SetOutwardTargetDisabled

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

SetOutwardTargetDisabled operation middleware

func (*ServerInterfaceWrapper) SetPrice

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

SetPrice operation middleware

func (*ServerInterfaceWrapper) SetRunContentRetention

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

SetRunContentRetention operation middleware

func (*ServerInterfaceWrapper) UpdateMcpServer

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

UpdateMcpServer operation middleware

func (*ServerInterfaceWrapper) UpdateModel

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

UpdateModel operation middleware

func (*ServerInterfaceWrapper) UpdateProvider

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

UpdateProvider operation middleware

type SetAgentBudget200JSONResponse

type SetAgentBudget200JSONResponse AgentBudget

func (SetAgentBudget200JSONResponse) VisitSetAgentBudgetResponse

func (response SetAgentBudget200JSONResponse) VisitSetAgentBudgetResponse(w http.ResponseWriter) error

type SetAgentBudgetJSONRequestBody

type SetAgentBudgetJSONRequestBody = AgentBudgetUpdate

SetAgentBudgetJSONRequestBody defines body for SetAgentBudget for application/json ContentType.

type SetAgentBudgetRequestObject

type SetAgentBudgetRequestObject struct {
	AgentId openapi_types.UUID `json:"agentId"`
	Body    *SetAgentBudgetJSONRequestBody
}

type SetAgentBudgetResponseObject

type SetAgentBudgetResponseObject interface {
	VisitSetAgentBudgetResponse(w http.ResponseWriter) error
}

type SetAgentBudgetdefaultJSONResponse

type SetAgentBudgetdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (SetAgentBudgetdefaultJSONResponse) VisitSetAgentBudgetResponse

func (response SetAgentBudgetdefaultJSONResponse) VisitSetAgentBudgetResponse(w http.ResponseWriter) error

type SetAgentMcpServers200JSONResponse

type SetAgentMcpServers200JSONResponse AgentMcpServers

func (SetAgentMcpServers200JSONResponse) VisitSetAgentMcpServersResponse

func (response SetAgentMcpServers200JSONResponse) VisitSetAgentMcpServersResponse(w http.ResponseWriter) error

type SetAgentMcpServersJSONRequestBody

type SetAgentMcpServersJSONRequestBody = AgentMcpServers

SetAgentMcpServersJSONRequestBody defines body for SetAgentMcpServers for application/json ContentType.

type SetAgentMcpServersRequestObject

type SetAgentMcpServersRequestObject struct {
	AgentId openapi_types.UUID `json:"agentId"`
	Body    *SetAgentMcpServersJSONRequestBody
}

type SetAgentMcpServersResponseObject

type SetAgentMcpServersResponseObject interface {
	VisitSetAgentMcpServersResponse(w http.ResponseWriter) error
}

type SetAgentMcpServersdefaultJSONResponse

type SetAgentMcpServersdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (SetAgentMcpServersdefaultJSONResponse) VisitSetAgentMcpServersResponse

func (response SetAgentMcpServersdefaultJSONResponse) VisitSetAgentMcpServersResponse(w http.ResponseWriter) error

type SetAgentModel200JSONResponse

type SetAgentModel200JSONResponse AgentModel

func (SetAgentModel200JSONResponse) VisitSetAgentModelResponse

func (response SetAgentModel200JSONResponse) VisitSetAgentModelResponse(w http.ResponseWriter) error

type SetAgentModelJSONRequestBody

type SetAgentModelJSONRequestBody = AgentModelUpdate

SetAgentModelJSONRequestBody defines body for SetAgentModel for application/json ContentType.

type SetAgentModelRequestObject

type SetAgentModelRequestObject struct {
	AgentId openapi_types.UUID `json:"agentId"`
	Body    *SetAgentModelJSONRequestBody
}

type SetAgentModelResponseObject

type SetAgentModelResponseObject interface {
	VisitSetAgentModelResponse(w http.ResponseWriter) error
}

type SetAgentModeldefaultJSONResponse

type SetAgentModeldefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (SetAgentModeldefaultJSONResponse) VisitSetAgentModelResponse

func (response SetAgentModeldefaultJSONResponse) VisitSetAgentModelResponse(w http.ResponseWriter) error

type SetAgentThinking200JSONResponse

type SetAgentThinking200JSONResponse AgentModel

func (SetAgentThinking200JSONResponse) VisitSetAgentThinkingResponse

func (response SetAgentThinking200JSONResponse) VisitSetAgentThinkingResponse(w http.ResponseWriter) error

type SetAgentThinkingJSONRequestBody

type SetAgentThinkingJSONRequestBody = AgentThinkingUpdate

SetAgentThinkingJSONRequestBody defines body for SetAgentThinking for application/json ContentType.

type SetAgentThinkingRequestObject

type SetAgentThinkingRequestObject struct {
	AgentId openapi_types.UUID `json:"agentId"`
	Body    *SetAgentThinkingJSONRequestBody
}

type SetAgentThinkingResponseObject

type SetAgentThinkingResponseObject interface {
	VisitSetAgentThinkingResponse(w http.ResponseWriter) error
}

type SetAgentThinkingdefaultJSONResponse

type SetAgentThinkingdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (SetAgentThinkingdefaultJSONResponse) VisitSetAgentThinkingResponse

func (response SetAgentThinkingdefaultJSONResponse) VisitSetAgentThinkingResponse(w http.ResponseWriter) error

type SetBudget200JSONResponse

type SetBudget200JSONResponse OrgBudget

func (SetBudget200JSONResponse) VisitSetBudgetResponse

func (response SetBudget200JSONResponse) VisitSetBudgetResponse(w http.ResponseWriter) error

type SetBudgetJSONRequestBody

type SetBudgetJSONRequestBody = OrgBudgetUpdate

SetBudgetJSONRequestBody defines body for SetBudget for application/json ContentType.

type SetBudgetRequestObject

type SetBudgetRequestObject struct {
	Body *SetBudgetJSONRequestBody
}

type SetBudgetResponseObject

type SetBudgetResponseObject interface {
	VisitSetBudgetResponse(w http.ResponseWriter) error
}

type SetBudgetdefaultJSONResponse

type SetBudgetdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (SetBudgetdefaultJSONResponse) VisitSetBudgetResponse

func (response SetBudgetdefaultJSONResponse) VisitSetBudgetResponse(w http.ResponseWriter) error

type SetDefaultModel200JSONResponse

type SetDefaultModel200JSONResponse DefaultModel

func (SetDefaultModel200JSONResponse) VisitSetDefaultModelResponse

func (response SetDefaultModel200JSONResponse) VisitSetDefaultModelResponse(w http.ResponseWriter) error

type SetDefaultModelJSONRequestBody

type SetDefaultModelJSONRequestBody = DefaultModel

SetDefaultModelJSONRequestBody defines body for SetDefaultModel for application/json ContentType.

type SetDefaultModelRequestObject

type SetDefaultModelRequestObject struct {
	Body *SetDefaultModelJSONRequestBody
}

type SetDefaultModelResponseObject

type SetDefaultModelResponseObject interface {
	VisitSetDefaultModelResponse(w http.ResponseWriter) error
}

type SetDefaultModeldefaultJSONResponse

type SetDefaultModeldefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (SetDefaultModeldefaultJSONResponse) VisitSetDefaultModelResponse

func (response SetDefaultModeldefaultJSONResponse) VisitSetDefaultModelResponse(w http.ResponseWriter) error

type SetHomeBackupRetention200JSONResponse

type SetHomeBackupRetention200JSONResponse HomeBackupRetention

func (SetHomeBackupRetention200JSONResponse) VisitSetHomeBackupRetentionResponse

func (response SetHomeBackupRetention200JSONResponse) VisitSetHomeBackupRetentionResponse(w http.ResponseWriter) error

type SetHomeBackupRetentionJSONRequestBody

type SetHomeBackupRetentionJSONRequestBody = HomeBackupRetentionSettings

SetHomeBackupRetentionJSONRequestBody defines body for SetHomeBackupRetention for application/json ContentType.

type SetHomeBackupRetentionRequestObject

type SetHomeBackupRetentionRequestObject struct {
	Body *SetHomeBackupRetentionJSONRequestBody
}

type SetHomeBackupRetentionResponseObject

type SetHomeBackupRetentionResponseObject interface {
	VisitSetHomeBackupRetentionResponse(w http.ResponseWriter) error
}

type SetHomeBackupRetentiondefaultJSONResponse

type SetHomeBackupRetentiondefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (SetHomeBackupRetentiondefaultJSONResponse) VisitSetHomeBackupRetentionResponse

func (response SetHomeBackupRetentiondefaultJSONResponse) VisitSetHomeBackupRetentionResponse(w http.ResponseWriter) error

type SetLeakGuard200JSONResponse

type SetLeakGuard200JSONResponse LeakGuard

func (SetLeakGuard200JSONResponse) VisitSetLeakGuardResponse

func (response SetLeakGuard200JSONResponse) VisitSetLeakGuardResponse(w http.ResponseWriter) error

type SetLeakGuardJSONRequestBody

type SetLeakGuardJSONRequestBody = LeakGuardSettings

SetLeakGuardJSONRequestBody defines body for SetLeakGuard for application/json ContentType.

type SetLeakGuardRequestObject

type SetLeakGuardRequestObject struct {
	Body *SetLeakGuardJSONRequestBody
}

type SetLeakGuardResponseObject

type SetLeakGuardResponseObject interface {
	VisitSetLeakGuardResponse(w http.ResponseWriter) error
}

type SetLeakGuarddefaultJSONResponse

type SetLeakGuarddefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (SetLeakGuarddefaultJSONResponse) VisitSetLeakGuardResponse

func (response SetLeakGuarddefaultJSONResponse) VisitSetLeakGuardResponse(w http.ResponseWriter) error

type SetMcpServerDataClass200JSONResponse

type SetMcpServerDataClass200JSONResponse McpServer

func (SetMcpServerDataClass200JSONResponse) VisitSetMcpServerDataClassResponse

func (response SetMcpServerDataClass200JSONResponse) VisitSetMcpServerDataClassResponse(w http.ResponseWriter) error

type SetMcpServerDataClassJSONRequestBody

type SetMcpServerDataClassJSONRequestBody = McpServerDataClass

SetMcpServerDataClassJSONRequestBody defines body for SetMcpServerDataClass for application/json ContentType.

type SetMcpServerDataClassRequestObject

type SetMcpServerDataClassRequestObject struct {
	ServerId ServerId `json:"serverId"`
	Body     *SetMcpServerDataClassJSONRequestBody
}

type SetMcpServerDataClassResponseObject

type SetMcpServerDataClassResponseObject interface {
	VisitSetMcpServerDataClassResponse(w http.ResponseWriter) error
}

type SetMcpServerDataClassdefaultJSONResponse

type SetMcpServerDataClassdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (SetMcpServerDataClassdefaultJSONResponse) VisitSetMcpServerDataClassResponse

func (response SetMcpServerDataClassdefaultJSONResponse) VisitSetMcpServerDataClassResponse(w http.ResponseWriter) error

type SetMcpToolSink200JSONResponse

type SetMcpToolSink200JSONResponse McpTool

func (SetMcpToolSink200JSONResponse) VisitSetMcpToolSinkResponse

func (response SetMcpToolSink200JSONResponse) VisitSetMcpToolSinkResponse(w http.ResponseWriter) error

type SetMcpToolSinkJSONRequestBody

type SetMcpToolSinkJSONRequestBody = McpToolSinkUpdate

SetMcpToolSinkJSONRequestBody defines body for SetMcpToolSink for application/json ContentType.

type SetMcpToolSinkRequestObject

type SetMcpToolSinkRequestObject struct {
	ServerId ServerId `json:"serverId"`
	ToolName ToolName `json:"toolName"`
	Body     *SetMcpToolSinkJSONRequestBody
}

type SetMcpToolSinkResponseObject

type SetMcpToolSinkResponseObject interface {
	VisitSetMcpToolSinkResponse(w http.ResponseWriter) error
}

type SetMcpToolSinkdefaultJSONResponse

type SetMcpToolSinkdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (SetMcpToolSinkdefaultJSONResponse) VisitSetMcpToolSinkResponse

func (response SetMcpToolSinkdefaultJSONResponse) VisitSetMcpToolSinkResponse(w http.ResponseWriter) error

type SetMcpToolTier200JSONResponse

type SetMcpToolTier200JSONResponse McpTool

func (SetMcpToolTier200JSONResponse) VisitSetMcpToolTierResponse

func (response SetMcpToolTier200JSONResponse) VisitSetMcpToolTierResponse(w http.ResponseWriter) error

type SetMcpToolTierJSONRequestBody

type SetMcpToolTierJSONRequestBody = McpToolTierUpdate

SetMcpToolTierJSONRequestBody defines body for SetMcpToolTier for application/json ContentType.

type SetMcpToolTierRequestObject

type SetMcpToolTierRequestObject struct {
	ServerId ServerId `json:"serverId"`
	ToolName ToolName `json:"toolName"`
	Body     *SetMcpToolTierJSONRequestBody
}

type SetMcpToolTierResponseObject

type SetMcpToolTierResponseObject interface {
	VisitSetMcpToolTierResponse(w http.ResponseWriter) error
}

type SetMcpToolTierdefaultJSONResponse

type SetMcpToolTierdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (SetMcpToolTierdefaultJSONResponse) VisitSetMcpToolTierResponse

func (response SetMcpToolTierdefaultJSONResponse) VisitSetMcpToolTierResponse(w http.ResponseWriter) error

type SetMcpToolTwoApprovers200JSONResponse

type SetMcpToolTwoApprovers200JSONResponse McpTool

func (SetMcpToolTwoApprovers200JSONResponse) VisitSetMcpToolTwoApproversResponse

func (response SetMcpToolTwoApprovers200JSONResponse) VisitSetMcpToolTwoApproversResponse(w http.ResponseWriter) error

type SetMcpToolTwoApproversJSONRequestBody

type SetMcpToolTwoApproversJSONRequestBody = McpToolTwoApprovers

SetMcpToolTwoApproversJSONRequestBody defines body for SetMcpToolTwoApprovers for application/json ContentType.

type SetMcpToolTwoApproversRequestObject

type SetMcpToolTwoApproversRequestObject struct {
	ServerId ServerId `json:"serverId"`
	ToolName ToolName `json:"toolName"`
	Body     *SetMcpToolTwoApproversJSONRequestBody
}

type SetMcpToolTwoApproversResponseObject

type SetMcpToolTwoApproversResponseObject interface {
	VisitSetMcpToolTwoApproversResponse(w http.ResponseWriter) error
}

type SetMcpToolTwoApproversdefaultJSONResponse

type SetMcpToolTwoApproversdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (SetMcpToolTwoApproversdefaultJSONResponse) VisitSetMcpToolTwoApproversResponse

func (response SetMcpToolTwoApproversdefaultJSONResponse) VisitSetMcpToolTwoApproversResponse(w http.ResponseWriter) error

type SetOutwardTargetDisabled200JSONResponse

type SetOutwardTargetDisabled200JSONResponse OutwardTargetState

func (SetOutwardTargetDisabled200JSONResponse) VisitSetOutwardTargetDisabledResponse

func (response SetOutwardTargetDisabled200JSONResponse) VisitSetOutwardTargetDisabledResponse(w http.ResponseWriter) error

type SetOutwardTargetDisabledJSONRequestBody

type SetOutwardTargetDisabledJSONRequestBody = OutwardTargetDisabled

SetOutwardTargetDisabledJSONRequestBody defines body for SetOutwardTargetDisabled for application/json ContentType.

type SetOutwardTargetDisabledRequestObject

type SetOutwardTargetDisabledRequestObject struct {
	Kind     OutwardTargetKind  `json:"kind"`
	TargetId openapi_types.UUID `json:"targetId"`
	Body     *SetOutwardTargetDisabledJSONRequestBody
}

type SetOutwardTargetDisabledResponseObject

type SetOutwardTargetDisabledResponseObject interface {
	VisitSetOutwardTargetDisabledResponse(w http.ResponseWriter) error
}

type SetOutwardTargetDisableddefaultJSONResponse

type SetOutwardTargetDisableddefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (SetOutwardTargetDisableddefaultJSONResponse) VisitSetOutwardTargetDisabledResponse

func (response SetOutwardTargetDisableddefaultJSONResponse) VisitSetOutwardTargetDisabledResponse(w http.ResponseWriter) error

type SetPrice201JSONResponse

type SetPrice201JSONResponse PriceSaved

func (SetPrice201JSONResponse) VisitSetPriceResponse

func (response SetPrice201JSONResponse) VisitSetPriceResponse(w http.ResponseWriter) error

type SetPriceJSONRequestBody

type SetPriceJSONRequestBody = PriceInput

SetPriceJSONRequestBody defines body for SetPrice for application/json ContentType.

type SetPriceRequestObject

type SetPriceRequestObject struct {
	Body *SetPriceJSONRequestBody
}

type SetPriceResponseObject

type SetPriceResponseObject interface {
	VisitSetPriceResponse(w http.ResponseWriter) error
}

type SetPricedefaultJSONResponse

type SetPricedefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (SetPricedefaultJSONResponse) VisitSetPriceResponse

func (response SetPricedefaultJSONResponse) VisitSetPriceResponse(w http.ResponseWriter) error

type SetRunContentRetention200JSONResponse

type SetRunContentRetention200JSONResponse RunContentRetention

func (SetRunContentRetention200JSONResponse) VisitSetRunContentRetentionResponse

func (response SetRunContentRetention200JSONResponse) VisitSetRunContentRetentionResponse(w http.ResponseWriter) error

type SetRunContentRetentionJSONRequestBody

type SetRunContentRetentionJSONRequestBody = RunContentRetentionSettings

SetRunContentRetentionJSONRequestBody defines body for SetRunContentRetention for application/json ContentType.

type SetRunContentRetentionRequestObject

type SetRunContentRetentionRequestObject struct {
	Body *SetRunContentRetentionJSONRequestBody
}

type SetRunContentRetentionResponseObject

type SetRunContentRetentionResponseObject interface {
	VisitSetRunContentRetentionResponse(w http.ResponseWriter) error
}

type SetRunContentRetentiondefaultJSONResponse

type SetRunContentRetentiondefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (SetRunContentRetentiondefaultJSONResponse) VisitSetRunContentRetentionResponse

func (response SetRunContentRetentiondefaultJSONResponse) VisitSetRunContentRetentionResponse(w http.ResponseWriter) error

type Source

type Source string

Source `secret` entries are declared by a Kubernetes Secret and read-only here.

const (
	SourceSecret Source = "secret"
	SourceUi     Source = "ui"
)

Defines values for Source.

func (Source) Valid

func (e Source) Valid() bool

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

type SpendLine

type SpendLine struct {
	// EstimatedOutputTokens Output tokens of the estimated requests: for a response cut short, the output usage the gateway logged before the cut (none for a chat-completion stream).
	EstimatedOutputTokens int64 `json:"estimatedOutputTokens"`
	EstimatedRequests     int64 `json:"estimatedRequests"`

	// EstimatedUsd Cost of requests whose usage was estimated. Counts toward limits.
	EstimatedUsd string `json:"estimatedUsd"`

	// FlaggedRequests Requests flagged for review (cost differs from the gateway's by more than 1%, usage missing, or an unusable price).
	FlaggedRequests int64 `json:"flaggedRequests"`

	// GatewayComparedUsd Koinon's cost of the same requests, to compare with gatewayUsd.
	GatewayComparedUsd string `json:"gatewayComparedUsd"`

	// GatewayRequests Requests agentgateway priced itself.
	GatewayRequests int64 `json:"gatewayRequests"`

	// GatewayUsd agentgateway's own cost of those requests.
	GatewayUsd  string `json:"gatewayUsd"`
	InputTokens int64  `json:"inputTokens"`
	Model       string `json:"model"`

	// OutputTokens Output tokens, reasoning (thinking) tokens included.
	OutputTokens int64 `json:"outputTokens"`

	// ProvisionalRequests Requests whose provider bill is pending; their cost is Koinon's price of the usage the gateway logged until the provider reports.
	ProvisionalRequests int64 `json:"provisionalRequests"`

	// ReasoningTokens The part of outputTokens the provider reported as reasoning, or null when no request of the model reported a split. Null does not mean the model did not think: Anthropic Messages has no separate reasoning count and counts thinking inside outputTokens. Thinking is billed as output: at the output rate unless the price names a reasoning rate (ADR 0069 amendment 2026-10-29).
	ReasoningTokens *int64 `json:"reasoningTokens"`

	// ReportedUsd Cost of requests whose usage the provider reported.
	ReportedUsd string `json:"reportedUsd"`
	Requests    int64  `json:"requests"`

	// ReservedUsd What the provisional requests hold back from the gateway keys' limits (their max_tokens bound minus the charge). Not a cost and not counted by budgets; released when they settle.
	ReservedUsd string `json:"reservedUsd"`
}

SpendLine defines model for SpendLine.

type SpendReport

type SpendReport struct {
	// Models Spend of agents, per model.
	Models []SpendLine `json:"models"`
	Since  time.Time   `json:"since"`

	// SystemChecks Requests Koinon made itself, such as the provider echo check, which belong to no agent.
	// They are billed like any request and count toward the org's monthly cap and the platform
	// ceiling, but not toward any agent's limit.
	SystemChecks struct {
		CostUsd  string `json:"costUsd"`
		Requests int64  `json:"requests"`
	} `json:"systemChecks"`
}

SpendReport defines model for SpendReport.

type StdHTTPServerOptions

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

type StrictHTTPServerOptions

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

type StrictHandlerFunc

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

type StrictMiddlewareFunc

type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc

type StrictServerInterface

type StrictServerInterface interface {
	// GetAgentBudget An agent's daily limit (UTC day) and today's spend.
	// (GET /agents/{agentId}/budget)
	GetAgentBudget(ctx context.Context, request GetAgentBudgetRequestObject) (GetAgentBudgetResponseObject, error)
	// SetAgentBudget Set an agent's daily limit. A template's spendUSD is only the default for a new agent.
	// (PUT /agents/{agentId}/budget)
	SetAgentBudget(ctx context.Context, request SetAgentBudgetRequestObject) (SetAgentBudgetResponseObject, error)
	// GetAgentMcpServers The servers an agent may use.
	// (GET /agents/{agentId}/mcp-servers)
	GetAgentMcpServers(ctx context.Context, request GetAgentMcpServersRequestObject) (GetAgentMcpServersResponseObject, error)
	// SetAgentMcpServers Replace the servers an agent may use, each optionally narrowed to some tools. Tools are
	// offered by tier; a tool the server adds later enters the ask tier for an agent that allows the
	// whole server.
	// (PUT /agents/{agentId}/mcp-servers)
	SetAgentMcpServers(ctx context.Context, request SetAgentMcpServersRequestObject) (SetAgentMcpServersResponseObject, error)
	// GetAgentModel The model an agent's next run uses, and where that choice comes from.
	// (GET /agents/{agentId}/model)
	GetAgentModel(ctx context.Context, request GetAgentModelRequestObject) (GetAgentModelResponseObject, error)
	// SetAgentModel Set an agent's model, or clear it with `default`.
	// (PUT /agents/{agentId}/model)
	SetAgentModel(ctx context.Context, request SetAgentModelRequestObject) (SetAgentModelResponseObject, error)
	// SetAgentThinking Turn an agent's thinking on or off, or clear the setting.
	// (PUT /agents/{agentId}/thinking)
	SetAgentThinking(ctx context.Context, request SetAgentThinkingRequestObject) (SetAgentThinkingResponseObject, error)
	// RunAgentTrigger Fire a schedule trigger now ("run now").
	// (POST /agents/{agentId}/triggers/{triggerId}/run)
	RunAgentTrigger(ctx context.Context, request RunAgentTriggerRequestObject) (RunAgentTriggerResponseObject, error)
	// ListAuditEvents Read the org's audit log, newest first.
	// (GET /audit)
	ListAuditEvents(ctx context.Context, request ListAuditEventsRequestObject) (ListAuditEventsResponseObject, error)
	// ExportAudit Export an audit chain as JSON lines, verifiable off the cluster.
	// (GET /audit/export)
	ExportAudit(ctx context.Context, request ExportAuditRequestObject) (ExportAuditResponseObject, error)
	// GetBudget The org's monthly cap (calendar month, UTC), its platform ceiling and this month's spend.
	// (GET /budget)
	GetBudget(ctx context.Context, request GetBudgetRequestObject) (GetBudgetResponseObject, error)
	// SetBudget Set the org's monthly cap, or clear it by leaving `monthlyCapUsd` out.
	// (PUT /budget)
	SetBudget(ctx context.Context, request SetBudgetRequestObject) (SetBudgetResponseObject, error)
	// GetDefaultModel The org's default model, which agents without a model setting run on.
	// (GET /default-model)
	GetDefaultModel(ctx context.Context, request GetDefaultModelRequestObject) (GetDefaultModelResponseObject, error)
	// SetDefaultModel Set the org's default model, or clear it by leaving `model` out. Audited.
	// (PUT /default-model)
	SetDefaultModel(ctx context.Context, request SetDefaultModelRequestObject) (SetDefaultModelResponseObject, error)
	// GetHomeBackupRetention How long an old home backup repository is kept after a key change (issue
	// (GET /home-backup-retention)
	GetHomeBackupRetention(ctx context.Context, request GetHomeBackupRetentionRequestObject) (GetHomeBackupRetentionResponseObject, error)
	// SetHomeBackupRetention Set the retention in days, or return it to the default (7) by leaving `days` out. Audited.
	// (PUT /home-backup-retention)
	SetHomeBackupRetention(ctx context.Context, request SetHomeBackupRetentionRequestObject) (SetHomeBackupRetentionResponseObject, error)
	// GetLeakGuard The org's leak-guard settings, with defaults filled in, and its fetch-trusted host list.
	// (GET /leak-guard)
	GetLeakGuard(ctx context.Context, request GetLeakGuardRequestObject) (GetLeakGuardResponseObject, error)
	// SetLeakGuard Set the match threshold, or return it to the default by leaving `matchThreshold` out. Audited.
	// (PUT /leak-guard)
	SetLeakGuard(ctx context.Context, request SetLeakGuardRequestObject) (SetLeakGuardResponseObject, error)
	// AddFetchTrustedHost Put a host on the fetch-trusted list, which the automatic URL rule exempts. Audited.
	// (POST /leak-guard/trusted-hosts)
	AddFetchTrustedHost(ctx context.Context, request AddFetchTrustedHostRequestObject) (AddFetchTrustedHostResponseObject, error)
	// RemoveFetchTrustedHost Take a host off the fetch-trusted list. Audited.
	// (DELETE /leak-guard/trusted-hosts/{host})
	RemoveFetchTrustedHost(ctx context.Context, request RemoveFetchTrustedHostRequestObject) (RemoveFetchTrustedHostResponseObject, error)
	// ListMcpServers List the org's remote MCP servers, entered and declared, with their health.
	// (GET /mcp-servers)
	ListMcpServers(ctx context.Context, request ListMcpServersRequestObject) (ListMcpServersResponseObject, error)
	// CreateMcpServer Add a remote MCP server. A server that asks each user to sign in with OAuth is refused (planned
	// for v0.2).
	// (POST /mcp-servers)
	CreateMcpServer(ctx context.Context, request CreateMcpServerRequestObject) (CreateMcpServerResponseObject, error)
	// DeleteMcpServer Delete a server, its tools and the agents' allowances of it. Declared servers answer 409.
	// (DELETE /mcp-servers/{serverId})
	DeleteMcpServer(ctx context.Context, request DeleteMcpServerRequestObject) (DeleteMcpServerResponseObject, error)
	// GetMcpServer Get a server.
	// (GET /mcp-servers/{serverId})
	GetMcpServer(ctx context.Context, request GetMcpServerRequestObject) (GetMcpServerResponseObject, error)
	// UpdateMcpServer Change a server's URL, transport or credential. Declared servers answer 409.
	// (PATCH /mcp-servers/{serverId})
	UpdateMcpServer(ctx context.Context, request UpdateMcpServerRequestObject) (UpdateMcpServerResponseObject, error)
	// SetMcpServerDataClass Set what a server exposes, its kind and the legs of the leak guard it carries. Audited.
	// (PUT /mcp-servers/{serverId}/data-class)
	SetMcpServerDataClass(ctx context.Context, request SetMcpServerDataClassRequestObject) (SetMcpServerDataClassResponseObject, error)
	// ListMcpTools The server's tools with their tiers and review flags.
	// (GET /mcp-servers/{serverId}/tools)
	ListMcpTools(ctx context.Context, request ListMcpToolsRequestObject) (ListMcpToolsResponseObject, error)
	// AcknowledgeMcpToolReview Mark a changed tool as reviewed without changing its tier. Approves the tool text `toolHash` names.
	// (POST /mcp-servers/{serverId}/tools/{toolName}/review)
	AcknowledgeMcpToolReview(ctx context.Context, request AcknowledgeMcpToolReviewRequestObject) (AcknowledgeMcpToolReviewResponseObject, error)
	// SetMcpToolSink Declare a tool's sink class, its address arguments and what its results carry. Audited.
	// (PUT /mcp-servers/{serverId}/tools/{toolName}/sink)
	SetMcpToolSink(ctx context.Context, request SetMcpToolSinkRequestObject) (SetMcpToolSinkResponseObject, error)
	// SetMcpToolTier Move a tool to a tier: `ask` (a human approves each call), `auto` (the agent calls it) or
	// `never`. Works on declared servers too. Clears the tool's review flag.
	// (PUT /mcp-servers/{serverId}/tools/{toolName}/tier)
	SetMcpToolTier(ctx context.Context, request SetMcpToolTierRequestObject) (SetMcpToolTierResponseObject, error)
	// SetMcpToolTwoApprovers Require two approvers for calls to a tool in the ask tier: distinct admins or owners, neither the
	// ticket's creator. Off by default.
	// (PUT /mcp-servers/{serverId}/tools/{toolName}/two-approvers)
	SetMcpToolTwoApprovers(ctx context.Context, request SetMcpToolTwoApproversRequestObject) (SetMcpToolTwoApproversResponseObject, error)
	// ListModels List the org's models, entered and declared.
	// (GET /models)
	ListModels(ctx context.Context, request ListModelsRequestObject) (ListModelsResponseObject, error)
	// CreateModel Add a model to a provider. Its price is an org price or a default one.
	// (POST /models)
	CreateModel(ctx context.Context, request CreateModelRequestObject) (CreateModelResponseObject, error)
	// DeleteModel Delete a model. Declared models answer 409.
	// (DELETE /models/{modelId})
	DeleteModel(ctx context.Context, request DeleteModelRequestObject) (DeleteModelResponseObject, error)
	// GetModel Get a model.
	// (GET /models/{modelId})
	GetModel(ctx context.Context, request GetModelRequestObject) (GetModelResponseObject, error)
	// UpdateModel Change a model's routing guard. Declared models answer 409.
	// (PATCH /models/{modelId})
	UpdateModel(ctx context.Context, request UpdateModelRequestObject) (UpdateModelResponseObject, error)
	// SetOutwardTargetDisabled Switch one outward target off or on. Audited as outward.disable or outward.enable.
	// (PUT /outward-targets/{kind}/{targetId}/disabled)
	SetOutwardTargetDisabled(ctx context.Context, request SetOutwardTargetDisabledRequestObject) (SetOutwardTargetDisabledResponseObject, error)
	// ListPrices List the org's own prices, every version, newest first per name.
	// (GET /prices)
	ListPrices(ctx context.Context, request ListPricesRequestObject) (ListPricesResponseObject, error)
	// SetPrice Add a version of a named price. Earlier versions never change.
	// (POST /prices)
	SetPrice(ctx context.Context, request SetPriceRequestObject) (SetPriceResponseObject, error)
	// GetDefaultPrices The default price list this installation runs and the versions before it.
	// (GET /prices/defaults)
	GetDefaultPrices(ctx context.Context, request GetDefaultPricesRequestObject) (GetDefaultPricesResponseObject, error)
	// GetDefaultPriceChanges What changed in the default price list between two versions (after an upgrade).
	// (GET /prices/defaults/changes)
	GetDefaultPriceChanges(ctx context.Context, request GetDefaultPriceChangesRequestObject) (GetDefaultPriceChangesResponseObject, error)
	// ListFlaggedPrices Price entries whose recomputed cost differs from the gateway's by more than 1%.
	// (GET /prices/flagged)
	ListFlaggedPrices(ctx context.Context, request ListFlaggedPricesRequestObject) (ListFlaggedPricesResponseObject, error)
	// RetirePrice End a named price now. Its versions stay for the ledger entries that cite them.
	// (DELETE /prices/{name})
	RetirePrice(ctx context.Context, request RetirePriceRequestObject) (RetirePriceResponseObject, error)
	// ListProviders List the org's providers, entered and declared.
	// (GET /providers)
	ListProviders(ctx context.Context, request ListProvidersRequestObject) (ListProvidersResponseObject, error)
	// CreateProvider Add a provider.
	// (POST /providers)
	CreateProvider(ctx context.Context, request CreateProviderRequestObject) (CreateProviderResponseObject, error)
	// DeleteProvider Delete a provider and its models. Declared providers answer 409.
	// (DELETE /providers/{providerId})
	DeleteProvider(ctx context.Context, request DeleteProviderRequestObject) (DeleteProviderResponseObject, error)
	// GetProvider Get a provider.
	// (GET /providers/{providerId})
	GetProvider(ctx context.Context, request GetProviderRequestObject) (GetProviderResponseObject, error)
	// UpdateProvider Change a provider's type, URL or key. Declared providers answer 409.
	// (PATCH /providers/{providerId})
	UpdateProvider(ctx context.Context, request UpdateProviderRequestObject) (UpdateProviderResponseObject, error)
	// CheckProviderEcho Check whether the provider changes the text it is sent.
	// (POST /providers/{providerId}/echo-check)
	CheckProviderEcho(ctx context.Context, request CheckProviderEchoRequestObject) (CheckProviderEchoResponseObject, error)
	// GetRestoreStatus What a restored copy would do outward and what its release starts (platform admin).
	// (GET /restore/status)
	GetRestoreStatus(ctx context.Context, request GetRestoreStatusRequestObject) (GetRestoreStatusResponseObject, error)
	// GetRunContentRetention How long a finished run's stored content is kept (issue
	// (GET /run-content-retention)
	GetRunContentRetention(ctx context.Context, request GetRunContentRetentionRequestObject) (GetRunContentRetentionResponseObject, error)
	// SetRunContentRetention Set the retention in days, or return it to the default (30) by leaving `days` out. Audited.
	// (PUT /run-content-retention)
	SetRunContentRetention(ctx context.Context, request SetRunContentRetentionRequestObject) (SetRunContentRetentionResponseObject, error)
	// GetSpendReport Spend per model, with estimated usage shown apart from reported usage.
	// (GET /spend)
	GetSpendReport(ctx context.Context, request GetSpendReportRequestObject) (GetSpendReportResponseObject, error)
	// ListTokens List the org's API tokens, newest first.
	// (GET /tokens)
	ListTokens(ctx context.Context, request ListTokensRequestObject) (ListTokensResponseObject, error)
	// CreateToken Create an API token. The secret is shown once.
	// (POST /tokens)
	CreateToken(ctx context.Context, request CreateTokenRequestObject) (CreateTokenResponseObject, error)
	// RevokeToken Revoke a token. Revoking twice is fine.
	// (DELETE /tokens/{tokenId})
	RevokeToken(ctx context.Context, request RevokeTokenRequestObject) (RevokeTokenResponseObject, error)
}

StrictServerInterface represents all server handlers.

type ThinkingState

type ThinkingState struct {
	// AlwaysThinks Whether the effective model thinks whatever the setting. A UI then offers no off choice and says "this model always thinks"; setting `off` is refused with that message.
	AlwaysThinks bool `json:"alwaysThinks"`

	// Effective What the layers resolve to, whether or not the model can think.
	Effective ThinkingStateEffective `json:"effective"`

	// Mode The form the next run sends: `none` when the model does not think, `adaptive-summarized` or `default` for thinking on, `disabled` or `effort-none` for thinking off (ADR 0069 amendment 2026-10-31).
	Mode ThinkingStateMode `json:"mode"`

	// Notice What a UI shows about the setting: "this model always thinks; your off setting doesn't apply" when `offOverridden`, unset otherwise.
	Notice *string `json:"notice,omitempty"`

	// OffOverridden Whether the setting resolves to off and the model thinks anyway (it always thinks). The setting is kept for a model that can stop; runs think.
	OffOverridden bool `json:"offOverridden"`

	// Setting The agent's own setting; `default` when it has none.
	Setting ThinkingStateSetting `json:"setting"`

	// Supported Whether the effective model can think. When false the setting has no effect and a UI says "not supported by this model".
	Supported bool `json:"supported"`

	// VersionSetting The active version's value (a template's `spec.model.thinking`); unset when it names none.
	VersionSetting *ThinkingStateVersionSetting `json:"versionSetting,omitempty"`
}

ThinkingState The agent's thinking setting and what it resolves to (ADR 0069 amendment 2026-10-29).

type ThinkingStateEffective

type ThinkingStateEffective string

ThinkingStateEffective What the layers resolve to, whether or not the model can think.

const (
	ThinkingStateEffectiveOff ThinkingStateEffective = "off"
	ThinkingStateEffectiveOn  ThinkingStateEffective = "on"
)

Defines values for ThinkingStateEffective.

func (ThinkingStateEffective) Valid

func (e ThinkingStateEffective) Valid() bool

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

type ThinkingStateMode

type ThinkingStateMode string

ThinkingStateMode The form the next run sends: `none` when the model does not think, `adaptive-summarized` or `default` for thinking on, `disabled` or `effort-none` for thinking off (ADR 0069 amendment 2026-10-31).

const (
	ThinkingStateModeAdaptiveSummarized ThinkingStateMode = "adaptive-summarized"
	ThinkingStateModeDefault            ThinkingStateMode = "default"
	ThinkingStateModeDisabled           ThinkingStateMode = "disabled"
	ThinkingStateModeEffortNone         ThinkingStateMode = "effort-none"
	ThinkingStateModeNone               ThinkingStateMode = "none"
)

Defines values for ThinkingStateMode.

func (ThinkingStateMode) Valid

func (e ThinkingStateMode) Valid() bool

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

type ThinkingStateSetting

type ThinkingStateSetting string

ThinkingStateSetting The agent's own setting; `default` when it has none.

const (
	ThinkingStateSettingDefault ThinkingStateSetting = "default"
	ThinkingStateSettingOff     ThinkingStateSetting = "off"
	ThinkingStateSettingOn      ThinkingStateSetting = "on"
)

Defines values for ThinkingStateSetting.

func (ThinkingStateSetting) Valid

func (e ThinkingStateSetting) Valid() bool

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

type ThinkingStateVersionSetting

type ThinkingStateVersionSetting string

ThinkingStateVersionSetting The active version's value (a template's `spec.model.thinking`); unset when it names none.

const (
	ThinkingStateVersionSettingOff ThinkingStateVersionSetting = "off"
	ThinkingStateVersionSettingOn  ThinkingStateVersionSetting = "on"
)

Defines values for ThinkingStateVersionSetting.

func (ThinkingStateVersionSetting) Valid

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

type Token

type Token struct {
	CreatedAt  time.Time          `json:"createdAt"`
	ExpiresAt  time.Time          `json:"expiresAt"`
	Id         openapi_types.UUID `json:"id"`
	LastUsedAt *time.Time         `json:"lastUsedAt,omitempty"`
	Name       string             `json:"name"`

	// Prefix The public part of the token, to tell tokens apart.
	Prefix    string     `json:"prefix"`
	RevokedAt *time.Time `json:"revokedAt,omitempty"`
	Role      Role       `json:"role"`
}

Token defines model for Token.

type TokenCreate

type TokenCreate struct {
	// ExpiresIn Seconds until the token expires. Default 2592000 (30 days).
	ExpiresIn *int   `json:"expiresIn,omitempty"`
	Name      string `json:"name"`
	Role      Role   `json:"role"`
}

TokenCreate defines model for TokenCreate.

type TokenCreated

type TokenCreated struct {
	// Secret Send as `Authorization: Bearer <secret>`. Shown only here.
	Secret string `json:"secret"`
	Token  Token  `json:"token"`
}

TokenCreated defines model for TokenCreated.

type TokenId

type TokenId = openapi_types.UUID

TokenId defines model for tokenId.

type TokenList

type TokenList struct {
	Tokens []Token `json:"tokens"`
}

TokenList defines model for TokenList.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type ToolName

type ToolName = string

ToolName defines model for toolName.

type TriggerRun

type TriggerRun struct {
	TaskId openapi_types.UUID `json:"taskId"`
}

TriggerRun defines model for TriggerRun.

type TriggerRunner

type TriggerRunner interface {
	RunScheduleTrigger(ctx context.Context, in triggers.RunNow) (store.Task, error)
}

TriggerRunner fires a schedule trigger now: *services.Server, whose RunScheduleTrigger is the path the scheduler's fire takes.

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type UpdateMcpServer200JSONResponse

type UpdateMcpServer200JSONResponse McpServer

func (UpdateMcpServer200JSONResponse) VisitUpdateMcpServerResponse

func (response UpdateMcpServer200JSONResponse) VisitUpdateMcpServerResponse(w http.ResponseWriter) error

type UpdateMcpServerJSONRequestBody

type UpdateMcpServerJSONRequestBody = McpServerUpdate

UpdateMcpServerJSONRequestBody defines body for UpdateMcpServer for application/json ContentType.

type UpdateMcpServerRequestObject

type UpdateMcpServerRequestObject struct {
	ServerId ServerId `json:"serverId"`
	Body     *UpdateMcpServerJSONRequestBody
}

type UpdateMcpServerResponseObject

type UpdateMcpServerResponseObject interface {
	VisitUpdateMcpServerResponse(w http.ResponseWriter) error
}

type UpdateMcpServerdefaultJSONResponse

type UpdateMcpServerdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (UpdateMcpServerdefaultJSONResponse) VisitUpdateMcpServerResponse

func (response UpdateMcpServerdefaultJSONResponse) VisitUpdateMcpServerResponse(w http.ResponseWriter) error

type UpdateModel200JSONResponse

type UpdateModel200JSONResponse Model

func (UpdateModel200JSONResponse) VisitUpdateModelResponse

func (response UpdateModel200JSONResponse) VisitUpdateModelResponse(w http.ResponseWriter) error

type UpdateModelJSONRequestBody

type UpdateModelJSONRequestBody = ModelUpdate

UpdateModelJSONRequestBody defines body for UpdateModel for application/json ContentType.

type UpdateModelRequestObject

type UpdateModelRequestObject struct {
	ModelId ModelId `json:"modelId"`
	Body    *UpdateModelJSONRequestBody
}

type UpdateModelResponseObject

type UpdateModelResponseObject interface {
	VisitUpdateModelResponse(w http.ResponseWriter) error
}

type UpdateModeldefaultJSONResponse

type UpdateModeldefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (UpdateModeldefaultJSONResponse) VisitUpdateModelResponse

func (response UpdateModeldefaultJSONResponse) VisitUpdateModelResponse(w http.ResponseWriter) error

type UpdateProvider200JSONResponse

type UpdateProvider200JSONResponse Provider

func (UpdateProvider200JSONResponse) VisitUpdateProviderResponse

func (response UpdateProvider200JSONResponse) VisitUpdateProviderResponse(w http.ResponseWriter) error

type UpdateProviderJSONRequestBody

type UpdateProviderJSONRequestBody = ProviderUpdate

UpdateProviderJSONRequestBody defines body for UpdateProvider for application/json ContentType.

type UpdateProviderRequestObject

type UpdateProviderRequestObject struct {
	ProviderId ProviderId `json:"providerId"`
	Body       *UpdateProviderJSONRequestBody
}

type UpdateProviderResponseObject

type UpdateProviderResponseObject interface {
	VisitUpdateProviderResponse(w http.ResponseWriter) error
}

type UpdateProviderdefaultJSONResponse

type UpdateProviderdefaultJSONResponse struct {
	Body       Error
	StatusCode int
}

func (UpdateProviderdefaultJSONResponse) VisitUpdateProviderResponse

func (response UpdateProviderdefaultJSONResponse) VisitUpdateProviderResponse(w http.ResponseWriter) error

Jump to

Keyboard shortcuts

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