Jesús Pérez c62e967ce3
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
   - Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
   - Update functions: parse_kcl_file→parse_nickel_file
   - Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
   - Fix cli/providers-install: add has_nickel and nickel_version variables
   - Correct import syntax: .nickel.→.ncl.
   - Update 57 files across core, CLI, config, and utilities

   Configure pre-commit hooks:
   - Activate: nushell-check, nickel-typecheck, markdownlint
   - Comment out: Rust hooks (fmt, clippy, test), check-yaml

   Testing:
   - Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) 
   - Syntax validation: 15 core files 
   - Pre-commit hooks: all passing 
2026-01-08 20:08:46 +00:00

64 lines
1.8 KiB
Plaintext
Executable File

#!/usr/bin/env nu
# Dynamic Version Cache Agent
# Token-optimized agent for progressive version caching with infra-aware hierarchy
# Usage: nu agent.nu <command> [args]
use cache_manager.nu *
use version_loader.nu *
use grace_checker.nu *
use batch_updater.nu *
# Main agent entry point
def main [
command: string # Command: init, get, update-all, clear, status
...args # Additional arguments
] {
match $command {
"init" => {
print "🚀 Initializing dynamic version cache system..."
init-cache-system
print "✅ Cache system initialized"
}
"get" => {
if ($args | length) == 0 {
print "❌ Usage: agent.nu get <component-name>"
exit 1
}
let component = ($args | get 0)
print $"🔍 Getting version for ($component)..."
let version = (get-cached-version $component)
print $"📦 ($component): ($version)"
}
"update-all" => {
print "🔄 Updating all cached versions..."
batch-update-cache
print "✅ Cache updated"
}
"clear" => {
print "🗑️ Clearing version cache..."
clear-cache-system
print "✅ Cache cleared"
}
"status" => {
print "📊 Version cache status:"
show-cache-status
}
"sync" => {
print "🔄 Syncing cache from sources..."
sync-cache-from-sources
print "✅ Cache synced"
}
_ => {
print $"❌ Unknown command: ($command)"
print "Available commands: init, get, update-all, clear, status, sync"
exit 1
}
}
}