Add comprehensive daemon mode support to pkg/cli:
- Mode detection (Interactive/Pipe/Daemon) based on TTY and CORE_DAEMON env
- TTY helpers using golang.org/x/term (IsTTY, IsStdinTTY, IsStderrTTY)
- PIDFile for single-instance enforcement with stale PID detection
- HealthServer with /health and /ready endpoints for orchestration
- Daemon lifecycle manager combining PID, health, and graceful shutdown
- SIGHUP support for configuration reloading in runtime.go
- Fix i18n.go type references (MissingKey, OnMissingKey)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add i18n service wrapping pkg/i18n for translations via cli.T()
- Add log service with levels (quiet/error/warn/info/debug)
- Wire cli.Init() in cmd.Execute() with explicit service names
- Fix main.go to print errors to stderr and exit with code 1
- Update runtime.go to accept additional services via Options
Services use WithName() to avoid name collision since both are
defined in pkg/cli (WithService would auto-name both "cli").
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- cli.Success(), cli.Error(), etc. now print directly
- String-returning versions renamed to cli.FmtSuccess(), etc.
- Removes App() from common usage path
- Usage: cli.Success("done") instead of fmt.Println(cli.Success("done"))
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Moves shared utilities (styles, utils) from cmd/shared to pkg/cli.
Adds CLI runtime with global singleton pattern:
- cli.Init() initialises the runtime
- cli.App() returns the global instance
- OutputService for styled terminal printing
- SignalService for graceful shutdown handling
All cmd/ packages now import pkg/cli instead of cmd/shared.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>