Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions packages/core/src/agents/agentLoader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,26 +557,6 @@ auth:
});
});

it('should parse auth with agent_card_requires_auth flag', async () => {
const filePath = await writeAgentMarkdown(`---
kind: remote
name: protected-card-agent
agent_card_url: https://example.com/card
auth:
type: apiKey
key: $MY_API_KEY
agent_card_requires_auth: true
---
`);
const result = await parseAgentMarkdown(filePath);
expect(result[0]).toMatchObject({
auth: {
type: 'apiKey',
agent_card_requires_auth: true,
},
});
});

it('should parse remote agent with oauth2 auth', async () => {
const filePath = await writeAgentMarkdown(`---
kind: remote
Expand Down
9 changes: 2 additions & 7 deletions packages/core/src/agents/agentLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ interface FrontmatterLocalAgentDefinition
*/
interface FrontmatterAuthConfig {
type: 'apiKey' | 'http' | 'oauth2';
agent_card_requires_auth?: boolean;
// API Key
key?: string;
name?: string;
Expand Down Expand Up @@ -123,9 +122,7 @@ const localAgentSchema = z
/**
* Base fields shared by all auth configs.
*/
const baseAuthFields = {
agent_card_requires_auth: z.boolean().optional(),
};
const baseAuthFields = {};

/**
* API Key auth schema.
Expand Down Expand Up @@ -356,9 +353,7 @@ export async function parseAgentMarkdown(
function convertFrontmatterAuthToConfig(
frontmatter: FrontmatterAuthConfig,
): A2AAuthConfig {
const base = {
agent_card_requires_auth: frontmatter.agent_card_requires_auth,
};
const base = {};

switch (frontmatter.type) {
case 'apiKey':
Expand Down
5 changes: 2 additions & 3 deletions packages/core/src/agents/auth-provider/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ export interface A2AAuthProvider extends AuthenticationHandler {
initialize?(): Promise<void>;
}

export interface BaseAuthConfig {
agent_card_requires_auth?: boolean;
}
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface BaseAuthConfig {}

/** Client config for google-credentials (not in A2A spec, Gemini-specific). */
export interface GoogleCredentialsAuthConfig extends BaseAuthConfig {
Expand Down
Loading