fix(chaos): use standard getenv for absolute tangle paths

This commit is contained in:
2026-04-28 17:57:57 -04:00
parent d787981d0d
commit d55384fb65
35 changed files with 234 additions and 234 deletions

View File

@@ -13,26 +13,26 @@ In a traditional AI wrapper, the user manually edits a config file to add a bot
* Phase B: Protocol (Success Criteria)
** Test Suite Context
#+begin_src lisp :tangle (concat (uiop:getenv "INSTALL_DIR") "/skills/gateway-manager-tests.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/skills/gateway-manager-tests.lisp" (expand-file-name ""))
(defpackage :opencortex-gateway-manager-tests
(:use :cl :fiveam :opencortex)
(:export #:gateway-suite))
#+end_src
#+begin_src lisp :tangle (concat (uiop:getenv "INSTALL_DIR") "/skills/gateway-manager-tests.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/skills/gateway-manager-tests.lisp" (expand-file-name ""))
(in-package :opencortex-gateway-manager-tests)
#+end_src
#+begin_src lisp :tangle (concat (uiop:getenv "INSTALL_DIR") "/skills/gateway-manager-tests.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/skills/gateway-manager-tests.lisp" (expand-file-name ""))
(def-suite gateway-suite :description "Verification of the Gateway Manager skill")
#+end_src
#+begin_src lisp :tangle (concat (uiop:getenv "INSTALL_DIR") "/skills/gateway-manager-tests.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/skills/gateway-manager-tests.lisp" (expand-file-name ""))
(in-suite gateway-suite)
#+end_src
** Logic Tests
#+begin_src lisp :tangle (concat (uiop:getenv "INSTALL_DIR") "/skills/gateway-manager-tests.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/skills/gateway-manager-tests.lisp" (expand-file-name ""))
(test test-gateway-registration
"Verify that the skill can register a new gateway metadata block."
(let ((opencortex::*gateways* nil))
@@ -51,12 +51,12 @@ In a traditional AI wrapper, the user manually edits a config file to add a bot
* Phase C: Implementation (Build)
** Package Context
#+begin_src lisp :tangle (concat (uiop:getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
(in-package :opencortex)
#+end_src
** Capability Definition
#+begin_src lisp :tangle (concat (uiop:getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
(defparameter *skill-gateway-manager*
'(:name "gateway-manager"
:description "Manages connections to external chat platforms."
@@ -66,12 +66,12 @@ In a traditional AI wrapper, the user manually edits a config file to add a bot
#+end_src
** Registry Persistence
#+begin_src lisp :tangle (concat (uiop:getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
(defvar *gateways* nil "The internal registry of configured gateways.")
#+end_src
** Persistence Stubs
#+begin_src lisp :tangle (concat (uiop:getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
(defun save-gateways ()
"Persist gateway metadata to XDG Config directory."
(let ((path (merge-pathnames "gateways.lisp" (get-oc-config-dir))))
@@ -81,14 +81,14 @@ In a traditional AI wrapper, the user manually edits a config file to add a bot
#+end_src
** Registration Logic
#+begin_src lisp :tangle (concat (uiop:getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
(defun skill-gateway-register (platform metadata)
"Internal function to update the gateway registry."
(setf (getf *gateways* platform) metadata))
#+end_src
** Telegram Verification
#+begin_src lisp :tangle (concat (uiop:getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
(defun skill-gateway-verify-telegram (token)
"Verifies a Telegram bot token via the getMe API."
(let ((url (format nil "https://api.telegram.org/bot~a/getMe" token)))
@@ -103,7 +103,7 @@ In a traditional AI wrapper, the user manually edits a config file to add a bot
#+end_src
** Linkage Command
#+begin_src lisp :tangle (concat (uiop:getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
(defun skill-gateway-link (platform token)
"Primary capability to link a new platform. Returns status plist."
(harness-log "GATEWAY: Attempting to link ~a..." platform)
@@ -120,7 +120,7 @@ In a traditional AI wrapper, the user manually edits a config file to add a bot
#+end_src
** CLI Main Wrapper
#+begin_src lisp :tangle (concat (uiop:getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/skills/org-skill-gateway-manager.lisp" (expand-file-name ""))
(defun gateway-manager-main (platform token)
"Main entry point for CLI-driven linkage."
(if (and platform token)