- Add deepseek and nvidia entries to gateway-provider config - Add DEEPSEEK_API_KEY and NVIDIA_API_KEY to .env.example - Add deepseek and nvidia to doctor's LLM provider check - Fix remaining harness-log → log-message reference
26 lines
988 B
Common Lisp
26 lines
988 B
Common Lisp
(defvar *vault-memory* (make-hash-table :test 'equal)
|
|
"In-memory cache of sensitive credentials.")
|
|
|
|
(defun vault-get (provider &key (type :api-key))
|
|
"Retrieves a credential from the vault or environment."
|
|
(let* ((key (format nil "~a-~a" provider type))
|
|
(val (gethash key *vault-memory*)))
|
|
(if val
|
|
val
|
|
(let ((env-var (case provider
|
|
(:gemini "GEMINI_API_KEY")
|
|
(:openai "OPENAI_API_KEY")
|
|
(:anthropic "ANTHROPIC_API_KEY")
|
|
(:openrouter "OPENROUTER_API_KEY")
|
|
(otherwise nil))))
|
|
(when env-var (uiop:getenv env-var))))))
|
|
|
|
(defun vault-set (provider secret &key (type :api-key))
|
|
"Stores a secret in the vault."
|
|
(let ((key (format nil "~a-~a" provider type)))
|
|
(setf (gethash key *vault-memory*) secret)))
|
|
|
|
(defskill :passepartout-security-vault
|
|
:priority 600
|
|
:trigger (lambda (ctx) (declare (ignore ctx)) nil))
|