nexusmem 0.1.1 → 0.1.2
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 +10 -2
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -103,6 +103,14 @@ async function writeWorkspaceGitignore(ws) {
|
|
|
103
103
|
await writeFile(join(ws.dir, ".gitignore"), "# Machine-local derived data.\n*\n", "utf8");
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
// src/core/version.ts
|
|
107
|
+
import { readFileSync } from "fs";
|
|
108
|
+
import { fileURLToPath } from "url";
|
|
109
|
+
function readOwnVersion() {
|
|
110
|
+
const pkgPath = fileURLToPath(new URL("../../package.json", import.meta.url));
|
|
111
|
+
return JSON.parse(readFileSync(pkgPath, "utf8")).version;
|
|
112
|
+
}
|
|
113
|
+
|
|
106
114
|
// src/git/exec.ts
|
|
107
115
|
import { spawn } from "child_process";
|
|
108
116
|
var GitError = class extends Error {
|
|
@@ -2207,7 +2215,7 @@ async function getStatus(input) {
|
|
|
2207
2215
|
|
|
2208
2216
|
// src/mcp/server.ts
|
|
2209
2217
|
function createServer() {
|
|
2210
|
-
const server = new McpServer({ name: "nexusmem", version:
|
|
2218
|
+
const server = new McpServer({ name: "nexusmem", version: readOwnVersion() });
|
|
2211
2219
|
server.registerTool(
|
|
2212
2220
|
"search_memory",
|
|
2213
2221
|
{
|
|
@@ -2614,7 +2622,7 @@ function guard(run) {
|
|
|
2614
2622
|
};
|
|
2615
2623
|
}
|
|
2616
2624
|
var program = new Command();
|
|
2617
|
-
program.name("nexusmem").description("NexusMem \u2014 local-first persistent memory for AI coding agents").version(
|
|
2625
|
+
program.name("nexusmem").description("NexusMem \u2014 local-first persistent memory for AI coding agents").version(readOwnVersion());
|
|
2618
2626
|
program.command("init").description("Create the .nexusmem workspace and database for this repository").option("-C, --cwd <path>", "repository path", process.cwd()).option("--force", "overwrite an existing config (the database is kept)", false).option("--hook", "also install the opt-in PowerShell hook (cwd + exit code + timestamp)", false).option("--enable-conversation", "opt in to the conversation-transcript source (off by default -- see docs/phase-2-spec.md)", false).action(
|
|
2619
2627
|
(options) => guard(
|
|
2620
2628
|
() => runInit({ cwd: options.cwd, force: options.force, hook: options.hook, enableConversation: options.enableConversation })
|