05ae530442
Install current verified harness releases inside Docker, preserve persistent accounts and settings, and provide separate interactive and pipeline model defaults with terminal onboarding and fuzzy pickers. Add Docker-aware authoring transport, Pi stage execution, bounded workflow controls, reliable final-result readback and usage settlement, and finite short-lived CLI pipe draining. Keep dated installation evidence and packaged authoring guidance consistent. Verified with a real Docker installation, both harness stages and interactive authors, the built-in plan/implement/review starter, independent host race/vet checks, installer tests, and packaged skill tests. Generated release receipts stay ignored in clean checkouts.
47 lines
1.6 KiB
Go
47 lines
1.6 KiB
Go
package tui
|
|
|
|
import (
|
|
"fmt"
|
|
"git.a-wan.net/alan/pipelines/internal/protocol"
|
|
tea "github.com/charmbracelet/bubbletea"
|
|
)
|
|
|
|
func (m Model) updateActionConfirm(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
|
|
switch msg.String() {
|
|
case "esc", "n":
|
|
m.actionConfirm = nil
|
|
return m, nil
|
|
case "y":
|
|
request := *m.actionConfirm
|
|
m.actionConfirm = nil
|
|
m.actionApproved = true
|
|
return m.sendRunRequest(request)
|
|
case "j", "down", "pgdown":
|
|
m.actionConfirmTop++
|
|
case "k", "up", "pgup":
|
|
m.actionConfirmTop = max(0, m.actionConfirmTop-1)
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (m Model) confirmMutation(title string, cmd func() tea.Cmd) (tea.Model, tea.Cmd) {
|
|
m.mutationTitle = title
|
|
m.mutationCommand = cmd
|
|
m.mutationTop = 0
|
|
return m, nil
|
|
}
|
|
|
|
func (m Model) actionConfirmView(height int) string {
|
|
r := m.actionConfirm
|
|
lines := []string{"Start pipeline run?", fmt.Sprintf("Pipeline #%d · v%d", r.PipelineID, r.Version), "Directory: " + r.Workspace,
|
|
"This may edit files, execute commands and publish notifications."}
|
|
if r.Type == protocol.RetryRun {
|
|
lines = []string{fmt.Sprintf("Retry failed run #%d?", r.RunID), "Starts a NEW run from the entry stage with fresh configured-harness sessions.",
|
|
"Reuses the original input, directory, pinned version and edit scope.", "Previous side effects are not undone; commands/notifications may repeat."}
|
|
}
|
|
if r.Type == protocol.CancelRun {
|
|
lines = []string{fmt.Sprintf("Cancel run #%d?", r.RunID), "Stops execution and interrupts its active agent.", "Sessions/history are retained; previous side effects are not undone."}
|
|
}
|
|
return wrappedDialog(m.width, height, 96, lines[0], lines[1:], "y confirm · n / Esc cancel", m.actionConfirmTop)
|
|
}
|