@tpsdev-ai/flair 0.3.5 → 0.3.6

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.
Files changed (2) hide show
  1. package/dist/cli.js +6 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -24,6 +24,10 @@ function privKeyPath(agentId, keysDir) {
24
24
  function pubKeyPath(agentId, keysDir) {
25
25
  return join(keysDir, `${agentId}.pub`);
26
26
  }
27
+ function flairPackageDir() {
28
+ // dist/cli.js → package root (one level up from dist/)
29
+ return join(import.meta.dirname ?? __dirname, "..");
30
+ }
27
31
  function harperBin() {
28
32
  // Resolve relative to this file's location (dist/cli.js → ../node_modules/...)
29
33
  const candidates = [
@@ -222,7 +226,7 @@ program
222
226
  console.log("Installing Harper...");
223
227
  await new Promise((resolve, reject) => {
224
228
  let output = "";
225
- const install = spawn(process.execPath, [bin, "install"], { cwd: process.cwd(), env });
229
+ const install = spawn(process.execPath, [bin, "install"], { cwd: flairPackageDir(), env });
226
230
  install.stdout?.on("data", (d) => { output += d.toString(); });
227
231
  install.stderr?.on("data", (d) => { output += d.toString(); });
228
232
  install.on("exit", (code) => code === 0 ? resolve() : reject(new Error(`Harper install failed (${code}): ${output}`)));
@@ -231,7 +235,7 @@ program
231
235
  });
232
236
  // Start (detached)
233
237
  console.log(`Starting Harper on port ${httpPort}...`);
234
- const proc = spawn(process.execPath, [bin, "dev", "."], { cwd: process.cwd(), env, detached: true, stdio: "ignore" });
238
+ const proc = spawn(process.execPath, [bin, "run", "."], { cwd: flairPackageDir(), env, detached: true, stdio: "ignore" });
235
239
  proc.unref();
236
240
  }
237
241
  console.log("Waiting for Harper health check...");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tpsdev-ai/flair",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "Identity, memory, and soul for AI agents. Cryptographic identity (Ed25519), semantic memory with local embeddings, and persistent personality — all in a single process.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",