Skip to content

fix(toolhive): support v0.50 encrypted LLM credentials - #1813

Merged
samuv merged 3 commits into
mainfrom
t3code/update-toolhive-secrets
Sep 24, 2026
Merged

samuv merged 3 commits into
mainfrom
t3code/update-toolhive-secrets

Conversation

@samuv

@samuv samuv commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • ToolHive v0.50.0 writes LLM credentials as Argon2id-protected THVSEC v1 files. Mecatl's v0.45.0 dependency cannot decrypt those files, so the direct gateway probe reports the provider unreachable and lists no models. Proxy mode works because the current thv process reads the credentials itself.
  • Upgrade ToolHive to v0.50.0 and pass the embedded issuer required by its incoming authentication API. Align the Kitty option and emoji-width expectation with the transitive ANSI update.
  • Add an offline regression test that writes a synthetic THVSEC v1 credential to a temporary encrypted store, reopens it, loads the scoped token, and lists a model from a local direct gateway. Update the mecated deployment guide.

Development stage

  • Spike / Routine / Cleanup

Contract linkage

  • Work classification: Routine
  • Classification rationale: Restores existing direct-mode behavior through a dependency upgrade and mechanical API adaptations; no durable interface or ownership decision changes.
  • Decision record: None; no new durable decision.
  • Human waiver of spine: N/A.
  • Acceptance plan, human decisions, and Plan / Interface PR: N/A for Routine work.

Interface conformance

No public interface changes. The new ToolHive middleware argument is internal composition wiring.

Issue relationship

User-reported ToolHive v0.50.0 credential compatibility bug; no linked issue.

Type of change

  • Bug fix
  • Dependency update
  • Documentation/process

Test plan

  • task build
  • task lint
  • task test
  • task test:race
  • go run ./cmd/mecademo (tool call, permission ask/approval, result)
  • task docs (strict link and document checks)
  • task site:build

Go checks ran with an isolated HOME/XDG directory and the environment secrets provider. The regression test uses only synthetic credentials and a local HTTP server. No operator ToolHive secret file or keyring entry was read, reset, logged, or committed.

User-facing change

Direct ToolHive LLM mode can read credentials written by ToolHive v0.50.0, so a configured provider can list gateway models again.

Special notes for reviewers

ToolHive's transitive ANSI update changes the width calculation for joined family emoji. The existing width normalizer now retains the first scalar in that case to keep its two width methods aligned; the test expectation records this behavior.

CI follow-up

  • Rebasing exposed two ADRs numbered 0352 on main. Renumber the session-identity ADR to 0353 so the documentation and race lint gates pass.
  • The standalone, read-only Kubernetes build requires the root Go directive to be 1.27.0 after the ToolHive dependency update. Align go.mod and go.work, while accepting both equivalent Go 1.27 directive spellings in the dependency-floor test.
  • ToolHive v0.50.0 pulls 1Password SDK v0.4.1, which lacks a FreeBSD implementation and breaks the unrelated internal/app cross-compile in the macOS managed-storage job. Mecatl releases target Linux and macOS. Keep the FreeBSD osfs compile check, and explicitly test that managed storage rejects FreeBSD at admission.
  • The rerun exposed a timing race in the macOS osfs test: shell redirection creates each output file before printf finishes writing it. Wait for complete temporary-path and scrubbed-variable output before asserting either value.

Upgrade the ToolHive module to v0.50.0 and adapt its incoming auth middleware call. Cover THVSEC v1 credential loading and direct model listing with an isolated encrypted store, and align UI rendering with the transitive ANSI update.

Co-Authored-By: OpenAI Codex <[email protected]>

Signed-off-by: Samuele Verzi <[email protected]>
Renumber the conflicting session identity ADR and use the Go 1.27.0
directive required by standalone read-only builds. Keep the FreeBSD
managed-storage cross-compile at the OS adapter boundary because
ToolHive's transitive 1Password SDK has no FreeBSD implementation.
Pin FreeBSD admission behavior in the existing composition test.

Co-Authored-By: OpenAI Codex <[email protected]>

Signed-off-by: Samuele Verzi <[email protected]>
@samuv
samuv force-pushed the t3code/update-toolhive-secrets branch from 34066d2 to 7a23eb3 Compare September 23, 2026 16:12
The macOS test sometimes read the shell's redirected output files
between creation and the final printf write. Wait for both values
before asserting the temporary lease and scrubbed environment.

Co-Authored-By: OpenAI Codex <[email protected]>

Signed-off-by: Samuele Verzi <[email protected]>
@samuv
samuv merged commit 2736535 into main Sep 24, 2026
38 checks passed
@samuv
samuv deleted the t3code/update-toolhive-secrets branch September 24, 2026 08:08
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Sep 25, 2026
2 tasks
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.

2 participants