Skip to content

Commit 5c2eb90

Browse files
committed
refactor(cli): rename outdated --system to --all
The scan never leaves the user account, so --system overpromised. --all matches the behavior: both scopes and every Agent target directory.
1 parent 5da2e82 commit 5c2eb90

3 files changed

Lines changed: 23 additions & 22 deletions

File tree

GLOSSARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Every public export, command, error, route, and document uses these terms.
3333
| `skilld update --check --json` | update relation check |
3434
| `skilld verify` | source verification |
3535
| `skilld outdated` | outdated Skill report |
36+
| `skilld outdated --all` | system-wide outdated Skill report |
3637
| `skilld install skilld --global` | global skilld Skill install |
3738
| `skilld auth login` | account login |
3839
| `skilld auth status` | account authentication status |

crates/skilld-command/src/lib.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ enum Command {
133133
Verify { skill: Option<String> },
134134
/// Report outdated and unmanaged Skills.
135135
Outdated {
136-
/// Scan every Agent target on this system.
136+
/// Check both scopes and every Agent target directory.
137137
#[arg(long)]
138-
system: bool,
138+
all: bool,
139139
},
140140
/// Manage account authentication.
141141
Auth {
@@ -229,7 +229,7 @@ pub trait Host {
229229
))
230230
}
231231

232-
fn outdated(&self, _system: bool) -> Result<Vec<String>, CommandError> {
232+
fn outdated(&self, _all: bool) -> Result<Vec<String>, CommandError> {
233233
Err(CommandError::unsupported_host(
234234
"Outdated Skill reports are unavailable on this host",
235235
))
@@ -794,7 +794,7 @@ fn dispatch<H: Host>(command: Command, host: &H) -> Result<CommandOutput, Comman
794794
}
795795
}
796796
Command::Verify { skill } => host.verify(skill.as_deref()).map(CommandOutput::Lines),
797-
Command::Outdated { system } => host.outdated(system).map(CommandOutput::Lines),
797+
Command::Outdated { all } => host.outdated(all).map(CommandOutput::Lines),
798798
}
799799
}
800800

@@ -1734,8 +1734,8 @@ impl Host for LocalHost {
17341734
Ok(UpdatePlanV1::new(plan))
17351735
}
17361736

1737-
fn outdated(&self, system: bool) -> Result<Vec<String>, CommandError> {
1738-
let scopes = if system {
1737+
fn outdated(&self, all: bool) -> Result<Vec<String>, CommandError> {
1738+
let scopes = if all {
17391739
vec![InstallScope::Project, InstallScope::Global]
17401740
} else {
17411741
vec![InstallScope::Project]
@@ -1759,7 +1759,7 @@ impl Host for LocalHost {
17591759
scope.as_str(),
17601760
CommandError::store(error).message
17611761
));
1762-
if system {
1762+
if all {
17631763
// The ancestor scan must not report Skills this scope cannot verify.
17641764
suppressed_roots.extend(known.iter().map(|target| target.root.clone()));
17651765
}
@@ -1792,12 +1792,12 @@ impl Host for LocalHost {
17921792
progress.found(&format!("{name} ({} scope)", scope.as_str()));
17931793
views.push((view, scope));
17941794
}
1795-
if system {
1795+
if all {
17961796
store_roots.push(store.root().to_path_buf());
17971797
scan.push((scope, known));
17981798
}
17991799
}
1800-
if system {
1800+
if all {
18011801
// Global Agent directories keep the global scope, so ancestor roots
18021802
// scan after them and skip roots another scope already claimed.
18031803
let mut claimed = scan
@@ -1816,7 +1816,7 @@ impl Host for LocalHost {
18161816
}
18171817
}
18181818
}
1819-
let unmanaged = if system {
1819+
let unmanaged = if all {
18201820
outdated::scan_unmanaged(&scan, &store_roots, &managed)
18211821
} else {
18221822
Vec::new()
@@ -1828,7 +1828,7 @@ impl Host for LocalHost {
18281828
progress.checking(&view.name);
18291829
lines.extend(self.report_outdated_view(view, *scope));
18301830
}
1831-
if system {
1831+
if all {
18321832
#[cfg(not(target_os = "wasi"))]
18331833
let results = search_candidates_parallel(self, &unmanaged);
18341834
#[cfg(target_os = "wasi")]

crates/skilld-command/tests/outdated.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ fn outdated_system_reports_a_stale_global_skill_with_the_global_update() {
313313
let mut stderr = Vec::new();
314314

315315
let result = run(
316-
["skilld", "outdated", "--system"],
316+
["skilld", "outdated", "--all"],
317317
&host,
318318
&mut stdout,
319319
&mut stderr,
@@ -340,7 +340,7 @@ fn outdated_system_links_unmanaged_skills_to_a_repository() {
340340
let mut stderr = Vec::new();
341341

342342
let result = run(
343-
["skilld", "outdated", "--system"],
343+
["skilld", "outdated", "--all"],
344344
&host,
345345
&mut stdout,
346346
&mut stderr,
@@ -369,7 +369,7 @@ fn outdated_system_reports_unmanaged_skills_without_a_match() {
369369
let mut stderr = Vec::new();
370370

371371
let result = run(
372-
["skilld", "outdated", "--system"],
372+
["skilld", "outdated", "--all"],
373373
&host,
374374
&mut stdout,
375375
&mut stderr,
@@ -398,7 +398,7 @@ fn outdated_system_surfaces_a_search_failure_and_keeps_scanning() {
398398
let mut stderr = Vec::new();
399399

400400
let result = run(
401-
["skilld", "outdated", "--system"],
401+
["skilld", "outdated", "--all"],
402402
&host,
403403
&mut stdout,
404404
&mut stderr,
@@ -426,7 +426,7 @@ fn outdated_system_reports_a_managed_skill_once() {
426426
let mut stderr = Vec::new();
427427

428428
let result = run(
429-
["skilld", "outdated", "--system"],
429+
["skilld", "outdated", "--all"],
430430
&host,
431431
&mut stdout,
432432
&mut stderr,
@@ -533,7 +533,7 @@ fn outdated_system_survives_a_corrupt_global_store() {
533533
let mut stderr = Vec::new();
534534

535535
let result = run(
536-
["skilld", "outdated", "--system"],
536+
["skilld", "outdated", "--all"],
537537
&host,
538538
&mut stdout,
539539
&mut stderr,
@@ -565,7 +565,7 @@ fn outdated_system_groups_agents_sharing_one_directory() {
565565
let mut stderr = Vec::new();
566566

567567
let result = run(
568-
["skilld", "outdated", "--system"],
568+
["skilld", "outdated", "--all"],
569569
&host,
570570
&mut stdout,
571571
&mut stderr,
@@ -637,7 +637,7 @@ fn outdated_reports_the_bundled_skill_by_its_source() {
637637
let mut stderr = Vec::new();
638638

639639
let result = run(
640-
["skilld", "outdated", "--system"],
640+
["skilld", "outdated", "--all"],
641641
&host,
642642
&mut stdout,
643643
&mut stderr,
@@ -671,7 +671,7 @@ fn outdated_system_runs_candidate_searches_in_parallel_with_a_bound() {
671671

672672
let started = Instant::now();
673673
let result = run(
674-
["skilld", "outdated", "--system"],
674+
["skilld", "outdated", "--all"],
675675
&host,
676676
&mut stdout,
677677
&mut stderr,
@@ -726,7 +726,7 @@ fn outdated_system_finds_skills_in_parent_directories() {
726726
let mut stderr = Vec::new();
727727

728728
let result = run(
729-
["skilld", "outdated", "--system"],
729+
["skilld", "outdated", "--all"],
730730
&host,
731731
&mut stdout,
732732
&mut stderr,
@@ -782,7 +782,7 @@ fn outdated_reports_found_skills_before_remote_checks() {
782782
let mut stderr = Vec::new();
783783

784784
let result = run(
785-
["skilld", "outdated", "--system"],
785+
["skilld", "outdated", "--all"],
786786
&host,
787787
&mut stdout,
788788
&mut stderr,

0 commit comments

Comments
 (0)