- ROADMAP: consolidate all TUI work under v0.8.0 (removed premature v0.9.0/v0.10.x labels), restored original v0.9.0 eval harness plan - channel-tui-view.org: Emacs-style reverse-video cursor (swap fg/bg instead of drawing █), hint bar now shows F:focus/MCP:count on left and token gauge + keybindings on right, sidebar reorganized to show GATE TRACE, RULES + BLOCK COUNT, COST, FILES panels - channel-tui-main.org: command palette selection now uses reverse-video highlight (bg-input fg on input-fg bg, matching cursor style), fixed cond order so sel-p is checked before cat (all items had :category making sel-p unreachable), added session-cost extraction from daemon - passepartout: export COLORTERM=truecolor for modern backend detection
36 lines
1.2 KiB
Common Lisp
36 lines
1.2 KiB
Common Lisp
(in-package :passepartout)
|
|
|
|
(defun channel-cli-input (text)
|
|
"Processes raw text from the command line."
|
|
(stimulus-inject (list :type :EVENT
|
|
:payload (list :sensor :user-input :text text)
|
|
:meta (list :source :CLI))))
|
|
|
|
(defskill :passepartout-channel-cli
|
|
:priority 100
|
|
:trigger (lambda (ctx) (eq (getf (getf ctx :meta) :source) :CLI))
|
|
:deterministic (lambda (action ctx) (declare (ignore ctx)) action))
|
|
|
|
(eval-when (:compile-toplevel :load-toplevel :execute)
|
|
(ql:quickload :fiveam :silent t))
|
|
|
|
(defpackage :passepartout-channel-cli-tests
|
|
(:use :cl :passepartout)
|
|
(:export #:cli-suite))
|
|
|
|
(in-package :passepartout-channel-cli-tests)
|
|
|
|
(fiveam:def-suite cli-suite :description "Verification of the CLI Gateway")
|
|
(fiveam:in-suite cli-suite)
|
|
|
|
(fiveam:test test-channel-cli-input-format
|
|
"Contract 1: channel-cli-input injects a properly formed signal without error."
|
|
(handler-case
|
|
(progn (channel-cli-input "hello") (fiveam:pass))
|
|
(error (c)
|
|
(fiveam:fail "channel-cli-input crashed: ~a" c))))
|
|
|
|
(handler-case
|
|
(progn (channel-cli-input "test-load") (log-message "CLI: Load-time test OK"))
|
|
(error (c) (log-message "CLI: Load-time test FAILED: ~a" c)))
|