From 95fecdd64c8999f292117d811c1b087c3419cfaf Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Sun, 19 Apr 2026 19:59:26 -0400 Subject: [PATCH] fix(protocol): Whitelist :CHAT message type in schema validator --- skills/org-skill-protocol-validator.org | 2 +- src/communication-validator.lisp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/skills/org-skill-protocol-validator.org b/skills/org-skill-protocol-validator.org index 0bd7010..1040a9b 100644 --- a/skills/org-skill-protocol-validator.org +++ b/skills/org-skill-protocol-validator.org @@ -54,7 +54,7 @@ Decouple protocol parsing (framing/unframing) from semantic validation. (error "Communication Protocol Schema Error: Message must be a property list (got ~s)" (type-of msg))) (let ((type (let ((raw (proto-get msg :type))) (if (keywordp raw) (intern (string-upcase (string raw)) :keyword) raw)))) - (unless (member type '(:REQUEST :EVENT :RESPONSE :LOG :STATUS)) + (unless (member type '(:REQUEST :EVENT :RESPONSE :LOG :STATUS :CHAT)) (progn (harness-log "REJECTED MSG: ~s" msg) (error "Communication Protocol Schema Error: Invalid message type '~a'" type))) (case type diff --git a/src/communication-validator.lisp b/src/communication-validator.lisp index 329df45..66ff0d8 100644 --- a/src/communication-validator.lisp +++ b/src/communication-validator.lisp @@ -6,7 +6,7 @@ (error "Communication Protocol Schema Error: Message must be a property list (got ~s)" (type-of msg))) (let ((type (let ((raw (proto-get msg :type))) (if (keywordp raw) (intern (string-upcase (string raw)) :keyword) raw)))) - (unless (member type '(:REQUEST :EVENT :RESPONSE :LOG :STATUS)) + (unless (member type '(:REQUEST :EVENT :RESPONSE :LOG :STATUS :CHAT)) (progn (harness-log "REJECTED MSG: ~s" msg) (error "Communication Protocol Schema Error: Invalid message type '~a'" type))) (case type