2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
use ../lib_provisioning/utils/ssh.nu *
|
|
|
|
|
use ../lib_provisioning/defs/lists.nu *
|
|
|
|
|
use ../lib_provisioning/config/accessor.nu *
|
feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration
- DAG architecture: `dag show/validate/export` (nulib/main_provisioning/dag.nu),
config loader (lib_provisioning/config/loader/dag.nu), taskserv dag-executor.
Backed by schemas/lib/dag/*.ncl; orchestrator emits NATS events via
WorkspaceComposition::into_workflow. See ADR-020, ADR-021.
- Unified Component Architecture: components/mod.nu, main_provisioning/
{components,workflow,extensions,ontoref-queries}.nu. Full workflow engine with
topological sort and NATS subject emission. Blocks A-H complete (libre-daoshi).
- Commands-registry: nulib/commands-registry.ncl (Nickel source, 314 lines) +
JSON cache at ~/.cache/provisioning/commands-registry.json rebuilt on source
change. cli/provisioning fast-path alias expansion avoids cold Nu startup.
ADDING_COMMANDS.md documents new-command workflow.
- Platform service manager: service-manager.nu (+573), startup.nu (+611),
service-check.nu (+255); autostart/bootstrap/health/target refactored.
- Nushell 0.112.2 migration: removed all try/catch and bash redirections;
external commands prefixed with ^; type signatures enforced. Driven by
scripts/refactor-try-catch{,-simplified}.nu.
- TTY stack: removed shlib/*-tty.sh; replaced by cli/tty-dispatch.sh,
tty-filter.sh, tty-commands.conf.
- New domain modules: images/ (golden image lifecycle), workspace/{state,sync}.nu,
main_provisioning/{bootstrap,cluster-deploy,fip,state}.nu, commands/{state,
build,integrations/auth,utilities/alias}.nu, platform.nu expanded (+874).
- Config loader overhaul: loader/core.nu slimmed (-759), cache/core.nu
refactored (-454), removed legacy loaders/file_loader.nu (-330).
- Thirteen new provisioning-<domain>.nu top-level modules for bash dispatcher.
- Tests: test_workspace_state.nu (+351); updates to test_oci_registry,
test_services.
- README + CHANGELOG updated.
2026-04-17 04:27:33 +01:00
|
|
|
# REMOVED: use lib_provisioning * - causes circular import
|
|
|
|
|
# Resolve taskserv/component library directory.
|
|
|
|
|
# Search order:
|
|
|
|
|
# 1. Flat: taskservs_path/{name}/ (covers components/ and old flat taskservs/)
|
|
|
|
|
# 2. Grouped: taskservs_path/{category}/{name}/ (old grouped taskservs/ structure)
|
|
|
|
|
# 3. Components sibling: ../components/{name}/ (when called with taskservs/ that no longer exists)
|
|
|
|
|
# Returns the directory containing the taskserv, or "" if not found.
|
|
|
|
|
export def find-taskserv-dir [taskservs_path: string, name: string]: nothing -> string {
|
|
|
|
|
let direct = ($taskservs_path | path join $name)
|
|
|
|
|
if ($direct | path exists) { return $direct }
|
|
|
|
|
# Try components/ sibling before scanning category subdirs (handles post-migration case)
|
|
|
|
|
let components_sibling = ($taskservs_path | path dirname | path join "components" | path join $name)
|
|
|
|
|
if ($components_sibling | path exists) { return $components_sibling }
|
|
|
|
|
if not ($taskservs_path | path exists) { return "" }
|
|
|
|
|
let candidate = (do -i { ls $taskservs_path }
|
|
|
|
|
| where type == "dir"
|
|
|
|
|
| each {|cat|
|
|
|
|
|
let p = ($cat.name | path join $name)
|
|
|
|
|
if ($p | path exists) { $p } else { null }
|
|
|
|
|
}
|
|
|
|
|
| compact)
|
|
|
|
|
if ($candidate | is-empty) { "" } else { $candidate | first }
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
export def taskserv_get_file [
|
|
|
|
|
settings: record
|
|
|
|
|
taskserv: record
|
|
|
|
|
server: record
|
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
|
|
|
live_ip: string
|
2025-10-07 10:32:04 +01:00
|
|
|
req_sudo: bool
|
|
|
|
|
local_mode: bool
|
2026-01-14 02:00:23 +00:00
|
|
|
] {
|
2025-10-07 10:32:04 +01:00
|
|
|
let target_path = ($taskserv.target_path | default "")
|
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
|
|
|
if $target_path == "" {
|
2025-10-07 10:32:04 +01:00
|
|
|
_print $"🛑 No (_ansi red_bold)target_path(_ansi reset) found in ($server.hostname) taskserv ($taskserv.name)"
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
let source_path = ($taskserv.soruce_path | default "")
|
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
|
|
|
if $source_path == "" {
|
2025-10-07 10:32:04 +01:00
|
|
|
_print $"🛑 No (_ansi red_bold)source_path(_ansi reset) found in ($server.hostname) taskserv ($taskserv.name)"
|
|
|
|
|
return false
|
|
|
|
|
}
|
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
|
|
|
if $local_mode {
|
|
|
|
|
let res = (^cp $source_path $target_path | combine)
|
|
|
|
|
if $res.exit_code != 0 {
|
2025-10-07 10:32:04 +01:00
|
|
|
_print $"🛑 Error get_file [ local-mode ] (_ansi red_bold)($source_path) to ($target_path)(_ansi reset) in ($server.hostname) taskserv ($taskserv.name)"
|
|
|
|
|
_print $res.stdout
|
|
|
|
|
return false
|
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
|
|
|
}
|
2025-10-07 10:32:04 +01:00
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
let ip = if $live_ip != "" {
|
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
|
|
|
$live_ip
|
|
|
|
|
} else {
|
2025-10-07 10:32:04 +01:00
|
|
|
#use ../../../providers/prov_lib/middleware.nu mw_get_ip
|
feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration
- DAG architecture: `dag show/validate/export` (nulib/main_provisioning/dag.nu),
config loader (lib_provisioning/config/loader/dag.nu), taskserv dag-executor.
Backed by schemas/lib/dag/*.ncl; orchestrator emits NATS events via
WorkspaceComposition::into_workflow. See ADR-020, ADR-021.
- Unified Component Architecture: components/mod.nu, main_provisioning/
{components,workflow,extensions,ontoref-queries}.nu. Full workflow engine with
topological sort and NATS subject emission. Blocks A-H complete (libre-daoshi).
- Commands-registry: nulib/commands-registry.ncl (Nickel source, 314 lines) +
JSON cache at ~/.cache/provisioning/commands-registry.json rebuilt on source
change. cli/provisioning fast-path alias expansion avoids cold Nu startup.
ADDING_COMMANDS.md documents new-command workflow.
- Platform service manager: service-manager.nu (+573), startup.nu (+611),
service-check.nu (+255); autostart/bootstrap/health/target refactored.
- Nushell 0.112.2 migration: removed all try/catch and bash redirections;
external commands prefixed with ^; type signatures enforced. Driven by
scripts/refactor-try-catch{,-simplified}.nu.
- TTY stack: removed shlib/*-tty.sh; replaced by cli/tty-dispatch.sh,
tty-filter.sh, tty-commands.conf.
- New domain modules: images/ (golden image lifecycle), workspace/{state,sync}.nu,
main_provisioning/{bootstrap,cluster-deploy,fip,state}.nu, commands/{state,
build,integrations/auth,utilities/alias}.nu, platform.nu expanded (+874).
- Config loader overhaul: loader/core.nu slimmed (-759), cache/core.nu
refactored (-454), removed legacy loaders/file_loader.nu (-330).
- Thirteen new provisioning-<domain>.nu top-level modules for bash dispatcher.
- Tests: test_workspace_state.nu (+351); updates to test_oci_registry,
test_services.
- README + CHANGELOG updated.
2026-04-17 04:27:33 +01:00
|
|
|
(mw_get_ip $settings $server ($server | get -o liveness_ip | default "public") false)
|
2025-10-07 10:32:04 +01:00
|
|
|
}
|
|
|
|
|
let ssh_key_path = ($server.ssh_key_path | default "")
|
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
|
|
|
if $ssh_key_path == "" {
|
2025-10-07 10:32:04 +01:00
|
|
|
_print $"🛑 No (_ansi red_bold)ssh_key_path(_ansi reset) found in ($server.hostname) taskserv ($taskserv.name)"
|
|
|
|
|
return false
|
|
|
|
|
}
|
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
|
|
|
if not ($ssh_key_path | path exists) {
|
2025-10-07 10:32:04 +01:00
|
|
|
_print $"🛑 Error (_ansi red_bold)($ssh_key_path)(_ansi reset) not found for ($server.hostname) taskserv ($taskserv.name)"
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
mut cmd = if $req_sudo { "sudo" } else { "" }
|
|
|
|
|
let wk_path = $"/home/($env.SSH_USER)/($source_path | path basename)"
|
|
|
|
|
$cmd = $"($cmd) cp ($source_path) ($wk_path); sudo chown ($env.SSH_USER) ($wk_path)"
|
|
|
|
|
let res = (ssh_cmd $settings $server false $cmd $ip)
|
|
|
|
|
if not $res { return false }
|
|
|
|
|
if not (scp_from $settings $server $wk_path $target_path $ip ) {
|
|
|
|
|
return false
|
|
|
|
|
}
|
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
|
|
|
let rm_cmd = if $req_sudo {
|
|
|
|
|
$"sudo rm -f ($wk_path)"
|
|
|
|
|
} else {
|
|
|
|
|
$"rm -f ($wk_path)"
|
2025-10-07 10:32:04 +01:00
|
|
|
}
|
|
|
|
|
return ( ssh_cmd $settings $server false $rm_cmd $ip )
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export def find_taskserv [
|
|
|
|
|
settings: record,
|
|
|
|
|
server: record,
|
|
|
|
|
taskserv_name: string,
|
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
|
|
|
out: string
|
2026-01-14 02:00:23 +00:00
|
|
|
] {
|
2025-12-11 21:57:05 +00:00
|
|
|
let taskservs_list = ($server | get taskservs? | default [])
|
|
|
|
|
let taskserv = ($taskservs_list | where {|t| ($t | get name? | default "") == $taskserv_name})
|
2025-10-07 10:32:04 +01:00
|
|
|
if ($taskserv | is-empty) {
|
|
|
|
|
_print $"🛑 No taskserv found" $"for (_ansi yellow_bold)($taskserv_name)(_ansi reset)"
|
|
|
|
|
return ""
|
|
|
|
|
}
|
2025-12-11 21:57:05 +00:00
|
|
|
let src_path = ($settings | get src_path? | default "")
|
|
|
|
|
let hostname = ($server | get hostname? | default "")
|
2025-10-07 10:32:04 +01:00
|
|
|
let run_taskservs_path = (get-run-taskservs-path)
|
|
|
|
|
mut taskserv_host_path = ($src_path | path join $run_taskservs_path |
|
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
|
|
|
path join $hostname | path join $"($taskserv_name).ncl")
|
2025-10-07 10:32:04 +01:00
|
|
|
let def_taskserv = if ($taskserv_host_path | path exists) {
|
|
|
|
|
(open -r $taskserv_host_path)
|
|
|
|
|
} else {
|
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
|
|
|
$taskserv_host_path = ($src_path | path join $run_taskservs_path | path join $"($taskserv_name).ncl")
|
2025-10-07 10:32:04 +01:00
|
|
|
if ($taskserv_host_path | path exists) {
|
|
|
|
|
(open -r $taskserv_host_path)
|
|
|
|
|
} else {
|
|
|
|
|
_print $"🛑 No taskserv path found" $"for (_ansi yellow_bold)($taskserv_name)(_ansi reset) in ($taskserv_host_path)"
|
|
|
|
|
$taskserv_host_path = ""
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let taskservs_path = (get-taskservs-path)
|
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
|
|
|
mut main_taskserv_path = ($taskservs_path | path join $taskserv_name | path join "nickel" | path join $"($taskserv_name).ncl")
|
2025-10-07 10:32:04 +01:00
|
|
|
if not ($main_taskserv_path | path exists) {
|
|
|
|
|
$main_taskserv_path = ($taskservs_path | path join $taskserv_name | path join ($taskserv |
|
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
|
|
|
get -o profile | default "") | path join "nickel" | path join $"($taskserv_name).ncl")
|
2025-10-07 10:32:04 +01:00
|
|
|
}
|
|
|
|
|
let def_main = if ($main_taskserv_path | path exists) {
|
|
|
|
|
(open -r $main_taskserv_path)
|
|
|
|
|
} else {
|
|
|
|
|
_print $"🛑 No taskserv main path found" $"for (_ansi yellow_bold)($taskserv_name)(_ansi reset) ($main_taskserv_path)"
|
|
|
|
|
$main_taskserv_path = ""
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|
{ path_def: $taskserv_host_path, def: $def_taskserv, path_main: $main_taskserv_path, main: $def_main }
|
|
|
|
|
}
|
|
|
|
|
export def list_taskservs [
|
|
|
|
|
settings: record
|
2026-01-14 02:00:23 +00:00
|
|
|
] {
|
2025-10-07 10:32:04 +01:00
|
|
|
let list_taskservs = (taskservs_list)
|
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
|
|
|
if ($list_taskservs | length) == 0 {
|
|
|
|
|
_print $"🛑 no items found for (_ansi cyan)taskservs list(_ansi reset)"
|
2025-10-07 10:32:04 +01:00
|
|
|
return
|
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
|
|
|
}
|
2025-10-07 10:32:04 +01:00
|
|
|
$list_taskservs
|
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
|
|
|
}
|