fix: resolve remaining AI validation integration test failures

- Simplified Calculator and Think tool validators (no toolDescription required - built-in descriptions)
- Fixed trigger counting to exclude respondToWebhook from trigger detection
- Fixed streaming error filters to use correct error code access pattern (details.code || code)

This resolves 9 remaining integration test failures from Phase 2 AI validation implementation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2025-10-07 08:26:24 +02:00
parent ec9d8fdb7e
commit 5e2a6bdb9c
5 changed files with 22 additions and 50 deletions

View File

@@ -409,48 +409,16 @@ export function validateMCPClientTool(node: WorkflowNode): ValidationIssue[] {
export function validateCalculatorTool(node: WorkflowNode): ValidationIssue[] {
const issues: ValidationIssue[] = [];
// Check toolDescription (REQUIRED)
if (!node.parameters.toolDescription) {
issues.push({
severity: 'error',
nodeId: node.id,
nodeName: node.name,
message: `Calculator Tool "${node.name}" has no toolDescription. Add one to help the LLM know when to use this tool.`,
code: 'MISSING_TOOL_DESCRIPTION'
});
} else if (node.parameters.toolDescription.trim().length < MIN_DESCRIPTION_LENGTH_SHORT) {
issues.push({
severity: 'info',
nodeId: node.id,
nodeName: node.name,
message: `Calculator Tool "${node.name}" has a very short toolDescription (minimum ${MIN_DESCRIPTION_LENGTH_SHORT} characters). Consider being more specific about when to use it.`
});
}
// Calculator Tool has a built-in description and is self-explanatory
// toolDescription is optional - no validation needed
return issues;
}
export function validateThinkTool(node: WorkflowNode): ValidationIssue[] {
const issues: ValidationIssue[] = [];
// Check toolDescription (REQUIRED)
if (!node.parameters.toolDescription) {
issues.push({
severity: 'error',
nodeId: node.id,
nodeName: node.name,
message: `Think Tool "${node.name}" has no toolDescription. Add one to help the LLM know when to use thinking.`,
code: 'MISSING_TOOL_DESCRIPTION'
});
} else if (node.parameters.toolDescription.trim().length < MIN_DESCRIPTION_LENGTH_MEDIUM) {
issues.push({
severity: 'info',
nodeId: node.id,
nodeName: node.name,
message: `Think Tool "${node.name}" has a very short toolDescription (minimum ${MIN_DESCRIPTION_LENGTH_MEDIUM} characters). Explain when the agent should use thinking vs. action.`
});
}
// Think Tool has a built-in description and is self-explanatory
// toolDescription is optional - no validation needed
return issues;
}