mirror of
https://github.com/yexi-by/dsh-unrestricted.git
synced 2026-11-27 10:20:22 +08:00
适配 DSH 新版 persona 与 Web RPC 组合
This commit is contained in:
1 parent
254d403259
commit
d0ef3f2536
26 files changed
+135
-74
No files matched your search
@@ -9,7 +9,7 @@ DSH 原版提示词。
|
||||
下面的命令把当前稳定版本安装到 DSH 的 `web` profile:
|
||||
|
||||
```sh
|
||||
dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.1.4
|
||||
dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.1.5
|
||||
```
|
||||
|
||||
安装后重启 `dsh web`,然后进入
|
||||
@@ -53,7 +53,7 @@ DSH 的原版系统提示词主要规定 agent 身份、计划模式和工具调
|
||||
规则和 structured-output 首句。校验未通过时,该模式保持原版提示词,并在设置卡片中显示
|
||||
具体问题。
|
||||
|
||||
插件直接面向 DSH 当前 `master`,使用当前的 `ptc` preset、`tools:ptc-only` 段和
|
||||
插件直接面向 DSH `0.1.3-alpha.2` 的 master `c389f96bf3`,使用当前的 `ptc` preset、`tools:ptc-only` 段和
|
||||
字符串 settings namespace。完整改写清单见
|
||||
[当前 master 提示词融合说明](docs/prompt-fusion.md)。
|
||||
|
||||
@@ -123,3 +123,5 @@ tests/ 规则测试与 DSH 原版提示词 fixtures
|
||||
tools/ 原版提示词抓取和集成验证脚本
|
||||
docs/ 原版与融合版的逐项差异
|
||||
```
|
||||
|
||||
Web bundle 为官方 `connection` 条目声明 `webServer` 依赖,并保留 `webRuntime`;私有 RPC 因而可以在 DSH `0.1.3-alpha.2` 上注册,浏览器认证继续由 Connection 处理。
|
||||
@@ -36,8 +36,8 @@ SOFTWARE.
|
||||
## DeepSeek Harness
|
||||
|
||||
`src/rules.js` 中的当前提示词锚点和 `tests/fixtures/` 中的原版提示词来自
|
||||
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness/tree/d347e703908d0406b7a7ef80e3a0e594d86b2215)
|
||||
`0.1.3-alpha.1`。
|
||||
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness/tree/c389f96bf3a9b6807cb71ed6bdad5849be0df6d8)
|
||||
`0.1.3-alpha.2`。
|
||||
|
||||
原项目使用以下许可证:
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
# Web 私有 RPC 需要 Connection 自身持有 webServer;保留官方 Web 配置的 webRuntime 依赖。
|
||||
- id: connection
|
||||
name: '@deepseek-ai/dsh-client-connection'
|
||||
inject: [webRuntime, webServer]
|
||||
|
||||
# dsh-unrestricted bundle layer: one row mounts the plugin's node half; the
|
||||
# browser half is discovered through the package's dsh.client manifest and
|
||||
# served by the client-module registry. Prompt fusion happens in the node
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
# 当前 master 提示词融合说明
|
||||
|
||||
本文记录 dsh-unrestricted 在 DSH `0.1.3-alpha.1`(master `d347e70390`)上的提示词融合行为。`tools/dump-prompts.mjs` 在临时 settings、storage 和 session 根目录中从 Web composition 组装原版提示词,并保存到 `tests/fixtures/`。纯提示词验证关闭依赖 HTTP Connection 的文件上传与会话控制入口。
|
||||
本文记录 dsh-unrestricted 在 DSH `0.1.3-alpha.2`(master `c389f96bf3`)上的提示词融合行为。`tools/dump-prompts.mjs` 在临时 settings、storage 和 session 根目录中从 Web composition 组装原版提示词,并保存到 `tests/fixtures/`。纯提示词验证关闭依赖 HTTP Connection 的文件上传、会话控制与在应用中打开入口。
|
||||
|
||||
## 融合规则
|
||||
|
||||
插件保留原版全部提示词段、动态上下文、工具 schema 与变量,并做四项定向追加:
|
||||
|
||||
1. 在 `deployment:persona` 末尾加入执行模式指针。
|
||||
1. 在 `deployment:persona-prefix` 末尾加入执行模式指针。
|
||||
2. 在 persona 后插入 `unrestricted:execution-mode` 段。
|
||||
3. plan 激活时,在 `plan:policy` 末尾说明 plan 负责交付与变更范围,执行模式负责内容尺度。
|
||||
4. PTC 与结构化子代理分别在 `tools:ptc-only`、`tool:structured_output` 末尾保留其交付协议。
|
||||
|
||||
本体把 persona 拆为 prefix 与 suffix;插件只扩展 prefix,工作目录等 suffix 内容保留在本体安排的末尾。
|
||||
|
||||
融合段决定回答内容与表达尺度。工具目录、调用协议、plan、审批、沙箱、结构化输出和模式范围继续由 DSH 原版规则决定。
|
||||
|
||||
## 各 preset
|
||||
@@ -29,7 +31,7 @@ Cordis 保留完整的两平面 persona、动态 Cordis 工具说明和其余工
|
||||
|
||||
### Minimal
|
||||
|
||||
Minimal 的 `deployment:persona` 使用 `complete: true`。插件在 agent 作用域注册同名完整 persona,使其成为“原单句 persona + 指针 + 执行模式段”;关闭开关时移除该作用域覆盖。完整 persona 最终成为唯一提示词段,因此插件使用自身的有限顺序值,不依赖仓内 section 顺序名称。
|
||||
Minimal 的 `deployment:persona-prefix` 使用 `complete: true`。插件在 agent 作用域注册同名完整 persona,使其成为“原单句 persona + 指针 + 执行模式段”;关闭开关时移除该作用域覆盖。完整 persona 最终成为唯一提示词段,因此插件使用自身的有限顺序值,不依赖仓内 section 顺序名称。
|
||||
|
||||
### 子代理
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dsh-unrestricted",
|
||||
"version": "0.1.4",
|
||||
"version": "0.1.5",
|
||||
"private": true,
|
||||
"description": "Toggleable unrestricted mode for the current DSH master: fuses execution rules into the active standard, ptc, cordis, minimal, and subagent prompts",
|
||||
"license": "MIT",
|
||||
|
||||
+4
-5
@@ -15,7 +15,7 @@
|
||||
* - `minimal` registers its persona with `complete: true`, which the registry
|
||||
* restores AFTER the waterfall, so waterfall edits cannot reach it. For
|
||||
* minimal agents (joined or later created) the plugin shadows
|
||||
* `deployment:persona` at agent scope with a complete section carrying the
|
||||
* `deployment:persona-prefix` at agent scope with a complete section carrying the
|
||||
* fused minimal prompt.
|
||||
* - Anchor failures (startup standing-scope check or any live assembly) leave
|
||||
* that prompt unchanged and show the failed current-master invariant in the
|
||||
@@ -137,7 +137,7 @@ export function apply(ctx) {
|
||||
}
|
||||
if (presetId !== 'minimal') return
|
||||
const dispose = agent.ctx.systemPrompt.section({
|
||||
name: 'deployment:persona',
|
||||
name: 'deployment:persona-prefix',
|
||||
order: 0,
|
||||
complete: true,
|
||||
text: state.fusedMinimal,
|
||||
@@ -259,10 +259,9 @@ export function apply(ctx) {
|
||||
}
|
||||
}, 'dsh-unrestricted: toggle lifecycle')
|
||||
|
||||
// The status channel is optional: headless compositions carry no connection
|
||||
// service, while the web profile serves the settings card over loopback RPC.
|
||||
// Web 状态通道由官方 Connection 认证;headless 组合无需提供 connection 服务。
|
||||
ctx.inject(['connection'], (connectionCtx) => {
|
||||
const disposeRpc = connectionCtx.connection.rpc.handle(RPC_CHANNEL, handleRpc, { authority: 'loopback' })
|
||||
const disposeRpc = connectionCtx.connection.rpc.handle(RPC_CHANNEL, handleRpc)
|
||||
return async () => {
|
||||
await disposeRpc()
|
||||
}
|
||||
|
||||
+5
-5
@@ -13,8 +13,8 @@
|
||||
/** Exact original section texts / prefixes, verified per assembly before any rewrite. */
|
||||
export const ANCHORS = {
|
||||
identity: 'You are an AI agent powered by DeepSeek Harness.',
|
||||
personaStandard: 'You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}.',
|
||||
personaCordis: 'You are a coding agent powered by the {{model}} model, running on the DeepSeek Harness. Your working directory is {{cwd}}.\n\nYou can read and modify the harness you run on. Its composition is Cordis: every capability is a plugin row in a `cordis.yml`, and an agent preset is one such file mounted for a single session.\n\nTwo planes decide where an edit belongs. The HOST composition holds the registries and anything shared across sessions — persistence, the sandbox and approval stack, the model route, the subagent registry and its backends. An AGENT PRESET holds what one session contributes to those registries: its tools, its persona, its prompt sections. A row that publishes a service belongs in the host composition, or inside an `isolate` realm if the preset genuinely owns that service and nothing outside one agent reads it.\n\nPresets you author live one directory per preset under `${DSH_HOME:-$HOME/.dsh}/.agent-presets/<id>/`; the roster reports each preset\'s real path, so take the one you edit from there. NEVER edit or delete the shipped preset install (the `agent-presets` directory beside the deployment\'s own config): it belongs to the deployment, an upgrade overwrites it, and corrupting the `cordis` preset would disable this very mode. To change what a shipped preset does, copy its composition into a new preset directory and edit the copy.\n\nLoad the `editing-cordis-compositions` skill before writing or changing a composition.',
|
||||
personaStandard: 'You are a coding agent powered by the {{model}} model.',
|
||||
personaCordis: 'You are a coding agent powered by the {{model}} model, running on the DeepSeek Harness.\n\nYou can read and modify the harness you run on. Its composition is Cordis: every capability is a plugin row in a `cordis.yml`, and an agent preset is one such file mounted for a single session.\n\nTwo planes decide where an edit belongs. The HOST composition holds the registries and anything shared across sessions — persistence, the sandbox and approval stack, the model route, the subagent registry and its backends. An AGENT PRESET holds what one session contributes to those registries: its tools, its persona, its prompt sections. A row that publishes a service belongs in the host composition, or inside an `isolate` realm if the preset genuinely owns that service and nothing outside one agent reads it.\n\nPresets you author live one directory per preset under `${DSH_HOME:-$HOME/.dsh}/.agent-presets/<id>/`; the roster reports each preset\'s real path, so take the one you edit from there. NEVER edit or delete the shipped preset install (the `agent-presets` directory beside the deployment\'s own config): it belongs to the deployment, an upgrade overwrites it, and corrupting the `cordis` preset would disable this very mode. To change what a shipped preset does, copy its composition into a new preset directory and edit the copy.\n\nLoad the `editing-cordis-compositions` skill before writing or changing a composition.',
|
||||
personaMinimal: 'You are a helpful software engineer assistant.',
|
||||
planPrefix: 'You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode.',
|
||||
ptcOnly: '`run_code` is the only tool you can call directly — a tool call naming any other tool fails. Reach every tool the SDK declares below from inside the program.',
|
||||
@@ -151,12 +151,12 @@ export function fuseSections(sections, presetId, { isSubagent = false } = {}) {
|
||||
issues.push(ISSUE_LABELS.identity)
|
||||
}
|
||||
|
||||
const persona = byName.get('deployment:persona')
|
||||
const persona = byName.get('deployment:persona-prefix')
|
||||
const personaAnchor = ANCHORS[rules.persona]
|
||||
let fusedPersona = undefined
|
||||
if (persona !== undefined && persona.text === personaAnchor) {
|
||||
fusedPersona = { ...persona, text: persona.text + PERSONA_POINTER }
|
||||
} else if (persona !== undefined && !isSubagent) {
|
||||
} else if (!isSubagent) {
|
||||
issues.push(ISSUE_LABELS.persona)
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ export function fuseSections(sections, presetId, { isSubagent = false } = {}) {
|
||||
.map(section => [section.name, section]),
|
||||
)
|
||||
const fused = sections.map(section => replaced.get(section.name) ?? section)
|
||||
const personaIndex = fused.findIndex(section => section.name === 'deployment:persona')
|
||||
const personaIndex = fused.findIndex(section => section.name === 'deployment:persona-prefix')
|
||||
const block = { name: BLOCK_SECTION, text: EXECUTION_MODE_BLOCK }
|
||||
fused.splice(personaIndex < 0 ? 0 : personaIndex + 1, 0, block)
|
||||
return { sections: fused }
|
||||
|
||||
Vendored
+31
-24
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"fixtureCwd": "/workspace/dsh-unrestricted",
|
||||
"commit": "d347e703908d0406b7a7ef80e3a0e594d86b2215",
|
||||
"capturedAt": "2026-09-04T22:20:48.655Z",
|
||||
"commit": "c389f96bf3a9b6807cb71ed6bdad5849be0df6d8",
|
||||
"capturedAt": "2026-09-08T11:27:43.522Z",
|
||||
"dumps": {
|
||||
"standard": {
|
||||
"sections": [
|
||||
"harness:identity",
|
||||
"deployment:persona",
|
||||
"deployment:persona-prefix",
|
||||
"plan:policy",
|
||||
"context:file-reference",
|
||||
"tool:pwsh",
|
||||
@@ -23,7 +23,8 @@
|
||||
"tool:ralph",
|
||||
"tool:subagent",
|
||||
"tool:subagent_fork",
|
||||
"ui:deliverable-file-references"
|
||||
"ui:deliverable-file-references",
|
||||
"deployment:persona-suffix"
|
||||
],
|
||||
"tools": [
|
||||
"ask_user_question",
|
||||
@@ -53,12 +54,12 @@
|
||||
"workflow",
|
||||
"write"
|
||||
],
|
||||
"promptBytes": 5700
|
||||
"promptBytes": 5701
|
||||
},
|
||||
"standard-plan": {
|
||||
"sections": [
|
||||
"harness:identity",
|
||||
"deployment:persona",
|
||||
"deployment:persona-prefix",
|
||||
"plan:policy",
|
||||
"context:file-reference",
|
||||
"tool:pwsh",
|
||||
@@ -75,7 +76,8 @@
|
||||
"tool:ralph",
|
||||
"tool:subagent",
|
||||
"tool:subagent_fork",
|
||||
"ui:deliverable-file-references"
|
||||
"ui:deliverable-file-references",
|
||||
"deployment:persona-suffix"
|
||||
],
|
||||
"tools": [
|
||||
"ask_user_question",
|
||||
@@ -105,12 +107,12 @@
|
||||
"workflow",
|
||||
"write"
|
||||
],
|
||||
"promptBytes": 8046
|
||||
"promptBytes": 8047
|
||||
},
|
||||
"ptc": {
|
||||
"sections": [
|
||||
"harness:identity",
|
||||
"deployment:persona",
|
||||
"deployment:persona-prefix",
|
||||
"plan:policy",
|
||||
"tools:ptc-only",
|
||||
"context:file-reference",
|
||||
@@ -128,17 +130,18 @@
|
||||
"tool:subagent",
|
||||
"tool:subagent_fork",
|
||||
"tools:sdk",
|
||||
"ui:deliverable-file-references"
|
||||
"ui:deliverable-file-references",
|
||||
"deployment:persona-suffix"
|
||||
],
|
||||
"tools": [
|
||||
"run_code"
|
||||
],
|
||||
"promptBytes": 33808
|
||||
"promptBytes": 33809
|
||||
},
|
||||
"ptc-plan": {
|
||||
"sections": [
|
||||
"harness:identity",
|
||||
"deployment:persona",
|
||||
"deployment:persona-prefix",
|
||||
"plan:policy",
|
||||
"tools:ptc-only",
|
||||
"context:file-reference",
|
||||
@@ -156,17 +159,18 @@
|
||||
"tool:subagent",
|
||||
"tool:subagent_fork",
|
||||
"tools:sdk",
|
||||
"ui:deliverable-file-references"
|
||||
"ui:deliverable-file-references",
|
||||
"deployment:persona-suffix"
|
||||
],
|
||||
"tools": [
|
||||
"run_code"
|
||||
],
|
||||
"promptBytes": 36154
|
||||
"promptBytes": 36155
|
||||
},
|
||||
"cordis": {
|
||||
"sections": [
|
||||
"harness:identity",
|
||||
"deployment:persona",
|
||||
"deployment:persona-prefix",
|
||||
"plan:policy",
|
||||
"context:file-reference",
|
||||
"tool:pwsh",
|
||||
@@ -184,7 +188,8 @@
|
||||
"tool:ralph",
|
||||
"tool:subagent",
|
||||
"tool:subagent_fork",
|
||||
"ui:deliverable-file-references"
|
||||
"ui:deliverable-file-references",
|
||||
"deployment:persona-suffix"
|
||||
],
|
||||
"tools": [
|
||||
"ask_user_question",
|
||||
@@ -221,12 +226,12 @@
|
||||
"workflow",
|
||||
"write"
|
||||
],
|
||||
"promptBytes": 17271
|
||||
"promptBytes": 17272
|
||||
},
|
||||
"cordis-plan": {
|
||||
"sections": [
|
||||
"harness:identity",
|
||||
"deployment:persona",
|
||||
"deployment:persona-prefix",
|
||||
"plan:policy",
|
||||
"context:file-reference",
|
||||
"tool:pwsh",
|
||||
@@ -244,7 +249,8 @@
|
||||
"tool:ralph",
|
||||
"tool:subagent",
|
||||
"tool:subagent_fork",
|
||||
"ui:deliverable-file-references"
|
||||
"ui:deliverable-file-references",
|
||||
"deployment:persona-suffix"
|
||||
],
|
||||
"tools": [
|
||||
"ask_user_question",
|
||||
@@ -281,11 +287,11 @@
|
||||
"workflow",
|
||||
"write"
|
||||
],
|
||||
"promptBytes": 19617
|
||||
"promptBytes": 19618
|
||||
},
|
||||
"minimal": {
|
||||
"sections": [
|
||||
"deployment:persona"
|
||||
"deployment:persona-prefix"
|
||||
],
|
||||
"tools": [
|
||||
"pwsh",
|
||||
@@ -296,7 +302,7 @@
|
||||
"subagent-standard": {
|
||||
"sections": [
|
||||
"harness:identity",
|
||||
"deployment:persona",
|
||||
"deployment:persona-prefix",
|
||||
"plan:policy",
|
||||
"context:file-reference",
|
||||
"tool:pwsh",
|
||||
@@ -313,7 +319,8 @@
|
||||
"tool:ralph",
|
||||
"tool:subagent",
|
||||
"tool:subagent_fork",
|
||||
"ui:deliverable-file-references"
|
||||
"ui:deliverable-file-references",
|
||||
"deployment:persona-suffix"
|
||||
],
|
||||
"tools": [
|
||||
"ask_user_question",
|
||||
@@ -343,7 +350,7 @@
|
||||
"workflow",
|
||||
"write"
|
||||
],
|
||||
"promptBytes": 5700
|
||||
"promptBytes": 5701
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-2
@@ -1,6 +1,6 @@
|
||||
You are an AI agent powered by DeepSeek Harness.
|
||||
|
||||
You are a coding agent powered by the deepseek-chat model, running on the DeepSeek Harness. Your working directory is /workspace/dsh-unrestricted.
|
||||
You are a coding agent powered by the deepseek-chat model, running on the DeepSeek Harness.
|
||||
|
||||
You can read and modify the harness you run on. Its composition is Cordis: every capability is a plugin row in a `cordis.yml`, and an agent preset is one such file mounted for a single session.
|
||||
|
||||
@@ -159,4 +159,6 @@ Use subagent in the background by default. Start independent delegations togethe
|
||||
|
||||
Use subagent_fork in the background by default. Start independent delegations together in one assistant message and continue useful work while they run. Set `run_in_background: false` only when your next action depends on that subagent's result. When a background run settles, the runtime sends you a notice containing its outcome and any final assistant message.
|
||||
|
||||
When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn.
|
||||
When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn.
|
||||
|
||||
Your working directory is /workspace/dsh-unrestricted.
|
||||
Vendored
+4
-2
@@ -1,6 +1,6 @@
|
||||
You are an AI agent powered by DeepSeek Harness.
|
||||
|
||||
You are a coding agent powered by the deepseek-chat model, running on the DeepSeek Harness. Your working directory is /workspace/dsh-unrestricted.
|
||||
You are a coding agent powered by the deepseek-chat model, running on the DeepSeek Harness.
|
||||
|
||||
You can read and modify the harness you run on. Its composition is Cordis: every capability is a plugin row in a `cordis.yml`, and an agent preset is one such file mounted for a single session.
|
||||
|
||||
@@ -146,4 +146,6 @@ Use subagent in the background by default. Start independent delegations togethe
|
||||
|
||||
Use subagent_fork in the background by default. Start independent delegations together in one assistant message and continue useful work while they run. Set `run_in_background: false` only when your next action depends on that subagent's result. When a background run settles, the runtime sends you a notice containing its outcome and any final assistant message.
|
||||
|
||||
When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn.
|
||||
When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn.
|
||||
|
||||
Your working directory is /workspace/dsh-unrestricted.
|
||||
Vendored
+4
-2
@@ -1,6 +1,6 @@
|
||||
You are an AI agent powered by DeepSeek Harness.
|
||||
|
||||
You are a coding agent powered by the deepseek-chat model. Your working directory is /workspace/dsh-unrestricted.
|
||||
You are a coding agent powered by the deepseek-chat model.
|
||||
|
||||
You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
|
||||
|
||||
@@ -549,4 +549,6 @@ declare const tools: {
|
||||
}
|
||||
```
|
||||
|
||||
When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn.
|
||||
When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn.
|
||||
|
||||
Your working directory is /workspace/dsh-unrestricted.
|
||||
Vendored
+4
-2
@@ -1,6 +1,6 @@
|
||||
You are an AI agent powered by DeepSeek Harness.
|
||||
|
||||
You are a coding agent powered by the deepseek-chat model. Your working directory is /workspace/dsh-unrestricted.
|
||||
You are a coding agent powered by the deepseek-chat model.
|
||||
|
||||
`run_code` is the only tool you can call directly — a tool call naming any other tool fails. Reach every tool the SDK declares below from inside the program.
|
||||
|
||||
@@ -536,4 +536,6 @@ declare const tools: {
|
||||
}
|
||||
```
|
||||
|
||||
When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn.
|
||||
When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn.
|
||||
|
||||
Your working directory is /workspace/dsh-unrestricted.
|
||||
+4
-2
@@ -1,6 +1,6 @@
|
||||
You are an AI agent powered by DeepSeek Harness.
|
||||
|
||||
You are a coding agent powered by the deepseek-chat model. Your working directory is /workspace/dsh-unrestricted.
|
||||
You are a coding agent powered by the deepseek-chat model.
|
||||
|
||||
You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
|
||||
|
||||
@@ -45,4 +45,6 @@ Use subagent in the background by default. Start independent delegations togethe
|
||||
|
||||
Use subagent_fork in the background by default. Start independent delegations together in one assistant message and continue useful work while they run. Set `run_in_background: false` only when your next action depends on that subagent's result. When a background run settles, the runtime sends you a notice containing its outcome and any final assistant message.
|
||||
|
||||
When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn.
|
||||
When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn.
|
||||
|
||||
Your working directory is /workspace/dsh-unrestricted.
|
||||
Vendored
+4
-2
@@ -1,6 +1,6 @@
|
||||
You are an AI agent powered by DeepSeek Harness.
|
||||
|
||||
You are a coding agent powered by the deepseek-chat model. Your working directory is /workspace/dsh-unrestricted.
|
||||
You are a coding agent powered by the deepseek-chat model.
|
||||
|
||||
Tokens prefixed with @ are workspace paths the user explicitly referenced, relative to the workspace root. A trailing slash marks a directory: list it when its contents matter. Anything else is a file: use the read tool when its contents are needed, and do not claim to have inspected it before reading. @"..." quotes a path containing spaces.
|
||||
|
||||
@@ -32,4 +32,6 @@ Use subagent in the background by default. Start independent delegations togethe
|
||||
|
||||
Use subagent_fork in the background by default. Start independent delegations together in one assistant message and continue useful work while they run. Set `run_in_background: false` only when your next action depends on that subagent's result. When a background run settles, the runtime sends you a notice containing its outcome and any final assistant message.
|
||||
|
||||
When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn.
|
||||
When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn.
|
||||
|
||||
Your working directory is /workspace/dsh-unrestricted.
|
||||
+4
-2
@@ -1,6 +1,6 @@
|
||||
You are an AI agent powered by DeepSeek Harness.
|
||||
|
||||
You are a coding agent powered by the deepseek-chat model. Your working directory is /workspace/dsh-unrestricted.
|
||||
You are a coding agent powered by the deepseek-chat model.
|
||||
|
||||
Tokens prefixed with @ are workspace paths the user explicitly referenced, relative to the workspace root. A trailing slash marks a directory: list it when its contents matter. Anything else is a file: use the read tool when its contents are needed, and do not claim to have inspected it before reading. @"..." quotes a path containing spaces.
|
||||
|
||||
@@ -32,4 +32,6 @@ Use subagent in the background by default. Start independent delegations togethe
|
||||
|
||||
Use subagent_fork in the background by default. Start independent delegations together in one assistant message and continue useful work while they run. Set `run_in_background: false` only when your next action depends on that subagent's result. When a background run settles, the runtime sends you a notice containing its outcome and any final assistant message.
|
||||
|
||||
When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn.
|
||||
When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn.
|
||||
|
||||
Your working directory is /workspace/dsh-unrestricted.
|
||||
+6
-2
@@ -4,8 +4,8 @@
|
||||
"text": "You are an AI agent powered by DeepSeek Harness."
|
||||
},
|
||||
{
|
||||
"name": "deployment:persona",
|
||||
"text": "You are a coding agent powered by the {{model}} model, running on the DeepSeek Harness. Your working directory is {{cwd}}.\n\nYou can read and modify the harness you run on. Its composition is Cordis: every capability is a plugin row in a `cordis.yml`, and an agent preset is one such file mounted for a single session.\n\nTwo planes decide where an edit belongs. The HOST composition holds the registries and anything shared across sessions — persistence, the sandbox and approval stack, the model route, the subagent registry and its backends. An AGENT PRESET holds what one session contributes to those registries: its tools, its persona, its prompt sections. A row that publishes a service belongs in the host composition, or inside an `isolate` realm if the preset genuinely owns that service and nothing outside one agent reads it.\n\nPresets you author live one directory per preset under `${DSH_HOME:-$HOME/.dsh}/.agent-presets/<id>/`; the roster reports each preset's real path, so take the one you edit from there. NEVER edit or delete the shipped preset install (the `agent-presets` directory beside the deployment's own config): it belongs to the deployment, an upgrade overwrites it, and corrupting the `cordis` preset would disable this very mode. To change what a shipped preset does, copy its composition into a new preset directory and edit the copy.\n\nLoad the `editing-cordis-compositions` skill before writing or changing a composition."
|
||||
"name": "deployment:persona-prefix",
|
||||
"text": "You are a coding agent powered by the {{model}} model, running on the DeepSeek Harness.\n\nYou can read and modify the harness you run on. Its composition is Cordis: every capability is a plugin row in a `cordis.yml`, and an agent preset is one such file mounted for a single session.\n\nTwo planes decide where an edit belongs. The HOST composition holds the registries and anything shared across sessions — persistence, the sandbox and approval stack, the model route, the subagent registry and its backends. An AGENT PRESET holds what one session contributes to those registries: its tools, its persona, its prompt sections. A row that publishes a service belongs in the host composition, or inside an `isolate` realm if the preset genuinely owns that service and nothing outside one agent reads it.\n\nPresets you author live one directory per preset under `${DSH_HOME:-$HOME/.dsh}/.agent-presets/<id>/`; the roster reports each preset's real path, so take the one you edit from there. NEVER edit or delete the shipped preset install (the `agent-presets` directory beside the deployment's own config): it belongs to the deployment, an upgrade overwrites it, and corrupting the `cordis` preset would disable this very mode. To change what a shipped preset does, copy its composition into a new preset directory and edit the copy.\n\nLoad the `editing-cordis-compositions` skill before writing or changing a composition."
|
||||
},
|
||||
{
|
||||
"name": "plan:policy",
|
||||
@@ -78,5 +78,9 @@
|
||||
{
|
||||
"name": "ui:deliverable-file-references",
|
||||
"text": "When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn."
|
||||
},
|
||||
{
|
||||
"name": "deployment:persona-suffix",
|
||||
"text": "Your working directory is {{cwd}}."
|
||||
}
|
||||
]
|
||||
Vendored
+6
-2
@@ -4,8 +4,8 @@
|
||||
"text": "You are an AI agent powered by DeepSeek Harness."
|
||||
},
|
||||
{
|
||||
"name": "deployment:persona",
|
||||
"text": "You are a coding agent powered by the {{model}} model, running on the DeepSeek Harness. Your working directory is {{cwd}}.\n\nYou can read and modify the harness you run on. Its composition is Cordis: every capability is a plugin row in a `cordis.yml`, and an agent preset is one such file mounted for a single session.\n\nTwo planes decide where an edit belongs. The HOST composition holds the registries and anything shared across sessions — persistence, the sandbox and approval stack, the model route, the subagent registry and its backends. An AGENT PRESET holds what one session contributes to those registries: its tools, its persona, its prompt sections. A row that publishes a service belongs in the host composition, or inside an `isolate` realm if the preset genuinely owns that service and nothing outside one agent reads it.\n\nPresets you author live one directory per preset under `${DSH_HOME:-$HOME/.dsh}/.agent-presets/<id>/`; the roster reports each preset's real path, so take the one you edit from there. NEVER edit or delete the shipped preset install (the `agent-presets` directory beside the deployment's own config): it belongs to the deployment, an upgrade overwrites it, and corrupting the `cordis` preset would disable this very mode. To change what a shipped preset does, copy its composition into a new preset directory and edit the copy.\n\nLoad the `editing-cordis-compositions` skill before writing or changing a composition."
|
||||
"name": "deployment:persona-prefix",
|
||||
"text": "You are a coding agent powered by the {{model}} model, running on the DeepSeek Harness.\n\nYou can read and modify the harness you run on. Its composition is Cordis: every capability is a plugin row in a `cordis.yml`, and an agent preset is one such file mounted for a single session.\n\nTwo planes decide where an edit belongs. The HOST composition holds the registries and anything shared across sessions — persistence, the sandbox and approval stack, the model route, the subagent registry and its backends. An AGENT PRESET holds what one session contributes to those registries: its tools, its persona, its prompt sections. A row that publishes a service belongs in the host composition, or inside an `isolate` realm if the preset genuinely owns that service and nothing outside one agent reads it.\n\nPresets you author live one directory per preset under `${DSH_HOME:-$HOME/.dsh}/.agent-presets/<id>/`; the roster reports each preset's real path, so take the one you edit from there. NEVER edit or delete the shipped preset install (the `agent-presets` directory beside the deployment's own config): it belongs to the deployment, an upgrade overwrites it, and corrupting the `cordis` preset would disable this very mode. To change what a shipped preset does, copy its composition into a new preset directory and edit the copy.\n\nLoad the `editing-cordis-compositions` skill before writing or changing a composition."
|
||||
},
|
||||
{
|
||||
"name": "plan:policy",
|
||||
@@ -78,5 +78,9 @@
|
||||
{
|
||||
"name": "ui:deliverable-file-references",
|
||||
"text": "When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn."
|
||||
},
|
||||
{
|
||||
"name": "deployment:persona-suffix",
|
||||
"text": "Your working directory is {{cwd}}."
|
||||
}
|
||||
]
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
"name": "deployment:persona",
|
||||
"name": "deployment:persona-prefix",
|
||||
"text": "You are a helpful software engineer assistant."
|
||||
}
|
||||
]
|
||||
+6
-2
@@ -4,8 +4,8 @@
|
||||
"text": "You are an AI agent powered by DeepSeek Harness."
|
||||
},
|
||||
{
|
||||
"name": "deployment:persona",
|
||||
"text": "You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}."
|
||||
"name": "deployment:persona-prefix",
|
||||
"text": "You are a coding agent powered by the {{model}} model."
|
||||
},
|
||||
{
|
||||
"name": "plan:policy",
|
||||
@@ -78,5 +78,9 @@
|
||||
{
|
||||
"name": "ui:deliverable-file-references",
|
||||
"text": "When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn."
|
||||
},
|
||||
{
|
||||
"name": "deployment:persona-suffix",
|
||||
"text": "Your working directory is {{cwd}}."
|
||||
}
|
||||
]
|
||||
Vendored
+6
-2
@@ -4,8 +4,8 @@
|
||||
"text": "You are an AI agent powered by DeepSeek Harness."
|
||||
},
|
||||
{
|
||||
"name": "deployment:persona",
|
||||
"text": "You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}."
|
||||
"name": "deployment:persona-prefix",
|
||||
"text": "You are a coding agent powered by the {{model}} model."
|
||||
},
|
||||
{
|
||||
"name": "plan:policy",
|
||||
@@ -78,5 +78,9 @@
|
||||
{
|
||||
"name": "ui:deliverable-file-references",
|
||||
"text": "When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn."
|
||||
},
|
||||
{
|
||||
"name": "deployment:persona-suffix",
|
||||
"text": "Your working directory is {{cwd}}."
|
||||
}
|
||||
]
|
||||
+6
-2
@@ -4,8 +4,8 @@
|
||||
"text": "You are an AI agent powered by DeepSeek Harness."
|
||||
},
|
||||
{
|
||||
"name": "deployment:persona",
|
||||
"text": "You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}."
|
||||
"name": "deployment:persona-prefix",
|
||||
"text": "You are a coding agent powered by the {{model}} model."
|
||||
},
|
||||
{
|
||||
"name": "plan:policy",
|
||||
@@ -74,5 +74,9 @@
|
||||
{
|
||||
"name": "ui:deliverable-file-references",
|
||||
"text": "When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn."
|
||||
},
|
||||
{
|
||||
"name": "deployment:persona-suffix",
|
||||
"text": "Your working directory is {{cwd}}."
|
||||
}
|
||||
]
|
||||
+6
-2
@@ -4,8 +4,8 @@
|
||||
"text": "You are an AI agent powered by DeepSeek Harness."
|
||||
},
|
||||
{
|
||||
"name": "deployment:persona",
|
||||
"text": "You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}."
|
||||
"name": "deployment:persona-prefix",
|
||||
"text": "You are a coding agent powered by the {{model}} model."
|
||||
},
|
||||
{
|
||||
"name": "plan:policy",
|
||||
@@ -74,5 +74,9 @@
|
||||
{
|
||||
"name": "ui:deliverable-file-references",
|
||||
"text": "When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn."
|
||||
},
|
||||
{
|
||||
"name": "deployment:persona-suffix",
|
||||
"text": "Your working directory is {{cwd}}."
|
||||
}
|
||||
]
|
||||
+6
-2
@@ -4,8 +4,8 @@
|
||||
"text": "You are an AI agent powered by DeepSeek Harness."
|
||||
},
|
||||
{
|
||||
"name": "deployment:persona",
|
||||
"text": "You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}."
|
||||
"name": "deployment:persona-prefix",
|
||||
"text": "You are a coding agent powered by the {{model}} model."
|
||||
},
|
||||
{
|
||||
"name": "plan:policy",
|
||||
@@ -74,5 +74,9 @@
|
||||
{
|
||||
"name": "ui:deliverable-file-references",
|
||||
"text": "When you successfully create or modify files, mention the primary outputs in your final response. To make those and any other changed-file references clickable in Web, format them as Markdown inline code using the exact file-tool path, or a basename when unique among the files changed in that turn."
|
||||
},
|
||||
{
|
||||
"name": "deployment:persona-suffix",
|
||||
"text": "Your working directory is {{cwd}}."
|
||||
}
|
||||
]
|
||||
@@ -75,7 +75,7 @@ for (const { label, preset, isSubagent } of CASES) {
|
||||
assert.equal(fusedNames.filter(name => name === BLOCK_SECTION).length, 1)
|
||||
|
||||
// The block sits directly behind the persona.
|
||||
assert.equal(fusedNames.indexOf(BLOCK_SECTION), fusedNames.indexOf('deployment:persona') + 1)
|
||||
assert.equal(fusedNames.indexOf(BLOCK_SECTION), fusedNames.indexOf('deployment:persona-prefix') + 1)
|
||||
assert.equal(fused.find(section => section.name === BLOCK_SECTION).text, EXECUTION_MODE_BLOCK)
|
||||
|
||||
// Every changed section keeps its original text as a strict prefix.
|
||||
@@ -87,7 +87,7 @@ for (const { label, preset, isSubagent } of CASES) {
|
||||
fusedSection.text.startsWith(original.text),
|
||||
`section "${original.name}" was rewritten instead of appended`,
|
||||
)
|
||||
assert.ok(['deployment:persona', 'plan:policy', 'tools:ptc-only', 'tool:structured_output']
|
||||
assert.ok(['deployment:persona-prefix', 'plan:policy', 'tools:ptc-only', 'tool:structured_output']
|
||||
.includes(original.name), `section "${original.name}" must not change`)
|
||||
}
|
||||
}
|
||||
@@ -126,9 +126,11 @@ test('tampered anchors refuse to fuse and name the failing rule', async () => {
|
||||
assert.ok(fuseSections(identity, 'standard').issues.some(issue => issue.includes('identity')))
|
||||
|
||||
const persona = sections.map(section =>
|
||||
section.name === 'deployment:persona' ? { ...section, text: 'You are someone else.' } : section)
|
||||
section.name === 'deployment:persona-prefix' ? { ...section, text: 'You are someone else.' } : section)
|
||||
const personaResult = fuseSections(persona, 'standard')
|
||||
assert.ok(personaResult.issues.some(issue => issue.includes('persona')))
|
||||
const missingPersona = sections.filter(section => section.name !== 'deployment:persona-prefix')
|
||||
assert.ok(fuseSections(missingPersona, 'standard').issues.some(issue => issue.includes('persona')))
|
||||
// A delegated child may carry its own persona: tolerated, still fused.
|
||||
const tolerated = fuseSections(persona, 'standard', { isSubagent: true })
|
||||
assert.equal(tolerated.issues, undefined)
|
||||
|
||||
@@ -63,6 +63,7 @@ const overrides = [
|
||||
{ id: 'connection', disabled: true },
|
||||
{ id: 'session-controller', disabled: true },
|
||||
{ id: 'file-upload', disabled: true },
|
||||
{ id: 'open-in-app', disabled: true },
|
||||
{ id: 'session-log-download', disabled: true },
|
||||
{ id: 'client-hmr', disabled: true },
|
||||
{ id: 'directory-picker', disabled: true },
|
||||
|
||||
@@ -75,6 +75,7 @@ const overrides = [
|
||||
{ id: 'connection', disabled: true },
|
||||
{ id: 'session-controller', disabled: true },
|
||||
{ id: 'file-upload', disabled: true },
|
||||
{ id: 'open-in-app', disabled: true },
|
||||
{ id: 'session-log-download', disabled: true },
|
||||
{ id: 'client-hmr', disabled: true },
|
||||
{ id: 'directory-picker', disabled: true },
|
||||
|
||||
Reference in new issue
Block a user