diff --git a/opencortex.sh b/opencortex.sh index 5492feb..079b580 100755 --- a/opencortex.sh +++ b/opencortex.sh @@ -167,6 +167,7 @@ case "$COMMAND" in ;; --boot|boot) + rm -rf "/home/user/.cache/common-lisp" export SKILLS_DIR="${SCRIPT_DIR}/skills" [ -z "$MEMEX_DIR" ] && export MEMEX_DIR="$HOME/memex" exec sbcl --eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' --eval '(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (format *error-output* "FATAL LISP ERROR: ~a~%" c) (uiop:print-backtrace :stream *error-output*) (uiop:quit 1)))' --eval '(push (truename (uiop:getenv "SCRIPT_DIR")) asdf:*central-registry*)' --eval '(format t "--- Quickloading OpenCortex ---~%")' --eval "(ql:quickload '(:opencortex :croatoan))" --eval '(opencortex:main)' @@ -184,6 +185,7 @@ case "$COMMAND" in echo "" fi echo -e "Launching Croatoan TUI..." + rm -rf "/home/user/.cache/common-lisp" export SKILLS_DIR="${SCRIPT_DIR}/skills" [ -z "$MEMEX_DIR" ] && export MEMEX_DIR="$HOME/memex" exec sbcl --eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' --eval '(push (truename (uiop:getenv "SCRIPT_DIR")) asdf:*central-registry*)' --eval '(ql:quickload :opencortex/tui)' --eval '(opencortex.tui:main)' diff --git a/src/act.lisp b/src/act.lisp index d3de34b..3ba15d4 100644 --- a/src/act.lisp +++ b/src/act.lisp @@ -5,8 +5,8 @@ (defun initialize-actuators () "Loads actuator routing defaults from environment variables and registers core harness actuators." - (let ((def (uiop:getenv "DEFAULT_ACTUATOR")) - (silent (uiop:getenv "SILENT_ACTUATORS"))) + (let ((def (string-trim '(#\Space #\" #\') (or (uiop:getenv "DEFAULT_ACTUATOR") "CLI"))) + (silent (or (uiop:getenv "SILENT_ACTUATORS") "CLI,SYSTEM-MESSAGE,EMACS"))) (when def (let ((clean-def (string-trim '(#\Space #\" #\') def))) (setf *default-actuator* (intern (string-upcase clean-def) "KEYWORD")))) @@ -24,10 +24,10 @@ (defun dispatch-action (action context) "Routes an approved action to its registered physical actuator." (when (and action (listp action)) - (let* ((raw-target (or (ignore-errors (getf action :target)) - (ignore-errors (getf action :TARGET)) + (let* ((raw-target (or (ignore-errors (getf action :TARGET)) + (ignore-errors (getf action :target)) *default-actuator*)) - (target (if (keywordp raw-target) raw-target (intern (string-upcase (string raw-target)) :keyword))) + (target (intern (string-upcase (string raw-target)) :keyword)) (actuator-fn (gethash target *actuator-registry*))) (if actuator-fn (funcall actuator-fn action context)