internal/adapters/cli/finalize
import "github.com/nilstate/scafld/v2/internal/adapters/cli/finalize"
Package finalize composes the scafld finalize CLI boundary.
Functions
func Handler(stdin io.Reader) func(context.Context, []string, io.Writer, io.Writer) int
Source: internal/adapters/cli/finalize/run.go:41
Handler returns a CLI-compatible handler for the host-facing finalize command.
func Run(ctx context.Context, args []string, stdin io.Reader, stdout io.Writer) error
Source: internal/adapters/cli/finalize/run.go:65
Run handles the public scafld finalize <task_id> command and the
scafld finalize --json --stdin child process invoked by the finalize MCP
transport. It composes the snapshot, acceptance, isolated review, and signing
adapters around the internal/app/finalize use case, then persists the signed
receipt, appends it to the session ledger, and marks the matching spec
complete when the receipt passes.
Types
type Request
Source: internal/adapters/cli/finalize/run.go:52
Request is the finalize stdin payload sent by the MCP transport.
type Request struct {
TaskID string `json:"task_id"`
Root string `json:"root,omitempty"`
BaseRef string `json:"base_ref,omitempty"`
ScopeHint []string `json:"scope_hint,omitempty"`
}Fields
TaskID string`json:"task_id"`Root string`json:"root,omitempty"`BaseRef string`json:"base_ref,omitempty"`ScopeHint []string`json:"scope_hint,omitempty"`
