Documentation
¶
Index ¶
- type DirectoryEntry
- type FileSearchText
- type FileSearchTextInput
- type FileSearchTextOutput
- type FileVectorSearch
- type FileVectorSearchInput
- type FileVectorSearchOutput
- type FindFile
- type FindFileInput
- type FindFileOutput
- type FindFileResult
- type IndexWorkspaceInput
- type IndexWorkspaceOutput
- type Input
- type L1IndexerTools
- func (l *L1IndexerTools) All(ctx context.Context, _ *mcp.CallToolRequest, input IndexWorkspaceInput) (*mcp.CallToolResult, IndexWorkspaceOutput, error)
- func (l *L1IndexerTools) Embed(ctx context.Context, _ *mcp.CallToolRequest, input IndexWorkspaceInput) (*mcp.CallToolResult, IndexWorkspaceOutput, error)
- func (l *L1IndexerTools) Scan(ctx context.Context, _ *mcp.CallToolRequest, input IndexWorkspaceInput) (*mcp.CallToolResult, IndexWorkspaceOutput, error)
- type ListNodes
- type ListNodesInput
- type ListNodesOutput
- type ListWorkspaces
- type ListWorkspacesInput
- type ListWorkspacesOutput
- type NodeRegister
- type NodeRegisterInput
- type NodeRegisterOutput
- type NodeSummary
- type Output
- type PTYInput
- type PTYOutput
- type ReadWorkspaceFile
- type ReadWorkspaceFileInput
- type ReadWorkspaceFileOutput
- type TextMatch
- type VectorMatch
- type WorkspaceFile
- type WorkspaceRegister
- type WorkspaceRegisterInput
- type WorkspaceRegisterOutput
- type WorkspaceSearchText
- type WorkspaceSearchTextInput
- type WorkspaceSearchTextOutput
- type WorkspaceSummary
- type WorkspaceTree
- type WorkspaceTreeInput
- type WorkspaceTreeOutput
- type WorkspaceVectorMatch
- type WorkspaceVectorSearch
- type WorkspaceVectorSearchInput
- type WorkspaceVectorSearchOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirectoryEntry ¶
type FileSearchText ¶
func (*FileSearchText) Search ¶
func (s *FileSearchText) Search(ctx context.Context, _ *mcp.CallToolRequest, input FileSearchTextInput) (*mcp.CallToolResult, FileSearchTextOutput, error)
type FileSearchTextInput ¶
type FileSearchTextInput struct {
WorkspaceID string `json:"workspaceId" jsonschema:"workspace identifier"`
RelPath string `json:"relpath" jsonschema:"file path relative to workspace root"`
Query string `json:"query" jsonschema:"exact text snippet to find"`
CaseSensitive bool `json:"caseSensitive,omitempty" jsonschema:"if true, match is case-sensitive"`
Limit int `json:"limit,omitempty" jsonschema:"max matches to return (default 20)"`
}
type FileSearchTextOutput ¶
type FileSearchTextOutput struct {
Matches []TextMatch `json:"matches" jsonschema:"list of matches within the file"`
}
type FileVectorSearch ¶
func (*FileVectorSearch) Search ¶
func (s *FileVectorSearch) Search(ctx context.Context, _ *mcp.CallToolRequest, input FileVectorSearchInput) (*mcp.CallToolResult, FileVectorSearchOutput, error)
type FileVectorSearchInput ¶
type FileVectorSearchInput struct {
WorkspaceID string `json:"workspaceId" jsonschema:"workspace identifier"`
RelPath string `json:"relpath" jsonschema:"file path relative to workspace root"`
Query string `json:"query" jsonschema:"natural language query"`
TopK int `json:"topK,omitempty" jsonschema:"number of matches to return (default 5, max 20)"`
ModelID string `json:"modelId,omitempty" jsonschema:"override vector model slug"`
}
type FileVectorSearchOutput ¶
type FileVectorSearchOutput struct {
Matches []VectorMatch `json:"matches" jsonschema:"ranked vector matches"`
}
type FindFile ¶
func (*FindFile) Search ¶
func (f *FindFile) Search(ctx context.Context, _ *mcp.CallToolRequest, input FindFileInput) (*mcp.CallToolResult, FindFileOutput, error)
type FindFileInput ¶
type FindFileInput struct {
WorkspaceID string `json:"workspaceId" jsonschema:"workspace identifier"`
Query string `json:"query" jsonschema:"exact match or substring to look for"`
MatchType string `json:"matchType,omitempty" jsonschema:"exact | substring | prefix | suffix"`
Limit int `json:"limit,omitempty" jsonschema:"maximum number of results to return"`
}
type FindFileOutput ¶
type FindFileOutput struct {
Results []FindFileResult `json:"results" jsonschema:"matching files"`
}
type FindFileResult ¶
type IndexWorkspaceInput ¶
type IndexWorkspaceInput struct {
WorkspaceRoot string `json:"workspaceRoot" jsonschema:"absolute path to the workspace root"`
WorkspaceID string `json:"workspaceId" jsonschema:"stable workspace identifier"`
RunID string `json:"runId,omitempty" jsonschema:"optional deterministic run id"`
}
IndexWorkspaceInput contains required fields for L1 steps.
type IndexWorkspaceOutput ¶
IndexWorkspaceOutput wraps the run report.
type L1IndexerTools ¶
L1IndexerTools exposes MCP handlers for workspace indexing.
func (*L1IndexerTools) All ¶
func (l *L1IndexerTools) All(ctx context.Context, _ *mcp.CallToolRequest, input IndexWorkspaceInput) (*mcp.CallToolResult, IndexWorkspaceOutput, error)
All orchestrates the full pipeline.
func (*L1IndexerTools) Embed ¶
func (l *L1IndexerTools) Embed(ctx context.Context, _ *mcp.CallToolRequest, input IndexWorkspaceInput) (*mcp.CallToolResult, IndexWorkspaceOutput, error)
Embed handles index.workspace.embed.
func (*L1IndexerTools) Scan ¶
func (l *L1IndexerTools) Scan(ctx context.Context, _ *mcp.CallToolRequest, input IndexWorkspaceInput) (*mcp.CallToolResult, IndexWorkspaceOutput, error)
Scan handles index.workspace.scan.
type ListNodes ¶
func (*ListNodes) List ¶
func (l *ListNodes) List(ctx context.Context, _ *mcp.CallToolRequest, input ListNodesInput) (*mcp.CallToolResult, ListNodesOutput, error)
type ListNodesInput ¶
type ListNodesInput struct {
Kind string `json:"kind,omitempty" jsonschema:"OPTIONAL, NOT IMPLEMENTED node kind (pc, vm, etc.)"`
}
type ListNodesOutput ¶
type ListNodesOutput struct {
Nodes []NodeSummary `json:"nodes" jsonschema:"registered nodes"`
}
type ListWorkspaces ¶
func (*ListWorkspaces) List ¶
func (l *ListWorkspaces) List(ctx context.Context, _ *mcp.CallToolRequest, input ListWorkspacesInput) (*mcp.CallToolResult, ListWorkspacesOutput, error)
type ListWorkspacesInput ¶
type ListWorkspacesOutput ¶
type ListWorkspacesOutput struct {
Workspaces []WorkspaceSummary `json:"workspaces"`
}
type NodeRegister ¶
func (*NodeRegister) Register ¶
func (n *NodeRegister) Register(ctx context.Context, _ *mcp.CallToolRequest, input NodeRegisterInput) (*mcp.CallToolResult, NodeRegisterOutput, error)
type NodeRegisterInput ¶
type NodeRegisterInput struct {
NodeID string `json:"nodeId" jsonschema:"stable identifier for node"`
Name string `json:"name,omitempty" jsonschema:"display name; defaults to nodeId"`
Kind string `json:"kind,omitempty" jsonschema:"kind of node (pc, vm, arm, etc.)"`
OS string `json:"os,omitempty" jsonschema:"operating system summary"`
CPU string `json:"cpu,omitempty" jsonschema:"cpu model summary"`
RAMGB *int `json:"ramGb,omitempty" jsonschema:"ram size in GB"`
Labels []string `json:"labels,omitempty" jsonschema:"optional free-form labels"`
}
type NodeRegisterOutput ¶
type NodeRegisterOutput struct {
Node string `json:"node"`
}
type NodeSummary ¶
type NodeSummary struct {
ID string `json:"id" jsonschema:"node record id"`
Name string `json:"name" jsonschema:"display name"`
Kind string `json:"kind,omitempty" jsonschema:"node kind (pc, vm, etc.)"`
OS string `json:"os,omitempty" jsonschema:"operating system"`
CPU string `json:"cpu,omitempty" jsonschema:"cpu model"`
RAMGB int `json:"ramGb,omitempty" jsonschema:"RAM in GB"`
Labels []string `json:"labels,omitempty" jsonschema:"free-form labels"`
}
type Output ¶
type Output struct {
Stdout string `json:"stdout" jsonschema:"captured standard output"`
Stderr string `json:"stderr,omitempty" jsonschema:"captured standard error"`
ExitCode int `json:"exitCode" jsonschema:"process exit code"`
Error string `json:"error,omitempty" jsonschema:"error message if execution failed"`
}
func ExecCommand ¶
func ExecCommand(ctx context.Context, _ *mcp.CallToolRequest, input Input) ( *mcp.CallToolResult, Output, error, )
type PTYInput ¶
type PTYInput struct {
Action string `` /* 128-byte string literal not displayed */
SessionID string `json:"sessionId,omitempty" jsonschema:"identifier of an existing PTY session"`
Command string `json:"command,omitempty" jsonschema:"optional command to execute when opening a new PTY; prefer default (the host shell)"`
Args []string `json:"args,omitempty" jsonschema:"arguments passed to the PTY command on open"`
Data string `json:"data,omitempty" jsonschema:"payload written to the PTY when action=write"`
AppendNewline *bool `json:"appendNewline,omitempty" jsonschema:"when writing, append a newline (defaults to true if data present)"`
Rows uint16 `json:"rows,omitempty" jsonschema:"terminal rows for open/resize"`
Cols uint16 `json:"cols,omitempty" jsonschema:"terminal columns for open/resize"`
Force bool `json:"force,omitempty" jsonschema:"when opening, terminate any existing PTY first"`
}
type PTYOutput ¶
type PTYOutput struct {
SessionID string `json:"sessionId" jsonschema:"MCP session id controlling this PTY"`
Output string `json:"output,omitempty" jsonschema:"new data captured from the PTY since the last call"`
Plain string `json:"plain,omitempty" jsonschema:"output with ANSI escape sequences stripped"`
Started bool `json:"started,omitempty" jsonschema:"true if a PTY was started by this call"`
Closed bool `json:"closed,omitempty" jsonschema:"true if the PTY was closed by this call"`
Exited bool `json:"exited,omitempty" jsonschema:"true if the PTY process has exited"`
ExitCode int `json:"exitCode,omitempty" jsonschema:"exit code reported by the PTY process"`
Error string `json:"error,omitempty" jsonschema:"error message when the action failed"`
}
type ReadWorkspaceFile ¶
func (*ReadWorkspaceFile) Read ¶
func (r *ReadWorkspaceFile) Read(ctx context.Context, _ *mcp.CallToolRequest, input ReadWorkspaceFileInput) (*mcp.CallToolResult, ReadWorkspaceFileOutput, error)
type ReadWorkspaceFileInput ¶
type ReadWorkspaceFileInput struct {
WorkspaceID string `json:"workspaceId" jsonschema:"workspace identifier"`
RelPath string `json:"relPath" jsonschema:"file path relative to workspace root"`
Start int `json:"start" jsonschema:"start character offset (0-based)"`
End int `json:"end" jsonschema:"end character offset (exclusive)"`
Hex bool `json:"hex,omitempty" jsonschema:"when true, read as hex-encoded bytes and count hex characters"`
}
type ReadWorkspaceFileOutput ¶
type ReadWorkspaceFileOutput struct {
RelPath string `json:"relPath" jsonschema:"file path relative to workspace root"`
Chunk string `json:"chunk" jsonschema:"requested slice of the file contents"`
Hex bool `json:"hex" jsonschema:"true if hex mode was used"`
Truncated bool `json:"truncated" jsonschema:"true if output was truncated for transport size"`
}
type VectorMatch ¶
type VectorMatch struct {
Score float64 `json:"score" jsonschema:"cosine similarity score"`
ContentSHA string `json:"contentSha" jsonschema:"hash of the matched chunk"`
Start int `json:"start" jsonschema:"chunk start byte offset"`
End int `json:"end" jsonschema:"chunk end byte offset"`
TokenCount int `json:"tokenCount" jsonschema:"token count for the chunk"`
Snippet string `json:"snippet" jsonschema:"text snippet of the chunk"`
}
type WorkspaceFile ¶
type WorkspaceFile struct {
RelPath string `json:"relpath" jsonschema:"path relative to workspace root"`
Name string `json:"name" jsonschema:"file name"`
Directory string `json:"directory" jsonschema:"parent directory relpath"`
Lang string `json:"lang,omitempty" jsonschema:"language hint"`
Size int64 `json:"size" jsonschema:"file size in bytes"`
MTime time.Time `json:"mtime" jsonschema:"modification time (UTC)"`
SHA string `json:"sha" jsonschema:"content hash"`
}
type WorkspaceRegister ¶
func (*WorkspaceRegister) Register ¶
func (w *WorkspaceRegister) Register(ctx context.Context, _ *mcp.CallToolRequest, input WorkspaceRegisterInput) (*mcp.CallToolResult, WorkspaceRegisterOutput, error)
type WorkspaceRegisterInput ¶
type WorkspaceRegisterOutput ¶
type WorkspaceSearchText ¶
func (*WorkspaceSearchText) Search ¶
func (s *WorkspaceSearchText) Search(ctx context.Context, _ *mcp.CallToolRequest, input WorkspaceSearchTextInput) (*mcp.CallToolResult, WorkspaceSearchTextOutput, error)
type WorkspaceSearchTextInput ¶
type WorkspaceSearchTextInput struct {
WorkspaceID string `json:"workspaceId" jsonschema:"workspace identifier"`
Query string `json:"query" jsonschema:"exact text snippet to find"`
CaseSensitive bool `json:"caseSensitive,omitempty" jsonschema:"if true, match is case-sensitive"`
Limit int `json:"limit,omitempty" jsonschema:"max number of matches (default 20)"`
MaxFileBytes int64 `json:"maxFileBytes,omitempty" jsonschema:"skip files larger than this many bytes (default 1048576)"`
}
type WorkspaceSearchTextOutput ¶
type WorkspaceSearchTextOutput struct {
Matches []TextMatch `json:"matches" jsonschema:"list of file matches"`
}
type WorkspaceSummary ¶
type WorkspaceTree ¶
func (*WorkspaceTree) List ¶
func (t *WorkspaceTree) List(ctx context.Context, _ *mcp.CallToolRequest, input WorkspaceTreeInput) (*mcp.CallToolResult, WorkspaceTreeOutput, error)
type WorkspaceTreeInput ¶
type WorkspaceTreeInput struct {
WorkspaceID string `json:"workspaceId" jsonschema:"workspace identifier"`
}
type WorkspaceTreeOutput ¶
type WorkspaceTreeOutput struct {
WorkspaceID string `json:"workspaceId" jsonschema:"workspace identifier"`
Directories []DirectoryEntry `json:"directories" jsonschema:"all directories with parent references"`
Files []WorkspaceFile `json:"files" jsonschema:"all files with directory references"`
}
type WorkspaceVectorMatch ¶
type WorkspaceVectorMatch struct {
Score float64 `json:"score" jsonschema:"cosine similarity score"`
File string `json:"file" jsonschema:"file relpath"`
Start int `json:"start" jsonschema:"chunk start byte"`
End int `json:"end" jsonschema:"chunk end byte"`
TokenCount int `json:"tokenCount" jsonschema:"chunk token count"`
ContentSHA string `json:"contentSha" jsonschema:"chunk content hash"`
}
type WorkspaceVectorSearch ¶
func (*WorkspaceVectorSearch) Search ¶
func (s *WorkspaceVectorSearch) Search(ctx context.Context, _ *mcp.CallToolRequest, input WorkspaceVectorSearchInput) (*mcp.CallToolResult, WorkspaceVectorSearchOutput, error)
type WorkspaceVectorSearchInput ¶
type WorkspaceVectorSearchInput struct {
WorkspaceID string `json:"workspaceId" jsonschema:"workspace identifier"`
Query string `json:"query" jsonschema:"natural language query"`
TopK int `json:"topK,omitempty" jsonschema:"number of results (default 5, max 50)"`
ModelID string `json:"modelId,omitempty" jsonschema:"vector model slug override"`
FileFilter []string `json:"fileFilter,omitempty" jsonschema:"optional list of file relpaths to include"`
}
type WorkspaceVectorSearchOutput ¶
type WorkspaceVectorSearchOutput struct {
Matches []WorkspaceVectorMatch `json:"matches" jsonschema:"ranked vector matches across workspace"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.