Skip to content

Conversation

@serhalp
Copy link
Member

@serhalp serhalp commented Jan 27, 2026

This submission improves the type safety of the http-agent module by removing a custom, error-prone class and replacing it with the correct, modern usage of the https-proxy-agent library. The changes include refactoring function signatures, using discriminated unions for return types, and updating call-sites and tests to align with the new implementation.


PR created automatically by Jules for task 6124655028326514442 started by @serhalp

Refactored `src/lib/http-agent.ts` to improve type safety and remove `@ts-expect-error` suppressions.

- Replaced the custom `HttpsProxyAgentWithCA` class with the correct usage of the `https-proxy-agent` library.
- Improved function signatures and return types using discriminated unions (`Success | Failure`) for safer and more predictable code.
- Updated the call-site in `src/commands/base-command.ts` to correctly handle the `HttpsProxyAgent` type.
- Aligned the unit tests in `tests/unit/lib/http-agent.test.ts` with the new implementation.

Co-authored-by: serhalp <1377702+serhalp@users.noreply.github.com>
@serhalp serhalp requested a review from a team as a code owner January 27, 2026 16:14
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions
Copy link

📊 Benchmark results

Comparing with c090425

  • Dependency count: 1,055 (no change)
  • Package size: 317 MB (no change)
  • Number of ts-expect-error directives: 357 ⬇️ 2.52% decrease vs. c090425

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