@knowsuchagency/fulcrum 2.1.2 → 2.1.4
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/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/png" href="/logo.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Fulcrum</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-D02ke429.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BxUAQkPK.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -73131,9 +73131,22 @@ init_drizzle_orm();
|
|
|
73131
73131
|
init_nanoid();
|
|
73132
73132
|
init_db2();
|
|
73133
73133
|
var app20 = new Hono2;
|
|
73134
|
+
function getTagsForTasks(taskIds) {
|
|
73135
|
+
if (taskIds.length === 0)
|
|
73136
|
+
return new Map;
|
|
73137
|
+
const joins = db2.select({ taskId: taskTags.taskId, tagName: tags.name }).from(taskTags).innerJoin(tags, eq(taskTags.tagId, tags.id)).where(inArray(taskTags.taskId, taskIds)).all();
|
|
73138
|
+
const result = new Map;
|
|
73139
|
+
for (const { taskId, tagName } of joins) {
|
|
73140
|
+
const existing = result.get(taskId) || [];
|
|
73141
|
+
existing.push(tagName);
|
|
73142
|
+
result.set(taskId, existing);
|
|
73143
|
+
}
|
|
73144
|
+
return result;
|
|
73145
|
+
}
|
|
73134
73146
|
app20.get("/graph", (c) => {
|
|
73135
73147
|
const allDeps = db2.select().from(taskRelationships).where(eq(taskRelationships.type, "depends_on")).all();
|
|
73136
73148
|
const allTasks = db2.select().from(tasks).all();
|
|
73149
|
+
const taskTagsMap = getTagsForTasks(allTasks.map((t) => t.id));
|
|
73137
73150
|
const taskMap = new Map(allTasks.map((t) => [t.id, t]));
|
|
73138
73151
|
const completedStatuses = new Set(["DONE", "CANCELED"]);
|
|
73139
73152
|
const validEdges = allDeps.filter((d) => {
|
|
@@ -73150,7 +73163,7 @@ app20.get("/graph", (c) => {
|
|
|
73150
73163
|
title: t.title,
|
|
73151
73164
|
status: t.status,
|
|
73152
73165
|
projectId: t.projectId,
|
|
73153
|
-
tags:
|
|
73166
|
+
tags: taskTagsMap.get(t.id) || [],
|
|
73154
73167
|
dueDate: t.dueDate
|
|
73155
73168
|
})),
|
|
73156
73169
|
edges: validEdges.map((d) => ({
|
|
@@ -105286,7 +105299,7 @@ mcpRoutes.all("/", async (c) => {
|
|
|
105286
105299
|
});
|
|
105287
105300
|
const server = new McpServer({
|
|
105288
105301
|
name: "fulcrum",
|
|
105289
|
-
version: "2.1.
|
|
105302
|
+
version: "2.1.4"
|
|
105290
105303
|
});
|
|
105291
105304
|
const client = new FulcrumClient(`http://localhost:${port}`);
|
|
105292
105305
|
registerTools(server, client);
|