git

package
v0.1.4-beta Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 6 Imported by: 0

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