2025-10-07 10:32:04 +01:00
|
|
|
#!/usr/bin/env 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
|
|
|
# Taskserv/Component Discovery System
|
|
|
|
|
# Discovers available components (flat structure) and legacy taskservs (grouped structure).
|
|
|
|
|
# Post-migration: extensions/components/ is the primary source; extensions/taskservs/ is legacy.
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
use ../lib_provisioning/config/accessor.nu config-get
|
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
|
|
|
use ../lib_provisioning/utils/nickel_processor.nu [ncl-eval-soft]
|
|
|
|
|
|
|
|
|
|
# Resolve the components base path using all available signals.
|
|
|
|
|
def _components-path []: nothing -> string {
|
|
|
|
|
let from_env = ($env.PROVISIONING_COMPONENTS_PATH? | default "")
|
|
|
|
|
if ($from_env | is-not-empty) and ($from_env | path exists) { return $from_env }
|
|
|
|
|
let prov = ($env.PROVISIONING? | default "")
|
|
|
|
|
if ($prov | is-not-empty) {
|
|
|
|
|
let derived = ($prov | path join "extensions" | path join "components")
|
|
|
|
|
if ($derived | path exists) { return $derived }
|
|
|
|
|
}
|
|
|
|
|
config-get "paths.components" ""
|
|
|
|
|
}
|
2025-10-07 10:32:04 +01:00
|
|
|
|
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
|
|
|
# Discover all available taskservs/components.
|
|
|
|
|
# Searches components/ (flat, primary) then taskservs/ (grouped, legacy).
|
|
|
|
|
# Returns a unified list compatible with existing callers.
|
2026-01-14 02:00:23 +00:00
|
|
|
export def discover-taskservs [] {
|
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
|
|
|
mut results = []
|
|
|
|
|
|
|
|
|
|
# Primary: flat components/ directory (post-migration)
|
|
|
|
|
let comp_path = (_components-path)
|
|
|
|
|
if ($comp_path | is-not-empty) and ($comp_path | path exists) {
|
|
|
|
|
let items = (do { ls $comp_path } | complete)
|
|
|
|
|
if $items.exit_code == 0 {
|
|
|
|
|
for item in ($items.stdout | where type == "dir") {
|
|
|
|
|
let name = ($item.name | path basename)
|
|
|
|
|
let nickel_dir = ($item.name | path join "nickel")
|
|
|
|
|
if not ($nickel_dir | path exists) { continue }
|
|
|
|
|
$results = ($results | append {
|
|
|
|
|
name: $name
|
|
|
|
|
type: "component"
|
|
|
|
|
group: ""
|
|
|
|
|
version: ""
|
|
|
|
|
schema_path: $nickel_dir
|
2025-12-11 21:57:05 +00:00
|
|
|
main_schema: ""
|
|
|
|
|
dependencies: []
|
|
|
|
|
description: ""
|
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
|
|
|
available: true
|
|
|
|
|
last_updated: $item.modified
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Legacy: grouped taskservs/ directory (non-migrated workspaces)
|
|
|
|
|
let ts_path_raw = (config-get "paths.taskservs" "")
|
|
|
|
|
if ($ts_path_raw | is-not-empty) {
|
|
|
|
|
let ts_path = ($ts_path_raw | path expand)
|
|
|
|
|
if ($ts_path | path exists) and $ts_path != $comp_path {
|
|
|
|
|
let items = (do { ls $ts_path } | complete)
|
|
|
|
|
if $items.exit_code == 0 {
|
|
|
|
|
for item in ($items.stdout | where type == "dir") {
|
|
|
|
|
let item_name = ($item.name | path basename)
|
|
|
|
|
let schema_dir = ($item.name | path join "nickel")
|
|
|
|
|
let mod_path = ($schema_dir | path join "nickel.mod")
|
|
|
|
|
# Group dir (has nickel/nickel.mod): scan applications inside
|
|
|
|
|
if ($mod_path | path exists) {
|
|
|
|
|
let subs = (do { ls $item.name } | complete)
|
|
|
|
|
if $subs.exit_code == 0 {
|
|
|
|
|
for sub in ($subs.stdout | where type == "dir" | where {|s|
|
|
|
|
|
let n = ($s.name | path basename)
|
|
|
|
|
$n != "nickel" and $n != "images"
|
|
|
|
|
}) {
|
|
|
|
|
let app_name = ($sub.name | path basename)
|
|
|
|
|
# Skip if already found in components/
|
|
|
|
|
if ($results | any {|r| $r.name == $app_name}) { continue }
|
|
|
|
|
$results = ($results | append {
|
|
|
|
|
name: $app_name
|
|
|
|
|
type: "taskserv"
|
|
|
|
|
group: $item_name
|
|
|
|
|
version: ""
|
|
|
|
|
schema_path: $schema_dir
|
|
|
|
|
main_schema: ""
|
|
|
|
|
dependencies: []
|
|
|
|
|
description: ""
|
|
|
|
|
available: true
|
|
|
|
|
last_updated: $sub.modified
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-10-07 10:32:04 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
$results | sort-by name
|
2025-10-07 10:32:04 +01:00
|
|
|
}
|
|
|
|
|
|
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
|
|
|
# Extract metadata from a taskserv's Nickel module (updated with group info)
|
2026-01-14 02:00:23 +00:00
|
|
|
def extract_taskserv_metadata [name: string, schema_path: string, group: 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
|
|
|
let mod_path = ($schema_path | path join "nickel.mod")
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
# Try to parse TOML, skip if corrupted
|
2025-12-11 21:57:05 +00:00
|
|
|
let toml_result = (do {
|
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
|
|
|
open $mod_path | from toml
|
2025-12-11 21:57:05 +00:00
|
|
|
} | complete)
|
|
|
|
|
|
|
|
|
|
if $toml_result.exit_code != 0 {
|
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
|
|
|
print $"⚠️ Skipping ($name): corrupted nickel.mod file"
|
2025-10-07 10:32:04 +01:00
|
|
|
return null
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-11 21:57:05 +00:00
|
|
|
let mod_content = $toml_result.stdout
|
|
|
|
|
|
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
|
|
|
# Find Nickel schema files
|
|
|
|
|
let schema_files = (glob ($schema_path | path join "*.ncl"))
|
2025-10-07 10:32:04 +01:00
|
|
|
let main_schema = ($schema_files | where ($it | str contains $name) | first | default "")
|
|
|
|
|
|
|
|
|
|
# Extract dependencies
|
|
|
|
|
let dependencies = ($mod_content.dependencies? | default {} | columns)
|
|
|
|
|
|
|
|
|
|
# Get description from schema file if available
|
|
|
|
|
let description = if ($main_schema != "") {
|
|
|
|
|
extract_schema_description $main_schema
|
|
|
|
|
} else {
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
name: $name
|
|
|
|
|
type: "taskserv"
|
|
|
|
|
group: $group
|
|
|
|
|
version: $mod_content.package.version
|
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
|
|
|
schema_path: $schema_path
|
2025-10-07 10:32:04 +01:00
|
|
|
main_schema: $main_schema
|
|
|
|
|
dependencies: $dependencies
|
|
|
|
|
description: $description
|
|
|
|
|
available: true
|
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
|
|
|
last_updated: (ls $mod_path | get 0.modified)
|
2025-10-07 10:32:04 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
# Extract description from Nickel schema file
|
2026-01-14 02:00:23 +00:00
|
|
|
def extract_schema_description [schema_file: string] {
|
2025-10-07 10:32:04 +01:00
|
|
|
if not ($schema_file | path exists) {
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Read first few lines to find description
|
|
|
|
|
let content = (open $schema_file | lines | take 10)
|
|
|
|
|
let description_lines = ($content | where ($it | str starts-with "# ") | take 3)
|
|
|
|
|
|
|
|
|
|
if ($description_lines | is-empty) {
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$description_lines
|
|
|
|
|
| str replace "^# " ""
|
|
|
|
|
| str join " "
|
|
|
|
|
| str trim
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Search taskservs by name or description
|
2026-01-14 02:00:23 +00:00
|
|
|
export def search-taskservs [query: string] {
|
2025-10-07 10:32:04 +01:00
|
|
|
discover-taskservs
|
|
|
|
|
| where ($it.name | str contains $query) or ($it.description | str contains $query)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Get specific taskserv info (updated to search both flat and grouped)
|
2026-01-14 02:00:23 +00:00
|
|
|
export def get-taskserv-info [name: string] {
|
2025-10-07 10:32:04 +01:00
|
|
|
let taskservs = (discover-taskservs)
|
|
|
|
|
let found = ($taskservs | where name == $name | first)
|
|
|
|
|
|
|
|
|
|
if ($found | is-empty) {
|
|
|
|
|
error make { msg: $"Taskserv '($name)' not found" }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$found
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# List taskservs by group
|
2026-01-14 02:00:23 +00:00
|
|
|
export def list-taskservs-by-group [group: string] {
|
2025-10-07 10:32:04 +01:00
|
|
|
discover-taskservs
|
|
|
|
|
| where group == $group
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# List all groups
|
2026-01-14 02:00:23 +00:00
|
|
|
export def list-taskserv-groups [] {
|
2025-10-07 10:32:04 +01:00
|
|
|
discover-taskservs
|
|
|
|
|
| get group
|
|
|
|
|
| uniq
|
|
|
|
|
| sort
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# List taskservs by category/tag (legacy support)
|
2026-01-14 02:00:23 +00:00
|
|
|
export def list-taskservs-by-tag [tag: string] {
|
2025-10-07 10:32:04 +01:00
|
|
|
discover-taskservs
|
|
|
|
|
| where ($it.description | str contains $tag) or ($it.group | str contains $tag)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Validate taskserv availability
|
2026-01-14 02:00:23 +00:00
|
|
|
export def validate-taskservs [names: list<string>] {
|
2025-10-07 10:32:04 +01:00
|
|
|
let available = (discover-taskservs | get name)
|
|
|
|
|
let missing = ($names | where ($it not-in $available))
|
|
|
|
|
let found = ($names | where ($it in $available))
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
requested: $names
|
|
|
|
|
found: $found
|
|
|
|
|
missing: $missing
|
|
|
|
|
valid: ($missing | is-empty)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
# Get the resolved directory for a taskserv or component by name.
|
|
|
|
|
# Returns the directory containing nickel/, taskserv/, etc.
|
|
|
|
|
# Prefers components/ (flat, post-migration) over taskservs/ (grouped, legacy).
|
|
|
|
|
export def get-taskserv-path [name: string]: nothing -> string {
|
|
|
|
|
let info = get-taskserv-info $name
|
|
|
|
|
|
|
|
|
|
# Component (flat structure) — base is already the directory
|
|
|
|
|
if $info.type == "component" {
|
|
|
|
|
let comp_base = (_components-path)
|
|
|
|
|
return ($comp_base | path join $name)
|
|
|
|
|
}
|
2025-10-07 10:32:04 +01:00
|
|
|
|
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
|
|
|
# Legacy grouped taskserv
|
|
|
|
|
let base_path = ($env.PROVISIONING? | default "" | path join "extensions/taskservs")
|
|
|
|
|
if $info.group == "" or $info.group == "root" {
|
2025-10-07 10:32:04 +01:00
|
|
|
$"($base_path)/($name)"
|
|
|
|
|
} else {
|
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
|
|
|
$"($base_path)/($info.group)/($name)"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Resolve the components base path from config (flat layout, no group dirs)
|
|
|
|
|
def components-base-path []: nothing -> string {
|
|
|
|
|
let explicit = (do -i { config-get "paths.components" } | complete)
|
|
|
|
|
if $explicit.exit_code == 0 {
|
|
|
|
|
$explicit.stdout | str trim | path expand
|
|
|
|
|
} else {
|
|
|
|
|
let ts_path = (config-get "paths.taskservs" | path expand)
|
|
|
|
|
$ts_path | path dirname | path join "components"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Discover all available components (flat structure: components/{name}/)
|
|
|
|
|
export def discover-components []: nothing -> list<record> {
|
|
|
|
|
let base = (components-base-path)
|
|
|
|
|
|
|
|
|
|
if not ($base | path exists) {
|
|
|
|
|
error make { msg: $"Components path not found: ($base)" }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ls $base
|
|
|
|
|
| where type == "dir"
|
|
|
|
|
| each {|item|
|
|
|
|
|
let name = ($item.name | path basename)
|
|
|
|
|
let meta_p = ($item.name | path join "metadata.ncl")
|
|
|
|
|
let ncl_p = ($item.name | path join "nickel")
|
|
|
|
|
let modes = if ($meta_p | path exists) {
|
|
|
|
|
ncl-eval-soft $meta_p [] [] | get -o modes | default ["taskserv"]
|
|
|
|
|
} else { ["taskserv"] }
|
|
|
|
|
let version = if ($meta_p | path exists) {
|
|
|
|
|
ncl-eval-soft $meta_p [] "" | get -o version | default ""
|
|
|
|
|
} else { "" }
|
|
|
|
|
let description = if ($meta_p | path exists) {
|
|
|
|
|
ncl-eval-soft $meta_p [] "" | get -o description | default ""
|
|
|
|
|
} else { "" }
|
|
|
|
|
{
|
|
|
|
|
name: $name
|
|
|
|
|
type: "component"
|
|
|
|
|
modes: $modes
|
|
|
|
|
version: $version
|
|
|
|
|
description: $description
|
|
|
|
|
path: $item.name
|
|
|
|
|
available: ($ncl_p | path exists)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
| sort-by name
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Return the filesystem path for a named component
|
|
|
|
|
export def get-component-path [name: string]: nothing -> string {
|
|
|
|
|
$"(components-base-path)/($name)"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Return the first mode declared in a component's metadata.ncl
|
|
|
|
|
export def get-component-mode [name: string]: nothing -> string {
|
|
|
|
|
let meta_p = (get-component-path $name | path join "metadata.ncl")
|
|
|
|
|
if not ($meta_p | path exists) {
|
|
|
|
|
error make { msg: $"metadata.ncl not found for component '($name)'" }
|
|
|
|
|
}
|
|
|
|
|
let parsed = (ncl-eval-soft $meta_p [] null)
|
|
|
|
|
if ($parsed | is-empty) {
|
|
|
|
|
error make { msg: $"Failed to parse metadata.ncl for component '($name)'" }
|
2025-10-07 10:32:04 +01:00
|
|
|
}
|
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
|
|
|
$parsed | get -o modes | default ["taskserv"] | first
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Search components by name or description substring
|
|
|
|
|
export def search-components [query: string]: nothing -> list<record> {
|
|
|
|
|
discover-components
|
|
|
|
|
| where ($it.name | str contains $query) or ($it.description | str contains $query)
|
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
|
|
|
}
|