#[non_exhaustive]pub struct AuthMethodTerminal {
pub method_id: AuthMethodId,
pub name: String,
pub description: Option<String>,
pub args: Vec<String>,
pub env: Vec<EnvVariable>,
pub meta: Option<Meta>,
}unstable_protocol_v2 only.Expand description
Terminal-based authentication method.
The client runs the configured agent program as a separate interactive
process for the user to authenticate via a TUI. Agents MUST advertise this
method only when the client enabled its terminal authentication capability.
A zero exit status signals success; any other termination signals failure.
The client MUST NOT pass this method to auth/login.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.method_id: AuthMethodIdUnique identifier for this authentication method.
name: StringHuman-readable name of the authentication method.
description: Option<String>Optional description providing more details about this authentication method.
args: Vec<String>Additional arguments to append to the configured agent invocation for terminal auth.
env: Vec<EnvVariable>Additional environment variables to set on the configured agent invocation for terminal auth. Names MUST be unique. These values override same-named variables in the base launch configuration.
meta: Option<Meta>The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Implementations§
Source§impl AuthMethodTerminal
impl AuthMethodTerminal
Sourcepub fn new(method_id: impl Into<AuthMethodId>, name: impl Into<String>) -> Self
pub fn new(method_id: impl Into<AuthMethodId>, name: impl Into<String>) -> Self
Builds AuthMethodTerminal with the required fields set; optional fields start unset or empty.
Sourcepub fn args(self, args: Vec<String>) -> Self
pub fn args(self, args: Vec<String>) -> Self
Additional arguments to append to the configured agent invocation for terminal auth.
Sourcepub fn env(self, env: Vec<EnvVariable>) -> Self
pub fn env(self, env: Vec<EnvVariable>) -> Self
Additional environment variables to set on the configured agent invocation for terminal auth. Names MUST be unique. These values override same-named variables in the base launch configuration.
Sourcepub fn description(self, description: impl IntoOption<String>) -> Self
pub fn description(self, description: impl IntoOption<String>) -> Self
Optional description providing more details about this authentication method.
Sourcepub fn meta(self, meta: impl IntoOption<Meta>) -> Self
pub fn meta(self, meta: impl IntoOption<Meta>) -> Self
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for AuthMethodTerminal
impl Clone for AuthMethodTerminal
Source§fn clone(&self) -> AuthMethodTerminal
fn clone(&self) -> AuthMethodTerminal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AuthMethodTerminal
impl Debug for AuthMethodTerminal
Source§impl<'de> Deserialize<'de> for AuthMethodTerminal
impl<'de> Deserialize<'de> for AuthMethodTerminal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for AuthMethodTerminal
Source§impl JsonSchema for AuthMethodTerminal
impl JsonSchema for AuthMethodTerminal
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for AuthMethodTerminal
impl PartialEq for AuthMethodTerminal
Source§impl Serialize for AuthMethodTerminal
impl Serialize for AuthMethodTerminal
impl StructuralPartialEq for AuthMethodTerminal
Auto Trait Implementations§
impl Freeze for AuthMethodTerminal
impl RefUnwindSafe for AuthMethodTerminal
impl Send for AuthMethodTerminal
impl Sync for AuthMethodTerminal
impl Unpin for AuthMethodTerminal
impl UnsafeUnpin for AuthMethodTerminal
impl UnwindSafe for AuthMethodTerminal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.