@alpacachen/dsh-kanban 1.8.0 → 1.10.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.
- package/README.md +59 -16
- package/README.zh.md +59 -16
- package/docs/testing-images.md +36 -0
- package/index.js +306 -17
- package/lib/client.js +120 -27
- package/package.json +10 -8
- package/search.js +7 -0
package/README.md
CHANGED
|
@@ -22,6 +22,13 @@ A collaborative kanban board where you and your AI agent plan, organize, and shi
|
|
|
22
22
|
</tr>
|
|
23
23
|
</table>
|
|
24
24
|
|
|
25
|
+
## 1.10: search, images, and conversation attachments
|
|
26
|
+
|
|
27
|
+
- Search tasks at the top, then filter by **priority, label, or due date** beside the search field. Other actions live in **Settings** on the right.
|
|
28
|
+
- Upload, paste, or drop images into a task and open them in DSH's native image preview.
|
|
29
|
+
- Choose **Chat with agent** to place the task text and saved images in the composer for review before sending.
|
|
30
|
+
- Agents can attach workspace files or current-session images and read the image contents.
|
|
31
|
+
|
|
25
32
|
## 💡 Things to ask your agent
|
|
26
33
|
|
|
27
34
|
Start with work you actually need to move forward. Replace the project names and context below with your own, then send the prompt to your agent.
|
|
@@ -54,7 +61,7 @@ You can take over at any time—drag a card, refine a note, reorder a list—and
|
|
|
54
61
|
|
|
55
62
|
| 💬 Plan naturally | 🧭 Stay in control | ⚡ Start instantly |
|
|
56
63
|
| --- | --- | --- |
|
|
57
|
-
| Manage the board with
|
|
64
|
+
| Manage the board with 19 built-in `kanban_*` tools. | Edit, comment, drag, search, filter, and attach images from the UI. | Install the prebuilt plugin—no frontend setup required. |
|
|
58
65
|
| **🗂️ Keep work separate** | **🌓 Feel at home** | **🤝 Share one source of truth** |
|
|
59
66
|
| Every DSH workspace gets its own board. | Follows your DSH language, theme, and dark mode. | You and the agent always see the same tasks and status. |
|
|
60
67
|
|
|
@@ -62,6 +69,12 @@ You can take over at any time—drag a card, refine a note, reorder a list—and
|
|
|
62
69
|
|
|
63
70
|
### 1. Install
|
|
64
71
|
|
|
72
|
+
Verified with Web Host **0.2.0-rc.2** and desktop **0.2.1-rc.3**. Version 1.10 uses DSH's newer preview and conversation-attachment APIs; upgrade DSH first if you are on 0.1.5.
|
|
73
|
+
|
|
74
|
+
**Desktop:** open **Plugins**, add `@alpacachen/dsh-kanban`, and enable it. The desktop app manages installation.
|
|
75
|
+
|
|
76
|
+
**Web:**
|
|
77
|
+
|
|
65
78
|
```sh
|
|
66
79
|
dsh plugin --profile web add @alpacachen/dsh-kanban
|
|
67
80
|
```
|
|
@@ -92,24 +105,35 @@ The cards appear directly on your board. Continue in conversation, or switch to
|
|
|
92
105
|
|
|
93
106
|
### On the Board
|
|
94
107
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
- Filter the entire board by priority, label, and due date from the toolbar; combine filters or show only unlabeled cards
|
|
107
|
-
- Clear any filter with **All**, or manually refresh the board whenever needed
|
|
108
|
-
- Use **Feedback · GitHub** at the bottom of the toolbar to report an issue or suggest an improvement
|
|
108
|
+
| Action | How it works |
|
|
109
|
+
| --- | --- |
|
|
110
|
+
| Find tasks | Search card IDs, titles, descriptions, and comments; the three adjacent buttons filter by priority, label, and due date. |
|
|
111
|
+
| Manage the board | **Settings** at the top right contains refresh, column editing, label editing, and **Feedback · GitHub**. |
|
|
112
|
+
| Move work forward | Create, edit, delete, and drag cards; add color-coded labels and P0 / P1 / P2 priorities. |
|
|
113
|
+
| Read task details | A resizable side drawer remembers its width and fills narrow screens; descriptions support Markdown editing and preview. |
|
|
114
|
+
| Attach images | Choose files, paste from the clipboard, or drag images in; see counts on cards and preview, remove, or retry in task details. |
|
|
115
|
+
| Track dates | Set due dates, find tasks due today or overdue, and record completion dates automatically when cards enter the completion column. |
|
|
116
|
+
| Collaborate | Exchange comments, inspect the activity timeline, or continue a task in the current conversation or a new one. |
|
|
117
|
+
|
|
118
|
+
Click **Save** to apply text and Markdown edits; **Done editing** only switches back to preview. Active filters appear below the toolbar. Remove a filter with its × button or choose **All** in its menu.
|
|
109
119
|
|
|
110
120
|
### Continue any card with your agent
|
|
111
121
|
|
|
112
|
-
Open a card and choose **Chat with agent**. dsh-kanban carries its ID, title, label, due date, and notes into either the current conversation or a fresh one
|
|
122
|
+
Open a card and choose **Chat with agent**. dsh-kanban carries its ID, title, label, due date, and notes into either the current conversation or a fresh one. Saved images are also added to the target composer as previewable, removable attachments. Text and images remain an editable draft until you choose to send it. An image-read failure keeps the task dialog open with an error for retry.
|
|
123
|
+
|
|
124
|
+
### Search tasks
|
|
125
|
+
|
|
126
|
+
Search covers the current workspace's card ID, title, complete description, and comment text. It matches a literal substring, ignores case and surrounding whitespace, and combines with all active filters using AND. It preserves card order and resets when switching workspaces. The agent uses the same search through `kanban_get` with `{"query":"login"}`.
|
|
127
|
+
|
|
128
|
+
### Add and preview images
|
|
129
|
+
|
|
130
|
+
Images support PNG, JPEG, and WebP, up to 10 MiB each and 10 images per card; the DSH Host can impose stricter format or size limits. In a new card, selected images stay in the browser until **Save** creates the card. If an upload fails, the created card and successful images remain saved, and the drawer keeps failed files for retry without creating another card. Canceling before creation uploads nothing. For an existing card, image uploads and removals save immediately; text edits still require **Save**. Unsupported Hosts or workspaces that cannot persist data show an upload-unavailable message.
|
|
131
|
+
|
|
132
|
+
Click a thumbnail to open DSH's native full-size preview. Escape, the close button, or the backdrop returns to task details. Image contents are not included in text search; OCR is not supported.
|
|
133
|
+
|
|
134
|
+
### Data and backups
|
|
135
|
+
|
|
136
|
+
Each card has an `images` array containing only `attachmentId`, `mediaType`, `bytes`, `width`, and `height` per image. Names and captions are not saved. Schema v6 adds `images: []` to existing cards and backs up the old board file before migration. The workspace's `.dsh-kanban.json` holds image references; image files live in DSH's native attachment store under its DSH home, shared independently of a particular workspace or conversation. Back up both the board file and the DSH attachment store to preserve images. Removing an image or card removes the association, not the shared image object.
|
|
113
137
|
|
|
114
138
|
### In conversation
|
|
115
139
|
|
|
@@ -119,17 +143,36 @@ The plugin automatically gives the agent these tools in every workspace:
|
|
|
119
143
|
| --- | --- |
|
|
120
144
|
| **Board** | `kanban_get`, `kanban_set_completed_column` |
|
|
121
145
|
| **Cards** | `kanban_get_card`, `kanban_add_comment`, `kanban_add_card`, `kanban_update_card`, `kanban_delete_card`, `kanban_move_card` |
|
|
146
|
+
| **Images** | `kanban_add_image`, `kanban_read_image`, `kanban_remove_image` |
|
|
122
147
|
| **Lists** | `kanban_add_column`, `kanban_rename_column`, `kanban_delete_column`, `kanban_move_column` |
|
|
123
148
|
| **Labels** | `kanban_get_label`, `kanban_add_label`, `kanban_update_label`, `kanban_delete_label` |
|
|
124
149
|
|
|
150
|
+
For images, create the card first and use the returned `cardId` as `id`. Call `kanban_add_image` with one of these argument objects:
|
|
151
|
+
|
|
152
|
+
```json
|
|
153
|
+
{"id":"k1","source":{"kind":"workspace_file","path":"screenshots/login.png"}}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
```json
|
|
157
|
+
{"id":"k1","source":{"kind":"session_attachment","attachmentId":"sha256:<actual attachment hash>"}}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The file path must be relative to the current workspace and stay inside it. A session attachment must actually belong to the executing agent's current session; use its real ID, not a fabricated hash. Do not pass base64 or a remote URL. Repeating the same image does not create another association. `kanban_get` returns image counts; `kanban_get_card` returns the five-field references. Use `kanban_read_image` with `{"id":"k1","attachmentId":"sha256:<actual attachment hash>"}` to inspect pixels, or `kanban_remove_image` with the same arguments to detach it. Both verify that the image belongs to that card in the current workspace.
|
|
161
|
+
|
|
125
162
|
For `kanban_add_card` and `kanban_update_card`, the task description uses the existing `note` field: send raw Markdown with line breaks, not HTML. Headings, lists, tables and fenced code blocks are rendered in task details. Keep the source within 2,000 characters, including Markdown syntax and newlines; longer input is truncated with a warning. Before editing a description, read `kanban_get_card` for its complete Markdown source (`kanban_get` only returns a summary). Updating `note` replaces the whole description; omit it to preserve the current text, or pass an empty string to clear it. Comments remain plain text.
|
|
126
163
|
|
|
127
164
|
For due dates, `kanban_add_card` and `kanban_update_card` accept `dueDate` as a real calendar date in `YYYY-MM-DD` format. Omit it to keep the current date (new cards default to none); use `null` or an empty string to clear it. Dates have no time or timezone: a task due today becomes overdue the next local calendar day. Resolve phrases such as “this Friday” against the user's local date and confirm the concrete date instead of sending relative text or a UTC timestamp. Both `kanban_get` and `kanban_get_card` return the date and the board's `completedColumnId`.
|
|
128
165
|
|
|
166
|
+
Completion dates are recorded automatically when a card enters the configured completion list (including creation there). Reopening clears the date; completing again records a new timestamp. Edits, comments, same-list sorting, and column renames/reordering preserve it. Card details show the local completion time next to the due date; it is read-only. Both read tools return `completedAt` as a UTC ISO timestamp, or `null`. A completed card with `null` has an unknown completion time. Changing or clearing the completion list resets completion dates; existing cards in the newly selected list have unknown dates. Deleting a list applies the same completion rules to its automatic card moves. When upgrading from a schema older than v5, historical completion times remain unknown rather than being inferred from the activity log.
|
|
167
|
+
|
|
129
168
|
Use `kanban_set_completed_column` with an existing `columnId` to designate the finished stage, or `null` to clear it. New boards use their default Done column; existing boards need an explicit choice. Completion follows the column ID through renames and reordering, and deleting that column clears the setting. Cards in the completion column keep their dates but are excluded from **Due today** and **Overdue** filters; moving them out resumes date checks. There are no automatic reminders or date-based reordering.
|
|
130
169
|
|
|
131
170
|
> Set the payment integration task's due date to this Friday, then show me unfinished tasks that are due today or overdue so I can decide what to tackle first.
|
|
132
171
|
|
|
172
|
+
## Development
|
|
173
|
+
|
|
174
|
+
Use Node.js 26 and pnpm 11.8.0. See [validation instructions](docs/testing-images.md) for builds, regression tests, and isolated image integration checks.
|
|
175
|
+
|
|
133
176
|
## License
|
|
134
177
|
|
|
135
178
|
MIT
|
package/README.zh.md
CHANGED
|
@@ -22,6 +22,13 @@
|
|
|
22
22
|
</tr>
|
|
23
23
|
</table>
|
|
24
24
|
|
|
25
|
+
## 1.10:搜索、图片与对话附件
|
|
26
|
+
|
|
27
|
+
- 在顶部搜索任务,紧接搜索框按**优先级、标签、截止日期**筛选;其余操作集中在右侧**设置**菜单。
|
|
28
|
+
- 在任务中上传、粘贴或拖入图片,使用 DSH 原生图片预览查看大图。
|
|
29
|
+
- 点击「与 Agent 聊一聊」,把任务文字和已保存的图片一起带入聊天框,确认后再发送。
|
|
30
|
+
- Agent 可从工作区文件或当前会话附件添加图片,也能读取图片内容。
|
|
31
|
+
|
|
25
32
|
## 💡 你可以直接这样说
|
|
26
33
|
|
|
27
34
|
从你正在做的事开始。把下面例子里的项目名称和背景换成自己的,就可以直接发给 Agent。
|
|
@@ -54,7 +61,7 @@
|
|
|
54
61
|
|
|
55
62
|
| 💬 自然对话 | 🧭 随时掌控 | ⚡ 开箱即用 |
|
|
56
63
|
| --- | --- | --- |
|
|
57
|
-
| 通过
|
|
64
|
+
| 通过 19 个 `kanban_*` 工具直接管理任务。 | 在界面中编辑、评论、拖拽、搜索、筛选和添加图片。 | 浏览器端已预构建,无需配置前端环境。 |
|
|
58
65
|
| **🗂️ 项目隔离** | **🌓 原生体验** | **🤝 实时协作** |
|
|
59
66
|
| 每个 DSH 工作区都有自己的独立看板。 | 自动跟随 DSH 的语言、主题与暗色模式。 | 你做的调整,Agent 立即可见;反之亦然。 |
|
|
60
67
|
|
|
@@ -62,6 +69,12 @@
|
|
|
62
69
|
|
|
63
70
|
### 1. 安装
|
|
64
71
|
|
|
72
|
+
已验证:Web Host **0.2.0-rc.2**、桌面端 **0.2.1-rc.3**。1.10 使用新版 DSH 原生预览和对话附件接口;旧版 0.1.5 用户应先升级 DSH。
|
|
73
|
+
|
|
74
|
+
**桌面端:**打开「插件」,添加 `@alpacachen/dsh-kanban` 并启用,由桌面端管理安装。
|
|
75
|
+
|
|
76
|
+
**Web:**
|
|
77
|
+
|
|
65
78
|
```sh
|
|
66
79
|
dsh plugin --profile web add @alpacachen/dsh-kanban
|
|
67
80
|
```
|
|
@@ -92,24 +105,35 @@ dsh --profile web --dump-config
|
|
|
92
105
|
|
|
93
106
|
### 在「看板」标签页中
|
|
94
107
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
- 在工具栏按优先级、标签和截止日期筛选整个看板,可组合筛选或只看无标签卡片
|
|
107
|
-
- 选择「全部」清除对应筛选,也可以随时手动刷新
|
|
108
|
-
- 点击工具栏底部的「反馈与建议 · GitHub」,提交问题或功能建议
|
|
108
|
+
| 操作 | 使用方式 |
|
|
109
|
+
| --- | --- |
|
|
110
|
+
| 查找任务 | 顶部搜索卡片 ID、标题、描述、评论;右侧三个按钮按优先级、标签、截止日期筛选。 |
|
|
111
|
+
| 管理看板 | 右上角**设置**菜单提供刷新、列编辑、标签编辑和「反馈与建议 · GitHub」。 |
|
|
112
|
+
| 推进任务 | 创建、编辑、删除卡片,拖动排序或移到其他列,添加彩色标签与 P0 / P1 / P2 优先级。 |
|
|
113
|
+
| 查看详情 | 可调整宽度的侧边抽屉,窄屏自动铺满;描述支持 Markdown 编辑与预览。 |
|
|
114
|
+
| 添加图片 | 文件选择、剪贴板粘贴、拖拽上传;卡片展示图片数量,详情中可预览、移除和重试。 |
|
|
115
|
+
| 跟踪时间 | 设置截止日期,查看今天到期或逾期任务;进入完成列后自动记录完成日期。 |
|
|
116
|
+
| 协作记录 | 与 Agent 互相评论,查看活动时间线,或将任务带入当前/新会话继续处理。 |
|
|
117
|
+
|
|
118
|
+
文字和 Markdown 描述编辑后点击**保存**;**完成编辑**只切回预览。筛选条件在工具栏下方显示,点击条件的 × 或在对应菜单选择「全部」即可清除。
|
|
109
119
|
|
|
110
120
|
### 从任意卡片继续与 Agent 协作
|
|
111
121
|
|
|
112
|
-
打开卡片并选择 **「与 Agent 聊一聊」**,dsh-kanban 会把卡片 ID
|
|
122
|
+
打开卡片并选择 **「与 Agent 聊一聊」**,dsh-kanban 会把卡片 ID、标题、标签、截止日期和备注带入当前会话或一个新会话。已保存的图片会一起加入目标聊天框,显示为可预览、可移除的附件。文字和图片都只进入草稿,由你确认后发送,不会自动提交;读取图片失败时会保留任务详情并提示重试。
|
|
123
|
+
|
|
124
|
+
### 搜索任务
|
|
125
|
+
|
|
126
|
+
搜索范围是当前工作区的卡片 ID、标题、完整描述和评论正文,按连续子串匹配,忽略大小写及首尾空格。搜索与所有已选筛选条件取交集,保留原有卡片顺序,切换工作区后清空。Agent 通过 `kanban_get` 的 `{"query":"登录"}` 参数使用相同规则。
|
|
127
|
+
|
|
128
|
+
### 添加与查看图片
|
|
129
|
+
|
|
130
|
+
支持 PNG、JPEG、WebP,每张最多 10 MiB,每张卡片最多 10 张;DSH Host 可进一步限制格式或大小。新建卡片时,选中的图片先保留在浏览器,点击**「保存」**成功创建任务后再上传。部分上传失败时,任务和成功的图片已保存,详情保留失败文件供重试,不会重复建卡。创建前取消不会上传。已有卡片的图片上传和移除立即保存,文字修改仍需点击**「保存」**。Host 不支持图片或工作区无法持久保存时,界面会提示无法上传。
|
|
131
|
+
|
|
132
|
+
点击缩略图打开 DSH 原生大图预览;按 Esc、点击关闭按钮或遮罩返回任务详情。图片不会加入文字搜索范围,暂不提供 OCR。
|
|
133
|
+
|
|
134
|
+
### 数据与备份
|
|
135
|
+
|
|
136
|
+
卡片的 `images` 数组中,每张图片只保存 `attachmentId`、`mediaType`、`bytes`、`width`、`height` 五个字段,不保存文件名和说明。数据格式 v6 为旧卡片补充 `images: []`,迁移前备份原看板文件。工作区的 `.dsh-kanban.json` 只保存引用,图片文件保存在 DSH home 下的原生附件存储中,独立于具体工作区或会话,可被复用。备份时需要同时保留看板文件与 DSH 附件存储。移除图片或删除卡片只解除关联,不物理删除共享图片。
|
|
113
137
|
|
|
114
138
|
### 在对话中
|
|
115
139
|
|
|
@@ -119,17 +143,36 @@ dsh --profile web --dump-config
|
|
|
119
143
|
| --- | --- |
|
|
120
144
|
| **看板** | `kanban_get`、`kanban_set_completed_column` |
|
|
121
145
|
| **卡片** | `kanban_get_card`、`kanban_add_comment`、`kanban_add_card`、`kanban_update_card`、`kanban_delete_card`、`kanban_move_card` |
|
|
146
|
+
| **图片** | `kanban_add_image`、`kanban_read_image`、`kanban_remove_image` |
|
|
122
147
|
| **列表** | `kanban_add_column`、`kanban_rename_column`、`kanban_delete_column`、`kanban_move_column` |
|
|
123
148
|
| **标签** | `kanban_get_label`、`kanban_add_label`、`kanban_update_label`、`kanban_delete_label` |
|
|
124
149
|
|
|
150
|
+
Agent 添加图片时,先创建卡片,再把返回的 `cardId` 作为 `id`。调用 `kanban_add_image`,参数任选一种来源:
|
|
151
|
+
|
|
152
|
+
```json
|
|
153
|
+
{"id":"k1","source":{"kind":"workspace_file","path":"screenshots/login.png"}}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
```json
|
|
157
|
+
{"id":"k1","source":{"kind":"session_attachment","attachmentId":"sha256:<实际附件哈希>"}}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
文件路径必须相对于当前工作区,且不能越过工作区边界。会话附件必须真实存在于执行 Agent 的当前会话中,使用真实 ID,不猜测哈希;不传 base64 或远程 URL。重复添加同一图片不会重复关联。`kanban_get` 返回图片数量,`kanban_get_card` 返回五字段图片引用。查看图片时调用 `kanban_read_image`,参数为 `{"id":"k1","attachmentId":"sha256:<实际附件哈希>"}`;移除时用相同参数调用 `kanban_remove_image`。两者都会校验图片属于当前工作区的指定卡片。
|
|
161
|
+
|
|
125
162
|
`kanban_add_card` 和 `kanban_update_card` 的任务描述仍使用 `note` 字段,传入保留换行的 Markdown 原文,不传 HTML。任务详情会渲染标题、列表、表格和代码块。原文最多 2,000 字符,Markdown 标记和换行也计入长度,超出会截断并返回警告。修改已有描述前,应先调用 `kanban_get_card` 读取完整原文(`kanban_get` 只返回摘要)。传入 `note` 会替换整段描述;省略则保留原文,传空字符串则清空。评论仍为纯文本。
|
|
126
163
|
|
|
164
|
+
完成日期在卡片进入完成列时自动记录(包括直接在完成列创建),移出时清空,再次完成时记录新时间。修改内容、评论、同列排序和列改名/排序不影响完成日期。卡片详情在截止日期旁以本地时区只读展示;两个读取工具均返回 UTC ISO 时间戳 `completedAt` 或 `null`,已完成卡片的 `null` 表示时间未知。更换或清除完成列会重置完成时间,新完成列中已有卡片显示未知;删除列引发自动移动时也遵循进入/离开完成状态的规则。从 v5 之前的数据升级时,历史完成时间保留未知,不根据活动日志推测。
|
|
165
|
+
|
|
127
166
|
`kanban_add_card` 和 `kanban_update_card` 可通过 `dueDate` 设置截止日期,值为真实有效的 `YYYY-MM-DD` 日期。省略则保留原日期(新卡片默认为无日期),传 `null` 或空字符串则清空。日期不含时间和时区:今天到期的任务到本地次日才算逾期。「本周五」等相对日期应由 Agent 按用户本地日期换算,并向用户确认具体日期,不要直接传相对文本或 UTC 时间戳。`kanban_get` 和 `kanban_get_card` 都会返回截止日期与看板的 `completedColumnId`。
|
|
128
167
|
|
|
129
168
|
使用 `kanban_set_completed_column`,传已有的 `columnId` 指定完成列,传 `null` 清除设置。新看板默认使用 Done,已有看板需要明确选择一次。设置跟随列 ID,改名和排序不影响;删除完成列会清除设置。完成列中的卡片保留日期,但不计入「今天到期」和「已逾期」筛选,移回其他列后恢复判断。暂不包含自动提醒和按日期自动排序。
|
|
130
169
|
|
|
131
170
|
> 把「支付联调」的截止日期设为本周五,再列出今天到期和已经逾期的未完成任务,方便我安排先做哪几件事。
|
|
132
171
|
|
|
172
|
+
## 开发与验证
|
|
173
|
+
|
|
174
|
+
使用 Node.js 26 与 pnpm 11.8.0。构建、回归测试及隔离图片集成检查见[验证说明](docs/testing-images.md)。
|
|
175
|
+
|
|
133
176
|
## 开源许可
|
|
134
177
|
|
|
135
178
|
MIT
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Validation
|
|
2
|
+
|
|
3
|
+
Use Node.js 26 and pnpm 11.8.0. The committed `lib/client.js` is the distributable client bundle.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
pnpm install --frozen-lockfile
|
|
7
|
+
pnpm typecheck
|
|
8
|
+
pnpm test
|
|
9
|
+
pnpm build
|
|
10
|
+
pnpm check:client-bundle
|
|
11
|
+
pnpm check:package
|
|
12
|
+
git diff --exit-code -- lib/client.js
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`pnpm test` covers unit/component contracts, schema migration and the persistence pipeline. Component tests substitute the Host UI boundary; they do not establish native desktop behavior. `pnpm build` must reproduce the committed bundle after source changes have been built and committed.
|
|
16
|
+
|
|
17
|
+
## Native image storage
|
|
18
|
+
|
|
19
|
+
With an installed DSH runtime that provides `@deepseek-ai/dsh-fs-local`, `@deepseek-ai/dsh-attachment-local`, and `sharp`:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
DSH_RUNTIME_ROOT=/path/to/dsh/node_modules node scripts/test-agent-images-native.mjs
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This test creates its own temporary workspace and attachment store. It covers decoding and persistence, five-field references, real image content blocks, symlink/cross-card rejection and reloading after a fresh Cordis context. The current-session authorization controller is a fixture; no model is called.
|
|
26
|
+
|
|
27
|
+
## Optional isolated Host checks
|
|
28
|
+
|
|
29
|
+
- `scripts/test-images-integration.mjs`: real HTTP upload/read/remove and native persistence. Requires an explicitly supplied temporary `DSH_TEST_HOME`, loopback `DSH_TEST_URL`, temporary `DSH_TEST_WORKSPACE_ID`, `DSH_TEST_LOG`, and `DSH_RUNTIME_ROOT`. Set `PLAYWRIGHT_MODULE` if Playwright is not locally resolvable. Never point it at a personal profile.
|
|
30
|
+
- `scripts/test-search-images-browser.mjs`: actual client bundle and Host theme with intercepted API fixtures for upload failures, retries, search, and responsive screenshots. Configure `DSH_TEST_URL`, `PLAYWRIGHT_MODULE`, and optionally `CHROME_PATH`, `DSH_TEST_LOG`, and `UI_SCREENSHOT_DIR`. It is not a real-backend test.
|
|
31
|
+
|
|
32
|
+
Keep authentication logs, generated reports, and personal-workspace screenshots out of commits.
|
|
33
|
+
|
|
34
|
+
## Desktop acceptance
|
|
35
|
+
|
|
36
|
+
Verify the actual installed plugin: search and the three adjacent filters, Settings actions, image selection/paste/drop, native full-size preview, Escape/close/backdrop behavior, and task-draft preservation. Check both current- and new-conversation handoff: saved task images must appear as removable composer attachments without submitting the message. Use disposable test tasks for writes.
|