[PR #4396] [MERGED] feat: hoppscotch agent and agent interceptor #4785

Closed
opened 2026-03-17 02:17:19 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4396
Author: @AndrewBastin
Created: 10/1/2024
Status: Merged
Merged: 10/3/2024
Merged by: @jamesgeorge007

Base: nextHead: feat/agent


📝 Commits (10+)

  • 07678be feat: hoppscotch-interceptor init
  • 6381275 fix: avoid clone in favor of renaming
  • e5632b4 misc: add todo notes
  • 9d7c36f feat: typed registration key
  • e93c5bb feat: use dashmap for concurrent hasmap
  • ca87c27 fix: avoid creating duplicate auth_key
  • 4ae8b31 perf: launch server process inside tauri app
  • c1b2263 refactor: flatten directory structure
  • b4c673c feat: graceful-shutdown to avoid leaking server connections
  • 5d91085 feat|wip: generate otp with tauri command

📊 Changes

106 files changed (+14622 additions, -595 deletions)

View changed files

packages/hoppscotch-agent/.envrc (+3 -0)
packages/hoppscotch-agent/.gitignore (+33 -0)
packages/hoppscotch-agent/README.md (+16 -0)
packages/hoppscotch-agent/devenv.lock (+161 -0)
packages/hoppscotch-agent/devenv.nix (+94 -0)
packages/hoppscotch-agent/devenv.yaml (+23 -0)
packages/hoppscotch-agent/index.html (+13 -0)
packages/hoppscotch-agent/package.json (+34 -0)
packages/hoppscotch-agent/pnpm-lock.yaml (+2952 -0)
packages/hoppscotch-agent/postcss.config.js (+6 -0)
packages/hoppscotch-agent/public/tauri.svg (+6 -0)
packages/hoppscotch-agent/public/vite.svg (+1 -0)
packages/hoppscotch-agent/src-tauri/.gitignore (+7 -0)
packages/hoppscotch-agent/src-tauri/Cargo.lock (+6070 -0)
packages/hoppscotch-agent/src-tauri/Cargo.toml (+49 -0)
packages/hoppscotch-agent/src-tauri/build.rs (+5 -0)
packages/hoppscotch-agent/src-tauri/capabilities/default.json (+13 -0)
packages/hoppscotch-agent/src-tauri/icons/128x128.png (+0 -0)
packages/hoppscotch-agent/src-tauri/icons/128x128@2x.png (+0 -0)
packages/hoppscotch-agent/src-tauri/icons/32x32.png (+0 -0)

...and 80 more files

📄 Description

This PR intends to introduce a new Hoppscotch Interceptor along with the new Hoppscotch Agent app to power it.

The Hoppscotch Agent app is an installable native application that exposes a background HTTP Server that Hoppscotch web app can talk with to run requests against. This allows the Hoppscotch web apps (particularly the SH ones) have ability to run requests without restrictions and is meant to be a stopgap solution until SH gains support in the desktop app.

What's changed

Hoppscotch Common

  • Introduce UI Extension Service as a foundational service that allows additions to be added across various places in the app (currently as an extension to the root app component with feature additions possible).
  • [OFF TOPIC] Debug Service improvements to inject the services under the given ID directly into the window global context (i.e, instead of accessing WORKSPACE_SERVICE by running _getService("WORKSPACE_SERVICE"), you can directly just access it via WORKSPACE_SERVICE variable while debug service is on).
  • Introduce Agent Interceptor Service with the ability to communicate with the Hoppscotch Agent app and handle registrations.
  • Agent Registration UI to register the app against the agent.

Hoppscotch Agent

  • The agent has a registration UI that is automatically summoned when a client requests to connect with the agent.
  • The agent has a background service that shows up in the system tray that allows the user to see info and clear currently set registrations which reset the changes.
  • The agent registers itself against the OS for auto start along with the OS.
  • The agent and the app during the registration, establishes a shared secret (via Curve25519 Diffie-Hellman Key Exchange) and then communicates request information using the shared secret encrypted with AES-GCM algorithm.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4396 **Author:** [@AndrewBastin](https://github.com/AndrewBastin) **Created:** 10/1/2024 **Status:** ✅ Merged **Merged:** 10/3/2024 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `next` ← **Head:** `feat/agent` --- ### 📝 Commits (10+) - [`07678be`](https://github.com/hoppscotch/hoppscotch/commit/07678be2998b2bf68f0d488a71bd3f5ce9e6c3dc) feat: hoppscotch-interceptor init - [`6381275`](https://github.com/hoppscotch/hoppscotch/commit/63812750183266d62bbc08f8560b93fea77aecb3) fix: avoid clone in favor of renaming - [`e5632b4`](https://github.com/hoppscotch/hoppscotch/commit/e5632b46a2903e52b1bdf04d0b340a1004395690) misc: add todo notes - [`9d7c36f`](https://github.com/hoppscotch/hoppscotch/commit/9d7c36f5a3b9ef8bab1b4c957192a773a5897070) feat: typed registration key - [`e93c5bb`](https://github.com/hoppscotch/hoppscotch/commit/e93c5bbd0b3cec54d8b741041df5ab7af32b3935) feat: use `dashmap` for concurrent hasmap - [`ca87c27`](https://github.com/hoppscotch/hoppscotch/commit/ca87c27202b05ce81091393626da119c474f7e52) fix: avoid creating duplicate `auth_key` - [`4ae8b31`](https://github.com/hoppscotch/hoppscotch/commit/4ae8b316046d93940e74802329da5d77d0bec8fd) perf: launch server process inside tauri app - [`c1b2263`](https://github.com/hoppscotch/hoppscotch/commit/c1b2263aedddd13ef082c85c489d2558f78d70e8) refactor: flatten directory structure - [`b4c673c`](https://github.com/hoppscotch/hoppscotch/commit/b4c673c1ffb55a8311450554d66e3675cfd92519) feat: graceful-shutdown to avoid leaking server connections - [`5d91085`](https://github.com/hoppscotch/hoppscotch/commit/5d91085f4c0191eda05f382e91b28ae8ca980438) feat|wip: generate otp with tauri command ### 📊 Changes **106 files changed** (+14622 additions, -595 deletions) <details> <summary>View changed files</summary> ➕ `packages/hoppscotch-agent/.envrc` (+3 -0) ➕ `packages/hoppscotch-agent/.gitignore` (+33 -0) ➕ `packages/hoppscotch-agent/README.md` (+16 -0) ➕ `packages/hoppscotch-agent/devenv.lock` (+161 -0) ➕ `packages/hoppscotch-agent/devenv.nix` (+94 -0) ➕ `packages/hoppscotch-agent/devenv.yaml` (+23 -0) ➕ `packages/hoppscotch-agent/index.html` (+13 -0) ➕ `packages/hoppscotch-agent/package.json` (+34 -0) ➕ `packages/hoppscotch-agent/pnpm-lock.yaml` (+2952 -0) ➕ `packages/hoppscotch-agent/postcss.config.js` (+6 -0) ➕ `packages/hoppscotch-agent/public/tauri.svg` (+6 -0) ➕ `packages/hoppscotch-agent/public/vite.svg` (+1 -0) ➕ `packages/hoppscotch-agent/src-tauri/.gitignore` (+7 -0) ➕ `packages/hoppscotch-agent/src-tauri/Cargo.lock` (+6070 -0) ➕ `packages/hoppscotch-agent/src-tauri/Cargo.toml` (+49 -0) ➕ `packages/hoppscotch-agent/src-tauri/build.rs` (+5 -0) ➕ `packages/hoppscotch-agent/src-tauri/capabilities/default.json` (+13 -0) ➕ `packages/hoppscotch-agent/src-tauri/icons/128x128.png` (+0 -0) ➕ `packages/hoppscotch-agent/src-tauri/icons/128x128@2x.png` (+0 -0) ➕ `packages/hoppscotch-agent/src-tauri/icons/32x32.png` (+0 -0) _...and 80 more files_ </details> ### 📄 Description This PR intends to introduce a new Hoppscotch Interceptor along with the new Hoppscotch Agent app to power it. The Hoppscotch Agent app is an installable native application that exposes a background HTTP Server that Hoppscotch web app can talk with to run requests against. This allows the Hoppscotch web apps (particularly the SH ones) have ability to run requests without restrictions and is meant to be a stopgap solution until SH gains support in the desktop app. ### What's changed **Hoppscotch Common** - Introduce UI Extension Service as a foundational service that allows additions to be added across various places in the app (currently as an extension to the root app component with feature additions possible). - [OFF TOPIC] Debug Service improvements to inject the services under the given ID directly into the window global context (i.e, instead of accessing `WORKSPACE_SERVICE` by running `_getService("WORKSPACE_SERVICE")`, you can directly just access it via `WORKSPACE_SERVICE` variable while debug service is on). - Introduce Agent Interceptor Service with the ability to communicate with the Hoppscotch Agent app and handle registrations. - Agent Registration UI to register the app against the agent. **Hoppscotch Agent** - The agent has a registration UI that is automatically summoned when a client requests to connect with the agent. - The agent has a background service that shows up in the system tray that allows the user to see info and clear currently set registrations which reset the changes. - The agent registers itself against the OS for auto start along with the OS. - The agent and the app during the registration, establishes a shared secret (via Curve25519 Diffie-Hellman Key Exchange) and then communicates request information using the shared secret encrypted with AES-GCM algorithm. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:17:19 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4785
No description provided.