@klarkxy/dsh-fusion 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,41 @@
1
+ The Star And Thank Author License (SATA)
2
+ Version 2.1, September 2026
3
+
4
+ Copyright © 2026 Klarkxy(278370456@qq.com)
5
+
6
+ Project Url: https://github.com/klarkxy/dsh-editor
7
+ https://github.com/klarkxy/sata-license
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in
17
+ all copies or substantial portions of the Software.
18
+
19
+ And wait, one more thing — an invitation, not a condition: it would be best if
20
+ you star/+1/like the project(s) in the project url section above, and thank the
21
+ author(s) in the Copyright section. You may, and arguably you should — but the
22
+ permissions above hold either way, star or no star.
23
+
24
+ Here are some suggested ways:
25
+
26
+ - Email the authors a thank-you letter, and make friends with him/her/them.
27
+ - Report bugs or issues.
28
+ - Tell friends what a wonderful project this is.
29
+ - And, sure, you can just express thanks in your mind without telling the world.
30
+
31
+ Contributors of this project by forking have the option to add his/her name and
32
+ forked project url at copyright and project url sections, but shall not delete
33
+ or modify anything else in these two sections.
34
+
35
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
38
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
40
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
41
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # Fusion
2
+
3
+ Fusion pairs the current assistant with one persistent native Sidekick. The Lead delegates a bounded task, reads the exact result, and accepts it or requests a revision. DeepSeek Harness remains responsible for sessions, tools, permissions, models and execution history.
4
+
5
+ The plugin is preinstalled in DSH Editor and **disabled by default**. Enable **Fusion 协作** in Settings → Plugins. There is no additional conversation switch. Existing writing conversations participate when enabled; child sessions do not become new Leads.
6
+
7
+ In Editor, the Lead handles discussion, planning, maintenance and review. The Writer produces an exact candidate. Review approval does not change your manuscript: open the candidate preview and choose **采用** to apply it. Host checks the original source versions and any unsaved drafts before writing. If the source changed, preserve the candidate and request a new revision against the current text.
8
+
9
+ Text proposals for both manuscripts and outlines go through the Writer because the ordinary-folder project model does not reliably classify file contents. Structural operations and supported maintenance tools remain with the Lead. Candidate text never streams into the manuscript.
10
+
11
+ In native Web, the Sidekick uses the existing native tool and permission system. The collaboration card links to its native execution record. Generic tasks can already have changed files during execution; their accepted result is a review status, not a pending manuscript application.
12
+
13
+ ## Model and lifecycle
14
+
15
+ Fusion registers the `fusion.sidekick` purpose with the shared AI services model settings. Its default is the host Chat role. A pair keeps the route selected when it was created; changed settings apply to new pairs. Fantasy models require explicit configuration.
16
+
17
+ At most one task runs in each pair. Revisions and later tasks reuse the same native child session. Stop cancels participating work; closing a card only closes the view. Disabling the plugin stops owned work and preserves its records and candidates.
18
+
19
+ A process restart does not replay uncertain messages or file writes. Inspect the task card and native history before explicitly resuming or notifying the Lead again. If application was interrupted, Fusion compares the persisted write intent with the current file. It never retries an uncertain write automatically or overwrites later author edits.
20
+
21
+ ## Package use
22
+
23
+ This package has no dependency on private Editor packages. Install its bundle together with `@klarkxy/dsh-ai-services` on compatible DSH `0.1.7-rc.2`. Enable its `fusion` entry through the host plugin configuration. The native Web adapter uses the existing conversation and child-session navigation.
24
+
25
+ The Editor Host supplies a narrow `fusionWriting` service. Only Host code receives that application port; browser commands supply stored candidate identity and author actions, never replacement candidate content or a new destination.
26
+
27
+ ## Development checks
28
+
29
+ - `pnpm test:fusion`: deterministic service/native boundary tests and type checking.
30
+ - `pnpm exec vitest run packages/dsh-editor-workbench/src/fusion-host.spec.ts`: Host file authority and version checks.
31
+ - `pnpm test:e2e:fusion`: Editor and standalone Web on the isolated real native runtime with a local deterministic model fixture, after workspace build and desktop runtime preparation.
32
+
33
+ Deterministic integration tests establish wiring and lifecycle behavior. They do not measure live model writing quality or provider cache savings.
@@ -0,0 +1,4 @@
1
+ - insert:
2
+ - id: fusion
3
+ name: '@klarkxy/dsh-fusion'
4
+ disabled: true
@@ -0,0 +1,13 @@
1
+ # Fusion 协作
2
+
3
+ 在 Editor 的「设置 → 插件」启用「Fusion 协作」。插件预装但默认关闭,启用后不需要再为每段对话打开开关。
4
+
5
+ 主助手负责讨论、规划与审阅,持久的执笔搭档负责生成候选。每次修订及后续任务沿用同一个搭档会话。通过主助手审阅的文本仍然是候选;只有你在预览中采用后,宿主才会校验来源版本和未保存草稿并写入文件。
6
+
7
+ 原文变化时,候选会保留,但不能覆盖新的正文。请保存需要保留的草稿,并让助手基于当前内容重新修订。停止任务或关闭插件不会撤销已经采用的正文。
8
+
9
+ 任务卡片提供当前状态、候选预览、停止和恢复入口。关闭卡片不停止推理。重启后不会自动重发任务;需要核对执行记录后明确恢复。报告已保存但通知未确认时,可重新通知主助手继续审阅,无需重新启动执笔。
10
+
11
+ 模型在首次配对时绑定。共享模型设置中对 Fusion 搭档的修改适用于新配对;已有搭档继续使用原模型。未获得的费用或缓存数据不会被估算成确定值。
12
+
13
+ 原生 Web 使用既有子会话导航和执行记录。通用任务可能已经通过原生工具修改文件,因此「审查通过」不表示仍在等待作者采用。