dsh-typst-plugin 0.0.0-stage → 0.1.0

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.
Files changed (129) hide show
  1. package/LICENSE +21 -0
  2. package/README.en.md +121 -0
  3. package/README.md +120 -2
  4. package/cordis.patch.yml +6 -0
  5. package/docs/images/icon.png +0 -0
  6. package/docs/plugin-detail.en.md +2 -0
  7. package/docs/plugin-detail.md +2 -0
  8. package/lib/client.js +41996 -0
  9. package/lib/client.js.map +7 -0
  10. package/lib/config.d.ts +107 -0
  11. package/lib/config.d.ts.map +1 -0
  12. package/lib/config.js +167 -0
  13. package/lib/config.js.map +1 -0
  14. package/lib/constants.d.ts +77 -0
  15. package/lib/constants.d.ts.map +1 -0
  16. package/lib/constants.js +85 -0
  17. package/lib/constants.js.map +1 -0
  18. package/lib/contract.d.ts +263 -0
  19. package/lib/contract.d.ts.map +1 -0
  20. package/lib/contract.js +9 -0
  21. package/lib/contract.js.map +1 -0
  22. package/lib/diagnostic-text.d.ts +13 -0
  23. package/lib/diagnostic-text.d.ts.map +1 -0
  24. package/lib/diagnostic-text.js +28 -0
  25. package/lib/diagnostic-text.js.map +1 -0
  26. package/lib/errors.d.ts +119 -0
  27. package/lib/errors.d.ts.map +1 -0
  28. package/lib/errors.js +161 -0
  29. package/lib/errors.js.map +1 -0
  30. package/lib/host/facts.d.ts +31 -0
  31. package/lib/host/facts.d.ts.map +1 -0
  32. package/lib/host/facts.js +145 -0
  33. package/lib/host/facts.js.map +1 -0
  34. package/lib/host/which.d.ts +20 -0
  35. package/lib/host/which.d.ts.map +1 -0
  36. package/lib/host/which.js +50 -0
  37. package/lib/host/which.js.map +1 -0
  38. package/lib/index.d.ts +2 -0
  39. package/lib/index.d.ts.map +1 -0
  40. package/lib/index.js +2 -0
  41. package/lib/index.js.map +1 -0
  42. package/lib/remote.d.ts +70 -0
  43. package/lib/remote.d.ts.map +1 -0
  44. package/lib/remote.js +156 -0
  45. package/lib/remote.js.map +1 -0
  46. package/lib/service.d.ts +71 -0
  47. package/lib/service.d.ts.map +1 -0
  48. package/lib/service.js +213 -0
  49. package/lib/service.js.map +1 -0
  50. package/lib/skills/typst.d.ts +13 -0
  51. package/lib/skills/typst.d.ts.map +1 -0
  52. package/lib/skills/typst.js +78 -0
  53. package/lib/skills/typst.js.map +1 -0
  54. package/lib/status-codec.d.ts +11 -0
  55. package/lib/status-codec.d.ts.map +1 -0
  56. package/lib/status-codec.js +11 -0
  57. package/lib/status-codec.js.map +1 -0
  58. package/lib/tools/registration.d.ts +23 -0
  59. package/lib/tools/registration.d.ts.map +1 -0
  60. package/lib/tools/registration.js +758 -0
  61. package/lib/tools/registration.js.map +1 -0
  62. package/lib/tools/shared.d.ts +30 -0
  63. package/lib/tools/shared.d.ts.map +1 -0
  64. package/lib/tools/shared.js +79 -0
  65. package/lib/tools/shared.js.map +1 -0
  66. package/lib/typert.d.ts +25 -0
  67. package/lib/typert.d.ts.map +1 -0
  68. package/lib/typert.js +116 -0
  69. package/lib/typert.js.map +1 -0
  70. package/lib/typst/diagnostics.d.ts +58 -0
  71. package/lib/typst/diagnostics.d.ts.map +1 -0
  72. package/lib/typst/diagnostics.js +237 -0
  73. package/lib/typst/diagnostics.js.map +1 -0
  74. package/lib/typst/flags.d.ts +8 -0
  75. package/lib/typst/flags.d.ts.map +1 -0
  76. package/lib/typst/flags.js +8 -0
  77. package/lib/typst/flags.js.map +1 -0
  78. package/lib/typst/locate.d.ts +61 -0
  79. package/lib/typst/locate.d.ts.map +1 -0
  80. package/lib/typst/locate.js +152 -0
  81. package/lib/typst/locate.js.map +1 -0
  82. package/lib/typst/mainfile.d.ts +40 -0
  83. package/lib/typst/mainfile.d.ts.map +1 -0
  84. package/lib/typst/mainfile.js +136 -0
  85. package/lib/typst/mainfile.js.map +1 -0
  86. package/lib/typst/match.d.ts +67 -0
  87. package/lib/typst/match.d.ts.map +1 -0
  88. package/lib/typst/match.js +227 -0
  89. package/lib/typst/match.js.map +1 -0
  90. package/lib/typst/oneshot.d.ts +48 -0
  91. package/lib/typst/oneshot.d.ts.map +1 -0
  92. package/lib/typst/oneshot.js +86 -0
  93. package/lib/typst/oneshot.js.map +1 -0
  94. package/lib/typst/owners.d.ts +28 -0
  95. package/lib/typst/owners.d.ts.map +1 -0
  96. package/lib/typst/owners.js +98 -0
  97. package/lib/typst/owners.js.map +1 -0
  98. package/lib/typst/pdf-extract.d.ts +28 -0
  99. package/lib/typst/pdf-extract.d.ts.map +1 -0
  100. package/lib/typst/pdf-extract.js +111 -0
  101. package/lib/typst/pdf-extract.js.map +1 -0
  102. package/lib/typst/process.d.ts +73 -0
  103. package/lib/typst/process.d.ts.map +1 -0
  104. package/lib/typst/process.js +147 -0
  105. package/lib/typst/process.js.map +1 -0
  106. package/lib/typst/text.d.ts +62 -0
  107. package/lib/typst/text.d.ts.map +1 -0
  108. package/lib/typst/text.js +282 -0
  109. package/lib/typst/text.js.map +1 -0
  110. package/lib/typst/watcher.d.ts +76 -0
  111. package/lib/typst/watcher.d.ts.map +1 -0
  112. package/lib/typst/watcher.js +210 -0
  113. package/lib/typst/watcher.js.map +1 -0
  114. package/lib/wire-schemas.d.ts +433 -0
  115. package/lib/wire-schemas.d.ts.map +1 -0
  116. package/lib/wire-schemas.js +428 -0
  117. package/lib/wire-schemas.js.map +1 -0
  118. package/lib/workspace/containment.d.ts +25 -0
  119. package/lib/workspace/containment.d.ts.map +1 -0
  120. package/lib/workspace/containment.js +54 -0
  121. package/lib/workspace/containment.js.map +1 -0
  122. package/lib/workspace/session.d.ts +268 -0
  123. package/lib/workspace/session.d.ts.map +1 -0
  124. package/lib/workspace/session.js +1576 -0
  125. package/lib/workspace/session.js.map +1 -0
  126. package/locale/en.json +15 -0
  127. package/locale/zh.json +15 -0
  128. package/package.json +113 -4
  129. package/release-provenance.json +137 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Wenjie Xu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md ADDED
@@ -0,0 +1,121 @@
1
+ <div align="center">
2
+
3
+ # dsh-typst
4
+
5
+ <img
6
+ src="https://readme-typing-svg.demolab.com?font=JetBrains+Mono&weight=500&size=18&pause=2000&color=239DAD&center=true&vCenter=true&width=760&lines=%3E+Write+and+fix+Typst+documents+in+place.%3B%3E+Watch+every+save+redraw+the+page.%3B%3E+Hand+the+agent+diagnostics%2C+rendered+pages+and+PDF+export."
7
+ alt="dsh-typst"
8
+ />
9
+ <p align="center">
10
+ <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&amp;logo=deepseek&amp;logoColor=white" alt="powered by dsh" style="max-width:100%;"></a>
11
+ <a href="https://www.npmjs.com/package/dsh-typst-plugin"><img src="https://img.shields.io/npm/v/dsh-typst-plugin" alt="npm version" style="max-width:100%;"></a>
12
+ <a href="https://www.npmjs.com/package/dsh-typst-plugin"><img src="https://img.shields.io/npm/dm/dsh-typst-plugin" alt="npm downloads" style="max-width:100%;"></a>
13
+ <a href="https://www.npmjs.com/package/dsh-typst-plugin"><img src="https://img.shields.io/npm/l/dsh-typst-plugin" alt="license" style="max-width:100%;"></a>
14
+ <a href="https://github.com/deepseek-ai/deepseek-harness/releases"><img src="https://img.shields.io/badge/dsh-0.2.2--rc.5-blue" alt="dsh version" style="max-width:100%;"></a>
15
+ </p>
16
+ </div>
17
+
18
+ <p align="center">
19
+ <b>English</b> · <a href="README.md"><b>中文</b></a>
20
+ </p>
21
+
22
+ dsh-typst brings your local Typst installation into DeepSeek Harness. The agent writes and fixes `.typ` documents in conversation while the right sidebar shows the same live layout; after each save the visible page redraws in place and keeps its scroll position. The agent reads compile diagnostics with `file:line`, the source line, `hint:` lines and the call trace, looks at rendered pages, marks places in the preview, and exports PDFs. You can select text in the preview and hand it to the agent together with its source location.
23
+
24
+ ## Features
25
+
26
+ - **Document work in conversation**
27
+ - **Orient and compile**: `typst_status` reports the Typst version, path, main file, and latest compile. `typst_check` waits until every saved change has compiled, then returns location, source line, Typst `hint:`, and the call trace.
28
+ - **Repair loop**: after editing `.typ`, the agent runs `typst_check` until diagnostics clear; a failed compile keeps the last successful preview in the panel.
29
+ - **Inspect layout**: `typst_render_pages` renders up to 4 pages to PNG for checking overflow, image placement, and pagination.
30
+ - **Mark and export**: `typst_show` asks the user to view a page or highlights rendered text/source lines with a comment; `typst_clear_highlights` removes the marks; `typst_export_pdf` writes a PDF into the workspace with optional PDF standard and page selection.
31
+ - **Preview panel**
32
+ - **Live preview**: each save recompiles incrementally through `typst watch`, redraws the visible page in place, and keeps the scroll position; a sidebar resize refits the page and preserves the reading position.
33
+ - **Status and problems**: the toolbar shows compile phase, duration, and diagnostic counts. The Problems drawer filters by level, selects one or several diagnostics, opens the source or call-trace location, and puts a repair request into an editable draft.
34
+ - **Main file**: the menu groups the current main file, other Typst files, and fragments referenced by the current document; fragments come from Typst's own dependency report. The index skips hidden directories and `node_modules`, `target`, `__pycache__`, `venv`, `build`, `dist` by default, with an option to include them.
35
+ - **Setup guide**: when Typst is missing or too old, the guide lists detected facts, searched directories, and platform commands. Review a setup request before submitting; manual recheck and preview restart stay available.
36
+ - **Runtime**
37
+ - **Your compiler**: the plugin calls the Typst you installed, with the same fonts, packages, and version. Font directories, a `@local` package directory, and excluded directories are adjustable in settings.
38
+ - **Read and write boundary**: the agent edits `.typ` sources with its file tools, and the plugin reads them. Preview PDFs and rendered images live in the plugin cache `~/.dsh/cache/typst`; the export tool writes the workspace deliverable.
39
+ - **Network**: the plugin itself makes no network requests; Typst downloads `@preview` packages on first use as it does in a terminal.
40
+
41
+ ## Install
42
+
43
+ ### Desktop (plugin manager)
44
+
45
+ In DeepSeek Harness, open **Plugins** in the sidebar, click **Add plugin**, and enter one of:
46
+
47
+ - Latest (recommended): `dsh-typst-plugin`
48
+ - A specific version: `dsh-typst-plugin@0.1.0`
49
+ - GitHub prebuilt branch: `github:Vncntvx/dsh-typst#release`
50
+
51
+ ### Command line
52
+
53
+ ```sh
54
+ # latest from npm (recommended)
55
+ dsh plugin --profile <name> add dsh-typst-plugin
56
+
57
+ # a specific version
58
+ dsh plugin --profile <name> add dsh-typst-plugin@<version>
59
+
60
+ # the prebuilt GitHub branch
61
+ dsh plugin --profile <name> add github:Vncntvx/dsh-typst#release
62
+ ```
63
+
64
+ The npm package and the `#release` branch both ship built output, so a new session can use the plugin immediately. The **dsh-typst-plugin** detail page in the plugin manager exposes Typst path, font directories, package directory, and excluded directories.
65
+
66
+ ## Prerequisites
67
+
68
+ 1. Node.js 24.9 or later, and a DeepSeek Harness interface with the right docking sidebar; the plugin requires dsh 0.2.2-rc.5 or later.
69
+ 2. **Typst 0.12 or later** installed locally, for example `brew install typst` (macOS), `winget install --id Typst.Typst` (Windows), `cargo install --locked typst-cli`, or a release from <https://github.com/typst/typst/releases>.
70
+ 3. A workspace containing `.typ` files.
71
+
72
+ The plugin searches for `typst` in this order: the plugin settings path → PATH → common install locations (Homebrew, Cargo, `~/.local/bin`, Nix, Snap, WinGet, Scoop) → the login shell (for version managers such as mise or asdf). If Typst lives elsewhere, set **Typst path** in the plugin settings to an absolute path or a workspace-relative path.
73
+
74
+ ## Tools
75
+
76
+ | Tool | Purpose |
77
+ | ------------------------ | ------------------------------------------------------------------------------------------------------------------ |
78
+ | `typst_status` | Typst version and path, main file, other `.typ` files, latest compile result |
79
+ | `typst_set_main` | Choose the main `.typ` file, remembered per workspace |
80
+ | `typst_check` | Wait until every saved change has compiled, then report errors and warnings: location, source line, `hint:`, trace |
81
+ | `typst_render_pages` | Render up to 4 pages to PNG for the agent to inspect layout |
82
+ | `typst_show` | Ask the user to view a page, or highlight rendered text/source lines with a comment |
83
+ | `typst_clear_highlights` | Remove agent highlights |
84
+ | `typst_export_pdf` | Compile a PDF into the workspace, with optional PDF standard and page selection |
85
+
86
+ The `typst` skill ships with the plugin and guides the agent through orient, edit, check, inspect, point, and export. Parameters, return shapes, and error codes are in the [tool reference](docs/tools.en.md).
87
+
88
+ ## Documentation
89
+
90
+ ### Usage
91
+
92
+ | Document | Content |
93
+ | --------------------------------------------- | --------------------------------------------------------------------------------------------- |
94
+ | [Getting started](docs/getting-started.en.md) | Installation, connection check and the first task |
95
+ | [Product model](docs/product-model.en.md) | How the workbench, the panel and the agent tools divide the work, and the system's boundaries |
96
+ | [Features](docs/features.en.md) | Live preview, the Problems drawer, selection-to-source, agent highlights and export |
97
+ | [Troubleshooting](docs/troubleshooting.en.md) | Common symptoms, likely causes and what to do about them |
98
+
99
+ ### Maintenance
100
+
101
+ | Document | Content |
102
+ | --------------------------------------------------- | -------------------------------------------------------------------------------- |
103
+ | [Architecture](docs/architecture.en.md) | Component topology, data flow, state, concurrency, security and client contracts |
104
+ | [Tool reference](docs/tools.en.md) | The parameters and error codes of the 7 tools and of the panel's wire methods |
105
+ | [Configuration reference](docs/configuration.en.md) | Settings fields, the lookup order and the hot-reload behaviour |
106
+ | [Development guide](docs/development.en.md) | Build, debug, test and release |
107
+ | [Typst skill](docs/skills.en.md) | Four phases, budgets and evidence boundaries |
108
+ | [Development notes](docs/development-notes.en.md) | Upstream patches, compromises and exit conditions |
109
+
110
+ ## Development
111
+
112
+ ```sh
113
+ npm install # also builds lib/ through prepare
114
+ npm test # the test-lint guards + the full suite (including the session integration against a simulated typst CLI)
115
+ npm run typecheck # harness pin + the node, test, client, client-test and scripts tsc
116
+ npm run release:check
117
+ ```
118
+
119
+ ## License
120
+
121
+ MIT — see [LICENSE](./LICENSE).
package/README.md CHANGED
@@ -1,3 +1,121 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ # dsh-typst
4
+
5
+ <img
6
+ src="https://readme-typing-svg.demolab.com?font=JetBrains+Mono&weight=500&size=18&pause=2000&color=239DAD&center=true&vCenter=true&width=760&lines=%3E+Write+and+fix+Typst+documents+in+place.%3B%3E+Watch+every+save+redraw+the+page.%3B%3E+Hand+the+agent+diagnostics%2C+rendered+pages+and+PDF+export."
7
+ alt="dsh-typst"
8
+ />
9
+ <p align="center">
10
+ <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&amp;logo=deepseek&amp;logoColor=white" alt="powered by dsh" style="max-width:100%;"></a>
11
+ <a href="https://www.npmjs.com/package/dsh-typst-plugin"><img src="https://img.shields.io/npm/v/dsh-typst-plugin" alt="npm version" style="max-width:100%;"></a>
12
+ <a href="https://www.npmjs.com/package/dsh-typst-plugin"><img src="https://img.shields.io/npm/dm/dsh-typst-plugin" alt="npm downloads" style="max-width:100%;"></a>
13
+ <a href="https://www.npmjs.com/package/dsh-typst-plugin"><img src="https://img.shields.io/npm/l/dsh-typst-plugin" alt="license" style="max-width:100%;"></a>
14
+ <a href="https://github.com/deepseek-ai/deepseek-harness/releases"><img src="https://img.shields.io/badge/dsh-0.2.2--rc.5-blue" alt="dsh version" style="max-width:100%;"></a>
15
+ </p>
16
+ </div>
17
+
18
+ <p align="center">
19
+ <a href="README.en.md"><b>English</b></a> · <b>中文</b>
20
+ </p>
21
+
22
+ dsh-typst 把本机 Typst 接入 DeepSeek Harness。Agent 在对话中撰写、修复 `.typ` 文档,右侧边栏同步显示实时排版;每次保存后可见页面原地重绘并保持滚动位置。Agent 读取带 `file:line`、源码行、`hint:` 与调用链的编译诊断,查看渲染页,在预览中标出位置,导出 PDF。你在预览里选中文字,可连同对应源码位置交给 Agent。
23
+
24
+ ## 主要功能
25
+
26
+ - **对话中的文档工作**
27
+ - **定向与编译**:`typst_status` 读取 Typst 版本、路径、主文件与最近一次编译结果;`typst_check` 等到已保存的改动编译完,返回位置、源码行、Typst `hint:` 与调用链。
28
+ - **修复循环**:Agent 编辑 `.typ` 后立即 `typst_check`,直到诊断清空;编译失败时面板保留上一次成功的预览。
29
+ - **看排版**:`typst_render_pages` 把至多 4 页渲染成 PNG,检查溢出的行、图片位置与分页。
30
+ - **标注与导出**:`typst_show` 请求用户查看某页,或高亮渲染文字/源码行并附备注;`typst_clear_highlights` 移除标注;`typst_export_pdf` 把 PDF 写入工作区,可选 PDF 标准与页选择。
31
+ - **右侧预览面板**
32
+ - **实时预览**:每次保存经 `typst watch` 增量重编译,可见页面原地重绘,滚动位置保持;侧栏尺寸变化后重新适配,保留页内阅读位置。
33
+ - **状态与问题**:工具栏显示编译阶段、耗时与诊断数量;问题辅助区可按级别筛选、选择单条或多条、打开源码或调用链,并把修复请求放进可编辑草稿。
34
+ - **主文件**:菜单分为当前主文件、其他 Typst 文件与被当前文档引用的片段;片段来自 Typst 自己的依赖报告。索引默认跳过隐藏目录及 `node_modules`、`target`、`__pycache__`、`venv`、`build`、`dist`,勾选后可包含。
35
+ - **安装引导**:Typst 缺失或过旧时,引导页列出检测事实、查找目录与平台命令;安装请求先审阅再提交,手动检查与重启预览保持可用。
36
+ - **运行方式**
37
+ - **本机编译器**:插件调用你安装的 Typst,使用同一套字体、包与版本;字体目录、`@local` 包目录与排除目录可在设置里调整。
38
+ - **读写边界**:`.typ` 源文件由 Agent 的文件工具编辑,插件只读;预览 PDF 与渲染图存放在插件私有缓存 `~/.dsh/cache/typst`,工作区成品由导出工具写出。
39
+ - **网络**:插件自身不发起网络请求;Typst 首次使用 `@preview` 包时按终端行为下载。
40
+
41
+ ## 安装
42
+
43
+ ### 桌面端安装(插件管理器)
44
+
45
+ 在 DeepSeek Harness 桌面端打开侧栏的**插件**,点击**添加插件**,输入对应标识:
46
+
47
+ - 最新版(推荐):`dsh-typst-plugin`
48
+ - 指定版本:`dsh-typst-plugin@0.1.0`
49
+ - GitHub 预构建分支:`github:Vncntvx/dsh-typst#release`
50
+
51
+ ### 命令行安装
52
+
53
+ ```sh
54
+ # npm 安装最新版(推荐)
55
+ dsh plugin --profile <name> add dsh-typst-plugin
56
+
57
+ # 安装指定版本
58
+ dsh plugin --profile <name> add dsh-typst-plugin@<version>
59
+
60
+ # 从 GitHub 预构建分支安装
61
+ dsh plugin --profile <name> add github:Vncntvx/dsh-typst#release
62
+ ```
63
+
64
+ npm 包与 `#release` 分支都带构建产物,安装后新建会话即可使用。在插件管理器中打开 **dsh-typst-plugin** 详情页,可在配置区填写 Typst 路径、字体目录、包目录与排除目录。
65
+
66
+ ## 前置条件
67
+
68
+ 1. Node.js 24.9 或更高,以及一个带右侧停靠栏的 DeepSeek Harness 界面;插件要求 dsh 0.2.2-rc.5 或更高。
69
+ 2. 本机安装 **Typst 0.12 或更高**,例如 `brew install typst`(macOS)、`winget install --id Typst.Typst`(Windows)、`cargo install --locked typst-cli`,或从 <https://github.com/typst/typst/releases> 下载。
70
+ 3. 一个包含 `.typ` 文件的工作区。
71
+
72
+ 插件按顺序查找 `typst`:插件设置中的路径 → PATH → 常见安装位置(Homebrew、Cargo、`~/.local/bin`、Nix、Snap、WinGet、Scoop)→ 登录 shell(mise/asdf 等版本管理器)。装在别处时,在插件设置 **Typst 路径** 中填写可执行文件的路径,绝对路径或相对工作区的路径都可以。
73
+
74
+ ## 工具一览
75
+
76
+ | 工具 | 用途 |
77
+ | ------------------------ | ------------------------------------------------------------------------- |
78
+ | `typst_status` | Typst 版本与路径、主文件、其余 `.typ` 文件、最近一次编译结果 |
79
+ | `typst_set_main` | 选择主 `.typ` 文件,按工作区记忆 |
80
+ | `typst_check` | 等到已保存的改动全部编译完,再报错误与警告:位置、源码行、`hint:`、调用链 |
81
+ | `typst_render_pages` | 把至多 4 页渲染成 PNG,供 Agent 检查排版 |
82
+ | `typst_show` | 请求查看预览某页,或高亮渲染文字/源码行,附备注 |
83
+ | `typst_clear_highlights` | 移除 Agent 高亮 |
84
+ | `typst_export_pdf` | 编译 PDF 写入工作区,可选 PDF 标准与页选择 |
85
+
86
+ 技能 `typst` 随插件注册,指导 Agent 按定向、编辑、检查、看图、指向、导出的顺序工作。参数、返回值与错误码见[工具参考](docs/tools.md)。
87
+
88
+ ## 说明文档
89
+
90
+ ### 使用
91
+
92
+ | 文档 | 内容 |
93
+ | ----------------------------------- | ------------------------------------------------ |
94
+ | [快速入门](docs/getting-started.md) | 安装、连接验证与第一个任务 |
95
+ | [产品模型](docs/product-model.md) | 工作台、面板与 Agent 工具的分工,以及系统边界 |
96
+ | [功能概览](docs/features.md) | 实时预览、问题辅助区、选中定位、Agent 高亮与导出 |
97
+ | [故障排查](docs/troubleshooting.md) | 常见现象、可能原因与处理方式 |
98
+
99
+ ### 维护
100
+
101
+ | 文档 | 内容 |
102
+ | ------------------------------------- | -------------------------------------------- |
103
+ | [系统架构](docs/architecture.md) | 组件拓扑、数据流、状态、并发、安全与端侧契约 |
104
+ | [工具参考](docs/tools.md) | 7 个工具与面板 wire 方法的参数与错误码 |
105
+ | [配置参考](docs/configuration.md) | 设置字段、查找顺序与热重载行为 |
106
+ | [开发指南](docs/development.md) | 构建、调试、测试与发布流程 |
107
+ | [Typst 技能](docs/skills.md) | 四阶段工作流、预算与证据边界 |
108
+ | [开发留意](docs/development-notes.md) | 上游补丁、妥协与退出条件 |
109
+
110
+ ## 开发
111
+
112
+ ```sh
113
+ npm install # 同时通过 prepare 构建 lib/
114
+ npm test # 测试规范守卫 + 全部测试(含对模拟 typst CLI 的 session 集成)
115
+ npm run typecheck # harness 引脚 + node/test/client/client-test/scripts 五套 tsc
116
+ npm run release:check
117
+ ```
118
+
119
+ ## 许可证
120
+
121
+ 本项目遵循 [MIT 许可证](./LICENSE)。
@@ -0,0 +1,6 @@
1
+ # This patch is used when the plugin is installed as a dsh bundle.
2
+ # The `name` refers to the package name, so Node module resolution can find it.
3
+ - insert:
4
+ - id: typst
5
+ name: dsh-typst-plugin
6
+ config: {}
Binary file
@@ -0,0 +1,2 @@
1
+ - **Core** (`dsh-typst`): local Typst discovery, watch lifecycle, exact snapshots, seven agent tools and the typst skill.
2
+ - **Preview panel**: explicit main-file selection, continuous or single-page reading, responsive zoom, and bottom Outline, Problems and Annotations views. Append text to the main composer; review text or screenshot requests before submission. Agent locations notify first; state and drafts follow each tab.
@@ -0,0 +1,2 @@
1
+ - **核心组件**(`dsh-typst`):本机 Typst 定位、watch 生命周期、精确快照、七个 Agent 工具与 typst 技能。
2
+ - **预览面板**:主动选择主文件,连续或单页阅读,自适应缩放;底部大纲、问题和标注辅助区。文字追加主输入框草稿,文字与截图请求审阅后提交。Agent 位置先通知,状态与草稿按标签保留。