@knowsuchagency/fulcrum 2.4.2 → 2.5.1
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/bin/fulcrum.js +3 -3
- package/package.json +1 -1
- package/server/index.js +80 -1
package/bin/fulcrum.js
CHANGED
|
@@ -45641,7 +45641,7 @@ async function runMcpServer(urlOverride, portOverride) {
|
|
|
45641
45641
|
const client = new FulcrumClient(urlOverride, portOverride);
|
|
45642
45642
|
const server = new McpServer({
|
|
45643
45643
|
name: "fulcrum",
|
|
45644
|
-
version: "2.
|
|
45644
|
+
version: "2.5.1"
|
|
45645
45645
|
});
|
|
45646
45646
|
registerTools(server, client);
|
|
45647
45647
|
const transport = new StdioServerTransport;
|
|
@@ -47990,7 +47990,7 @@ var marketplace_default = `{
|
|
|
47990
47990
|
"name": "fulcrum",
|
|
47991
47991
|
"source": "./",
|
|
47992
47992
|
"description": "Task orchestration for Claude Code",
|
|
47993
|
-
"version": "2.
|
|
47993
|
+
"version": "2.5.1",
|
|
47994
47994
|
"skills": [
|
|
47995
47995
|
"./skills/fulcrum"
|
|
47996
47996
|
],
|
|
@@ -49178,7 +49178,7 @@ function compareVersions(v1, v2) {
|
|
|
49178
49178
|
var package_default = {
|
|
49179
49179
|
name: "@knowsuchagency/fulcrum",
|
|
49180
49180
|
private: true,
|
|
49181
|
-
version: "2.
|
|
49181
|
+
version: "2.5.1",
|
|
49182
49182
|
description: "Harness Attention. Orchestrate Agents. Ship.",
|
|
49183
49183
|
license: "PolyForm-Perimeter-1.0.0",
|
|
49184
49184
|
type: "module",
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -463721,7 +463721,7 @@ mcpRoutes.all("/", async (c) => {
|
|
|
463721
463721
|
});
|
|
463722
463722
|
const server = new McpServer({
|
|
463723
463723
|
name: "fulcrum",
|
|
463724
|
-
version: "2.
|
|
463724
|
+
version: "2.5.1"
|
|
463725
463725
|
});
|
|
463726
463726
|
const client = new FulcrumClient(`http://localhost:${port}`);
|
|
463727
463727
|
registerTools(server, client);
|
|
@@ -465837,6 +465837,7 @@ chatRoutes.delete("/:sessionId", async (c) => {
|
|
|
465837
465837
|
var chat_default = chatRoutes;
|
|
465838
465838
|
|
|
465839
465839
|
// server/routes/assistant.ts
|
|
465840
|
+
init_nanoid();
|
|
465840
465841
|
init_db2();
|
|
465841
465842
|
init_schema();
|
|
465842
465843
|
init_drizzle_orm();
|
|
@@ -466081,6 +466082,74 @@ assistantRoutes.get("/events/:id", async (c) => {
|
|
|
466081
466082
|
return c.json({ error: message }, 500);
|
|
466082
466083
|
}
|
|
466083
466084
|
});
|
|
466085
|
+
assistantRoutes.post("/events", async (c) => {
|
|
466086
|
+
const body = await c.req.json();
|
|
466087
|
+
if (!body.sourceChannel || !body.sourceId) {
|
|
466088
|
+
return c.json({ error: "sourceChannel and sourceId are required" }, 400);
|
|
466089
|
+
}
|
|
466090
|
+
try {
|
|
466091
|
+
const now = new Date().toISOString();
|
|
466092
|
+
const event = {
|
|
466093
|
+
id: nanoid(),
|
|
466094
|
+
sourceChannel: body.sourceChannel,
|
|
466095
|
+
sourceId: body.sourceId,
|
|
466096
|
+
sourceMetadata: body.sourceMetadata,
|
|
466097
|
+
summary: body.summary,
|
|
466098
|
+
status: body.status || "pending",
|
|
466099
|
+
linkedTaskId: body.linkedTaskId,
|
|
466100
|
+
actionLog: [],
|
|
466101
|
+
createdAt: now,
|
|
466102
|
+
updatedAt: now
|
|
466103
|
+
};
|
|
466104
|
+
db2.insert(actionableEvents).values(event).run();
|
|
466105
|
+
return c.json(event, 201);
|
|
466106
|
+
} catch (err) {
|
|
466107
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
466108
|
+
return c.json({ error: message }, 500);
|
|
466109
|
+
}
|
|
466110
|
+
});
|
|
466111
|
+
assistantRoutes.patch("/events/:id", async (c) => {
|
|
466112
|
+
const id = c.req.param("id");
|
|
466113
|
+
const body = await c.req.json();
|
|
466114
|
+
try {
|
|
466115
|
+
const existing = db2.select().from(actionableEvents).where(eq(actionableEvents.id, id)).get();
|
|
466116
|
+
if (!existing) {
|
|
466117
|
+
return c.json({ error: "Event not found" }, 404);
|
|
466118
|
+
}
|
|
466119
|
+
const now = new Date().toISOString();
|
|
466120
|
+
const updates = { updatedAt: now };
|
|
466121
|
+
if (body.status !== undefined) {
|
|
466122
|
+
updates.status = body.status;
|
|
466123
|
+
}
|
|
466124
|
+
if (body.linkedTaskId !== undefined) {
|
|
466125
|
+
updates.linkedTaskId = body.linkedTaskId;
|
|
466126
|
+
}
|
|
466127
|
+
if (body.actionLogEntry) {
|
|
466128
|
+
const existingLog = existing.actionLog || [];
|
|
466129
|
+
updates.actionLog = [...existingLog, { timestamp: now, action: body.actionLogEntry }];
|
|
466130
|
+
}
|
|
466131
|
+
db2.update(actionableEvents).set(updates).where(eq(actionableEvents.id, id)).run();
|
|
466132
|
+
const updated = db2.select().from(actionableEvents).where(eq(actionableEvents.id, id)).get();
|
|
466133
|
+
return c.json(updated);
|
|
466134
|
+
} catch (err) {
|
|
466135
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
466136
|
+
return c.json({ error: message }, 500);
|
|
466137
|
+
}
|
|
466138
|
+
});
|
|
466139
|
+
assistantRoutes.delete("/events/:id", async (c) => {
|
|
466140
|
+
const id = c.req.param("id");
|
|
466141
|
+
try {
|
|
466142
|
+
const existing = db2.select().from(actionableEvents).where(eq(actionableEvents.id, id)).get();
|
|
466143
|
+
if (!existing) {
|
|
466144
|
+
return c.json({ error: "Event not found" }, 404);
|
|
466145
|
+
}
|
|
466146
|
+
db2.delete(actionableEvents).where(eq(actionableEvents.id, id)).run();
|
|
466147
|
+
return c.json({ success: true });
|
|
466148
|
+
} catch (err) {
|
|
466149
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
466150
|
+
return c.json({ error: message }, 500);
|
|
466151
|
+
}
|
|
466152
|
+
});
|
|
466084
466153
|
assistantRoutes.get("/sweeps", async (c) => {
|
|
466085
466154
|
const type = c.req.query("type");
|
|
466086
466155
|
const limit2 = parseInt(c.req.query("limit") || "20");
|
|
@@ -466093,6 +466162,16 @@ assistantRoutes.get("/sweeps", async (c) => {
|
|
|
466093
466162
|
return c.json({ error: message }, 500);
|
|
466094
466163
|
}
|
|
466095
466164
|
});
|
|
466165
|
+
assistantRoutes.get("/sweeps/last/:type", async (c) => {
|
|
466166
|
+
const type = c.req.param("type");
|
|
466167
|
+
try {
|
|
466168
|
+
const sweep = db2.select().from(sweepRuns).where(eq(sweepRuns.type, type)).orderBy(desc(sweepRuns.completedAt)).limit(1).get();
|
|
466169
|
+
return c.json(sweep || null);
|
|
466170
|
+
} catch (err) {
|
|
466171
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
466172
|
+
return c.json({ error: message }, 500);
|
|
466173
|
+
}
|
|
466174
|
+
});
|
|
466096
466175
|
assistantRoutes.get("/sweeps/:id", async (c) => {
|
|
466097
466176
|
const id = c.req.param("id");
|
|
466098
466177
|
try {
|