@klarkxy/dsh-delegation 0.0.0-stage → 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,42 @@
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
+ https://github.com/klarkxy/dsh-plugins
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in
18
+ all copies or substantial portions of the Software.
19
+
20
+ And wait, one more thing — an invitation, not a condition: it would be best if
21
+ you star/+1/like the project(s) in the project url section above, and thank the
22
+ author(s) in the Copyright section. You may, and arguably you should — but the
23
+ permissions above hold either way, star or no star.
24
+
25
+ Here are some suggested ways:
26
+
27
+ - Email the authors a thank-you letter, and make friends with him/her/them.
28
+ - Report bugs or issues.
29
+ - Tell friends what a wonderful project this is.
30
+ - And, sure, you can just express thanks in your mind without telling the world.
31
+
32
+ Contributors of this project by forking have the option to add his/her name and
33
+ forked project url at copyright and project url sections, but shall not delete
34
+ or modify anything else in these two sections.
35
+
36
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
38
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
39
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
40
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
41
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
42
+ THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,33 @@
1
- # Temporary Holding Version
1
+ # Delegation Mode
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <!-- release-state-note -->
4
+
5
+ [简体中文](docs/README.zh-CN.md)
6
+
7
+ A per-session switch that has the main agent plan, delegate to subagents, and review results while subagents carry out the work. When on, the main agent acts as a coordinator — breaking the request into tasks, handing them to subagents, and checking their reports — while subagent sessions receive matching guidance to complete the assigned work.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ dsh plugin --profile web add @klarkxy/dsh-delegation
13
+ ```
14
+
15
+ Enable the plugin in your profile, then reload the page or restart the profile as the manager requires.
16
+
17
+ ## Use
18
+
19
+ - On the new-session page, use the switch on the same row as the workspace and preset selectors before sending the first message: **Default** is gray; **Delegate** uses the theme color. The choice locks once the session starts, including after reopening it. The switch applies to the session's main agent, and its subagents automatically receive matching execution guidance.
20
+ - In **Plugins → Delegation Mode**, **Enable Delegation Mode for new sessions** sets the initial state for sessions created later.
21
+ - Simple tasks can be completed directly. For larger tasks, the main agent assigns scoped work to subagents, coordinates shared interfaces, and checks their results before reporting completion.
22
+
23
+ ## Limits
24
+
25
+ - Presets that expose subagent tools — Standard and PTC — support delegation; presets without subagent tools (such as Minimal and other complete-persona presets) keep the switch disabled.
26
+ - The switch updates prompt guidance only; tool access and permissions remain unchanged, and delegation is guided rather than strictly enforced.
27
+ - Delegation Mode stays fixed once a session starts, keeping the session's prompt cache stable.
28
+ - Changing the default applies to sessions created afterwards; existing sessions keep their current state.
29
+ - The added prompt section may reduce provider prompt-cache hits.
30
+
31
+ ## License
32
+
33
+ [SATA License 2.1](LICENSE)
@@ -0,0 +1,5 @@
1
+ # Enabled when installed. Adds a conversation-header delegation switch.
2
+ - insert:
3
+ - id: delegation
4
+ name: '@klarkxy/dsh-delegation'
5
+ disabled: false
@@ -0,0 +1,33 @@
1
+ # 委派模式
2
+
3
+ <!-- release-state-note -->
4
+
5
+ [English](../README.md)
6
+
7
+ 按会话开启的委派开关:主代理负责拆解、委派和验收,具体工作交给子代理。开启后,主代理作为协调者把请求拆成任务、交给子代理执行并验收结果;子代理会话会同步获得对应的执行指引。
8
+
9
+ ## 安装
10
+
11
+ ```bash
12
+ dsh plugin --profile web add @klarkxy/dsh-delegation
13
+ ```
14
+
15
+ 在 profile 中启用插件,然后按插件管理器要求刷新页面或重启 profile。
16
+
17
+ ## 使用
18
+
19
+ - 在创建会话页,发送第一条消息前,使用工作区、预设选择器同一行的切换开关:「默认」显示灰色,「委派」显示主题色。选择在会话开始后锁定,重新打开也保持不变。开关作用于该会话的主代理,它的子代理会自动获得对应的执行指引。
20
+ - 在「插件 → 委派模式」中,「新会话默认启用委派」决定之后新建会话的初始状态。
21
+ - 简单任务可以直接完成;较大任务由主代理先分派具体工作,再协调共同接口、检查子代理结果,最后汇报完成情况。
22
+
23
+ ## 限制
24
+
25
+ - 带子代理工具的预设(Standard 与 PTC)可使用委派;无子代理工具的预设(如 Minimal 及其他完整人设预设)显示开关为禁用状态。
26
+ - 开关仅调整提示词引导,保持原有的工具与权限设置,通过提示引导模型委派。
27
+ - 委派模式在会话开始后保持固定,以维持提示词缓存稳定。
28
+ - 修改默认值仅影响之后新建的会话,已有会话保持原状态。
29
+ - 新增的提示词小节可能降低模型供应商的提示词缓存命中率。
30
+
31
+ ## 许可证
32
+
33
+ [SATA License 2.1](../LICENSE)
package/icon.svg ADDED
@@ -0,0 +1,15 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36" fill="none">
2
+ <defs>
3
+ <linearGradient id="dlg-node" x1="8" y1="6" x2="28" y2="30" gradientUnits="userSpaceOnUse">
4
+ <stop stop-color="#4D75F5"/>
5
+ <stop offset="1" stop-color="#8EB6FF"/>
6
+ </linearGradient>
7
+ </defs>
8
+ <g transform="translate(3.6 3.6) scale(.8)">
9
+ <circle cx="18" cy="9" r="3.6" fill="url(#dlg-node)"/>
10
+ <path d="M18 12.8V17M18 17L9 25M18 17L27 25" stroke="#6392FF" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/>
11
+ <circle cx="9" cy="28" r="3.2" fill="#39ABA9"/>
12
+ <circle cx="27" cy="28" r="3.2" fill="#39ABA9"/>
13
+ <path d="M7.8 28L8.7 28.9L10.4 27.2M25.8 28L26.7 28.9L28.4 27.2" stroke="#E0FBF6" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
14
+ </g>
15
+ </svg>