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:
parent
801d7fbb95
commit
ebd3a64522
1 changed files with 13 additions and 0 deletions
|
|
@ -137,6 +137,9 @@ func (a *App) runBootstrap(ctx context.Context, args []string) error {
|
||||||
Setup: func(ctx context.Context, inv frameworkbootstrap.Invocation) error {
|
Setup: func(ctx context.Context, inv frameworkbootstrap.Invocation) error {
|
||||||
return a.runConfig(ctx, frameworkbootstrap.CommandSetup, inv.Args)
|
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 {
|
MCP: func(ctx context.Context, inv frameworkbootstrap.Invocation) error {
|
||||||
return a.runMCP(ctx, inv.Args)
|
return a.runMCP(ctx, inv.Args)
|
||||||
},
|
},
|
||||||
|
|
@ -238,6 +241,16 @@ func (a *App) runConfig(ctx context.Context, command string, args []string) erro
|
||||||
return nil
|
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 {
|
func (a *App) runConfigShow(ctx context.Context, args []string) error {
|
||||||
if a.configStore == nil {
|
if a.configStore == nil {
|
||||||
return fmt.Errorf("config store is not configured")
|
return fmt.Errorf("config store is not configured")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue