Documentation
¶
Index ¶
- func CheckBashSafety(command string, cfg config.BashConfig) string
- func DetectFormatter(path string) (formatter string, command string)
- func DetectLinter(basePath string) (linterName, checkCmd, fixCmd string)
- func DetectTestFramework(path string) (framework string, command string)
- func ExecuteBash(command string) string
- func ExecuteBashWithContext(ctx context.Context, command string) string
- func ExecuteFormat(path string) (string, string, error)
- func ExecuteHTTPRequest(method, url, headers, body string, timeoutSec int) (string, error)
- func ExecuteLint(path, autoFixStr string) (string, string, error)
- func ExecuteRunTest(path string) string
- func IsSafeCommand(command string, cfg config.BashConfig) bool
- func RegisterTools(registry *tools.Registry)
- type BashTool
- type FormatTool
- type HTTPRequestTool
- type HTTPResponse
- type LintTool
- type RunTestTool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBashSafety ¶
func CheckBashSafety(command string, cfg config.BashConfig) string
CheckBashSafety performs safety level checks Returns error message if check fails, empty string otherwise
func DetectFormatter ¶
DetectFormatter detects available formatter It searches the given path and parent directories for project config files
func DetectLinter ¶
DetectLinter detects available linter for the project
func DetectTestFramework ¶
DetectTestFramework detects available test framework It searches the given path and parent directories for project config files
func ExecuteBashWithContext ¶ added in v0.43.0
ExecuteBashWithContext はContext対応でシェルコマンドを実行 コンテキストがキャンセルされた場合、部分結果を返す
func ExecuteFormat ¶
ExecuteFormat runs formatter with auto-detection
func ExecuteHTTPRequest ¶
ExecuteHTTPRequest はHTTPリクエストを実行 method: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS url: リクエスト先URL headers: リクエストヘッダー(JSON形式) body: リクエストボディ timeout: タイムアウト秒数(デフォルト: 30)
func ExecuteLint ¶
ExecuteLint runs linter with optional auto-fix
func ExecuteRunTest ¶
ExecuteRunTest runs tests with auto-detection
func IsSafeCommand ¶
func IsSafeCommand(command string, cfg config.BashConfig) bool
IsSafeCommand checks if a command is safe
func RegisterTools ¶
RegisterTools registers all dev tools to the registry
Types ¶
type FormatTool ¶
type FormatTool struct{}
FormatTool runs code formatter
func (*FormatTool) Name ¶
func (t *FormatTool) Name() string
func (*FormatTool) Run ¶
func (t *FormatTool) Run(args map[string]string) (string, *tools.FileChange, error)
type HTTPRequestTool ¶
type HTTPRequestTool struct{}
HTTPRequestTool executes HTTP requests
func (*HTTPRequestTool) Name ¶
func (t *HTTPRequestTool) Name() string
func (*HTTPRequestTool) Run ¶
func (t *HTTPRequestTool) Run(args map[string]string) (string, *tools.FileChange, error)
type HTTPResponse ¶
type HTTPResponse struct {
StatusCode int `json:"status_code"`
Status string `json:"status"`
Headers map[string]string `json:"headers"`
Body string `json:"body"`
Duration string `json:"duration"`
}
HTTPResponse はHTTPリクエストの結果
type RunTestTool ¶
type RunTestTool struct{}
RunTestTool runs tests with auto-detection
func (*RunTestTool) Name ¶
func (t *RunTestTool) Name() string
func (*RunTestTool) Run ¶
func (t *RunTestTool) Run(args map[string]string) (string, *tools.FileChange, error)