crewx 0.8.7-rc.19 → 0.8.7-rc.20
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.
|
@@ -32,11 +32,31 @@ let TaskService = TaskService_1 = class TaskService {
|
|
|
32
32
|
crewxPool;
|
|
33
33
|
projectRepo;
|
|
34
34
|
logger = new common_1.Logger(TaskService_1.name);
|
|
35
|
+
reaperInterval;
|
|
35
36
|
constructor(taskRepo, crewxPool, projectRepo) {
|
|
36
37
|
this.taskRepo = taskRepo;
|
|
37
38
|
this.crewxPool = crewxPool;
|
|
38
39
|
this.projectRepo = projectRepo;
|
|
39
40
|
}
|
|
41
|
+
onModuleInit() {
|
|
42
|
+
const reaped = this.taskRepo.reapOrphanedTasks();
|
|
43
|
+
if (reaped > 0) {
|
|
44
|
+
this.logger.warn(`Reaped ${reaped} orphaned task(s) on startup`);
|
|
45
|
+
}
|
|
46
|
+
this.reaperInterval = setInterval(() => {
|
|
47
|
+
try {
|
|
48
|
+
const n = this.taskRepo.reapOrphanedTasks();
|
|
49
|
+
if (n > 0)
|
|
50
|
+
this.logger.warn(`Reaped ${n} orphaned task(s)`);
|
|
51
|
+
}
|
|
52
|
+
catch { /* non-fatal */ }
|
|
53
|
+
}, 5 * 60 * 1000);
|
|
54
|
+
}
|
|
55
|
+
onModuleDestroy() {
|
|
56
|
+
if (this.reaperInterval !== undefined) {
|
|
57
|
+
clearInterval(this.reaperInterval);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
40
60
|
// TSK.ALL: All tasks from crewx.db with filtering, search, and pagination
|
|
41
61
|
getAllTasks(params, workspaceId) {
|
|
42
62
|
const agents = params.agent?.split(',').map(s => s.trim()).filter(Boolean);
|
|
@@ -94,6 +94,10 @@ let TaskRepository = class TaskRepository extends base_sqlite_repository_js_1.Ba
|
|
|
94
94
|
findTasksByPromptHint(hint, workspaceId) {
|
|
95
95
|
return this.sdk.findTasksByPromptHint(hint, workspaceId);
|
|
96
96
|
}
|
|
97
|
+
/** Transition orphaned running tasks (no live process) to failed. */
|
|
98
|
+
reapOrphanedTasks() {
|
|
99
|
+
return this.sdk.reapOrphanedTasks();
|
|
100
|
+
}
|
|
97
101
|
};
|
|
98
102
|
exports.TaskRepository = TaskRepository;
|
|
99
103
|
exports.TaskRepository = TaskRepository = __decorate([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crewx",
|
|
3
|
-
"version": "0.8.7-rc.
|
|
3
|
+
"version": "0.8.7-rc.20",
|
|
4
4
|
"description": "CrewX — AI agent team dashboard with Electron UI and CLI (Web + Electron + Global CLI)",
|
|
5
5
|
"main": "server.js",
|
|
6
6
|
"bin": {
|
|
@@ -74,17 +74,17 @@
|
|
|
74
74
|
"wink-nlp-utils": "2.1.0",
|
|
75
75
|
"yargs": "17.7.0",
|
|
76
76
|
"zod": "3.25.76",
|
|
77
|
-
"@crewx/cli": "0.8.7-rc.
|
|
77
|
+
"@crewx/cli": "0.8.7-rc.20",
|
|
78
78
|
"@crewx/cron": "0.1.8",
|
|
79
|
+
"@crewx/memory": "0.1.18",
|
|
80
|
+
"@crewx/knowledge-core": "0.1.13",
|
|
79
81
|
"@crewx/doc": "0.1.8",
|
|
80
|
-
"@crewx/
|
|
81
|
-
"@crewx/memory": "0.1.17",
|
|
82
|
-
"@crewx/sdk": "0.8.7-rc.19",
|
|
82
|
+
"@crewx/sdk": "0.8.7-rc.20",
|
|
83
83
|
"@crewx/search": "0.1.9",
|
|
84
|
+
"@crewx/wbs": "0.1.9",
|
|
85
|
+
"@crewx/skill": "0.1.16",
|
|
84
86
|
"@crewx/shared": "0.0.5",
|
|
85
|
-
"@crewx/workflow": "0.3.18"
|
|
86
|
-
"@crewx/skill": "0.1.15",
|
|
87
|
-
"@crewx/wbs": "0.1.9"
|
|
87
|
+
"@crewx/workflow": "0.3.18"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@ccusage/codex": "0.0.1",
|