smartbuild

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package smartbuild implements the smart_build tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(ctx context.Context, _ *mcp.CallToolRequest, args Params) (*mcp.CallToolResult, any, error)

Handler executes the smart_build tool.

func Register

func Register(server *mcp.Server)

Register registers the tool with the server.

Types

type Params

type Params struct {
	Dir      string `json:"dir" jsonschema:"The absolute directory path to build in. Required."`
	Packages string `json:"packages,omitempty" jsonschema:"Packages to build (default: ./...)"`
	Output   string `json:"output,omitempty" jsonschema:"The build output binary target path (-o)."`
}

Params defines the input parameters.

type Runner

type Runner interface {
	Run(ctx context.Context, dir, name string, args ...string) error
	RunWithOutput(ctx context.Context, dir, name string, args ...string) (string, error)
	LookPath(file string) (string, error)
}

Runner defines the interface for running commands.

var CommandRunner Runner = &stdRunner{}

CommandRunner is used to execute CLI commands.

Jump to

Keyboard shortcuts

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