Add v0.2.0 features: vector search + tool permissions
- Local vector search: Ollama embeddings + semantic search - get-embedding with caching - cosine-similarity computation - semantic-search cognitive tool - :semantic-search tool for LLM queries - Tool permission tiers: security gating for cognitive tools - Three tiers: :allow, :deny, :ask - Gate in execute-tool-action before tool runs - Defaults: :deny for shell/delete-file, :ask for eval/write-file - :tool-permissions cognitive tool for management - Embedding provider support: Ollama AND llama.cpp - EMBEDDING_PROVIDER env var - EMBEDDING_MODEL env var - LLAMA_HOST for llama.cpp server - .env.example: Add embedding config variables - Fix parse-message in communication.lisp - Update ASDF: add test files, tool-permissions skill All 60 tests pass (6 suites x 100%)
This commit is contained in:
@@ -16,6 +16,13 @@
|
||||
(len (length msg-string)))
|
||||
(format nil "~6,'0x~a~%" len msg-string)))
|
||||
|
||||
(defun parse-message (framed-string)
|
||||
"Parses a hex-length prefixed framed string into a Lisp plist."
|
||||
(let* ((len (parse-integer (subseq framed-string 0 6) :radix 16))
|
||||
(payload (subseq framed-string 6 (+ 6 len))))
|
||||
(let ((*read-eval* nil))
|
||||
(read-from-string payload))))
|
||||
|
||||
(defun read-framed-message (stream)
|
||||
"Reads a hex-length prefixed S-expression from the stream securely. Skips leading whitespace."
|
||||
(let ((length-buffer (make-string 6)))
|
||||
|
||||
Reference in New Issue
Block a user