dsh-univer-office README

项目的 README,来自 github.com/dream-num/dsh-univer-office。合并为一个 markdown 文件:README.md。

Univer × DeepSeek

DSH × Univer Office

Give DeepSeek Harness a real office environment.

Univer Office Plugin brings spreadsheets, docs, slides, canvases, relational tables, and more into one runtime — with connected data, validation, versioned changes, and isolated worktrees for multi-agent collaboration.

English · 简体中文

npm Node.js License

dsh-univer-office is the Univer office plugin for DeepSeek Harness (DSH). Tell the agent what you need and it can create or edit spreadsheets, documents, presentations, multidimensional tables, and canvases, or work with existing Excel, Word, and PowerPoint files. Every change is verified and stays in the conversation for you to preview, approve, or discard.

After installation, describe the result you want in natural language. The agent handles creation, editing, and verification while you follow the work live and review the result in the conversation. Deliver spreadsheets as Excel (.xlsx), documents as Word (.docx), and presentations as PowerPoint (.pptx) files when needed.

See it in action

Play the DSH × Univer Office demo

The agent created this spreadsheet from a natural-language request, then added conditional formatting and a chart in the same conversation. The result can be previewed, revised, merged into the current version, or discarded in place.

Reviewing a spreadsheet with conditional formatting and a chart in DSH

Deliver a standard Excel file: after review, ask the agent to export the spreadsheet as .xlsx so it can be opened and edited in Excel, WPS Office, and other compatible office applications.

See the complete workflow from request to review

1. Describe the task in natural language

Asking the agent to create a class score sheet

2. Follow the result live while the agent works

A live spreadsheet window while the agent works

3. Approve or discard the changes in the conversation

The spreadsheet review card after the task completes

Generate a presentation from one request

Give the agent a topic, audience, page count, content outline, and visual direction. It can build the complete presentation, verify content and layout page by page, and leave the result in the conversation for review.

Reviewing a bubble sort teaching presentation in DSH

Deliver a standard PowerPoint file: after review, ask the agent to export the presentation as .pptx so it can be presented and edited in PowerPoint, WPS Office, and other compatible office applications.

See the presentation workflow from request to finished deck

1. Specify the topic, audience, and page requirements

Asking the agent to create a bubble sort teaching presentation

2. Follow and verify the pages while the agent works

A live presentation window while the agent works

What can it do?

Example requests

Create a simple payroll spreadsheet with employee, base salary, bonus, deduction, gross pay, and net pay columns. Calculate the totals automatically.

Create a six-slide lesson deck about bubble sort. Explain the concept, each comparison pass, pseudocode, and complexity, and check every page for layout problems.

Create a formal weekly project report with an executive summary, this week's progress, a risk table, next week's plan, headers, and footers, then export it as docx.

Create a customer-tracking Base with company, contact, stage, expected value, and next action fields, plus a view grouped by stage.

Create a sales Sheet and a summary Slide in the same .univer file, with the Slide chart reading the Sheet data.

Capabilities

Content Create and edit Verify and review Import Export
Sheet Cells, formulas, styles, tables, charts, pivots, filters, validation, images, and more Structured range inspection, recalculation, screenshots, PDF printing, live preview .xlsx .csv .tsv .xlsx .csv .tsv
Doc Paragraphs, rich text, lists, tasks, tables, images, charts, headers, footers, pagination Document readback, page screenshots, PDF printing, live preview .docx .docx
Slide Pages, text, shapes, images, tables, charts, SVG layouts, transitions Structure inspection, layout lint, screenshots, PDF printing, live preview .pptx .pptx
Base Tables, fields, records, views, formulas, filters, sorting, grouping Structured data checks, workbench screenshot, live preview — .xlsx .csv .tsv
Board Shapes, text, connectors, images, native charts, routing Element analysis, screenshots, PDF printing, live preview — —

Every content type supports isolated draft editing, side-by-side semantic comparison, review, revision, approval, and discarding. Base and Board support structural verification; Board file export is not yet supported.

Get started in 3 minutes

1. Install the plugin

Supported DSH versions follow the peer dependency ranges in package.json, starting at 0.2.0-rc.1.

If DSH is running, first press Ctrl+C in the terminal that started it. You can run the installation command while DSH is running, but the current DSH process will not load the new plugin automatically.

Install the plugin from npm:

dsh plugin --profile web add dsh-univer-office

Restart DSH after installation:

dsh web

After DSH starts successfully, refresh the existing DeepSeek Harness browser page with Cmd+R / Ctrl+R.

2. Describe what you need

Create a monthly expense spreadsheet with dates, categories, amounts, a total, and a few rows of sample data.

3. Review it in the conversation

How it works

  1. Describe the result you want and provide any source files.
  2. The agent creates an isolated draft and edits the Univer content there.
  3. Follow the live preview and ask for revisions until the result is ready.
  4. Approve the result to update the current version, or discard the draft without changing it.

Approval and discarding always require an explicit user request.

Built-in tools

DSH selects these tools automatically; you normally do not need to call them manually. They are disclosed to the model from the step after a bundled Univer skill loads, including when you invoke a skill directly with /univer or /univer-sheet, so a task that never touches Office content pays no schema tokens for them.

Tool Purpose
univer_new Create an empty .univer file without overwriting an existing file
univer_status View the content and draft status of a file
univer_worktree Create, submit, revise, approve, or discard an isolated draft
univer_unit Add or remove Sheet, Doc, Slide, Base, or Board content
univer_import Import an Office file into a .univer file; docx keeps its page setup by default, docType selects traditional (default) or modern
univer_inspect Read document structure or a selected Sheet range
univer_execute Read or edit content through the Univer API
univer_export Export Sheet, Doc, Slide, or Base content
univer_lint Find off-page, overflowing, and overlapping Slide text
univer_compile_svg Add an SVG layout to a Slide with measured text
univer_screenshot Render supported content as PNG images for review
univer_print_pdf Print a Sheet, Doc, Slide, or Board to a PDF file at a writable path
univer_api Find bundled Univer API symbols by keyword and show exact references
univer_resources Find and use bundled icons, logos, emoji, and illustrations

Preview and review experience

Requirements and current limits

Local paths are relative to the session working directory or absolute. With DSH's sandbox policy active, tools can read Host-readable inputs outside the workspace. In workspace-write, destinations must be under a DSH writable root (workspace, granted directories where supported, or platform temporary directories). read-only permits queries and inspection and blocks document edits, exports and screenshots. danger-full-access permits writes wherever the Host can write. For example, you can import a spreadsheet from a sibling directory into a draft in your workspace. Opening an interactive Viewer requires write access to the original. Hosts without the policy service retain workspace-only access.

Configuration

The defaults are designed for local use: the service starts at port 9080. If that port is occupied, it tries 9081, then continues upward one port at a time. Set these plugin options when you need different values:

Field Default Purpose
gatewayPort 9080 Initial loopback service port; occupied ports advance by one
autoStartGateway true Start the service on first use
gatewayStartupTimeoutMs 10000 Service startup timeout
gatewayRequestTimeoutMs 3000 State-read timeout
gatewayMutationTimeoutMs 60000 Write-operation timeout
unitContentOperationTimeoutMs 120000 Import, export, inspection, and execution timeout
unitContentRuntimeMaxEntries 50 Maximum cached Unit runtimes for inspection, execution, and rendering. Each Worker hosts up to 10 runtimes. When all cache entries are busy, requests for another Unit fail with COLLABORATION_POOL_CAPACITY_EXCEEDED. 0 starts a new process for every operation
unitContentRuntimeIdleTtlMs 300000 Idle time after which a warm Unit runtime exits
screenshotOperationTimeoutMs 120000 Overall timeout for one browser screenshot operation
printPdfOperationTimeoutMs 120000 Overall timeout for one browser PDF print operation
screenshotMaxPages 30 Maximum Doc or Slide pages rendered by one screenshot call
screenshotMaxPixels 16777216 Maximum pixel count for each screenshot image
browserExecutablePath auto-detected Browser executable for screenshots, PDF printing, and Slide checks; takes precedence over UNIVER_RENDER_BROWSER
resourceCacheRoot $DSH_HOME/cache/dsh-univer-office/resources Persistent downloaded-SVG cache; falls back to ~/.dsh when DSH_HOME is unset
resourceDownloadTimeoutMs 15000 Timeout for one SVG resource download
resourceOperationTimeoutMs 120000 Overall timeout for one resource-library tool operation
tools true Enable agent editing capabilities
skills true Enable bundled task guidance
activationSkills every bundled skill Skills whose successful loading discloses all univer_* tools from the following step. An empty list discloses them unconditionally, which is also what skills: false implies
telemetry true Send anonymous product telemetry

The Viewer, its HTTP API, and its WebSocket collaboration traffic are served by the plugin on the DSH WebServer origin itself (/univer-viewer/... and /uf/...), so remote deployments work through whatever entry already fronts DSH — no extra reverse-proxy configuration. Every browser request passes DSH browser authentication via the connection service. Viewer document opens and /univer-api requests also check the named session’s file permissions; subsequent /uf API and WebSocket requests do not require a plugin session cookie or repeat the session policy check. Authenticated browsers can address any .univer file accessible to the Host process, including in remote deployments. In DSH Desktop, the Viewer obtains the current Host loopback address through an authenticated runtime endpoint for WebSocket connections; HTTP requests continue through the desktop shell. The Gateway itself stays on loopback and is never exposed. (The former viewerBaseUrl option was removed by this change and is ignored.)

Telemetry

Sends anonymous usage stats after the plugin activates (never file contents or paths). The published package declares no postinstall script. Disable telemetry with DO_NOT_TRACK=1 or telemetry: false.

Uninstall

dsh plugin --profile web remove dsh-univer-office

Development

This project is a standard DSH bundle. Its Host composes the Univer Service Provider, Tools Consumer, webServer Consumer, and Skill Provider. The bundle includes its Gateway, Viewer, pooled Collaboration Runtime Workers, headless Unit Content Worker, and Slide render machine. Start with the architecture overview and module index to understand how these components work together.

The project requires Node.js >=22.19.0 and [email protected].

pnpm install
pnpm run lint
pnpm run typecheck
pnpm run build
pnpm run test

.npmrc resolves the @univer-cli, @univerjs, and @univerjs-pro scopes from Univer's insider registry, https://insider-npm-registry.univer.work/. The registry is public and needs no account or token. It is mainly for installing Univer insider builds; install official releases from npm.

Official package name

Install only dsh-univer-office. The following similar names are deprecated npm placeholders reserved by this project to prevent impersonation; they contain no plugin code:

License

Apache-2.0

dsh-univer-office (dream-num/dsh-univer-office)

正在搜索数据库…

这是什么?dsh-univer-office 是一个 DeepSeek Harness(DSH)插件,为它的智能体提供真实的办公环境——电子表格、文档、演示文稿、轻量级数据库(Base)和画布(Board)——全部集成在一个运行时中,而且每处改动在你接受前都可以先审阅。
这是独立应用,还是只能在 DeepSeek Harness 里使用?它只能作为插件在 DeepSeek Harness(DSH)内运行;它不是独立的办公应用,而是为 DSH 智能体运行时添加 Sheet、Doc、Slide、Base 和 Board 内容类型。
安装之前我需要什么?你需要受支持的 DSH 构建(0.1.1-rc.2 或 0.1.2-rc.1)和 Node.js >=22.19.0;部分 Slide 版式检查还需要本地的 Chrome/Chromium 可执行文件。
它目前还做不到什么?Board(画布)内容还无法导出为文件,Slide 的母版页、版式页和演讲者备注也不在当前的编辑范围内。
它会把我的数据发送出去吗?激活后它会发送匿名使用遥测数据,但绝不会发送文件内容或路径;你可以用 DONOTTRACK=1 或把 telemetry 设为 false 来关闭。
它能导入和导出哪些文件格式?它可导入 .xlsx、.csv、.tsv、.docx 和 .pptx;Sheet/Base 内容可导出回 .xlsx、.csv 或 .tsv,Doc 导出为 .docx,Slide 导出为 .pptx。Board 目前没有导出功能。
审阅工作流是怎么运作的?智能体的每次编辑都先以隔离草稿的形式出现在实时预览窗口中;你看着改动发生,然后明确批准以更新当前版本,或将其丢弃,原文件保持不变。
一个文件能容纳多种内容类型吗?可以——一个 .univer 文件可以同时包含 Sheets、Docs、Slides、Bases 和 Boards,其中的公式或嵌入内容还能相互引用。
智能体在幕后使用哪些工具?DSH 会自动调用 univerimport、univerexecute、univerinspect、univerlint、universcreenshot、univerprintpdf 等内置工具来编辑、验证和渲染内容,无需你手动调用。
作者
dream-num
大小
65.8 MB
星标
737
时长
3个月
提交 · 90 天