Skip to content

Feat/geo mcp plugin#3657

Closed
liuyuan1041 wants to merge 35 commits into
esengine:main-v2from
liuyuan1041:feat/geo-mcp-plugin
Closed

Feat/geo mcp plugin#3657
liuyuan1041 wants to merge 35 commits into
esengine:main-v2from
liuyuan1041:feat/geo-mcp-plugin

Conversation

@liuyuan1041

Copy link
Copy Markdown

No description provided.

@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 9, 2026
- Fix QGIS auto-detection for D:\QGIS\ (OSGeo4W standalone install)
- Update all paths from Miniconda3 to anaconda/anaconda3 (new computer)
- Add from __future__ import annotations for Python 3.9 compat (6 files)
- Rename geocode-setup skill to set (probe → compare → fix → inject → verify)
- Inject Geo Environment block into REASONIX.md (project memory)
- Create GeoMapViewer (OpenLayers raster/vector + basemap switcher)
- Create GeoTable (paginated attribute table with sorting)
- Create GeoResultCard (parses __geo_type__ marker, dispatches to map/table)
- Create GeoStatusDots (GDAL/QGIS/GEE 3-dot indicator + React context)
- Modify ToolCard: detect geo tools → render GeoResultCard instead of CodeViewer
- Modify StatusBar: add GeoStatusDots to right side
- Add subjectOf/summarize entries for 5 geo tools
- Add ol (OpenLayers 10.x) dependency
- Geo CSS ~170 lines
@github-actions github-actions Bot added the desktop Wails desktop app (desktop/**) label Jun 9, 2026
… thematic-map

- gee-scripting: GEE script structure, heartbeat, geocode helpers, cloud masking,
  classification, change detection, compositing (SKILL + 3 refs + 1 template)
- projection-selection: distortion property decision framework, projection family
  guide, China-specific CGCS2000 standards (SKILL + 1 ref)
- thematic-map: Cartopy/Matplotlib/frykit mapping workflow, element checklist,
  image review standards, basemap + projection + frykit references (SKILL + 3 refs + 2 templates)

Total: 4 skills (incl. set), 14 files
Create mock modules for wailsjs/runtime/runtime and wailsjs/go/main/App.
Add wailsMocks() Vite plugin that resolves these imports to browser mocks.
Allows 'pnpm dev' to work standalone (no Go/Wails shell needed).
- __mocks__/wailsjs/runtime/runtime.ts: mock WindowGetPosition etc.
- __mocks__/wailsjs/go/main/App.ts: mock App bindings
…our, theme, etc.)

Full runtime mock covering: window geometry, theme, clipboard, events,
logging, browser, environment, screen, menu, dialog APIs.
- Copy GeoCode SVG icons: gdal.svg, qgis.svg, gee.svg, earth.svg
- Rewrite GeoStatusDots: 16x16 branded icon buttons + colored dot badge overlay
- Add click-to-open popover with per-environment diagnostics
- Move GeoStatusDots from StatusBar to top app-chrome titlebar (matching GeoCode)
- Add GEO_TOOL_ICONS map for ToolCard geo tool icon replacement
- ToolCard: geo tools show branded icon instead of generic ProcessToolIcon
- CSS: geodot icon+popover styles, remove old geodots__circle styles
- WorkspacePanel: filter GIS sidecar files (.shx .dbf .prj .tfw .ovr etc.)
  when parent .shp or .tif exists in same directory
- GeoStatusDots: popover shows real diagnostic data (version, path, project,
  processing status) from geo_env_status probe; expanded context with GeoDetails
- GeoFileTab: .tif .shp .geojson files now show geo metadata instead of
  "Binary file"; Go backend returns geo_raster/geo_vector kind; frontend
  WorkspacePanel renders GeoMapViewer; mock bridge returns mock preview data
- ToolCard: pass both status and details to geo context
- types.ts: add geo_raster / geo_vector to FilePreview.kind union
- internal/geo/mcpclient.go: JSON-RPC 2.0 stdio client for calling Python MCP
  server tools from Go (initialize + tools/call). Cached singleton.
- internal/geo/geopreview.go: GeneratePreview() starts MCP server, calls
  read_geo_data, returns structured GeoPreview with WebP/GeoJSON URLs.
  Falls back to basic metadata if MCP unavailable.
- desktop/app.go: ReadFile now uses geo.GeoPreviewKind() for .tif/.shp/
  .geojson — calls MCP server for real raster/vector preview generation.
  Old inline geoPreviewKind functions removed (now in geopreview.go).
- Go: ProbeGeoEnv() calls MCP server geo_env_status on app startup
- Go: beforeClose() shuts down cached MCP client gracefully
- Frontend: GeoStatusProvider useEffect auto-calls ProbeGeoEnv on mount
- Bridge: add ProbeGeoEnv to AppBindings type + dev mock (returns
  realistic ready status so dots show green in browser dev)
- geopreview.go: add GenerateEnvProbe() that calls geo_env_status
  via MCP client
Add encoding='utf-8', errors='replace' to all subprocess.run/Popen
calls that invoke QGIS Python (qgis_bridge.py + env_status.py).
Fixes GBK decode failure when QGIS bat outputs Chinese characters.

MCP smoke test: 9/9 passed.
- Mock App.ts: replace unused 'args: unknown' with '_: unknown'
- GeoStatusDots.tsx: fix app.ProbeGeoEnv() cast
- dev-geo.tsx: remove unused GeoTable import
- Rewrite /set as 7-step GeoCode-style wizard (Python→geocode.json→MCP plugin→QGIS→GEE→REASONIX.md→check)
- Add geocode MCP plugin example to reasonix.example.toml with clear comments
- Users copy example → edit paths → /set handles the rest
- Window title: Reasonix → RS-Reasonix (main.go, index.html)
- Binary name: reasonix-desktop → rs-reasonix-desktop (wails.json)
- Product/company name → RS-Reasonix (wails.json)
- i18n strings: 16 occurrences in en.ts + zh.ts
- App singleInstanceID → io.github.rs-reasonix.desktop
- Linux ProgramName → RS-Reasonix
- Logo wordmark: add RS- prefix
- Logo symbol aria-label → RS-Reasonix
- TOML config header + system prompt → RS-Reasonix
Revert broken SVG text+path approach. Instead add 'RS-' before the
logo img in App.tsx header, styled to match the logo color (#0153e5).
GeoCode's /set uses bash probes in early steps, not geo tools. Fixed:
- Step 1: bash to find conda env + verify GDAL (no MCP tools)
- Step 2: write geocode.json
- Step 3: register MCP plugin in reasonix.toml
- Step 4-7: now use MCP tools (qgis_doc, run_gee_script, geo_env_status)
- embed_geo.go: go:embed geo_mcp/* to bundle Python sources in binary
- extractGeoPython(): auto-extract on first run to %APPDATA%/reasonix/embeds/
- startup() calls extractGeoPython before tab build
- Python files under desktop/geo_mcp/ (synced from internal/geo/mcp_server/)

Users no longer need the project repository to run the geocode MCP plugin —
the Python code ships inside the exe and extracts automatically.
…ntext, UI restructure

Conflicts resolved by accepting upstream structural changes.
Geo-specific changes (ToolCard, StatusBar, GeoStatusDots, CSS) will be
re-applied in the next commit.
- StatusBar: add GeoStatusDots import + render
- styles.css: append geo CSS (GeoStatusDots + GeoMapViewer)
- i18n: use upstream en.ts/zh.ts with RS-Reasonix branding
- package.json: re-add 'ol' dependency
- pnpm-lock.yaml: regenerated
@liuyuan1041 liuyuan1041 deleted the feat/geo-mcp-plugin branch June 10, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant