dsh-webgis
Conversational GIS for the DSH Web UI with local file and PostGIS querying, interactive maps, and spatial analysis.
Install
dsh plugin --profile web add dsh-webgis
Sandbox test results
| Stage | Result |
|---|---|
| 1 install | ✓ |
| 2 list | ✓ |
| 3 mount | ✓ |
| 4 boot | — |
Four stages run in an isolated sandbox: install (network on) → list → mount → boot (last three with no network).
README
dsh-webgis
A WebGIS plugin that lets LLMs truly see the geographic world. Built on DeepSeek Harness (DSH), it embeds a full GIS workbench into an AI conversation: models can load map data, understand maps, and run spatial analysis through dialogue. Its long-term goal is genuine 3D spatial understanding.
Author: Frank Wang · Feedback: [cywanghn@gmail.com](mailto:cywanghn@gmail.com)
Compatibility
- Requires DSH
0.2.1(built and tested against0.2.1-rc.2). This release is not compatible with earlier harness versions. If you are on an older DSH, upgrade the harness before updating this plugin. - Targets the DSH Web profile and requires the host
webServerservice. The official Desktop transport is not yet supported. - Install:
npx --yes @deepseek-ai/dsh plugin --profile web add dsh-webgis - pnpm ≥ 10 needs no
approve-buildsstep: DuckDB ships as the official Node Neo package (@duckdb/node-api) with a platform-specific prebuilt binding through optional dependencies. A normalpnpm installis sufficient. The platform still has to be one DuckDB Node Neo supports, and packages must be fetchable from the npm registry.
What's New in 0.2.1
Harness 0.2.1 adaptation
Retargeted at DSH 0.2.1-rc.2. All harness APIs this plugin uses are unchanged (slot registry, shell.overlay / settings.plugins.tab / conversation.session.header.actions, ctx.tools., ctx.slots., webServer.register, session-list lookup); only dependency ranges moved. @deepseek-ai/dsh-invariants was dropped — it was never used by this plugin and has no 0.2.1 release.
UI fixes
- Mode switch moved into the session header. The traditional/GIS toggle used to be an absolutely positioned floating button in the overlay; the official desktop app's native title bar covered it. It now registers in
conversation.session.header.actions(the title / view / export / collapse row). - Host dialogs no longer hidden by the map. In GIS mode the map layer could paint over the settings / plugins panel. The map now observes host
dialog/menulayers, hides itself while they are open, and the overlay layer is lowered below host chrome.
Layer ordering
- Drag the grip at the left of any layer row to reorder. Top of the list = top of the map. The new
webgis_move_layertool moves a layerup/down/top/bottomfrom dialogue. Order is persisted in the session layer registry and re-applied after every rebuild.
Thematic colouring
webgis_set_layer_thematicnow supports user-defined numeric intervals (method: "manual"withbreaks+colors), e.g.breaks: [0, 100, 500, 1000]→ five classes.- Categorical fields with more than 50 distinct values are no longer silently truncated: the tool returns the choice to the user (colour everything / switch to numeric bins / filter first).
allCategories: trueconfirms full colouring. - Colours for large category counts are generated by golden-angle palette so each class stays distinguishable.
What's New in 0.2.0
Harness 0.2.0 adaptation
This release retargets the plugin at DSH 0.2.0. No source changes were needed — every harness API this plugin depends on is unchanged from 0.1.7: the slot registry and its dispatch, the shell.overlay and settings.plugins.tab slots, the client module-loader protocol that lazy chunks use, the host DOM the GIS layout measures, and the session-list lookup behind the 0.1.5 fix below.
The upgrade was verified by installing both harness versions side by side and diffing their type declarations and client bundles file by file, then confirming typecheck, build, and the full test suite against 0.2.0.
@deepseek-ai/cordisis now^4.0.4, matching the peer range the 0.2.0 packages declare. (The previous^4.0.1allowed the 4.0.2 we had pinned, so npm never raised it.)- Everything in the 0.1.5 section below still applies, including the session-alignment fix — 0.2.0 leaves that code untouched.
What's New in 0.1.5
Harness 0.1.7 adaptation
Three harness APIs changed in 0.1.7; all three are adapted here.
- Current-session lookup. The harness removed
SessionListState.current. On 0.1.7 the previous lookup silently returned nothing, so the browser half could not tell the host which conversation it was in. The two sides then wrote to different state buckets, and every tool that waits for the browser to answer —webgis_get_pick,webgis_export_basemap,webgis_export_map— timed out, while the map itself kept rendering, picking and navigating normally. Resolved through the harness's ownretainedBy.mainViewrule. - Plugin settings page. The
settings.plugin.itemslot was removed — that page is now a read-only inventory of the plugins a deployment ships. The WebGIS card is registered as a tab throughsettings.plugins.tabinstead. - Vision chain message source. The shared
'plugin'message-source kind was removed from the harness vocabulary; the plugin now declares its own kind, which is how the harness documents producers extending that union.
Behaviour note: now that the browser half resolves a real session id, the GIS / traditional mode choice is stored per conversation again — it had been collapsing into a single shared slot. Each conversation is selected once.
Tools: unified and auto-routed
- File loading is one entry point,
webgis_load_dataset, covering GeoJSON, CSV, shapefile (.zip/.shp) and GDAL-readable vectors (.gdb/.gpkg/.kml/.tab/.mif/.dgn). CSV options:lonField,latField,geometryColumn,sourceCrs,filter,limit; local*.csvwildcards and SSRF-protected remote CSV downloads are supported. - Attribute filters, location filters, field summaries and spatial filtering/aggregation now choose their own data path. A layer displaying a sample is analysed over its full backing data; when the full data is unavailabl
…(truncated)
Rendered from the README published on npm. Formatted only, not edited.
Versions
Published on npm::12,最后更新 2026-10-18