DeepSeek Harness plugin

dsh-geo-viewer

DSH geo visualization plugin: the geo_view tool detects geographic data in CSV/XLSX tables, GeoJSON, and address lists, then renders an interactive MapLibre map card in the conversation.

Jump to install

Source facts

Repository
naivemap/dsh-geo-viewer
Latest update
Aug 21, 2026
Category
Tools & Capabilities
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/naivemap/dsh-geo-viewer
Plugin: dsh-geo-viewer
Author: naivemap

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer2 files
README.mdSource · read only

dsh-geo-viewer

DeepSeek Harness(DSH)地理数据可视化插件:对话中出现地理数据时,模型调用 geo_view 工具,对话流中直接渲染一张基于 MapLibre GL 的交互式地图卡片。

功能

  • 表格地理字段识别.csv / .tsv / .xlsx(含内联 CSV 文本),表头启发式识别经纬度列(lat / lng / latitude / longitude / 经度 / 纬度 / x,y 配对 / 坐标 单列合并格式),采样数值范围校验,列头与数值角色装反时按值自动互换;支持 latColumn / lngColumn 显式覆盖
  • GeoJSON 识别FeatureCollection / Feature / Geometry / 数组形态自动规范化,点、线、面分层渲染
  • 地址地理编码:地址列表直接绘图,或表格无坐标列时按 addressColumn 兜底定位;支持 Nominatim(免费)/ MapTiler / 高德(GCJ-02 自动转 WGS-84)
  • 对话内交互卡片:缩放平移、点击要素查看属性、超 500 点自动聚合、Fit 视野、页内全屏(Esc 退出)、明暗主题跟随;会话回放按字节重现
  • 制品导出:每次渲染在工作区导出 geo/<slug>-<hash>.geojson,可直接复用
  • 体量护栏maxFeatures / maxBytes / maxGeocodeRows 三重上限,超限响亮报错并给出调参指引

安装

前置条件:Node.js >= 22.19,已安装 dsh CLI(npm i -g @deepseek-ai/dsh)。

从 GitHub 安装

dsh plugin --profile web add github:naivemap/dsh-geo-viewer
# 可用 #<tag|branch> 锁定版本,如 github:naivemap/dsh-geo-viewer#main

从本地目录安装

git clone https://github.com/naivemap/dsh-geo-viewer.git
dsh plugin --profile web add /path/to/dsh-geo-viewer

从 tarball 安装(离线分发)

pnpm pack                                # 生成 dsh-geo-viewer-0.1.0.tgz
dsh plugin --profile web add ./dsh-geo-viewer-0.1.0.tgz

未全局安装 dsh 时,可改用 npx @deepseek-ai/dsh plugin --profile web add <规格> 一次性执行;add 接受的包规格与 pnpm 一致(npm / Git / 本地路径 / file: / link:)。

生效与验证

# 重启后生效(dsh web 正在运行则重启并刷新页面)
dsh --profile web

# 确认插件进入最终配置
dsh --profile web --dump-config

构建产物(lib/)已随仓库提交,以上安装方式均无需额外构建。

使用

直接用自然语言让模型画图,例如:

说法触发路径
「把 examples/cities.csv 画到地图上」CSV 文件 → 中文列头经纬度检测
「可视化 examples/demo.geojson」GeoJSON → 面/线/点混合渲染
「在地图上标出北京市、上海市、杭州市」地址列表 → 地理编码
「这张表没有坐标,只有地址列,帮我定位」表格 + addressColumn → 逐行地理编码

模型侧的工具参数(一般无需手写):path / data / addresses 三选一,可选 latColumnlngColumnaddressColumntitlestyleUrl

配置

全部配置项(底图 mapStyleUrlcardHeightmaxFeatures / maxBytes / maxGeocodeRows 护栏、地理编码供应商与 key 等)均在 Web 端「设置 -> 插件 -> 插件配置」的 dsh-geo-viewer 卡片上编辑,保存即生效(无需重启);「重置」可回退到 YAML 层取值。

  • 地理编码供应商:nominatim(默认,免费、无需 key)/ maptiler / amap(国内地址效果最好,结果自动 GCJ-02 -> WGS-84);后两者需填 key,缺失时首次地理编码即报错提示
  • TUI / headless 等无 settings 服务的部署,可在 profile 的 cordis.patch.yml(或 home 级 $DSH_HOME/cordis.patch.yml)中覆盖同名键:
- replace:
  - id: dsh-geo-viewer
    name: 'dsh-geo-viewer'
    config:
      geocodingProvider: 'amap'
      geocodingKey: '<你的高德KEY>'

工作原理

DSH 插件双半侧架构:

  • 宿主半侧lib/index.js,Node):注册 geo_view 工具;解析输入 → 转标准 GeoJSON → 连同渲染参数写入持久化 tool/result meta(presentationMeta)→ 工作区导出制品
  • 浏览器半侧lib/client.js,由 DSH Web UI 经 __ModuleLoader__ 注入):以键控 toolview 注册 geo_view 卡片,按 meta 从 CDN 动态加载 maplibre-gl 渲染地图;不读工作区文件,回放稳定
  • TUI / headless 客户端无浏览器半侧,自动回退为通用工具卡片文本,工具仍可用

开发

pnpm install
pnpm run check      # typecheck(双侧)+ vitest + 构建
pnpm run test       # 仅测试
pnpm run build      # 仅构建 lib/

修改源码后需重新 pnpm run buildlib/ 随仓库提交),再在 profile 中重新加载或重启 dsh。

限制

  • 仅渲染 GeoJSON 支持的几何(点/线/面及其 Multi 形态),不支持 WKT / Shapefile(可先转换)
  • 地理编码走宿主侧网络;离线环境请配置 geocodingBaseUrl 指向内网服务
  • 大数据集受 maxFeatures / maxBytes 护栏约束,超大 GeoJSON 请先降采样

License

MIT