ExElectron/dsh-gov-portal

插件Plugin ⭐ 17 MIT web-ui

一个以中国地方政务网站视觉规范为设计基准的独立 WebUI 插件:在独立端口(默认 3081)提供政务风办事大厅界面,通过宿主进程内的 apiProxy 网关 1:1 对接 DeepSeek Harness 的会话、模型、模式、权限、统计等全部真实 Agent 能力(零业务硬编码)。

catalog 简介 / catalog descriptioncatalog description:—

编辑导读Editor's Brief

## 核心特性
- 该插件在独立端口上提供政务门户风格的 Web 界面,默认端口为 3081,并通过宿主进程的 apiProxy 网关连接 DeepSeek Harness 的会话、模型、预设、权限与统计能力,不内置硬编码业务流程。
- 界面元素包括带访问计数的顶部工具栏、带徽章和搜索框的页头、主导航栏、双滚动频道、80/20 工作台布局、两个悬浮窗口以及完成盖章动画。
- 会话控件会从 session.models 和 session.selectModel 枚举模型与推理强度,从 agentPreset.list 列出智能体预设,并在创建会话时通过 settings.describe 和 settings.update 应用权限预设。
- 运行时面板会消费 events.mux 的会话/事件帧,用于文本、思考、工具、轨迹和待办输出;统计则聚合 sessionStats 投影以及 assistant/message 用量,用于轮次、步骤、耗时、token 数和吞吐量。
- 电子档案和监督视图使用 session.list、session.history、session.search、会话导出以及实时 session/event 数据,以检查、导出和筛选会话记录与追踪事件。

## 使用场景
- 它可以通过公共服务窗口布局展示 DeepSeek Harness 智能体交互,支持工单式提交、回执流式展示和会话统计。
- 它可以提供一个管理审核界面,用于沙箱审批请求、问题回复、会话归档和轨迹日志。
- 它可以通过 schemastery schema 驱动表单暴露 Harness 配置,这些表单由 settings.describe 为宿主命名空间生成。

## 技术细节
- 该包是一个 Cordis 插件,会在 3081 端口启动服务,提供静态公共资源,桥接 /api 请求,并暴露 /plugin 端点,例如访问计数。
- 前端无需构建且无依赖,使用 HTML、CSS 变量和 JavaScript 模块实现工具函数、API 访问、存储、滚动频道、悬浮面板和应用状态。
- 集成默认使用同一宿主进程中的 SSE 桥接,同时配置面板保留 WebSocket 地址和重试间隔字段。
- 前端设置存储在浏览器 localStorage 的 dsh.govPortal.v1 下,插件级配置(如端口和访问计数)存储在 ~/.dsh/gov-portal.json 中。

## 注意事项
- 该界面仅运行在 dsh web 宿主进程内,无法脱离 DeepSeek Harness 单独使用。
- 修改监听端口需要重启 dsh web,因为端口参数在插件启动时读取。
- 端到端聊天测试会在 ~/.dsh/sessions 下创建真实会话,并可能消耗 API 配额。

## Core Features
- The plugin provides a government-portal-style web interface on an independent port, defaulting to 3081, and connects through the host process apiProxy gateway to DeepSeek Harness sessions, models, presets, permissions, and statistics without hardcoded business flows.
- Interface elements include a top toolbar with visit counting, a header with emblem and search box, a main navigation bar, dual marquee channels, an 80/20 workbench layout, two floating windows, and a completion stamp animation.
- Session controls enumerate models and inference strengths from session.models and session.selectModel, list agent presets from agentPreset.list, and apply permission presets through settings.describe and settings.update during session creation.
- Runtime panels consume events.mux session/event frames for text, thinking, tool, trajectory, and todo output, while statistics aggregate sessionStats projections and assistant/message usage for turns, steps, timing, tokens, and throughput.
- The electronic archive and supervision views use session.list, session.history, session.search, session export, and real-time session/event data to inspect, export, and filter session records and trace events.

## Use Cases
- It can present DeepSeek Harness agent interactions through a public-service counter layout with ticket-style submission, receipt streaming, and session statistics.
- It can provide an administrative review surface for sandbox approval requests, question responses, session archives, and trajectory logs.
- It can expose Harness configuration through schemastery schema-driven forms generated from settings.describe for host namespaces.

## Technical Details
- The package is a Cordis plugin that starts a service on port 3081, serves static public assets, bridges /api requests, and exposes /plugin endpoints such as visit counting.
- The front end is build-free and dependency-free, using HTML, CSS variables, and JavaScript modules for utilities, API access, storage, marquees, floating panels, and application state.
- Integration uses an SSE bridge in the same host process by default, while the configuration panel retains WebSocket address and retry interval fields.
- Configuration is stored in browser localStorage under dsh.govPortal.v1 for front-end settings and in ~/.dsh/gov-portal.json for plugin-level values such as port and visit count.

## Notes
- The interface runs only inside the dsh web host process and cannot be used separately from DeepSeek Harness.
- Changing the listening port requires restarting dsh web because the port parameter is read when the plugin starts.
- End-to-end chat tests create real sessions under ~/.dsh/sessions and may consume API quota.

安装Install

dsh plugin --profile web add github:ExElectron/dsh-gov-portal

ExElectron/dsh-gov-portal 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

上一个 Prev agent-team 下一个 Next dsh-llm-codebuddy