Documentation
¶
Index ¶
- type ConfirmAdapter
- func (a *ConfirmAdapter) CreateBlocker() error
- func (a *ConfirmAdapter) DeletePlan() error
- func (a *ConfirmAdapter) HasBlocker() bool
- func (a *ConfirmAdapter) IsPlanExpired() bool
- func (a *ConfirmAdapter) ReadPlan() (*ports.OperationPlan, error)
- func (a *ConfirmAdapter) RemoveBlocker() error
- func (a *ConfirmAdapter) WritePlan(plan ports.OperationPlan) error
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.