refactor(workspace/services commands): selective imports (ADR-025 L2)

Two workspace+services command files converted, batched because they share
the same pattern (4 stars each -> selective).

workspace/commands.nu:
  user/config.nu           [11 symbols]
  utils/hints.nu           [show-next-step]
  platform/activation.nu   [activate-workspace-platform]
  workspace/notation.nu    [3 symbols]

  Pre-existing name collision documented: get-workspace-path and
  list-workspaces are exported by BOTH user/config.nu and notation.nu.
  Star-import resolved via last-wins (notation.nu). Selective version
  attributes both to notation.nu to preserve behaviour.

services/commands.nu:
  services/manager.nu      [9 symbols]
  services/health.nu       [2 symbols]
  services/preflight.nu    [4 symbols]
  services/dependencies.nu [5 symbols]

Validation: both files nu --ide-check 50 -> 0 errors.

Refs: ADR-025
This commit is contained in:
Jesús Pérez 2026-04-17 08:36:17 +01:00
parent e92896cbfa
commit 34b389c8c8
Signed by: jesus
GPG key ID: 9F243E355E0BC939
2 changed files with 30 additions and 8 deletions

View file

@ -3,10 +3,21 @@
# Service CLI Commands
# User-facing commands for service management
use manager.nu *
use health.nu *
use preflight.nu *
use dependencies.nu *
# Selective imports (ADR-025 Phase 3 Layer 2).
use lib_provisioning/services/manager.nu [
get-service-logs get-service-status init-service-state list-all-services
list-running-services load-service-registry restart-service start-service
stop-service
]
use lib_provisioning/services/health.nu [get-health-status monitor-service-health]
use lib_provisioning/services/preflight.nu [
check-required-services get-readiness-report preflight-start-service
validate-all-services
]
use lib_provisioning/services/dependencies.nu [
can-stop-service get-dependency-tree get-startup-order
start-services-with-deps visualize-dependency-graph
]
# Platform management commands (manage all services)

View file

@ -1,10 +1,21 @@
# Workspace Management CLI Commands
# Commands for switching between workspaces and managing workspace registry
use ../user/config.nu *
use ../utils/hints.nu *
use ../platform/activation.nu *
use ./notation.nu *
# Selective imports (ADR-025 Phase 3 Layer 2).
# Pre-existing name collision: get-workspace-path and list-workspaces are
# exported by BOTH user/config.nu and workspace/notation.nu. Original star
# imports resolved via last-wins (notation.nu line was after user/config.nu).
# Keep notation.nu as the owner for the 2 collision symbols.
use lib_provisioning/user/config.nu [
get-active-workspace get-active-workspace-details get-user-preference
load-user-config register-workspace remove-workspace set-active-workspace
set-user-preference set-workspace-default-infra validate-workspace-exists
]
use lib_provisioning/utils/hints.nu [show-next-step]
use lib_provisioning/platform/activation.nu [activate-workspace-platform]
use lib_provisioning/workspace/notation.nu [
get-workspace-path list-workspaces parse-workspace-infra-notation
]
# Activate a workspace (set as current)
export def "workspace activate" [