From 20305382813571fdc8f4412c4ee8e6f904791c65 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Tue, 28 Apr 2026 19:56:54 -0400 Subject: [PATCH] fix(setup): initialize skills before running setup wizard and resolve syntax errors in config manager --- harness/package.org | 8 -------- opencortex.sh | 1 + skills/org-skill-config-manager.org | 8 ++++---- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/harness/package.org b/harness/package.org index 9d63dfc..4af4d21 100644 --- a/harness/package.org +++ b/harness/package.org @@ -145,17 +145,9 @@ The ~package.lisp~ file defines the public API of the ~opencortex~ harness. #:lisp-utils-register ;; --- Config Manager & Diagnostics Skill --- - #:register-provider - #:save-providers - #:configure-provider - #:run-setup-wizard #:get-oc-config-dir #:prompt-for #:save-secret - #:doctor-check-dependencies - #:doctor-check-xdg - #:doctor-check-llm - #:doctor-run-all ;; --- Tool Permissions Skill --- #:get-tool-permission diff --git a/opencortex.sh b/opencortex.sh index 1af3307..1558d48 100755 --- a/opencortex.sh +++ b/opencortex.sh @@ -103,6 +103,7 @@ setup_system() { --eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' \ --eval "(push (truename \"$OC_DATA_DIR/\") asdf:*central-registry*)" \ --eval '(ql:quickload :opencortex)' \ + --eval '(opencortex:initialize-all-skills)' \ --eval '(opencortex:run-setup-wizard)' } diff --git a/skills/org-skill-config-manager.org b/skills/org-skill-config-manager.org index 016558b..b223c3a 100644 --- a/skills/org-skill-config-manager.org +++ b/skills/org-skill-config-manager.org @@ -17,14 +17,14 @@ The *Config Manager* skill provides the OpenCortex Agent with the capability to #+begin_src lisp (defun get-oc-config-dir () "Returns the absolute path to the opencortex config directory." - (let ((xdg (uiop:getenv "OC_CONFIG_DIR)) - (if (and xdg (string/= xdg + (let ((xdg (uiop:getenv "OC_CONFIG_DIR"))) + (if (and xdg (string/= xdg "")) (uiop:ensure-directory-pathname xdg) (uiop:ensure-directory-pathname (merge-pathnames ".config/opencortex/" (user-homedir-pathname)))))) (defun save-providers () "Stubs for saving provider configuration." - (harness-log "CONFIG: Providers saved.) + (harness-log "CONFIG: Providers saved.")) (defun configure-provider (id) "Stubs for configuring a provider." @@ -32,7 +32,7 @@ The *Config Manager* skill provides the OpenCortex Agent with the capability to (defun run-setup-wizard () "Interactive setup wizard for OpenCortex." - (format t "--- OpenCortex Setup Wizard ---~% + (format t "--- OpenCortex Setup Wizard ---~%") (save-providers) (doctor-main)) #+end_src