fix: Update setup_mcp.sh for v2.0.0 src/ layout + test fixes (#201)

Merges setup_mcp.sh fix for v2.0.0 src/ layout + test updates.

Original fix by @501981732 in PR #197.
Test updates to make CI pass.

Closes #192
This commit is contained in:
yusyus
2025-11-29 21:34:51 +03:00
committed by GitHub
parent 4cbd0a0a3c
commit 998be0d2dd
13 changed files with 1221 additions and 78 deletions

View File

@@ -1506,7 +1506,9 @@ def setup_argument_parser() -> argparse.ArgumentParser:
parser.add_argument('--enhance', action='store_true',
help='Enhance SKILL.md using Claude API after building (requires API key)')
parser.add_argument('--enhance-local', action='store_true',
help='Enhance SKILL.md using Claude Code in new terminal (no API key needed)')
help='Enhance SKILL.md using Claude Code (no API key needed, runs in background)')
parser.add_argument('--interactive-enhancement', action='store_true',
help='Open terminal window for enhancement (use with --enhance-local)')
parser.add_argument('--api-key', type=str,
help='Anthropic API key for --enhance (or set ANTHROPIC_API_KEY)')
parser.add_argument('--resume', action='store_true',
@@ -1740,16 +1742,25 @@ def execute_enhancement(config: Dict[str, Any], args: argparse.Namespace) -> Non
# Optional enhancement with Claude Code (local, no API key)
if args.enhance_local:
logger.info("\n" + "=" * 60)
logger.info("ENHANCING SKILL.MD WITH CLAUDE CODE (LOCAL)")
if args.interactive_enhancement:
logger.info("ENHANCING SKILL.MD WITH CLAUDE CODE (INTERACTIVE)")
else:
logger.info("ENHANCING SKILL.MD WITH CLAUDE CODE (HEADLESS)")
logger.info("=" * 60 + "\n")
try:
enhance_cmd = ['python3', 'cli/enhance_skill_local.py', f'output/{config["name"]}/']
subprocess.run(enhance_cmd, check=True)
enhance_cmd = ['skill-seekers-enhance', f'output/{config["name"]}/']
if args.interactive_enhancement:
enhance_cmd.append('--interactive-enhancement')
result = subprocess.run(enhance_cmd, check=True)
if result.returncode == 0:
logger.info("\n✅ Enhancement complete!")
except subprocess.CalledProcessError:
logger.warning("\n⚠ Enhancement failed, but skill was still built")
except FileNotFoundError:
logger.warning("\nenhance_skill_local.py not found. Run manually:")
logger.warning("\nskill-seekers-enhance command not found. Run manually:")
logger.info(" skill-seekers-enhance output/%s/", config['name'])
# Print packaging instructions
@@ -1759,10 +1770,11 @@ def execute_enhancement(config: Dict[str, Any], args: argparse.Namespace) -> Non
# Suggest enhancement if not done
if not args.enhance and not args.enhance_local:
logger.info("\n💡 Optional: Enhance SKILL.md with Claude:")
logger.info(" API-based: skill-seekers-enhance output/%s/", config['name'])
logger.info(" or re-run with: --enhance")
logger.info(" Local (no API key): skill-seekers-enhance output/%s/", config['name'])
logger.info(" or re-run with: --enhance-local")
logger.info(" Local (recommended): skill-seekers-enhance output/%s/", config['name'])
logger.info(" or re-run with: --enhance-local")
logger.info(" API-based: skill-seekers-enhance-api output/%s/", config['name'])
logger.info(" or re-run with: --enhance")
logger.info("\n💡 Tip: Use --interactive-enhancement with --enhance-local to open terminal window")
def main() -> None: