File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -379,6 +379,22 @@ impl AuthMethod {
379379 Self :: Terminal ( t) => t. description . as_deref ( ) ,
380380 }
381381 }
382+
383+ /// The _meta property is reserved by ACP to allow clients and agents to attach additional
384+ /// metadata to their interactions. Implementations MUST NOT make assumptions about values at
385+ /// these keys.
386+ ///
387+ /// See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
388+ #[ must_use]
389+ pub fn meta ( & self ) -> Option < & Meta > {
390+ match self {
391+ Self :: Agent ( a) => a. meta . as_ref ( ) ,
392+ #[ cfg( feature = "unstable_auth_methods" ) ]
393+ Self :: EnvVar ( e) => e. meta . as_ref ( ) ,
394+ #[ cfg( feature = "unstable_auth_methods" ) ]
395+ Self :: Terminal ( t) => t. meta . as_ref ( ) ,
396+ }
397+ }
382398}
383399
384400/// Agent handles authentication itself.
You can’t perform that action at this time.
0 commit comments