tools

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentBranch

func CurrentBranch(ctx context.Context) (string, error)

func PushBranch

func PushBranch(ctx context.Context) (string, error)

func RepoRoot

func RepoRoot(ctx context.Context) (string, error)

func RunGit

func RunGit(ctx context.Context, args ...string) (string, error)

Types

type CreatePRTool

type CreatePRTool struct {
	Base string
}

func (CreatePRTool) Description

func (t CreatePRTool) Description() string

func (CreatePRTool) Execute

func (t CreatePRTool) Execute(ctx context.Context, input string) (string, error)

func (CreatePRTool) Name

func (t CreatePRTool) Name() string

func (CreatePRTool) RiskLevel

func (t CreatePRTool) RiskLevel() approval.RiskLevel

type FetchHotspotsTool

type FetchHotspotsTool struct{}

func (FetchHotspotsTool) Description

func (t FetchHotspotsTool) Description() string

func (FetchHotspotsTool) Execute

func (t FetchHotspotsTool) Execute(ctx context.Context, input string) (string, error)

func (FetchHotspotsTool) Name

func (t FetchHotspotsTool) Name() string

func (FetchHotspotsTool) RiskLevel

func (t FetchHotspotsTool) RiskLevel() approval.RiskLevel

type GitCommitTool

type GitCommitTool struct{}

func (GitCommitTool) Description

func (t GitCommitTool) Description() string

func (GitCommitTool) Execute

func (t GitCommitTool) Execute(ctx context.Context, message string) (string, error)

func (GitCommitTool) Name

func (t GitCommitTool) Name() string

func (GitCommitTool) RiskLevel

func (t GitCommitTool) RiskLevel() approval.RiskLevel

type GitDiffTool

type GitDiffTool struct{}

func (GitDiffTool) Description

func (t GitDiffTool) Description() string

func (GitDiffTool) Execute

func (t GitDiffTool) Execute(ctx context.Context, input string) (string, error)

func (GitDiffTool) Name

func (t GitDiffTool) Name() string

func (GitDiffTool) RiskLevel

func (t GitDiffTool) RiskLevel() approval.RiskLevel

type GitFetchTool

type GitFetchTool struct{}

func (GitFetchTool) Description

func (t GitFetchTool) Description() string

func (GitFetchTool) Execute

func (t GitFetchTool) Execute(ctx context.Context, _ string) (string, error)

func (GitFetchTool) Name

func (t GitFetchTool) Name() string

func (GitFetchTool) RiskLevel

func (t GitFetchTool) RiskLevel() approval.RiskLevel

type GitLogTool

type GitLogTool struct{}

func (GitLogTool) Description

func (t GitLogTool) Description() string

func (GitLogTool) Execute

func (t GitLogTool) Execute(ctx context.Context, input string) (string, error)

func (GitLogTool) Name

func (t GitLogTool) Name() string

func (GitLogTool) RiskLevel

func (t GitLogTool) RiskLevel() approval.RiskLevel

type GitMergeTool

type GitMergeTool struct {
	Base string
}

func (GitMergeTool) Description

func (t GitMergeTool) Description() string

func (GitMergeTool) Execute

func (t GitMergeTool) Execute(ctx context.Context, input string) (string, error)

func (GitMergeTool) Name

func (t GitMergeTool) Name() string

func (GitMergeTool) RiskLevel

func (t GitMergeTool) RiskLevel() approval.RiskLevel

type GitRebaseTool

type GitRebaseTool struct {
	Base string
}

func (GitRebaseTool) Description

func (t GitRebaseTool) Description() string

func (GitRebaseTool) Execute

func (t GitRebaseTool) Execute(ctx context.Context, input string) (string, error)

func (GitRebaseTool) Name

func (t GitRebaseTool) Name() string

func (GitRebaseTool) RiskLevel

func (t GitRebaseTool) RiskLevel() approval.RiskLevel

type GitStashTool

type GitStashTool struct{}

func (GitStashTool) Description

func (t GitStashTool) Description() string

func (GitStashTool) Execute

func (t GitStashTool) Execute(ctx context.Context, _ string) (string, error)

func (GitStashTool) Name

func (t GitStashTool) Name() string

func (GitStashTool) RiskLevel

func (t GitStashTool) RiskLevel() approval.RiskLevel

type GitStatusTool

type GitStatusTool struct{}

func (GitStatusTool) Description

func (t GitStatusTool) Description() string

func (GitStatusTool) Execute

func (t GitStatusTool) Execute(ctx context.Context, _ string) (string, error)

func (GitStatusTool) Name

func (t GitStatusTool) Name() string

func (GitStatusTool) RiskLevel

func (t GitStatusTool) RiskLevel() approval.RiskLevel

type PRInput

type PRInput struct {
	Title string
	Body  string
	Base  string
	Draft bool
}

type ParseConflictsTool

type ParseConflictsTool struct{}

func (ParseConflictsTool) Description

func (t ParseConflictsTool) Description() string

func (ParseConflictsTool) Execute

func (t ParseConflictsTool) Execute(ctx context.Context, file string) (string, error)

func (ParseConflictsTool) Name

func (t ParseConflictsTool) Name() string

func (ParseConflictsTool) RiskLevel

func (t ParseConflictsTool) RiskLevel() approval.RiskLevel

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Get

func (r *Registry) Get(name string) (Tool, bool)

func (*Registry) Names

func (r *Registry) Names() []string

func (*Registry) Register

func (r *Registry) Register(t Tool)

type ResolveConflictTool

type ResolveConflictTool struct{}

func (ResolveConflictTool) Description

func (t ResolveConflictTool) Description() string

func (ResolveConflictTool) Execute

func (t ResolveConflictTool) Execute(ctx context.Context, input string) (string, error)

func (ResolveConflictTool) Name

func (t ResolveConflictTool) Name() string

func (ResolveConflictTool) RiskLevel

func (t ResolveConflictTool) RiskLevel() approval.RiskLevel

type RunLintTool

type RunLintTool struct {
	Command string
}

func (RunLintTool) Description

func (t RunLintTool) Description() string

func (RunLintTool) Execute

func (t RunLintTool) Execute(ctx context.Context, _ string) (string, error)

func (RunLintTool) Name

func (t RunLintTool) Name() string

func (RunLintTool) RiskLevel

func (t RunLintTool) RiskLevel() approval.RiskLevel

type RunTestsTool

type RunTestsTool struct {
	Command string
}

func (RunTestsTool) Description

func (t RunTestsTool) Description() string

func (RunTestsTool) Execute

func (t RunTestsTool) Execute(ctx context.Context, _ string) (string, error)

func (RunTestsTool) Name

func (t RunTestsTool) Name() string

func (RunTestsTool) RiskLevel

func (t RunTestsTool) RiskLevel() approval.RiskLevel

type Tool

type Tool interface {
	Name() string
	Description() string
	Execute(ctx context.Context, input string) (string, error)
	RiskLevel() approval.RiskLevel
}

Jump to

Keyboard shortcuts

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