2026-01-21 10:24:17 +00:00
|
|
|
# Module: User Interface Utilities
|
|
|
|
|
# Purpose: Provides terminal UI utilities: output formatting, prompts, spinners, and status displays.
|
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
|
|
|
# Dependencies: error for error handling, logging for debug utilities
|
2026-01-21 10:24:17 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
use ../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
|
|
|
use logging.nu [is-debug-enabled]
|
|
|
|
|
|
|
|
|
|
# Check if no-terminal mode is enabled
|
|
|
|
|
export def get-provisioning-no-terminal [] {
|
|
|
|
|
# Check environment variable first (use -o for optional in Nushell 0.106+)
|
|
|
|
|
let env_no_terminal = ($env | get -o PROVISIONING_NO_TERMINAL | default "false")
|
|
|
|
|
if ($env_no_terminal == "true") or ($env_no_terminal == "1") {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Check config setting
|
|
|
|
|
config-get "debug.no_terminal" false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Get output format (json, yaml, table, etc.)
|
|
|
|
|
export def get-provisioning-out [] {
|
|
|
|
|
# Check environment variable first
|
|
|
|
|
let env_out = ($env | get -o PROVISIONING_OUT | default "")
|
|
|
|
|
if ($env_out | is-not-empty) {
|
|
|
|
|
return $env_out
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Check config setting
|
|
|
|
|
config-get "output.format" ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Set no-terminal mode
|
|
|
|
|
export def set-provisioning-no-terminal [value: bool] {
|
|
|
|
|
$env.PROVISIONING_NO_TERMINAL = $value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Set output format
|
|
|
|
|
export def set-provisioning-out [value: string] {
|
|
|
|
|
$env.PROVISIONING_OUT = $value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Get notification icon path
|
|
|
|
|
export def get-notify-icon [] : nothing -> string {
|
|
|
|
|
$env.PROVISIONING_NOTIFY_ICON? | default ""
|
|
|
|
|
}
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
export def _ansi [
|
|
|
|
|
arg?: string
|
|
|
|
|
--escape: record
|
2026-01-14 02:00:23 +00:00
|
|
|
] {
|
2025-10-07 10:32:04 +01:00
|
|
|
if (get-provisioning-no-terminal) {
|
|
|
|
|
""
|
|
|
|
|
} else if (is-terminal --stdout) {
|
|
|
|
|
if $escape != null {
|
|
|
|
|
(ansi --escape $escape)
|
2025-12-11 21:57:05 +00:00
|
|
|
} else if ($arg != null) and ($arg != "") {
|
2025-10-07 10:32:04 +01:00
|
|
|
(ansi $arg)
|
2025-12-11 21:57:05 +00:00
|
|
|
} else {
|
|
|
|
|
""
|
2025-10-07 10:32:04 +01:00
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
export def format_out [
|
|
|
|
|
data: string
|
|
|
|
|
src?: string
|
|
|
|
|
mode?: string
|
2026-01-14 02:00:23 +00:00
|
|
|
] {
|
2025-10-07 10:32:04 +01:00
|
|
|
let msg = match $src {
|
|
|
|
|
"json" => ($data | from json),
|
|
|
|
|
_ => $data,
|
|
|
|
|
}
|
|
|
|
|
match $mode {
|
|
|
|
|
"table" => {
|
|
|
|
|
($msg | table -i false)
|
|
|
|
|
},
|
|
|
|
|
_ => { $msg }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
export def _print [
|
|
|
|
|
data: string
|
|
|
|
|
src?: string
|
|
|
|
|
context?: string
|
|
|
|
|
mode?: string
|
|
|
|
|
-n # no newline
|
2026-01-14 02:00:23 +00:00
|
|
|
] {
|
2025-10-07 10:32:04 +01:00
|
|
|
let output = (get-provisioning-out)
|
|
|
|
|
if $n {
|
|
|
|
|
if ($output | is-empty) {
|
|
|
|
|
print -n $data
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if ($output | is-empty) {
|
|
|
|
|
print (format_out $data $src $mode)
|
|
|
|
|
} else {
|
|
|
|
|
match $output {
|
|
|
|
|
"json" => {
|
|
|
|
|
if $context != "result" { return }
|
|
|
|
|
if $src == "json" {
|
|
|
|
|
print ($data)
|
|
|
|
|
} else {
|
|
|
|
|
print ($data | to json)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"yaml" | "yml" => {
|
|
|
|
|
if $context != "result" { return }
|
|
|
|
|
if $src == "json" {
|
|
|
|
|
print ($data | from json | to yaml)
|
|
|
|
|
} else {
|
|
|
|
|
print ($data | to yaml)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"toml" | "tml" => {
|
|
|
|
|
if $context != "result" { return }
|
|
|
|
|
if $src == "json" {
|
|
|
|
|
print ($data | from json | to toml)
|
|
|
|
|
} else {
|
|
|
|
|
print ($data)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"text" | "txt" => {
|
|
|
|
|
if $context != "result" { return }
|
|
|
|
|
print (format_out $data $src $mode)
|
|
|
|
|
},
|
|
|
|
|
_ => {
|
|
|
|
|
if ($output | str ends-with ".json" ) {
|
|
|
|
|
if $context != "result" { return }
|
|
|
|
|
(if $src == "json" {
|
|
|
|
|
($data)
|
|
|
|
|
} else {
|
|
|
|
|
($data | to json)
|
|
|
|
|
} | save --force $output)
|
|
|
|
|
} else if ($output | str ends-with ".yaml" ) {
|
|
|
|
|
if $context != "result" { return }
|
|
|
|
|
(if $src == "json" {
|
|
|
|
|
($data | from json | to yaml)
|
|
|
|
|
} else {
|
|
|
|
|
($data | to yaml)
|
|
|
|
|
} | save --force $output)
|
|
|
|
|
} else if ($output | str ends-with ".toml" ) {
|
|
|
|
|
if $context != "result" { return }
|
|
|
|
|
(if $src == "json" {
|
|
|
|
|
($data | from json | to toml)
|
|
|
|
|
} else {
|
|
|
|
|
($data)
|
|
|
|
|
} | save --force $output)
|
|
|
|
|
} else if ($output | str ends-with ".text" ) or ($output | str ends-with ".txt" ) {
|
|
|
|
|
if $context != "result" { return }
|
|
|
|
|
format_out $data $src $mode | save --force $output
|
|
|
|
|
} else {
|
|
|
|
|
format_out $data $src $mode | save --append $output
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
export def end_run [
|
|
|
|
|
context: string
|
2026-01-14 02:00:23 +00: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
|
|
|
if ($env.PROVISIONING_OUT? | default "" | is-not-empty) { return }
|
2025-12-11 21:57:05 +00:00
|
|
|
if ($env.PROVISIONING_NO_TITLES? | default false) { return }
|
|
|
|
|
if (detect_claude_code) { return }
|
2025-10-07 10:32:04 +01:00
|
|
|
if (is-debug-enabled) {
|
|
|
|
|
_print $"\n(_ansi blue)----🌥 ----🌥 ----🌥 ---- oOo ----🌥 ----🌥 ----🌥 ---- (_ansi reset)"
|
|
|
|
|
} else {
|
|
|
|
|
let the_context = if $context != "" { $" to ($context)" } else { "" }
|
|
|
|
|
if (is-terminal --stdout) {
|
|
|
|
|
_print $"\n(_ansi cyan)Thanks for using (_ansi blue_bold)((get-provisioning-url) | ansi link --text 'Provisioning')(_ansi reset)"
|
|
|
|
|
if $the_context != "" {
|
|
|
|
|
_print $"(_ansi yellow_dimmed)($the_context)(_ansi reset)"
|
|
|
|
|
}
|
|
|
|
|
_print ((get-provisioning-url) | ansi link --text $"(_ansi default_dimmed)Click here for more info or visit \n((get-provisioning-url))(_ansi reset)")
|
|
|
|
|
} else {
|
|
|
|
|
_print $"\n(_ansi cyan)Thanks for using (_ansi blue_bold) Provisioning [((get-provisioning-url))](_ansi reset)($the_context)"
|
|
|
|
|
_print $"(_ansi default_dimmed)For more info or visit ((get-provisioning-url))(_ansi reset)"
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export def show_clip_to [
|
|
|
|
|
msg: string
|
|
|
|
|
show: bool
|
2026-01-14 02:00:23 +00:00
|
|
|
] {
|
2025-10-07 10:32:04 +01:00
|
|
|
if $show { _print $msg }
|
|
|
|
|
if (is-terminal --stdout) {
|
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
|
|
|
if ((version).installed_plugins | str contains "clipboard") {
|
|
|
|
|
$msg | clipboard copy
|
|
|
|
|
print $"(ansi default_dimmed)copied into clipboard now (ansi reset)"
|
|
|
|
|
}
|
2025-10-07 10:32:04 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export def log_debug [
|
|
|
|
|
msg: string
|
2026-01-14 02:00:23 +00:00
|
|
|
] {
|
2025-10-07 10:32:04 +01:00
|
|
|
use std
|
|
|
|
|
std log debug $msg
|
|
|
|
|
# std assert (1 == 1)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#// Examples:
|
|
|
|
|
#// desktop_run_notify "Port scan" "Done" { port scan 8.8.8.8 53 }
|
|
|
|
|
#// desktop_run_notify "Task try" "Done" --timeout 5sec
|
|
|
|
|
export def desktop_run_notify [
|
|
|
|
|
title: string
|
|
|
|
|
body: string
|
|
|
|
|
task?: closure
|
|
|
|
|
--timeout: duration
|
|
|
|
|
--icon: string
|
|
|
|
|
] {
|
|
|
|
|
let icon_path = if $icon == null {
|
|
|
|
|
(get-notify-icon)
|
|
|
|
|
} else { $icon }
|
|
|
|
|
let time_out = if $timeout == null {
|
|
|
|
|
8sec
|
|
|
|
|
} else { $timeout }
|
|
|
|
|
if $task != null {
|
|
|
|
|
let start = date now
|
|
|
|
|
let result = do $task
|
|
|
|
|
let end = date now
|
|
|
|
|
let total = $end - $start | format duration sec
|
|
|
|
|
let result_typ = ($result | describe)
|
|
|
|
|
let msg = if $result_typ == "bool" {
|
|
|
|
|
(if $result { "✅ done " } else { $"🛑 fail "})
|
|
|
|
|
} else if ($result_typ | str starts-with "record") {
|
|
|
|
|
(if $result.status { "✅ done " } else { $"🛑 fail ($result.error)" })
|
|
|
|
|
} else { "" }
|
|
|
|
|
let time_body = $"($body) ($msg) finished in ($total) "
|
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
|
|
|
if ((version).installed_plugins | str contains "desktop_notifications") {
|
|
|
|
|
notify -s $title -t $time_body --timeout $time_out -i $icon_path
|
|
|
|
|
} else {
|
|
|
|
|
_print $"(_ansi blue)($title)(_ansi reset)\n(_ansi blue_bold)($time_body)(_ansi reset)"
|
|
|
|
|
}
|
2025-10-07 10:32:04 +01:00
|
|
|
return $result
|
|
|
|
|
} 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
|
|
|
if ((version).installed_plugins | str contains "desktop_notifications") {
|
|
|
|
|
notify -s $title -t $body --timeout $time_out -i $icon_path
|
|
|
|
|
} else {
|
|
|
|
|
_print $"(_ansi blue)($title)(_ansi reset)\n(_ansi blue_bold)($body)(_ansi reset)"
|
|
|
|
|
}
|
2025-10-07 10:32:04 +01:00
|
|
|
true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-14 02:00:23 +00:00
|
|
|
export def detect_claude_code [] {
|
2025-10-07 10:32:04 +01:00
|
|
|
let claudecode = ($env.CLAUDECODE? | default "" | str contains "1")
|
|
|
|
|
let entrypoint = ($env.CLAUDE_CODE_ENTRYPOINT? | default "" | str contains "cli")
|
|
|
|
|
$claudecode or $entrypoint
|
|
|
|
|
}
|