feat: add HyperCoast hyperspectral tools#98
Merged
Conversation
Adds a `for_hypercoast` agent factory that exposes HyperCoast search, download, and visualization tools for EMIT and PACE hyperspectral data, along with a system prompt tailored to ocean color and reflectance workflows. Wires the integration into the QGIS chat dock and adds tests for the new tool module.
|
🚀 Deployed on https://6a03eee81c4e606033e5621e--opengeos.netlify.app |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new “HyperCoast” workflow mode to GeoAgent/QGIS, adding a dedicated agent factory + system prompt and a new tool surface to search, download, and visualize hyperspectral datasets (EMIT, PACE OCI), along with corresponding tests and QGIS chat-dock wiring.
Changes:
- Added
for_hypercoastagent factory andHYPERCOAST_SYSTEM_PROMPT, plus tool assembly wiring to include HyperCoast tools and excludeadd_raster_layerin this mode. - Implemented
geoagent/tools/hypercoast.pywith search (HyperCoast/earthaccess/CMR), footprint display, downloads, dataset preview, and visualization loaders. - Updated QGIS chat dock + tests to expose the new agent mode and improve error unwrapping/reporting.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_hypercoast_tools.py |
Adds unit tests for HyperCoast tool behaviors, fallbacks, and factory integration. |
qgis_geoagent/tests/test_chat_tool_inputs.py |
Adds coverage for new error-unwrapping behavior and HyperCoast mode availability/permissions. |
qgis_geoagent/open_geoagent/dialogs/chat_dock.py |
Adds HyperCoast agent mode prompt wiring, exception unwrapping, and tool availability toggles. |
geoagent/tools/hypercoast.py |
New HyperCoast tool implementation for search/download/preview/load workflows with QGIS-safe lazy imports. |
geoagent/tools/__init__.py |
Exports hypercoast_tools from the tools package. |
geoagent/core/factory.py |
Adds HyperCoast system prompt + for_hypercoast factory; wires HyperCoast tool assembly and excludes add_raster_layer in HyperCoast mode. |
geoagent/__init__.py |
Exposes for_hypercoast at package top level. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Restore DEFAULT_PERMISSION_PROFILE to "Inspect only" so chat sessions
do not auto-approve destructive or long-running tools by default.
- Make the streaming ReadError/RemoteProtocolError attribution generic
("OpenGeoAgent tools were not the source") instead of hardcoding
HyperCoast, which was misleading for other agent modes.
- Replace the broad sys.modules purge of geoagent.* on factory-miss with
a targeted importlib.reload of geoagent.core.factory and geoagent, so
shared module state and other importers are not invalidated.
- Reject non-HTTPS URLs in _is_data_download_url (and double-check the
scheme before opening in _download_data_links) to keep file:// and
http:// targets out of the downloader.
- Place mkstemp output files under ~/.qgis_hypercoast/cache by passing
dir=cache_dir, and accept a suffix argument on _ensure_output_path so
load_hypercoast_variable produces variable-tagged paths instead of
reusing the "rgb" tag.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
for_hypercoastagent factory and a dedicated system prompt for HyperCoast workflows (EMIT, PACE OCI).geoagent/tools/hypercoast.pycovering search, download, footprint display, and RGB/variable visualization, and wire it into the QGIS chat dock.tests/test_hypercoast_tools.pyplus expanded coverage inqgis_geoagent/tests/test_chat_tool_inputs.py.Test plan
pytest tests/ -qpre-commit run --all-files