Skip to content

feat: Bitwarden secret resolver and async register#398

Open
Coke1120 wants to merge 2 commits intoCortexReach:masterfrom
Coke1120:feat/bitwarden-secret-resolver
Open

feat: Bitwarden secret resolver and async register#398
Coke1120 wants to merge 2 commits intoCortexReach:masterfrom
Coke1120:feat/bitwarden-secret-resolver

Conversation

@Coke1120
Copy link
Copy Markdown

Summary

  • Add src/secret-resolver.ts supporting ${ENV_VAR} and bws://<secret-id> Bitwarden Secrets Manager refs for embedding, rerank, and LLM API keys
  • Make plugin.register() async to support async secret resolution
  • Update openclaw.plugin.json docs to advertise bws:// support on all API key fields
  • Fix all tests to await plugin.register()

Test plan

  • node --test test/secret-resolver.test.mjs — verify Bitwarden and env-var resolution paths
  • npm test — full test suite passes with async register

Split from #349.

🤖 Generated with Claude Code

Add src/secret-resolver.ts supporting ${ENV_VAR} and bws://<secret-id>
Bitwarden CLI secret references for embedding, rerank, and LLM API keys.
Make plugin register() async to support async secret resolution.
Update openclaw.plugin.json docs to advertise bws:// support.
Fix all tests to await plugin.register().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
With async register() now awaited, selfImprovement defaults to enabled
and registers command:new before the sessionMemory assertion runs.
Explicitly disable it in the base test config to isolate the assertion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@AliceLJY AliceLJY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean implementation. execFile (not exec) avoids shell injection, execFileImpl injection enables proper unit testing, URL-based bws:// ref parsing is well-structured.

Note: PR #399 (Anthropic distill) depends on this PR — it includes all changes from this branch. Please merge #398 first, then #399.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants