Documentation
¶
Index ¶
- Constants
- type CommandExecutor
- type CurrentContext
- type ExecutableFilter
- type ExecutableListOutput
- type ExecutableOutput
- type ExecutionOutput
- type FlowCLIExecutor
- type FlowInfoOutput
- type LogEntry
- type LogListOutput
- type SchemaURLs
- type Server
- type SwitchWorkspaceOutput
- type SyncOutput
- type WorkspaceConfigOutput
- type WorkspaceListOutput
- type WorkspaceOutput
- type WriteFlowFileOutput
Constants ¶
const ( ErrCodeInvalidInput = flowerrors.ErrCodeInvalidInput ErrCodeNotFound = flowerrors.ErrCodeNotFound ErrCodeExecutionFailed = flowerrors.ErrCodeExecutionFailed ErrCodeTimeout = flowerrors.ErrCodeTimeout ErrCodeCancelled = flowerrors.ErrCodeCancelled ErrCodeValidationFailed = flowerrors.ErrCodeValidationFailed ErrCodeInternal = flowerrors.ErrCodeInternal ErrCodePermissionDenied = flowerrors.ErrCodePermissionDenied )
Machine-readable error codes for structured error responses. Aliased from pkg/errors so the CLI and MCP surfaces share a single source of truth.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandExecutor ¶
type CurrentContext ¶
type ExecutableFilter ¶
type ExecutableListOutput ¶
type ExecutableListOutput struct {
Executables []ExecutableOutput `json:"executables"`
NextCursor string `json:"nextCursor,omitempty"`
TotalCount int `json:"totalCount"`
}
ExecutableListOutput is the output of the list_executables tool.
type ExecutableOutput ¶
type ExecutableOutput struct {
ID string `json:"id"`
Ref string `json:"ref"`
Name string `json:"name"`
Namespace string `json:"namespace"`
Workspace string `json:"workspace"`
FlowFile string `json:"flowfile"`
Description string `json:"description,omitempty"`
FullDescription string `json:"fullDescription,omitempty"`
Verb string `json:"verb"`
Visibility string `json:"visibility,omitempty"`
Timeout string `json:"timeout,omitempty"`
Tags []string `json:"tags,omitempty"`
Aliases []string `json:"aliases,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}
ExecutableOutput is the output of the get_executable tool.
type ExecutionOutput ¶
type ExecutionOutput struct {
Output string `json:"output"`
}
ExecutionOutput is the output of the execute tool.
type FlowCLIExecutor ¶
type FlowCLIExecutor struct{}
FlowCLIExecutor runs the flow CLI with provided arguments. The CLI is being executed instead of importing the internal flow package directly to avoid duplicating the code that's defined in the cmd package, to make testing easier, and to avoid having to refactor the Context obj which is not currently designed in a way to be copied/reused across "executions". Maybe consider refactoring this when the context is refactored.
The binary name can be overridden by setting the FLOW_CLI_BINARY environment variable.
func (*FlowCLIExecutor) ExecuteContext ¶
type FlowInfoOutput ¶
type FlowInfoOutput struct {
CurrentContext CurrentContext `json:"currentContext"`
// Summary is a compact platform description suitable for context priming.
Summary string `json:"summary"`
// DocsURL is the root of the hosted documentation site.
DocsURL string `json:"docsUrl"`
// LLMsTxtURL points to the llms.txt index of docs pages (per https://llmstxt.org/).
LLMsTxtURL string `json:"llmsTxtUrl"`
// SchemaURLs maps each file type to its JSON schema URL.
SchemaURLs SchemaURLs `json:"schemaUrls"`
// GuideURLs maps key topic names to their documentation URL.
GuideURLs map[string]string `json:"guideUrls"`
}
FlowInfoOutput is the output of the get_info tool.
This is intentionally lightweight — the full concepts/file-types guides and JSON schemas are NOT embedded by default to avoid consuming large amounts of LLM context. Clients should fetch the docs index (llms.txt) and individual guide pages as needed.
type LogEntry ¶
type LogEntry struct {
Ref string `json:"ref"`
StartedAt string `json:"startedAt"`
Duration string `json:"duration"`
ExitCode int `json:"exitCode"`
Error string `json:"error,omitempty"`
LogFile string `json:"logFile,omitempty"`
}
LogEntry represents a single execution log record.
type LogListOutput ¶
type LogListOutput struct {
History []LogEntry `json:"history"`
NextCursor string `json:"nextCursor,omitempty"`
TotalCount int `json:"totalCount"`
}
LogListOutput is the output of the get_execution_logs tool.
type SchemaURLs ¶
type SchemaURLs struct {
FlowFile string `json:"flowFile"`
Workspace string `json:"workspace"`
Template string `json:"template"`
Config string `json:"config"`
}
SchemaURLs lists the URLs of the JSON schemas for flow file types.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(executor CommandExecutor) *Server
func (*Server) GetMCPServer ¶
GetMCPServer returns the underlying MCP server for testing purposes
type SwitchWorkspaceOutput ¶
type SwitchWorkspaceOutput struct {
Output string `json:"output"`
}
SwitchWorkspaceOutput is the output of the switch_workspace tool.
type SyncOutput ¶
type SyncOutput struct {
Output string `json:"output"`
}
SyncOutput is the output of the sync_executables tool.
type WorkspaceConfigOutput ¶
type WorkspaceConfigOutput struct {
WorkspaceOutput
}
WorkspaceConfigOutput is the output of the get_workspace_config tool.
type WorkspaceListOutput ¶
type WorkspaceListOutput struct {
Workspaces []WorkspaceOutput `json:"workspaces"`
NextCursor string `json:"nextCursor,omitempty"`
TotalCount int `json:"totalCount"`
}
WorkspaceListOutput is the output of the list_workspaces tool.
type WorkspaceOutput ¶
type WorkspaceOutput struct {
Name string `json:"name"`
Path string `json:"path"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
FullDescription string `json:"fullDescription,omitempty"`
DescriptionFile string `json:"descriptionFile,omitempty"`
Tags []string `json:"tags,omitempty"`
EnvFiles []string `json:"envFiles,omitempty"`
Executables *ExecutableFilter `json:"executables,omitempty"`
VerbAliases map[string][]string `json:"verbAliases,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}
WorkspaceOutput is the output of the get_workspace tool.
type WriteFlowFileOutput ¶
type WriteFlowFileOutput struct {
Path string `json:"path"`
Executables []string `json:"executables"`
Overwritten bool `json:"overwritten"`
}
WriteFlowFileOutput is the output of the write_flowfile tool.