1.8 KiB
1.8 KiB
Operation: Detect Target Type
Automatically detect whether the validation target is a marketplace or plugin based on file structure.
Parameters from $ARGUMENTS
- path: Path to the target directory (required)
- Format:
path:/path/to/targetorpath:.for current directory - Default:
.(current directory)
- Format:
Detection Logic
Execute the target detection algorithm:
# Run the target detector script
bash .scripts/target-detector.sh "$TARGET_PATH"
The detection script will:
- Check for
.claude-plugin/marketplace.json→ Marketplace - Check for
plugin.json→ Plugin - Check for both → Multi-target
- Check for neither → Unknown
Workflow
-
Extract Path Parameter
Parse $ARGUMENTS for path parameter IF path not provided: SET path="." -
Execute Detection
RUN .scripts/target-detector.sh "$path" CAPTURE output and exit code -
Report Results
Output format: { "target_type": "marketplace|plugin|multi-target|unknown", "path": "/absolute/path/to/target", "files_found": ["marketplace.json", "plugin.json"], "confidence": "high|medium|low" }
Examples
Detect current directory:
/validation-orchestrator detect path:.
Detect specific path:
/validation-orchestrator detect path:/path/to/plugin
Error Handling
- Path does not exist: Report error with clear message
- No .claude-plugin directory: Suggest target may not be a plugin/marketplace
- Ambiguous structure: List all potential targets found
- Permission denied: Report access issue with remediation steps
Output Format
Return a structured detection report with:
- Target type identified
- Confidence level
- Files found
- Recommended validation command
- Next steps
Request: $ARGUMENTS