@dug-21/unimatrix 0.5.6 → 0.5.8

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/lib/init.js CHANGED
@@ -78,7 +78,9 @@ function writeMcpJson(projectRoot, binaryPath, dryRun) {
78
78
  existing.mcpServers.unimatrix = {
79
79
  command: binaryPath,
80
80
  args: [],
81
- env: {},
81
+ env: {
82
+ LD_LIBRARY_PATH: path.dirname(binaryPath),
83
+ },
82
84
  };
83
85
 
84
86
  if (!dryRun) {
@@ -218,11 +220,19 @@ async function init(options) {
218
220
  const skillActions = copySkills(projectRoot, dryRun);
219
221
  actions.push(...skillActions);
220
222
 
223
+ // Shared env for all binary invocations: libonnxruntime lives next to the binary
224
+ const binDir = path.dirname(binaryPath);
225
+ const ldPath = process.env.LD_LIBRARY_PATH;
226
+ const binaryEnv = Object.assign({}, process.env, {
227
+ LD_LIBRARY_PATH: ldPath ? binDir + ":" + ldPath : binDir,
228
+ });
229
+
221
230
  // Step 6: Pre-create database (exec Rust binary)
222
231
  if (!dryRun) {
223
232
  try {
224
- execFileSync(binaryPath, ["version", "--project-dir", projectRoot], {
233
+ execFileSync(binaryPath, ["--project-dir", projectRoot, "version"], {
225
234
  stdio: "pipe",
235
+ env: binaryEnv,
226
236
  });
227
237
  actions.push("Database: pre-created at ~/.unimatrix/{hash}/");
228
238
  } catch (error) {
@@ -243,6 +253,7 @@ async function init(options) {
243
253
  const versionOutput = execFileSync(binaryPath, ["version"], {
244
254
  stdio: "pipe",
245
255
  encoding: "utf8",
256
+ env: binaryEnv,
246
257
  }).trim();
247
258
  actions.push("Validation: " + versionOutput);
248
259
  } catch (error) {
@@ -107,8 +107,9 @@ function mergeSettings(filePath, binaryPath, options) {
107
107
  }
108
108
 
109
109
  // Step 3: For each hook event, merge the unimatrix entry
110
+ const binDir = path.dirname(binaryPath);
110
111
  for (const event of HOOK_EVENTS) {
111
- const hookCommand = binaryPath + " hook " + event;
112
+ const hookCommand = "LD_LIBRARY_PATH=" + binDir + " " + binaryPath + " hook " + event;
112
113
  const matcher = EVENT_MATCHERS[event];
113
114
 
114
115
  const newHookEntry = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dug-21/unimatrix",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "Unimatrix knowledge engine for multi-agent development",
5
5
  "bin": {
6
6
  "unimatrix": "bin/unimatrix.js"
@@ -9,8 +9,8 @@
9
9
  "postinstall": "node postinstall.js"
10
10
  },
11
11
  "optionalDependencies": {
12
- "@dug-21/unimatrix-linux-x64": "0.5.6",
13
- "@dug-21/unimatrix-linux-arm64": "0.5.6"
12
+ "@dug-21/unimatrix-linux-x64": "0.5.8",
13
+ "@dug-21/unimatrix-linux-arm64": "0.5.8"
14
14
  },
15
15
  "files": [
16
16
  "bin/",