deepseek-harness-intelligent-ui 0.2.7 → 0.2.9
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/CHANGELOG.md +40 -1
- package/README.md +5 -1
- package/README.zh-CN.md +5 -1
- package/THIRD_PARTY_NOTICES.md +6 -0
- package/client/client.js +96 -30
- package/package.json +3 -1
- package/renderer/renderer.js +93 -29
- package/src/catalog/catalog.js +34 -13
- package/src/catalog/patch.js +24 -2
- package/src/commands.js +4 -2
- package/src/compose/compose.js +195 -0
- package/src/compose/constants.js +6 -0
- package/src/config.js +3 -0
- package/src/guidance.js +25 -7
- package/src/plugin.js +7 -3
- package/src/portable/artifacts.js +53 -6
- package/src/tools/compose.js +134 -0
- package/src/tools/patch.js +10 -4
- package/src/tools/render.js +3 -3
- package/src/tools/widget.js +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,10 +6,47 @@ All notable changes to this project are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.2.9]
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- `ui_render` and `ui_compose` catalog blocks: the tool schema and description now say that the top-level `root` field is required, and a call without it gets an error that says how to fix it. In real-model runs DeepSeek models often named the first component `"root"` but left out the `root` field, so the first call was refused and had to be retried ([#62](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/pull/62)).
|
|
14
|
+
- Release publication verification: wait up to 10 minutes (30 attempts) for npm registry propagation to avoid false-alarm verification failures ([#56](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/pull/56)).
|
|
15
|
+
- Evaluation routing: guard against missing chart properties and empty block lists, accept local OpenAI-compatible HTTP endpoints via `DEEPSEEK_EVAL_ENDPOINT`, and judge delivery on inline widgets instead of workspace tool calls ([#59](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/pull/59), [#61](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/pull/61)).
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- [docs/presentation-routing.md](docs/presentation-routing.md) records the presentation-routing study for [#58](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/issues/58): rule overlaps, four comparable projects, and a real-model A/B (DeepSeek V4.1 Flash, 3 runs × 39 cases) in which a rewritten decision-order guidance did not route better than the current one (114/117 vs. 111/117 routed correctly), so the current guidance is kept ([#64](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/pull/64)).
|
|
20
|
+
- Real-model evaluation group F: paired presentation-routing cases for [#58](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/issues/58). Each pair keeps the topic and changes only the task, so a prompt cannot score well by always or never drawing UI; the whole answer is judged (explanation, code, interaction, the user's own data), not just the tool name. Categories `no-ui`, `needs-ui` and `update` report the unnecessary-UI rate, the missed-UI rate and follow-up edits separately. API cases also record prompt and completion tokens ([#59](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/pull/59)).
|
|
21
|
+
- Storefront screenshots manifest: `screenshots.json` declares the showcase screenshots and order for plugin markets like `dshmarket`.
|
|
22
|
+
- [CONTRIBUTING.md](CONTRIBUTING.md) guide covering development setup, the committed-bundle rule, test layout, required CI checks, translations, PR automation, and release integrity rules ([#57](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/pull/57)).
|
|
23
|
+
|
|
24
|
+
## [0.2.8]
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- `ui_compose`: one answer whose ordered blocks interleave markdown prose with the existing declarative catalog and the existing sandboxed widget, for analysis, teaching and sectioned reports where UI must sit between paragraphs ([#48](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/pull/48)). Blocks reuse the existing validators, renderers and sandbox; each catalog block is patchable in place as `<composition uiId>#<block id>`, and block-level session identity keeps same-named components in different blocks independent. The finished composition is shown beneath the reply with a "Copy text" action, and the portable renderer accepts a `composition` artifact. New `enableCompose` setting (default on).
|
|
29
|
+
|
|
30
|
+
- `Choice` single-choice card with "Continue in this session" / "Start new session", and Button `sessionTarget: "new"` to start an independent Agent session in the same workspace, so a decision can be confirmed without typing.
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- CI runs the full macOS matrix only nightly, on demand and for releases; pull requests and pushes to `main` cover every other cell ([#49](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/pull/49)).
|
|
35
|
+
- Repository automation: new issues are classified with existing labels, and pull requests receive a Chinese static review bound to the reviewed commit ([#50](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/pull/50), [#51](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/pull/51), [#54](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/pull/54)). The bots run trusted default-branch code only, read PR content through the API, review in batches so no file is dropped, and never approve or merge.
|
|
36
|
+
- The 0.2.7 changelog described `ui_compose` before it shipped; it is released for the first time here.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- Composition state is restored from history only when the receipt and capability checks passed, so a rejected composition cannot become a patchable UI after a reload.
|
|
41
|
+
- Retrying a patched block reuses its original session instead of creating a second one, and widget runtime errors are surfaced in both the DSH client and the standalone renderer.
|
|
42
|
+
- The option picker no longer draws a full-row focus ring, and choosing an option focuses the action instead of the row.
|
|
43
|
+
|
|
9
44
|
## [0.2.7]
|
|
10
45
|
|
|
11
46
|
### Added
|
|
12
47
|
|
|
48
|
+
- `ui_compose`: one answer whose ordered blocks interleave markdown prose with the existing declarative catalog and the existing sandboxed widget, for analysis, teaching and sectioned reports where UI must sit between paragraphs. Blocks reuse the existing validators, renderers and sandbox; each catalog block is patchable in place as `<composition uiId>#<block id>`. New `enableCompose` setting (default on). The finished composition is shown beneath the reply with a "Copy text" action, and the portable renderer accepts a `composition` artifact. Guidance now routes prose-heavy answers here while keeping dashboards terse.
|
|
49
|
+
|
|
13
50
|
- `Choice` single-choice card with "Continue in this session" / "Start new session", and Button `sessionTarget: "new"` to start an independent Agent session in the same workspace ([#39](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/pull/39)).
|
|
14
51
|
- `Table` data-grid options ([#17](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/issues/17)): typed sorting (numbers, ISO 8601 dates, booleans; empty values last), `columnTypes`, `searchable`, `filterable` (per-column contains / min-max ranges, AND-combined), `pageSize` for inline rows, and `exportable` CSV/Markdown of the filtered, sorted rows. All local; nothing is sent to the model. Interaction state survives remounts and reloads.
|
|
15
52
|
- CSV export is RFC 4180 with a UTF-8 BOM and neutralises spreadsheet formula injection (`=`, `+`, `-`, `@`, TAB, CR); Markdown export escapes table syntax.
|
|
@@ -156,7 +193,9 @@ All notable changes to this project are documented here. The format follows
|
|
|
156
193
|
- The declarative component catalog (`ui_render`) and sandboxed streaming HTML widgets (`ui_render_widget`).
|
|
157
194
|
- The `/ui` command and the guidance system-prompt section.
|
|
158
195
|
|
|
159
|
-
[Unreleased]: https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/compare/v0.2.
|
|
196
|
+
[Unreleased]: https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/compare/v0.2.9...HEAD
|
|
197
|
+
[0.2.9]: https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/compare/v0.2.8...v0.2.9
|
|
198
|
+
[0.2.8]: https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/compare/v0.2.7...v0.2.8
|
|
160
199
|
[0.2.7]: https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/compare/v0.2.6...v0.2.7
|
|
161
200
|
[0.2.6]: https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/compare/v0.2.5...v0.2.6
|
|
162
201
|
[0.2.5]: https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/compare/v0.2.4...v0.2.5
|
package/README.md
CHANGED
|
@@ -171,6 +171,8 @@ The plugin injects a system-prompt section ([`src/guidance.js`](src/guidance.js)
|
|
|
171
171
|
- **`ui_render_widget`** for what the catalog cannot draw: 3D, simulations, animations, games, custom tools.
|
|
172
172
|
- **Local first:** anything computable in the browser must update instantly without a message to the model.
|
|
173
173
|
|
|
174
|
+
Why these rules were kept after a real-model A/B against a rewritten decision order, and how routing is measured: [docs/presentation-routing.md](docs/presentation-routing.md).
|
|
175
|
+
|
|
174
176
|
`/ui <request>` forces a UI answer.
|
|
175
177
|
|
|
176
178
|
| Tool | Use it for | Rendering |
|
|
@@ -316,11 +318,12 @@ npm run eval:real -- --record && npm run eval:demo # record and cut the demo vi
|
|
|
316
318
|
|
|
317
319
|
| Option | Effect |
|
|
318
320
|
| --- | --- |
|
|
319
|
-
| `--stage mock,api,browser` | Run only some layers (`all` by default); `A
|
|
321
|
+
| `--stage mock,api,browser` | Run only some layers (`all` by default); `A`–`F` selects API categories (`F`: paired presentation-routing cases, [#58](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/issues/58)) |
|
|
320
322
|
| `--only B3,R-chart` | Run only these cases |
|
|
321
323
|
| `--keep-other-layers` | Keep the layers or cases this run did not execute, each with its own date |
|
|
322
324
|
| `--append` | With `--only`: add the rerun as extra samples; a failure is never replaced by a lucky retry |
|
|
323
325
|
| `--rescore` | Re-judge the last API run from its saved transcripts with the current assertions, no model calls |
|
|
326
|
+
| `--report <file.json>` | Write the report elsewhere, e.g. one file per prompt version to compare a baseline with a candidate |
|
|
324
327
|
| `DEEPSEEK_EVAL_MODEL` | Model id (default `deepseek-flash`) |
|
|
325
328
|
|
|
326
329
|
The **Real-model eval** workflow runs the same command on demand with the `DEEPSEEK_API_KEY` secret; a full run costs about ¥1.5 with `deepseek-flash`.
|
|
@@ -339,6 +342,7 @@ The **Real-model eval** workflow runs the same command on demand with the `DEEPS
|
|
|
339
342
|
- **Math Plot (C2):** three sliders, every one used in the expression, an `exp(…)·sin/cos(…)` shape.
|
|
340
343
|
- **Three.js and widgets (C1, C3, C4):** `UI.three()` or `import("three")`, animation, lights, start/pause and parameter controls.
|
|
341
344
|
- **Multi-turn edits (D2, D3):** a new column with every value correct and old values kept; bar → line, then a third series with exact values.
|
|
345
|
+
- **Presentation routing (F, not yet in the recorded run):** 21 cases in pairs that keep the topic and change only the task (explain vs. drag a parameter, explain Three.js vs. a rotatable scene here, code to copy vs. a repo change, Markdown table vs. a searchable grid of the user's rows, a formula vs. a derivation with a plot between the steps, a closing Choice vs. a chart after each section), plus a patch that must leave a filtered table untouched, a text-only restriction after a 3D turn and live data without a source. `no-ui` failures are unnecessary UI, `needs-ui` failures missed UI. Details: [#58](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/issues/58).
|
|
342
346
|
|
|
343
347
|
**Browser stage** (`scripts/eval/browser-stage.mjs`, 11 cases, each in a new conversation): plain text creates no card; chart legend, Q1–Q4 and local hover; table re-sorts without a model call; a form filled and submitted with real mouse and keyboard; Plot slider redraws; Three.js canvas drawn (pixel statistics) and draggable, with "Ask to fix" on failure; stop → preview → Regenerate; two in-place edits; Fast 3G; CDN blocked; 390 px phone width. Console errors are recorded per case, and every screenshot is reviewed by hand.
|
|
344
348
|
|
package/README.zh-CN.md
CHANGED
|
@@ -171,6 +171,8 @@ npx deepseek-harness-intelligent-ui doctor # 只诊断,不做修改
|
|
|
171
171
|
- **`ui_render_widget`**:组件目录画不出的东西,例如三维、模拟、动画、游戏、自定义工具。
|
|
172
172
|
- **本地优先**:凡是能在浏览器里算出来的,都必须即时更新,不调用模型。
|
|
173
173
|
|
|
174
|
+
这些规则为什么在与重写版决策顺序做真实模型 A/B 后被保留,以及路由如何评测,见 [docs/presentation-routing.md](docs/presentation-routing.md)。
|
|
175
|
+
|
|
174
176
|
`/ui <需求>` 可强制以 UI 作答。
|
|
175
177
|
|
|
176
178
|
| 工具 | 适用场景 | 渲染方式 |
|
|
@@ -316,11 +318,12 @@ npm run eval:real -- --record && npm run eval:demo # 录制并剪辑演示视
|
|
|
316
318
|
|
|
317
319
|
| 选项 | 作用 |
|
|
318
320
|
| --- | --- |
|
|
319
|
-
| `--stage mock,api,browser` | 只运行部分层(默认 `all`);`A
|
|
321
|
+
| `--stage mock,api,browser` | 只运行部分层(默认 `all`);`A`–`F` 选择 API 类别(`F`:成对的呈现方式决策用例,[#58](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/issues/58)) |
|
|
320
322
|
| `--only B3,R-chart` | 只运行这些用例 |
|
|
321
323
|
| `--keep-other-layers` | 保留本次没有运行的层或用例,各自保留原来的日期 |
|
|
322
324
|
| `--append` | 配合 `--only`:把重跑结果作为额外样本加入,绝不用一次侥幸成功覆盖失败 |
|
|
323
325
|
| `--rescore` | 用当前断言、基于已保存的对话记录重新判定上一次 API 运行,不调用模型 |
|
|
326
|
+
| `--report <file.json>` | 把报告写到其他文件,例如每个提示词版本一份,用来对比基线与候选提示词 |
|
|
324
327
|
| `DEEPSEEK_EVAL_MODEL` | 模型 id(默认 `deepseek-flash`) |
|
|
325
328
|
|
|
326
329
|
GitHub 上的 **Real-model eval** 工作流可按需手动触发,使用仓库密钥 `DEEPSEEK_API_KEY` 运行同一条命令;用 `deepseek-flash` 完整跑一遍约花费 ¥1.5。
|
|
@@ -339,6 +342,7 @@ GitHub 上的 **Real-model eval** 工作流可按需手动触发,使用仓库
|
|
|
339
342
|
- **数学 Plot(C2):** 三个滑块且都出现在表达式中,函数形状为 `exp(…)·sin/cos(…)`。
|
|
340
343
|
- **Three.js 与组件(C1、C3、C4):** 使用 `UI.three()` 或 `import("three")`,有动画、光照、启动/暂停和参数控件。
|
|
341
344
|
- **多轮修改(D2、D3):** 新增一列且每个值都正确、旧值保留;柱状 → 折线,再按准确数值加入第三个系列。
|
|
345
|
+
- **呈现方式决策(F,尚未进入已记录的运行):** 21 个成对用例,主题不变、只改变任务(解释 vs. 拖动参数、解释 Three.js vs. 对话内可旋转场景、可复制代码 vs. 修改仓库、Markdown 表格 vs. 用户数据的可搜索表格、写公式 vs. 推导中插入曲线、结尾 Choice vs. 每节一张图),另有必须保持已筛选表格不变的 patch、3D 回合之后的纯文本限制,以及没有数据源的实时数据请求。`no-ui` 失败表示不必要的 UI,`needs-ui` 失败表示漏掉了 UI。详见 [#58](https://github.com/dreamfarer-space/deepseek-harness-intelligent-ui/issues/58)。
|
|
342
346
|
|
|
343
347
|
**浏览器阶段**(`scripts/eval/browser-stage.mjs`,11 个用例,每个都在新会话中):纯文本不创建卡片;图表有图例、Q1–Q4 和本地悬停;数据表重新排序不调用模型;用真实鼠标键盘填写并提交表单;Plot 滑块重绘;Three.js 画布确有内容(像素统计)且可拖动,失败时尝试「让模型修复」;停止 → 预览 → 重新生成;两轮原位修改;Fast 3G;屏蔽 CDN;390 px 手机宽度。每个用例都记录控制台错误,每张截图都经过人工复核。
|
|
344
348
|
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -14,6 +14,12 @@ This plugin adapts the following from OpenIntelligentUI. It contains no verbatim
|
|
|
14
14
|
|
|
15
15
|
Copyright (c) CopilotKit. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, subject to the condition that the above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
|
16
16
|
|
|
17
|
+
## react-markdown and remark-gfm — MIT License
|
|
18
|
+
|
|
19
|
+
https://github.com/remarkjs/react-markdown (10.1.0) and https://github.com/remarkjs/remark-gfm (4.0.1) are bundled into `client/client.js` and `renderer/renderer.js` to render the prose blocks of composed answers. Raw HTML is never rendered and links are restricted to http(s)/mailto.
|
|
20
|
+
|
|
21
|
+
Copyright (c) 2015 Espen Hovlandsdal. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
|
22
|
+
|
|
17
23
|
## idiomorph — 0BSD License
|
|
18
24
|
|
|
19
25
|
https://github.com/bigskysoftware/idiomorph (v0.7.4). Its minified build is embedded in `client/client.js` and injected into widget preview frames.
|