Skip to content

Update auth method terminal#863

Closed
anaslimem wants to merge 3 commits intoagentclientprotocol:mainfrom
anaslimem:update-auth-method-terminal
Closed

Update auth method terminal#863
anaslimem wants to merge 3 commits intoagentclientprotocol:mainfrom
anaslimem:update-auth-method-terminal

Conversation

@anaslimem
Copy link
Copy Markdown
Contributor

Summary

Change AuthMethodTerminal.env from HashMap<String, String> to Vec<EnvVariable> for consistency with McpServerStdio.env.

Changes

Code Changes (src/agent.rs)

  • Changed AuthMethodTerminal.env field type from HashMap<String, String> to Vec<EnvVariable>
  • Updated builder method to accept Vec<EnvVariable>
  • Removed unused HashMap import
  • Updated test to use new EnvVariable struct

Documentation Updates

  • docs/rfds/auth-methods.mdx: Updated JSON example and field description
  • docs/protocol/draft/schema.mdx: Updated env type from object to EnvVariable[]

Before vs After

Code

// Before
pub env: HashMap<String, String>

// After  
pub env: Vec<EnvVariable>

@anaslimem anaslimem requested a review from a team as a code owner March 27, 2026 15:19
@benbrandt
Copy link
Copy Markdown
Member

Good point, likely left over from early auth method experiments.
The problem is we have some large clients in use requiring the current serialization method. We are working on hardening this up for unstable things in the future. But I am not sure this is worth it. We can clean up in the v2 implementation if necessaryu

@benbrandt benbrandt closed this Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants