feat: wire login hook for Bitwarden unlock

The framework v1.9.0 added a Login command/hook to authenticate and
unlock Bitwarden. App.runBootstrap was not registering it, causing
"command not configured: login".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
thibaud-lclr 2026-05-11 11:36:12 +02:00
parent 801d7fbb95
commit ebd3a64522

View file

@ -137,6 +137,9 @@ func (a *App) runBootstrap(ctx context.Context, args []string) error {
Setup: func(ctx context.Context, inv frameworkbootstrap.Invocation) error {
return a.runConfig(ctx, frameworkbootstrap.CommandSetup, inv.Args)
},
Login: func(ctx context.Context, inv frameworkbootstrap.Invocation) error {
return a.runLogin(ctx, inv.Args)
},
MCP: func(ctx context.Context, inv frameworkbootstrap.Invocation) error {
return a.runMCP(ctx, inv.Args)
},
@ -238,6 +241,16 @@ func (a *App) runConfig(ctx context.Context, command string, args []string) erro
return nil
}
func (a *App) runLogin(_ context.Context, _ []string) error {
_, err := frameworksecretstore.LoginBitwarden(frameworksecretstore.BitwardenLoginOptions{
ServiceName: a.runtimeMetadata().BinaryName,
Stdin: a.stdin,
Stdout: a.stdout,
Stderr: a.stderr,
})
return err
}
func (a *App) runConfigShow(ctx context.Context, args []string) error {
if a.configStore == nil {
return fmt.Errorf("config store is not configured")