@godv61/dsh-task-engine 0.7.0 → 0.9.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 +32 -14
- package/cordis.patch.yml +8 -7
- package/lib/agent.d.ts +13 -0
- package/lib/agent.js +18 -0
- package/lib/agent.js.map +1 -0
- package/lib/dev-task.d.ts +20 -0
- package/lib/dev-task.js +370 -0
- package/lib/dev-task.js.map +1 -0
- package/lib/index.d.ts +6 -3
- package/lib/index.js +8 -382
- package/lib/index.js.map +1 -1
- package/lib/seed-preset.d.ts +19 -0
- package/lib/seed-preset.js +59 -0
- package/lib/seed-preset.js.map +1 -0
- package/lib/shipped-skills.d.ts +16 -0
- package/lib/shipped-skills.js +48 -0
- package/lib/shipped-skills.js.map +1 -0
- package/package.json +11 -2
- package/preset/agent.cordis.yml +22 -0
- package/preset/enable.mjs +88 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# dsh-task-engine
|
|
2
2
|
|
|
3
|
-
一个**可安装、项目无关、硬约束**的工程化交付引擎,把「需求评审 → 设计 → 开发 → 交付 → 代码审核」这套流程做成 DeepSeek Harness 的一个 bundle
|
|
3
|
+
一个**可安装、项目无关、硬约束**的工程化交付引擎,把「需求评审 → 设计 → 开发 → 交付 → 代码审核」这套流程做成 DeepSeek Harness 的一个 bundle。**按预设激活**:装 bundle 后在目标预设的 `agent.cordis.yml` 加一行,该预设的会话才挂上 `dev_task` 工具、内置技能和人设;换到别的预设(不加那行)就完全不激活——不需要每个项目手写 `.agents` / `.claude` / `.harness`。
|
|
4
4
|
|
|
5
5
|
核心是一个 `dev_task` 工具 + 内置技能。工具的硬约束在代码里执行,不是"提醒模型":
|
|
6
6
|
|
|
@@ -14,17 +14,23 @@
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
16
16
|
```
|
|
17
|
-
cordis.patch.yml bundle 声明 + host 组合 patch
|
|
17
|
+
cordis.patch.yml bundle 声明 + host 组合 patch(一行,只挂 host 半:Remote 控制器 + 工作台 UI)
|
|
18
18
|
defaults/eng.json 内置默认工作流(可被项目 .dsh/eng.json 覆盖)
|
|
19
19
|
hooks/commit-msg git 提交门禁钩子(install_hook 装进 .git/hooks/)
|
|
20
20
|
src/engine.ts 纯函数状态机 + 配置校验(无 harness 依赖,双端复用)
|
|
21
|
-
src/index.ts
|
|
22
|
-
src/
|
|
23
|
-
src/
|
|
21
|
+
src/index.ts host 入口:挂 task-engine Remote 控制器 + 首次启动自动 seed「工程化开发引擎」预设
|
|
22
|
+
src/seed-preset.ts 对齐当前 standard 复制出 eng 预设(换人设 + 加 agent 行,幂等)
|
|
23
|
+
src/agent.ts agent 入口(./agent 出品):在调用它的预设 scope 里注册 dev_task + 内置技能
|
|
24
|
+
src/dev-task.ts dev_task 工具定义 + 全部文件系统辅助(模型门禁,随 agent 入口激活)
|
|
25
|
+
src/shipped-skills.ts 内置技能扫描 + 注册(随 agent 入口激活)
|
|
26
|
+
src/controller.ts Host 端 Remote 控制器:网页读写 .dsh/eng.json + skill/rule
|
|
27
|
+
src/client/ 浏览器半:全屏工作台(流程配置 / 技能 skill / 规则 rule 三个标签页)
|
|
24
28
|
skills/ 内置技能库(需求分析/方案设计/实现/验证/审核/提交/交付编排)
|
|
25
29
|
rules/ 内置规则库(编码规范/提交规范/安全红线)
|
|
30
|
+
preset/agent.cordis.yml 预设接入片段(persona 行 + agent 行,供自定义预设照抄)
|
|
31
|
+
preset/enable.mjs 手动重建 eng 预设的命令行兜底(bin: dsh-task-engine-enable)
|
|
26
32
|
preset/preset.yml 预设元数据
|
|
27
|
-
preset/persona.md 预设 persona
|
|
33
|
+
preset/persona.md 预设 persona 文案
|
|
28
34
|
```
|
|
29
35
|
|
|
30
36
|
## 构建
|
|
@@ -48,17 +54,26 @@ dsh plugin --profile <name> add github:<你的org>/dsh-task-engine
|
|
|
48
54
|
dsh plugin --profile <name> add .
|
|
49
55
|
```
|
|
50
56
|
|
|
51
|
-
##
|
|
57
|
+
## 启用(点选即用)
|
|
52
58
|
|
|
53
|
-
|
|
59
|
+
装完 bundle、重启 web,预设列表里会**自动多出一个「工程化开发引擎」**——host 半在首次启动时把它对齐当前 `standard` 生成(换好工程人设 + 加好 agent 行),落在 `~/.dsh/.agent-presets/eng/`。
|
|
54
60
|
|
|
55
|
-
|
|
61
|
+
- **用**:新建会话(或设置 → agent 预设)选「工程化开发引擎」,这个会话就挂上 `dev_task` + 内置技能 + 工程人设,按流程走。
|
|
62
|
+
- **不用**:选 `standard` / `minimal` / 其它预设,就没有 `dev_task`、没有内置技能、没有工程人设,流程完全不介入。
|
|
63
|
+
- 侧边栏「工程流程」工作台不受影响,随时供人配置 `.dsh/eng.json` 和 skill/rule。
|
|
56
64
|
|
|
57
|
-
|
|
65
|
+
这一层对称由 DSH 的工具/技能 scope 机制保证:host 半从不把 `dev_task` 注册进全局工具层,agent 半(`@godv61/dsh-task-engine/agent` 行)只在命名它的预设里注册——所以切换预设本身就是开关。
|
|
58
66
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
67
|
+
### 兜底 / 自定义
|
|
68
|
+
|
|
69
|
+
自动生成只在 `eng` 不存在时发生,绝不覆盖你手改过的预设;删掉 `eng` 后下次启动会重新生成。想**手动**造一个(不同名字、或改人设)才需要:复制 `standard` → 在 `agent.cordis.yml` 末尾加一行:
|
|
70
|
+
|
|
71
|
+
```yaml
|
|
72
|
+
- id: task-engine-agent
|
|
73
|
+
name: '@godv61/dsh-task-engine/agent'
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
也可重跑 `dsh-task-engine-enable` 强制重建默认的 `eng`。
|
|
62
77
|
|
|
63
78
|
## 项目配置(让流程贴合你的项目)
|
|
64
79
|
|
|
@@ -122,4 +137,7 @@ dsh plugin --profile <name> add .
|
|
|
122
137
|
- **网页图形化配置界面(0.5.0)**:新增 `src/client/` 设置页「工程流程配置」+ Host 端 `task-engine` Remote 控制器;`@godv61/dsh-task-engine` 升级为双端包(`dsh.client` manifest + `./client` 出品,`exports` 暴露)。已实机验证:`dsh web` 起服务后 boot 数据里 `@godv61/dsh-task-engine` 以 `inject:["@deepseek-ai/dsh-api-gateway"]` 进入 application batch、`/plugins/…/client.js` 正常服务;headless 冒烟确认 boot + `dev_task` 未被新控制器破坏。浏览器点击级 e2e 留到发布后用真浏览器收尾。
|
|
123
138
|
- **skill/rule 挂载与渐进披露(0.6.0)**:`WorkflowConfig` 新增 `stage_bindings`(每阶段挂 skills/rules,可选字段),`dev_task` 的 `status`/`advance` 按当前阶段披露挂载的 skill 名 + rule 正文;内置 6 技能 + 3 规则库;Host 控制器新增 `listSkills`/`listRules`/`writeSkill`/`writeRule`;设置页新增「节点挂载」和「新建 skill / rule」两块,同时补上 `dev_task` 缺失的 `items` 操作(更新实施项状态)。引擎层 `stage_bindings` 校验(未知阶段/空名)与合并已单测通过。
|
|
124
139
|
- **配置页精简 + 自建 skill 可观测(0.6.1)**:设置页的流转/产物/提交规则/新建默认折叠,「节点挂载」从六阶段全平铺改成「选一个阶段再看它挂了什么」;新建成功提示带回显路径(`.dsh/skills/<name>/SKILL.md` 或 `$DSH_HOME/…`),挂载清单给非内置的 skill/rule 标「(项目)/(用户)」来源。修复 `listSkills` 依赖 host skill registry 导致项目 `.dsh/skills` 自建技能不显示的问题——改为与 `listRules` 一致,直接扫「内置 + 项目 + 用户」三层目录。浏览器 e2e 全绿。
|
|
125
|
-
- **全屏工作台 + 在线编辑(0.7.0)**:配置页从设置弹窗迁出,改为侧边栏 `sidebar.footer.action`「工程流程」按钮,点开 `shell.overlay` 全屏工作台(触发按钮与覆盖层共享一个 store 控制开关)。工作台分「流程配置 / 技能 skill / 规则 rule」三个标签页;技能和规则列表支持在线编辑——`readSkill`/`readRule` 读回正文、改 description/whenToUse/正文、`writeSkill`/`writeRule` 写回;内置项只读,项目/用户项可原地编辑,新建同时支持项目级/用户级。旧的 `settings.section` 入口移除,统一走侧边栏按钮。浏览器 e2e 全绿。
|
|
140
|
+
- **全屏工作台 + 在线编辑(0.7.0)**:配置页从设置弹窗迁出,改为侧边栏 `sidebar.footer.action`「工程流程」按钮,点开 `shell.overlay` 全屏工作台(触发按钮与覆盖层共享一个 store 控制开关)。工作台分「流程配置 / 技能 skill / 规则 rule」三个标签页;技能和规则列表支持在线编辑——`readSkill`/`readRule` 读回正文、改 description/whenToUse/正文、`writeSkill`/`writeRule` 写回;内置项只读,项目/用户项可原地编辑,新建同时支持项目级/用户级。旧的 `settings.section` 入口移除,统一走侧边栏按钮。浏览器 e2e 全绿。
|
|
141
|
+
- **按预设激活(0.8.0)**:`dev_task` 工具与内置技能从 host 全局层拆到 agent 层。host 入口只挂 `task-engine` Remote 控制器 + 工作台 UI(`src/index.ts`);新增 `src/agent.ts`(`./agent` 出品)、`src/dev-task.ts`、`src/shipped-skills.ts`,由预设的 `agent.cordis.yml` 命名后,在**该预设的 scope** 里注册工具与技能。实机 boot 验证:`standard` 会话工具目录不含 `dev_task`(26 个工具),加了 `@godv61/dsh-task-engine/agent` 行的 `eng` 会话含 `dev_task`(27 个工具)且描述正确,换回 `standard` 再次不含——切换预设即切换流程激活状态。
|
|
142
|
+
- **一键激活(0.8.1)**:新增 `preset/enable.mjs`(bin: `dsh-task-engine-enable`),一条命令自动复制 `standard` → `eng`、把 persona 换成工程人设、追加 agent 行、写 `preset.yml`。persona 从「必须换」降级为「可选」——`eng-delivery` 技能自带 `whenToUse`,即使不加人设,模型遇到开发请求也自己加载技能走 `dev_task`;最简激活只剩「复制预设 + 追加一行 agent 行」。实机验证:脚本生成的 `eng` 预设挂载后 `dev_task` 可见、persona 以工程人设(含「铁律」)渲染、`standard` 仍无 `dev_task`。
|
|
143
|
+
- **点选即用(0.9.0)**:host 入口新增 `src/seed-preset.ts`——首次启动自动把当前 `standard` 复制成 `eng` 预设(换工程人设 + 追加 agent 行,幂等、不覆盖手改)。装 bundle 重启后预设列表直接出现「工程化开发引擎」,点选即激活、切走即不激活,零复制/零编辑/零脚本。实机 boot 验证:boot 后 `.agent-presets/eng` 自动生成(agent 行 + 工程人设齐全)、roster 列出 `eng`(user)、`eng` 会话有 `dev_task` 且 persona 含「铁律」、`standard` 会话无 `dev_task`。
|
package/cordis.patch.yml
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
# dsh-task-engine bundle: one host-plane row that
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
1
|
+
# dsh-task-engine bundle: one host-plane row that mounts the `task-engine`
|
|
2
|
+
# Remote namespace (what the browser workbench reads/writes) plus, via
|
|
3
|
+
# `dsh.client`, the workbench UI. This host row registers NO model-facing tool
|
|
4
|
+
# and NO skill — `dev_task` and the shipped skills live on the AGENT plane,
|
|
5
|
+
# behind the `@godv61/dsh-task-engine/agent` entry. A preset's
|
|
6
|
+
# `agent.cordis.yml` names that agent row to activate the flow for its
|
|
7
|
+
# sessions; presets that never name it get neither the tool nor the skills
|
|
8
|
+
# (the workbench stays available so a human can still configure the flow).
|
|
8
9
|
- insert:
|
|
9
10
|
- id: task-engine
|
|
10
11
|
name: '@godv61/dsh-task-engine'
|
package/lib/agent.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent half of dsh-task-engine: registers the model-facing `dev_task` tool and
|
|
3
|
+
* the shipped engineering skills onto the calling (preset) scope. Name this row
|
|
4
|
+
* from a preset's `agent.cordis.yml` to activate the delivery flow for that
|
|
5
|
+
* preset's sessions; presets that never name it see neither the tool nor the
|
|
6
|
+
* skills.
|
|
7
|
+
*
|
|
8
|
+
* @module dsh-task-engine/agent
|
|
9
|
+
*/
|
|
10
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
11
|
+
export declare const name = "task-engine-agent";
|
|
12
|
+
export declare const inject: string[];
|
|
13
|
+
export declare function apply(ctx: Context): void;
|
package/lib/agent.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent half of dsh-task-engine: registers the model-facing `dev_task` tool and
|
|
3
|
+
* the shipped engineering skills onto the calling (preset) scope. Name this row
|
|
4
|
+
* from a preset's `agent.cordis.yml` to activate the delivery flow for that
|
|
5
|
+
* preset's sessions; presets that never name it see neither the tool nor the
|
|
6
|
+
* skills.
|
|
7
|
+
*
|
|
8
|
+
* @module dsh-task-engine/agent
|
|
9
|
+
*/
|
|
10
|
+
import { registerDevTask } from "./dev-task.js";
|
|
11
|
+
import { registerShippedSkills } from "./shipped-skills.js";
|
|
12
|
+
export const name = 'task-engine-agent';
|
|
13
|
+
export const inject = ['tools', 'fs'];
|
|
14
|
+
export function apply(ctx) {
|
|
15
|
+
registerDevTask(ctx);
|
|
16
|
+
registerShippedSkills(ctx);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=agent.js.map
|
package/lib/agent.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAE3D,MAAM,CAAC,MAAM,IAAI,GAAG,mBAAmB,CAAA;AACvC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;AAErC,MAAM,UAAU,KAAK,CAAC,GAAY;IAChC,eAAe,CAAC,GAAG,CAAC,CAAA;IACpB,qBAAqB,CAAC,GAAG,CAAC,CAAA;AAC5B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The model-facing `dev_task` tool: the hard engineering-delivery gate.
|
|
3
|
+
*
|
|
4
|
+
* This module owns the tool definition and every filesystem-adjacent helper it
|
|
5
|
+
* needs, so the registration can run on the AGENT plane (inside a preset's
|
|
6
|
+
* scope) rather than the host plane. Registering through a scoped context files
|
|
7
|
+
* the tool in that scope's layer — a session on another preset never sees it —
|
|
8
|
+
* while the pure state machine in {@link ../engine} and the config-facing
|
|
9
|
+
* `task-engine` Remote stay shared.
|
|
10
|
+
*
|
|
11
|
+
* @module dsh-task-engine/dev-task
|
|
12
|
+
*/
|
|
13
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
14
|
+
/**
|
|
15
|
+
* Register the `dev_task` tool on the calling scope. Call from an agent-plane
|
|
16
|
+
* plugin (a row in `agent.cordis.yml`) so the tool is filed in that preset's
|
|
17
|
+
* scope layer and only sessions on that preset see it.
|
|
18
|
+
* @param ctx - a scoped context whose `tools` and `fs` resolve to the host registries.
|
|
19
|
+
*/
|
|
20
|
+
export declare function registerDevTask(ctx: Context): void;
|
package/lib/dev-task.js
ADDED
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The model-facing `dev_task` tool: the hard engineering-delivery gate.
|
|
3
|
+
*
|
|
4
|
+
* This module owns the tool definition and every filesystem-adjacent helper it
|
|
5
|
+
* needs, so the registration can run on the AGENT plane (inside a preset's
|
|
6
|
+
* scope) rather than the host plane. Registering through a scoped context files
|
|
7
|
+
* the tool in that scope's layer — a session on another preset never sees it —
|
|
8
|
+
* while the pure state machine in {@link ../engine} and the config-facing
|
|
9
|
+
* `task-engine` Remote stay shared.
|
|
10
|
+
*
|
|
11
|
+
* @module dsh-task-engine/dev-task
|
|
12
|
+
*/
|
|
13
|
+
import { readFileSync } from 'node:fs';
|
|
14
|
+
import { homedir } from 'node:os';
|
|
15
|
+
import { join } from 'node:path';
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
import { defineTool } from '@deepseek-ai/dsh-tools';
|
|
18
|
+
import { assertAdvance, bindingsForStage, checkFileScope, commitCheckpoint, legalTargets, loadWorkflow, newTask, validateCommitMessage, validateWorkflow, } from "./engine.js";
|
|
19
|
+
const DEFAULTS = JSON.parse(readFileSync(fileURLToPath(new URL('../defaults/eng.json', import.meta.url)), 'utf8'));
|
|
20
|
+
/** Bundled commit-msg hook, copied into `.git/hooks/` by the `install_hook` operation. */
|
|
21
|
+
const HOOK_TEMPLATE = readFileSync(fileURLToPath(new URL('../hooks/commit-msg', import.meta.url)), 'utf8');
|
|
22
|
+
/** Pins the hook directory to CommonJS so the extensionless hook runs under any repo `type`. */
|
|
23
|
+
const HOOK_PACKAGE_JSON = '{\n "type": "commonjs"\n}\n';
|
|
24
|
+
async function readText(fs, relPath) {
|
|
25
|
+
try {
|
|
26
|
+
const target = await fs.resolve(relPath);
|
|
27
|
+
return await fs.readText(target);
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
async function writeText(fs, relPath, content) {
|
|
34
|
+
const target = await fs.resolve(relPath);
|
|
35
|
+
await fs.writeText(target, content);
|
|
36
|
+
}
|
|
37
|
+
function sanitize(id) {
|
|
38
|
+
return id.replace(/[^0-9a-zA-Z_-]/g, '-');
|
|
39
|
+
}
|
|
40
|
+
const taskPath = (id) => `.dsh/task-${sanitize(id)}.json`;
|
|
41
|
+
/**
|
|
42
|
+
* Resolve the effective workflow, distinguishing a missing config from a bad one.
|
|
43
|
+
*
|
|
44
|
+
* `default` means no `.dsh/eng.json` (bundled defaults). `project` means the
|
|
45
|
+
* project config is present and structurally sound. `invalid` means the project
|
|
46
|
+
* config exists but is unparsable or fails {@link validateWorkflow}; its
|
|
47
|
+
* problems are surfaced so a misconfigured gate fails loudly instead of
|
|
48
|
+
* silently degrading to the default.
|
|
49
|
+
*/
|
|
50
|
+
async function resolveWorkflow(fs) {
|
|
51
|
+
const raw = await readText(fs, '.dsh/eng.json');
|
|
52
|
+
if (raw === undefined)
|
|
53
|
+
return { config: DEFAULTS, problems: [], source: 'default' };
|
|
54
|
+
let parsed;
|
|
55
|
+
try {
|
|
56
|
+
parsed = JSON.parse(raw);
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
return {
|
|
60
|
+
config: DEFAULTS,
|
|
61
|
+
problems: [`invalid JSON: ${error instanceof Error ? error.message : String(error)}`],
|
|
62
|
+
source: 'invalid',
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
const config = loadWorkflow(DEFAULTS, parsed);
|
|
66
|
+
const problems = validateWorkflow(config);
|
|
67
|
+
return { config, problems, source: problems.length === 0 ? 'project' : 'invalid' };
|
|
68
|
+
}
|
|
69
|
+
/** Write the bundled notch gate into `.git/hooks/` so `git commit` is mechanically gated. */
|
|
70
|
+
async function installCommitHook(fs) {
|
|
71
|
+
await writeText(fs, '.git/hooks/commit-msg', HOOK_TEMPLATE);
|
|
72
|
+
await writeText(fs, '.git/hooks/package.json', HOOK_PACKAGE_JSON);
|
|
73
|
+
}
|
|
74
|
+
async function loadTask(fs, id) {
|
|
75
|
+
const raw = await readText(fs, taskPath(id));
|
|
76
|
+
if (raw === undefined)
|
|
77
|
+
throw new Error(`no task "${id}" under ${taskPath(id)}`);
|
|
78
|
+
const state = JSON.parse(raw);
|
|
79
|
+
// Tasks recorded before these features lack the fields; treat them as empty.
|
|
80
|
+
state.artifacts = state.artifacts ?? {};
|
|
81
|
+
state.files = state.files ?? [];
|
|
82
|
+
return state;
|
|
83
|
+
}
|
|
84
|
+
async function writeTask(fs, state) {
|
|
85
|
+
await writeText(fs, taskPath(state.id), JSON.stringify(state, null, 2));
|
|
86
|
+
}
|
|
87
|
+
function dshHome() {
|
|
88
|
+
return process.env.DSH_HOME ?? join(homedir(), '.dsh');
|
|
89
|
+
}
|
|
90
|
+
/** Read a rule file with a hard path, or undefined. */
|
|
91
|
+
function readAbsRule(file) {
|
|
92
|
+
try {
|
|
93
|
+
return readFileSync(file, 'utf8');
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Resolve rule contents by name, project first, then user home, then bundled.
|
|
101
|
+
* @param names - rule names from the current stage binding.
|
|
102
|
+
* @param fs - sandboxed filesystem for the project-level lookup.
|
|
103
|
+
* @returns the rules that resolved, in name order, with their bodies.
|
|
104
|
+
*/
|
|
105
|
+
async function resolveRules(names, fs) {
|
|
106
|
+
const result = [];
|
|
107
|
+
for (const rawName of names) {
|
|
108
|
+
const name = sanitize(rawName);
|
|
109
|
+
if (name === '')
|
|
110
|
+
continue;
|
|
111
|
+
const project = await readText(fs, `.dsh/rules/${name}.md`);
|
|
112
|
+
if (project !== undefined) {
|
|
113
|
+
result.push({ name: rawName, content: project });
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
const user = readAbsRule(join(dshHome(), 'rules', `${name}.md`));
|
|
117
|
+
if (user !== undefined) {
|
|
118
|
+
result.push({ name: rawName, content: user });
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
const bundled = readAbsRule(fileURLToPath(new URL(`../rules/${name}.md`, import.meta.url)));
|
|
122
|
+
if (bundled !== undefined)
|
|
123
|
+
result.push({ name: rawName, content: bundled });
|
|
124
|
+
}
|
|
125
|
+
return result;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Render a stage's progressive-disclosure payload: skill names to load via the
|
|
129
|
+
* `skill` tool, plus the resolved rule bodies to follow. Empty text means the
|
|
130
|
+
* stage declares no bindings.
|
|
131
|
+
* @param stage - current stage.
|
|
132
|
+
* @param workflow - effective workflow.
|
|
133
|
+
* @param fs - host filesystem for project-rule resolution.
|
|
134
|
+
* @returns the disclosure text, or an empty string.
|
|
135
|
+
*/
|
|
136
|
+
async function renderBindings(stage, workflow, fs) {
|
|
137
|
+
const binding = bindingsForStage(stage, workflow);
|
|
138
|
+
const skills = binding?.skills ?? [];
|
|
139
|
+
const ruleNames = binding?.rules ?? [];
|
|
140
|
+
if (binding === undefined || (skills.length === 0 && ruleNames.length === 0))
|
|
141
|
+
return '';
|
|
142
|
+
const rules = await resolveRules(ruleNames, fs);
|
|
143
|
+
const skillPart = skills.length > 0
|
|
144
|
+
? `skills to load: ${skills.join(', ')} (use the skill tool by name)`
|
|
145
|
+
: 'skills to load: none';
|
|
146
|
+
const rulePart = rules.length > 0
|
|
147
|
+
? `rules for this stage:\n${rules.map(r => `### ${r.name}\n${r.content}`).join('\n\n')}`
|
|
148
|
+
: '';
|
|
149
|
+
return [skillPart, rulePart].filter(Boolean).join('\n');
|
|
150
|
+
}
|
|
151
|
+
/** Normalize the tool's `items` argument into complete TaskItem records. */
|
|
152
|
+
function normalizeItems(items) {
|
|
153
|
+
return (items ?? []).map(item => ({
|
|
154
|
+
id: String(item.id ?? ''),
|
|
155
|
+
title: String(item.title ?? ''),
|
|
156
|
+
status: item.status ?? 'todo',
|
|
157
|
+
}));
|
|
158
|
+
}
|
|
159
|
+
const OPERATIONS = ['status', 'create', 'confirm', 'record', 'items', 'scope', 'advance', 'verify', 'review', 'commit', 'config', 'install_hook'];
|
|
160
|
+
const TOOL_DESCRIPTION = 'Own the engineering delivery workflow as hard state. Read or create the task record, record a ' +
|
|
161
|
+
'confirmation or a stage artifact, advance one stage (rejected unless every configured guard already ' +
|
|
162
|
+
'holds, including the stage artifacts), record verification or review, and gate a commit on ' +
|
|
163
|
+
'stage/scope/message. The tool refuses illegal moves instead of degrading — treat a rejection as a ' +
|
|
164
|
+
'fact to fix, not a prompt to retry another way.';
|
|
165
|
+
/**
|
|
166
|
+
* Register the `dev_task` tool on the calling scope. Call from an agent-plane
|
|
167
|
+
* plugin (a row in `agent.cordis.yml`) so the tool is filed in that preset's
|
|
168
|
+
* scope layer and only sessions on that preset see it.
|
|
169
|
+
* @param ctx - a scoped context whose `tools` and `fs` resolve to the host registries.
|
|
170
|
+
*/
|
|
171
|
+
export function registerDevTask(ctx) {
|
|
172
|
+
ctx.tools.register(defineTool({
|
|
173
|
+
name: 'dev_task',
|
|
174
|
+
description: TOOL_DESCRIPTION,
|
|
175
|
+
parameters: {
|
|
176
|
+
operation: { type: 'string', enum: [...OPERATIONS], required: true, description: 'Which task-record action to perform.' },
|
|
177
|
+
task_id: { type: 'string', description: 'Task id (short stable id like GREET-001); required on create and every other operation.' },
|
|
178
|
+
branch: { type: 'string', description: 'Current git branch (recorded on create).' },
|
|
179
|
+
title: { type: 'string', description: 'Task title (create).' },
|
|
180
|
+
work_size: { type: 'string', enum: ['tiny', 'standard', 'complex'], description: 'Workload tier (create).' },
|
|
181
|
+
risk_level: { type: 'string', enum: ['standard', 'high_risk'], description: 'Risk tier (create).' },
|
|
182
|
+
items: {
|
|
183
|
+
type: 'array',
|
|
184
|
+
description: 'Implementation items (create/update).',
|
|
185
|
+
items: {
|
|
186
|
+
type: 'object',
|
|
187
|
+
additionalProperties: false,
|
|
188
|
+
properties: {
|
|
189
|
+
id: { type: 'string' },
|
|
190
|
+
title: { type: 'string' },
|
|
191
|
+
status: { type: 'string', enum: ['todo', 'doing', 'done'] },
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
field: { type: 'string', enum: ['requirement', 'solution'], description: 'Which confirmation (confirm).' },
|
|
196
|
+
target_stage: { type: 'string', description: 'Stage to advance to (advance).' },
|
|
197
|
+
passed: { type: 'boolean', description: 'Verification passed (verify).' },
|
|
198
|
+
evidence: { type: 'array', items: { type: 'string' }, description: 'Verification evidence (verify).' },
|
|
199
|
+
outcome: { type: 'string', enum: ['pass', 'blocked'], description: 'Review outcome (review).' },
|
|
200
|
+
artifact: { type: 'string', description: 'Artifact id to record fields for (record).' },
|
|
201
|
+
fields: {
|
|
202
|
+
type: 'object',
|
|
203
|
+
description: 'Field values for the artifact (record).',
|
|
204
|
+
additionalProperties: true,
|
|
205
|
+
},
|
|
206
|
+
files: {
|
|
207
|
+
type: 'array',
|
|
208
|
+
items: { type: 'string' },
|
|
209
|
+
description: 'Repo-relative paths in scope (create/scope) or being committed (commit).',
|
|
210
|
+
},
|
|
211
|
+
message: { type: 'string', description: 'Commit summary to validate (commit).' },
|
|
212
|
+
hash: { type: 'string', description: 'Commit hash to record after the git commit (commit).' },
|
|
213
|
+
},
|
|
214
|
+
output: {
|
|
215
|
+
schema: { type: 'string' },
|
|
216
|
+
render(_args, value) {
|
|
217
|
+
return [{ type: 'text', text: value }];
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
async execute(args) {
|
|
221
|
+
const a = args;
|
|
222
|
+
const fs = ctx.fs;
|
|
223
|
+
if (a.operation === 'config') {
|
|
224
|
+
const resolved = await resolveWorkflow(fs);
|
|
225
|
+
return JSON.stringify({
|
|
226
|
+
source: resolved.source,
|
|
227
|
+
valid: resolved.problems.length === 0,
|
|
228
|
+
problems: resolved.problems,
|
|
229
|
+
workflow: resolved.config,
|
|
230
|
+
}, null, 2);
|
|
231
|
+
}
|
|
232
|
+
if (a.operation === 'install_hook') {
|
|
233
|
+
await installCommitHook(fs);
|
|
234
|
+
return 'installed commit-msg hook at .git/hooks/commit-msg — git commit is now gated by the task state';
|
|
235
|
+
}
|
|
236
|
+
const resolved = await resolveWorkflow(fs);
|
|
237
|
+
if (resolved.problems.length > 0) {
|
|
238
|
+
throw new Error(`invalid .dsh/eng.json — fix the project config first:\n- ${resolved.problems.join('\n- ')}`);
|
|
239
|
+
}
|
|
240
|
+
const workflow = resolved.config;
|
|
241
|
+
if (a.operation === 'create') {
|
|
242
|
+
if (!a.task_id || !a.title || !a.branch) {
|
|
243
|
+
throw new Error('create requires task_id, title, and branch');
|
|
244
|
+
}
|
|
245
|
+
const state = newTask({
|
|
246
|
+
id: a.task_id,
|
|
247
|
+
title: a.title,
|
|
248
|
+
branch: a.branch,
|
|
249
|
+
work_size: a.work_size ?? 'standard',
|
|
250
|
+
risk_level: a.risk_level ?? 'standard',
|
|
251
|
+
}, workflow);
|
|
252
|
+
state.items = normalizeItems(a.items);
|
|
253
|
+
state.files = a.files ?? [];
|
|
254
|
+
await writeTask(fs, state);
|
|
255
|
+
return `created ${state.id} at stage ${state.stage}; legal next: ${legalTargets(state.stage, workflow).join(', ') || 'none'}`;
|
|
256
|
+
}
|
|
257
|
+
if (!a.task_id)
|
|
258
|
+
throw new Error('task_id is required for this operation');
|
|
259
|
+
const state = await loadTask(fs, a.task_id);
|
|
260
|
+
if (a.operation === 'status') {
|
|
261
|
+
const binding = bindingsForStage(state.stage, workflow);
|
|
262
|
+
const rules = await resolveRules(binding?.rules ?? [], fs);
|
|
263
|
+
return JSON.stringify({
|
|
264
|
+
id: state.id,
|
|
265
|
+
stage: state.stage,
|
|
266
|
+
risk_level: state.risk_level,
|
|
267
|
+
work_size: state.work_size,
|
|
268
|
+
requirement_confirmed: state.requirement_confirmed,
|
|
269
|
+
solution_confirmed: state.solution_confirmed,
|
|
270
|
+
items_done: `${state.items.filter(i => i.status === 'done').length}/${state.items.length}`,
|
|
271
|
+
verification: state.verification,
|
|
272
|
+
review: state.review,
|
|
273
|
+
artifacts: state.artifacts,
|
|
274
|
+
files: state.files,
|
|
275
|
+
legal_next: legalTargets(state.stage, workflow),
|
|
276
|
+
commit: commitCheckpoint(state, workflow),
|
|
277
|
+
bindings: {
|
|
278
|
+
skills: binding?.skills ?? [],
|
|
279
|
+
rules: rules.map(r => ({ name: r.name, content: r.content })),
|
|
280
|
+
},
|
|
281
|
+
}, null, 2);
|
|
282
|
+
}
|
|
283
|
+
if (a.operation === 'commit') {
|
|
284
|
+
const checkpoint = commitCheckpoint(state, workflow);
|
|
285
|
+
if (!checkpoint.allowed)
|
|
286
|
+
throw new Error(checkpoint.reason ?? 'no commit is due');
|
|
287
|
+
if (workflow.commit.file_scope) {
|
|
288
|
+
if (!a.files || a.files.length === 0) {
|
|
289
|
+
throw new Error('commit requires files (the repo-relative paths being committed) when file_scope is on');
|
|
290
|
+
}
|
|
291
|
+
const scope = checkFileScope(state, a.files, workflow);
|
|
292
|
+
if (!scope.ok) {
|
|
293
|
+
throw new Error(scope.noScope
|
|
294
|
+
? 'task declares no file scope; record files first (create files=... or scope files=...)'
|
|
295
|
+
: `commit touches files outside the task scope: ${scope.outside.join(', ')}`);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
const message = validateCommitMessage(a.message ?? '', workflow);
|
|
299
|
+
if (!message.ok)
|
|
300
|
+
throw new Error(message.errors.join('; '));
|
|
301
|
+
if (a.hash)
|
|
302
|
+
state.commits.push({ label: checkpoint.label, hash: a.hash });
|
|
303
|
+
await writeTask(fs, state);
|
|
304
|
+
return `commit approved (${checkpoint.label ?? ''}) — git add ${(a.files ?? []).join(' ')}; git commit -m "${a.message ?? ''}"`;
|
|
305
|
+
}
|
|
306
|
+
let note;
|
|
307
|
+
switch (a.operation) {
|
|
308
|
+
case 'confirm':
|
|
309
|
+
if (a.field === 'requirement')
|
|
310
|
+
state.requirement_confirmed = true;
|
|
311
|
+
else if (a.field === 'solution')
|
|
312
|
+
state.solution_confirmed = true;
|
|
313
|
+
else
|
|
314
|
+
throw new Error('confirm requires field: requirement|solution');
|
|
315
|
+
break;
|
|
316
|
+
case 'record': {
|
|
317
|
+
if (!a.artifact)
|
|
318
|
+
throw new Error('record requires artifact (the artifact id)');
|
|
319
|
+
const def = workflow.artifacts.find(artifact => artifact.id === a.artifact);
|
|
320
|
+
if (!def) {
|
|
321
|
+
throw new Error(`unknown artifact "${a.artifact}"; declared: ${workflow.artifacts.map(x => x.id).join(', ') || 'none'}`);
|
|
322
|
+
}
|
|
323
|
+
const merged = { ...(state.artifacts[def.id] ?? {}) };
|
|
324
|
+
for (const [field, value] of Object.entries(a.fields ?? {})) {
|
|
325
|
+
if (!def.fields.includes(field)) {
|
|
326
|
+
throw new Error(`artifact "${def.id}" has no field "${field}"; fields: ${def.fields.join(', ')}`);
|
|
327
|
+
}
|
|
328
|
+
merged[field] = value === undefined || value === null ? '' : String(value);
|
|
329
|
+
}
|
|
330
|
+
state.artifacts[def.id] = merged;
|
|
331
|
+
const missing = def.fields.filter(field => !merged[field] || merged[field].trim() === '');
|
|
332
|
+
note = missing.length === 0
|
|
333
|
+
? `recorded ${def.name} ("${def.id}") — all required fields present`
|
|
334
|
+
: `recorded ${def.name} ("${def.id}"); still missing: ${missing.join(', ')}`;
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
case 'scope':
|
|
338
|
+
state.files = a.files ?? [];
|
|
339
|
+
note = `file scope set to ${state.files.length} files${state.files.length > 0 ? ': ' + state.files.join(', ') : ' (empty — commits are blocked until files are declared)'}`;
|
|
340
|
+
break;
|
|
341
|
+
case 'items':
|
|
342
|
+
state.items = normalizeItems(a.items);
|
|
343
|
+
note = `items set: ${state.items.map(i => `${i.id}:${i.status}`).join(', ') || 'none'}`;
|
|
344
|
+
break;
|
|
345
|
+
case 'advance': {
|
|
346
|
+
const result = assertAdvance(state, a.target_stage ?? '', workflow);
|
|
347
|
+
if (!result.ok)
|
|
348
|
+
throw new Error(result.errors.join('; '));
|
|
349
|
+
state.stage = a.target_stage;
|
|
350
|
+
const disclosure = await renderBindings(state.stage, workflow, fs);
|
|
351
|
+
note = disclosure === '' ? `advanced to ${state.stage}` : `advanced to ${state.stage}\n${disclosure}`;
|
|
352
|
+
break;
|
|
353
|
+
}
|
|
354
|
+
case 'verify':
|
|
355
|
+
state.verification = { passed: a.passed === true, evidence: a.evidence ?? [] };
|
|
356
|
+
break;
|
|
357
|
+
case 'review':
|
|
358
|
+
if (a.outcome !== 'pass' && a.outcome !== 'blocked')
|
|
359
|
+
throw new Error('review requires outcome: pass|blocked');
|
|
360
|
+
state.review.outcome = a.outcome;
|
|
361
|
+
break;
|
|
362
|
+
default:
|
|
363
|
+
throw new Error(`unknown operation ${a.operation}`);
|
|
364
|
+
}
|
|
365
|
+
await writeTask(fs, state);
|
|
366
|
+
return note ?? `ok (stage ${state.stage})`;
|
|
367
|
+
},
|
|
368
|
+
}));
|
|
369
|
+
}
|
|
370
|
+
//# sourceMappingURL=dev-task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-task.js","sourceRoot":"","sources":["../src/dev-task.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,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qB,CAAC,CAAC,SAAS,EAAE,CAAC,CAAA;YACvD,CAAC;YAED,MAAM,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;YAC1B,OAAO,IAAI,IAAI,aAAa,KAAK,CAAC,KAAK,GAAG,CAAA;QAC5C,CAAC;KACF,CAAC,CAAC,CAAA;AACL,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* dsh-task-engine
|
|
3
|
-
*
|
|
2
|
+
* Host half of dsh-task-engine: mounts the `task-engine` Remote namespace that
|
|
3
|
+
* the browser workbench reads/writes, plus the browser half (declared via
|
|
4
|
+
* `dsh.client`), and seeds a pickable "工程化开发引擎" preset so activation is
|
|
5
|
+
* a single preset switch. The model-facing `dev_task` tool and the shipped
|
|
6
|
+
* engineering skills live on the AGENT plane (`./agent`), registered only in a
|
|
7
|
+
* preset that names it.
|
|
4
8
|
*
|
|
5
9
|
* @module dsh-task-engine
|
|
6
10
|
*/
|
|
7
11
|
import type { Context } from '@deepseek-ai/cordis';
|
|
8
12
|
export declare const name = "task-engine";
|
|
9
|
-
export declare const inject: string[];
|
|
10
13
|
export declare function apply(ctx: Context): void;
|