@phren/cli 0.0.37 → 0.0.39

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.
@@ -67,6 +67,14 @@ export function nearestWritableTarget(filePath) {
67
67
  return false;
68
68
  }
69
69
  }
70
+ export function parseMcpMode(raw) {
71
+ if (!raw)
72
+ return undefined;
73
+ const normalized = raw.trim().toLowerCase();
74
+ if (normalized === "on" || normalized === "off")
75
+ return normalized;
76
+ return undefined;
77
+ }
70
78
  export async function confirmPrompt(message) {
71
79
  if (process.env.CI === "true" || !process.stdin.isTTY)
72
80
  return true;
@@ -60,8 +60,16 @@ function normalizeManifest(raw) {
60
60
  const syncMode = raw.syncMode;
61
61
  if (version !== 1 || !isInstallMode(installMode) || !isSyncMode(syncMode))
62
62
  return null;
63
- const workspaceRoot = typeof raw.workspaceRoot === "string" && raw.workspaceRoot.trim()
64
- ? path.resolve(expandHomePath(raw.workspaceRoot))
63
+ let workspaceRootRaw = typeof raw.workspaceRoot === "string" && raw.workspaceRoot.trim()
64
+ ? raw.workspaceRoot.trim()
65
+ : undefined;
66
+ // Cross-platform path normalization: convert Windows backslashes to forward slashes
67
+ // when reading on a non-Windows platform (e.g. manifest created on Windows, read on Linux).
68
+ if (workspaceRootRaw && process.platform !== "win32") {
69
+ workspaceRootRaw = workspaceRootRaw.replace(/\\/g, "/");
70
+ }
71
+ const workspaceRoot = workspaceRootRaw
72
+ ? path.resolve(expandHomePath(workspaceRootRaw))
65
73
  : undefined;
66
74
  const primaryProject = typeof raw.primaryProject === "string" && raw.primaryProject.trim()
67
75
  ? raw.primaryProject.trim()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phren/cli",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "description": "Knowledge layer for AI agents. Phren learns and recalls.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -51,6 +51,7 @@
51
51
  "bench:retrieval": "tsx scripts/bench-retrieval-modes.ts",
52
52
  "bench:retrieval:synthetic": "tsx scripts/bench-retrieval-synthetic.ts",
53
53
  "preuninstall": "node scripts/preuninstall.mjs",
54
+ "install-hooks": "cp scripts/pre-commit .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit",
54
55
  "prepublishOnly": "npm run build && npm test"
55
56
  },
56
57
  "engines": {