Skip to content

Commit 00a39b3

Browse files
authored
refactor: remove agent_card_requires_auth config flag (#21914)
1 parent 077c1a1 commit 00a39b3

File tree

3 files changed

+4
-30
lines changed

3 files changed

+4
-30
lines changed

packages/core/src/agents/agentLoader.test.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -557,26 +557,6 @@ auth:
557557
});
558558
});
559559

560-
it('should parse auth with agent_card_requires_auth flag', async () => {
561-
const filePath = await writeAgentMarkdown(`---
562-
kind: remote
563-
name: protected-card-agent
564-
agent_card_url: https://example.com/card
565-
auth:
566-
type: apiKey
567-
key: $MY_API_KEY
568-
agent_card_requires_auth: true
569-
---
570-
`);
571-
const result = await parseAgentMarkdown(filePath);
572-
expect(result[0]).toMatchObject({
573-
auth: {
574-
type: 'apiKey',
575-
agent_card_requires_auth: true,
576-
},
577-
});
578-
});
579-
580560
it('should parse remote agent with oauth2 auth', async () => {
581561
const filePath = await writeAgentMarkdown(`---
582562
kind: remote

packages/core/src/agents/agentLoader.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ interface FrontmatterLocalAgentDefinition
4545
*/
4646
interface FrontmatterAuthConfig {
4747
type: 'apiKey' | 'http' | 'oauth2';
48-
agent_card_requires_auth?: boolean;
4948
// API Key
5049
key?: string;
5150
name?: string;
@@ -123,9 +122,7 @@ const localAgentSchema = z
123122
/**
124123
* Base fields shared by all auth configs.
125124
*/
126-
const baseAuthFields = {
127-
agent_card_requires_auth: z.boolean().optional(),
128-
};
125+
const baseAuthFields = {};
129126

130127
/**
131128
* API Key auth schema.
@@ -356,9 +353,7 @@ export async function parseAgentMarkdown(
356353
function convertFrontmatterAuthToConfig(
357354
frontmatter: FrontmatterAuthConfig,
358355
): A2AAuthConfig {
359-
const base = {
360-
agent_card_requires_auth: frontmatter.agent_card_requires_auth,
361-
};
356+
const base = {};
362357

363358
switch (frontmatter.type) {
364359
case 'apiKey':

packages/core/src/agents/auth-provider/types.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ export interface A2AAuthProvider extends AuthenticationHandler {
2424
initialize?(): Promise<void>;
2525
}
2626

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

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

0 commit comments

Comments
 (0)