Skip to content

Commit b14fa39

Browse files
committed
release: v0.4.0
1 parent 00a0b22 commit b14fa39

6 files changed

Lines changed: 28 additions & 69 deletions

File tree

‎CHANGES.md‎

Lines changed: 18 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -2,71 +2,24 @@
22

33
## Development
44

5-
- `locksmith mcp run --url` now triggers templated-header resolution
6-
not only on HTTP `401/403` but also when the remote MCP server
7-
returns `200 OK` with a JSON-RPC `error` field or a tool-level
8-
`result.isError: true`. Resolution and retry happen exactly once
9-
per session; if the retry also fails, the error is forwarded to the
10-
AI client unchanged. Detection looks only at structural fields - no
11-
keyword matching against `result.content[].text`.
12-
- Per-agent installer logic moved into `internal/initflow/agents/<name>/`
13-
subpackages (claude, codex, gemini, opencode, generic), each with
14-
embedded templates. `AgentWriter` in `agents.go` is now a thin switch
15-
dispatcher. Gemini CLI is now detected by `DetectAgents` and dispatched
16-
to the new `gemini` subpackage (previously dead code). The dead
17-
`agents_md.md.tmpl` template was removed.
18-
- `locksmith init` now adds `Bash(locksmith:*)` to
19-
`permissions.allow` in `~/.claude/settings.json` so the agent can
20-
call `locksmith` directly without per-call approval. Idempotent.
21-
- Agent instruction templates (Claude/Codex/Gemini/OpenCode and the
22-
generic agent file) are now wrapped with `<!-- LOCKSMITH_START -->`
23-
/ `<!-- LOCKSMITH_END -->` markers so the locksmith-managed block
24-
can be located and updated reliably.
25-
- `locksmith restart` command added: stops the running daemon and
26-
starts a fresh one. Flags `--timeout` and `--no-start`. Use after a
27-
binary upgrade or plugin re-extract; see `docs/restart.md`.
28-
- `locksmith init` appends an idempotent PATH-augmentation block to
29-
the user's shell rc (`~/.zshrc` / `~/.bashrc` /
30-
`~/.config/fish/config.fish`) when the locksmith binary directory
31-
is not already on `$PATH`. Skipped silently when the directory is
32-
already on PATH or when the rc file does not exist (init never
33-
creates new rc files).
34-
- Add `vaults.<name>.vault` config field, delivered to plugins as `opts["vault"]`; used by the 1Password plugin to qualify non-`op://` paths.
35-
- Add 1Password vault plugin backed by the op CLI, auto-detected when `op` is installed.
36-
- docs(cli): drop Touch ID wording from CLI help, README, configuration
37-
and architecture docs, and plugin READMEs; keychain authorization is
38-
described as OS-delegated without naming a specific auth method
39-
- docs: split development-time tooling out of `LICENSE` into the new
40-
`docs/development-tools.md`; build tools (buf, golangci-lint) and
41-
external AI agent tooling (CodeGraph MCP server, obra/superpowers
42-
skill pack) are listed there instead. The `check-licenses` skill
43-
and `CONTRIBUTING.md` were updated to match.
44-
- Switch the Claude Code UserPromptSubmit hook from a shell script to
45-
the native `locksmith session ensure --hook` invocation. The flag
46-
produces a JSON env block via `encoding/json` (no `printf`, no
47-
`$(...)`).
48-
- Auto-migrate existing installs: legacy `agent-hook.sh` references in
49-
`~/.claude/settings.json` are rewritten in place on the next
50-
`locksmith init`, the matching `Bash(.../agent-hook.sh)` permission
51-
rule is dropped, and the on-disk script is removed.
52-
- `locksmith init` now automatically restarts a running daemon at the
53-
end of its run so plugin/config changes take effect immediately.
54-
- `locksmith init` now installs a Codex `SessionStart` hook in
55-
`~/.codex/hooks.json` when Codex is detected. The hook pre-warms
56-
the locksmith daemon so vault unlock (passphrase, biometric) fires
57-
before the agent's first secret request. Best-effort: any failure
58-
is swallowed so Codex startup is never blocked. Codex prompts the
59-
user to trust the hook on next run.
60-
- Agent instruction templates are now agent-specific: each template
61-
describes only its own agent's session protocol (Claude relies on
62-
the UserPromptSubmit hook; Codex / Gemini CLI / OpenCode / generic
63-
use `export LOCKSMITH_SESSION=$(locksmith session ensure --quiet)`)
64-
and includes usage examples for all three shipped vault types
65-
(`gopass`, `keychain`, `1password`).
66-
- Agent templates now document an MCP-wrapper fallback: when a locksmith-wrapped MCP server fails, the agent parses `--header` and `--env` templates from its own MCP config, resolves them via `locksmith get`, and runs the server directly. Templates also whitelist `session ensure`, `serve`, and `get` as the only runtime locksmith commands.
67-
- The verification GPG gate now ignores GitHub-generated "Merge pull request" commits: their `web-flow` signature is often expired locally and they cannot be re-signed without diverging from the remote.
68-
- Agent templates now document a recovery prompt for external HTTP API auth failures: on the first 401/403 for a hostname, the agent asks the user to (1) Skip, (2) provide a locksmith key or vault+path, or (3) paste the token directly. Resolved tokens are cached per hostname for the rest of the session; Skip suppresses further prompts for that hostname.
69-
- Tightened the runtime-whitelist, MCP-fallback, and external-API auth-failure sections in agent templates (~45% shorter; same semantics). The MCP fallback now opens with an explicit "execute these steps; do not ask the user clarifying questions" directive so smaller models commit to the recovery path instead of pausing for confirmation. Validated across multiple parallel sub-agent runs on Sonnet and Haiku covering both flows.
5+
## Version v0.4.0 - 2026-05-24
6+
7+
### Features
8+
9+
- `locksmith mcp run --url` now resolves templated headers on JSON-RPC `error` or tool-level `result.isError`, not only on HTTP `401/403`; one retry per session, structural-only detection (no keyword matching on `result.content[].text`)
10+
- add 1Password vault plugin (backed by the `op` CLI; auto-detected when `op` is installed)
11+
- add `vaults.<name>.vault` config field, delivered to plugins as `opts["vault"]`; used by the 1Password plugin to qualify non-`op://` paths
12+
- add `locksmith restart` command with `--timeout` / `--no-start` (see `docs/restart.md`)
13+
- per-agent installer logic moved into `internal/initflow/agents/<name>/` subpackages; Gemini CLI is now actually detected and dispatched (previously dead code)
14+
- agent instruction templates are wrapped with `<!-- LOCKSMITH_START -->` / `<!-- LOCKSMITH_END -->` markers so the managed block can be located and updated reliably
15+
- agent instruction templates are now agent-specific: per-agent session protocol (Claude via `UserPromptSubmit` hook; Codex / Gemini / OpenCode / generic via `export LOCKSMITH_SESSION=$(locksmith session ensure --quiet)`) and usage examples for `gopass`, `keychain`, `1password`
16+
- agent templates document an MCP-wrapper fallback: when a wrapped MCP server fails, the agent resolves `--header` / `--env` templates via `locksmith get` and runs the server directly
17+
- agent templates document an external HTTP API auth-failure recovery prompt: on the first `401/403` for a hostname, the agent offers Skip / locksmith key or vault+path / paste-token; resolved tokens are cached per hostname for the session
18+
- `locksmith init` adds `Bash(locksmith:*)` to `permissions.allow` in `~/.claude/settings.json` so the agent can call `locksmith` directly (idempotent)
19+
- `locksmith init` appends an idempotent PATH-augmentation block to `~/.zshrc` / `~/.bashrc` / `~/.config/fish/config.fish` when the locksmith binary directory is not already on `$PATH` (never creates new rc files)
20+
- `locksmith init` now auto-restarts the running daemon at the end of its run so plugin/config changes take effect immediately
21+
- `locksmith init` installs a Codex `SessionStart` hook in `~/.codex/hooks.json` when Codex is detected; the hook pre-warms the daemon so vault unlock fires before the agent's first secret request (best-effort; failures swallowed)
22+
- Claude Code `UserPromptSubmit` hook switched to the native `locksmith session ensure --hook` invocation (JSON env block via `encoding/json`, no shell script); existing installs are auto-migrated on next `locksmith init` (legacy `agent-hook.sh` references rewritten in place, matching `Bash(.../agent-hook.sh)` permission rule dropped, on-disk script removed)
7023

7124
## Version v0.3.0 - 2026-05-15
7225

‎LICENSE‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,12 @@ with the `locksmith` binary. They are tracked separately in
261261
- Source: https://github.com/stretchr/testify
262262
- License text: https://github.com/stretchr/testify/blob/v1.7.2/LICENSE
263263

264+
### golang.org/x/sys
265+
- Version: v0.43.0
266+
- License: BSD-3-Clause
267+
- Source: https://github.com/golang/sys
268+
- License text: https://github.com/golang/sys/blob/v0.43.0/LICENSE
269+
264270
### golang.org/x/term
265271
- Version: v0.42.0
266272
- License: BSD-3-Clause

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ curl -fsSL https://github.com/lorem-dev/locksmith/releases/latest/download/insta
1313
Pin a specific version:
1414

1515
```sh
16-
LOCKSMITH_VERSION=v0.3.0 curl -fsSL https://github.com/lorem-dev/locksmith/releases/download/v0.3.0/install.sh | sh
16+
LOCKSMITH_VERSION=v0.4.0 curl -fsSL https://github.com/lorem-dev/locksmith/releases/download/v0.4.0/install.sh | sh
1717
```
1818

1919
Custom install dir (default `~/.local/bin`):

‎docs/install.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ curl -fsSL https://raw.githubusercontent.com/lorem-dev/locksmith/main/.github/re
6969
| gpg --import
7070
gpg --list-keys --fingerprint contact@lorem.dev # compare to verification.md
7171

72-
TAG=v0.2.0
72+
TAG=v0.4.0
7373
BASE="https://github.com/lorem-dev/locksmith/releases/download/${TAG}"
7474
curl -fsSLO "${BASE}/checksums.txt"
7575
curl -fsSLO "${BASE}/checksums.txt.asc"

‎docs/verification.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ curl -fsSL https://raw.githubusercontent.com/lorem-dev/locksmith/main/.github/re
3737
gpg --list-keys --fingerprint contact@lorem.dev
3838

3939
# 3. Download the checksum file and its detached signature
40-
TAG=v0.2.0
40+
TAG=v0.4.0
4141
BASE="https://github.com/lorem-dev/locksmith/releases/download/${TAG}"
4242
curl -fsSLO "${BASE}/checksums.txt"
4343
curl -fsSLO "${BASE}/checksums.txt.asc"

‎sdk/version/VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.0
1+
0.4.0

0 commit comments

Comments
 (0)