Releases: lorem-dev/locksmith
v0.2.0
Locksmith v0.2.0 introduces a first-class MCP server wrapper so AI
clients can inject secrets into Model Context Protocol servers without
relying on shell substitution. It also tightens diagnostics for the new
wrapper and refreshes the configuration documentation.
BREAKING CHANGES
-
MCP integration format changed. The previously documented
$(locksmith get --key X)shell-substitution pattern inside
mcp.jsonis removed - MCP clients readmcp.jsonas plain JSON and
never evaluated the expression. Replace every such entry with a
locksmith mcp runinvocation:- Local MCP server:
locksmith mcp run --env VAR=alias -- <command> - Remote MCP server:
locksmith mcp run --url <URL> --header "Name=Bearer {key:alias}" - From
config.yaml:locksmith mcp run --server <name>
See the rewritten MCP Integration section in
README.mdand the new
MCP serverssection indocs/configuration.mdfor full examples.
The agent-session bootstrap ($(locksmith session ensure --quiet)
in shell hooks) is unchanged and still in use. - Local MCP server:
MCP server wrapper
- New
locksmith mcp runsubcommand resolves secrets from the daemon
at startup and dispatches to one of two modes:- Local mode (
-- command args...): execs the subprocess with
resolved secrets injected as environment variables; stdin, stdout,
and stderr pass through unchanged. - Proxy mode (
--url URL): stdio<->HTTP proxy. Each JSON-RPC
line from stdin is forwarded as a request and server responses are
written back to stdout. Secrets are injected into HTTP headers via
{key:alias}and{vault:name path:value}templates.
- Local mode (
- Streamable HTTP transport (per MCP spec 2025-03-26) plus the legacy
SSE transport.--transport auto(default) tries Streamable HTTP
first and falls back to SSE on404/405responses. - New
mcp.serverssection inconfig.yamldefines named server
entries consumable vialocksmith mcp run --server <name>. Env
values accept either a key alias string or a{vault, path}struct;
headers accept the same template tokens as--header. - Diagnostics emitted via the shared zerolog logger at the level
configured bylogging.level. Output is forced to stderr so it
cannot corrupt the MCP JSON-RPC channel on stdout. Anyuserinfo
segment in URLs is masked viaurl.URL.Redacted()so credentials
accidentally inlined into--urldo not appear in logs or error
messages.
Documentation
README.mdMCP section rewritten to uselocksmith mcp run; the
minimal configuration example now includes anmcp.serversblock
alongside vaults and keys.- New
MCP serversreference section indocs/configuration.md
documents everymcp.servers.<name>field. docs/architecture.mdadds anMCP wrappercomponent description
covering local mode, proxy mode, transport auto-detect, and the
stderr-only logging contract.- Install and verification examples in
docs/install.mdand
docs/verification.mdpinned tov0.2.0.
Dependencies
- Added
github.com/stretchr/testify v1.7.2as a direct dependency
(MIT). It was already pulled in transitively; the move makes the
intent explicit.LICENSE## Third-Party Noticesis updated
accordingly.
v0.1.0
Locksmith v0.1.0 is the first public release. It ships the secret-management
daemon, CLI, two reference vault plugins, agent integrations for the major
AI clients, and the install/release pipeline.
Daemon & CLI
- gRPC daemon over a local Unix socket; CLI subcommands
init,serve,
get,session,vault,config,reload,version, and
plugins update. - Session manager with TTL, per-session secret cache, and memory wipe on
invalidation. Session IDs are masked in daemon log output unless
logging.level: debugis set; seedocs/security/debug-logging.mdfor
the security implications of debug mode. - Structured logging via zerolog (text or JSON, configurable level);
optionallogging.fileenables file output with 50 MB rotation and
3-day retention via lumberjack.
Vault plugins
- Reference plugins for gopass and macOS Keychain (Touch ID via the
Security framework + CGo). Plugins run as separate processes via
hashicorp/go-plugin. - Default plugins and
locksmith-pinentryship bundled inside the
locksmithbinary as a per-platform//go:embedzip and are extracted
bylocksmith initto~/.config/locksmith/plugins/and
~/.config/locksmith/bin/locksmith-pinentry. Conflict policy: sha256
match -> silent skip; mismatch -> interactive prompt
(Overwrite / Keep / Overwrite all / Keep all).locksmith plugins update [--dry-run] [--force]re-extracts for the vaults declared in
config.yaml. - Plugin launches run a soft compatibility check (platform support,
locksmith min/max version range); warnings surface vialocksmith vault health(compat_warnings) and never block a plugin from running. - Per-plugin documentation:
plugins/gopass/README.md,
plugins/keychain/README.md.
Agent integration
- Universal session-management protocol documented in
docs/agent-integration.md.locksmith session ensure --quietreuses
or starts a session for hook scripts. - Embedded templates for Claude Code (
UserPromptSubmithook installed
into~/.claude/settings.jsonbylocksmith init),
Cursor / Copilot / Codex (AGENTS.md), and Gemini CLI (GEMINI.md). agent.pass_session_to_subagentsconfig (defaulttrue) controls
session inheritance to child agents.
Configuration & operations
- YAML config at
~/.config/locksmith/config.yamlwith validation,
path expansion, and per-vault sections; full reference in
docs/configuration.md. - Hot-reload: the daemon picks up
config.yamlchanges via SIGHUP,
locksmith reload, or an automatic file-watcher (1-second debounce
via fsnotify). Active sessions and secret caches are preserved; an
invalid config is rejected and the previous config remains active.
Plugin processes are delta-synced (new types launched, removed ones
killed cleanly with no zombies). - Shell autostart hook for zsh, bash, and fish;
locksmith initoffers
to install it. Spawnedservechildren are reaped to prevent
zombies.
Release & CI/CD
- GitHub Actions:
ci.ymlruns lint, race tests, and coverage on
ubuntu-latest and macos-latest for every push and PR;release.yml
cross-builds for linux/amd64, linux/arm64, and darwin/arm64 on tag
push and publishes a GitHub release with per-platform zip archives,
SHA-256 checksums, a GPG-signedchecksums.txt.asc, and a generated
POSIXinstall.sh. Intel Macs (darwin/amd64) are not in the prebuilt
set for v0.1.0; on those systems the install script prints
go installinstructions so users can opt in to a from-source build. - Install path:
curl -fsSL https://github.com/lorem-dev/locksmith/releases/latest/download/install.sh | sh
withLOCKSMITH_VERSIONpinning andLOCKSMITH_INSTALL_DIRoverride.
Long-form install, GPG verification, build-from-source, and the
go installfallback indocs/install.md; maintainer release
procedure indocs/release.md. - Version is embedded from
sdk/version/VERSION(with aVERSION
symlink at the repo root) and surfaced bylocksmith version.
make check-versionkeeps the pushed tag, VERSION file, and
CHANGES.mdheading aligned at tag-build time. - Build and lint stack pinned via
make install-tools: golangci-lint
v2.11.4 with a strict ruleset (errcheck, wrapcheck, gocritic,
errorlint, mnd, etc.) and the buf protobuf linter.
SDK for plugin authors
- Public SDK at
github.com/lorem-dev/locksmith/sdk, organised into
subpackages:sdk/vault(Provider interface,Serve()),
sdk/errors(typedVaultError),sdk/log(LogConfig,
NewLogWriter,IsDebug),sdk/session(session-id helpers,
MaskSessionId), andsdk/platform(Darwin/Linuxconstants). - The SDK surface is at v0.1.0; expect refinements before v1.0.