Changelog¶
All notable changes to the AI-Hydro VS Code extension are documented here. The companion Python package (aihydro-tools) has its own changelog at github.com/AI-Hydro/aihydro-tools.
[Unreleased]¶
[0.1.8] — 2026-05-09¶
Map — Multi-format loading, drag-and-drop, symbology editor¶
The map panel now supports 8 geospatial file formats that can be loaded by dragging files onto the map, clicking + Add Layer, or dropping into a file picker. Each format is handled by a lazy-loaded adapter so the bundle stays small for users who never use that format.
Supported formats¶
| Format | Extension(s) | Notes |
|---|---|---|
| GeoJSON | .geojson, .json | Native; also accepts raw Geometry types |
| TopoJSON | .topojson, .json | Converted via topojson-client |
| KML | .kml | Converted via @tmcw/togeojson |
| KMZ | .kmz | ZIP extracted via jszip, then KML converted |
| GPX | .gpx | Converted via @tmcw/togeojson |
| Shapefile | .zip | Zipped .shp + .dbf + .shx + .prj via shpjs |
| GeoTIFF | .tif, .tiff | Read via geotiff.js; rendered with viridis ramp; rejects non-WGS84 |
| CSV | .csv | Auto-detects lon/lat/longitude/latitude/x/y columns |
Drag-and-drop¶
- Drop any supported file directly onto the map — a blue dashed drop zone appears while dragging
- A
dragDepthRefcounter prevents falsedragLeaveevents from child elements - A result toast (bottom-centre) reports how many files loaded and any errors
Layer panel additions¶
+ Add Layer…button — opens a native file picker filtered to supported extensions; always visible, even when the panel is collapsed- Empty state — when no layers are present, a
🗺️placeholder lists supported formats so first-time users know what to do - Source badges — every layer row shows one of: 📁 workspace file · 🐍 Python tool output · 📥 user-loaded file · 📤 manually pushed
- Layer name disambiguation — when two layers share the same filename (e.g. two
watershed.geojsonfiles from different folders), the parent folder name is appended to distinguish them
Symbology editor¶
- Click a layer's colour swatch or the 🎨 icon to open an inline editor:
- Vector layers: fill colour + opacity slider, stroke colour + width slider
- Raster layers: colormap selector (viridis, plasma, inferno, magma, cividis, Greens, YlOrRd, RdBu) + opacity slider
- Changes applied immediately
[0.1.7] — 2026-05-08¶
Map — Panel redesign, status bar, basemap overhaul, workspace persistence¶
Resize fix¶
- ResizeObserver on the map container replaces
window.addEventListener("resize")— the map now reflows correctly when VS Code splits or resizes panels, not only on browser-window resize
Layer panel¶
- Always visible in collapsed state — a
📑 +icon button lets you add layers even after clearing everything - Drag-resize handle on the left edge; width clamped to 220–480 px
- Panel state (dock, width, section expand) persisted to
localStorage
Map status bar¶
- Scale bar using the Mercator formula:
156 543 × cos(lat) / 2^zoomm/px, displayed in km or m with a clean tick mark - Coordinate readout from pointer position (
45.4981°N, 69.6018°Wformat) - Styled with VS Code CSS variables (
--vscode-foreground,--vscode-editor-background) for full theme awareness
Basemap overhaul — 13 free basemaps, no API token¶
| Group | Basemaps |
|---|---|
| Hydrology-focused | USGS Imagery, USGS Topo, USGS Shaded Relief, Esri Hillshade, Esri Ocean |
| General purpose | Carto Voyager, Carto Dark, Carto Light, Stadia Terrain, Esri World Topo, Esri Satellite, Humanitarian (HOT) |
| Personal use only | ⚠️ OpenStreetMap (volunteer servers; disallows embedded app traffic) |
Mapbox dependency completely removed.
Workspace persistence¶
mapWorkspace.ts — localStorage key aihydro.map.workspace.v1 saves: active basemap, view state (centre + zoom), visible layer IDs, and panel layout.
[0.1.6] — 2026-05-05¶
Map — Python ↔ VS Code layer bridge¶
MapEventWatcher— TypeScript class polls~/.aihydro/map_events/every 600 ms; forwards events to the map panel viacontroller.addMapLayer(). Starts on extension activation; stops on disposedelineate_watershedauto-push — watershed boundary polygon + gauge station point pushed automatically after each delineation; map panel opens side-by-side if closedshow_on_mapMCP tool — push any GeoJSON to the map; accepts style presets (watershed,flowlines,gauge,default) and per-key overrides (fill_color,stroke_color,fill_opacity)compute_twiauto-push — pushesviridis_rraster tile astwi_<session_id>after TWI computationcreate_cn_gridauto-push — pushesYlOrRdtile ascn_<session_id>after CN grid generationBitmapLayerinMapView.tsx— raster layers routed through deck.glBitmapLayer; vector layers throughGeoJsonLayerplot_raster_tile()inanalysis/plots.py— renders a 2-D numpy array as a decoration-free PNG; NaN cells transparent; percentile clipping (P2–P98) prevents outlier wash-out_bounds_to_wgs84()— reprojects raster bounds from any CRS to EPSG:4326 via pyproj; falls back silently
[0.1.5] — 2026-04-18¶
Added¶
- Three-tier citation system — every tool call automatically accumulates BibTeX citations for the data sources it uses (USGS NWIS, NHDPlus, 3DEP, GridMET, NLCD, POLARIS, CAMELS-US, HBV).
sync_research_contextwrites a ready-to-usecitations.bibto the workspace;export_sessionembeds citations in every export format. Platform citations (AI-Hydro + aihydro-tools Zenodo DOIs) are always included. Plugin packages can register Tier 3 citations viaregister_plugin_citation().
Platform¶
- LLM interpretation layer —
research.mdnow has two sections: a Python-generated structural skeleton (always current) and an LLM-authored scientific context section written by the foundation model viasync_research_context. Deleted all template-based Python interpretation logic. sync_research_contextredesigned — two-phase tool: Phase 1 returns raw session data for LLM reasoning; Phase 2 acceptsinterpretation(scientific prose) andsite_nameand writes permanently toresearch.md.site_namefield — sessions carry a human-readable display name set by the LLM, separate from the raw gauge ID.
Analysis¶
- PNG diagnostic outputs — watershed boundary map, daily hydrograph with 30-day rolling mean, and log-scale flow duration curve are saved automatically when
workspace_diris set. - New
analysis/plots.pymodule — headless matplotlib plots via Agg backend; silently skips if matplotlib is unavailable.
Session architecture¶
- Lean session JSON — watershed GeoJSON geometry stored at
~/.aihydro/sessions/<gauge_id>.geojson(was embedded inline, 200–800 KB per gauge). - Project workspace auto-detection —
ProjectSession.save()findsworkspace_dirfrom any associated gauge session automatically.
Fixed¶
.aihydrorules/research.mdpath corrected throughout (was.clinerules/research.mdinsession/persona.pyandsession.pyshadow file)- Shadow
ai_hydro/session.pydeleted — was silently writing to the wrong path when imported fetch_streamflow_dataquickstart example corrected to usestart_date=/end_date=kwargs (positional args caused USGS validation failure)- Windows PATH table:
Scripts\aihydro-mcp.exewas mangled toScriptsihydro-mcp.exe(bell char) - VSIX install example version bumped
0.1.2→0.1.5 faq.mdsetup_mcp.pycommands now includecd python &&(script is not at repo root)- CI forbidden-strings guard added — blocks PRs reintroducing stale tool names, deprecated module paths, or
.clinerulesreferences - Dead code removed:
RagService.ts, two commented RAG blocks intask/index.ts, stale Cline documentation directories
[0.1.4] — 2026-04-15¶
Added¶
- Python env context in
start_session— response now includesmcp_python(the interpreter running the MCP server),mcp_pip, andavailable_packages(dict of all installed packages with versions). Agents can use this to write correct Python scripts without guessing the interpreter path or assuming what is installed. list_available_toolstool — returns all registered MCP tools with names, descriptions, and parameter schemas at runtime. Includes community plugin tools discovered via entry points. Call this to see what capabilities are available without relying on hardcoded documentation.get_library_referencetool — per-library reference cards covering field-name gotchas, API quirks, unit assumptions, and copy-paste code patterns. Covers 8 core libraries: pynhd, pygeohydro, pygridmet, py3dep, hydrofunctions, pysheds, rasterio, xarray. Call before writing any Python script using these libraries.aihydro.knowledgeentry point — community plugins can now contribute additional library reference cards by registering aget_refs_dircallable under[project.entry-points."aihydro.knowledge"]in theirpyproject.toml.- Agent instruction improvements — system prompt now includes explicit Python scripting decision tree: call
start_sessionfirst, callget_library_referencefor any library you'll use, then usemcp_pythonas the interpreter. Also clarifies thatlist_available_toolsis the ground truth for available capabilities.
Tests¶
- 4 new smoke tests covering all additions
- Fixed stale
_RESEARCH_MDpatch targets (attribute no longer exists in store.py) - Updated expected tool count from 16 → 28
[0.1.3] — 2026-04-11¶
Fixed¶
- Security: Path traversal vulnerability in
ProjectSession—project_namenow validated against^[a-zA-Z0-9_-]{1,64}$before any filesystem use - Critical:
fetch_streamflow_databroken on pandas 3.0 — replacedhydrofunctionswithdataretrieval(official USGS Python client); all streamflow fetches now work - Geomorphic: Outlet elevation NaN silently coerced to 0.0, cascading to 6 metrics returning zero — added nearest-pixel fallback (±3 cells); returns
NaNexplicitly if no valid pixel found research.mdandtools.mdwritten to.clinerules/(old Cline path) instead of.aihydrorules/— auto-injected research context was not reaching the agentadd_note: parametertextrenamed tonote;add_journal_entry:text→entry;get_project_summary:name→project_name(consistent with all other project tools)export_session: default format corrected from"text"to"json", third option corrected from"text"to"methods";clear_sessiondocs:slot→slots(list)train_hydro_modeldocs: parameters fully corrected (framework, date ranges,epochs=500)
0.1.2 — 2026-04-10¶
Added¶
- v1.2 Python backend (aihydro-tools v1.2.0):
ProjectSession: project-scoped research state spanning multiple gauges/topicsResearcherProfile: persistent researcher persona built from interactions- 10 new MCP tools → 26 total
- Folder-based literature indexing (
index_literature,search_literature) - Cross-session experiment search (
search_experiments) - Project experiment journal (
add_journal_entry) - Researcher profile tools (
get/update_researcher_profile,log_researcher_observation) - Memory hierarchy fully documented in agent instructions:
ResearcherProfile → ProjectSession → HydroSession → research.md - Agent now calls
get_researcher_profile()at conversation start - GitHub Pages documentation site (MkDocs Material)
- YouTube channel added to project links
Changed¶
- Platform descriptions revised across README, PyPI, and Marketplace for clarity and vision
- Private files (
paper.md,branding.md) excluded from VSIX packaging
0.1.1 — 2026-04-09¶
Changed¶
- Bumped version 0.1.0 → 0.1.1 for VSIX distribution
Python backend (aihydro-tools v1.1.0)¶
- RAG system removed;
query_hydro_conceptstool removed - Hardcoded tool-count references replaced with generic language
- RAG files archived to github.com/AI-Hydro/aihydro-rag
0.1.0 — 2026-03-31¶
Added¶
- Initial public release of AI-Hydro VS Code extension
- Full TypeScript rebranding from Cline → AI-Hydro
- Auto-registration of
ai-hydroMCP server on extension activation - Custom agent system prompt for hydrological research workflows
- Python backend: aihydro-tools v1.1.0 (16 MCP tools via
aihydro-mcp) - Latest AI model support: Claude 4.6 (Opus/Sonnet), GPT-5.4, Gemini 3.1
- Documentation:
PLUGIN_GUIDE.md,docs/tools-reference.md,docs/installation.md - Community contribution guide:
python/CONTRIBUTING.md