mcpserver

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 28 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

Index

Constants

View Source
const (
	InlineBytes      = 1 << 20
	ChunkBytes       = 256 << 10
	MaxArtifactBytes = 64 << 20
)
View Source
const GuideURI = "qag://guide/workflows"

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	ID        string    `json:"id"`
	URI       string    `json:"uri"`
	Name      string    `json:"name"`
	MIMEType  string    `json:"mimeType"`
	Size      int64     `json:"size"`
	SHA256    string    `json:"sha256"`
	ExpiresAt time.Time `json:"expiresAt"`
}

type ArtifactChunk

type ArtifactChunk struct {
	Artifact   Artifact `json:"artifact"`
	Offset     int64    `json:"offset"`
	Length     int      `json:"length"`
	EOF        bool     `json:"eof"`
	DataBase64 string   `json:"dataBase64"`
}

type ArtifactRead

type ArtifactRead struct {
	IDInput
	Offset int64 `json:"offset,omitempty"`
	Length int   `json:"length,omitempty"`
}

type ArtifactStore

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

func NewArtifactStore

func NewArtifactStore() *ArtifactStore

func (*ArtifactStore) Chunk

func (s *ArtifactStore) Chunk(id string, offset int64, length int) (ArtifactChunk, error)

func (*ArtifactStore) List

func (s *ArtifactStore) List() []Artifact

func (*ArtifactStore) PutGroup

func (s *ArtifactStore) PutGroup(files []File) ([]Artifact, error)

func (*ArtifactStore) Read

func (s *ArtifactStore) Read(id string, offset int64, length int, whole bool) (Artifact, []byte, error)

type BatchStart

type BatchStart struct {
	RunID          string `json:"runId"`
	IdempotencyKey string `json:"idempotencyKey"`
}

type CaseCreate

type CaseCreate struct {
	FolderID string `json:"folderId"`
	Name     string `json:"name,omitempty"`
}

type CaseExportInput added in v1.0.1

type CaseExportInput struct {
	ID              string `json:"id"`
	Revision        int64  `json:"revision"`
	Format          string `json:"format"`
	IncludeExpected *bool  `json:"includeExpected,omitempty"`
}

type CaseSave

type CaseSave struct {
	IDInput
	Revision int64          `json:"revision"`
	Name     string         `json:"name,omitempty"`
	Steps    []catalog.Step `json:"steps,omitempty"`
}

type CasesList

type CasesList struct {
	Page
	FolderID string `json:"folderId"`
}

type CopyResult

type CopyResult struct {
	Copied  bool       `json:"copied"`
	Code    string     `json:"code,omitempty"`
	Message string     `json:"message,omitempty"`
	Files   []Artifact `json:"files"`
}

type Deleted

type Deleted struct {
	Deleted bool `json:"deleted"`
}

type EditorAttemptStart

type EditorAttemptStart struct {
	TestCaseID     string `json:"testCaseId"`
	BlockID        string `json:"blockId"`
	EnvironmentID  string `json:"environmentId"`
	Revision       int64  `json:"revision"`
	IdempotencyKey string `json:"idempotencyKey"`
}

type Empty

type Empty struct{}

type Envelope

type Envelope[T any] struct {
	Data     *T         `json:"data,omitempty"`
	Artifact *Artifact  `json:"artifact,omitempty"`
	Summary  *Summary   `json:"summary,omitempty"`
	Error    *ToolError `json:"error,omitempty"`
}

type EnvironmentCreate

type EnvironmentCreate struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

type EnvironmentUpdate

type EnvironmentUpdate struct {
	IDInput
	EnvironmentCreate
	Revision int64 `json:"revision"`
}

type ExportResult

type ExportResult struct {
	Files []Artifact `json:"files"`
}

type File

type File struct {
	Name, MIMEType string
	Data           []byte
}

type FolderList

type FolderList struct {
	Page
	Archived bool `json:"archived,omitempty"`
}

type IDInput

type IDInput struct {
	ID string `json:"id"`
}

type ImageGet

type ImageGet struct {
	TestCaseID string `json:"testCaseId"`
	ImageID    string `json:"imageId"`
}

type ImageResult

type ImageResult struct {
	Image    catalog.ExpectedImage `json:"image"`
	Artifact Artifact              `json:"artifact"`
}

type ImageUpload

type ImageUpload struct {
	TestCaseID string `json:"testCaseId"`
	catalog.ImageUpload
}

type NameInput

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

type Options

type Options struct {
	Engine  *service.Engine
	Reports *reporting.Service
	Ping    func(context.Context) error
	Logger  *slog.Logger
}

type Page

type Page struct {
	Limit  int    `json:"limit,omitempty"`
	Cursor string `json:"cursor,omitempty"`
}

type ProtoUpload

type ProtoUpload struct {
	IDInput
	Revision int64             `json:"revision"`
	Files    map[string]string `json:"files"`
}

type ReportExport

type ReportExport struct {
	reporting.Reference
	Format string `json:"format"`
}

type ReportPrepare

type ReportPrepare struct {
	RunID           string `json:"runId"`
	IncludeExpected *bool  `json:"includeExpected,omitempty"`
}

type ResearchRequest

type ResearchRequest struct {
	TimeoutSeconds int                  `json:"timeoutSeconds,omitempty"`
	HTTP           *catalog.HTTPRequest `json:"http,omitempty"`
	GRPC           *catalog.GRPCRequest `json:"grpc,omitempty"`
	SQL            *catalog.SQLRequest  `json:"sql,omitempty"`
}

type ResourceCreate

type ResourceCreate struct {
	EnvironmentID string `json:"environmentId"`
	ResourceData
}

type ResourceData

type ResourceData struct {
	Name    string           `json:"name"`
	Kind    string           `json:"kind"`
	Config  resources.Config `json:"config"`
	Secrets SecretChanges    `json:"secrets,omitempty"`
}

type ResourceList

type ResourceList struct {
	Page
	EnvironmentID string `json:"environmentId"`
}

type ResourceUpdate

type ResourceUpdate struct {
	IDInput
	Revision int64 `json:"revision"`
	ResourceData
}

type RunAttemptStart

type RunAttemptStart struct {
	RunID          string `json:"runId"`
	BlockID        string `json:"blockId"`
	IdempotencyKey string `json:"idempotencyKey"`
}

type RunPassAll

type RunPassAll struct {
	RunID string              `json:"runId"`
	Steps []runs.StepRevision `json:"steps"`
}

type RunStart

type RunStart struct {
	HistoryPolicy  string `json:"historyPolicy,omitempty"`
	TestCaseID     string `json:"testCaseId"`
	EnvironmentID  string `json:"environmentId"`
	Revision       int64  `json:"revision"`
	ExecuteAll     bool   `json:"executeAll,omitempty"`
	IdempotencyKey string `json:"idempotencyKey"`
}

type RunStepUpdate

type RunStepUpdate struct {
	RunID    string `json:"runId"`
	StepID   string `json:"stepId"`
	Revision int64  `json:"revision"`
	Status   string `json:"status"`
	Comment  string `json:"comment"`
}

type RunsList

type RunsList struct {
	Page
	TestCaseID string `json:"testCaseId"`
	Retained   *bool  `json:"retained,omitempty"`
	Active     bool   `json:"active,omitempty"`
}

type SecretChanges

type SecretChanges struct {
	Replace map[string]string `json:"replace,omitempty"`
	Clear   []string          `json:"clear,omitempty"`
}

type Server

type Server struct {
	SDK       *mcp.Server
	Artifacts *ArtifactStore
	// contains filtered or unexported fields
}

func New

func New(options Options) *Server

func (*Server) Handler

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

func (*Server) Manifest

func (s *Server) Manifest() []*mcp.Tool

type Status

type Status struct {
	Status          string           `json:"status"`
	Protocols       []string         `json:"protocols"`
	ClipboardNative bool             `json:"clipboardNative"`
	Limits          map[string]int64 `json:"limits"`
}

type StepExecute added in v1.0.1

type StepExecute struct {
	RunID          string `json:"runId"`
	StepID         string `json:"stepId"`
	IdempotencyKey string `json:"idempotencyKey"`
}

type Summary

type Summary struct {
	ID         string `json:"id,omitempty"`
	State      string `json:"state,omitempty"`
	Status     string `json:"status,omitempty"`
	NextCursor string `json:"nextCursor,omitempty"`
}

type ToolError

type ToolError struct {
	Code        string            `json:"code"`
	Message     string            `json:"message"`
	FieldErrors map[string]string `json:"fieldErrors,omitempty"`
	RequestID   string            `json:"requestId"`
}

type Update

type Update struct {
	IDInput
	Name     *string `json:"name,omitempty"`
	Archived *bool   `json:"archived,omitempty"`
}

type VariablesSet

type VariablesSet struct {
	IDInput
	HTTPVariables resources.HTTPVariables `json:"httpVariables,omitempty"`
	Revision      int64                   `json:"revision"`
	Variables     map[string]string       `json:"variables"`
	Secrets       SecretChanges           `json:"secrets,omitempty"`
}

type VariantAttemptStart

type VariantAttemptStart struct {
	RunID          string `json:"runId"`
	VariantID      string `json:"variantId"`
	Revision       int64  `json:"revision"`
	IdempotencyKey string `json:"idempotencyKey"`
}

type VariantCreate

type VariantCreate struct {
	RunID   string `json:"runId"`
	BlockID string `json:"blockId"`
	Name    string `json:"name,omitempty"`
}

type VariantUpdate

type VariantUpdate struct {
	RunID     string          `json:"runId"`
	VariantID string          `json:"variantId"`
	Name      string          `json:"name,omitempty"`
	Revision  int64           `json:"revision"`
	Request   ResearchRequest `json:"request"`
}

Jump to

Keyboard shortcuts

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