@memorax/memorax-code 0.1.6 → 0.1.7
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/docs/troubleshooting.md +18 -0
- package/lib/memorax-code-backend/dist/lifecycle/backend/service.js +1 -0
- package/lib/memorax-code-backend/package.json +1 -1
- package/lib/memorax-code-claude-adapter/.claude-plugin/plugin.json +1 -1
- package/lib/memorax-code-claude-adapter/hooks/runtime-shell.json +1 -1
- package/lib/memorax-code-claude-adapter/package.json +1 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/.claude-plugin/plugin.json +1 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/hooks/runtime-shell.json +1 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/package.json +1 -1
- package/lib/memorax-code-codex-adapter/.codex-plugin/plugin.json +1 -1
- package/lib/memorax-code-codex-adapter/hooks/runtime-shell.json +1 -1
- package/lib/memorax-code-codex-adapter/package.json +1 -1
- package/lib/memorax-code-dsh-adapter/package.json +1 -1
- package/lib/memorax-code-opencode-adapter/package.json +1 -1
- package/lib/package-transition.mjs +4 -3
- package/package.json +1 -1
package/docs/troubleshooting.md
CHANGED
|
@@ -81,6 +81,24 @@ npm install -g @memorax/memorax-code
|
|
|
81
81
|
Fresh and already-stopped installations do not create a transition and remain
|
|
82
82
|
stopped.
|
|
83
83
|
|
|
84
|
+
On Windows, a Backend started by MemoraX Code 0.1.6 or earlier from an npm
|
|
85
|
+
lifecycle may keep the old global package directory as its working directory.
|
|
86
|
+
Windows then prevents npm from renaming that directory, and update fails with
|
|
87
|
+
an `EBUSY` rename error before the newer package's preinstall can stop the old
|
|
88
|
+
Backend. Upgrade an affected installation with:
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
memorax-code stop
|
|
92
|
+
memorax-code update --latest
|
|
93
|
+
memorax-code
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The final command reuses existing configuration and credentials, reconciles
|
|
97
|
+
the client integrations, starts the Backend, and completes the one-time setup
|
|
98
|
+
migration. `memorax-code start` alone does not commit that migration. Once a
|
|
99
|
+
fixed release has started the Backend from its private runtime directory,
|
|
100
|
+
later updates do not require this workaround.
|
|
101
|
+
|
|
84
102
|
## Installed, but memory is unavailable
|
|
85
103
|
|
|
86
104
|
The package and Backend can be healthy while MemoraX remains unconfigured. Run:
|
|
@@ -136,6 +136,7 @@ export async function startBackendService(options = {}, runtime = {}) {
|
|
|
136
136
|
let child;
|
|
137
137
|
try {
|
|
138
138
|
child = (runtime.spawnProcess ?? spawn)(process.execPath, [serverPath, "--memorax-code-backend-instance", instanceId], {
|
|
139
|
+
cwd: serviceDir(options),
|
|
139
140
|
detached: true,
|
|
140
141
|
env: withLoopbackProxyBypass({
|
|
141
142
|
...process.env,
|
|
@@ -2,7 +2,7 @@ import { randomUUID } from "node:crypto";
|
|
|
2
2
|
import { spawnSync } from "node:child_process";
|
|
3
3
|
import { existsSync, unlinkSync } from "node:fs";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
|
-
import { join } from "node:path";
|
|
5
|
+
import { join, resolve } from "node:path";
|
|
6
6
|
import { withJsonFileLock, withJsonFileLockAsync } from "./memorax-code-adapter-common/src/config-utils.mjs";
|
|
7
7
|
import {
|
|
8
8
|
readJsonRuntimeRecord,
|
|
@@ -88,7 +88,7 @@ export function readPackageTransitionRecord(memoraxCodeHome = defaultMemoraxCode
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
export function runNpmPreinstallPackageTransition(options = {}) {
|
|
91
|
-
const memoraxCodeHome = nonEmptyString(options.memoraxCodeHome) ?? defaultMemoraxCodeHome();
|
|
91
|
+
const memoraxCodeHome = resolve(nonEmptyString(options.memoraxCodeHome) ?? defaultMemoraxCodeHome());
|
|
92
92
|
const memoraxCodeBin = requiredString(options.memoraxCodeBin, "memoraxCodeBin");
|
|
93
93
|
const packageVersion = requiredString(options.packageVersion, "packageVersion");
|
|
94
94
|
const pidPath = backendPidPath(memoraxCodeHome);
|
|
@@ -158,7 +158,7 @@ export function runNpmPreinstallPackageTransition(options = {}) {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
export async function runNpmPostinstallPackageTransition(options = {}) {
|
|
161
|
-
const memoraxCodeHome = nonEmptyString(options.memoraxCodeHome) ?? defaultMemoraxCodeHome();
|
|
161
|
+
const memoraxCodeHome = resolve(nonEmptyString(options.memoraxCodeHome) ?? defaultMemoraxCodeHome());
|
|
162
162
|
const memoraxCodeBin = requiredString(options.memoraxCodeBin, "memoraxCodeBin");
|
|
163
163
|
const transitionPath = packageTransitionPath(memoraxCodeHome);
|
|
164
164
|
if (readJsonRuntimeRecord(transitionPath).status === "absent") {
|
|
@@ -239,6 +239,7 @@ function readBackendPidState(path) {
|
|
|
239
239
|
function runLifecycleCommand(options) {
|
|
240
240
|
const spawn = options.spawnSyncImpl ?? spawnSync;
|
|
241
241
|
const result = spawn(process.execPath, [options.memoraxCodeBin, ...options.args], {
|
|
242
|
+
cwd: join(options.memoraxCodeHome, "runtime", "install"),
|
|
242
243
|
encoding: "utf8",
|
|
243
244
|
env: { ...process.env, ...options.env, MEMORAX_CODE_HOME: options.memoraxCodeHome },
|
|
244
245
|
stdio: ["ignore", "pipe", "pipe"],
|