- 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.
50 lines
2 KiB
Text
Executable file
50 lines
2 KiB
Text
Executable file
#!/usr/bin/env nu
|
|
# List all available components/taskservs.
|
|
# Searches extensions/components/ (flat, primary) then extensions/taskservs/ (grouped, legacy).
|
|
|
|
use ../lib_provisioning/utils/nickel_processor.nu [ncl-eval-soft]
|
|
|
|
let provisioning = ($env.PROVISIONING? | default '/usr/local/provisioning')
|
|
|
|
# Resolve component base path: components/ → taskservs/ (legacy fallback)
|
|
let components_base = ($provisioning | path join 'extensions' | path join 'components')
|
|
let taskservs_base = ($provisioning | path join 'extensions' | path join 'taskservs')
|
|
|
|
mut all_items = []
|
|
|
|
# Primary: flat components/ (post-migration)
|
|
if ($components_base | path exists) {
|
|
for item in (ls $components_base | where type == 'dir') {
|
|
let name = ($item.name | path basename)
|
|
let meta = ($item.name | path join 'metadata.ncl')
|
|
let modes = if ($meta | path exists) {
|
|
let result = (ncl-eval-soft $meta [] null)
|
|
if ($result | is-not-empty) { $result | get -o modes | default ['taskserv'] } else { ['taskserv'] }
|
|
} else { ['taskserv'] }
|
|
$all_items = ($all_items | append { task: $name, mode: ($modes | str join ','), info: 'component' })
|
|
}
|
|
}
|
|
|
|
# Legacy: grouped taskservs/ (only if not already found in components/)
|
|
if ($taskservs_base | path exists) {
|
|
let known = ($all_items | each {|i| $i.task })
|
|
for cat in (ls $taskservs_base | where type == 'dir') {
|
|
let category = ($cat.name | path basename)
|
|
for ts in (ls $cat.name | where type == 'dir') {
|
|
let ts_name = ($ts.name | path basename)
|
|
if $ts_name not-in $known {
|
|
$all_items = ($all_items | append { task: $ts_name, mode: $category, info: 'taskserv' })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if ($all_items | is-empty) {
|
|
print '📦 Available Taskservs: (none found)'
|
|
} else {
|
|
print '📦 Available Taskservs:'
|
|
print ''
|
|
$all_items | sort-by task | each {|ts|
|
|
print $" • ($ts.task) [($ts.mode)]"
|
|
} | ignore
|
|
}
|