[Sprint 7] chore: Add model validation to marketplace script #306

Closed
opened 2026-01-29 02:44:58 +00:00 by lmiranda · 0 comments
Owner

Summary

Update validate-marketplace.sh to validate model field values in agent frontmatter and plugin.json.

Implementation

Change V5.4.0 (Sprint 7)

Tasks

  • Add function to validate agent model field (opus|sonnet|haiku)
  • Add function to validate plugin defaultModel field
  • Integrate into existing validation flow
  • Test with valid and invalid values

Validation Logic

validate_agent_model() {
    local file="$1"
    local model=$(grep -A10 '^---' "$file" | grep '^model:' | awk '{print $2}')
    if [[ -n "$model" && ! "$model" =~ ^(opus|sonnet|haiku)$ ]]; then
        echo "ERROR: Invalid model '$model' in $file"
        return 1
    fi
}

Acceptance Criteria

  • Script validates model field if present
  • Invalid values (not opus/sonnet/haiku) fail validation
  • Missing model field is OK (uses default)
## Summary Update validate-marketplace.sh to validate model field values in agent frontmatter and plugin.json. ## Implementation [Change V5.4.0 (Sprint 7)](https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/wiki/Change+V5.4.0%3A+Multi-Model+Support+%28Sprint+7+Implementation%29) ## Tasks - [ ] Add function to validate agent model field (opus|sonnet|haiku) - [ ] Add function to validate plugin defaultModel field - [ ] Integrate into existing validation flow - [ ] Test with valid and invalid values ## Validation Logic ```bash validate_agent_model() { local file="$1" local model=$(grep -A10 '^---' "$file" | grep '^model:' | awk '{print $2}') if [[ -n "$model" && ! "$model" =~ ^(opus|sonnet|haiku)$ ]]; then echo "ERROR: Invalid model '$model' in $file" return 1 fi } ``` ## Acceptance Criteria - Script validates model field if present - Invalid values (not opus/sonnet/haiku) fail validation - Missing model field is OK (uses default)
lmiranda added this to the Sprint 7 - Multi-Model Agent Support milestone 2026-01-29 02:45:09 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: personal-projects/leo-claude-mktplace#306