dsh-univer-office 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +181 -104
- package/README.zh-CN.md +181 -101
- package/docs/architecture.md +9 -8
- package/docs/assets/readme/chart-and-formatting.png +0 -0
- package/docs/assets/readme/live-worktree.png +0 -0
- package/docs/assets/readme/presentation-live.png +0 -0
- package/docs/assets/readme/presentation-request.png +0 -0
- package/docs/assets/readme/presentation-review.png +0 -0
- package/docs/assets/readme/review-result.png +0 -0
- package/docs/assets/readme/spreadsheet-request.png +0 -0
- package/docs/univer-turn-projection-and-surfaces.md +243 -0
- package/lib/client.js +440 -475
- package/lib/index.js +24 -13
- package/package.json +2 -6
- package/lib/index.js.map +0 -7
- package/lib/types/host/adapters/gateway/client.d.ts +0 -15
- package/lib/types/host/adapters/gateway/client.d.ts.map +0 -1
- package/lib/types/host/adapters/gateway/file-api.d.ts +0 -18
- package/lib/types/host/adapters/gateway/file-api.d.ts.map +0 -1
- package/lib/types/host/adapters/gateway/mapping.d.ts +0 -31
- package/lib/types/host/adapters/gateway/mapping.d.ts.map +0 -1
- package/lib/types/host/adapters/gateway/worktree-api.d.ts +0 -21
- package/lib/types/host/adapters/gateway/worktree-api.d.ts.map +0 -1
- package/lib/types/host/adapters/unit-content/protocol.d.ts +0 -61
- package/lib/types/host/adapters/unit-content/protocol.d.ts.map +0 -1
- package/lib/types/host/adapters/unit-content/worker.d.ts +0 -10
- package/lib/types/host/adapters/unit-content/worker.d.ts.map +0 -1
- package/lib/types/host/artifacts/paths.d.ts +0 -13
- package/lib/types/host/artifacts/paths.d.ts.map +0 -1
- package/lib/types/host/config.d.ts +0 -45
- package/lib/types/host/config.d.ts.map +0 -1
- package/lib/types/host/index.d.ts +0 -14
- package/lib/types/host/index.d.ts.map +0 -1
- package/lib/types/host/processes/gateway/gateway-process.d.ts +0 -10
- package/lib/types/host/processes/gateway/gateway-process.d.ts.map +0 -1
- package/lib/types/host/processes/gateway/launcher.d.ts +0 -8
- package/lib/types/host/processes/gateway/launcher.d.ts.map +0 -1
- package/lib/types/host/processes/gateway/protocol.d.ts +0 -5
- package/lib/types/host/processes/gateway/protocol.d.ts.map +0 -1
- package/lib/types/host/processes/gateway/supervisor.d.ts +0 -19
- package/lib/types/host/processes/gateway/supervisor.d.ts.map +0 -1
- package/lib/types/host/provider/gateway-univer-service.d.ts +0 -59
- package/lib/types/host/provider/gateway-univer-service.d.ts.map +0 -1
- package/lib/types/host/provider/plugin.d.ts +0 -6
- package/lib/types/host/provider/plugin.d.ts.map +0 -1
- package/lib/types/host/provider/render-operations.d.ts +0 -36
- package/lib/types/host/provider/render-operations.d.ts.map +0 -1
- package/lib/types/host/provider/state-cache.d.ts +0 -13
- package/lib/types/host/provider/state-cache.d.ts.map +0 -1
- package/lib/types/host/provider/unit-content-operations.d.ts +0 -32
- package/lib/types/host/provider/unit-content-operations.d.ts.map +0 -1
- package/lib/types/host/provider/worktree-operations.d.ts +0 -13
- package/lib/types/host/provider/worktree-operations.d.ts.map +0 -1
- package/lib/types/host/service/errors.d.ts +0 -8
- package/lib/types/host/service/errors.d.ts.map +0 -1
- package/lib/types/host/service/identifiers.d.ts +0 -22
- package/lib/types/host/service/identifiers.d.ts.map +0 -1
- package/lib/types/host/service/types.d.ts +0 -134
- package/lib/types/host/service/types.d.ts.map +0 -1
- package/lib/types/host/service/univer-service.d.ts +0 -28
- package/lib/types/host/service/univer-service.d.ts.map +0 -1
- package/lib/types/host/service/workspace.d.ts +0 -21
- package/lib/types/host/service/workspace.d.ts.map +0 -1
- package/lib/types/host/skills/plugin.d.ts +0 -6
- package/lib/types/host/skills/plugin.d.ts.map +0 -1
- package/lib/types/host/tools/definitions/api.d.ts +0 -4
- package/lib/types/host/tools/definitions/api.d.ts.map +0 -1
- package/lib/types/host/tools/definitions/compile-svg.d.ts +0 -4
- package/lib/types/host/tools/definitions/compile-svg.d.ts.map +0 -1
- package/lib/types/host/tools/definitions/execute.d.ts +0 -4
- package/lib/types/host/tools/definitions/execute.d.ts.map +0 -1
- package/lib/types/host/tools/definitions/export.d.ts +0 -4
- package/lib/types/host/tools/definitions/export.d.ts.map +0 -1
- package/lib/types/host/tools/definitions/import.d.ts +0 -4
- package/lib/types/host/tools/definitions/import.d.ts.map +0 -1
- package/lib/types/host/tools/definitions/inspect.d.ts +0 -4
- package/lib/types/host/tools/definitions/inspect.d.ts.map +0 -1
- package/lib/types/host/tools/definitions/lint.d.ts +0 -4
- package/lib/types/host/tools/definitions/lint.d.ts.map +0 -1
- package/lib/types/host/tools/definitions/new.d.ts +0 -4
- package/lib/types/host/tools/definitions/new.d.ts.map +0 -1
- package/lib/types/host/tools/definitions/status.d.ts +0 -4
- package/lib/types/host/tools/definitions/status.d.ts.map +0 -1
- package/lib/types/host/tools/definitions/unit.d.ts +0 -4
- package/lib/types/host/tools/definitions/unit.d.ts.map +0 -1
- package/lib/types/host/tools/definitions/worktree.d.ts +0 -4
- package/lib/types/host/tools/definitions/worktree.d.ts.map +0 -1
- package/lib/types/host/tools/plugin.d.ts +0 -7
- package/lib/types/host/tools/plugin.d.ts.map +0 -1
- package/lib/types/host/tools/presentation.d.ts +0 -64
- package/lib/types/host/tools/presentation.d.ts.map +0 -1
- package/lib/types/host/tools/workspace.d.ts +0 -16
- package/lib/types/host/tools/workspace.d.ts.map +0 -1
- package/lib/types/host/webServer/plugin.d.ts +0 -7
- package/lib/types/host/webServer/plugin.d.ts.map +0 -1
- package/lib/types/host/webServer/router.d.ts +0 -8
- package/lib/types/host/webServer/router.d.ts.map +0 -1
- package/lib/types/host/webServer/routes/gateway.d.ts +0 -4
- package/lib/types/host/webServer/routes/gateway.d.ts.map +0 -1
- package/lib/types/host/webServer/routes/state.d.ts +0 -5
- package/lib/types/host/webServer/routes/state.d.ts.map +0 -1
- package/lib/types/host/webServer/routes/status.d.ts +0 -5
- package/lib/types/host/webServer/routes/status.d.ts.map +0 -1
- package/lib/types/host/webServer/routes/worktree-action.d.ts +0 -13
- package/lib/types/host/webServer/routes/worktree-action.d.ts.map +0 -1
- package/lib/types/host/webServer/session-scope.d.ts +0 -6
- package/lib/types/host/webServer/session-scope.d.ts.map +0 -1
- package/lib/types/shared/wire/actions.d.ts +0 -15
- package/lib/types/shared/wire/actions.d.ts.map +0 -1
- package/lib/types/shared/wire/state.d.ts +0 -38
- package/lib/types/shared/wire/state.d.ts.map +0 -1
- package/lib/types/shared/wire/status.d.ts +0 -22
- package/lib/types/shared/wire/status.d.ts.map +0 -1
- package/lib/types/workers/unit-content/license.d.ts +0 -6
- package/lib/types/workers/unit-content/license.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,162 +1,239 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DSH × Univer Office
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Give DeepSeek Harness the ability to create, edit, inspect, and deliver spreadsheets, documents, presentations, databases, and canvases.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
English · [简体中文](README.zh-CN.md)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/dsh-univer-office)
|
|
8
|
+
[](package.json)
|
|
9
|
+
[](LICENSE)
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
┌────────────────────────────────────────┐
|
|
11
|
-
│ 📊 sales.univer [wt-xxx] [Expand ▾] │ ← card at the turn tail
|
|
12
|
-
│ /Users/.../sales.univer │
|
|
13
|
-
└────────────────────────────────────────┘
|
|
14
|
-
|
|
15
|
-
┌──────────────────────────────┐
|
|
16
|
-
│ ● agent-draft · sales.univer │ ← floating live window (draft worktree)
|
|
17
|
-
│ [in progress] [−] [⤢] [✕] │
|
|
18
|
-
│ ┌──────────────────────────┐ │
|
|
19
|
-
│ │ live worktree Viewer │ │ double-click to maximize,
|
|
20
|
-
│ │ (read-only, real-time) │ │ drag / resize / fold anytime
|
|
21
|
-
│ └──────────────────────────┘ │
|
|
22
|
-
└──────────────────────────────┘
|
|
23
|
-
|
|
24
|
-
┌────────────────────────────────────────┐
|
|
25
|
-
│ 🧾 Merge preview「agent-draft」 [Ready] ▾ │ ← session-end merge panel
|
|
26
|
-
│ ┌────────────────────────────────────┐ │
|
|
27
|
-
│ │ merge preview page (embedded) │ │
|
|
28
|
-
│ └────────────────────────────────────┘ │
|
|
29
|
-
└────────────────────────────────────────┘
|
|
30
|
-
```
|
|
11
|
+
`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.
|
|
31
12
|
|
|
32
|
-
|
|
13
|
+
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.
|
|
33
14
|
|
|
34
|
-
|
|
35
|
-
- **In-app fullscreen viewer** — click the card to open the sheet in an in-app iframe; close with ✕ / mask / Esc.
|
|
36
|
-
- **Live floating worktree window** — when the agent creates or updates a worktree, a small window pops up in the **top-right corner** embedding the live read-only worktree page. Edits appear in real time. When one worktree touches several units (e.g. a sheet plus a deck), the window and the review panel show **unit chips** that list ONLY changed units (+ added / ✎ modified / - deleted / ⚠ conflict) with status icons, defaulting to the first one.
|
|
37
|
-
- **Window interactions** — drag the title bar to move and double-click it to maximize; use the dedicated fold, maximize/restore, and close controls; drag any edge or corner to resize. Folding keeps the loaded Viewer mounted for instant restoration. Movement, resizing, and viewport changes keep the full window reachable on screen.
|
|
38
|
-
- **Ready + session end → close, then review card** — once the session goes idle, every worktree appears as an inline review card after the latest completed turn that touched it. The compact card header puts the Univer file name and worktree name on the first row, shows only the full file path on the second row, and keeps lifecycle status and controls on the right; expanded review cards use one width and content height across lifecycle states. The Univer page can be collapsed without unloading and supports fullscreen with Esc to exit. `ready` shows the full merge view (`scope=mergePreview`), whose own page controls are the only Discard / Merge into current version actions; **`draft` shows up too**, with the full live worktree page plus Submit for confirmation / Discard actions. After merge or discard, the same card remains, removes mutation actions, and switches its full page to mainline. When a later turn touches the worktree, the earlier turn retains the same review header as a compact history marker while the full interactive card moves to the newer turn. A Univer file with no units labels the existing empty state “Empty file.” While the session is still running, non-terminal worktrees stay as top-right windows.
|
|
39
|
-
- **Review-card viewport** — an expanded desktop card is about 650px tall by default. Its embedded full Univer page starts with the left sidebar collapsed and can still be expanded from inside the page. The card hides its fold control while fullscreen and restores it after fullscreen exits.
|
|
40
|
-
- **Bundled Gateway management** — the plugin ships the collaboration Gateway and Viewer; green dot = running, yellow dot = stopped, click to start the plugin-owned Gateway.
|
|
41
|
-
- **Multi-session** — each session shows its own turn's cards, windows, and merge panels.
|
|
42
|
-
- **Bilingual UI** — the plugin shell and every open Viewer follow the app locale (zh / en).
|
|
15
|
+
## See it in action
|
|
43
16
|
|
|
44
|
-
|
|
17
|
+
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.
|
|
45
18
|
|
|
46
|
-
|
|
47
|
-
- No global Univer CLI installation is required. The plugin bundles its Gateway, Viewer, headless Unit Content Worker, machine render page, Office converter, Univer license, platform-native dependencies, and eight version-matched lazy Univer skills: core orchestration, five Unit guides, Embed, and cross-Unit formulas. Their workflows track Univer CLI except where DSH tools or the client preview replace CLI commands, and where the plugin does not yet expose a capability. The plugin registers `univer_new`, `univer_status`, `univer_worktree`, `univer_unit`, `univer_import`, `univer_inspect`, `univer_execute`, `univer_export`, `univer_lint`, `univer_compile_svg`, and `univer_api`.
|
|
48
|
-
- Model screenshot capture is intentionally not included yet. The bundled skill reports when appearance remains unverified instead of claiming visual confirmation.
|
|
19
|
+

|
|
49
20
|
|
|
50
|
-
|
|
21
|
+
> **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.
|
|
51
22
|
|
|
52
|
-
|
|
23
|
+
<details>
|
|
24
|
+
<summary>See the complete workflow from request to review</summary>
|
|
53
25
|
|
|
54
|
-
###
|
|
26
|
+
### 1. Describe the task in natural language
|
|
55
27
|
|
|
56
|
-
|
|
57
|
-
|
|
28
|
+

|
|
29
|
+
|
|
30
|
+
### 2. Follow the result live while the agent works
|
|
31
|
+
|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
### 3. Approve or discard the changes in the conversation
|
|
35
|
+
|
|
36
|
+

|
|
37
|
+
|
|
38
|
+
</details>
|
|
39
|
+
|
|
40
|
+
### Generate a presentation from one request
|
|
41
|
+
|
|
42
|
+
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.
|
|
43
|
+
|
|
44
|
+

|
|
45
|
+
|
|
46
|
+
> **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.
|
|
47
|
+
|
|
48
|
+
<details>
|
|
49
|
+
<summary>See the presentation workflow from request to finished deck</summary>
|
|
50
|
+
|
|
51
|
+
#### 1. Specify the topic, audience, and page requirements
|
|
52
|
+
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
#### 2. Follow and verify the pages while the agent works
|
|
56
|
+
|
|
57
|
+

|
|
58
|
+
|
|
59
|
+
</details>
|
|
60
|
+
|
|
61
|
+
## What can it do?
|
|
62
|
+
|
|
63
|
+
- **Analyze and build spreadsheets** — read or create Excel data, clean fields, write formulas, apply formatting and validation, create tables, charts, pivots, filters, sparklines, conditional formatting, and images, then export the result as `.xlsx`, `.csv`, or `.tsv`.
|
|
64
|
+
- **Write and lay out documents** — create paragraphs, rich text, lists, tasks, tables, images, charts, headers, footers, pagination, and page layouts.
|
|
65
|
+
- **Create and revise presentations** — generate a deck from an outline, redesign selected pages, edit text, shapes, images, tables, charts, and transitions, then detect off-page, overflowing, and overlapping text.
|
|
66
|
+
- **Build lightweight databases** — create Base tables, fields, records, and views with formula fields, filters, sorting, grouping, and Sheet-backed references.
|
|
67
|
+
- **Draw editable canvases** — create shapes, text, connectors, images, native charts, and diagrams, with connector and layout analysis.
|
|
68
|
+
- **Compose several content types** — one `.univer` file can contain Sheet, Doc, Slide, Base, and Board Units. Formulas and embedded content can reference other Units in the same file.
|
|
69
|
+
- **Work with Office files** — import `.xlsx`, `.csv`, `.tsv`, `.docx`, and `.pptx`, then export the edited content in the matching format.
|
|
70
|
+
- **Review agent changes safely** — every write starts in an isolated worktree. Watch changes live, then merge or discard them from the conversation instead of letting the agent overwrite the current version.
|
|
71
|
+
|
|
72
|
+
### Example requests
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
Analyze sales.xlsx, fix the date and currency columns, add monthly trends, a regional comparison chart, and a summary sheet, then deliver an xlsx file.
|
|
76
|
+
|
|
77
|
+
Turn brief.md into an eight-slide investor deck with a dark-blue visual system. Check every page for layout problems and export it as pptx.
|
|
78
|
+
|
|
79
|
+
Convert meeting-notes.md into a formal weekly report with an executive summary, risk table, next-week plan, headers, and footers. Deliver a docx file.
|
|
80
|
+
|
|
81
|
+
Create a customer-tracking Base with company, contact, stage, expected value, and next action fields, plus a view grouped by stage.
|
|
82
|
+
|
|
83
|
+
Create a sales Sheet and a summary Slide in the same .univer file, with the Slide chart reading the Sheet data.
|
|
58
84
|
```
|
|
59
85
|
|
|
60
|
-
|
|
86
|
+
## Capabilities
|
|
87
|
+
|
|
88
|
+
| Content | Create and edit | Verify and review | Import | Export |
|
|
89
|
+
| --- | --- | --- | --- | --- |
|
|
90
|
+
| Sheet | Cells, formulas, styles, tables, charts, pivots, filters, validation, images, and more | Structured range inspection, recalculation, live preview | `.xlsx` `.csv` `.tsv` | `.xlsx` `.csv` `.tsv` |
|
|
91
|
+
| Doc | Paragraphs, rich text, lists, tasks, tables, images, charts, headers, footers, pagination | Document readback, live preview | `.docx` | `.docx` |
|
|
92
|
+
| Slide | Pages, text, shapes, images, tables, charts, SVG layouts, transitions | Structure inspection, text bounds/overflow/overlap lint, live preview | `.pptx` | `.pptx` |
|
|
93
|
+
| Base | Tables, fields, records, views, formulas, filters, sorting, grouping | Facade readback, live preview | — | `.xlsx` `.csv` `.tsv` |
|
|
94
|
+
| Board | Shapes, text, connectors, images, native charts, routing | Element and connector analysis, live preview | — | — |
|
|
95
|
+
|
|
96
|
+
Every content type supports isolated worktree editing, review submission, reopening, merging, and discarding. Base and Board currently use exact Facade readback for structural verification. Board file export is not yet supported.
|
|
97
|
+
|
|
98
|
+
## Get started in 3 minutes
|
|
99
|
+
|
|
100
|
+
### 1. Install the plugin
|
|
101
|
+
|
|
102
|
+
Install from npm:
|
|
61
103
|
|
|
62
104
|
```sh
|
|
63
105
|
dsh plugin --profile web add dsh-univer-office
|
|
64
106
|
```
|
|
65
107
|
|
|
66
|
-
|
|
108
|
+
Or install the latest version directly from GitHub:
|
|
67
109
|
|
|
68
110
|
```sh
|
|
69
|
-
dsh plugin --profile web add /
|
|
111
|
+
dsh plugin --profile web add github:dream-num/dsh-univer-office
|
|
70
112
|
```
|
|
71
113
|
|
|
72
|
-
|
|
73
|
-
> `dsh.profile.bundles` and pnpm links the package, so the loader resolves the
|
|
74
|
-
> plugin's `cordis.patch.yml` layer automatically. Verify with
|
|
75
|
-
> `dsh --profile web --dump-config` (you should see a `# == dsh-univer-office` layer).
|
|
114
|
+
After installation, refresh DeepSeek Harness with **Cmd+R / Ctrl+R**.
|
|
76
115
|
|
|
77
|
-
|
|
116
|
+
### 2. Describe the result you want
|
|
78
117
|
|
|
79
|
-
|
|
118
|
+
```text
|
|
119
|
+
Create reports/q2-review.univer. Read data/q2-sales.xlsx and build a management dashboard with summary metrics, monthly trends, and regional rankings.
|
|
120
|
+
```
|
|
80
121
|
|
|
81
|
-
|
|
82
|
-
2. Create a typed Unit or import an Office file into that draft worktree
|
|
83
|
-
3. The model proactively loads the core and matching Unit skill; Embed and cross-Unit formulas load their topic skills as well. Use `univer_api` when an exact Facade or method is needed
|
|
84
|
-
4. Modify with `univer_execute`; verify content with `univer_inspect`, and run `univer_lint` for Slide text layout
|
|
85
|
-
5. Use `univer_compile_svg` when an SVG should replace or overlay one explicit Slide page; export only when requested
|
|
86
|
-
6. Submit with `ready`; use `reopen` when the same task needs another edit
|
|
87
|
-
7. Merge or discard only on an explicit request and after DSH approval; the in-app review panel provides the same decisions
|
|
88
|
-
8. Preview cards, the live worktree window, and the session-end review panel reflect the structured tool results
|
|
122
|
+
The agent automatically loads the relevant skills and selects the `univer_*` tools. A typical task creates the file and a worktree, imports or creates a Unit, edits it, reads the result back for verification, and submits the worktree for review.
|
|
89
123
|
|
|
90
|
-
|
|
124
|
+
### 3. Review it in the conversation
|
|
91
125
|
|
|
92
|
-
|
|
93
|
-
|
|
126
|
+
- Creating a `.univer` file, creating or reopening a worktree, writing content, and submitting for review opens a live window in the top-right. A non-terminal worktree left open in one turn stays open in the next.
|
|
127
|
+
- Every touched `.univer` file that still exists at the end of the Turn uses the same foldable, fullscreen-capable Turn card; historical Turns keep the same card collapsed by default. Temporary files created and then removed during the Turn do not leave cards behind.
|
|
128
|
+
- Submit, merge, and discard through the full Univer page embedded in the card instead of duplicate controls outside the Viewer.
|
|
129
|
+
|
|
130
|
+
## How it works
|
|
131
|
+
|
|
132
|
+
A `.univer` file is a composable office container that can hold several Units of different types. The plugin puts each agent task in an isolated worktree:
|
|
133
|
+
|
|
134
|
+
```text
|
|
135
|
+
Your request
|
|
136
|
+
↓
|
|
137
|
+
Load the matching Univer skill
|
|
138
|
+
↓
|
|
139
|
+
Create / import / edit in a draft worktree
|
|
140
|
+
↓
|
|
141
|
+
Readback + recalculation + Slide layout lint
|
|
142
|
+
↓
|
|
143
|
+
Live preview and in-conversation review
|
|
144
|
+
↓
|
|
145
|
+
Revise / merge / discard
|
|
94
146
|
```
|
|
95
147
|
|
|
96
|
-
|
|
148
|
+
Only `merge` and `discard` end a worktree, and both require an explicit user request plus DSH approval. `ready` only submits the worktree for review; it does not change the trunk.
|
|
97
149
|
|
|
98
|
-
|
|
150
|
+
## Built-in tools
|
|
99
151
|
|
|
100
|
-
|
|
101
|
-
- `ctx.univer` is the only Host domain API used by the consumers;
|
|
102
|
-
- `host/webServer` exposes `GET /univer-api/status`, `POST /univer-api/gateway/start`, `GET /univer-api/state`, and `POST /univer-api/worktree-action`;
|
|
103
|
-
- the Tools Consumer exposes domain tools instead of a generic CLI passthrough;
|
|
104
|
-
- `host/processes/gateway` owns the bundled Gateway process and Viewer assets; `host/adapters/unit-content` starts an isolated one-shot Unit Content Worker from `workers/unit-content` for import, inspect, execute, export, and render-source reads; the machine render page supplies Slide layout facts and SVG text metrics without exposing screenshots;
|
|
105
|
-
- the Client recovers structured targets from durable tool events, polls state through its API layer, and renders preview, live-window, and review components.
|
|
152
|
+
You do not need to call tools manually in normal use; DSH selects them from your request. This list shows what the plugin exposes to the agent.
|
|
106
153
|
|
|
107
|
-
|
|
154
|
+
| Tool | Purpose |
|
|
155
|
+
| --- | --- |
|
|
156
|
+
| `univer_new` | Create an empty `.univer` file without overwriting an existing file |
|
|
157
|
+
| `univer_status` | List Units and worktrees in trunk or a selected worktree |
|
|
158
|
+
| `univer_worktree` | Create, submit, reopen, merge, or discard an isolated worktree |
|
|
159
|
+
| `univer_unit` | Create or remove a Sheet, Doc, Slide, Base, or Board Unit |
|
|
160
|
+
| `univer_import` | Import an Office file as a new Unit |
|
|
161
|
+
| `univer_inspect` | Read document structure or a selected Sheet range |
|
|
162
|
+
| `univer_execute` | Read or modify content with the exact Univer Facade API |
|
|
163
|
+
| `univer_export` | Export a Sheet, Doc, Slide, or Base Unit |
|
|
164
|
+
| `univer_lint` | Detect off-page, overflowing, and overlapping Slide text |
|
|
165
|
+
| `univer_compile_svg` | Compile SVG into an explicit Slide page with real font metrics |
|
|
166
|
+
| `univer_api` | Search the exact Univer Facade API bundled with this plugin |
|
|
108
167
|
|
|
109
|
-
|
|
168
|
+
The plugin also ships eight version-matched, lazily loaded skills: core orchestration, Sheet, Doc, Slide, Base, Board, Embed, and cross-Unit formulas.
|
|
169
|
+
|
|
170
|
+
## Preview and review experience
|
|
110
171
|
|
|
111
|
-
|
|
172
|
+
- **Live Univer window** — file creation plus worktree creation, reopening, writing, and submission open it automatically. Drag, resize, fold, or maximize it; non-terminal windows left open carry into the next Turn.
|
|
173
|
+
- **Unified Turn cards** — every touched `.univer` file that still exists has its own full Univer card, later reads do not erase a lifecycle result already produced in that Turn, and deleted temporary files do not leave loading cards behind.
|
|
174
|
+
- **Historical review** — draft, ready, merged, and discarded results all remain in the same card layout at their original Turn, with historical cards collapsed by default.
|
|
175
|
+
- **Session isolation** — each DSH session shows only its own windows, cards, and review state.
|
|
176
|
+
- **English and Chinese UI** — the plugin shell and every open Viewer follow the DSH locale.
|
|
177
|
+
|
|
178
|
+
## Requirements and current limits
|
|
179
|
+
|
|
180
|
+
- DeepSeek Harness and Node.js `>=22.19.0`.
|
|
181
|
+
- Slide layout lint and real SVG text measurement require a local Chrome/Chromium executable. Set `UNIVER_RENDER_BROWSER` to use a specific browser path.
|
|
182
|
+
- The plugin does not currently expose screenshots to the model. Structural and layout checks are not a substitute for pixel-level visual approval; you can still inspect the result in the live Viewer.
|
|
183
|
+
- Slide master pages, layout pages, and speaker notes are outside the current editing scope.
|
|
184
|
+
- Board mind maps, tables, ink, advanced editing, and file export are not yet supported.
|
|
185
|
+
|
|
186
|
+
## Configuration
|
|
187
|
+
|
|
188
|
+
The defaults are designed for local use: the Gateway starts on the first file-state request and tries ports `9123` and `8000` in order. Configure the bundle's Cordis layer when you need different values:
|
|
189
|
+
|
|
190
|
+
| Field | Default | Purpose |
|
|
191
|
+
| --- | --- | --- |
|
|
192
|
+
| `gatewayPorts` | `[9123, 8000]` | Candidate loopback ports for the bundled Gateway |
|
|
193
|
+
| `autoStartGateway` | `true` | Start the Gateway on first use |
|
|
194
|
+
| `gatewayStartupTimeoutMs` | `10000` | Gateway startup timeout |
|
|
195
|
+
| `gatewayRequestTimeoutMs` | `3000` | State-read timeout |
|
|
196
|
+
| `gatewayMutationTimeoutMs` | `60000` | Gateway mutation timeout |
|
|
197
|
+
| `unitContentOperationTimeoutMs` | `120000` | Import, export, inspection, and execution timeout |
|
|
198
|
+
| `tools` | `true` | Register the `univer_*` tools |
|
|
199
|
+
| `skills` | `true` | Register the bundled Univer skills |
|
|
200
|
+
|
|
201
|
+
See [`src/host/config.ts`](src/host/config.ts) for the remaining cache and commit-confirmation options.
|
|
202
|
+
|
|
203
|
+
## Uninstall
|
|
112
204
|
|
|
113
205
|
```sh
|
|
114
|
-
|
|
115
|
-
pnpm run test
|
|
206
|
+
dsh plugin --profile web remove dsh-univer-office
|
|
116
207
|
```
|
|
117
208
|
|
|
118
|
-
|
|
209
|
+
## Development
|
|
210
|
+
|
|
211
|
+
This project is a standard [DSH bundle](https://github.com/deepseek-ai/deepseek-harness/blob/main/docs/user/develop/basic/publish.md). Its Host composes the Univer Service Provider, Tools Consumer, webServer Consumer, and Skill Provider. The bundle includes its Gateway, Viewer, headless Unit Content Worker, and Slide render machine. See the [architecture document](docs/architecture.md) for dependency directions and runtime boundaries.
|
|
119
212
|
|
|
120
213
|
```sh
|
|
121
|
-
|
|
214
|
+
pnpm install
|
|
215
|
+
pnpm run build
|
|
216
|
+
pnpm run test
|
|
122
217
|
```
|
|
123
218
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
Individual smoke tests:
|
|
219
|
+
Build the npm tarball and zip distribution:
|
|
127
220
|
|
|
128
221
|
```sh
|
|
129
|
-
|
|
130
|
-
node test/client-smoke.mjs
|
|
131
|
-
node test/skills-smoke.mjs
|
|
132
|
-
npm run test:integration
|
|
222
|
+
bash scripts/build-dist.sh
|
|
133
223
|
```
|
|
134
224
|
|
|
135
|
-
|
|
225
|
+
`lib/`, `artifacts/`, `dist/`, `*.tgz`, and `univer-dsh-plugin.zip` are generated and are not committed.
|
|
136
226
|
|
|
137
|
-
##
|
|
227
|
+
## Official package name
|
|
138
228
|
|
|
139
|
-
The following
|
|
229
|
+
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:
|
|
140
230
|
|
|
141
|
-
-
|
|
231
|
+
- `dsh-univer-plugin`
|
|
142
232
|
- `dsh-univer-office-suite`
|
|
143
233
|
- `dsh-univer-suite`
|
|
144
234
|
- `univer-office-suite`
|
|
145
235
|
- `univer-office`
|
|
146
236
|
|
|
147
|
-
**Always install the official package:**
|
|
148
|
-
|
|
149
|
-
```sh
|
|
150
|
-
dsh plugin --profile web add github:dream-num/dsh-univer-office # from git
|
|
151
|
-
dsh plugin --profile web add dsh-univer-office # from npm
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
## Metadata
|
|
155
|
-
|
|
156
|
-
- **Topic**: [`dsh-plugin`](https://github.com/topics/dsh-plugin)
|
|
157
|
-
- **Bundle manifest**: `dsh.bundle.patch` → `./cordis.patch.yml`
|
|
158
|
-
- **Client manifest**: `dsh.client` (`platform: "web"` + `inject`)
|
|
159
|
-
|
|
160
237
|
## License
|
|
161
238
|
|
|
162
239
|
[Apache-2.0](LICENSE)
|