Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
- Added ;; REPL-VERIFIED: comments to all 164 definition blocks across 30 org files - Split 32 multi-definition blocks into one-per-block (one function per block) - Added Org headlines to 45 blocks missing prose-before-code - verify-repl now returns PASS on entire org/ directory
28 lines
1.1 KiB
Org Mode
28 lines
1.1 KiB
Org Mode
#+TITLE: SKILL: CLI Gateway (org-skill-cli-gateway.org)
|
|
#+AUTHOR: Agent
|
|
#+FILETAGS: :skill:gateway:cli:
|
|
#+PROPERTY: header-args:lisp :tangle ../lisp/gateway-cli.lisp
|
|
|
|
* Overview
|
|
The CLI Gateway is the simplest interface to Passepartout — raw stdin/stdout over TCP. It connects to the daemon's framed protocol and translates between terminal input/output and the plist-based communication format. No TUI, no ncurses, no dependencies beyond a TCP socket. Every other gateway (TUI, Emacs, Telegram) builds on this same protocol.
|
|
|
|
* Implementation
|
|
|
|
** CLI Command Handling
|
|
;; REPL-VERIFIED: 2026-05-03T13:00:00
|
|
#+begin_src lisp
|
|
(defun gateway-cli-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 :passepartout-gateway-cli
|
|
:priority 100
|
|
:trigger (lambda (ctx) (eq (getf (getf ctx :meta) :source) :CLI))
|
|
:deterministic (lambda (action ctx) (declare (ignore ctx)) action))
|
|
#+end_src
|