From 6138eb9ab87e5e92a2991757ed159c280338f6a6 Mon Sep 17 00:00:00 2001 From: Karl Godard Date: Sat, 5 Dec 2026 00:03:20 +0000 Subject: [PATCH 1/4] fix(min): name the Claude subscription token's service claude-code-oauth-token The Service Library entry for the OAuth token of a Claude subscription is now claude-code-oauth-token, after the CLAUDE_CODE_OAUTH_TOKEN variable that `claude setup-token` gives. Its variable, hosts and Bearer injection are unchanged. The old name was never in a release, so it has no alias. The entry moves to its sorted place in the library. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g --- crates/boxes/src/core/services.rs | 48 +++---- crates/mfile/src/expand.rs | 40 ++++-- crates/minimal/src/cli.rs | 2 +- crates/minimal/src/cmd/boxes/create.rs | 68 ++++----- crates/minimal/src/cmd/secret.rs | 129 ++++++++++-------- crates/minimal/src/tests.rs | 14 +- docs/reference/cli-min.md | 6 +- .../24-spec-box-egress-proxy.md | 11 +- 8 files changed, 170 insertions(+), 148 deletions(-) diff --git a/crates/boxes/src/core/services.rs b/crates/boxes/src/core/services.rs index 3d72384345..3d29d16c0f 100644 --- a/crates/boxes/src/core/services.rs +++ b/crates/boxes/src/core/services.rs @@ -74,21 +74,7 @@ pub const SERVICE_LIBRARY: &[Service] = &[ header: "x-api-key", prefix: None, }, - alternates: &["anthropic-oauth-token"], - }, - // The OAuth token of a Claude subscription, which Claude Code reads - // from `CLAUDE_CODE_OAUTH_TOKEN` and sends as a bearer token (Karl's - // owner ruling of 2026-12-02 on spec 24's roster). - Service { - name: "anthropic-oauth-token", - env: Some("CLAUDE_CODE_OAUTH_TOKEN"), - hosts: &["api.anthropic.com"], - secret: ServiceSecret::Store { - authorities: &["api.anthropic.com"], - header: "Authorization", - prefix: Some("Bearer "), - }, - alternates: &["anthropic-api-key"], + alternates: &["claude-code-oauth-token"], }, // The claude.ai connectors' MCP proxy, with no secret. Its own entry, // and opt-in, since a connector reaches the user's data in other @@ -105,7 +91,7 @@ pub const SERVICE_LIBRARY: &[Service] = &[ // inference, account information and Remote Control to // api.anthropic.com (Karl's owner ruling of 2026-12-03 on spec 24's // roster, from the probes of a box on 0.8.0-dev.778). The secret comes - // from `anthropic-oauth-token` or `anthropic-api-key`. + // from `claude-code-oauth-token` or `anthropic-api-key`. Service { name: "claude-code", env: None, @@ -113,6 +99,20 @@ pub const SERVICE_LIBRARY: &[Service] = &[ secret: ServiceSecret::None, alternates: &[], }, + // The OAuth token of a Claude subscription, which Claude Code reads + // from `CLAUDE_CODE_OAUTH_TOKEN` and sends as a bearer token (Karl's + // owner ruling of 2026-12-02 on spec 24's roster). + Service { + name: "claude-code-oauth-token", + env: Some("CLAUDE_CODE_OAUTH_TOKEN"), + hosts: &["api.anthropic.com"], + secret: ServiceSecret::Store { + authorities: &["api.anthropic.com"], + header: "Authorization", + prefix: Some("Bearer "), + }, + alternates: &["anthropic-api-key"], + }, Service { name: "cloudflare-api-token", env: Some("CLOUDFLARE_API_TOKEN"), @@ -324,14 +324,7 @@ mod tests { Some("ANTHROPIC_API_KEY"), &["api.anthropic.com"], Some(("x-api-key", None)), - &["anthropic-oauth-token"], - ), - ( - "anthropic-oauth-token", - Some("CLAUDE_CODE_OAUTH_TOKEN"), - &["api.anthropic.com"], - Some(("Authorization", Some("Bearer "))), - &["anthropic-api-key"], + &["claude-code-oauth-token"], ), ( "claude-ai-connectors", @@ -347,6 +340,13 @@ mod tests { None, &[], ), + ( + "claude-code-oauth-token", + Some("CLAUDE_CODE_OAUTH_TOKEN"), + &["api.anthropic.com"], + Some(("Authorization", Some("Bearer "))), + &["anthropic-api-key"], + ), ( "cloudflare-api-token", Some("CLOUDFLARE_API_TOKEN"), diff --git a/crates/mfile/src/expand.rs b/crates/mfile/src/expand.rs index 03fddca694..32c48b19c0 100644 --- a/crates/mfile/src/expand.rs +++ b/crates/mfile/src/expand.rs @@ -6799,7 +6799,7 @@ mod tests { fn uses_derives_one_grant_per_service_secret() { let e = expand_uses( "[sessions.dev]\nnetwork = { mode = \"own_ip\", uses = [\"github\", \ - \"anthropic-oauth-token\", \"claude-code\"] }\n", + \"claude-code-oauth-token\", \"claude-code\"] }\n", "dev", ) .unwrap(); @@ -6820,7 +6820,7 @@ mod tests { toml::Value::try_from(toml::toml! { source = "store" store = "keychain" - id = "anthropic-oauth-token" + id = "claude-code-oauth-token" }) .unwrap() ); @@ -6832,7 +6832,7 @@ mod tests { .collect::>(), [ ("GH_TOKEN", "github", false), - ("CLAUDE_CODE_OAUTH_TOKEN", "anthropic-oauth-token", false) + ("CLAUDE_CODE_OAUTH_TOKEN", "claude-code-oauth-token", false) ] ); // A service sets no key of `network` but its hosts and grant. @@ -6916,7 +6916,7 @@ mod tests { // Two sealed grants of one name: the declared one stays and the // report says so. let e = expand_uses( - "[sessions.dev]\nnetwork = { mode = \"own_ip\", uses = [\"anthropic-oauth-token\"] }\n\ + "[sessions.dev]\nnetwork = { mode = \"own_ip\", uses = [\"claude-code-oauth-token\"] }\n\ [sessions.dev.secrets.CLAUDE_CODE_OAUTH_TOKEN]\nsource = \"store\"\n\ store = \"keychain\"\nid = \"claude\"\n", "dev", @@ -7055,7 +7055,7 @@ mod tests { let claude = || { loadout( "claude", - "[network]\nuses = [\"anthropic-oauth-token\", \"claude-code\"]\n", + "[network]\nuses = [\"claude-code-oauth-token\", \"claude-code\"]\n", ) }; // Taken: the grant is derived as the box's own `uses` derives it, and @@ -7063,7 +7063,7 @@ mod tests { let e = expand_with_loadouts(OPEN_BOX, vec![claude()], ServiceFacts::default()).unwrap(); assert_eq!( e.spec["secrets"]["CLAUDE_CODE_OAUTH_TOKEN"]["id"].as_str(), - Some("anthropic-oauth-token") + Some("claude-code-oauth-token") ); let summary: Vec<_> = e .loadout_services @@ -7074,7 +7074,7 @@ mod tests { summary, [ ( - "anthropic-oauth-token", + "claude-code-oauth-token", Some("CLAUDE_CODE_OAUTH_TOKEN"), false ), @@ -7097,7 +7097,12 @@ mod tests { #[test] fn loadout_grant_yields_to_layer_that_delivers_the_name() { - let claude = || loadout("claude", "[network]\nuses = [\"anthropic-oauth-token\"]\n"); + let claude = || { + loadout( + "claude", + "[network]\nuses = [\"claude-code-oauth-token\"]\n", + ) + }; for (file, how) in [ ( "[sessions.dev]\nloadout_mode = \"open\"\nnetwork = { mode = \"own_ip\" }\n\ @@ -7127,14 +7132,19 @@ mod tests { .and_then(|s| s.get("CLAUDE_CODE_OAUTH_TOKEN")) .and_then(|g| g.get("id")) .and_then(toml::Value::as_str), - Some("anthropic-oauth-token") + Some("claude-code-oauth-token") ); } } #[test] fn loadout_service_left_out_where_host_cannot_carry_grant() { - let claude = || loadout("claude", "[network]\nuses = [\"anthropic-oauth-token\"]\n"); + let claude = || { + loadout( + "claude", + "[network]\nuses = [\"claude-code-oauth-token\"]\n", + ) + }; for facts in [ ServiceFacts { proxy_serves: false, @@ -7181,7 +7191,7 @@ mod tests { #[test] fn two_loadouts_naming_one_service_give_one_grant() { - let uses = "[network]\nuses = [\"anthropic-oauth-token\"]\n"; + let uses = "[network]\nuses = [\"claude-code-oauth-token\"]\n"; let e = expand_with_loadouts( OPEN_BOX, vec![loadout("a", uses), loadout("b", uses)], @@ -7337,7 +7347,7 @@ mod tests { }; let own_ip = spec("own_ip"); assert_eq!( - fits(&own_ip, "anthropic-oauth-token", ServiceFacts::default()), + fits(&own_ip, "claude-code-oauth-token", ServiceFacts::default()), Ok(()) ); assert_eq!( @@ -7349,14 +7359,14 @@ mod tests { ..ServiceFacts::default() }; assert_eq!( - fits(&own_ip, "anthropic-oauth-token", no_proxy), + fits(&own_ip, "claude-code-oauth-token", no_proxy), Err(ServiceMisfit::NoProxy) ); // A service with no grant needs no proxy. assert_eq!(fits(&own_ip, "claude-code", no_proxy), Ok(())); // The mode comes before the host's facts. assert_eq!( - fits(&spec("none"), "anthropic-oauth-token", no_proxy), + fits(&spec("none"), "claude-code-oauth-token", no_proxy), Err(ServiceMisfit::NoNetwork) ); } @@ -7408,7 +7418,7 @@ mod tests { OPEN_BOX, vec![loadout( "tool", - "[network]\nuses = [\"anthropic-oauth-token\"]\n", + "[network]\nuses = [\"claude-code-oauth-token\"]\n", )], ServiceFacts::default(), ) diff --git a/crates/minimal/src/cli.rs b/crates/minimal/src/cli.rs index 1476cb95ed..21bc8dd14e 100644 --- a/crates/minimal/src/cli.rs +++ b/crates/minimal/src/cli.rs @@ -2688,7 +2688,7 @@ fn refuse_preset(name: &str) -> Result { // The old `anthropic` preset sent a bearer token, the form of a Claude // subscription's OAuth token (Karl's owner ruling, 2026-12-02). let lookup = if name == "anthropic" { - "anthropic-oauth-token" + "claude-code-oauth-token" } else { name }; diff --git a/crates/minimal/src/cmd/boxes/create.rs b/crates/minimal/src/cmd/boxes/create.rs index d1bcf48a8a..e83adc5331 100644 --- a/crates/minimal/src/cmd/boxes/create.rs +++ b/crates/minimal/src/cmd/boxes/create.rs @@ -9589,7 +9589,7 @@ mod tests { assert!(!needed.native_store_usable); // The selection says what needs it. let stored = SelectedLoadouts { - loadouts: vec![tool_loadout("[\"anthropic-oauth-token\"]")], + loadouts: vec![tool_loadout("[\"claude-code-oauth-token\"]")], ..Default::default() }; let hosts_only = SelectedLoadouts { @@ -9749,7 +9749,7 @@ mod tests { fn rule(&self) { std::fs::write( self.config.path().join("minimal/config.toml"), - "[secret-store-rules.anthropic-oauth-token]\nauthorities = [\"api.anthropic.com\"]\n\ + "[secret-store-rules.claude-code-oauth-token]\nauthorities = [\"api.anthropic.com\"]\n\ header = \"Authorization\"\nprefix = \"Bearer \"\n", ) .unwrap(); @@ -9760,7 +9760,7 @@ mod tests { self.config.path().join("minimal/user_policy.toml"), format!( "[credential-rules]\nrules = [{{ project = {:?}, credential = {{ source = \ - \"store\", store = \"keychain\", id = \"anthropic-oauth-token\" }}, \ + \"store\", store = \"keychain\", id = \"claude-code-oauth-token\" }}, \ action = \"allow\" }}]\n", self.root ), @@ -9811,7 +9811,7 @@ mod tests { f.rule(); f.approve(); let checks = f - .check(tool_loadout("[\"anthropic-oauth-token\"]")) + .check(tool_loadout("[\"claude-code-oauth-token\"]")) .unwrap(); let hosts = checks.policy.egress.unwrap().allow_dns_hosts.unwrap(); assert!(hosts.contains(&"api.anthropic.com".to_owned()), "{hosts:?}"); @@ -9828,7 +9828,7 @@ mod tests { let sub = f.root.join("crates").join("inner"); std::fs::create_dir_all(&sub).unwrap(); let checks = f - .check_from(&sub, tool_loadout("[\"anthropic-oauth-token\"]")) + .check_from(&sub, tool_loadout("[\"claude-code-oauth-token\"]")) .expect("the rule for the root covers a run from below it"); assert_eq!(checks.store_grants.len(), 1); // A rule that names the subdirectory is not the project's rule. @@ -9836,14 +9836,14 @@ mod tests { f.config.path().join("minimal/user_policy.toml"), format!( "[credential-rules]\nrules = [{{ project = {:?}, credential = {{ source = \ - \"store\", store = \"keychain\", id = \"anthropic-oauth-token\" }}, \ + \"store\", store = \"keychain\", id = \"claude-code-oauth-token\" }}, \ action = \"allow\" }}]\n", sub ), ) .unwrap(); let err = f - .check_from(&sub, tool_loadout("[\"anthropic-oauth-token\"]")) + .check_from(&sub, tool_loadout("[\"claude-code-oauth-token\"]")) .unwrap_err(); assert!( err.downcast_ref::() @@ -9865,7 +9865,7 @@ mod tests { for table in [ format!( "[credential-rules]\nrules = [{{ project = {:?}, credential = {{ source = \"store\", \ - store = \"keychain\", id = \"anthropic-oauth-token\" }}, action = \"allow\" }}]\n", + store = \"keychain\", id = \"claude-code-oauth-token\" }}, action = \"allow\" }}]\n", f.root ), "[credential-rules]\naction_for_unspecified = \"allow\"\n".to_owned(), @@ -9873,7 +9873,7 @@ mod tests { std::fs::write(f.root.join(mfile::MFILE_NAME), format!("{base}\n{table}")).unwrap(); // No terminal and no `--no-input` answer: `check` never asks. let err = f - .check(tool_loadout("[\"anthropic-oauth-token\"]")) + .check(tool_loadout("[\"claude-code-oauth-token\"]")) .unwrap_err(); let refused = err .downcast_ref::() @@ -9888,7 +9888,7 @@ mod tests { let f = LoadoutCreate::new(); let spec: toml::Table = toml::from_str( "[secrets.CLAUDE_CODE_OAUTH_TOKEN]\nsource = \"store\"\nstore = \"keychain\"\n\ - id = \"anthropic-oauth-token\"\n", + id = \"claude-code-oauth-token\"\n", ) .unwrap(); let global = crate::GlobalArgs { @@ -9916,14 +9916,14 @@ mod tests { f.rule(); // No terminal and no rule: refused with exit 2, naming the rule to add. let err = f - .check(tool_loadout("[\"anthropic-oauth-token\"]")) + .check(tool_loadout("[\"claude-code-oauth-token\"]")) .unwrap_err(); let refused = err .downcast_ref::() .expect("an approval refusal"); assert_eq!(refused.exit_code(), 2); assert!( - refused.to_string().contains("anthropic-oauth-token"), + refused.to_string().contains("claude-code-oauth-token"), "{refused}" ); } @@ -9934,13 +9934,13 @@ mod tests { let f = LoadoutCreate::new(); f.approve(); let err = f - .check(tool_loadout("[\"anthropic-oauth-token\"]")) + .check(tool_loadout("[\"claude-code-oauth-token\"]")) .unwrap_err(); let refused = err.downcast_ref::().expect("exit 3"); assert!( - refused - .to_string() - .contains("min secret set anthropic-oauth-token --service anthropic-oauth-token"), + refused.to_string().contains( + "min secret set claude-code-oauth-token --service claude-code-oauth-token" + ), "{refused}" ); } @@ -9966,11 +9966,11 @@ mod tests { f.rule(); f.approve(); let selected = SelectedLoadouts { - loadouts: vec![tool_loadout("[\"anthropic-oauth-token\"]")], + loadouts: vec![tool_loadout("[\"claude-code-oauth-token\"]")], ..Default::default() }; let checked = f - .check(tool_loadout("[\"anthropic-oauth-token\"]")) + .check(tool_loadout("[\"claude-code-oauth-token\"]")) .unwrap(); let expanded = session_box_expansion( &f.root, @@ -9985,24 +9985,24 @@ mod tests { .expect("the entry expands"); assert_eq!( expanded.spec["secrets"]["CLAUDE_CODE_OAUTH_TOKEN"]["id"].as_str(), - Some("anthropic-oauth-token") + Some("claude-code-oauth-token") ); assert_eq!(expanded.loadout_services.len(), 1); assert!(expanded.loadout_services[0].left_out.is_none()); } /// The service's own grant: `CLAUDE_CODE_OAUTH_TOKEN` reading the item - /// `anthropic-oauth-token`. + /// `claude-code-oauth-token`. fn service_grant() -> boxes::core::bep::SecretGrants { boxes::core::bep::SecretGrants::from([( "CLAUDE_CODE_OAUTH_TOKEN".into(), - store_reference("anthropic-oauth-token"), + store_reference("claude-code-oauth-token"), )]) } fn service_rule(authorities: &[&str], prefix: Option<&str>) -> boxes::core::bep::StoreRules { boxes::core::bep::StoreRules::from([( - "anthropic-oauth-token".into(), + "claude-code-oauth-token".into(), boxes::core::bep::StoreRuleConfig { store: None, authorities: authorities.iter().map(|a| (*a).to_owned()).collect(), @@ -10031,7 +10031,7 @@ mod tests { boxes::core::bep::SESSION_SECRETS_TABLE, ) }; - let command = "`min secret set anthropic-oauth-token --service anthropic-oauth-token`"; + let command = "`min secret set claude-code-oauth-token --service claude-code-oauth-token`"; // No rule. let err = accept( &bep::store::MemorySecretStore::default(), @@ -10083,17 +10083,18 @@ mod tests { #[test] fn derived_grant_reads_a_rule_as_secret_list_reads_it() { let mut rules = service_rule(&["API.Anthropic.com:443"], Some("Bearer ")); - rules.get_mut("anthropic-oauth-token").unwrap().header = Some("authorization".into()); - let rule = &rules["anthropic-oauth-token"]; - let missing = check_service_rule("CLAUDE_CODE_OAUTH_TOKEN", "anthropic-oauth-token", rule) - .expect("the same hosts and header in other spellings"); + rules.get_mut("claude-code-oauth-token").unwrap().header = Some("authorization".into()); + let rule = &rules["claude-code-oauth-token"]; + let missing = + check_service_rule("CLAUDE_CODE_OAUTH_TOKEN", "claude-code-oauth-token", rule) + .expect("the same hosts and header in other spellings"); assert!(missing.is_empty(), "{missing:?}"); // Another port is another authority. let other = service_rule(&["api.anthropic.com:8443"], Some("Bearer ")); check_service_rule( "CLAUDE_CODE_OAUTH_TOKEN", - "anthropic-oauth-token", - &other["anthropic-oauth-token"], + "claude-code-oauth-token", + &other["claude-code-oauth-token"], ) .unwrap_err(); } @@ -10103,9 +10104,10 @@ mod tests { #[test] fn derived_grant_uses_rule_as_written_and_names_missing_authority() { let rules = service_rule(&[], Some("Bearer ")); - let rule = &rules["anthropic-oauth-token"]; - let missing = check_service_rule("CLAUDE_CODE_OAUTH_TOKEN", "anthropic-oauth-token", rule) - .expect("a rule that only lacks a host is not refused"); + let rule = &rules["claude-code-oauth-token"]; + let missing = + check_service_rule("CLAUDE_CODE_OAUTH_TOKEN", "claude-code-oauth-token", rule) + .expect("a rule that only lacks a host is not refused"); assert_eq!(missing, ["api.anthropic.com"]); // The rule stands: the creation accepts it as it is. let egress = egress_of(&["api.anthropic.com"]); @@ -10123,7 +10125,7 @@ mod tests { assert_eq!(accepted, rules); // A grant that is not the service's own is checked by no rule. assert!( - check_service_rule("OTHER", "anthropic-oauth-token", rule) + check_service_rule("OTHER", "claude-code-oauth-token", rule) .unwrap() .is_empty() ); diff --git a/crates/minimal/src/cmd/secret.rs b/crates/minimal/src/cmd/secret.rs index 39a885da5f..7564543664 100644 --- a/crates/minimal/src/cmd/secret.rs +++ b/crates/minimal/src/cmd/secret.rs @@ -2907,7 +2907,7 @@ attributes: /// `EXISTING`, with the rule under the name of the service it matches. fn existing_service() -> String { - EXISTING.replace("claude", "anthropic-oauth-token") + EXISTING.replace("claude", "claude-code-oauth-token") } fn no_ask(_: &str) -> anyhow::Result { @@ -3063,9 +3063,9 @@ attributes: let (result, _) = set_with_rule( &store, &[ - "anthropic-oauth-token", + "claude-code-oauth-token", "--service", - "anthropic-oauth-token", + "claude-code-oauth-token", ], &proxy, ValueSource::Stdin, @@ -3080,7 +3080,7 @@ attributes: assert!( String::from_utf8(written) .unwrap() - .contains("[secret-store-rules.anthropic-oauth-token]") + .contains("[secret-store-rules.claude-code-oauth-token]") ); assert_eq!(after, before, "only the user config.toml changed"); assert_eq!( @@ -3106,7 +3106,7 @@ attributes: None, ), ( - "anthropic-oauth-token", + "claude-code-oauth-token", &["api.anthropic.com"], "Authorization", Some("Bearer "), @@ -3153,9 +3153,9 @@ attributes: "min", "secret", "set", - "anthropic-oauth-token", + "claude-code-oauth-token", "--service", - "anthropic-oauth-token", + "claude-code-oauth-token", ]; argv.extend_from_slice(flags); assert!(crate::Cli::try_parse_from(argv).is_err(), "{flags:?}"); @@ -3202,7 +3202,7 @@ attributes: let mut out = Vec::new(); let err = run_set_with_rule( &store, - &set_args(&["anthropic-oauth-token", "--service", name]), + &set_args(&["claude-code-oauth-token", "--service", name]), &proxy, source, &mut no_terminal, @@ -3223,19 +3223,20 @@ attributes: } // The args check that `cmd_secret_set` runs first refuses it too. assert!( - refuse_set_args(&set_args(&["anthropic-oauth-token", "--service", name])).is_err() + refuse_set_args(&set_args(&["claude-code-oauth-token", "--service", name])) + .is_err() ); } - assert!(store.value("anthropic-oauth-token").is_none()); + assert!(store.value("claude-code-oauth-token").is_none()); assert!(!path.exists()); let Err(err) = crate::Cli::try_parse_from([ "min", "secret", "set", - "anthropic-oauth-token", + "claude-code-oauth-token", "--preset", - "anthropic-oauth-token", + "claude-code-oauth-token", ]) else { panic!("--preset is retired"); }; @@ -3243,11 +3244,11 @@ attributes: assert_eq!(err.exit_code(), 2); assert!( err.to_string().contains( - "--preset is replaced by --service. Run the command again with --service anthropic-oauth-token" + "--preset is replaced by --service. Run the command again with --service claude-code-oauth-token" ), "{err}" ); - // The old `anthropic` preset is the `anthropic-oauth-token` service. + // The old `anthropic` preset is the `claude-code-oauth-token` service. // A preset no service matches, and a bare `--preset`, list the // services rather than name one that does not exist. let names = services::SERVICE_LIBRARY @@ -3263,7 +3264,7 @@ attributes: "min", "secret", "set", - "anthropic-oauth-token", + "claude-code-oauth-token", "--preset", "github", ][..], @@ -3276,12 +3277,12 @@ attributes: "min", "secret", "set", - "anthropic-oauth-token", + "claude-code-oauth-token", "--preset", "anthropic", ][..], "--preset is replaced by --service. Run the command again with \ - --service anthropic-oauth-token" + --service claude-code-oauth-token" .to_owned(), ), ( @@ -3289,7 +3290,7 @@ attributes: "min", "secret", "set", - "anthropic-oauth-token", + "claude-code-oauth-token", "--preset", "claude-code", ], @@ -3303,7 +3304,7 @@ attributes: "min", "secret", "set", - "anthropic-oauth-token", + "claude-code-oauth-token", "--preset", "linear", ], @@ -3313,7 +3314,13 @@ attributes: ), ), ( - &["min", "secret", "set", "anthropic-oauth-token", "--preset"], + &[ + "min", + "secret", + "set", + "claude-code-oauth-token", + "--preset", + ], format!( "--preset is replaced by --service. Run the command again with \ --service , where is one of: {names}" @@ -3431,9 +3438,9 @@ attributes: let (result, out) = set_with_rule( &store, &[ - "anthropic-oauth-token", + "claude-code-oauth-token", "--service", - "anthropic-oauth-token", + "claude-code-oauth-token", ], &proxy, ValueSource::Terminal, @@ -3445,20 +3452,20 @@ attributes: ); let text = format!("{:#}", result.expect_err("declined")); assert!( - text.contains("the rule for anthropic-oauth-token is unchanged"), + text.contains("the rule for claude-code-oauth-token is unchanged"), "{text}" ); assert!( - text.contains("`min secret set anthropic-oauth-token` without rule flags"), + text.contains("`min secret set claude-code-oauth-token` without rule flags"), "{text}" ); assert!(out.is_empty()); - assert!(store.value("anthropic-oauth-token").is_none()); + assert!(store.value("claude-code-oauth-token").is_none()); assert_eq!(std::fs::read_to_string(&path).unwrap(), existing_service()); assert_eq!( shown, [format!( - "{} has a different secret-store rule for anthropic-oauth-token.\n\ + "{} has a different secret-store rule for claude-code-oauth-token.\n\ Current rule:\n authorities: api.anthropic.com\n injection: header x-api-key\n consent: none\n\ New rule:\n authorities: api.anthropic.com\n injection: header Authorization, prefix \"Bearer \"\n consent: none", path.display() @@ -3471,9 +3478,9 @@ attributes: let (result, out) = set_with_rule( &store, &[ - "anthropic-oauth-token", + "claude-code-oauth-token", "--service", - "anthropic-oauth-token", + "claude-code-oauth-token", ], &proxy, ValueSource::Terminal, @@ -3485,15 +3492,15 @@ attributes: ); result.unwrap(); assert_eq!(asked, 1); - assert_eq!(out, "anthropic-oauth-token\n"); + assert_eq!(out, "claude-code-oauth-token\n"); assert_eq!( - store.value("anthropic-oauth-token").as_deref(), + store.value("claude-code-oauth-token").as_deref(), Some(&b"typed"[..]) ); let rules = written_rules(&path); // The rule carries no consent (BEP-094). assert_eq!( - rules.get("anthropic-oauth-token"), + rules.get("claude-code-oauth-token"), Some(&header_rule( "api.anthropic.com", "Authorization", @@ -3506,9 +3513,9 @@ attributes: let (result, _) = set_with_rule( &store, &[ - "anthropic-oauth-token", + "claude-code-oauth-token", "--service", - "anthropic-oauth-token", + "claude-code-oauth-token", ], &proxy, ValueSource::Terminal, @@ -3526,7 +3533,7 @@ attributes: std::fs::write(&path, existing_service()).unwrap(); let store = MemorySecretStore::default(); store - .set("anthropic-oauth-token", b"old", &proxy) + .set("claude-code-oauth-token", b"old", &proxy) .expect("the old value is stored"); for source in [ ValueSource::Stdin, @@ -3537,9 +3544,9 @@ attributes: let err = run_set_with_rule( &store, &set_args(&[ - "anthropic-oauth-token", + "claude-code-oauth-token", "--service", - "anthropic-oauth-token", + "claude-code-oauth-token", ]), &proxy, source, @@ -3571,7 +3578,7 @@ attributes: assert!(out.is_empty()); } assert_eq!( - store.value("anthropic-oauth-token").as_deref(), + store.value("claude-code-oauth-token").as_deref(), Some(&b"old"[..]) ); assert_eq!(std::fs::read_to_string(&path).unwrap(), existing_service()); @@ -3588,9 +3595,9 @@ attributes: let (result, out) = set_with_rule( &store, &[ - "anthropic-oauth-token", + "claude-code-oauth-token", "--service", - "anthropic-oauth-token", + "claude-code-oauth-token", flag, ], &proxy, @@ -3599,13 +3606,13 @@ attributes: &mut no_confirm, ); result.unwrap(); - assert_eq!(out, "anthropic-oauth-token\n"); + assert_eq!(out, "claude-code-oauth-token\n"); let rules = written_rules(&path); // The rule changes from `x-api-key` to a Bearer `Authorization` // with no prompt, and the hand-set `ask` stays (review finding // 4371881769). assert_eq!( - rules.get("anthropic-oauth-token"), + rules.get("claude-code-oauth-token"), Some(&header_rule( "api.anthropic.com", "Authorization", @@ -3615,7 +3622,7 @@ attributes: assert!(rules.contains_key("other")); } assert_eq!( - store.value("anthropic-oauth-token").as_deref(), + store.value("claude-code-oauth-token").as_deref(), Some(&b"typed"[..]) ); } @@ -3774,7 +3781,7 @@ attributes: let (_dir, proxy) = proxy(); let store = MemorySecretStore::default(); for c in ['*', '?', '[', '{', '\\'] { - let id = format!("anthropic-oauth-token{c}"); + let id = format!("claude-code-oauth-token{c}"); for flags in [ vec!["--service", "anthropic-api-key"], vec![ @@ -3803,7 +3810,7 @@ attributes: ); } } - assert_eq!(store.value("anthropic-oauth-token"), None); + assert_eq!(store.value("claude-code-oauth-token"), None); } // Review finding 4759543025: when the store cannot say whether the item @@ -3848,9 +3855,9 @@ attributes: let (result, out) = set_with_rule( &UnansweredStore, &[ - "anthropic-oauth-token", + "claude-code-oauth-token", "--service", - "anthropic-oauth-token", + "claude-code-oauth-token", "--yes", ], &proxy, @@ -3861,7 +3868,7 @@ attributes: assert_eq!( format!("{:#}", result.expect_err("no answer")), format!( - "min secret set cannot tell whether it stored anthropic-oauth-token. The rule for anthropic-oauth-token in {} \ + "min secret set cannot tell whether it stored claude-code-oauth-token. The rule for claude-code-oauth-token in {} \ is back as it was: Secret Service did not answer in 60 s. Secret Service can \ still make the change, or it made a part of it. Run the command again.", path.display() @@ -3870,7 +3877,7 @@ attributes: assert!(out.is_empty()); let args = SecretRmArgs { - id: "anthropic-oauth-token".into(), + id: "claude-code-oauth-token".into(), store: None, yes: false, }; @@ -3880,7 +3887,7 @@ attributes: "{:#}", run_rm(&UnansweredStore, &args, &mut out).unwrap_err() ), - "min secret rm cannot tell whether it removed anthropic-oauth-token: Secret Service did not answer \ + "min secret rm cannot tell whether it removed claude-code-oauth-token: Secret Service did not answer \ in 60 s. Secret Service can still make the change, or it made a part of it. Run \ the command again." ); @@ -3898,9 +3905,9 @@ attributes: let (result, out) = set_with_rule( &RefusingStore, &[ - "anthropic-oauth-token", + "claude-code-oauth-token", "--service", - "anthropic-oauth-token", + "claude-code-oauth-token", "--yes", ], &proxy, @@ -3910,7 +3917,7 @@ attributes: ); let text = format!("{:#}", result.expect_err("store failed")); assert!( - text.starts_with("min secret set did not store anthropic-oauth-token"), + text.starts_with("min secret set did not store claude-code-oauth-token"), "{text}" ); assert!(text.contains("is back as it was"), "{text}"); @@ -3923,9 +3930,9 @@ attributes: let (result, _) = set_with_rule( &RefusingStore, &[ - "anthropic-oauth-token", + "claude-code-oauth-token", "--service", - "anthropic-oauth-token", + "claude-code-oauth-token", ], &proxy, ValueSource::Stdin, @@ -3940,13 +3947,15 @@ attributes: let inline = "secret-store-rules = {}\n"; std::fs::write(&path, inline).unwrap(); let store = MemorySecretStore::default(); - store.set("anthropic-oauth-token", b"old", &proxy).unwrap(); + store + .set("claude-code-oauth-token", b"old", &proxy) + .unwrap(); let (result, out) = set_with_rule( &store, &[ - "anthropic-oauth-token", + "claude-code-oauth-token", "--service", - "anthropic-oauth-token", + "claude-code-oauth-token", ], &proxy, ValueSource::Stdin, @@ -3956,14 +3965,14 @@ attributes: let text = format!("{:#}", result.expect_err("rule failed")); assert!( text.starts_with( - "min secret set stored nothing: it did not write the rule for anthropic-oauth-token" + "min secret set stored nothing: it did not write the rule for claude-code-oauth-token" ), "{text}" ); assert!(text.contains("inline table"), "{text}"); assert!(out.is_empty()); assert_eq!( - store.value("anthropic-oauth-token").as_deref(), + store.value("claude-code-oauth-token").as_deref(), Some(&b"old"[..]) ); assert_eq!(std::fs::read_to_string(&path).unwrap(), inline); @@ -4112,7 +4121,7 @@ attributes: // ---- BEP-079 (--service), BEP-093 to BEP-098, BEP-053: a rule file that // `min` cannot replace, and the failures around it ---- - const SERVICE: &str = "anthropic-oauth-token"; + const SERVICE: &str = "claude-code-oauth-token"; /// The value the tests store. It must never appear in what is printed /// (CFW-005). const SECRET: &str = "hunter2-the-secret-value"; diff --git a/crates/minimal/src/tests.rs b/crates/minimal/src/tests.rs index 3155c576d6..df39596ac1 100644 --- a/crates/minimal/src/tests.rs +++ b/crates/minimal/src/tests.rs @@ -29560,7 +29560,7 @@ fn secret_set_help_names_each_service_with_its_variable() { let help = rendered_help(&["secret", "set"]); for (name, env) in [ ("anthropic-api-key", "ANTHROPIC_API_KEY"), - ("anthropic-oauth-token", "CLAUDE_CODE_OAUTH_TOKEN"), + ("claude-code-oauth-token", "CLAUDE_CODE_OAUTH_TOKEN"), ("cloudflare-api-token", "CLOUDFLARE_API_TOKEN"), ("linear-api-key", "LINEAR_API_KEY"), ("sentry-auth-token", "SENTRY_AUTH_TOKEN"), @@ -29872,7 +29872,7 @@ async fn box_spec_entry_shows_the_hosts_each_service_added() { fn spec_project_with_loadout() -> (tempfile::TempDir, GlobalArgs) { let (project, global) = spec_project( "[sessions.default]\nnetwork = { mode = \"own_ip\", \ - bep = { steering = \"proxy_env\" }, uses = [\"anthropic-oauth-token\"] }\n", + bep = { steering = \"proxy_env\" }, uses = [\"claude-code-oauth-token\"] }\n", ); let config = global.config_dir.clone().unwrap().join("minimal"); std::fs::create_dir_all(config.join("loadouts")).unwrap(); @@ -29884,7 +29884,7 @@ fn spec_project_with_loadout() -> (tempfile::TempDir, GlobalArgs) { .unwrap(); std::fs::write( config.join("config.toml"), - "[secret-store-rules.anthropic-oauth-token]\nauthorities = [\"api.anthropic.com\"]\n\ + "[secret-store-rules.claude-code-oauth-token]\nauthorities = [\"api.anthropic.com\"]\n\ header = \"Authorization\"\nprefix = \"Bearer \"\n", ) .unwrap(); @@ -29938,7 +29938,7 @@ async fn box_spec_shows_service_hosts_and_derived_grants_with_source() { assert_eq!( sources["network.egress.allow_dns_hosts[api.anthropic.com]"], serde_json_lenient::json!([ - "the service anthropic-oauth-token, which [sessions.default] uses" + "the service claude-code-oauth-token, which [sessions.default] uses" ]), "{doc}" ); @@ -29946,13 +29946,13 @@ async fn box_spec_shows_service_hosts_and_derived_grants_with_source() { assert_eq!( sources["secrets.CLAUDE_CODE_OAUTH_TOKEN"], serde_json_lenient::json!([ - "the service anthropic-oauth-token, which [sessions.default] uses" + "the service claude-code-oauth-token, which [sessions.default] uses" ]), "{doc}" ); assert_eq!( doc["spec"]["secrets"]["CLAUDE_CODE_OAUTH_TOKEN"]["id"], - "anthropic-oauth-token" + "claude-code-oauth-token" ); } @@ -29969,7 +29969,7 @@ async fn box_spec_shows_each_grant_asker_and_approval_state() { let rule = |action: &str| { format!( "[credential-rules]\nrules = [{{ project = {:?}, credential = {{ source = \"store\", \ - store = \"keychain\", id = \"anthropic-oauth-token\" }}, action = \"{action}\" }}]\n", + store = \"keychain\", id = \"claude-code-oauth-token\" }}, action = \"{action}\" }}]\n", std::fs::canonicalize(project.path()).unwrap() ) }; diff --git a/docs/reference/cli-min.md b/docs/reference/cli-min.md index 531afb2218..2609266175 100644 --- a/docs/reference/cli-min.md +++ b/docs/reference/cli-min.md @@ -1345,7 +1345,7 @@ does not change it. The entries are: | Service | Variable | Authorities | Injection | |---|---|---|---| | `anthropic-api-key` | `ANTHROPIC_API_KEY` | `api.anthropic.com` | `x-api-key: ` | -| `anthropic-oauth-token` | `CLAUDE_CODE_OAUTH_TOKEN` | `api.anthropic.com` | `Authorization: Bearer ` | +| `claude-code-oauth-token` | `CLAUDE_CODE_OAUTH_TOKEN` | `api.anthropic.com` | `Authorization: Bearer ` | | `cloudflare-api-token` | `CLOUDFLARE_API_TOKEN` | `api.cloudflare.com` | `Authorization: Bearer ` | | `linear-api-key` | `LINEAR_API_KEY` | `api.linear.app` | `Authorization: ` | | `sentry-auth-token` | `SENTRY_AUTH_TOKEN` | `sentry.io`, `us.sentry.io`, `de.sentry.io` | `Authorization: Bearer ` | @@ -1381,12 +1381,12 @@ reach that data. `min secret set` refuses both, and names `network.uses` and A `/login` inside a box writes its credentials to `~/.claude/.credentials.json` in the box, in plain text that any process in the box can read. The proxy does not hold them. The -`anthropic-oauth-token` service stores the token of a Claude subscription, +`claude-code-oauth-token` service stores the token of a Claude subscription, and the proxy sends it to `api.anthropic.com` for the box. `min secret set` refuses an unknown name and lists the services. Both refusals come before the command reads the value. `--service` replaces `--preset`, which is now a usage error that names -`--service`. For the old `anthropic` preset it names `--service anthropic-oauth-token`, the +`--service`. For the old `anthropic` preset it names `--service claude-code-oauth-token`, the token of a Claude subscription, which writes the same rule. For `github` it names `min auth login`. For any other preset it lists the services that hold a stored secret. The old `cloudflare`, `linear` and `sentry` presets sent the value to an MCP host. Each service sends it to the provider's API diff --git a/docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md b/docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md index 3a2121a4cc..fdc2d973e5 100644 --- a/docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md +++ b/docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md @@ -1085,14 +1085,15 @@ Setting secrets - THE SYSTEM SHALL write store rules from `min secret set` to the user-level client configuration alone, and to no project `minimal.toml` and no organization configuration. tier: T0 verify: cargo nextest run -p minimal secret_set_writes_no_project_or_org_config - - THE SYSTEM SHALL resolve `--service ` to a copy of the authorities and injection form of the Service Library's entry: `anthropic-api-key` to `api.anthropic.com` with header `x-api-key` and no prefix, `anthropic-oauth-token` to `api.anthropic.com` with header `Authorization` and prefix `Bearer `, `cloudflare-api-token` to `api.cloudflare.com` with header `Authorization` and prefix `Bearer `, `linear-api-key` to `api.linear.app` with header `Authorization` and no prefix, and `sentry-auth-token` to `sentry.io`, `us.sentry.io` and `de.sentry.io` with header `Authorization` and prefix `Bearer `. + - THE SYSTEM SHALL resolve `--service ` to a copy of the authorities and injection form of the Service Library's entry: `anthropic-api-key` to `api.anthropic.com` with header `x-api-key` and no prefix, `claude-code-oauth-token` to `api.anthropic.com` with header `Authorization` and prefix `Bearer `, `cloudflare-api-token` to `api.cloudflare.com` with header `Authorization` and prefix `Bearer `, `linear-api-key` to `api.linear.app` with header `Authorization` and no prefix, and `sentry-auth-token` to `sentry.io`, `us.sentry.io` and `de.sentry.io` with header `Authorization` and prefix `Bearer `. tier: T0 verify: cargo nextest run -p minimal secret_set_services_resolve_to_their_rules - + + - + - IF `--service` does not name an entry of the Service Library, or names an entry whose secret is a deep module's sign-in or an entry without a secret, THEN THE SYSTEM SHALL refuse the command before reading the value. The refusal of an unknown name prints the names the library holds. The refusal of a sign-in names `min auth login`. The refusal of an entry without a secret names `network.uses` and `--allow-service`. @@ -1218,7 +1219,7 @@ Setting secrets - THE SYSTEM SHALL mark an authority that two entries share, in both entries, as an alternate form of one provider. tier: T0 verify: cargo nextest run -p client-config service_library_marks_shared_authority_as_alternate_form - + - THE SYSTEM SHALL require the host set and the injection form of every entry to match a reviewed list of those values for each name, so that a change to an entry shows in review. tier: T0 verify: cargo nextest run -p client-config service_library_matches_reviewed_list @@ -1232,7 +1233,7 @@ Setting secrets verify: cargo nextest run -p client-config service_library_variable_is_valid_and_unique -- **BEP-101** THE SYSTEM SHALL include in the library an entry for each of `github`, `anthropic-api-key`, `anthropic-oauth-token`, `cloudflare-api-token`, `linear-api-key` and `sentry-auth-token`. +- **BEP-101** THE SYSTEM SHALL include in the library an entry for each of `github`, `anthropic-api-key`, `claude-code-oauth-token`, `cloudflare-api-token`, `linear-api-key` and `sentry-auth-token`. tier: T0 verify: cargo nextest run -p client-config service_library_ships_the_named_roster From 81302753c52760c627ad4c88dc2f2a987b750dfd Mon Sep 17 00:00:00 2001 From: Karl Godard Date: Sat, 5 Dec 2026 00:04:02 +0000 Subject: [PATCH 2/4] docs(spec): keep the 2026-12-03 ruling's record of the entry's name Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g --- docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md b/docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md index fdc2d973e5..2c5bfa0e4c 100644 --- a/docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md +++ b/docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md @@ -1093,7 +1093,7 @@ Setting secrets - + - IF `--service` does not name an entry of the Service Library, or names an entry whose secret is a deep module's sign-in or an entry without a secret, THEN THE SYSTEM SHALL refuse the command before reading the value. The refusal of an unknown name prints the names the library holds. The refusal of a sign-in names `min auth login`. The refusal of an entry without a secret names `network.uses` and `--allow-service`. From bb31015f40c97d82f58552c0fff0028375a19ec4 Mon Sep 17 00:00:00 2001 From: Karl Godard Date: Sat, 5 Dec 2026 03:52:51 +0000 Subject: [PATCH 3/4] fix(min): the retired --preset maps no old preset name to a service --preset was never in a release, so its refusal no longer maps the old `anthropic` preset to a service: `--preset anthropic` lists the stored-secret services, as any unknown preset does. The min reference drops the sentence about it. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g --- crates/minimal/src/cli.rs | 12 +++--------- crates/minimal/src/cmd/secret.rs | 11 ++++++----- docs/reference/cli-min.md | 3 +-- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/crates/minimal/src/cli.rs b/crates/minimal/src/cli.rs index 21bc8dd14e..566d91cb46 100644 --- a/crates/minimal/src/cli.rs +++ b/crates/minimal/src/cli.rs @@ -2675,8 +2675,8 @@ fn service_long_help() -> String { } /// The parser of the retired `--preset`: it refuses every value, naming -/// `--service`, so clap exits 2. A preset whose rule a stored-secret service -/// gives as it was, under the same name or another, names that service. A +/// `--service`, so clap exits 2. A preset that names a stored-secret service +/// names that service. A /// sign-in service names `min auth login`, as `--service` does. A service /// that gives hosts only names `network.uses` and `--allow-service`, as /// `--service` does. Any other @@ -2685,13 +2685,7 @@ fn service_long_help() -> String { /// an MCP host, and no service does. fn refuse_preset(name: &str) -> Result { use boxes::core::services::{self, ServiceSecret}; - // The old `anthropic` preset sent a bearer token, the form of a Claude - // subscription's OAuth token (Karl's owner ruling, 2026-12-02). - let lookup = if name == "anthropic" { - "claude-code-oauth-token" - } else { - name - }; + let lookup = name; Err( match services::service(lookup).map(|service| service.secret) { Some(ServiceSecret::Store { .. }) => format!( diff --git a/crates/minimal/src/cmd/secret.rs b/crates/minimal/src/cmd/secret.rs index 7564543664..c4a7121ecb 100644 --- a/crates/minimal/src/cmd/secret.rs +++ b/crates/minimal/src/cmd/secret.rs @@ -3248,8 +3248,8 @@ attributes: ), "{err}" ); - // The old `anthropic` preset is the `claude-code-oauth-token` service. - // A preset no service matches, and a bare `--preset`, list the + // A preset no service matches, `anthropic` included, and a bare + // `--preset`, list the // services rather than name one that does not exist. let names = services::SERVICE_LIBRARY .iter() @@ -3281,9 +3281,10 @@ attributes: "--preset", "anthropic", ][..], - "--preset is replaced by --service. Run the command again with \ - --service claude-code-oauth-token" - .to_owned(), + format!( + "--preset is replaced by --service, and there is no service named anthropic. \ + Run the command again with --service , where is one of: {names}" + ), ), ( &[ diff --git a/docs/reference/cli-min.md b/docs/reference/cli-min.md index 2609266175..6b94cbecf2 100644 --- a/docs/reference/cli-min.md +++ b/docs/reference/cli-min.md @@ -1386,8 +1386,7 @@ and the proxy sends it to `api.anthropic.com` for the box. `min secret set` refuses an unknown name and lists the services. Both refusals come before the command reads the value. `--service` replaces `--preset`, which is now a usage error that names -`--service`. For the old `anthropic` preset it names `--service claude-code-oauth-token`, the -token of a Claude subscription, which writes the same rule. For `github` it names `min auth login`. For any other preset it lists the +`--service`. For `github` it names `min auth login`. For any other preset it lists the services that hold a stored secret. The old `cloudflare`, `linear` and `sentry` presets sent the value to an MCP host. Each service sends it to the provider's API host. From c9fb308c01e0aa6ffc180112980041efd25fa00a Mon Sep 17 00:00:00 2001 From: Karl Godard Date: Sat, 5 Dec 2026 03:53:37 +0000 Subject: [PATCH 4/4] docs(min): drop the --preset text from the min reference --preset was never in a release, so the min reference no longer says that --service replaces it or describes the old presets. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g --- docs/reference/cli-min.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/reference/cli-min.md b/docs/reference/cli-min.md index 6b94cbecf2..af54c46af0 100644 --- a/docs/reference/cli-min.md +++ b/docs/reference/cli-min.md @@ -1385,11 +1385,7 @@ the box can read. The proxy does not hold them. The and the proxy sends it to `api.anthropic.com` for the box. `min secret set` refuses an unknown name and lists the services. Both refusals come before the -command reads the value. `--service` replaces `--preset`, which is now a usage error that names -`--service`. For `github` it names `min auth login`. For any other preset it lists the -services that hold a stored secret. The old `cloudflare`, `linear` -and `sentry` presets sent the value to an MCP host. Each service sends it to the provider's API -host. +command reads the value. When a rule for `` exists with other fields, `min secret set` shows the current and the new fields and replaces the rule only when you answer yes.