mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-26 05:50:56 -07:00
Merge remote-tracking branch 'origin/main' into fix/ux-over-eager-slash-completion
This commit is contained in:
@@ -617,7 +617,7 @@ kind: remote
|
||||
name: oauth2-agent
|
||||
agent_card_url: https://example.com/card
|
||||
auth:
|
||||
type: oauth2
|
||||
type: oauth
|
||||
client_id: $MY_OAUTH_CLIENT_ID
|
||||
scopes:
|
||||
- read
|
||||
@@ -630,7 +630,7 @@ auth:
|
||||
kind: 'remote',
|
||||
name: 'oauth2-agent',
|
||||
auth: {
|
||||
type: 'oauth2',
|
||||
type: 'oauth',
|
||||
client_id: '$MY_OAUTH_CLIENT_ID',
|
||||
scopes: ['read', 'write'],
|
||||
},
|
||||
@@ -643,7 +643,7 @@ kind: remote
|
||||
name: oauth2-full-agent
|
||||
agent_card_url: https://example.com/card
|
||||
auth:
|
||||
type: oauth2
|
||||
type: oauth
|
||||
client_id: my-client-id
|
||||
client_secret: my-client-secret
|
||||
scopes:
|
||||
@@ -659,7 +659,7 @@ auth:
|
||||
kind: 'remote',
|
||||
name: 'oauth2-full-agent',
|
||||
auth: {
|
||||
type: 'oauth2',
|
||||
type: 'oauth',
|
||||
client_id: 'my-client-id',
|
||||
client_secret: 'my-client-secret',
|
||||
scopes: ['openid', 'profile'],
|
||||
@@ -675,7 +675,7 @@ kind: remote
|
||||
name: oauth2-minimal-agent
|
||||
agent_card_url: https://example.com/card
|
||||
auth:
|
||||
type: oauth2
|
||||
type: oauth
|
||||
---
|
||||
`);
|
||||
const result = await parseAgentMarkdown(filePath);
|
||||
@@ -684,7 +684,7 @@ auth:
|
||||
kind: 'remote',
|
||||
name: 'oauth2-minimal-agent',
|
||||
auth: {
|
||||
type: 'oauth2',
|
||||
type: 'oauth',
|
||||
},
|
||||
});
|
||||
});
|
||||
@@ -695,7 +695,7 @@ kind: remote
|
||||
name: invalid-oauth2-agent
|
||||
agent_card_url: https://example.com/card
|
||||
auth:
|
||||
type: oauth2
|
||||
type: oauth
|
||||
client_id: my-client
|
||||
authorization_url: not-a-valid-url
|
||||
---
|
||||
@@ -709,7 +709,7 @@ kind: remote
|
||||
name: invalid-oauth2-agent
|
||||
agent_card_url: https://example.com/card
|
||||
auth:
|
||||
type: oauth2
|
||||
type: oauth
|
||||
client_id: my-client
|
||||
token_url: not-a-valid-url
|
||||
---
|
||||
@@ -723,7 +723,7 @@ auth:
|
||||
name: 'oauth2-convert-agent',
|
||||
agent_card_url: 'https://example.com/card',
|
||||
auth: {
|
||||
type: 'oauth2' as const,
|
||||
type: 'oauth' as const,
|
||||
client_id: '$MY_CLIENT_ID',
|
||||
scopes: ['read'],
|
||||
authorization_url: 'https://auth.example.com/authorize',
|
||||
|
||||
@@ -63,7 +63,7 @@ interface FrontmatterLocalAgentDefinition
|
||||
* Authentication configuration for remote agents in frontmatter format.
|
||||
*/
|
||||
interface FrontmatterAuthConfig {
|
||||
type: 'apiKey' | 'http' | 'google-credentials' | 'oauth2';
|
||||
type: 'apiKey' | 'http' | 'google-credentials' | 'oauth';
|
||||
// API Key
|
||||
key?: string;
|
||||
name?: string;
|
||||
@@ -205,7 +205,7 @@ const googleCredentialsAuthSchema = z.object({
|
||||
*/
|
||||
const oauth2AuthSchema = z.object({
|
||||
...baseAuthFields,
|
||||
type: z.literal('oauth2'),
|
||||
type: z.literal('oauth'),
|
||||
client_id: z.string().optional(),
|
||||
client_secret: z.string().optional(),
|
||||
scopes: z.array(z.string()).optional(),
|
||||
@@ -471,7 +471,7 @@ function convertFrontmatterAuthToConfig(
|
||||
}
|
||||
}
|
||||
|
||||
case 'oauth2':
|
||||
case 'oauth':
|
||||
return {
|
||||
...base,
|
||||
type: 'oauth2',
|
||||
|
||||
Reference in New Issue
Block a user