banso-dsh-prompt 0.1.0 → 0.1.2
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 +21 -0
- package/README.md +5 -15
- package/lib/prompts.d.ts +1 -1
- package/lib/prompts.d.ts.map +1 -1
- package/lib/prompts.js +1 -5
- package/lib/prompts.js.map +1 -1
- package/package.json +19 -15
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 tindada
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Banso 提示词插件
|
|
2
2
|
|
|
3
|
-
`banso-dsh-prompt` 为默认 DSH agent loop
|
|
3
|
+
`banso-dsh-prompt` 为默认 DSH agent loop 提供可配置的研究规则和本轮参考时间。由 Banso SDK bundle 或 preset 加载,依赖 `systemPrompt`、`agents` 服务。
|
|
4
4
|
|
|
5
|
-
- `banso:research` section
|
|
5
|
+
- `banso:research` section:通过 `researchPrompt` 配置研究规则,当前默认正文为空;工具操作协议及材料指导由 [资料插件](https://github.com/Tindada/banso-dsh/blob/main/packages/materials/README.md) 提供。
|
|
6
6
|
- `banso:reference-time` context:本轮开始处理输入时的 UTC 时间。需要 `includeRuntimeContext: true`;Banso bundle 已开启。
|
|
7
7
|
|
|
8
8
|
## 配置
|
|
@@ -18,22 +18,12 @@
|
|
|
18
18
|
|
|
19
19
|
这是运行环境级配置,不是 SDK 每题参数。修改后重启运行环境。身份描述仍通过 `system-prompt` 的 `personaPrefix` 配置。
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
每个 agent 的新 turn 首次领取输入时记录服务器时间。后续工具调用、step、重试和并入本轮的补充输入保持该时间;下一 turn 重新取时间。没有 agent 或尚未领取输入时不输出时间。
|
|
22
22
|
|
|
23
23
|
参考时间表示“现在”,不是检索范围。历史日期或指定时间范围直接写在用户消息中,不需要额外 SDK 参数。时间使用 UTC;需要其他时区口径时在问题中明确说明。
|
|
24
24
|
|
|
25
25
|
不新增 session 持久化格式。恢复会话后的下一轮会重新取时间;不保证研究过程中热重载插件能恢复旧参考时间,修改插件后应重启运行环境。旧 context 快照可能仍在历史中,框架会将新快照标为取代之前的 runtime context。
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
本包通过提示词引导研究,不负责材料存储、证据提取、业务预算或引用语义校验;材料和证据行为由资料插件提供。
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
在 workspace 根目录运行:
|
|
32
|
-
|
|
33
|
-
```sh
|
|
34
|
-
pnpm typecheck
|
|
35
|
-
pnpm build
|
|
36
|
-
pnpm --filter banso-dsh-prompt test
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
测试使用真实默认 loop、模拟 LLM 和可控时钟,检查最终模型请求中的时间快照,覆盖首步、补充消息、工具调用、重试、跨轮更新、agent 隔离和插件卸载重载。测试不访问网络,不验证真实模型的研究质量。
|
|
29
|
+
源码实现和测试见 [开发文档](https://github.com/Tindada/banso-dsh/blob/main/docs/development.md)。
|
package/lib/prompts.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const RESEARCH_PROMPT = "
|
|
1
|
+
export declare const RESEARCH_PROMPT = "";
|
|
2
2
|
export declare function referenceTimeText(referenceTime: string): string;
|
|
3
3
|
//# sourceMappingURL=prompts.d.ts.map
|
package/lib/prompts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,KAAK,CAAA;AAEjC,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAE/D"}
|
package/lib/prompts.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
export const RESEARCH_PROMPT =
|
|
2
|
-
|
|
3
|
-
Base key conclusions on extracted evidence where available, distinguish facts from inference, and cross-check important or disputed claims as needed. Preserve relevant dates, quantities, conditions, and uncertainty; distinguish publication dates from event dates and planned events from completed ones. When sources conflict, check whether differences in timing, definitions, or scope explain the disagreement, and state any unresolved conflict. For collections, rankings, and comparisons, check coverage of the requested scope and apply consistent inclusion and comparison criteria. Continue researching gaps that could materially change the answer. Stop when the evidence adequately supports an answer or further research is unlikely to resolve the remaining gaps.
|
|
4
|
-
|
|
5
|
-
Answer the question directly, with detail proportional to the task. State limitations that affect the answer, such as reliance on search snippets or incomplete coverage, and do not claim to have verified unread pages. Use the user's requested language and format; otherwise match the user's language. Place Markdown source links near the claims they support when the requested format permits citations. Do not invent facts or sources.`;
|
|
1
|
+
export const RESEARCH_PROMPT = '';
|
|
6
2
|
export function referenceTimeText(referenceTime) {
|
|
7
3
|
return `Research reference time (UTC): ${referenceTime}\nThis is the current time when input processing began for this turn. Use it to interpret relative dates.`;
|
|
8
4
|
}
|
package/lib/prompts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAA;AAEjC,MAAM,UAAU,iBAAiB,CAAC,aAAqB;IACrD,OAAO,kCAAkC,aAAa,2GAA2G,CAAA;AACnK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "banso-dsh-prompt",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Banso research instructions and per-turn reference time",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"engines": {
|
|
8
|
+
"dsh": ">=0.2.1-rc.2 <0.3.0-0"
|
|
9
|
+
},
|
|
7
10
|
"main": "./lib/index.js",
|
|
8
11
|
"types": "./lib/index.d.ts",
|
|
9
12
|
"exports": {
|
|
@@ -17,28 +20,29 @@
|
|
|
17
20
|
"README.md"
|
|
18
21
|
],
|
|
19
22
|
"dependencies": {
|
|
20
|
-
"@deepseek-ai/schemastery": "^3.18.
|
|
23
|
+
"@deepseek-ai/schemastery": "^3.18.5"
|
|
21
24
|
},
|
|
22
25
|
"peerDependencies": {
|
|
23
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
24
|
-
"@deepseek-ai/dsh-agent": "0.2.
|
|
25
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.
|
|
26
|
+
"@deepseek-ai/cordis": "^4.0.5",
|
|
27
|
+
"@deepseek-ai/dsh-agent": ">=0.2.1-rc.2 <0.3.0-0",
|
|
28
|
+
"@deepseek-ai/dsh-system-prompt": ">=0.2.1-rc.2 <0.3.0-0"
|
|
26
29
|
},
|
|
27
30
|
"devDependencies": {
|
|
28
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
29
|
-
"@deepseek-ai/dsh-agent": "0.2.
|
|
30
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.
|
|
31
|
-
"@deepseek-ai/dsh-agent-loop": "0.2.
|
|
32
|
-
"@deepseek-ai/dsh-llm": "0.2.
|
|
33
|
-
"@deepseek-ai/dsh-session": "0.2.
|
|
34
|
-
"@deepseek-ai/dsh-session-projection": "0.2.
|
|
35
|
-
"@deepseek-ai/dsh-tools": "0.2.
|
|
31
|
+
"@deepseek-ai/cordis": "^4.0.5",
|
|
32
|
+
"@deepseek-ai/dsh-agent": "0.2.1-rc.2",
|
|
33
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.1-rc.2",
|
|
34
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.1-rc.2",
|
|
35
|
+
"@deepseek-ai/dsh-llm": "0.2.1-rc.2",
|
|
36
|
+
"@deepseek-ai/dsh-session": "0.2.1-rc.2",
|
|
37
|
+
"@deepseek-ai/dsh-session-projection": "0.2.1-rc.2",
|
|
38
|
+
"@deepseek-ai/dsh-tools": "0.2.1-rc.2",
|
|
36
39
|
"@types/node": "^24.19.0",
|
|
37
40
|
"typescript": "^7.0.2"
|
|
38
41
|
},
|
|
39
42
|
"scripts": {
|
|
40
43
|
"build": "tsc -p tsconfig.json",
|
|
41
44
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
42
|
-
"test": "tsc -p tsconfig.json && node --test tests/*.test.mjs"
|
|
45
|
+
"test": "tsc -p tsconfig.json && node --test tests/*.test.mjs",
|
|
46
|
+
"clean": "node -e \"require('node:fs').rmSync('lib', { recursive: true, force: true })\""
|
|
43
47
|
}
|
|
44
48
|
}
|