Files
passepartout/skills/org-skill-config-manager.org

1.3 KiB

SKILL: Config Manager (org-skill-config-manager.org)

Overview

The Config Manager skill provides the OpenCortex Agent with the capability to manage its own environment variables and provider configurations.

Implementation

Package Context

(in-package :opencortex)

Configuration Logic

(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 ""))
        (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."))

(defun configure-provider (id)
  "Stubs for configuring a provider."
  (harness-log "CONFIG: Configured provider ~a" id))

(defun run-setup-wizard ()
  "Interactive setup wizard for OpenCortex."
  (format t "--- OpenCortex Setup Wizard ---~%")
  (save-providers)
  (doctor-main))

Skill Registration

(defskill :skill-config-manager
  :priority 100
  :trigger (lambda (ctx) (declare (ignore ctx)) nil))