feat(cli): Add --dry-run Flag For Transaction and Webhook Commands
#246
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync Check | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| check-references-sync: | |
| name: Verify reference files are in sync | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Compare reference files | |
| run: | | |
| SKILLS_DIR="helius-skills/helius/references" | |
| PLUGIN_DIR="helius-plugin/skills/build/references" | |
| if [ ! -d "$SKILLS_DIR" ] || [ ! -d "$PLUGIN_DIR" ]; then | |
| echo "One or both reference directories are missing." | |
| echo " helius-skills: $([ -d "$SKILLS_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| echo " helius-plugin: $([ -d "$PLUGIN_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| exit 1 | |
| fi | |
| # Check for files only in one directory | |
| SKILLS_FILES=$(cd "$SKILLS_DIR" && find . -type f -name '*.md' | sort) | |
| PLUGIN_FILES=$(cd "$PLUGIN_DIR" && find . -type f -name '*.md' | sort) | |
| if [ "$SKILLS_FILES" != "$PLUGIN_FILES" ]; then | |
| echo "File lists differ between reference directories:" | |
| echo "" | |
| echo "Only in helius-skills/:" | |
| comm -23 <(echo "$SKILLS_FILES") <(echo "$PLUGIN_FILES") | sed 's/^/ /' | |
| echo "" | |
| echo "Only in helius-plugin/:" | |
| comm -13 <(echo "$SKILLS_FILES") <(echo "$PLUGIN_FILES") | sed 's/^/ /' | |
| exit 1 | |
| fi | |
| # Compare file contents | |
| DIFF_FOUND=0 | |
| for file in $SKILLS_FILES; do | |
| if ! diff -q "$SKILLS_DIR/$file" "$PLUGIN_DIR/$file" > /dev/null 2>&1; then | |
| echo "DIFF: $file differs between helius-skills and helius-plugin" | |
| diff --unified=3 "$SKILLS_DIR/$file" "$PLUGIN_DIR/$file" | head -20 | |
| echo "..." | |
| DIFF_FOUND=1 | |
| fi | |
| done | |
| if [ "$DIFF_FOUND" -eq 1 ]; then | |
| echo "" | |
| echo "Reference files are out of sync!" | |
| echo "The canonical source is helius-skills/helius/references/." | |
| echo "Copy changes to helius-plugin/skills/build/references/ to fix." | |
| exit 1 | |
| fi | |
| echo "All reference files are in sync." | |
| - name: Compare DFlow reference files | |
| run: | | |
| SKILLS_DIR="helius-skills/helius-dflow/references" | |
| PLUGIN_DIR="helius-plugin/skills/dflow/references" | |
| if [ ! -d "$SKILLS_DIR" ] || [ ! -d "$PLUGIN_DIR" ]; then | |
| echo "One or both DFlow reference directories are missing." | |
| echo " helius-skills/helius-dflow: $([ -d "$SKILLS_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| echo " helius-plugin/skills/dflow: $([ -d "$PLUGIN_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| exit 1 | |
| fi | |
| # Check for files only in one directory | |
| SKILLS_FILES=$(cd "$SKILLS_DIR" && find . -type f -name '*.md' | sort) | |
| PLUGIN_FILES=$(cd "$PLUGIN_DIR" && find . -type f -name '*.md' | sort) | |
| if [ "$SKILLS_FILES" != "$PLUGIN_FILES" ]; then | |
| echo "File lists differ between DFlow reference directories:" | |
| echo "" | |
| echo "Only in helius-skills/helius-dflow/:" | |
| comm -23 <(echo "$SKILLS_FILES") <(echo "$PLUGIN_FILES") | sed 's/^/ /' | |
| echo "" | |
| echo "Only in helius-plugin/skills/dflow/:" | |
| comm -13 <(echo "$SKILLS_FILES") <(echo "$PLUGIN_FILES") | sed 's/^/ /' | |
| exit 1 | |
| fi | |
| # Compare file contents | |
| DIFF_FOUND=0 | |
| for file in $SKILLS_FILES; do | |
| if ! diff -q "$SKILLS_DIR/$file" "$PLUGIN_DIR/$file" > /dev/null 2>&1; then | |
| echo "DIFF: $file differs between helius-skills/helius-dflow and helius-plugin/skills/dflow" | |
| diff --unified=3 "$SKILLS_DIR/$file" "$PLUGIN_DIR/$file" | head -20 | |
| echo "..." | |
| DIFF_FOUND=1 | |
| fi | |
| done | |
| if [ "$DIFF_FOUND" -eq 1 ]; then | |
| echo "" | |
| echo "DFlow reference files are out of sync!" | |
| echo "The canonical source is helius-skills/helius-dflow/references/." | |
| echo "Copy changes to helius-plugin/skills/dflow/references/ to fix." | |
| exit 1 | |
| fi | |
| echo "All DFlow reference files are in sync." | |
| - name: Compare Jupiter reference files | |
| run: | | |
| SKILLS_DIR="helius-skills/helius-jupiter/references" | |
| PLUGIN_DIR="helius-plugin/skills/jupiter/references" | |
| if [ ! -d "$SKILLS_DIR" ] || [ ! -d "$PLUGIN_DIR" ]; then | |
| echo "One or both Jupiter reference directories are missing." | |
| echo " helius-skills/helius-jupiter: $([ -d "$SKILLS_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| echo " helius-plugin/skills/jupiter: $([ -d "$PLUGIN_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| exit 1 | |
| fi | |
| # Check for files only in one directory | |
| SKILLS_FILES=$(cd "$SKILLS_DIR" && find . -type f -name '*.md' | sort) | |
| PLUGIN_FILES=$(cd "$PLUGIN_DIR" && find . -type f -name '*.md' | sort) | |
| if [ "$SKILLS_FILES" != "$PLUGIN_FILES" ]; then | |
| echo "File lists differ between Jupiter reference directories:" | |
| echo "" | |
| echo "Only in helius-skills/helius-jupiter/:" | |
| comm -23 <(echo "$SKILLS_FILES") <(echo "$PLUGIN_FILES") | sed 's/^/ /' | |
| echo "" | |
| echo "Only in helius-plugin/skills/jupiter/:" | |
| comm -13 <(echo "$SKILLS_FILES") <(echo "$PLUGIN_FILES") | sed 's/^/ /' | |
| exit 1 | |
| fi | |
| # Compare file contents | |
| DIFF_FOUND=0 | |
| for file in $SKILLS_FILES; do | |
| if ! diff -q "$SKILLS_DIR/$file" "$PLUGIN_DIR/$file" > /dev/null 2>&1; then | |
| echo "DIFF: $file differs between helius-skills/helius-jupiter and helius-plugin/skills/jupiter" | |
| diff --unified=3 "$SKILLS_DIR/$file" "$PLUGIN_DIR/$file" | head -20 | |
| echo "..." | |
| DIFF_FOUND=1 | |
| fi | |
| done | |
| if [ "$DIFF_FOUND" -eq 1 ]; then | |
| echo "" | |
| echo "Jupiter reference files are out of sync!" | |
| echo "The canonical source is helius-skills/helius-jupiter/references/." | |
| echo "Copy changes to helius-plugin/skills/jupiter/references/ to fix." | |
| exit 1 | |
| fi | |
| echo "All Jupiter reference files are in sync." | |
| - name: Compare OKX reference files | |
| run: | | |
| SKILLS_DIR="helius-skills/helius-okx/references" | |
| PLUGIN_DIR="helius-plugin/skills/okx/references" | |
| if [ ! -d "$SKILLS_DIR" ] || [ ! -d "$PLUGIN_DIR" ]; then | |
| echo "One or both OKX reference directories are missing." | |
| echo " helius-skills/helius-okx: $([ -d "$SKILLS_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| echo " helius-plugin/skills/okx: $([ -d "$PLUGIN_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| exit 1 | |
| fi | |
| # Check for files only in one directory | |
| SKILLS_FILES=$(cd "$SKILLS_DIR" && find . -type f -name '*.md' | sort) | |
| PLUGIN_FILES=$(cd "$PLUGIN_DIR" && find . -type f -name '*.md' | sort) | |
| if [ "$SKILLS_FILES" != "$PLUGIN_FILES" ]; then | |
| echo "File lists differ between OKX reference directories:" | |
| echo "" | |
| echo "Only in helius-skills/helius-okx/:" | |
| comm -23 <(echo "$SKILLS_FILES") <(echo "$PLUGIN_FILES") | sed 's/^/ /' | |
| echo "" | |
| echo "Only in helius-plugin/skills/okx/:" | |
| comm -13 <(echo "$SKILLS_FILES") <(echo "$PLUGIN_FILES") | sed 's/^/ /' | |
| exit 1 | |
| fi | |
| # Compare file contents | |
| DIFF_FOUND=0 | |
| for file in $SKILLS_FILES; do | |
| if ! diff -q "$SKILLS_DIR/$file" "$PLUGIN_DIR/$file" > /dev/null 2>&1; then | |
| echo "DIFF: $file differs between helius-skills/helius-okx and helius-plugin/skills/okx" | |
| diff --unified=3 "$SKILLS_DIR/$file" "$PLUGIN_DIR/$file" | head -20 | |
| echo "..." | |
| DIFF_FOUND=1 | |
| fi | |
| done | |
| if [ "$DIFF_FOUND" -eq 1 ]; then | |
| echo "" | |
| echo "OKX reference files are out of sync!" | |
| echo "The canonical source is helius-skills/helius-okx/references/." | |
| echo "Copy changes to helius-plugin/skills/okx/references/ to fix." | |
| exit 1 | |
| fi | |
| echo "All OKX reference files are in sync." | |
| - name: Compare Phantom reference files | |
| run: | | |
| SKILLS_DIR="helius-skills/helius-phantom/references" | |
| PLUGIN_DIR="helius-plugin/skills/phantom/references" | |
| if [ ! -d "$SKILLS_DIR" ] || [ ! -d "$PLUGIN_DIR" ]; then | |
| echo "One or both Phantom reference directories are missing." | |
| echo " helius-skills/helius-phantom: $([ -d "$SKILLS_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| echo " helius-plugin/skills/phantom: $([ -d "$PLUGIN_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| exit 1 | |
| fi | |
| # Check for files only in one directory | |
| SKILLS_FILES=$(cd "$SKILLS_DIR" && find . -type f -name '*.md' | sort) | |
| PLUGIN_FILES=$(cd "$PLUGIN_DIR" && find . -type f -name '*.md' | sort) | |
| if [ "$SKILLS_FILES" != "$PLUGIN_FILES" ]; then | |
| echo "File lists differ between Phantom reference directories:" | |
| echo "" | |
| echo "Only in helius-skills/helius-phantom/:" | |
| comm -23 <(echo "$SKILLS_FILES") <(echo "$PLUGIN_FILES") | sed 's/^/ /' | |
| echo "" | |
| echo "Only in helius-plugin/skills/phantom/:" | |
| comm -13 <(echo "$SKILLS_FILES") <(echo "$PLUGIN_FILES") | sed 's/^/ /' | |
| exit 1 | |
| fi | |
| # Compare file contents | |
| DIFF_FOUND=0 | |
| for file in $SKILLS_FILES; do | |
| if ! diff -q "$SKILLS_DIR/$file" "$PLUGIN_DIR/$file" > /dev/null 2>&1; then | |
| echo "DIFF: $file differs between helius-skills/helius-phantom and helius-plugin/skills/phantom" | |
| diff --unified=3 "$SKILLS_DIR/$file" "$PLUGIN_DIR/$file" | head -20 | |
| echo "..." | |
| DIFF_FOUND=1 | |
| fi | |
| done | |
| if [ "$DIFF_FOUND" -eq 1 ]; then | |
| echo "" | |
| echo "Phantom reference files are out of sync!" | |
| echo "The canonical source is helius-skills/helius-phantom/references/." | |
| echo "Copy changes to helius-plugin/skills/phantom/references/ to fix." | |
| exit 1 | |
| fi | |
| echo "All Phantom reference files are in sync." | |
| - name: Compare SVM reference files | |
| run: | | |
| SKILLS_DIR="helius-skills/svm/references" | |
| PLUGIN_DIR="helius-plugin/skills/svm/references" | |
| if [ ! -d "$SKILLS_DIR" ] || [ ! -d "$PLUGIN_DIR" ]; then | |
| echo "One or both SVM reference directories are missing." | |
| echo " helius-skills/svm: $([ -d "$SKILLS_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| echo " helius-plugin/skills/svm: $([ -d "$PLUGIN_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| exit 1 | |
| fi | |
| # Check for files only in one directory | |
| SKILLS_FILES=$(cd "$SKILLS_DIR" && find . -type f -name '*.md' | sort) | |
| PLUGIN_FILES=$(cd "$PLUGIN_DIR" && find . -type f -name '*.md' | sort) | |
| if [ "$SKILLS_FILES" != "$PLUGIN_FILES" ]; then | |
| echo "File lists differ between SVM reference directories:" | |
| echo "" | |
| echo "Only in helius-skills/svm/:" | |
| comm -23 <(echo "$SKILLS_FILES") <(echo "$PLUGIN_FILES") | sed 's/^/ /' | |
| echo "" | |
| echo "Only in helius-plugin/skills/svm/:" | |
| comm -13 <(echo "$SKILLS_FILES") <(echo "$PLUGIN_FILES") | sed 's/^/ /' | |
| exit 1 | |
| fi | |
| # Compare file contents | |
| DIFF_FOUND=0 | |
| for file in $SKILLS_FILES; do | |
| if ! diff -q "$SKILLS_DIR/$file" "$PLUGIN_DIR/$file" > /dev/null 2>&1; then | |
| echo "DIFF: $file differs between helius-skills/svm and helius-plugin/skills/svm" | |
| diff --unified=3 "$SKILLS_DIR/$file" "$PLUGIN_DIR/$file" | head -20 | |
| echo "..." | |
| DIFF_FOUND=1 | |
| fi | |
| done | |
| if [ "$DIFF_FOUND" -eq 1 ]; then | |
| echo "" | |
| echo "SVM reference files are out of sync!" | |
| echo "The canonical source is helius-skills/svm/references/." | |
| echo "Copy changes to helius-plugin/skills/svm/references/ to fix." | |
| exit 1 | |
| fi | |
| echo "All SVM reference files are in sync." | |
| - name: Compare build reference files (helius-cursor) | |
| run: | | |
| SKILLS_DIR="helius-skills/helius/references" | |
| CURSOR_DIR="helius-cursor/skills/build/references" | |
| if [ ! -d "$SKILLS_DIR" ] || [ ! -d "$CURSOR_DIR" ]; then | |
| echo "One or both reference directories are missing." | |
| echo " helius-skills: $([ -d "$SKILLS_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| echo " helius-cursor: $([ -d "$CURSOR_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| exit 1 | |
| fi | |
| SKILLS_FILES=$(cd "$SKILLS_DIR" && find . -type f -name '*.md' | sort) | |
| CURSOR_FILES=$(cd "$CURSOR_DIR" && find . -type f -name '*.md' | sort) | |
| if [ "$SKILLS_FILES" != "$CURSOR_FILES" ]; then | |
| echo "File lists differ between build reference directories:" | |
| echo "Only in helius-skills/:" | |
| comm -23 <(echo "$SKILLS_FILES") <(echo "$CURSOR_FILES") | sed 's/^/ /' | |
| echo "Only in helius-cursor/:" | |
| comm -13 <(echo "$SKILLS_FILES") <(echo "$CURSOR_FILES") | sed 's/^/ /' | |
| exit 1 | |
| fi | |
| DIFF_FOUND=0 | |
| for file in $SKILLS_FILES; do | |
| if ! diff -q "$SKILLS_DIR/$file" "$CURSOR_DIR/$file" > /dev/null 2>&1; then | |
| echo "DIFF: $file differs between helius-skills and helius-cursor" | |
| diff --unified=3 "$SKILLS_DIR/$file" "$CURSOR_DIR/$file" | head -20 | |
| echo "..." | |
| DIFF_FOUND=1 | |
| fi | |
| done | |
| if [ "$DIFF_FOUND" -eq 1 ]; then | |
| echo "Build reference files are out of sync!" | |
| echo "The canonical source is helius-skills/helius/references/." | |
| echo "Copy changes to helius-cursor/skills/build/references/ to fix." | |
| exit 1 | |
| fi | |
| echo "All build reference files (helius-cursor) are in sync." | |
| - name: Compare DFlow reference files (helius-cursor) | |
| run: | | |
| SKILLS_DIR="helius-skills/helius-dflow/references" | |
| CURSOR_DIR="helius-cursor/skills/dflow/references" | |
| if [ ! -d "$SKILLS_DIR" ] || [ ! -d "$CURSOR_DIR" ]; then | |
| echo "One or both DFlow reference directories are missing." | |
| echo " helius-skills/helius-dflow: $([ -d "$SKILLS_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| echo " helius-cursor/skills/dflow: $([ -d "$CURSOR_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| exit 1 | |
| fi | |
| SKILLS_FILES=$(cd "$SKILLS_DIR" && find . -type f -name '*.md' | sort) | |
| CURSOR_FILES=$(cd "$CURSOR_DIR" && find . -type f -name '*.md' | sort) | |
| if [ "$SKILLS_FILES" != "$CURSOR_FILES" ]; then | |
| echo "File lists differ between DFlow reference directories:" | |
| echo "Only in helius-skills/helius-dflow/:" | |
| comm -23 <(echo "$SKILLS_FILES") <(echo "$CURSOR_FILES") | sed 's/^/ /' | |
| echo "Only in helius-cursor/skills/dflow/:" | |
| comm -13 <(echo "$SKILLS_FILES") <(echo "$CURSOR_FILES") | sed 's/^/ /' | |
| exit 1 | |
| fi | |
| DIFF_FOUND=0 | |
| for file in $SKILLS_FILES; do | |
| if ! diff -q "$SKILLS_DIR/$file" "$CURSOR_DIR/$file" > /dev/null 2>&1; then | |
| echo "DIFF: $file differs between helius-skills/helius-dflow and helius-cursor/skills/dflow" | |
| diff --unified=3 "$SKILLS_DIR/$file" "$CURSOR_DIR/$file" | head -20 | |
| echo "..." | |
| DIFF_FOUND=1 | |
| fi | |
| done | |
| if [ "$DIFF_FOUND" -eq 1 ]; then | |
| echo "DFlow reference files are out of sync!" | |
| echo "The canonical source is helius-skills/helius-dflow/references/." | |
| echo "Copy changes to helius-cursor/skills/dflow/references/ to fix." | |
| exit 1 | |
| fi | |
| echo "All DFlow reference files (helius-cursor) are in sync." | |
| - name: Compare Jupiter reference files (helius-cursor) | |
| run: | | |
| SKILLS_DIR="helius-skills/helius-jupiter/references" | |
| CURSOR_DIR="helius-cursor/skills/jupiter/references" | |
| if [ ! -d "$SKILLS_DIR" ] || [ ! -d "$CURSOR_DIR" ]; then | |
| echo "One or both Jupiter reference directories are missing." | |
| echo " helius-skills/helius-jupiter: $([ -d "$SKILLS_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| echo " helius-cursor/skills/jupiter: $([ -d "$CURSOR_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| exit 1 | |
| fi | |
| SKILLS_FILES=$(cd "$SKILLS_DIR" && find . -type f -name '*.md' | sort) | |
| CURSOR_FILES=$(cd "$CURSOR_DIR" && find . -type f -name '*.md' | sort) | |
| if [ "$SKILLS_FILES" != "$CURSOR_FILES" ]; then | |
| echo "File lists differ between Jupiter reference directories:" | |
| echo "Only in helius-skills/helius-jupiter/:" | |
| comm -23 <(echo "$SKILLS_FILES") <(echo "$CURSOR_FILES") | sed 's/^/ /' | |
| echo "Only in helius-cursor/skills/jupiter/:" | |
| comm -13 <(echo "$SKILLS_FILES") <(echo "$CURSOR_FILES") | sed 's/^/ /' | |
| exit 1 | |
| fi | |
| DIFF_FOUND=0 | |
| for file in $SKILLS_FILES; do | |
| if ! diff -q "$SKILLS_DIR/$file" "$CURSOR_DIR/$file" > /dev/null 2>&1; then | |
| echo "DIFF: $file differs between helius-skills/helius-jupiter and helius-cursor/skills/jupiter" | |
| diff --unified=3 "$SKILLS_DIR/$file" "$CURSOR_DIR/$file" | head -20 | |
| echo "..." | |
| DIFF_FOUND=1 | |
| fi | |
| done | |
| if [ "$DIFF_FOUND" -eq 1 ]; then | |
| echo "Jupiter reference files are out of sync!" | |
| echo "The canonical source is helius-skills/helius-jupiter/references/." | |
| echo "Copy changes to helius-cursor/skills/jupiter/references/ to fix." | |
| exit 1 | |
| fi | |
| echo "All Jupiter reference files (helius-cursor) are in sync." | |
| - name: Compare OKX reference files (helius-cursor) | |
| run: | | |
| SKILLS_DIR="helius-skills/helius-okx/references" | |
| CURSOR_DIR="helius-cursor/skills/okx/references" | |
| if [ ! -d "$SKILLS_DIR" ] || [ ! -d "$CURSOR_DIR" ]; then | |
| echo "One or both OKX reference directories are missing." | |
| echo " helius-skills/helius-okx: $([ -d "$SKILLS_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| echo " helius-cursor/skills/okx: $([ -d "$CURSOR_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| exit 1 | |
| fi | |
| SKILLS_FILES=$(cd "$SKILLS_DIR" && find . -type f -name '*.md' | sort) | |
| CURSOR_FILES=$(cd "$CURSOR_DIR" && find . -type f -name '*.md' | sort) | |
| if [ "$SKILLS_FILES" != "$CURSOR_FILES" ]; then | |
| echo "File lists differ between OKX reference directories:" | |
| echo "Only in helius-skills/helius-okx/:" | |
| comm -23 <(echo "$SKILLS_FILES") <(echo "$CURSOR_FILES") | sed 's/^/ /' | |
| echo "Only in helius-cursor/skills/okx/:" | |
| comm -13 <(echo "$SKILLS_FILES") <(echo "$CURSOR_FILES") | sed 's/^/ /' | |
| exit 1 | |
| fi | |
| DIFF_FOUND=0 | |
| for file in $SKILLS_FILES; do | |
| if ! diff -q "$SKILLS_DIR/$file" "$CURSOR_DIR/$file" > /dev/null 2>&1; then | |
| echo "DIFF: $file differs between helius-skills/helius-okx and helius-cursor/skills/okx" | |
| diff --unified=3 "$SKILLS_DIR/$file" "$CURSOR_DIR/$file" | head -20 | |
| echo "..." | |
| DIFF_FOUND=1 | |
| fi | |
| done | |
| if [ "$DIFF_FOUND" -eq 1 ]; then | |
| echo "OKX reference files are out of sync!" | |
| echo "The canonical source is helius-skills/helius-okx/references/." | |
| echo "Copy changes to helius-cursor/skills/okx/references/ to fix." | |
| exit 1 | |
| fi | |
| echo "All OKX reference files (helius-cursor) are in sync." | |
| - name: Compare Phantom reference files (helius-cursor) | |
| run: | | |
| SKILLS_DIR="helius-skills/helius-phantom/references" | |
| CURSOR_DIR="helius-cursor/skills/phantom/references" | |
| if [ ! -d "$SKILLS_DIR" ] || [ ! -d "$CURSOR_DIR" ]; then | |
| echo "One or both Phantom reference directories are missing." | |
| echo " helius-skills/helius-phantom: $([ -d "$SKILLS_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| echo " helius-cursor/skills/phantom: $([ -d "$CURSOR_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| exit 1 | |
| fi | |
| SKILLS_FILES=$(cd "$SKILLS_DIR" && find . -type f -name '*.md' | sort) | |
| CURSOR_FILES=$(cd "$CURSOR_DIR" && find . -type f -name '*.md' | sort) | |
| if [ "$SKILLS_FILES" != "$CURSOR_FILES" ]; then | |
| echo "File lists differ between Phantom reference directories:" | |
| echo "Only in helius-skills/helius-phantom/:" | |
| comm -23 <(echo "$SKILLS_FILES") <(echo "$CURSOR_FILES") | sed 's/^/ /' | |
| echo "Only in helius-cursor/skills/phantom/:" | |
| comm -13 <(echo "$SKILLS_FILES") <(echo "$CURSOR_FILES") | sed 's/^/ /' | |
| exit 1 | |
| fi | |
| DIFF_FOUND=0 | |
| for file in $SKILLS_FILES; do | |
| if ! diff -q "$SKILLS_DIR/$file" "$CURSOR_DIR/$file" > /dev/null 2>&1; then | |
| echo "DIFF: $file differs between helius-skills/helius-phantom and helius-cursor/skills/phantom" | |
| diff --unified=3 "$SKILLS_DIR/$file" "$CURSOR_DIR/$file" | head -20 | |
| echo "..." | |
| DIFF_FOUND=1 | |
| fi | |
| done | |
| if [ "$DIFF_FOUND" -eq 1 ]; then | |
| echo "Phantom reference files are out of sync!" | |
| echo "The canonical source is helius-skills/helius-phantom/references/." | |
| echo "Copy changes to helius-cursor/skills/phantom/references/ to fix." | |
| exit 1 | |
| fi | |
| echo "All Phantom reference files (helius-cursor) are in sync." | |
| - name: Compare SVM reference files (helius-cursor) | |
| run: | | |
| SKILLS_DIR="helius-skills/svm/references" | |
| CURSOR_DIR="helius-cursor/skills/svm/references" | |
| if [ ! -d "$SKILLS_DIR" ] || [ ! -d "$CURSOR_DIR" ]; then | |
| echo "One or both SVM reference directories are missing." | |
| echo " helius-skills/svm: $([ -d "$SKILLS_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| echo " helius-cursor/skills/svm: $([ -d "$CURSOR_DIR" ] && echo 'exists' || echo 'MISSING')" | |
| exit 1 | |
| fi | |
| SKILLS_FILES=$(cd "$SKILLS_DIR" && find . -type f -name '*.md' | sort) | |
| CURSOR_FILES=$(cd "$CURSOR_DIR" && find . -type f -name '*.md' | sort) | |
| if [ "$SKILLS_FILES" != "$CURSOR_FILES" ]; then | |
| echo "File lists differ between SVM reference directories:" | |
| echo "Only in helius-skills/svm/:" | |
| comm -23 <(echo "$SKILLS_FILES") <(echo "$CURSOR_FILES") | sed 's/^/ /' | |
| echo "Only in helius-cursor/skills/svm/:" | |
| comm -13 <(echo "$SKILLS_FILES") <(echo "$CURSOR_FILES") | sed 's/^/ /' | |
| exit 1 | |
| fi | |
| DIFF_FOUND=0 | |
| for file in $SKILLS_FILES; do | |
| if ! diff -q "$SKILLS_DIR/$file" "$CURSOR_DIR/$file" > /dev/null 2>&1; then | |
| echo "DIFF: $file differs between helius-skills/svm and helius-cursor/skills/svm" | |
| diff --unified=3 "$SKILLS_DIR/$file" "$CURSOR_DIR/$file" | head -20 | |
| echo "..." | |
| DIFF_FOUND=1 | |
| fi | |
| done | |
| if [ "$DIFF_FOUND" -eq 1 ]; then | |
| echo "SVM reference files are out of sync!" | |
| echo "The canonical source is helius-skills/svm/references/." | |
| echo "Copy changes to helius-cursor/skills/svm/references/ to fix." | |
| exit 1 | |
| fi | |
| echo "All SVM reference files (helius-cursor) are in sync." | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Verify generated skills and prompts are fresh | |
| run: | | |
| npx tsx scripts/compile-skills.ts | |
| if ! git diff --quiet .agents/ helius-mcp/system-prompts/; then | |
| echo "" | |
| echo "Generated skill output is stale!" | |
| echo "" | |
| git diff --stat .agents/ helius-mcp/system-prompts/ | |
| echo "" | |
| echo "Run 'npx tsx scripts/compile-skills.ts' and commit the output." | |
| exit 1 | |
| fi | |
| STALE=$(git status --porcelain .agents/ helius-mcp/system-prompts/) | |
| if [ -n "$STALE" ]; then | |
| echo "" | |
| echo "Stale or untracked files detected in generated output:" | |
| echo "$STALE" | |
| echo "" | |
| echo "Run 'npx tsx scripts/compile-skills.ts', review the changes, and commit." | |
| exit 1 | |
| fi | |
| echo "All generated skill output is up to date." |