@deepseek-ai/dsh-persona 0.2.1-alpha.2 → 0.2.1-alpha.4
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.i18n.yaml +12 -12
- package/README.md +6 -6
- package/README.zh.md +6 -6
- package/locale/en.json +5 -0
- package/locale/zh.json +6 -0
- package/package.json +10 -8
package/README.i18n.yaml
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
en: 743695093b8a920e
|
|
10
10
|
zh: 3784b6641780bd27
|
|
11
11
|
/deepseek-ai-dsh-persona/summary:
|
|
12
|
-
en:
|
|
13
|
-
zh:
|
|
12
|
+
en: c05b764e4f370ac6
|
|
13
|
+
zh: 27e6f3bf61fb651a
|
|
14
14
|
/deepseek-ai-dsh-persona/table-of-contents:
|
|
15
15
|
en: d152484eb41ac6b4
|
|
16
16
|
zh: 09388d293f9be9cb
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
en: 9b74e4172eaf5fdd
|
|
19
19
|
zh: ab94a985d1f96523
|
|
20
20
|
/deepseek-ai-dsh-persona/use-this-package/configuration:
|
|
21
|
-
en:
|
|
22
|
-
zh:
|
|
21
|
+
en: 7b9e9ccc76ca6af9
|
|
22
|
+
zh: 641d20ccfbda6b91
|
|
23
23
|
/deepseek-ai-dsh-persona/use-this-package/persona-behavior:
|
|
24
|
-
en:
|
|
25
|
-
zh:
|
|
24
|
+
en: c2dc9192f0658eeb
|
|
25
|
+
zh: 7ce8414d9e1a5b5a
|
|
26
26
|
/deepseek-ai-dsh-persona/use-this-package/when-to-use-it:
|
|
27
27
|
en: 4721bb61679c0279
|
|
28
28
|
zh: 51aaa09929dd06d0
|
|
@@ -48,17 +48,17 @@
|
|
|
48
48
|
en: 2b53c1d07ef68f24
|
|
49
49
|
zh: 33a3c17ab56adf57
|
|
50
50
|
/deepseek-ai-dsh-persona/model-experience/the-persona-section/what-the-model-sees:
|
|
51
|
-
en:
|
|
52
|
-
zh:
|
|
51
|
+
en: 5c276dd49a9c5053
|
|
52
|
+
zh: be5a329928edde7a
|
|
53
53
|
/deepseek-ai-dsh-persona/model-experience/the-persona-section/token-effect:
|
|
54
|
-
en:
|
|
55
|
-
zh:
|
|
54
|
+
en: 346e80f3b7a8c7fd
|
|
55
|
+
zh: da0e19a955d56c51
|
|
56
56
|
/deepseek-ai-dsh-persona/model-experience/the-persona-section/kv-cache-effect:
|
|
57
57
|
en: e9f96cf496c544c7
|
|
58
58
|
zh: b986f1b22d1beb70
|
|
59
59
|
/deepseek-ai-dsh-persona/known-limitations-and-deferred-work:
|
|
60
|
-
en:
|
|
61
|
-
zh:
|
|
60
|
+
en: 9a7dba778a006276
|
|
61
|
+
zh: 3c2030dfcfe83e34
|
|
62
62
|
/deepseek-ai-dsh-persona/known-limitations-and-deferred-work/dev-note:
|
|
63
63
|
en: e67f633dc6fe7773
|
|
64
64
|
zh: 3bb0c20c93f16f98
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
`dsh-persona` gives one agent its own persona: a preset mounts this composable row to register persona prefix and suffix sections, shadowing the deployment-wide defaults for that session. It can also make the prefix the session's complete system prompt, suppressing every other section, and can turn off
|
|
12
|
+
`dsh-persona` gives one agent its own persona: a preset mounts this composable row to register persona prefix and suffix sections, shadowing the deployment-wide defaults for that session. It can also make the prefix the session's complete system prompt, suppressing every other section, and can turn off optional runtime context for the session. Mount it inside a preset composition — mounting it globally collides with the prompt registry's own persona registration and fails loud. Without this row, a preset could change an agent's tools but never its identity.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -40,13 +40,13 @@ Mount this row inside a preset composition to give that preset's sessions their
|
|
|
40
40
|
| `prefix` | required | Persona prose rendered as the `deployment:persona-prefix` section |
|
|
41
41
|
| `suffix` | `''` | Template for `deployment:persona-suffix`; omitted or empty text shadows the global suffix away |
|
|
42
42
|
| `complete` | `false` | Use only the rendered prefix as the system prompt; ignore the suffix |
|
|
43
|
-
| `includeRuntimeContext` | `true` | Include
|
|
43
|
+
| `includeRuntimeContext` | `true` | Include optional runtime context for this agent scope; false suppresses optional contributions without disabling their owning services; required contributions remain |
|
|
44
44
|
|
|
45
45
|
The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-persona) is the exhaustive source for every accepted field and its JSDoc.
|
|
46
46
|
|
|
47
47
|
### Persona behavior
|
|
48
48
|
|
|
49
|
-
The persona `prefix` and `suffix` are templates: complete `{{…}}` groups resolve strictly against registered prompt variables when the prompt renders, not when it assembles. Each empty template still shadows its deployment-wide section, then disappears at render. Omitted `suffix` defaults to empty; it does not inherit the global suffix. With `complete: true`, assembly still resolves contexts, tools, variables, and cooperative listeners, but the prompt registry restores this exact prefix as the sole section; no identity, suffix, tool guidance, or listener can append prompt text. With `includeRuntimeContext: false`, context providers are not evaluated for this scope and
|
|
49
|
+
The persona `prefix` and `suffix` are templates: complete `{{…}}` groups resolve strictly against registered prompt variables when the prompt renders, not when it assembles. Each empty template still shadows its deployment-wide section, then disappears at render. Omitted `suffix` defaults to empty; it does not inherit the global suffix. With `complete: true`, assembly still resolves contexts, tools, variables, and cooperative listeners, but the prompt registry restores this exact prefix as the sole section; no identity, suffix, tool guidance, or listener can append prompt text. With `includeRuntimeContext: false`, optional context providers are not evaluated for this scope, and assembly-listener contributions are discarded unless registered as required. Required providers remain active at assembly and request admission.
|
|
50
50
|
|
|
51
51
|
### When to use it
|
|
52
52
|
|
|
@@ -96,11 +96,11 @@ Read these pages when the package-level contract is not enough; they move from t
|
|
|
96
96
|
|
|
97
97
|
#### What the model sees
|
|
98
98
|
|
|
99
|
-
The `deployment:persona-prefix` section at order `0` carries this row's `prefix`; `deployment:persona-suffix` at order `10200` carries its `suffix`, after first-party guidance. Both replace their deployment defaults and resolve prompt variables. In complete mode, the model sees only the rendered prefix section as its system prompt. Runtime context remains enabled by default
|
|
99
|
+
The `deployment:persona-prefix` section at order `0` carries this row's `prefix`; `deployment:persona-suffix` at order `10200` carries its `suffix`, after first-party guidance. Both replace their deployment defaults and resolve prompt variables. In complete mode, the model sees only the rendered prefix section as its system prompt. Runtime context remains enabled by default. With `includeRuntimeContext: false`, the model still receives required context, such as the current working directory; optional context is omitted.
|
|
100
100
|
|
|
101
101
|
#### Token effect
|
|
102
102
|
|
|
103
|
-
Fixed for a given preset: the persona prefix and suffix tokens on every request that agent makes, and none for any other agent. Empty text contributes nothing. Complete mode removes every other system-prompt token for that agent.
|
|
103
|
+
Fixed for a given preset: the persona prefix and suffix tokens on every request that agent makes, and none for any other agent. Empty text contributes nothing. Complete mode removes every other system-prompt token for that agent. Required runtime context still contributes tokens when optional context is disabled.
|
|
104
104
|
|
|
105
105
|
#### KV Cache effect
|
|
106
106
|
|
|
@@ -114,7 +114,7 @@ Prefix-stable while the rendered template variables and text are unchanged. Suff
|
|
|
114
114
|
These limits define when the row is a poor fit. They are current package constraints, not a task backlog.
|
|
115
115
|
|
|
116
116
|
- **No global mount** — the prompt registry owns the unscoped persona slot, so this row is usable only from a scoped composition. A deployment-wide persona change belongs in the `system-prompt` row's own config.
|
|
117
|
-
- **
|
|
117
|
+
- **No per-provider runtime-context filter** — `includeRuntimeContext: false` suppresses all optional contributions for the scope; it cannot suppress required contributions.
|
|
118
118
|
|
|
119
119
|
<a id="dev-note"></a>
|
|
120
120
|
### Dev Note
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
`dsh-persona` 让单个 agent(智能体)拥有自己的人设:preset
|
|
12
|
+
`dsh-persona` 让单个 agent(智能体)拥有自己的人设:preset 挂载这一可组装的行来注册人设前缀与后缀段落,为该会话遮蔽部署级默认值。它还可以把前缀变成该会话的完整系统提示词、抑制所有其他段落,并可为该会话关闭可选运行时上下文。请把它挂在 preset 组装内部——全局挂载会与提示词注册表自身的人设注册相撞并明确报错。没有这一行,preset 能改变 agent 的工具,却永远改不了它的身份。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -40,13 +40,13 @@ kind: "package-reference"
|
|
|
40
40
|
| `prefix` | 必填 | 作为 `deployment:persona-prefix` 段落渲染的人设文本 |
|
|
41
41
|
| `suffix` | `''` | `deployment:persona-suffix` 模板;省略或空文本会遮蔽掉全局后缀 |
|
|
42
42
|
| `complete` | `false` | 仅将渲染后的前缀用作系统提示词;忽略后缀 |
|
|
43
|
-
| `includeRuntimeContext` | `true` | 是否为此 agent
|
|
43
|
+
| `includeRuntimeContext` | `true` | 是否为此 agent 作用域包含可选运行时上下文;false 会抑制可选贡献,但不禁用拥有它们的服务;必需贡献仍会保留 |
|
|
44
44
|
|
|
45
45
|
生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-persona)是每个受支持字段及其 JSDoc 的穷尽式真源。
|
|
46
46
|
|
|
47
47
|
### 人设行为
|
|
48
48
|
|
|
49
|
-
人设 `prefix` 与 `suffix` 都是模板:完整的 `{{…}}` 组在提示词**渲染**时(而非组装时)严格解析为已注册的提示词变量。每个空模板仍会遮蔽对应的部署级段落,然后在渲染时消失。省略 `suffix` 时默认为空,不继承全局后缀。启用 `complete: true` 时,组装仍会解析上下文、工具、变量与协作式监听器,但提示词注册表会把这确切前缀恢复为唯一段落;身份、后缀、工具引导或监听器都无法追加提示词文本。启用 `includeRuntimeContext: false`
|
|
49
|
+
人设 `prefix` 与 `suffix` 都是模板:完整的 `{{…}}` 组在提示词**渲染**时(而非组装时)严格解析为已注册的提示词变量。每个空模板仍会遮蔽对应的部署级段落,然后在渲染时消失。省略 `suffix` 时默认为空,不继承全局后缀。启用 `complete: true` 时,组装仍会解析上下文、工具、变量与协作式监听器,但提示词注册表会把这确切前缀恢复为唯一段落;身份、后缀、工具引导或监听器都无法追加提示词文本。启用 `includeRuntimeContext: false` 时,此作用域的可选上下文提供方不会被求值,组装监听器添加的贡献也会被丢弃,除非已注册为必需贡献。必需提供方在组装和请求接纳时仍然有效。
|
|
50
50
|
|
|
51
51
|
### 何时使用
|
|
52
52
|
|
|
@@ -96,11 +96,11 @@ kind: "package-reference"
|
|
|
96
96
|
|
|
97
97
|
#### 模型看到什么
|
|
98
98
|
|
|
99
|
-
位于 order `0` 的 `deployment:persona-prefix` 段落携带本行的 `prefix`;位于 order `10200` 的 `deployment:persona-suffix` 在第一方指导之后携带其 `suffix
|
|
99
|
+
位于 order `0` 的 `deployment:persona-prefix` 段落携带本行的 `prefix`;位于 order `10200` 的 `deployment:persona-suffix` 在第一方指导之后携带其 `suffix`。两者分别替换对应的部署默认值,并解析提示词变量。在完整模式下,模型只会看到渲染后的前缀段落作为系统提示词。运行时上下文默认保持启用。设置 `includeRuntimeContext: false` 后,模型仍会收到必需上下文,例如当前工作目录;可选上下文则会省略。
|
|
100
100
|
|
|
101
101
|
#### Token 影响
|
|
102
102
|
|
|
103
|
-
对给定 preset 而言是固定的:该 agent 的每次请求都携带人设前缀与后缀的 token,其他 agent 一个都不带。空文本不贡献任何 token。完整模式会移除该 agent 的其他所有系统提示词 token。
|
|
103
|
+
对给定 preset 而言是固定的:该 agent 的每次请求都携带人设前缀与后缀的 token,其他 agent 一个都不带。空文本不贡献任何 token。完整模式会移除该 agent 的其他所有系统提示词 token。关闭可选上下文后,必需运行时上下文仍会贡献 token。
|
|
104
104
|
|
|
105
105
|
#### KV Cache 影响
|
|
106
106
|
|
|
@@ -114,7 +114,7 @@ kind: "package-reference"
|
|
|
114
114
|
这些限制说明本行何时不合适。它们是当前包约束,不是任务积压。
|
|
115
115
|
|
|
116
116
|
- **不支持全局挂载**——提示词注册表拥有未加 scope 的人设槽位,因此本行只能从带 scope 的组装中使用。要改变部署级人设,应在 `system-prompt` 行自身的配置中修改。
|
|
117
|
-
-
|
|
117
|
+
- **没有按提供方过滤运行时上下文的选项**——`includeRuntimeContext: false` 会抑制该作用域的所有可选贡献,但无法抑制必需贡献。
|
|
118
118
|
|
|
119
119
|
<a id="dev-note"></a>
|
|
120
120
|
### 开发备注
|
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-persona",
|
|
3
3
|
"description": "Composition-authored deployment persona section for the DeepSeek Harness",
|
|
4
|
-
"version": "0.2.1-alpha.
|
|
4
|
+
"version": "0.2.1-alpha.4",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -19,23 +19,25 @@
|
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
21
|
"./src/*": "./src/*",
|
|
22
|
-
"./package.json": "./package.json"
|
|
22
|
+
"./package.json": "./package.json",
|
|
23
|
+
"./locale/*.json": "./locale/*.json"
|
|
23
24
|
},
|
|
24
25
|
"files": [
|
|
26
|
+
"locale/*.json",
|
|
25
27
|
"lib/index.js",
|
|
26
28
|
"lib/types/**/*.d.ts"
|
|
27
29
|
],
|
|
28
30
|
"license": "MIT",
|
|
29
31
|
"peerDependencies": {
|
|
30
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.
|
|
31
|
-
"@deepseek-ai/cordis": "~4.0.5-alpha.
|
|
32
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.4",
|
|
33
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2"
|
|
32
34
|
},
|
|
33
35
|
"dependencies": {
|
|
34
|
-
"@deepseek-ai/schemastery": "~3.18.5-alpha.
|
|
36
|
+
"@deepseek-ai/schemastery": "~3.18.5-alpha.2"
|
|
35
37
|
},
|
|
36
38
|
"devDependencies": {
|
|
37
|
-
"@deepseek-ai/dsh-scope": "0.2.1-alpha.
|
|
38
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.
|
|
39
|
-
"@deepseek-ai/cordis": "~4.0.5-alpha.
|
|
39
|
+
"@deepseek-ai/dsh-scope": "0.2.1-alpha.4",
|
|
40
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.4",
|
|
41
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2"
|
|
40
42
|
}
|
|
41
43
|
}
|