Skip to content

feat: convert bugsnag tools to typesafetools#388

Open
sazap10 wants to merge 3 commits intomainfrom
typesafetool_bugsnag
Open

feat: convert bugsnag tools to typesafetools#388
sazap10 wants to merge 3 commits intomainfrom
typesafetool_bugsnag

Conversation

@sazap10
Copy link
Contributor

@sazap10 sazap10 commented Mar 24, 2026

Goal

Move bugsnag tools to use TypeSafeTool class from #368. No functional changes

@sazap10 sazap10 requested a review from domarmstrong March 24, 2026 14:16
@sazap10 sazap10 requested review from a team as code owners March 24, 2026 14:16
@github-actions
Copy link
Contributor

github-actions bot commented Mar 24, 2026

🎯 Coverage Target Met!

📈 Coverage Metrics

Metric Coverage Target Status
Lines 93.5% 80%
Functions 84.5% 80%
Branches 86.7% 80%
Statements 93.5% 80%

📊 Test Statistics

  • Total Lines: 20,580 / 22,011
  • Total Functions: 284 / 336
  • Total Branches: 941 / 1085
  • Total Statements: 20580 / 22011

🔍 Files Needing Coverage

File Coverage
src/reflect/prompt/sap-test.ts 9.5%
src/qmetry/client/testsuite.ts 10.3%
src/common/prompts.ts 16.7%
src/qmetry/client/issues.ts 20.1%
src/swagger/client/api.ts 30.0%

📝 Report generated on Node.js v24.13.1 • View workflow • Coverage by Vitest + v8

Copy link
Contributor

@domarmstrong domarmstrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I wasn't quite ready to put it up for review as I was planning on revisiting the API for the tools. But it's probably worth going ahead with and I can revisit after.

Comment on lines +57 to +58
(client: BugsnagClient) => async (args, _extra) => {
const params = args;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either rename the usages to args or rename the arg to params. Same for all the tools

Suggested change
(client: BugsnagClient) => async (args, _extra) => {
const params = args;
(client: BugsnagClient) => async (params, _extra) => {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated across the tools

* type Output = typeof myTool.output; // typeof result
* ```
*/
export class TypesafeTool<
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this gets merged it would then we worth following up with all the other tools, removing the Tool class and renaming this to Tool.

@domarmstrong
Copy link
Contributor

#391

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants