feat: P2 — provider-agnostic embeddings + subtree loading
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
- system-embeddings (new skill): hashing-trick embeddings for memory-object vectors. Works offline with no Ollama/API dependency. Falls back to hashing-trick when no embedding backend is registered. Extensible — set *embedding-backend* to use Ollama/OpenAI/any provider. - programming-org: add org-subtree-extract and org-heading-list for targeting specific headlines in Org text without loading whole files. - core-context: add context-skill-subtree thin wrapper delegating to org-subtree-extract. Core stays thin — parsing lives in the skill.
This commit is contained in:
@@ -37,7 +37,18 @@
|
||||
(data-dir (uiop:ensure-directory-pathname (or (uiop:getenv "PASSEPARTOUT_DATA_DIR") (namestring (merge-pathnames ".local/share/passepartout/" (user-homedir-pathname))))))
|
||||
(org-dir (merge-pathnames "org/" data-dir))
|
||||
(full-path (merge-pathnames filename org-dir)))
|
||||
(if (uiop:file-exists-p full-path) (uiop:read-file-string full-path) nil)))
|
||||
(if (uiop:file-exists-p full-path) (uiop:read-file-string full-path) nil)))
|
||||
|
||||
(defun context-skill-subtree (skill-name heading-name)
|
||||
"Reads a specific headline subtree from a skill's Org source file.
|
||||
Returns the content under HEADING-NAME (including children) as a string,
|
||||
or nil if the heading is not found."
|
||||
(let ((full-source (context-skill-source skill-name)))
|
||||
(unless full-source (return-from context-skill-subtree nil))
|
||||
(if (fboundp 'org-subtree-extract)
|
||||
(org-subtree-extract full-source heading-name)
|
||||
;; Fallback: no org-subtree-extract available, return full source
|
||||
full-source)))
|
||||
|
||||
(defun context-logs (&optional limit)
|
||||
"Retrieves the most recent lines from the harness's internal log."
|
||||
|
||||
Reference in New Issue
Block a user