From 3904d2fbc7917b244d9c24759328210533c1b0e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Pe=CC=81rez?= Date: Thu, 8 Jan 2026 21:16:17 +0000 Subject: [PATCH] chore: update scripts --- .gitignore | 4 ++-- scripts/provisioning-validate.nu | 6 +++--- scripts/test_ai.nu | 10 +++++----- scripts/test_validation.nu | 18 +++++++++--------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index fc3117b..940d68f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.p +.p .claude .vscode .shellcheckrc @@ -9,7 +9,7 @@ ai_demo.nu CLAUDE.md .cache .coder -wrks +.wrks ROOT OLD plugins/nushell-plugins diff --git a/scripts/provisioning-validate.nu b/scripts/provisioning-validate.nu index 348fbae..a59228d 100755 --- a/scripts/provisioning-validate.nu +++ b/scripts/provisioning-validate.nu @@ -1,7 +1,7 @@ #!/usr/bin/env nu # Infrastructure Validation and Review Tool -# Validates KCL/YAML configurations, checks best practices, and generates reports +# Validates Nickel/YAML configurations, checks best practices, and generates reports use core/nulib/lib_provisioning/infra_validator/validator.nu * @@ -140,7 +140,7 @@ def show_detailed_help []: nothing -> nothing { print "" print "VALIDATION RULES:" print " VAL001 YAML Syntax Validation (critical)" - print " VAL002 KCL Compilation Check (critical)" + print " VAL002 Nickel Compilation Check (critical)" print " VAL003 Unquoted Variable References (error)" print " VAL004 Required Fields Validation (error)" print " VAL005 Resource Naming Conventions (warning)" @@ -172,7 +172,7 @@ def show_detailed_help []: nothing -> nothing { def setup_validation_environment [verbose: bool]: nothing -> nothing { # Check required dependencies - let dependencies = ["kcl"] # Add other required tools + let dependencies = ["nickel"] # Add other required tools for dep in $dependencies { let check = (^bash -c $"type -P ($dep)" | complete) diff --git a/scripts/test_ai.nu b/scripts/test_ai.nu index 80f86ff..09fe3bd 100755 --- a/scripts/test_ai.nu +++ b/scripts/test_ai.nu @@ -35,14 +35,14 @@ if $ai_available { } else { print "❌ No API keys found. Set one of:" print " - OPENAI_API_KEY for OpenAI" - print " - ANTHROPIC_API_KEY for Claude" + print " - ANTHROPIC_API_KEY for Claude" print " - LLM_API_KEY for generic LLM" } print "" print "🎯 AI Integration Features Implemented:" -print " 1. ✅ KCL configuration schema (kcl/settings.k:54-79)" -print " 2. ✅ AI library (core/nulib/lib_provisioning/ai/lib.nu)" +print " 1. ✅ Nickel configuration schema (nickel/settings.ncl:54-79)" +print " 2. ✅ AI library (core/nulib/lib_provisioning/ai/lib.nu)" print " 3. ✅ Template generation with AI prompts" print " 4. ✅ Natural language queries (--ai_query flag)" print " 5. ✅ Webhook integration for chat platforms" @@ -52,8 +52,8 @@ print "📋 Usage Examples:" print " # Generate templates" print " ./core/nulib/provisioning ai template --prompt \"3-node K8s cluster\"" print "" -print " # Natural language queries" +print " # Natural language queries" print " ./core/nulib/provisioning query --ai_query \"show AWS servers with high CPU\"" print "" print " # Test configuration" -print " ./core/nulib/provisioning ai test" \ No newline at end of file +print " ./core/nulib/provisioning ai test" diff --git a/scripts/test_validation.nu b/scripts/test_validation.nu index ee6e877..5b2212b 100755 --- a/scripts/test_validation.nu +++ b/scripts/test_validation.nu @@ -80,18 +80,18 @@ servers: print "------------------------------------------" if ("klab/sgoyol" | path exists) { - let sgoyol_files = (glob "klab/sgoyol/**/*.k") - print $"Found ($sgoyol_files | length) KCL files in sgoyol infrastructure" + let sgoyol_files = (glob "klab/sgoyol/**/*.ncl") + print $"Found ($sgoyol_files | length) Nickel files in sgoyol infrastructure" if ($sgoyol_files | length) > 0 { let first_file = ($sgoyol_files | first) - print $"Testing KCL compilation on: ($first_file)" + print $"Testing Nickel compilation on: ($first_file)" - let kcl_result = (validate_kcl_compilation $first_file) - if $kcl_result.passed { - print "✅ KCL compilation test passed" + let nickel_result = (validate_nickel_compilation $first_file) + if $nickel_result.passed { + print "✅ Nickel compilation test passed" } else { - print $"❌ KCL compilation failed: ($kcl_result.issue.message)" + print $"❌ Nickel compilation failed: ($nickel_result.issue.message)" } } @@ -123,7 +123,7 @@ servers: print "✅ Unquoted variables detection: Working" print "✅ YAML syntax validation: Working" print "✅ Auto-fix functionality: Working" - print "✅ KCL compilation check: Working" + print "✅ Nickel compilation check: Working" print "" print "The infrastructure validation system is ready for use!" -} \ No newline at end of file +}