@xgjktech/xg-openclaw-harness-tools 0.4.2 → 0.4.3
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/dist/plan-view.d.ts +2 -2
- package/dist/plan-view.js +5 -5
- package/openclaw.plugin.json +1 -1
- package/package.json +4 -2
package/dist/plan-view.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Plan } from "@xgjktech/xg-openclaw-shared";
|
|
2
2
|
export declare function renderPlanView(plan: Plan): string;
|
|
3
3
|
/**
|
|
4
|
-
* 生成"下一步该做什么"
|
|
5
|
-
* 规则:优先 in_progress(继续手头任务)→ 其次 pending
|
|
4
|
+
* 生成"下一步该做什么"的命令式提醒,喂给模型防止其只记录不执行。
|
|
5
|
+
* 规则:优先 in_progress(继续手头任务)→ 其次 pending(开新任务,并先标 in_progress)→ 只剩 blocked 时提示等待/取消;
|
|
6
6
|
* 全部完成或已取消则返回 undefined。
|
|
7
7
|
*/
|
|
8
8
|
export declare function buildPlanReminder(plan: Plan): string | undefined;
|
package/dist/plan-view.js
CHANGED
|
@@ -28,8 +28,8 @@ export function renderPlanView(plan) {
|
|
|
28
28
|
return lines.join("\n");
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* 生成"下一步该做什么"
|
|
32
|
-
* 规则:优先 in_progress(继续手头任务)→ 其次 pending
|
|
31
|
+
* 生成"下一步该做什么"的命令式提醒,喂给模型防止其只记录不执行。
|
|
32
|
+
* 规则:优先 in_progress(继续手头任务)→ 其次 pending(开新任务,并先标 in_progress)→ 只剩 blocked 时提示等待/取消;
|
|
33
33
|
* 全部完成或已取消则返回 undefined。
|
|
34
34
|
*/
|
|
35
35
|
export function buildPlanReminder(plan) {
|
|
@@ -40,15 +40,15 @@ export function buildPlanReminder(plan) {
|
|
|
40
40
|
return undefined;
|
|
41
41
|
const inProgress = unfinished.find((task) => task.status === "in_progress");
|
|
42
42
|
if (inProgress !== undefined) {
|
|
43
|
-
return `下一步:继续执行「${singleLine(inProgress.title)}
|
|
43
|
+
return `下一步:继续执行「${singleLine(inProgress.title)}」,完成后用 xg_plan_write 回写状态`;
|
|
44
44
|
}
|
|
45
45
|
const pending = unfinished.find((task) => task.status === "pending");
|
|
46
46
|
if (pending !== undefined) {
|
|
47
|
-
return
|
|
47
|
+
return `下一步:开始执行「${singleLine(pending.title)}」,并先把其状态更新为 in_progress`;
|
|
48
48
|
}
|
|
49
49
|
const blockedCount = unfinished.filter((task) => task.status === "blocked").length;
|
|
50
50
|
if (blockedCount > 0) {
|
|
51
|
-
return
|
|
51
|
+
return `当前有 ${blockedCount} 项 blocked,等待 note 中记录的条件满足后再推进;若不再推进请取消计划`;
|
|
52
52
|
}
|
|
53
53
|
return undefined;
|
|
54
54
|
}
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xgjktech/xg-openclaw-harness-tools",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "企业工具插件:plan_write / plan_view / action_dispatch(OpenClaw 第三方工具插件)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
"registry": "https://registry.npmjs.org/"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
|
+
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
23
|
+
"prebuild": "npm run clean",
|
|
22
24
|
"build": "tsc -p tsconfig.json",
|
|
23
25
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
24
26
|
"pretest": "npm run build",
|
|
@@ -52,4 +54,4 @@
|
|
|
52
54
|
"defaultChoice": "local"
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
|
-
}
|
|
57
|
+
}
|