@phren/cli 0.0.19 → 0.0.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.
- package/mcp/dist/capabilities/web-ui.js +1 -1
- package/mcp/dist/generated/memory-ui-graph.browser.js +326 -0
- package/mcp/dist/memory-ui-assets.js +1 -1
- package/mcp/dist/memory-ui-graph.js +36 -2224
- package/mcp/dist/memory-ui-graph.runtime.js +326 -0
- package/mcp/dist/memory-ui-page.js +10 -11
- package/mcp/dist/memory-ui-scripts.js +870 -0
- package/mcp/dist/memory-ui-server.js +29 -1
- package/package.json +5 -1
|
@@ -6,7 +6,7 @@ import * as path from "path";
|
|
|
6
6
|
import * as querystring from "querystring";
|
|
7
7
|
import { spawn, execFileSync } from "child_process";
|
|
8
8
|
import { computePhrenLiveStateToken, getProjectDirs, } from "./shared.js";
|
|
9
|
-
import { editFinding, readReviewQueue, removeFinding, readFindings, addFinding as addFindingStore, readTasksAcrossProjects, addTask as addTaskStore, completeTask as completeTaskStore, removeTask as removeTaskStore, TASKS_FILENAME, } from "./data-access.js";
|
|
9
|
+
import { editFinding, readReviewQueue, removeFinding, readFindings, addFinding as addFindingStore, readTasksAcrossProjects, addTask as addTaskStore, completeTask as completeTaskStore, removeTask as removeTaskStore, updateTask as updateTaskStore, TASKS_FILENAME, } from "./data-access.js";
|
|
10
10
|
import { isValidProjectName, errorMessage, queueFilePath, safeProjectPath } from "./utils.js";
|
|
11
11
|
import { readInstallPreferences, writeInstallPreferences, writeGovernanceInstallPreferences } from "./init-preferences.js";
|
|
12
12
|
import { buildGraph, collectProjectsForUI, collectSkillsForUI, getHooksData, isAllowedFilePath, readSyncSnapshot, recentAccepted, recentUsage, } from "./memory-ui-data.js";
|
|
@@ -954,6 +954,34 @@ export function createWebUiHttpServer(phrenPath, renderPage, profile, opts) {
|
|
|
954
954
|
});
|
|
955
955
|
return;
|
|
956
956
|
}
|
|
957
|
+
if (req.method === "POST" && pathname === "/api/tasks/update") {
|
|
958
|
+
void readFormBody(req, res).then((parsed) => {
|
|
959
|
+
if (!parsed)
|
|
960
|
+
return;
|
|
961
|
+
if (!requirePostAuth(req, res, url, parsed, authToken, true))
|
|
962
|
+
return;
|
|
963
|
+
if (!requireCsrf(res, parsed, csrfTokens, true))
|
|
964
|
+
return;
|
|
965
|
+
const project = String(parsed.project || "");
|
|
966
|
+
const item = String(parsed.item || "");
|
|
967
|
+
if (!project || !item || !isValidProjectName(project)) {
|
|
968
|
+
res.writeHead(400, { "content-type": "application/json" });
|
|
969
|
+
res.end(JSON.stringify({ ok: false, error: "Missing or invalid project/item" }));
|
|
970
|
+
return;
|
|
971
|
+
}
|
|
972
|
+
const updates = {};
|
|
973
|
+
if (Object.prototype.hasOwnProperty.call(parsed, "text"))
|
|
974
|
+
updates.text = String(parsed.text || "");
|
|
975
|
+
if (Object.prototype.hasOwnProperty.call(parsed, "priority"))
|
|
976
|
+
updates.priority = String(parsed.priority || "");
|
|
977
|
+
if (Object.prototype.hasOwnProperty.call(parsed, "section"))
|
|
978
|
+
updates.section = String(parsed.section || "");
|
|
979
|
+
const result = updateTaskStore(phrenPath, project, item, updates);
|
|
980
|
+
res.writeHead(200, { "content-type": "application/json" });
|
|
981
|
+
res.end(JSON.stringify({ ok: result.ok, message: result.ok ? result.data : undefined, error: result.ok ? undefined : result.error }));
|
|
982
|
+
});
|
|
983
|
+
return;
|
|
984
|
+
}
|
|
957
985
|
if (req.method === "GET" && pathname === "/api/sessions") {
|
|
958
986
|
if (!requireGetAuth(req, res, url, authToken, true))
|
|
959
987
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phren/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "Knowledge layer for AI agents. Phren learns and recalls.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -15,9 +15,13 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
17
17
|
"chalk": "^5.6.2",
|
|
18
|
+
"esbuild": "^0.27.4",
|
|
18
19
|
"glob": "^13.0.6",
|
|
20
|
+
"graphology": "^0.26.0",
|
|
21
|
+
"graphology-layout-forceatlas2": "^0.10.1",
|
|
19
22
|
"inquirer": "^12.10.0",
|
|
20
23
|
"js-yaml": "^4.1.1",
|
|
24
|
+
"sigma": "^3.0.2",
|
|
21
25
|
"sql.js-fts5": "^1.4.0",
|
|
22
26
|
"zod": "^4.3.6"
|
|
23
27
|
},
|