ralphflow-dsh 2.1.0 → 2.2.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/README.md +1 -0
- package/lib/client/definition.d.ts +14 -0
- package/lib/client/definition.js +42 -0
- package/lib/client/index.d.ts +12 -0
- package/lib/client/index.js +16 -0
- package/lib/client/status-source.d.ts +13 -0
- package/lib/client/status-source.js +60 -0
- package/lib/client/status.d.ts +5 -0
- package/lib/client/status.js +122 -0
- package/lib/client.js +457 -0
- package/lib/create.d.ts +1 -1
- package/lib/create.js +3 -3
- package/lib/engine.d.ts +21 -1
- package/lib/engine.js +105 -10
- package/lib/index.js +72 -14
- package/lib/message-source.d.ts +12 -3
- package/lib/status-contract.d.ts +46 -0
- package/lib/status-contract.js +58 -0
- package/lib/status-service.d.ts +18 -0
- package/lib/status-service.js +86 -0
- package/lib/typert.d.ts +3 -0
- package/lib/typert.js +6 -0
- package/lib/verify.js +6 -2
- package/package.json +66 -13
- package/workflows/loop.yaml +5 -1
package/lib/typert.d.ts
ADDED
package/lib/typert.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { statusDescriptors } from "./status-contract.js";
|
|
2
|
+
/** Public registry artifact, kept explicit rather than requiring dsh's monorepo generator. */
|
|
3
|
+
export const TYPERT = {
|
|
4
|
+
package: "ralphflow-dsh", face: "host", schemas: [], invocations: statusDescriptors,
|
|
5
|
+
model: { services: [{ key: "ralphflowStatus", exportName: "WorkflowStatusService", members: [], types: [], tags: [] }], events: [], objects: [] },
|
|
6
|
+
};
|
package/lib/verify.js
CHANGED
|
@@ -103,13 +103,17 @@ export function buildCheckPrompt(req, wantStructured) {
|
|
|
103
103
|
const rel = req.artifactsRelDir;
|
|
104
104
|
// §1.3:CHECK 必须拿到与 DO 同等的承诺上下文(desc + 交付物 + 产出目录),
|
|
105
105
|
// 否则验证者不知道本步承诺交付什么,只能泛泛核对。
|
|
106
|
+
//
|
|
107
|
+
// 「交付物」与「产出目录」**拼装后必须自洽**:`output` 说的是产出**什么**,落点由下一行
|
|
108
|
+
// 「产出目录」决定。不点明时,验证者会把 `output` 里的过程文档名当成工作目录交付物 ——
|
|
109
|
+
// RA2 有一轮就把「产出目录 `summary.md` 与仓库 `summary.md` 逐字节相同」的副本判成了正确。
|
|
106
110
|
const stepFacts = [
|
|
107
111
|
`**步骤**:\`${req.step.id}\``,
|
|
108
112
|
...(req.step.desc ? [`**描述**:${req.step.desc}`] : []),
|
|
109
113
|
`**本步任务**:${(req.step.do ?? "").trim() || "(未声明)"}`,
|
|
110
114
|
...(req.step.input ? [`**输入**:${String(req.step.input).trim()}`] : []),
|
|
111
|
-
...(req.step.output ? [`**交付物(本步承诺的产出)**:${String(req.step.output).trim()}
|
|
112
|
-
`**产出目录**:\`${rel}/\` ——
|
|
115
|
+
...(req.step.output ? [`**交付物(本步承诺的产出)**:${String(req.step.output).trim()}(这一项只说产出**什么**;落在**哪里**看下一行「产出目录」)`] : []),
|
|
116
|
+
`**产出目录**:\`${rel}/\` —— 本步的**过程文档**(清单、方案、报告、摘要、草稿等)只应落这里:检查依据里写**裸文件名**的(如 \`summary.md\`)即指这个目录下的文件;写了**明确路径**的按那个路径。工作目录只放本步的**产物**(代码、资源、可执行文件)。**工作目录里出现同一份过程文档的副本(如根目录的 \`summary.md\` 与产出目录那份内容相同)不是落点正确、而是落点错误:不要把副本判成满足。**`,
|
|
113
117
|
];
|
|
114
118
|
// 投票变体(对齐 opencode `buildVotingCheckPrompt`):共享上下文 + **该票专属**检查依据 +
|
|
115
119
|
// 「你是 N 个之一,只查自己这一条」约束。目的:防止各票趋同成同一份泛泛检查。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ralphflow-dsh",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Ralph Flow for DeepSeek Harness — 执行者/验证者模式的具象化:主会话执行,独立验证者对抗检查,推进权在机械程序(v2 原生重做)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -10,7 +10,15 @@
|
|
|
10
10
|
"types": "./lib/index.d.ts",
|
|
11
11
|
"default": "./lib/index.js"
|
|
12
12
|
},
|
|
13
|
-
"./package.json": "./package.json"
|
|
13
|
+
"./package.json": "./package.json",
|
|
14
|
+
"./client": {
|
|
15
|
+
"types": "./lib/client/index.d.ts",
|
|
16
|
+
"default": "./lib/client.js"
|
|
17
|
+
},
|
|
18
|
+
"./typert": {
|
|
19
|
+
"types": "./lib/typert.d.ts",
|
|
20
|
+
"default": "./lib/typert.js"
|
|
21
|
+
}
|
|
14
22
|
},
|
|
15
23
|
"files": [
|
|
16
24
|
"lib",
|
|
@@ -21,6 +29,21 @@
|
|
|
21
29
|
"dsh": {
|
|
22
30
|
"bundle": {
|
|
23
31
|
"patch": "./cordis.patch.yml"
|
|
32
|
+
},
|
|
33
|
+
"client": {
|
|
34
|
+
"platform": "web",
|
|
35
|
+
"inject": [
|
|
36
|
+
"@deepseek-ai/dsh-client-ui-chat",
|
|
37
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
38
|
+
"@deepseek-ai/dsh-client-ui-renderer",
|
|
39
|
+
"@deepseek-ai/dsh-api-gateway",
|
|
40
|
+
"@deepseek-ai/dsh-client-ui-primitives"
|
|
41
|
+
],
|
|
42
|
+
"external": [
|
|
43
|
+
"react",
|
|
44
|
+
"@deepseek-ai/dsh-api-gateway/client",
|
|
45
|
+
"@deepseek-ai/dsh-client-ui-primitives"
|
|
46
|
+
]
|
|
24
47
|
}
|
|
25
48
|
},
|
|
26
49
|
"license": "MIT",
|
|
@@ -36,22 +59,52 @@
|
|
|
36
59
|
"js-yaml": "^4.1.1"
|
|
37
60
|
},
|
|
38
61
|
"peerDependencies": {
|
|
39
|
-
"@deepseek-ai/cordis": "
|
|
40
|
-
"@deepseek-ai/dsh-agent": "
|
|
41
|
-
"@deepseek-ai/dsh-llm": "
|
|
42
|
-
"@deepseek-ai/dsh-tools": "
|
|
43
|
-
"@deepseek-ai/dsh-subagent": "
|
|
44
|
-
"@deepseek-ai/dsh-session": "
|
|
45
|
-
"@deepseek-ai/dsh-compaction": "
|
|
46
|
-
"@deepseek-ai/dsh-commands": "
|
|
47
|
-
"@deepseek-ai/dsh-skill": "
|
|
62
|
+
"@deepseek-ai/cordis": "^4.0.5-alpha.1",
|
|
63
|
+
"@deepseek-ai/dsh-agent": "^0.2.1-alpha.1",
|
|
64
|
+
"@deepseek-ai/dsh-llm": "^0.2.1-alpha.1",
|
|
65
|
+
"@deepseek-ai/dsh-tools": "^0.2.1-alpha.1",
|
|
66
|
+
"@deepseek-ai/dsh-subagent": "^0.2.1-alpha.1",
|
|
67
|
+
"@deepseek-ai/dsh-session": "^0.2.1-alpha.1",
|
|
68
|
+
"@deepseek-ai/dsh-compaction": "^0.2.1-alpha.1",
|
|
69
|
+
"@deepseek-ai/dsh-commands": "^0.2.1-alpha.1",
|
|
70
|
+
"@deepseek-ai/dsh-skill": "^0.2.1-alpha.1",
|
|
71
|
+
"@deepseek-ai/dsh-client-ui-chat": "^0.2.1-alpha.1",
|
|
72
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.2.1-alpha.1",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.2.1-alpha.1",
|
|
74
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.2.1-alpha.1",
|
|
75
|
+
"@deepseek-ai/dsh-typert-registry": "^0.2.1-alpha.1",
|
|
76
|
+
"@deepseek-ai/dsh-api-gateway": "^0.2.1-alpha.1",
|
|
77
|
+
"@deepseek-ai/dsh-session-query": "^0.2.1-alpha.1",
|
|
78
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.2.1-alpha.1"
|
|
48
79
|
},
|
|
49
80
|
"devDependencies": {
|
|
50
81
|
"@types/js-yaml": "^4.0.9",
|
|
51
|
-
"@types/node": "^22.20.1"
|
|
82
|
+
"@types/node": "^22.20.1",
|
|
83
|
+
"esbuild": "^0.28.2",
|
|
84
|
+
"@types/react": "^18.3.1",
|
|
85
|
+
"react": "^18.3.1",
|
|
86
|
+
"@deepseek-ai/cordis": "4.0.5-alpha.1",
|
|
87
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.1",
|
|
88
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
|
|
89
|
+
"@deepseek-ai/dsh-tools": "0.2.1-alpha.1",
|
|
90
|
+
"@deepseek-ai/dsh-subagent": "0.2.1-alpha.1",
|
|
91
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.1",
|
|
92
|
+
"@deepseek-ai/dsh-compaction": "0.2.1-alpha.1",
|
|
93
|
+
"@deepseek-ai/dsh-commands": "0.2.1-alpha.1",
|
|
94
|
+
"@deepseek-ai/dsh-skill": "0.2.1-alpha.1",
|
|
95
|
+
"@deepseek-ai/dsh-client-ui-chat": "0.2.1-alpha.1",
|
|
96
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.2.1-alpha.1",
|
|
97
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.1-alpha.1",
|
|
98
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.1",
|
|
99
|
+
"@deepseek-ai/dsh-typert-registry": "0.2.1-alpha.1",
|
|
100
|
+
"@deepseek-ai/dsh-api-gateway": "0.2.1-alpha.1",
|
|
101
|
+
"@deepseek-ai/dsh-session-query": "0.2.1-alpha.1",
|
|
102
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.2.1-alpha.1",
|
|
103
|
+
"typescript": "^5.9.3",
|
|
104
|
+
"@deepseek-ai/dsh": "0.2.1-alpha.1"
|
|
52
105
|
},
|
|
53
106
|
"scripts": {
|
|
54
|
-
"build": "tsc -p tsconfig.json",
|
|
107
|
+
"build": "tsc -p tsconfig.json && node scripts/build-client.mjs",
|
|
55
108
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
56
109
|
"verify": "node scripts/verify-all.mjs",
|
|
57
110
|
"prepublishOnly": "npm run build && npm run typecheck && npm run verify"
|
package/workflows/loop.yaml
CHANGED
|
@@ -27,8 +27,12 @@ steps:
|
|
|
27
27
|
- 变更文件
|
|
28
28
|
- 验证结果
|
|
29
29
|
- 未完成部分与下一步打算
|
|
30
|
+
|
|
31
|
+
summary.md 是**过程文档**:按提示词「产出目录」一节落在本实例产出目录里,不要写进工作目录。
|
|
30
32
|
input: 用户任务描述
|
|
31
|
-
|
|
33
|
+
# 交付物只说**产出什么**:这里只列产物;过程文档(summary.md 累积器)的落点由提示词
|
|
34
|
+
# 「产出目录」一节决定,不列进这里 —— 否则与紧邻的「产出目录」打架,诱导模型两边都写。
|
|
35
|
+
output: 实现的代码/文件
|
|
32
36
|
check_voting:
|
|
33
37
|
# 前三条逐字照抄 opencode 版 loop.yaml 的三票(各自只查一条)
|
|
34
38
|
- check: 用户任务的每一条要求都已落实
|