fix(protocol): Normalize all keywords to uppercase to resolve TUI routing duplicates
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s
This commit is contained in:
@@ -32,16 +32,16 @@
|
||||
(let ((msg (opencortex:read-framed-message *stream*)))
|
||||
(cond ((eq msg :eof) (setf *is-running* nil))
|
||||
((eq msg :error) (setf *status-text* "Protocol Error"))
|
||||
((and (listp msg) (eq (getf msg :type) :EVENT))
|
||||
(let ((payload (getf msg :payload)))
|
||||
(when (eq (getf payload :action) :handshake)
|
||||
((and (listp msg) (eq (getf msg :TYPE) :EVENT))
|
||||
(let ((payload (getf msg :PAYLOAD)))
|
||||
(when (eq (getf payload :ACTION) :handshake)
|
||||
(setf *status-text* "Ready"))))
|
||||
((and (listp msg) (eq (getf msg :type) :STATUS))
|
||||
((and (listp msg) (eq (getf msg :TYPE) :STATUS))
|
||||
(setf *status-text* (format nil "[Scribe: ~a] [Gardener: ~a]"
|
||||
(getf msg :scribe)
|
||||
(getf msg :gardener))))
|
||||
((and (listp msg) (eq (getf msg :type) :CHAT))
|
||||
(enqueue-msg (getf msg :text)))
|
||||
(getf msg :SCRIBE)
|
||||
(getf msg :GARDENER))))
|
||||
((and (listp msg) (eq (getf msg :TYPE) :CHAT))
|
||||
(enqueue-msg (getf msg :TEXT)))
|
||||
(t (enqueue-msg (format nil "~s" msg))))))
|
||||
(error (c) (setf *status-text* (format nil "Net Error: ~a" c)) (setf *is-running* nil)))
|
||||
(sleep 0.05)))
|
||||
@@ -96,7 +96,7 @@
|
||||
(let ((cmd (coerce *input-buffer* 'string)))
|
||||
(setf (fill-pointer *input-buffer*) 0)
|
||||
(when (> (length cmd) 0)
|
||||
(let ((framed (opencortex:frame-message (format nil "~s" (list :type :EVENT :payload (list :sensor :chat-message :text cmd))))))
|
||||
(let ((framed (opencortex:frame-message (format nil "~s" (list :TYPE :EVENT :PAYLOAD (list :SENSOR :chat-message :TEXT cmd))))))
|
||||
(format *stream* "~a" framed)
|
||||
(finish-output *stream*)))
|
||||
(when (string= cmd "/exit") (setf *is-running* nil))))
|
||||
|
||||
Reference in New Issue
Block a user