koog icon indicating copy to clipboard operation
koog copied to clipboard

Remove `ToolArgs` and `ToolResult`.

Open nomisRev opened this issue 4 months ago • 0 comments

Motivation and Context

Proposal for KG-270 Remove ToolArgs, and ToolResult. By removing ToolArgs and ToolResult we can more freely model tools, and we can improve support tools by deriving ToolDescription from KSerializer<A> .

This also allows ProvideSubgraphResult to be completely transparent to the user and automatically derived from KSerializer.

Breaking Changes

Tool<A, B> now requires defining override val resultSerializer: KSerializer<A>. Binary breaking was kept to a minimum by leveraging @Depracated and ReplaceWith.


Type of the changes

  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Documentation update
  • [ ] Tests improvement
  • [x] Refactoring

Checklist

  • [x] The pull request has a description of the proposed change
  • [x] I read the Contributing Guidelines before opening the pull request
  • [x] The pull request uses develop as the base branch
  • [x] Tests for the changes have been added
  • [ ] All new and existing tests passed
Additional steps for pull requests adding a new feature
  • [x] An issue describing the proposed change exists
  • [x] The pull request includes a link to the issue
  • [ ] The change was discussed and approved in the issue (Discussed with @Ololoshechkin on JetBrains Slack)
  • [ ] Docs have been added / updated

nomisRev avatar Aug 25 '25 07:08 nomisRev