feat: STAC catalog tools and for_stac factory#60
Merged
Conversation
Adds a STAC tool surface (catalog search, asset selection, QGIS loading) exposed via a new for_stac factory, an example notebook, and tests. Also expands QGIS tool coverage and refreshes the QGIS plugin chat/settings docks and dependency manager.
|
🚀 Deployed on https://69f42175677312eb6a54e242--opengeos.netlify.app |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a first-class STAC workflow to GeoAgent (search → asset selection → QGIS load), wires it through a new for_stac factory, and updates the QGIS plugin to expose STAC mode plus workflow-aware dependency installation.
Changes:
- Implement STAC tools (
list_stac_collections,search_stac_items,get_stac_item_assets,add_stac_asset_to_qgis) and afor_stacfactory with a dedicated system prompt. - Expand QGIS tooling for rasters (raster palettes, remote-COG-safe range estimation) and add
create_hillshade_layer. - Update the QGIS plugin UX and dependency installer to support workflow dependency groups + add tests and a runnable STAC notebook.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_stac_tools.py |
Adds unit coverage for new STAC tool surface and for_stac wiring. |
tests/test_qgis_tools.py |
Extends QGIS tool tests for raster palettes and create_hillshade_layer. |
tests/__init__.py |
Removes test package init file. |
qgis_geoagent/tests/test_whitebox_integration.py |
Updates plugin integration tests for new dependency grouping and STAC factory mode. |
qgis_geoagent/tests/test_startup_performance.py |
Adjusts startup dependency checks to core-runtime-only and validates grouped optional dependencies. |
qgis_geoagent/tests/test_chat_tool_inputs.py |
Verifies STAC URL formatting and STAC tool-call script generation; asserts new default permission profile. |
qgis_geoagent/tests/conftest.py |
Ensures plugin root is on sys.path for test imports. |
qgis_geoagent/tests/__init__.py |
Removes test package init file. |
qgis_geoagent/open_geoagent/metadata.txt |
Updates plugin metadata to mention workflow dependency status + STAC mode + Python >= 3.11. |
qgis_geoagent/open_geoagent/dialogs/settings_dock.py |
Adds dependency-group selector, grouped status UI, and diagnostics additions (GeoAgent version + per-group checks). |
qgis_geoagent/open_geoagent/dialogs/chat_dock.py |
Adds STAC transcript URL section, STAC “copy script” snippet generation, tool availability UI, and changes permission profile defaults/behavior. |
qgis_geoagent/open_geoagent/deps_manager.py |
Introduces dependency groups, core runtime package set, and Python runtime gating for installer. |
qgis_geoagent/README.md |
Documents workflow-specific dependency installation and STAC capabilities. |
pyproject.toml |
Configures pytest to discover both core and plugin tests. |
geoagent/tools/stac.py |
Implements STAC tools and QGIS raster loading helpers (including background-task loading when available). |
geoagent/tools/qgis.py |
Adds raster palette support, remote-COG-safe behavior, and create_hillshade_layer. |
geoagent/tools/__init__.py |
Exports stac_tools. |
geoagent/core/prompts.py |
Updates system prompts to mention hillshade and raster palette behavior. |
geoagent/core/factory.py |
Adds STAC system prompt, include_stac wiring, tool exclusion by name, and for_stac factory. |
geoagent/__init__.py |
Exports for_stac. |
examples/README.md |
Links the new STAC workflow notebook and install extras. |
docs/qgis-plugin.md |
Documents STAC mode, dependency sets, and trusted auto-approve behavior. |
docs/examples/stac_workflow.ipynb |
Adds an end-to-end runnable example using mock QGIS + Planetary Computer STAC. |
README.md |
Documents the new for_stac factory and STAC notebook. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Validate the active layer is a raster in create_hillshade_layer before passing it to GDAL DEMProcessing, raising a clear ValueError otherwise. - Stop returning the source-CRS extent under the WGS84 bbox key when _canvas_extent_to_wgs84_bbox fails to transform; return bbox=None and surface the original extent under source_bbox/source_crs so callers cannot mistake the result for a STAC-ready bbox. - Revert DEFAULT_PERMISSION_PROFILE to "Inspect only" so the plugin no longer auto-approves confirmation-gated tools out of the box. - Drop the ChatWorker override that forced auto_approve_tools=True for the trusted profile so the explicit flag from the UI is respected. - Redact bearer-like query parameters (SAS sigs, tokens, signatures) from STAC asset URLs printed in the transcript and add a leakage warning so signed Planetary Computer URLs are no longer copied verbatim into chat logs.
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_stacfactory.docs/examples/stac_workflow.ipynbexample andtests/test_stac_tools.pycovering the new tool surface.Test plan
pre-commit run --all-filespytest tests/ -qdocs/examples/stac_workflow.ipynbend to end.