Remove LOG_* message types entirely

LOG_ERROR and LOG_INFO are no longer supported. Remove the constants,
drop them from ValidateMessageType, update ERROR_REPORT deprecation
notice to point to PROMPT_RESPONSE, and remove LOG_ERROR from the
skill docs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Levi Neely 2026-02-22 09:16:01 +01:00
parent 2d31b40037
commit e8f1f4f9be
2 changed files with 6 additions and 16 deletions

View File

@ -10,9 +10,6 @@ import (
type MessageType string
const (
// Auto-complete message types (log only)
MessageTypeLogError MessageType = "LOG_ERROR" // Errors
// Inbox message types
MessageTypePromptResponse MessageType = "PROMPT_RESPONSE" // Bot response to user prompt
MessageTypePromptRequest MessageType = "PROMPT_REQUEST" // User instructions to bot
@ -24,12 +21,11 @@ const (
MessageTypeApprovalResponse MessageType = "APPROVAL_RESPONSE" // Provide test results
// Deprecated types (for backward compatibility)
MessageTypeLogInfo MessageType = "LOG_INFO" // Deprecated: use PROMPT_RESPONSE
MessageTypePrompt MessageType = "PROMPT" // Deprecated: use PROMPT_REQUEST
MessageTypeQuestion MessageType = "QUESTION" // Deprecated: use QUERY_REQUEST
MessageTypeAnswer MessageType = "ANSWER" // Deprecated: use QUERY_RESPONSE
MessageTypeStatusUpdate MessageType = "STATUS_UPDATE" // Deprecated: use PROMPT_RESPONSE
MessageTypeErrorReport MessageType = "ERROR_REPORT" // Deprecated: use LOG_ERROR
MessageTypeErrorReport MessageType = "ERROR_REPORT" // Deprecated: use PROMPT_RESPONSE
)
// Message represents a structured message between sessions
@ -78,17 +74,13 @@ func generateID() string {
// ValidateMessageType checks if the message type is valid and returns an error if deprecated or invalid
func ValidateMessageType(msgType MessageType) error {
switch msgType {
// Valid ephemeral types
case MessageTypePromptResponse, MessageTypeLogError:
return nil
// Valid persistent types
case MessageTypePromptRequest, MessageTypeQueryRequest, MessageTypeQueryResponse,
// Valid types
case MessageTypePromptResponse,
MessageTypePromptRequest, MessageTypeQueryRequest, MessageTypeQueryResponse,
MessageTypeReviewRequest, MessageTypeReviewResponse,
MessageTypeApprovalRequest, MessageTypeApprovalResponse:
return nil
// Deprecated types
case MessageTypeLogInfo:
return fmt.Errorf("deprecated type: use PROMPT_RESPONSE instead")
case MessageTypePrompt:
return fmt.Errorf("deprecated type: use PROMPT_REQUEST instead")
case MessageTypeQuestion:
@ -98,8 +90,8 @@ func ValidateMessageType(msgType MessageType) error {
case MessageTypeStatusUpdate:
return fmt.Errorf("deprecated type: use PROMPT_RESPONSE instead")
case MessageTypeErrorReport:
return fmt.Errorf("deprecated type: use LOG_ERROR instead")
return fmt.Errorf("deprecated type: use PROMPT_RESPONSE instead")
default:
return fmt.Errorf("invalid message type. valid types are: PROMPT_RESPONSE, LOG_ERROR, PROMPT_REQUEST, QUERY_REQUEST, QUERY_RESPONSE, REVIEW_REQUEST, REVIEW_RESPONSE, APPROVAL_REQUEST, APPROVAL_RESPONSE")
return fmt.Errorf("invalid message type. valid types are: PROMPT_RESPONSE, PROMPT_REQUEST, QUERY_REQUEST, QUERY_RESPONSE, REVIEW_REQUEST, REVIEW_RESPONSE, APPROVAL_REQUEST, APPROVAL_RESPONSE")
}
}

View File

@ -35,8 +35,6 @@ Use the `send_message` tool with these parameters:
- `REVIEW_REQUEST` / `REVIEW_RESPONSE` - Request/provide reviews
- `APPROVAL_REQUEST` / `APPROVAL_RESPONSE` - Request/provide approvals
**Error Reporting:**
- `LOG_ERROR` - Report errors (auto-completed)
### Examples