- Updated 22 skill org files to use %%SKILLS_DIR%% placeholder - Modified opencortex.sh setup to replace placeholder with XDG path - Modified doctor_repair to handle placeholder replacement - Removed hardcoded absolute path
27 lines
838 B
Org Mode
27 lines
838 B
Org Mode
#+TITLE: SKILL: CLI Gateway (org-skill-cli-gateway.org)
|
|
#+AUTHOR: Agent
|
|
#+FILETAGS: :skill:gateway:cli:
|
|
#+PROPERTY: header-args:lisp :tangle %%SKILLS_DIR%%/org-skill-cli-gateway.lisp
|
|
|
|
* Overview
|
|
The *CLI Gateway* provides a command-line interface for interacting with the OpenCortex daemon.
|
|
|
|
* Implementation
|
|
|
|
** CLI Command Handling
|
|
#+begin_src lisp
|
|
(defun cli-process-input (text)
|
|
"Processes raw text from the command line."
|
|
(inject-stimulus (list :type :EVENT
|
|
:payload (list :sensor :user-input :text text)
|
|
:meta (list :source :CLI))))
|
|
#+end_src
|
|
|
|
** Skill Registration
|
|
#+begin_src lisp
|
|
(defskill :skill-cli-gateway
|
|
:priority 100
|
|
:trigger (lambda (ctx) (eq (getf (getf ctx :meta) :source) :CLI))
|
|
:deterministic (lambda (action ctx) (declare (ignore ctx)) action))
|
|
#+end_src
|