feat: for_vantor factory and Vantor Open Data tools#61
Merged
Conversation
Adds a new for_vantor agent factory and a vantor tools module that expose the QGIS Vantor plugin's public Open Data STAC catalog: list events, search items, display footprints, and load COG imagery, with confirmation gating on actions that mutate the QGIS project.
|
🚀 Deployed on https://69f42e1dccc44405557cf191--opengeos.netlify.app |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a dedicated Vantor integration to GeoAgent, enabling QGIS workflows against the Vantor Open Data static STAC catalog (event discovery, item search, footprints, COG loading, and opening the Vantor panel), plus wiring and test/docs updates across the QGIS plugin integration.
Changes:
- Introduces
geoagent.tools.vantorwith Vantor Open Data STAC browsing/search + QGIS display tools. - Adds
for_vantor(...)factory and wiresinclude_vantorthrough tool assembly and permission gating. - Updates OpenGeoAgent QGIS chat dock to expose “Vantor” mode and adds/updates tests and documentation.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_vantor_tools.py | New unit tests for vantor_tools behavior and for_vantor factory wiring. |
| qgis_geoagent/tests/test_whitebox_integration.py | Extends integration wiring tests to cover Vantor agent mode factory routing. |
| qgis_geoagent/tests/test_chat_tool_inputs.py | Adds tests asserting Vantor mode availability and permission filtering behavior. |
| qgis_geoagent/open_geoagent/dialogs/chat_dock.py | Adds “Vantor” agent mode, workflow prompts, permission category handling, and tool availability wiring. |
| geoagent/tools/vantor.py | New Vantor tool implementation: STAC catalog fetch/parse, filtering, footprints GeoJSON creation, COG loading, and panel open. |
| geoagent/tools/init.py | Exports vantor_tools from the tools package. |
| geoagent/core/factory.py | Adds VANTOR_SYSTEM_PROMPT, include_vantor plumbing in assemble_tools, and for_vantor(...) factory. |
| geoagent/init.py | Re-exports for_vantor at the package root. |
| docs/tools.md | Documents for_vantor and the exposed Vantor tool surface. |
| README.md | Adds a Vantor Open Data section describing usage and confirmation gating. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Enforce HTTPS in `_fetch_json` and reject non-HTTPS schemes in `_resolve_href` so a malicious or compromised Vantor catalog cannot trigger local file reads or unexpected protocol access. - Drop the always-`collection.json` `os.path.basename` comparison in `_resolve_event_href` and cache `_catalog_events()` in a local so event resolution does not double-fetch the root catalog. - Narrow `_fetch_items` exception handling to URLError/JSONDecodeError/ValueError, count failures, and surface `fetch_failures` and `last_fetch_error` in `search_vantor_items` results so partial fetches are visible. - Use a unique `uuid4`-suffixed temp filename for footprint GeoJSON to avoid clobbering or racing concurrent runs. - Fall back to `os.path.basename(href)` when a Vantor item has no id so layers are not named "None".
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_vantor(iface, project=None, plugin=None)factory and a Vantor tools module exposing the QGIS Vantor plugin's public Open Data STAC catalog (event listing, item search, footprint display, COG loading, panel open).assemble_toolsand_permission_allows_tool, gating layer mutations behind user confirmation.docs/tools.mdwith usage notes and add tests intests/test_vantor_tools.pyplus QGIS chat dock and integration test updates.Test plan
pytest tests/ -qpre-commit run --all-filesfor_vantorin a QGIS session, list events, search items, and confirm footprint and COG layers appear after confirmation.