git

package
v0.1.5-beta Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfirmAdapter

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

ConfirmAdapter implements ports.ConfirmPort for any git operation requiring confirmation. It persists state to disk so the plan survives between MCP tool calls.

func NewConfirmAdapter

func NewConfirmAdapter(workDir string) *ConfirmAdapter

NewConfirmAdapter creates a ConfirmAdapter backed by files in workDir/.gcourer/

func (*ConfirmAdapter) CreateBlocker

func (a *ConfirmAdapter) CreateBlocker() error

CreateBlocker creates the blocker file that signals a pending approval.

func (*ConfirmAdapter) DeletePlan

func (a *ConfirmAdapter) DeletePlan() error

DeletePlan removes the plan file and blocker. Idempotent.

func (*ConfirmAdapter) HasBlocker

func (a *ConfirmAdapter) HasBlocker() bool

HasBlocker returns true if the blocker file exists (pending approval).

func (*ConfirmAdapter) IsPlanExpired

func (a *ConfirmAdapter) IsPlanExpired() bool

IsPlanExpired returns true if the plan file is older than the TTL.

func (*ConfirmAdapter) ReadPlan

func (a *ConfirmAdapter) ReadPlan() (*ports.OperationPlan, error)

ReadPlan reads the persisted plan. Returns nil, nil if no plan exists.

func (*ConfirmAdapter) RemoveBlocker

func (a *ConfirmAdapter) RemoveBlocker() error

RemoveBlocker deletes the blocker file. Idempotent.

func (*ConfirmAdapter) WritePlan

func (a *ConfirmAdapter) WritePlan(plan ports.OperationPlan) error

WritePlan persists the plan atomically to disk.

Jump to

Keyboard shortcuts

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