@hasna/todos 0.9.66 → 0.9.67
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/cli/index.js +13 -0
- package/dist/server/index.js +13 -0
- package/dist/server/serve.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -11966,6 +11966,19 @@ data: ${JSON.stringify({ type: "connected", agent_id: agentId, timestamp: new Da
|
|
|
11966
11966
|
return json({ error: e instanceof Error ? e.message : "Failed" }, 500, port);
|
|
11967
11967
|
}
|
|
11968
11968
|
}
|
|
11969
|
+
if (path === "/api/doctor" && method === "GET") {
|
|
11970
|
+
const issues = [];
|
|
11971
|
+
const { getStaleTasks: getStaleDiag } = await Promise.resolve().then(() => (init_tasks(), exports_tasks));
|
|
11972
|
+
const staleItems = getStaleDiag(30);
|
|
11973
|
+
if (staleItems.length > 0)
|
|
11974
|
+
issues.push({ severity: "warn", type: "stale_tasks", message: `${staleItems.length} tasks stuck in_progress >30min`, count: staleItems.length });
|
|
11975
|
+
const withParent = getDatabase().query("SELECT COUNT(*) as c FROM tasks t WHERE t.parent_id IS NOT NULL AND NOT EXISTS (SELECT 1 FROM tasks p WHERE p.id = t.parent_id)").get();
|
|
11976
|
+
if (withParent.c > 0)
|
|
11977
|
+
issues.push({ severity: "error", type: "orphaned_parents", message: `${withParent.c} tasks reference non-existent parent IDs`, count: withParent.c });
|
|
11978
|
+
if (issues.length === 0)
|
|
11979
|
+
issues.push({ severity: "info", type: "healthy", message: "No issues found" });
|
|
11980
|
+
return json({ ok: !issues.some((i) => i.severity === "error"), issues }, 200, port);
|
|
11981
|
+
}
|
|
11969
11982
|
if (path === "/api/report" && method === "GET") {
|
|
11970
11983
|
const days = parseInt(url.searchParams.get("days") || "7", 10);
|
|
11971
11984
|
const projectId = url.searchParams.get("project_id") || undefined;
|
package/dist/server/index.js
CHANGED
|
@@ -3105,6 +3105,19 @@ data: ${JSON.stringify({ type: "connected", agent_id: agentId, timestamp: new Da
|
|
|
3105
3105
|
return json({ error: e instanceof Error ? e.message : "Failed" }, 500, port);
|
|
3106
3106
|
}
|
|
3107
3107
|
}
|
|
3108
|
+
if (path === "/api/doctor" && method === "GET") {
|
|
3109
|
+
const issues = [];
|
|
3110
|
+
const { getStaleTasks: getStaleDiag } = await Promise.resolve().then(() => (init_tasks(), exports_tasks));
|
|
3111
|
+
const staleItems = getStaleDiag(30);
|
|
3112
|
+
if (staleItems.length > 0)
|
|
3113
|
+
issues.push({ severity: "warn", type: "stale_tasks", message: `${staleItems.length} tasks stuck in_progress >30min`, count: staleItems.length });
|
|
3114
|
+
const withParent = getDatabase().query("SELECT COUNT(*) as c FROM tasks t WHERE t.parent_id IS NOT NULL AND NOT EXISTS (SELECT 1 FROM tasks p WHERE p.id = t.parent_id)").get();
|
|
3115
|
+
if (withParent.c > 0)
|
|
3116
|
+
issues.push({ severity: "error", type: "orphaned_parents", message: `${withParent.c} tasks reference non-existent parent IDs`, count: withParent.c });
|
|
3117
|
+
if (issues.length === 0)
|
|
3118
|
+
issues.push({ severity: "info", type: "healthy", message: "No issues found" });
|
|
3119
|
+
return json({ ok: !issues.some((i) => i.severity === "error"), issues }, 200, port);
|
|
3120
|
+
}
|
|
3108
3121
|
if (path === "/api/report" && method === "GET") {
|
|
3109
3122
|
const days = parseInt(url.searchParams.get("days") || "7", 10);
|
|
3110
3123
|
const projectId = url.searchParams.get("project_id") || undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/server/serve.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiHH,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/server/serve.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiHH,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAu1B1G"}
|