@klarkxy/dsh-mood 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 +41 -0
- package/README.md +28 -0
- package/cordis.patch.yml +5 -0
- package/docs/README.zh-CN.md +21 -0
- package/lib/client.inner.cjs +634 -0
- package/lib/client.inner.cjs.map +1 -0
- package/lib/client.js +804 -0
- package/lib/contracts.d.ts +91 -0
- package/lib/contracts.js +70 -0
- package/lib/contracts.js.map +1 -0
- package/lib/index.d.ts +173 -0
- package/lib/index.js +1261 -0
- package/lib/index.js.map +1 -0
- package/package.json +105 -0
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,28 @@
|
|
|
1
|
+
# @klarkxy/dsh-mood
|
|
2
|
+
|
|
3
|
+
Default-enabled requirements clarification at the Host `agent/pre-step` boundary.
|
|
4
|
+
|
|
5
|
+
[简体中文](https://github.com/klarkxy/dsh-editor/blob/main/packages/dsh-mood/docs/README.zh-CN.md)
|
|
6
|
+
|
|
7
|
+
Requires Node.js ≥22 and DSH `0.1.7-alpha.1`. The bundle entry starts enabled and remains independently switchable. Mood does not replace native permissions or writing proposal confirmation.
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
dsh plugin --profile web add @klarkxy/dsh-ai-services
|
|
11
|
+
dsh plugin --profile web add @klarkxy/dsh-mood
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Open **Settings → 需求澄清** and choose 自动, 手动, or 严格. The chat card uses seat `dsh-editor.chat.events` with `{sessionId, locale}`.
|
|
15
|
+
|
|
16
|
+
Clear requests do not call `mood.analyze`. Auto mode only asks when a conservative check finds material ambiguity or risk. Clarification waits in the same pre-step, then resumes that intercepted request once. Recap can read `ctx.aiMood.getContract(sessionId)`.
|
|
17
|
+
|
|
18
|
+
From the repository root:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
pnpm --filter @klarkxy/dsh-mood typecheck
|
|
22
|
+
pnpm exec vitest run packages/dsh-mood/src
|
|
23
|
+
pnpm --filter @klarkxy/dsh-mood build
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[Publishing](https://github.com/klarkxy/dsh-editor/blob/main/packages/PUBLISHING.md) · [License](https://github.com/klarkxy/dsh-editor/blob/main/packages/dsh-mood/LICENSE)
|
|
27
|
+
|
|
28
|
+
The Editor preinstalls this feature enabled. In the Editor, use Settings → Plugins to switch it without restarting. Standalone DSH must load `@klarkxy/dsh-ai-services` before this package; installation or removal may require a restart when the host asks for one.
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# @klarkxy/dsh-mood
|
|
2
|
+
|
|
3
|
+
默认启用的需求澄清,挂在 Host `agent/pre-step`。
|
|
4
|
+
|
|
5
|
+
[English](https://github.com/klarkxy/dsh-editor/blob/main/packages/dsh-mood/README.md)
|
|
6
|
+
|
|
7
|
+
需要 Node.js ≥22 和 DSH `0.1.7-alpha.1`。插件安装后默认启用,也可在插件设置中关闭。它不会替代原生权限或写作提案确认。
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
dsh plugin --profile web add @klarkxy/dsh-mood
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
打开「设置 → 需求澄清」,可选自动、手动或严格。对话卡片使用座位 `dsh-editor.chat.events`,参数 `{sessionId, locale}`。
|
|
14
|
+
|
|
15
|
+
表述清楚的请求不调用 `mood.analyze`。自动模式只在确定存在实质含糊或风险时提问。澄清在同一次 pre-step 内等待,然后只恢复这次被拦住的请求。Recap 可通过 `ctx.aiMood.getContract(sessionId)` 读取约定。
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
pnpm --filter @klarkxy/dsh-mood typecheck
|
|
19
|
+
pnpm exec vitest run packages/dsh-mood/src
|
|
20
|
+
pnpm --filter @klarkxy/dsh-mood build
|
|
21
|
+
```
|