Skip to content

Commit 30d237e

Browse files
committed
fix typecheck
1 parent a259dfa commit 30d237e

File tree

3 files changed

+1
-271
lines changed

3 files changed

+1
-271
lines changed

backend/src/__tests__/parent-instructions.test.ts

Lines changed: 0 additions & 231 deletions
This file was deleted.

common/src/__tests__/dynamic-agent-template-schema.test.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -252,25 +252,6 @@ describe('DynamicAgentConfigSchema', () => {
252252
})
253253
})
254254

255-
it('should accept template with any parentInstructions agent ID at schema level', () => {
256-
const template = {
257-
...validBaseTemplate,
258-
parentInstructions: {
259-
invalid_agent_id: 'Some instruction',
260-
custom_agent: 'Another instruction',
261-
},
262-
}
263-
264-
const result = DynamicAgentConfigSchema.safeParse(template)
265-
expect(result.success).toBe(true)
266-
if (result.success) {
267-
expect(result.data.parentInstructions).toEqual({
268-
invalid_agent_id: 'Some instruction',
269-
custom_agent: 'Another instruction',
270-
})
271-
}
272-
})
273-
274255
it('should reject template with outputMode json but missing set_output tool', () => {
275256
const template = {
276257
...validBaseTemplate,

common/src/templates/agent-validation.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
import { convertJsonSchemaToZod } from 'zod-from-json-schema'
22

3+
import { normalizeAgentNames } from '../util/agent-name-normalization'
34
import {
4-
formatParentInstructionsError,
55
formatSubagentError,
6-
validateParentInstructions,
76
validateSubagents,
87
} from '../util/agent-template-validation'
9-
10-
import { normalizeAgentNames } from '../util/agent-name-normalization'
118
import { logger } from '../util/logger'
129

1310
import type { ToolName } from '../tools/constants'
@@ -176,23 +173,6 @@ export function validateSingleAgent(
176173
}
177174
}
178175

179-
// Validate parent instructions if they exist
180-
if (template.parentInstructions) {
181-
const parentInstructionsValidation = validateParentInstructions(
182-
template.parentInstructions,
183-
dynamicAgentIds,
184-
)
185-
if (!parentInstructionsValidation.valid) {
186-
return {
187-
success: false,
188-
error: formatParentInstructionsError(
189-
parentInstructionsValidation.invalidAgents,
190-
parentInstructionsValidation.availableAgents,
191-
),
192-
}
193-
}
194-
}
195-
196176
const validatedSubagents = normalizeAgentNames(
197177
template.subagents,
198178
) as AgentTemplateType[]

0 commit comments

Comments
 (0)