@emqo/claudebridge 0.6.1 → 0.6.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/dist/ctl.js +8 -1
- package/dist/skills/bridge.js +2 -0
- package/package.json +1 -1
package/dist/ctl.js
CHANGED
|
@@ -165,8 +165,15 @@ else if (category === "auto") {
|
|
|
165
165
|
db.prepare("UPDATE tasks SET status = 'cancelled' WHERE id = ?").run(parseInt(taskId));
|
|
166
166
|
output({ ok: true, message: "Auto task cancelled" });
|
|
167
167
|
}
|
|
168
|
+
else if (action === "clear") {
|
|
169
|
+
const [userId] = rest;
|
|
170
|
+
if (!userId)
|
|
171
|
+
fail("Usage: auto clear <user_id>");
|
|
172
|
+
const r = db.prepare("DELETE FROM tasks WHERE user_id = ? AND status IN ('done','failed','cancelled')").run(userId);
|
|
173
|
+
output({ ok: true, deleted: r.changes, message: `Cleared ${r.changes} completed/failed/cancelled task(s)` });
|
|
174
|
+
}
|
|
168
175
|
else {
|
|
169
|
-
fail("Usage: auto <add|add-approval|result|list|cancel> ...");
|
|
176
|
+
fail("Usage: auto <add|add-approval|result|list|cancel|clear> ...");
|
|
170
177
|
}
|
|
171
178
|
}
|
|
172
179
|
else {
|
package/dist/skills/bridge.js
CHANGED
|
@@ -33,6 +33,7 @@ export function generateSkillDoc(ctx) {
|
|
|
33
33
|
`- 创建定时自动任务: \`${ctl} auto add ${ctx.userId} ${ctx.platform} ${ctx.chatId} "任务描述" --delay <分钟数>\``,
|
|
34
34
|
`- 查看自动任务: \`${ctl} auto list ${ctx.userId}\``,
|
|
35
35
|
`- 取消自动任务: \`${ctl} auto cancel <任务ID>\``,
|
|
36
|
+
`- 清除已完成任务: \`${ctl} auto clear ${ctx.userId}\``,
|
|
36
37
|
``,
|
|
37
38
|
`### 使用指南`,
|
|
38
39
|
`- 用户要你记住某事 → 使用 memory add`,
|
|
@@ -141,6 +142,7 @@ export function generateSkillDoc(ctx) {
|
|
|
141
142
|
`- Schedule a delayed auto task: \`${ctl} auto add ${ctx.userId} ${ctx.platform} ${ctx.chatId} "description" --delay <minutes>\``,
|
|
142
143
|
`- List auto tasks: \`${ctl} auto list ${ctx.userId}\``,
|
|
143
144
|
`- Cancel an auto task: \`${ctl} auto cancel <task_id>\``,
|
|
145
|
+
`- Clear completed tasks: \`${ctl} auto clear ${ctx.userId}\``,
|
|
144
146
|
``,
|
|
145
147
|
`### Guidelines`,
|
|
146
148
|
`- User wants you to remember something → use memory add`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emqo/claudebridge",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Bridge claude CLI to chat platforms (Telegram, Discord) with scheduled auto-tasks, autonomous project management, HITL approval, conditional branching, webhook triggers, parallel execution, and observability",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|