dsh-motion-ui 0.0.0-stage → 0.5.2
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 +16 -0
- package/DESIGN.zh-CN.md +56 -0
- package/LICENSE +21 -0
- package/README.md +162 -2
- package/RELEASE-PLAN.zh-CN.md +52 -0
- package/VERIFICATION.md +133 -0
- package/client.js +23645 -0
- package/cordis.patch.yml +3 -0
- package/examples/agent-architecture.json +48 -0
- package/examples/bicycle-explorer.json +108 -0
- package/examples/calculator.json +94 -0
- package/examples/comparison.json +59 -0
- package/examples/conditional-budget.json +148 -0
- package/examples/live-memory-curve.json +251 -0
- package/examples/scene-comparison.json +86 -0
- package/examples/scene-dashboard.json +92 -0
- package/examples/scene-guide.json +56 -0
- package/examples/scene-report.json +61 -0
- package/examples/scene-status.json +70 -0
- package/examples/scene-workbench.json +105 -0
- package/examples/sine-motion.json +49 -0
- package/examples/speed-memory-scatter.json +113 -0
- package/index.js +69 -0
- package/lib/author-expression.js +60 -0
- package/lib/build-info.js +2 -0
- package/lib/canvas-design.js +10 -0
- package/lib/canvas-example.js +46 -0
- package/lib/canvas-export.js +9 -0
- package/lib/canvas-preview.js +31 -0
- package/lib/canvas-system.js +14 -0
- package/lib/catalog.js +92 -0
- package/lib/components.js +28 -0
- package/lib/export-runtime-bundle.js +2 -0
- package/lib/format-number.js +7 -0
- package/lib/freeform.js +13 -0
- package/lib/inspection.js +13 -0
- package/lib/presentation.js +6 -0
- package/lib/protocol.js +295 -0
- package/lib/refinement.js +31 -0
- package/lib/sandbox.js +52 -0
- package/lib/scenes.js +50 -0
- package/lib/store.js +176 -0
- package/lib/stream.js +87 -0
- package/lib/tool-json.js +7 -0
- package/lib/ui-intent.js +14 -0
- package/lib/ui-skill.js +46 -0
- package/lib/visual-audit.js +18 -0
- package/lib/visual-examples.js +28 -0
- package/package.json +75 -4
- package/skills/intelligent-ui/SKILL.md +86 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# DSH Motion UI
|
|
2
|
+
|
|
3
|
+
## 0.5.2 — 2026-10-10
|
|
4
|
+
|
|
5
|
+
First public release for DeepSeek Harness Web 0.2.0-rc.2.
|
|
6
|
+
|
|
7
|
+
- Native interactive components, six scene layouts, theme-aware colors and icons.
|
|
8
|
+
- Freeform HTML/SVG/CSS/JavaScript canvases in an isolated iframe, with local controls and animation.
|
|
9
|
+
- Guided and free design modes; guided mode injects design skills, protocol and worked examples into model context.
|
|
10
|
+
- Static streaming previews, persisted parameters, shared derived calculations and contextual follow-ups.
|
|
11
|
+
- Answer-tail, inline marker and PC sidebar presentation; revision history, inspection and targeted refinement.
|
|
12
|
+
- Single-canvas standalone HTML export carrying current parameters and local calculations.
|
|
13
|
+
|
|
14
|
+
Validation: 54 automated tests, 11 release checks, and natural-completion DeepSeek V4.1 Flash Fast trials. Model-authored typography and contrast still vary; diagram precision and generated program correctness require review. Standalone export excludes surrounding native UI controls. External libraries/resources and direct host access are unavailable in canvases. Desktop compatibility is not claimed.
|
|
15
|
+
|
|
16
|
+
Development migration: uninstall `dsh-generative-ui` before installing `dsh-motion-ui`. Legacy storage, tool result metadata and route identifiers remain compatible; configure design/display modes again in the new plugin entry.
|
package/DESIGN.zh-CN.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# 默认视觉规范(0.2)
|
|
2
|
+
|
|
3
|
+
## 自由画布补充(0.5)
|
|
4
|
+
|
|
5
|
+
标准组件继续使用下列宿主设计。自定义 HTML/SVG/CSS/JavaScript 在隔离画布内创作,允许专属构图、连续动画与领域交互;通过 DSHUI 状态桥与标准组件组合。优先使用 --canvas-* 主题变量,提供中文标签、文字替代与减少动态效果支持。容器按内容报告自动高度,最大 1000px,避免手机上保留桌面固定高度造成大段空白。代码生成中不执行,提交并恢复参数后激活。
|
|
6
|
+
|
|
7
|
+
首批样例为自行车部件拆解器和参数化正弦动画。示意与物理测量明确区分;样例美术不是固定组件上限,模型可以自行设计画布内容。
|
|
8
|
+
|
|
9
|
+
发布候选补充:辅助说明与操作默认折叠,画布加载有独立状态,错误优先显示可恢复的说明并折叠调试细节。动画推荐使用 DSHUI.animate,管理离屏/后台暂停及减少动态效果。新增关系结构图和散点分析构图;图中文字在窄屏保持可读,通过画布内部滚动承载宽图,不能撑开聊天页。模型设计指导在 lib/canvas-design.js 中按任务提供六种视觉处理,不要求每个回答都使用卡片、图标或动画。
|
|
10
|
+
|
|
11
|
+
这套样式面向聊天中的工具界面:清楚、轻量、可操作。默认即有完整设计,模型只需组织内容;旧文档直接使用新样式。
|
|
12
|
+
|
|
13
|
+
## 层级与间距
|
|
14
|
+
|
|
15
|
+
- 根面板:18px 圆角、细边框、24px 内边距。标题配 38px 图标底座;下方用分隔线进入正文。
|
|
16
|
+
- 内容区:18px 间距;有实际分组含义时使用 card,内部 16px 间距。row 的子项按可用宽度换行,不固定列数。
|
|
17
|
+
- 文字说明:13px、1.85 行高、次级颜色。指标标签 12px,结果 29px,单位 12px。参数与结果的视觉权重不同。
|
|
18
|
+
- 窄屏:缩小容器留白,控件独立成行,按钮铺满宽度。图表独立横向滚动,表格独立滚动;不撑开整页。
|
|
19
|
+
|
|
20
|
+
## 颜色
|
|
21
|
+
|
|
22
|
+
浅色主色为靛蓝 #3e60d3,辅助使用青绿、紫色、琥珀色。背景、正文和边框跟随 DSH 主题变量;深色下提高强调色亮度。指标采用低饱和底色与清晰数字,避免大面积纯色。
|
|
23
|
+
|
|
24
|
+
`tone` 是静态语义:neutral 中性、accent 强调、success 已确认的成功、warning 假设或提醒、danger 已确认的危险。不得仅凭指标数值自动推断“成功/安全”。变化中的判断应通过 `derived` 字符串明确描述。按钮统一采用主色,图表分类色只区分数据项。
|
|
25
|
+
|
|
26
|
+
## 图标
|
|
27
|
+
|
|
28
|
+
12 个内置线性 SVG,统一 24×24 视框、1.65px 描边,默认显示尺寸 12–18px。图标作为文字的辅助,设置 aria-hidden,不改变按钮/表单可访问名称。标准组件允许声明固定 icon 名称,自定义 SVG、CSS 与颜色代码仅在隔离画布内接受。
|
|
29
|
+
|
|
30
|
+
## 图表与表格
|
|
31
|
+
|
|
32
|
+
图表提供稀疏网格、正负值零基线、最多 12 项直接数值标签、全量精确数据表。零值柱高度为零,不绘制假数值。线图使用单一强调色;分类柱图使用固定主题配色。表格有轻底色表头、行分隔和数值右对齐。
|
|
33
|
+
|
|
34
|
+
## 状态与可访问性
|
|
35
|
+
|
|
36
|
+
保存、等待和错误同时以文字和图标表达;键盘焦点可见。开关保留原生 checkbox 语义与键盘行为,外观改为 switch。支持 reduced-motion 与 forced-colors。颜色不作为唯一信息来源。
|
|
37
|
+
|
|
38
|
+
## 实测范围
|
|
39
|
+
|
|
40
|
+
五组预览:原显存预算规划器、计算器、比较图表、条件预算示例、语义配色/负数/全零图表。分别检查浅色、深色、390px;浏览器无 pageerror,无整页横向溢出。真实 Web 聊天还要验证历史恢复和主题继承,不能只以独立预览代替。
|
|
41
|
+
|
|
42
|
+
## 0.3 — 动态曲线与恢复操作
|
|
43
|
+
|
|
44
|
+
线图按数据范围自动设置纵轴,柱图始终包含零基线。数字横轴可声明 xScale:linear,按实际采样距离放置点;分类轴保持旧版等距行为。曲线端点数值向绘图区内对齐,避免与坐标刻度叠字。精确值始终保留在展开数据表中。
|
|
45
|
+
|
|
46
|
+
读取失败时控件保持禁用并提供重新读取;保存失败时保留本页参数并提供重试;冲突时明确提供“使用已保存参数”和“保留本页参数并重试”。恢复操作继承统一的次级按钮样式。无效数值草稿不会因失焦悄悄消失。
|
|
47
|
+
|
|
48
|
+
## 0.4 — 六种场景设计与生成预览
|
|
49
|
+
|
|
50
|
+
dashboard 用指标顶边色线和轻背景建立数据层级;workbench 用输入分隔线与浅底参数区组织调节;comparison 用并排方案卡和 featured 重点卡辅助取舍;guide 用有序步骤轨道组织流程;status 用顶栏、计数与原生 progress 展示快照;report 用阅读字号、左侧层级线和折叠附录组织证据。
|
|
51
|
+
|
|
52
|
+
五种主题强调色为 blue、teal、violet、amber、rose,深色主题分别提升亮度。默认 comfortable,也可选择 compact 密度。卡片表面可用 outline、soft、featured;颜色、尺寸与排版由渲染器控制。没有 presentation 的历史文档保留原版设计。
|
|
53
|
+
|
|
54
|
+
badge、progress、steps、details 都有文字语义。步骤状态有文字标签,进度用原生 progress 元素提供数值与可访问名称。静态任务快照不是宿主实时订阅,演示数据需明确标注。featured 只表示讨论重点,不自动表示推荐。
|
|
55
|
+
|
|
56
|
+
生成中以虚线边框、“生成中”徽标和“完成校验后可操作”说明区别于已提交界面。每次只加入完整且校验通过的顶层子树,控件禁用,不联网读取/保存参数,不发送按钮动作。沿用稳定 node ID,更新时保留现有节点。大容器的内部片段需等待整个容器完成;默认不加入闪动、骨架屏或持续动画。
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
9
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
10
|
+
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.md
CHANGED
|
@@ -1,3 +1,163 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DSH Motion UI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
为 DeepSeek Harness Web 提供可交互组件、自由 HTML/SVG 图解与动画。引导模式会主动注入设计技能、协议和示例;自由模式让模型自主设计。设置位于首页 → 插件 → dsh-motion-ui。
|
|
4
|
+
|
|
5
|
+
Interactive, declarative tool views for **DeepSeek Harness Web 0.2.0-rc.2**.
|
|
6
|
+
|
|
7
|
+
The plugin adds `ui_catalog` (protocol + examples + visual vocabulary) and `render_ui` (validated UI). It renders native conversation turn-tail views, computes local expressions, saves per-conversation input state on the Host, and sends explicit follow-up requests with the current parameter snapshot.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
Install the published plugin (or paste `dsh-motion-ui` into Home → Plugins → Add plugin):
|
|
12
|
+
|
|
13
|
+
```powershell
|
|
14
|
+
dsh plugin --profile web add dsh-motion-ui
|
|
15
|
+
dsh web --no-open
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The release artifact includes the generated browser bundle; users installing the tarball do not need the build tool. Restart an existing Web process after installation, then reload its browser page. Source builds are also supported: `npm ci`, `npm run build`, `npm test`, then `npm pack` and install the generated tarball.
|
|
19
|
+
|
|
20
|
+
Development installs of `dsh-generative-ui` must be uninstalled before installing `dsh-motion-ui`; do not enable both because they register the same tools. Existing UI documents remain readable: the internal `dsh-generative-ui` storage directory, result metadata and authenticated route namespace are retained for compatibility. Plugin settings must be selected again under the new plugin entry.
|
|
21
|
+
|
|
22
|
+
## Use
|
|
23
|
+
|
|
24
|
+
### Canvas delivery improvements (0.5.2)
|
|
25
|
+
|
|
26
|
+
Free canvases now include optional theme-aware `.ui-*` primitives for typography, controls, result readouts, SVG nodes, connectors and annotations. Guided mode actively injects a construction handbook covering Chinese label widths, connector routing, actual rendered SVG font sizes, validated calculations and reset behavior. Free mode retains autonomous composition and only receives the interface/delivery contract.
|
|
27
|
+
|
|
28
|
+
For `render_canvas`, emit `css` (an empty string if unused) before `html`, followed by `script`. Complete CSS plus partial HTML can produce a static streaming preview in a stable isolated frame. The preview strips active markup, disables controls and animation, has no state bridge, and never executes generated JavaScript. Interaction still starts only after successful submission and parameter restoration. Native `render_ui` continues to preview complete validated subtrees. Incomplete or failed generation does not become a saved interactive document.
|
|
29
|
+
|
|
30
|
+
Each committed canvas offers **说明与操作 → 导出独立 HTML**. The downloaded file includes the current parameter snapshot, the shared calculation interpreter and an isolated canvas. Declared state and derived results recompute locally without DSH or external libraries. It is a single-canvas export, not a complete mixed native layout; it does not send Agent requests or save back to DSH. Reloading the file restores the export-time parameters. External resources remain unavailable.
|
|
31
|
+
|
|
32
|
+
These improvements adapt the public design-system/skill, CSS-first streaming and standalone-export ideas from [CopilotKit/OpenIntelligentUI](https://github.com/CopilotKit/OpenIntelligentUI/tree/f6e4388b26a64b9a0714943b08a1ce622b924eec). The implementation uses DSH's existing state/validation/sandbox contract, without adding its separate router service or CDN execution model.
|
|
33
|
+
|
|
34
|
+
### Presentation, authoring and history (0.5.2)
|
|
35
|
+
|
|
36
|
+
Home → Plugins → dsh-motion-ui now offers **回答下方 / 正文标记位置 / PC 侧栏**. The default stays below the answer. Inline mode instructs the model to place a fenced `dsh-ui` block containing only the successful tool result's documentId. Missing markers or unavailable sidebar services fall back to the conversation view. Known same-conversation IDs only are eligible; source is never parsed from the marker. DSH 0.2.0-rc.2 exposes no fence-renderer slot, so this small adapter recognizes its rendered code blocks. It preserves the original marker for copying and restores it when unloaded. The native sidebar can also be opened manually from a conversation UI. Two visible copies synchronize successfully saved state; concurrent unsaved drafts retain the existing explicit conflict/retry behavior.
|
|
37
|
+
|
|
38
|
+
For simple formulas, write `derived: {power: {expr: "state.V * state.V / state.R"}}` and bind a metric with `{ref:"derived.power"}`. The authoring parser compiles to the existing bounded interpreter, including dependency/cycle validation. It supports arithmetic, comparisons, ternary conditions, parentheses, double-quoted strings, booleans and min/max/round/abs. It does not execute JavaScript or introduce a second calculation runtime. Existing op/args documents remain compatible; freeform animation continues to use the isolated canvas.
|
|
39
|
+
|
|
40
|
+
Each UI provides **版本历史** with read-only initial-state previews and restore. Preview never executes canvas scripts or writes input state. Restore appends a new head with the chosen document, retaining prior versions and current saved inputs; stale requests fail rather than overwrite another revision. The previous head is archived before replacement, and a failed head write cannot expose a fictitious future version. Preexisting documents start their available history at the first version observed after this update; overwritten older development revisions cannot be reconstructed. Archived input definitions must remain compatible. History uses the same authenticated Connection bridge and conversation ownership checks as document access.
|
|
41
|
+
|
|
42
|
+
Ask for the useful result naturally, for example: “Create an interactive theoretical weight-size calculator; distinguish estimated weights from real inference VRAM.” The plugin actively injects its design skill, complete protocol and two minimal worked examples through DSH's system-prompt service; the model does not need to discover a skill file or call a catalog to receive this guidance.
|
|
43
|
+
|
|
44
|
+
The packaged skill source is `skills/intelligent-ui/SKILL.md`. It teaches scene selection, composition, diagram grammar, theme/color/icon choices, responsive labels, local state, animation and error repair. `lib/ui-skill.js` injects it together with the shared protocol and concrete calculator/animation examples. It adapts public OpenUI, Diagram Design and Taste Skill ideas to DSH; it is not OpenAI's internal prompt. `ui_catalog` remains available for additional examples. This lowers the discovery/syntax burden for smaller models; it cannot guarantee complex program quality for every model.
|
|
45
|
+
|
|
46
|
+
Supported components: heading, text, card, row, column, metric, table, bar/line chart, numeric/text input, slider, select, toggle, follow-up button, badge, progress, ordered steps and collapsible details. Charts provide their full data as an accessible table. Controls compute locally without calling a model on each change.
|
|
47
|
+
|
|
48
|
+
The exact protocol and runnable examples are in `lib/catalog.js` and `examples/`. Component attribute definitions in `lib/components.js` drive both validation and capability discovery. `ui_catalog()` returns the protocol, component fields and two compact examples; `ui_catalog({topic:"canvas"})` adds the full design guide and four distinct visual examples. Other topics are `data`, `scenes`, and `all` (fourteen examples). This avoids sending every example on each request.
|
|
49
|
+
|
|
50
|
+
The tool card retains a text result. A state-only conversation extension replays standard successful tool results into the official `conversation.chat.turnTail` list slot, so the interactive UI stays visible when DSH folds work details. It does not modify DSH core or add custom persisted event types.
|
|
51
|
+
|
|
52
|
+
## Default visual design
|
|
53
|
+
|
|
54
|
+
Standard components receive the same theme-aware design, built-in line icons, clear metric hierarchy, section cards, switches, colored charts, and responsive controls. Existing documents need no changes. Fixed optional `icon`/`tone` tokens are documented in `ui_catalog`; freeform SVG/CSS belongs in an isolated sandbox node. Tones are static semantics and never infer safety from a number. On narrow screens, chart plots and tables scroll internally to preserve readable labels.
|
|
55
|
+
|
|
56
|
+
Heading/text/card titles are included in the default-state text projection. Conditional text uses a derived `if` expression returning strings; `examples/conditional-budget.json` demonstrates it. Comparison aliases `gt`, `gte`, `neq` supplement the existing operators.
|
|
57
|
+
|
|
58
|
+
## Scene designs
|
|
59
|
+
|
|
60
|
+
Optional `presentation: {layout, accent, density}` chooses an authored scene design:
|
|
61
|
+
|
|
62
|
+
| Layout | Suitable content | Visual treatment |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| dashboard | Metrics, trends, analysis | Summary metrics with accent rules and chart hierarchy |
|
|
65
|
+
| workbench | Calculators, adjustable parameters | Grouped controls, input separators and result panels |
|
|
66
|
+
| comparison | Parallel alternatives | Equal choice cards, optional featured discussion focus |
|
|
67
|
+
| guide | Instructions, checklists | Ordered step rail and supporting details |
|
|
68
|
+
| status | Observed task snapshots | Header band, counts, progress and stages |
|
|
69
|
+
| report | Findings, methods and evidence | Reading hierarchy, inset sections and collapsible appendix |
|
|
70
|
+
|
|
71
|
+
Accent tokens: `blue`, `teal`, `violet`, `amber`, `rose`. Density: `comfortable` or `compact`. Cards may select `surface: "outline" | "soft" | "featured"`. Omitted presentation retains the original design. All variants inherit DSH's light/dark theme and responsive behavior. Fourteen available examples include six scene documents and four canvases: bicycle disassembly, sine motion, Agent relationships and speed/memory scatter analysis.
|
|
72
|
+
|
|
73
|
+
Progress requires `0 <= value <= max` with positive max. Steps use explicit `pending`, `active`, `done`, `error` statuses; these are declared snapshots, not automatic subscriptions to Host tasks. The model must ground real progress in tool evidence and visibly label demonstrations. Badges and colors supplement text; they do not establish a recommendation or task completion.
|
|
74
|
+
|
|
75
|
+
## Progressive generation
|
|
76
|
+
|
|
77
|
+
The native Tool slot subscribes to DSH's `useToolCallArgumentsPartial` hook. As one normal `render_ui` call streams, completed valid top-level subtrees appear in a disabled preview. Put version/title/fallback, presentation, state/data/derived/actions before nodes to make references available early. Incomplete strings, numbers and subtrees are never guessed or completed. Node IDs preserve existing DOM elements as sections append. Preview performs no state requests and cannot submit actions.
|
|
78
|
+
|
|
79
|
+
Only a successful Host result installs the durable interactive UI at the turn tail. Failed/cancelled tool results remove the preview and retain the ordinary error text. Refresh replays successful recorded results, not uncommitted argument prefixes. No custom transport or synthetic ui.begin/patch tool calls are needed.
|
|
80
|
+
|
|
81
|
+
## State and follow-ups
|
|
82
|
+
|
|
83
|
+
Validated original descriptions and versioned input snapshots live under `$DSH_HOME/plugins/dsh-generative-ui/`. An instance has a Host-generated UUID; saved input state is isolated by that UUID and the viewed conversation. Refresh restores successfully saved inputs. The original description and text fallback stay unchanged. Wait for **参数已保存** before closing the page; unsaved edits can be lost. Read failures offer a retry while controls remain disabled. Save failures preserve local edits and offer retry. Conflicts preserve the local draft and offer explicit remote adoption or keep-local retry; keep-local first reads the newest revision and still saves using compare-and-swap. A response lost after a committed write is handled through the same conflict path. Invalid numeric drafts remain visible until corrected or explicitly replaced by saved parameters.
|
|
84
|
+
|
|
85
|
+
Follow-up buttons send the current selected parameters through `ctx.sessions.scope(sessionId).get("conversation").send(...)`. The snapshot also includes all current derived values, evaluated with the same interpreter as the UI from the complete current state (stateKeys still filters only the submitted state). Derived numbers retain calculation precision; displayed metrics may be rounded. They report queue admission, not task completion. The agent uses ordinary DSH tools and permission controls for external effects. Local state is not silently injected into model context on every edit.
|
|
86
|
+
|
|
87
|
+
State API requests use the authenticated DSH Connection `/api` bridge, including its Host/Origin fence. There is no unauthenticated plugin HTTP endpoint. The plugin assumes DSH's single operator model; it does not implement multi-user tenancy.
|
|
88
|
+
|
|
89
|
+
## Live chart and table data
|
|
90
|
+
|
|
91
|
+
A derived root can use `{map:{source:"data.samples",fields:{...}}}`. Each output field uses the same bounded expression interpreter; `item.key` reads the current static source row, and normal state/derived references use the current parameters. Chart/table `rows` can reference this derived array. See `examples/live-memory-curve.json` for a working context/KV calculator. The renderer validates current result types on every recomputation; invalid dynamic data shows an error and disables follow-up.
|
|
92
|
+
|
|
93
|
+
Line charts support `xScale:"linear"` for quantitative samples and place points at their actual numeric x coordinates. Default category spacing remains backward compatible. Line y axes adapt to the data extent; bar charts include zero. Both preserve exact values in their accessible data table.
|
|
94
|
+
|
|
95
|
+
## Safety and limits
|
|
96
|
+
|
|
97
|
+
The Host validates JSON shape, registered fields/components, bindings, reference graphs, action keys, numeric ranges/steps and bounded expression operations. Standard components render text as text; expressions use a fixed interpreter. The explicit sandbox node accepts model-authored HTML/SVG, CSS and JavaScript in an opaque-origin iframe, never the host DOM. No direct tool-execution API is exposed.
|
|
98
|
+
|
|
99
|
+
## Freeform interactive canvas (0.5)
|
|
100
|
+
|
|
101
|
+
Use `{id,type:"sandbox",title,html,css?,script?,height?,fallback,stateKeys?,dataKeys?,derivedKeys?}` inside any normal UI container. HTML is a body fragment; JavaScript belongs in `script`, not HTML handlers. Inline SVG and CSS animations work. Each source field accepts up to 48 Ki characters, within the 128 KiB document budget. Initial height is 160–1000px; content reports its size and the renderer clamps automatic height to those bounds.
|
|
102
|
+
|
|
103
|
+
`DSHUI.snapshot` and `DSHUI.subscribe(fn)` expose selected host state/data/derived values and theme. `DSHUI.setState({key:value})` submits an atomic patch for declared state keys, using the existing validation, CAS persistence and recovery. Native controls and canvas share state. Theme variables are `--canvas-bg`, `--canvas-soft`, `--canvas-ink`, `--canvas-muted`, `--canvas-line`, `--canvas-accent`. See `examples/bicycle-explorer.json` and `examples/sine-motion.json` for two independent animations. The catalog includes both.
|
|
104
|
+
|
|
105
|
+
Canvas code starts only after successful tool commit and state restoration, with an explicit loading state. Parameter changes preserve the frame; reset/source changes restart it. Stop removes it. Normal auxiliary controls and explanation live in the collapsed “说明与操作” menu. Errors expose recovery buttons and a readable message while technical details remain collapsed. Preview contains no executable iframe. Important inputs must live in document.state; animation time restarts on reload. Each canvas includes a text alternative.
|
|
106
|
+
|
|
107
|
+
Prefer `DSHUI.animate(({time,delta,reducedMotion,visible}) => {...})` for animation. It returns an unsubscribe callback; time/delta are seconds, delta is capped at 0.05. The helper pauses offscreen/background, resumes without accumulating hidden time, and supplies a static delta=0 frame for reduced motion. Integrate delta when the user's running switch is on. `DSHUI.snapshot.visible` reports visibility separately from input validity. Native visibility and media changes refresh the drawing. Raw requestAnimationFrame code remains available but must manage its own lifecycle; existing saved programs are not silently rewritten.
|
|
108
|
+
|
|
109
|
+
Isolation uses `sandbox="allow-scripts"` without same-origin permission, restrictive CSP, nonce-bearing scripts and a source-window/instance-checked message bridge. CSP blocks fetch, external images/scripts, nested frames and eval. The frame cannot read host cookies, storage or DOM. Undeclared/out-of-range state patches are rejected. No Agent action bridge is provided in 0.5.
|
|
110
|
+
|
|
111
|
+
This is origin isolation, not a hard CPU/memory limit: expensive/infinite generated code can still affect responsiveness. CSP is not a universal navigation firewall; self-navigation can initiate a request before the renderer stops the navigated frame. Do not send credentials or unrelated private data into generated programs. Remote assets/imports and arbitrary tool access are not supported.
|
|
112
|
+
|
|
113
|
+
Budgets: 128 KiB UI document, 160 nodes, 12 nested component levels, 500 data rows, 64 keys per dictionary, 128 expression nodes and 4096 evaluation steps. Maps allow 1–16 scalar fields, at most 500 generated rows across all maps, no nested maps, and at most 128 KiB derived output. State writes accept up to 64 KiB. Invalid input returns a tool error so the model can repair it or answer in text.
|
|
114
|
+
|
|
115
|
+
## Current scope
|
|
116
|
+
|
|
117
|
+
- Web only; exact tested runtime 0.2.0-rc.2.
|
|
118
|
+
- Direct native calls have custom UI. PTC/composite calls may omit presentation metadata and retain the text fallback.
|
|
119
|
+
- Generation supports completed-subtree previews from native argument streaming. Nested incomplete cards wait until whole; separate incremental event protocols remain outside this release. The development additions below support validated edits to committed nodes.
|
|
120
|
+
- Tables/charts display supplied datasets or bounded derived rows. Custom local programs, SVG animation and lightweight demonstrations use sandbox nodes; remote resources and host tool access remain outside their scope.
|
|
121
|
+
- Stopping/removing the plugin leaves standard tool call/result history and its full initial text fallback readable. Saved input snapshots remain on disk; removal does not delete user data.
|
|
122
|
+
- No claim of implementing ChatGPT's proprietary UI protocol or compiler.
|
|
123
|
+
|
|
124
|
+
## Release development and verification
|
|
125
|
+
|
|
126
|
+
The scoped release requirements and source attribution are in `RELEASE-PLAN.zh-CN.md`. Build metadata (`lib/build-info.js`) is generated from the version and source hash; native roots expose its ID through `data-dgui-build` for installed-build verification, without adding implementation labels to the interface.
|
|
127
|
+
|
|
128
|
+
Run `npm run verify:release` with `DSH_PLAYWRIGHT` pointing to an installed Playwright module and Edge available. It builds and runs unit/integration checks plus canvas, scene/stream and recovery browser acceptance, writing `test-output/release-verification.json`. Set `DSH_VERIFY_INSTALLED=1`, `DSH_WEB_LOG` and `DSH_CANVAS_RESUME=1` to also replay the previously generated native verification session. Real-model creative acceptance is recorded separately because it requires the configured model and creates conversation content. A successful local runner alone does not prove installed/model acceptance.
|
|
129
|
+
|
|
130
|
+
## Development
|
|
131
|
+
|
|
132
|
+
### Authoring and model guidance (0.5.2)
|
|
133
|
+
|
|
134
|
+
Both design modes receive a shared intent and delivery policy before the design contract: use UI proactively for relationships, trends or changing parameters when it materially improves explanation, without waiting for a user to name UI. Simple facts, short definitions and explicit text-only requests remain text. The first submission should solve one core relationship with a complete working interaction and readable narrow-screen layout; avoid designing a multi-page application before any useful result. This is model guidance, not a hard inference timeout or proof of universal model capability. Free mode still leaves visual composition and styling to the model.
|
|
135
|
+
|
|
136
|
+
Configure the plugin under Home → Plugins → dsh-motion-ui, alongside the other plugin settings; there is no separate global settings entry. PC landscape is the primary design and visual acceptance target (1365px/1920px viewports at the actual chat-column width); mobile remains supplementary. Model acceptance waits for natural completion without cancelling inference or imposing a thinking timeout. Earlier interrupted observations are kept separate from natural-completion results.
|
|
137
|
+
|
|
138
|
+
The plugin setting `designMode` selects `guided` (default, full design skill/protocol/examples) or `free` (only the free-canvas interface, state/lifecycle and essential execution constraints). Free mode removes the layout curriculum and worked UI examples from automatic injection. It does not identify a model as strong or weak, and neither mode changes permissions. The setting is read on each prompt assembly; old model context may still contain prior instructions, so compare modes in fresh conversations.
|
|
139
|
+
|
|
140
|
+
`render_canvas({title,fallback,css,html,script?,height?,state?,data?,derived?})` creates a single authored canvas with node ID `canvas`. All content, custom controls, graphics, colors and composition can be authored inside it. State/data/derived keys are shared automatically; the same validated bridge, persistence, source limits and inspect/patch operations apply. `render_ui` and optional `ui_catalog` remain available for mixed native components. Both entries support the configured presentation location. Complete CSS followed by partial HTML produces a non-interactive static preview; generated scripts start after successful submission and parameter restoration.
|
|
141
|
+
|
|
142
|
+
Latest-document fetch errors now show an explicit known-version notice and retry control instead of silently pretending the original payload is current. `inspect_ui` defaults to a source-free summary; request `detail:"nodes",nodeIds:[...]` for exact source or `detail:"full"` when the whole document is necessary. Large state/derived summaries explicitly mark omissions. Automatic repair guidance caps retries at two rounds per user request; this is a model behavior rule, not a provider inference timeout. Display observations now identify native nodes where possible and report bounded coverage counts; unsupported contrast cases are explicitly unobserved.
|
|
143
|
+
|
|
144
|
+
The injected skill includes a complexity ladder, common parameter repairs and a read/inspect/refine workflow for models of different capabilities. Native components are preferred for simple calculators; authored HTML/SVG remains available for explanatory diagrams and animations. Tool JSON fields accept either a JSON value or one bounded JSON-encoded string, followed by the same strict validation; encoded streaming documents wait until the full string is available.
|
|
145
|
+
|
|
146
|
+
`inspect_ui({documentId})` returns the latest document/revision, saved inputs, computed derived values and recent client display observations. The folded display check observes horizontal overflow, small rendered text, unnamed controls, known solid-background HTML contrast and reported canvas errors. These are bounded heuristics at the recorded width/theme/time, not a visual quality certification; SVG paint contrast and complex backgrounds are not scored. An unopened client has no report.
|
|
147
|
+
|
|
148
|
+
`patch_ui({documentId,documentRevision,changes:[{id,props}]})` edits existing node properties after whole-document validation. It keeps the document identity, state/data/derived definitions, node structure, bindings and actions. Revision conflicts require another inspection. Unaffected frames and expanded details survive; replacing canvas HTML/CSS/script restarts that canvas while preserving declared parameters. Refresh loads the latest document revision instead of reverting to the original tool payload. Tools require the creator conversation; display observations are stored separately and stale revisions are excluded.
|
|
149
|
+
|
|
150
|
+
Local browser/model evidence lives in ignored test-output/. Model acceptance is restricted to the 测试结果 workspace; optional legacy installed checks should only be enabled in an appropriate test profile.
|
|
151
|
+
|
|
152
|
+
The ongoing optimization benchmark uses GOAT/commandcode `deepseek/deepseek-v4.1-flash-fast`, with the actual provider, model and reasoning setting verified from request records. Compare fresh conversations with identical prompts and keep baseline outputs; no inference deadline or automatic cancellation is applied. First successful UI submission and natural turn completion are separate measurements from browser verification time. PC screenshots use the visible 1920×1080/1365×1080 chat viewport.
|
|
153
|
+
|
|
154
|
+
Authored canvases can call `DSHUI.formatNumber(value, decimals=2)` to match native metric and fallback display exactly (finite numbers, 0..6 decimal places, comma grouping). Read shared derived values before formatting. Existing authored scripts retain their own formatting until revised; this helper does not rewrite model source. Validation errors list allowed fields at the failed scope and give actionable map-source/key guidance while retaining strict validation.
|
|
155
|
+
|
|
156
|
+
Source: `lib/protocol.js` (shared validation/calculation/fallback), `lib/store.js` (versioned Host state), `index.js` (DSH adapter), `src/view.js` (React renderer), `src/client.jsx` (slot adapter). `npm run build` generates `client.js` with React supplied by DSH's ModuleLoader.
|
|
157
|
+
|
|
158
|
+
Run `npm test`, `npm run build`, and `npm run check` before packing. Browser smoke scripts and verification notes are kept under `tests/` and `VERIFICATION.md` in the source checkout.
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# 0.5 系列发布候选范围
|
|
2
|
+
|
|
3
|
+
日期:2026-10-09。开发基线 0.5.1;整批验收完成后统一交付一个补丁版本。本文定义开发与安装验收,不授权 npm/GitHub 外部发布。
|
|
4
|
+
|
|
5
|
+
## 目标与来源
|
|
6
|
+
|
|
7
|
+
让模型在 DSH 原生会话中自由创作可交互 HTML/SVG 动画,并与标准数据组件组合;保持可恢复、可解释、可访问的交互体验。
|
|
8
|
+
|
|
9
|
+
- [OpenUI](https://github.com/thesysdev/openui):采用组件目录与能力说明共享来源的思想;本轮不替换 DSH 聊天或引入未实测的 React 语言运行时。
|
|
10
|
+
- [Diagram Design](https://github.com/cathrynlavery/diagram-design):按关系选择流程、层级、时序等表达,处理节点标签和连线空间;通过画布创作,不限制为一套预制图形。
|
|
11
|
+
- [Taste Skill](https://github.com/leonxlnx/taste-skill):提炼视觉层级、留白与情境审查;其营销页面默认规则不直接用于数据工具。
|
|
12
|
+
- [Thesys 逆向观察](https://www.openui.com/blog/how-chatgpt-intelligent-ui-works):借鉴局部状态、稳定身份与隔离执行的方向。它是第三方观察,不是 OpenAI 官方协议;本插件不宣称复刻私有编译器。
|
|
13
|
+
|
|
14
|
+
## 必须交付
|
|
15
|
+
|
|
16
|
+
| 范围 | 发布门槛 |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| 自由创作 | 画布 HTML/SVG/CSS/JS 与标准组件可混排;至少一份当前模型从简短要求原创的动画通过真实 Web 验收 |
|
|
19
|
+
| 组件契约 | 标准组件属性目录共享来源,校验与模型能力说明不再分别维护属性白名单;未知字段仍拒绝 |
|
|
20
|
+
| 主动技能注入 | 插件自动注入设计技能、完整协议和两个最小正确示例;真实请求头包含注入内容,模型无需目录调用也能生成可交互 UI |
|
|
21
|
+
| 跨场景设计 | 提供工程拆解、参数实验、关系结构、数据分析、方案比较、阅读说明的设计简报;新增至少两种不同构图的可运行示例 |
|
|
22
|
+
| 使用体验 | 明确的加载状态;正常时收起辅助操作;异常时提供恢复入口和文字说明;调试细节默认折叠 |
|
|
23
|
+
| 动画生命周期 | 提供可清理的动画辅助接口,后台/离屏暂停、减少动态效果静态回退;重置和停止销毁旧运行实例 |
|
|
24
|
+
| 状态一致 | 标准控件与画布共享宿主参数及 derived;非法混合补丁原子拒绝;刷新恢复;现有 CAS/冲突流程通过回归 |
|
|
25
|
+
| 流式稳定 | 完整有效子树预览;预览不执行脚本;参数更新保持 iframe 身份;提交成功并恢复参数后才执行 |
|
|
26
|
+
| 隔离边界 | 保留不透明来源、受限资源 CSP、窗口/实例消息校验和作用域;不开放任意宿主工具或凭据 |
|
|
27
|
+
| 视觉验收 | 新示例与既有场景覆盖浅/深主题、390px/768px/桌面,中文长文、键盘操作、减少动态效果、文字替代 |
|
|
28
|
+
| 交付与兼容 | 构建、检查、打包、安装文件哈希、DSH Web 配置、真实会话回放通过;记录包版本、构建标识、已知限制;Desktop 不变 |
|
|
29
|
+
|
|
30
|
+
## 明确的边界
|
|
31
|
+
|
|
32
|
+
没有 CPU/内存硬隔离;自导航不是完整网络防火墙。外部资源、任意工具桥、复杂物理精度保证、OpenAI 私有协议兼容、OpenUI DSL 全量适配、任意运行中代码补丁不属于本轮发布门槛。动画时间可以重置,重要参数必须持久化到 document.state。
|
|
33
|
+
|
|
34
|
+
## 完成记录
|
|
35
|
+
|
|
36
|
+
0.5.2 候选开发与验收通过。仅统一升级一个补丁版本,没有逐项功能升版本。
|
|
37
|
+
|
|
38
|
+
- 主动技能注入:设计技能、完整协议、两个最小正确例子共三段;真实 DSH `system/message` 中逐段全文匹配。模型未调用 ui_catalog,直接原创雷达 SVG 动画,标准控件、暂停、手机与刷新恢复通过。证据:`test-output/skill-injection-verification.json`。
|
|
39
|
+
- 组件契约与交互:36 项单元/集成测试通过;两份注入例子实际执行;原子补丁、CAS 冲突与八种恢复场景通过。
|
|
40
|
+
- 视觉与生命周期:新增架构与散点图示例,六种场景布局覆盖深浅色及 390/768/桌面;离屏、后台、减少动态效果、错误恢复与流式预览边界通过。
|
|
41
|
+
- 原生兼容:0.5.2 候选安装于 Web 0.2.0-rc.2,配置和源文件/技能哈希验证通过;自行车、原创轨道、三份旧文档回放通过。Desktop 未改动。
|
|
42
|
+
- 模型差异如实保留:此前单摆在 Max 推理下触发输出上限,未提交任何代码;改为验收会话 Medium 后约 52 秒提交成功,期间一次非法字符串加法被拒绝并由模型修复。单摆手机 SVG 小字仍有质量局限;注入技能进一步要求实际显示尺寸检查。随后不查目录的雷达示例约 71 秒成功,手机说明为独立可读文字。未承诺任意模型同等设计质量。
|
|
43
|
+
|
|
44
|
+
最终安装包及构建标识以安装后的 `test-output/release-verification.json` 与交付记录为准;这些自动生成证据不随 npm 包发布。没有执行 npm/GitHub 外部发布。
|
|
45
|
+
|
|
46
|
+
## 后续开发批次(仍为 0.5.2,未另发版本)
|
|
47
|
+
|
|
48
|
+
- 弱模型引导:注入技能加入复杂度阶梯、常见参数错误修复、先检查再局部修改的流程。工具 JSON 字段兼容一次编码的 JSON 字符串,再执行同一严格协议校验。
|
|
49
|
+
- 显示检查:客户端观察实际字形尺寸、宽度溢出、已知纯色背景的 HTML 文字对比度、控件名称和画布运行异常;模型通过 inspect_ui 读取有时间、视口、主题及文档版本的报告。它不能证明美观,也不评估全部 SVG 配色。
|
|
50
|
+
- 局部修改:patch_ui 仅改已有节点允许的属性,全量验证、版本冲突检查、当前会话归属检查;不改状态定义、结构、绑定及动作。保留参数和未改动的画布实例,刷新恢复最新修订。
|
|
51
|
+
- 验收:本地 41 项测试及 8 步浏览器/构建流程;MiMo V2.5、Ling 3.1 Flash、step-5-preview-free 同题真实调用的计算、原创动画与局部修订。所有新原生会话必须位于“测试结果”(J:\测试结果),不运行历史 Workspace 验收脚本。
|
|
52
|
+
- 不覆盖原始稳定版归档;开发包以源码哈希区分。测试结果与功能/视觉限制记录到本地开发交付报告,不能以一次功能通过声称所有模型设计能力相同。
|
package/VERIFICATION.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Verification
|
|
2
|
+
|
|
3
|
+
## Public release 0.5.2 — DSH Motion UI (2026-10-10)
|
|
4
|
+
|
|
5
|
+
The renamed package passes 54 tests and all 11 release verification steps against DSH Web 0.2.0-rc.2. An isolated profile installs the packed package with all 50 distributed files matching source. Native PC browser checks confirm the new Home → Plugins settings entry saves settings, legacy Fast-generated documents replay, calculations and saved parameters survive reload, and actual HTML exports activate offline with the new branding. Earlier natural-completion DeepSeek V4.1 Flash Fast tests exercised an explicit bicycle diagram and a proactively generated resistor explanation; model-authored contrast and typography remained uneven in the bicycle case. Desktop support is not claimed. The sections below are historical development evidence.
|
|
6
|
+
|
|
7
|
+
## 0.5.0 — freeform HTML/SVG animation and shared state
|
|
8
|
+
|
|
9
|
+
Final delivery is 0.5.1: use getRandomValues for canvas tokens on HTTP LAN hosts, avoid duplicate initial subscriptions, and clear startup timeout errors after a late ready event. Repacking the same 0.5.0 filename/version left the installed client cached; the source hash check detected it. A new patch version is used to make installation unambiguous.
|
|
10
|
+
|
|
11
|
+
- Added a composable sandbox node for model-authored HTML/SVG, CSS and JavaScript. Standard components retain their bounded schema. Canvas source is never evaluated on the Host or inserted into the Host DOM.
|
|
12
|
+
- Opaque-origin iframe, nonce scripts and restrictive resource CSP; source-window/instance checked bridge with declared state/data/derived scopes, atomic validated patches, message/height bounds and rate limit. Preview and failed state restore execute no canvas code. Source/reset changes restart the frame; ordinary parameter changes preserve its identity.
|
|
13
|
+
- Host state and derived snapshots drive both native controls and canvas. Existing revision-CAS persistence/recovery is reused. Theme changes propagate; bounded automatic height adapts to narrow screens; reset, stop and runtime-error text fallback remain available.
|
|
14
|
+
- Two authored fixtures: a bicycle SVG disassembly explorer with part selection and wheel rotation, and a parameterized sine animation. Both label their illustrative nature. Examples and model guidance are included in ui_catalog.
|
|
15
|
+
- 36 unit/integration tests pass. Browser acceptance covers bidirectional controls, derived values, live animation, frame identity, mixed invalid patch atomicity, light/dark/390px layout, reload, reduced motion, reset/stop, runtime errors, selected-data scope and non-executing previews. Parent DOM/cookies/storage access, fetch/images/eval, forged sender and undeclared/out-of-range patches are tested. Expected injected runtime errors are recorded separately from unexpected failures. Evidence: test-output/canvas-verification.json.
|
|
16
|
+
- Existing six scenes and progressive preview acceptance pass; eight state recovery/concurrency scenarios pass. Installed Web legacy acceptance replays all three earlier documents, retains saved planner parameters and theme/mobile behavior. Evidence: scenes-stream-verification.json, recovery-verification.json, web-design-verification.json.
|
|
17
|
+
- Installed 0.5.0 on DSH Web 0.2.0-rc.2. Actual configured DeepSeek V4.1 Flash generated the bicycle through native render_ui; slider/select/derived updates, mobile bounds and refresh restoration passed. It also authored a new SVG orbit animation solely from a brief, including a moving satellite and native speed/running controls; pixel changes confirm real animation, and reload retains parameters. Evidence: test-output/web-canvas-verification.json, web-canvas-original-orbit.png. Documents: eab3d2dd-cc1e-4ffb-b4b6-ae4d507c4322 and 4aa23acc-5dda-4162-a443-f339a47f3775.
|
|
18
|
+
- Native harness initially submitted immediately after an asynchronous New Conversation click, so the original animation was committed to the earlier session while the test waited on an empty page. The harness now keeps both requests in one session. The already-generated documents were replayed and fully checked without another model request.
|
|
19
|
+
- Browser debugging evaluation bypassed the eval restriction in an early security probe. The corrected probe executes as actual canvas source at startup and confirms CSP blocks eval. This does not imply CPU/memory hard isolation. Self-navigation can initiate a request before frame shutdown; no credentials or unrelated private data should be exposed to generated code. External dependencies and a canvas Agent action bridge are outside this version.
|
|
20
|
+
- Desktop profile untouched. No npm or GitHub publication performed.
|
|
21
|
+
|
|
22
|
+
Target: DSH Web 0.2.0-rc.2 on Windows; plugin 0.1.2. Desktop profile untouched.
|
|
23
|
+
|
|
24
|
+
The sections below record successive iterations. Latest installed acceptance targets plugin 0.4.1 on the same Web runtime.
|
|
25
|
+
|
|
26
|
+
## Automated checks
|
|
27
|
+
|
|
28
|
+
`npm test`: 16 tests passed, covering bounded declarative schema, arithmetic and dependency cycles, malformed data, unsafe fields, numeric ranges/steps/options, durable state, per-viewed-session isolation, concurrent revision conflict, HTTP input validation, Host tool metadata, conversation replay ownership, HTML escaping, fallbacks, and accessible renderer output.
|
|
29
|
+
|
|
30
|
+
`npm run build`, `npm run check`, `npm pack`: passed. Installed browser bundle matches the source build SHA256. Web composed configuration validates.
|
|
31
|
+
|
|
32
|
+
## Real Web / model smoke test
|
|
33
|
+
|
|
34
|
+
The configured DeepSeek V4.1 Flash model called `ui_catalog` and `render_ui` for the calculator and generated a second comparison UI. No mock tool-result injection was used.
|
|
35
|
+
|
|
36
|
+
- Slider 4 → 8 changes theoretical pure-weight size 12.57 → 25.15 GiB locally.
|
|
37
|
+
- Host saves edited state; browser refresh restores bits=8.
|
|
38
|
+
- Follow-up button is accepted through the actual conversation action service. Captured request contains current bits=8 and viewed-session provenance.
|
|
39
|
+
- Bar chart and exact accessible data table render with A=12, B=18, C=15 (explicitly demonstration data).
|
|
40
|
+
- UI bounds remain inside a 390px viewport. DSH's own narrow-screen sidebar behavior is inherited.
|
|
41
|
+
- Fresh unauthenticated context receives HTTP 401 on the state endpoint.
|
|
42
|
+
- No browser page errors during the successful smoke run.
|
|
43
|
+
|
|
44
|
+
Evidence: `test-output/web-smoke-result.json`, calculator/comparison desktop screenshots, mobile screenshot, and final installed verification output.
|
|
45
|
+
|
|
46
|
+
## Integration corrections found during acceptance
|
|
47
|
+
|
|
48
|
+
DSH folds work details after a turn completes. The final implementation accumulates standard successful appended tool results into a state-only conversation definition and renders them through `conversation.chat.turnTail`, leaving the tool card as a text summary. The definition's location-data key equals its owned kind, as required by DSH. Follow-ups resolve the scoped service with `scope(id).get("conversation")`.
|
|
49
|
+
|
|
50
|
+
Rapidly changing an input back to the already-saved value now clears the pending-save message. State is debounced; close the page only after confirmation that parameters were saved.
|
|
51
|
+
|
|
52
|
+
## Scope limits
|
|
53
|
+
|
|
54
|
+
Incremental UI streaming is not implemented. Direct native calls support the UI; PTC/composite presentation may fall back to text. State-only removal fallback is covered by standard text output and renderer tests; a live uninstall/reinstall test has not been performed. Model layout quality beyond the supplied component set is not claimed.
|
|
55
|
+
|
|
56
|
+
Final installed-package check: Web restarted with plugin 0.1.2; both real-model-generated interfaces replayed from history, saved parameters restored, empty numeric draft disabled follow-up, invalid Origin received HTTP 403, and a second refresh preserved both interfaces. No page or conversation subscriber errors. Evidence: `test-output/installed-verification.json`, `final-calculator.png`, `final-comparison.png`.
|
|
57
|
+
|
|
58
|
+
## 0.1.3 — 汐可酱验收反馈修复
|
|
59
|
+
|
|
60
|
+
- Follow-up snapshots now carry all current `derived` values from the same bounded interpreter as the renderer, evaluated from complete current state. `stateKeys` continues to select submitted state fields. Values preserve calculation precision; the prompt explains display rounding and asks the model to use supplied results.
|
|
61
|
+
- Stateless documents omit the initial-parameters line in new tool text results. Their native explanation also omits the empty parameter block and uses the shorter explanation label. Existing persisted tool-result text is immutable.
|
|
62
|
+
- 19 tests pass, including nested derived dependencies (`round`, `if`, `lt`), current versus default state, selected-state filtering, and both text/renderer stateless fallback cases. Build/check/pack pass.
|
|
63
|
+
- 0.1.3 installed in the Web profile, composed configuration validates, installed client SHA256 matches source build.
|
|
64
|
+
|
|
65
|
+
Installed browser feedback acceptance passed: actual calculator button produced a request with `state.bits=8` and `derived.weightGiB=25.14570951461792`, matching displayed 25.15 GiB. Session provenance retained. Stateless comparison explanation contains no empty parameter block. The request was intercepted before reaching the model, so this check created no extra conversation turn. Evidence: `test-output/feedback-verification.json`; no browser page errors.
|
|
66
|
+
|
|
67
|
+
## 0.2.0 — unified default visual design
|
|
68
|
+
|
|
69
|
+
- Shared renderer-owned theme tokens, typography, spacing, section cards, metric hierarchy, line icons, switch controls, colored charts/grid/value labels, and internally scrolling mobile charts/tables. Legacy UI documents automatically receive the design.
|
|
70
|
+
- Optional fixed icon/tone vocabulary; arbitrary CSS/SVG/color strings remain rejected. Static tones do not infer success from data. Decorative icons are hidden from accessible names.
|
|
71
|
+
- Complete initial text projection includes heading/text/card titles, including derived string explanations. Added gt/gte/neq and a third conditional-budget catalog example.
|
|
72
|
+
- 22 tests pass; build/check/pack pass. Isolated browser acceptance covers the original recorded planner and four additional fixtures in light/dark/390px, no document overflow, toggle/select operations, and a changing conditional verdict.
|
|
73
|
+
- Web profile installs 0.2.0; configuration validates; installed client SHA256 matches build. Visual specification: DESIGN.zh-CN.md. Incremental generation and derived-series charts remain outside this release.
|
|
74
|
+
|
|
75
|
+
Installed Web visual acceptance passed: all three original UIs replay, the planner's saved inputs remain intact, icons/switch/select are present, native DSH light/dark tokens change metric colors, 390px bounds hold and charts scroll internally, refresh retains the planner. No page/subscriber errors. Evidence: `test-output/web-design-verification.json`, `web-design-calculator-light.png`, `web-design-results-light.png`, `web-design-results-dark.png`, `web-design-results-mobile.png`. Theme changes occurred only in an isolated test browser DOM, not the user's saved appearance setting.
|
|
76
|
+
|
|
77
|
+
## 0.3.0 — live derived data and state recovery
|
|
78
|
+
|
|
79
|
+
- Bounded root-level map expressions generate chart/table object rows from static samples plus current state/derived values. Item references stay scoped to row fields; no callbacks or executable code. Limits include 16 fields/map, 500 generated rows total, existing expression/work budgets, and 128 KiB derived output.
|
|
80
|
+
- Current chart/metric result types are checked on every recomputation, including conditional type changes. Numeric line x axes preserve uneven sampling distances. Line y axes use the current extent, while bar charts retain zero baselines.
|
|
81
|
+
- Restore failures offer retry with inputs disabled; save failures retain drafts and offer retry. Conflicts offer explicit remote adoption or keep-local retry, both using the Host revision protocol. Ambiguous committed writes become conflicts rather than silent overwrites. Edits during in-flight saves are subsequently saved.
|
|
82
|
+
- Invalid numeric drafts remain visible on blur. Explicit remote adoption remounts input drafts and clears invalid markers. This also prevents blur-driven layout changes from losing recovery clicks.
|
|
83
|
+
- 27 unit/integration tests pass. Isolated React StrictMode + actual UiStore browser acceptance passes eight recovery/data scenarios, including two simultaneous pages, read/write faults, lost commit response, concurrent edits and generated-row followup snapshots. Evidence: `test-output/recovery-verification.json`.
|
|
84
|
+
- Build/check/pack pass. Web profile installed version 0.3.0; composed configuration validates; installed client SHA256 matches build. Incremental UI generation remains the next stage.
|
|
85
|
+
|
|
86
|
+
Real configured-model Web acceptance passed on installed 0.3.0: the model used native render_ui to create the mapped curve. Changing maximum context from 32K to 64K updated the curve, table and theoretical weight-plus-KV metric from 14.86 to 16.36 GiB locally. Refresh restored 64K. The actual follow-up request included the current derived curve and matching total; the request was intercepted before model execution. The 390px layout stayed in bounds, with no browser errors. Evidence: test-output/web-curve-verification.json and test-output/web-live-curve.png.
|
|
87
|
+
|
|
88
|
+
Legacy Web regression on installed 0.3.0 also passed: all three existing UI documents replayed, saved planner inputs remained intact, icons and toggle/select controls rendered, native light/dark theme colors changed correctly, narrow charts scrolled internally, and refresh retained planner metrics. No page or subscriber errors. Evidence: test-output/web-design-verification.json. Desktop profile was untouched.
|
|
89
|
+
|
|
90
|
+
## 0.4.1 — progressive preview and six scene designs
|
|
91
|
+
|
|
92
|
+
- Native preparing views subscribe to the official Tool slot's useToolCallArgumentsPartial hook. The bounded parser admits complete JSON tokens and whole validated top-level subtrees, with stable node IDs. It does not guess incomplete strings/numbers or execute partial expressions. Host success remains authoritative; previews do not read/save input state or send actions.
|
|
93
|
+
- Six authored layouts: dashboard, workbench, comparison, guide, status, report; five fixed theme accents; comfortable/compact density; outline/soft/featured card surfaces. Defaults preserve existing documents. Action colors use darker fixed scene colors to maintain white-label contrast in both themes.
|
|
94
|
+
- Added badge, numeric progress, ordered steps and collapsible details. Text fallback retains their contents. Progress validates its current range on every recomputation. Step statuses are explicit declared snapshots, not live Host task subscriptions; examples are visibly demonstrations.
|
|
95
|
+
- 32 unit/integration tests pass, including every character prefix of a streamed calculator, escaped JSON text, incomplete containers, forward references, resource limits, scene validation, dynamic progress bounds, accessible markup, disabled previews and failed-result cleanup.
|
|
96
|
+
- Isolated React StrictMode browser acceptance passes all six designs in light/dark/390px, no page overflow or browser errors; checks local workbench interaction, collapsible details, stable preview DOM identity, zero preview state requests, cancelled-result cleanup and activation only after commit. Evidence: test-output/scenes-stream-verification.json, scene-gallery.png and scene-*-light/dark/mobile.png.
|
|
97
|
+
- State recovery browser regression passes the existing eight fault/concurrency scenarios, with no errors. Actual Web legacy regression on 0.4.0 replayed all three original documents, retained saved planner values, theme inheritance and narrow-screen layout. Evidence: test-output/recovery-verification.json and test-output/web-design-verification.json.
|
|
98
|
+
- Native acceptance initially used an overly broad data-preview selector that also matched DSH's thinking summary, causing false missing-preview assertions. The harness now scopes observation to data-dsh-generative-ui. A real configured-model run observed seven distinct completed-subtree previews, with no enabled preview controls. This is not a guarantee of per-token display: cadence still depends on upstream chunking and document field order. Incomplete nested cards and arbitrary patches to committed documents remain outside this release.
|
|
99
|
+
|
|
100
|
+
Final installed 0.4.1 real configured-model acceptance passed: seven sequential native preview stages, controls disabled until Host success, actual status/compact/teal layout, badges, dynamic progress and counts (72 to 80 processed, 20 remaining), steps, collapsible details, correct teal action button, 390px layout and refresh restoring processed=80. No page/subscriber errors. Evidence: test-output/web-stream-verification.json, web-stream-status.png, web-stream-status-mobile.png. Installed client SHA256 matches the source build; Web composed configuration validates; Desktop remains untouched. Build/check/pack pass. No npm or GitHub publication was performed.
|
|
101
|
+
|
|
102
|
+
Final 0.5.1 installed verification: configuration validates; client.js, index.js, README.md, lib/sandbox.js and lib/catalog.js hashes match source. Web restarted as PID 69728. Both saved native canvases replay, animate, synchronize controls and restore state; all three legacy documents replay with saved parameters. Final browser reports show version 0.5.1 and no unexpected page/subscriber errors. The Desktop profile is untouched.
|
|
103
|
+
|
|
104
|
+
## 0.5.2 — injected design skill and canvas polish
|
|
105
|
+
|
|
106
|
+
- Packaged `skills/intelligent-ui/SKILL.md` is actively injected through three DSH system-prompt sections: design skill with the shared canvas guide, full shared protocol, and two minimal valid calculator/animation examples. The model does not have to discover the catalog first. Public OpenUI, Diagram Design and Taste Skill ideas are adapted to DSH; no claim of copying OpenAI private instructions.
|
|
107
|
+
- Candidate build `0.5.2+34a575d0923e` passed exact full-section matching in the real model-visible durable `system/message`. A fresh configured DeepSeek V4.1 Flash Medium conversation generated original radar HTML/SVG/CSS/JavaScript directly through render_ui, without a ui_catalog call. Native speed/run controls, actual SVG movement/pause, light/dark/390/768/desktop bounds and refresh replay passed. The mobile screenshot has readable HTML captions outside the SVG. Evidence: `test-output/skill-injection-verification.json`, `skill-radar-mobile.png`.
|
|
108
|
+
- Shared component attribute definitions drive validation and capability discovery. Targeted catalog topics avoid fourteen-example context dumps. Original six-scenario visual guidance covers composition, diagram relationships, hierarchy, themes, responsive labels and truthful data. Architecture and scatter examples add distinct compositions, keyboard interaction and shared derived data.
|
|
109
|
+
- Canvas loading, folded operations, friendly errors with folded debug details, reset/stop/recovery are covered. DSHUI.animate pauses offscreen/background and supports a static reduced-motion callback. Existing raw requestAnimationFrame programs are not automatically rewritten. Runtime faults cannot be hidden by a subsequent valid patch.
|
|
110
|
+
- 36 unit/integration tests passed; the complete local release runner passed. Browser acceptance also executes both always-injected examples and covers canvas isolation, stable frame identity, atomic invalid mixed patches, six scene layouts, streaming cancellation, and eight persistence/concurrency fault cases. Installed 0.5.2 candidate replay of bicycle/orbit plus all three legacy documents passed with no unexpected browser errors.
|
|
111
|
+
- Separate real-model pendulum acceptance first exhausted output tokens at Max before submitting a canvas. With a concise continuation and Medium for that verification session only, it completed in about 52 seconds; an invalid string arithmetic expression was rejected and self-repaired. Both motion and recovery tests passed, but scaled mobile SVG labels were small. The injected skill now explicitly recommends actual rendered text sizes and HTML captions; model design quality remains variable.
|
|
112
|
+
- Candidate configuration and installed source/skill hashes validate against Web 0.2.0-rc.2; Desktop is untouched. Final installed reports are generated under `test-output/` after the complete package is installed. No external npm or GitHub publication.
|
|
113
|
+
|
|
114
|
+
## 2026-10-09 development batch — version remains 0.5.2
|
|
115
|
+
|
|
116
|
+
- Added injected complexity/repair guidance, bounded single JSON-string decoding at the tool boundary, inspect_ui, revision-checked patch_ui, latest-document hydration, and bounded client display observations. Native auxiliary type now has a 12px minimum. Original release archive is retained separately; these additions are development builds.
|
|
117
|
+
- Final local build `0.5.2+a65d502922e2` passes 41 unit/integration tests and all eight release-runner steps. Browser acceptance covers actual rendered SVG size, unnamed controls, known solid-background contrast, revision conflicts, atomic invalid patches, preserved live frames/details/parameters, code replacement and latest-revision refresh. Existing canvas, six-scene, streaming and eight recovery scenarios also pass. Evidence: `test-output/release-verification.json`, `refinement-verification.json`.
|
|
118
|
+
- Real model generation used build `0.5.2+a33ef9cff055`; the later build only increases native auxiliary font sizes. All three conversations have verified cwd `J:\测试结果`, actual model IDs, and exact full matching of the three injected sections in the durable model-visible system message. Each ran the same calculator, original ellipse animation and text-only refinement tasks, strictly sequentially. All nine cases passed without tool errors or browser page errors. No new native tests ran in Workspace.
|
|
119
|
+
|
|
120
|
+
| Actual model | Provider | Calculator | Original animation | Inspect + refine |
|
|
121
|
+
| --- | --- | --- | --- | --- |
|
|
122
|
+
| xiaomi/mimo-v2.5 | commandcode | 33s | 72s | 104s |
|
|
123
|
+
| inclusionai/ling-3.1-flash:free | commandcode | 64s | 90s | 35s |
|
|
124
|
+
| step-5-preview-free | opencodego-ui-test | 34s | 42s | 20s |
|
|
125
|
+
|
|
126
|
+
All selected High effort. These single-run wall times include provider response, tool steps and browser checks; they are not pure token throughput or a stable model ranking. Prompts specify the task, states and constraints; this is guided functional acceptance, not proof of arbitrary autonomous design quality. MiMo's initial mobile SVG labels measured about 7px despite functional success. Ling and Step placed key captions outside SVG; visual quality is evaluated separately from functional pass.
|
|
127
|
+
|
|
128
|
+
- Provider compatibility: the original OpenCodeGO Responses configuration rejected MiMo with ModelProtocolUnsupported before inference. MiMo/Ling acceptance uses the existing commandcode provider. Step uses a clearly named isolated Chat Completions test alias, matching the official OpenCodeGO endpoint documentation; original providers remain unchanged. No credentials are included in evidence.
|
|
129
|
+
- Invalid early batches remain documented: JSON string tool fields initially failed plugin validation and were fixed at the boundary; parallel new-task creation reused one DSH draft and mixed model selections, so that batch was discarded. Final results use new sequential sessions and verified actual model identity. Old failure screenshots in each folder are historical, not failures of the final batch.
|
|
130
|
+
- Evidence: `test-output/model-matrix/summary.json`, per-model `results.json`, mobile/desktop screenshots and `observations.json`; final installed package hashes/replay are recorded separately in `installed-development-files.json` and `model-matrix/installed-replay.json`. Display reports include their observed revision; old revision snapshots do not certify the current UI. Desktop and external npm/GitHub publication are outside this batch.
|
|
131
|
+
- Separate MiMo display-repair acceptance passed: it inspected the real 390px report and patched its own canvas. The original 7px SVG label warnings disappeared at revision 2; animation, speed=2, paused state and refreshed parameters survived. This took about 242s including browser checks, showing a latency limitation rather than universal quick repair. Evidence: `model-matrix/mimo-v2-5/visual-repair.json`, `visual-repair-mobile.png`. The initial native 11px auxiliary warning is addressed by the final renderer font change, separately verified locally.
|
|
132
|
+
- Model selection also updates DSH's global default. The original entry observed before this user turn's tests (DeepSeek V4.1 Flash, Medium) is restored; each test conversation retains its own model. Original provider configurations were compared without exposing credentials. The named Step Chat test alias is retained. Evidence: `model-matrix/config-restoration.json`.
|
|
133
|
+
|