6ee86f259390c351bb4ba432a18dcf3c5c008b38
archie-core-via. internal/infrastructure/configuration/setup defines Prompter -- Select, ReadLine, ReadSecret, Confirm, all context-aware -- which is all the setup step logic (to follow) needs from a prompt surface. No terminal dependency, so steps are testable without a TTY. internal/infrastructure/terminalprompt.Terminal is the real implementation, using golang.org/x/term. New refuses construction when its input isn't a real terminal, with a message naming the problem -- enforcing "a non-TTY invocation fails with a clear message rather than writing a partial config" at the earliest possible point, rather than falling back to a plain read that would silently accept piped/scripted input (ssh, `archied setup < answers.txt`, CI). Terminal satisfies Prompter structurally; this package does not import that one, so there's no infrastructure -> infrastructure edge for what Go's type system already gives for free. Each blocking read runs in a goroutine raced against ctx.Done(), so Ctrl+C returns promptly instead of leaving the operator stuck; the losing goroutine is abandoned on cancellation; term.ReadPassword's own raw-mode restoration is not interruptible, so an abandoned secret read can leave the terminal in raw mode until it unblocks on its own -- documented on Terminal.readSecret rather than worked around, since a cancelled setup command is expected to exit shortly after via its own signal handling anyway. Tested by constructing a Terminal directly (bypassing New, same package) over a plain pipe with an injected readSecret seam -- New's TTY gate itself is exercised separately against a real os.Pipe(). No weakening of the production constructor for testability. Refs archie-core-via
Description
Archie connects events from your systems to agents that can investigate, reason, and act.
Define what an event means, map its data into a workflow, and give that workflow an agent equipped for the job: its own execution environment, tools, and identity.
https://archie.catlow.cloud
133 MiB
0 Stars
1 Watchers
0 Forks
Releases
11
Archie v1.62.0
Latest
Languages
Go
76.8%
Vue
13.1%
TypeScript
7.8%
JavaScript
1.2%
Shell
0.6%
Other
0.4%