@morlay/session-mode-profile 0.0.1 → 0.0.3
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/README.md +18 -30
- package/cordis.patch.yml +3 -185
- package/icon.svg +19 -0
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +9 -7
package/README.md
CHANGED
|
@@ -1,34 +1,22 @@
|
|
|
1
1
|
# @morlay/session-mode-profile
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
subagent
|
|
3
|
+
会话模式与注入面:**一次装齐 host 平面那几行**——会话模式行(各模式的会话级扩展定义,按会话收口也由它内部持有)、
|
|
4
|
+
注入通道、subagent 服务接管行、工具说明(汉化 + 用法分组)。
|
|
5
5
|
|
|
6
|
-
| 装什么
|
|
7
|
-
|
|
|
8
|
-
| `
|
|
9
|
-
| `session-mode
|
|
10
|
-
| subagent
|
|
11
|
-
| `context-assembler
|
|
12
|
-
|
|
|
13
|
-
|
|
|
6
|
+
| 装什么 | 数据从哪来 |
|
|
7
|
+
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
|
|
8
|
+
| `ui-primitives-fork`(共享 client 行) | 每个 client bundle 各插一次:同 id 重复插入是幂等的(Loader 复用同一 Entry,后者胜) |
|
|
9
|
+
| `session-mode`(模式定义,会话级扩展) | [`@morlay/dsh-session-mode/rows`](../../profile/dsh-session-mode/src/rows.ts) |
|
|
10
|
+
| `subagent` 行(按官方行 id 复用换实现) | [`@morlay/dsh-subagent/rows`](../../subagent/dsh-subagent/src/rows.ts) |
|
|
11
|
+
| `context-assembler`(通道本体) | [`@morlay/dsh-context-assembler/rows`](../../context/dsh-context-assembler/src/rows.ts) |
|
|
12
|
+
| `tool-guidance`(汉化 + 用法分组) | [`@morlay/dsh-tool-guidance/rows`](../../profile/dsh-tool-guidance/src/rows.ts) |
|
|
13
|
+
| 行清单(工具 / 命令 / 压缩 / 计划 / 委派) | **不在本包**:会话挂着的 shipped preset(新会话是官方 web-app 的默认 `standard`) |
|
|
14
|
+
| 官方 roster 保留(`ui-agent-preset`) | 官方管"挂哪套行"的选择面;我们的模式 chip 挂 composer 工具行左侧(`conversation.input.left`,list 槽位),两套并存 |
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
理由与代价见 [ADR-自己注册preset](./.agents/adrs/20260929-自己注册preset.md)。
|
|
23
|
-
|
|
24
|
-
**注入面按会话判归谁**:`context-assembler` 这一行装的是通道本体 + `agent-instructions` + `skill-catalog`,
|
|
25
|
-
两条面方向相反——
|
|
26
|
-
|
|
27
|
-
- **工作区指令让位**:官方 `standard` / `ptc` / `cordis` 的 preset 自带 `@deepseek-ai/dsh-agent-instructions`,
|
|
28
|
-
那些会话的工作区指令由 preset 提供;`preset-mode-switch` 的行清单里没有那一行,两个模式的会话都由这一行提供。
|
|
29
|
-
- **skill 面由通道提供**:`skill` 工具按会话注册进 agent 自己那一层,遮蔽 preset 的 `@deepseek-ai/dsh-tool-skill`
|
|
30
|
-
那一份(官方 preset 会话如此;我们自己的行清单里没有上游那一行),目录也由我们发布。
|
|
31
|
-
|
|
32
|
-
模式开关(`instructions: false`)只收得住这一行这一侧;官方 preset 自带的注入在它之外,所以切模式时官方
|
|
33
|
-
preset 该换还是要换(`SessionModes.select` 只在目标与当前不同时才换)。理由与上游判据见
|
|
34
|
-
[ADR-工作区指令让位skill面由通道抢面](../../context/dsh-context-assembler/.agents/adrs/20260929-工作区指令让位skill面由通道抢面.md)。
|
|
16
|
+
**本包不声明自己的 agent preset**(曾经那份 `preset-mode-switch` 与它的行数据已删除):行清单归 shipped preset,
|
|
17
|
+
模式是叠加在它之上的会话级扩展——chip 不覆盖用户在官方 roster 里选的 preset。代价(计划模式规则段是官方那份英文
|
|
18
|
+
契约、`chat` 的两条官方注入面要靠 `agent/pre-step` 上丢、每步仍付一次重算)与判据见
|
|
19
|
+
[设计 行清单与注入面的装配](./.agents/designs/20260929-行清单与注入面的装配.md)与
|
|
20
|
+
[ADR 不再持有行清单](./.agents/adrs/20260929-不再持有行清单.md)。"先读后改"的豁免不需要自建 preset:它由模式自己的
|
|
21
|
+
policy 名单表达(`coding.denyPolicies: [fs/edit-intent]`,见
|
|
22
|
+
[设计 按模式的 policy 拦截](../../profile/dsh-session-mode/.agents/designs/20260929-按模式的policy拦截.md))。
|
package/cordis.patch.yml
CHANGED
|
@@ -2,142 +2,6 @@
|
|
|
2
2
|
- insert:
|
|
3
3
|
- id: ui-primitives-fork
|
|
4
4
|
name: "@morlay/dsh-client-ui-primitives"
|
|
5
|
-
- insert:
|
|
6
|
-
- id: preset-mode-switch
|
|
7
|
-
name: "@deepseek-ai/dsh-agent-preset"
|
|
8
|
-
config:
|
|
9
|
-
id: mode-switch
|
|
10
|
-
name: 手动切换模式
|
|
11
|
-
description: 本部署的行清单:两个会话模式共享它,差异由会话级收口(提示词 / 工具白名单 / 注入开关)决定。
|
|
12
|
-
order: 5
|
|
13
|
-
plugins:
|
|
14
|
-
- id: toolkit-ask
|
|
15
|
-
name: cordis:group
|
|
16
|
-
group: true
|
|
17
|
-
config:
|
|
18
|
-
- id: tool-ask-user
|
|
19
|
-
name: "@deepseek-ai/dsh-tool-ask-user"
|
|
20
|
-
- id: toolkit-delegation
|
|
21
|
-
name: cordis:group
|
|
22
|
-
group: true
|
|
23
|
-
config:
|
|
24
|
-
- id: tool-subagent-control
|
|
25
|
-
name: "@deepseek-ai/dsh-tool-subagent-control"
|
|
26
|
-
- id: tool-subagent-list-agents
|
|
27
|
-
name: "@deepseek-ai/dsh-tool-subagent-control/list-agents"
|
|
28
|
-
- id: tool-subagent
|
|
29
|
-
name: "@deepseek-ai/dsh-tool-subagent"
|
|
30
|
-
config:
|
|
31
|
-
provider: spawn
|
|
32
|
-
toolName: subagent
|
|
33
|
-
backgroundMode: continuable
|
|
34
|
-
- id: tool-subagent-fork
|
|
35
|
-
name: "@deepseek-ai/dsh-tool-subagent"
|
|
36
|
-
config:
|
|
37
|
-
provider: fork
|
|
38
|
-
toolName: subagent_fork
|
|
39
|
-
backgroundMode: continuable
|
|
40
|
-
- id: workflow-ptc
|
|
41
|
-
name: "@deepseek-ai/dsh-workflow-ptc"
|
|
42
|
-
config:
|
|
43
|
-
provider: spawn
|
|
44
|
-
- id: tool-workflow
|
|
45
|
-
name: "@deepseek-ai/dsh-tool-workflow"
|
|
46
|
-
isolate:
|
|
47
|
-
workflowEngine: true
|
|
48
|
-
- id: toolkit-flow
|
|
49
|
-
name: cordis:group
|
|
50
|
-
group: true
|
|
51
|
-
config:
|
|
52
|
-
- id: tool-todo
|
|
53
|
-
name: "@deepseek-ai/dsh-tool-todo"
|
|
54
|
-
config:
|
|
55
|
-
allowParallelInProgress: true
|
|
56
|
-
- id: command-goal
|
|
57
|
-
name: "@deepseek-ai/dsh-command-goal"
|
|
58
|
-
- id: tool-goal
|
|
59
|
-
name: "@deepseek-ai/dsh-tool-goal"
|
|
60
|
-
- id: present
|
|
61
|
-
name: "@deepseek-ai/dsh-tool-present"
|
|
62
|
-
- id: toolkit-fs
|
|
63
|
-
name: cordis:group
|
|
64
|
-
group: true
|
|
65
|
-
config:
|
|
66
|
-
- id: tool-fs
|
|
67
|
-
name: "@deepseek-ai/dsh-tool-fs"
|
|
68
|
-
- id: tool-fs-search
|
|
69
|
-
name: "@deepseek-ai/dsh-tool-fs-search"
|
|
70
|
-
config:
|
|
71
|
-
sampleOverCapGlobResults: false
|
|
72
|
-
- id: toolkit-shell
|
|
73
|
-
name: cordis:group
|
|
74
|
-
group: true
|
|
75
|
-
config:
|
|
76
|
-
- id: tool-bash
|
|
77
|
-
name: "@deepseek-ai/dsh-tool-bash"
|
|
78
|
-
disabled: !!js process.platform==="win32"
|
|
79
|
-
- id: tool-pwsh
|
|
80
|
-
name: "@deepseek-ai/dsh-tool-pwsh"
|
|
81
|
-
disabled: !!js process.platform!=="win32"
|
|
82
|
-
- id: tool-jobs
|
|
83
|
-
name: "@deepseek-ai/dsh-tool-jobs"
|
|
84
|
-
- id: toolkit-skill
|
|
85
|
-
name: cordis:group
|
|
86
|
-
group: true
|
|
87
|
-
config:
|
|
88
|
-
- id: skill-filesystem
|
|
89
|
-
name: "@deepseek-ai/dsh-skill-filesystem"
|
|
90
|
-
- id: toolkit-web
|
|
91
|
-
name: cordis:group
|
|
92
|
-
group: true
|
|
93
|
-
config:
|
|
94
|
-
- id: tool-web
|
|
95
|
-
name: "@deepseek-ai/dsh-tool-web"
|
|
96
|
-
config:
|
|
97
|
-
fetch: true
|
|
98
|
-
searchTimeoutMs: 60000
|
|
99
|
-
- id: compaction
|
|
100
|
-
name: cordis:group
|
|
101
|
-
group: true
|
|
102
|
-
config:
|
|
103
|
-
- id: compaction-basic
|
|
104
|
-
name: "@deepseek-ai/dsh-compaction-basic"
|
|
105
|
-
- id: command-compact
|
|
106
|
-
name: "@deepseek-ai/dsh-command-compact"
|
|
107
|
-
- id: tool-result-pruner
|
|
108
|
-
name: "@deepseek-ai/dsh-compaction-tool-result-pruner"
|
|
109
|
-
config:
|
|
110
|
-
thresholdChars: 8192
|
|
111
|
-
headChars: 4096
|
|
112
|
-
tailChars: 1024
|
|
113
|
-
isolate:
|
|
114
|
-
compaction: true
|
|
115
|
-
toolResultPruner: true
|
|
116
|
-
- id: planning
|
|
117
|
-
name: cordis:group
|
|
118
|
-
group: true
|
|
119
|
-
config:
|
|
120
|
-
- id: plan-mode
|
|
121
|
-
name: "@deepseek-ai/dsh-plan-mode"
|
|
122
|
-
config:
|
|
123
|
-
section: |-
|
|
124
|
-
你处于计划模式。在 exit_plan_mode 成功、或用户切换会话模式之前,一直留在计划模式。
|
|
125
|
-
|
|
126
|
-
先探索:用非破坏性的读、搜索、静态分析与检查,把计划落到真实仓库上。不要做任何写操作——不改文件、不改配置、不跑会重写被跟踪文件的格式化或代码生成、不提交,也不要把计划执行掉。优先用仓库里已有的函数与写法,不要新造机制。
|
|
127
|
-
|
|
128
|
-
用户的对话式同意(包括对你自己提问的肯定回答)不构成批准,也不结束计划模式;把确认到的决定并进计划里。
|
|
129
|
-
|
|
130
|
-
工具目录在模式之间保持一致(请求缓存稳定),所以这些规则压过任何后续工具说明或用法正文里“去改文件”的建议;那些工具仍列在目录里,只是这一步不能用。不要用 todo_write 跟踪规划阶段:它跟的是批准之后的实施,计划本身归 exit_plan_mode。
|
|
131
|
-
|
|
132
|
-
能自己查清的事实自己查。只有用户拥有的选择、或检查无法回答的实质歧义才用 ask_user_question;不要问代码在哪、现在怎么跑这类自己能查明的问题。
|
|
133
|
-
|
|
134
|
-
计划要决策完备:目标与成功判据;按子系统分组的改动;公共 API、schema 与数据流的变化;边界情况与失败模式;测试与验收判据;显式假设。可审即可,不必长到别人照它实现还要自己做设计决定。
|
|
135
|
-
|
|
136
|
-
就绪时调 exit_plan_mode,正文是完整的计划 markdown(以 # 标题开头),并让它成为那一条回复里唯一且最后的工具调用:它把计划交出去等批准,实施只在批准之后的步骤里开始。不要把最终计划当普通回复贴出来,也不要用散文或 ask_user_question 问“要不要继续”。评审驳回就吸收反馈重新提交;评审通道不可用或被中断时留在计划模式、让用户手动切模式,不要自己往下做。
|
|
137
|
-
isolate:
|
|
138
|
-
planMode: true
|
|
139
|
-
- id: fs-intent-relax
|
|
140
|
-
name: "@morlay/dsh-agent-toolkit/relax-intent"
|
|
141
5
|
- insert:
|
|
142
6
|
- id: session-mode
|
|
143
7
|
name: "@morlay/dsh-session-mode"
|
|
@@ -145,7 +9,6 @@
|
|
|
145
9
|
default: coding
|
|
146
10
|
modes:
|
|
147
11
|
coding:
|
|
148
|
-
preset: mode-switch
|
|
149
12
|
name: 编码模式
|
|
150
13
|
description: 功能完整的编码 Agent:文件、Shell、检索、联网等工具常驻,其余用法说明按需加载。
|
|
151
14
|
role:
|
|
@@ -156,43 +19,9 @@
|
|
|
156
19
|
你是一个经验丰富的编程专家,YAGNI 是你的编程哲学,PDCA 是你的行为规范。
|
|
157
20
|
全程用中文(专有名词除外),包括但不限于思考,回答,工具描述,subagent 提示词;思考不要陷入重复循环,一旦循环立即退出;思考聚焦需求理解与方案设计,不预演具体代码实现,正确性由验证环节确认。
|
|
158
21
|
suffix: 你的工作目录在 `{{cwd}}`
|
|
159
|
-
|
|
160
|
-
-
|
|
161
|
-
- subagent
|
|
162
|
-
- subagent_fork
|
|
163
|
-
- list_subagent_models
|
|
164
|
-
- workflow
|
|
165
|
-
- todo_write
|
|
166
|
-
- exit_plan_mode
|
|
167
|
-
- get_goal
|
|
168
|
-
- create_goal
|
|
169
|
-
- update_goal
|
|
170
|
-
- present
|
|
171
|
-
- read
|
|
172
|
-
- write
|
|
173
|
-
- edit
|
|
174
|
-
- glob
|
|
175
|
-
- grep
|
|
176
|
-
- read_image
|
|
177
|
-
- bash
|
|
178
|
-
- pwsh
|
|
179
|
-
- job_output
|
|
180
|
-
- job_list
|
|
181
|
-
- job_kill
|
|
182
|
-
- skill
|
|
183
|
-
- spawn_teammate
|
|
184
|
-
- send_message
|
|
185
|
-
- list_agents
|
|
186
|
-
- wait_agent
|
|
187
|
-
- interrupt_agent
|
|
188
|
-
- team_task_create
|
|
189
|
-
- team_task_list
|
|
190
|
-
- team_task_get
|
|
191
|
-
- team_task_update
|
|
192
|
-
- web_fetch
|
|
193
|
-
- web_search
|
|
22
|
+
denyPolicies:
|
|
23
|
+
- fs/edit-intent
|
|
194
24
|
chat:
|
|
195
|
-
preset: mode-switch
|
|
196
25
|
name: 对话模式
|
|
197
26
|
description: 只做对话:提问与联网(搜索、抓取)三件工具,不注入系统提示词、工作区指令与技能目录。
|
|
198
27
|
role:
|
|
@@ -208,20 +37,9 @@
|
|
|
208
37
|
- insert:
|
|
209
38
|
- id: subagent
|
|
210
39
|
name: "@morlay/dsh-subagent"
|
|
211
|
-
config:
|
|
212
|
-
localizedReturnGuidancePresets:
|
|
213
|
-
- mode-switch
|
|
214
40
|
- insert:
|
|
215
41
|
- id: context-assembler
|
|
216
42
|
name: "@morlay/dsh-context-assembler"
|
|
217
|
-
config:
|
|
218
|
-
capabilities:
|
|
219
|
-
- assembler
|
|
220
|
-
- agent-instructions
|
|
221
|
-
- skill-catalog
|
|
222
|
-
- insert:
|
|
223
|
-
- id: context-assembler-scope
|
|
224
|
-
name: "@morlay/dsh-context-assembler/scope"
|
|
225
43
|
- insert:
|
|
226
44
|
- id: tool-guidance
|
|
227
|
-
name: "@morlay/dsh-
|
|
45
|
+
name: "@morlay/dsh-tool-guidance"
|
package/icon.svg
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M4.9 11.6a4.6 4.6 0 0 1 4.6-4.6h17a4.6 4.6 0 0 1 4.6 4.6v6.8a4.6 4.6 0 0 1-4.6 4.6H15.6l-5.1 5.2a1.1 1.1 0 0 1-1.9-.8v-4.4h-.5a4.6 4.6 0 0 1-4.6-4.6Z" stroke="url(#bubble)" stroke-width="3" stroke-linejoin="round" />
|
|
3
|
+
<path d="M10.4 14.9h15.2" stroke="url(#rail)" stroke-width="2.6" stroke-linecap="round" />
|
|
4
|
+
<circle cx="21.6" cy="14.9" r="2.9" fill="url(#knob)" />
|
|
5
|
+
<defs>
|
|
6
|
+
<linearGradient id="bubble" x1="4.9" y1="7" x2="31.1" y2="23.8" gradientUnits="userSpaceOnUse">
|
|
7
|
+
<stop stop-color="#B9A6FF" />
|
|
8
|
+
<stop offset="1" stop-color="#6C4AE8" />
|
|
9
|
+
</linearGradient>
|
|
10
|
+
<linearGradient id="rail" x1="10.4" y1="14.9" x2="25.6" y2="14.9" gradientUnits="userSpaceOnUse">
|
|
11
|
+
<stop stop-color="#D6CBFF" />
|
|
12
|
+
<stop offset="1" stop-color="#8E75EE" />
|
|
13
|
+
</linearGradient>
|
|
14
|
+
<linearGradient id="knob" x1="18.7" y1="12" x2="24.5" y2="17.8" gradientUnits="userSpaceOnUse">
|
|
15
|
+
<stop stop-color="#DCD3FF" />
|
|
16
|
+
<stop offset="1" stop-color="#7A5AEC" />
|
|
17
|
+
</linearGradient>
|
|
18
|
+
</defs>
|
|
19
|
+
</svg>
|
package/locale/en.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Session Modes & Injection",
|
|
4
|
-
"description": "Session modes (
|
|
4
|
+
"description": "Session modes & injection: the session-mode row (each mode's persona, tool and policy lists, switches; the per-session scope lives inside it), the subagent takeover row, the injection channel, and tool guidance (localized copy, usage groups) — installed in one bundle. The row list belongs to the shipped preset a session rides on; this bundle declares no preset of its own."
|
|
5
5
|
}
|
|
6
6
|
}
|
package/locale/zh.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "会话模式与注入",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "会话模式与注入:会话模式行(各模式的 persona、工具与 policy 名单、开关;按会话收口也由它内部持有)+ subagent 服务接管行 + 注入通道 + 工具说明(汉化 / 用法分组),一次装齐;行清单归会话挂着的 shipped preset,本包不自建 preset。"
|
|
5
5
|
}
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morlay/session-mode-profile",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "会话模式与注入面:会话模式行(各模式的 persona、工具与 policy 名单、开关;按会话收口也由它内部持有)+ subagent 服务接管行 + 注入通道 + 工具说明(汉化 / 用法分组),一次装齐;行清单归会话挂着的 shipped preset,本包不自建 preset。",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bundle-entry",
|
|
7
7
|
"dsh",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
"locale/*.json",
|
|
17
17
|
"dist",
|
|
18
|
+
"icon.svg",
|
|
18
19
|
"src",
|
|
19
20
|
"cordis.patch.yml",
|
|
20
21
|
"!**/__tests__"
|
|
@@ -27,11 +28,11 @@
|
|
|
27
28
|
"./locale/*.json": "./locale/*.json"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
|
-
"@morlay/dsh-
|
|
31
|
-
"@morlay/dsh-
|
|
32
|
-
"@morlay/dsh-
|
|
33
|
-
"@morlay/dsh-
|
|
34
|
-
"@morlay/dsh-
|
|
31
|
+
"@morlay/dsh-client-ui-primitives": "0.0.5",
|
|
32
|
+
"@morlay/dsh-context-assembler": "0.0.3",
|
|
33
|
+
"@morlay/dsh-session-mode": "0.0.3",
|
|
34
|
+
"@morlay/dsh-subagent": "0.0.3",
|
|
35
|
+
"@morlay/dsh-tool-guidance": "0.0.3"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
38
|
"@deepseek-ai/cordis-plugin-include": "1.0.9",
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
"peerDependencies": {
|
|
43
44
|
"@deepseek-ai/cordis": "^4.0.4"
|
|
44
45
|
},
|
|
46
|
+
"icon": "./icon.svg",
|
|
45
47
|
"dsh": {
|
|
46
48
|
"bundle": {
|
|
47
49
|
"patch": "./cordis.patch.yml"
|