@tpsdev-ai/flair 0.4.14 → 0.4.16
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.js +23 -12
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -473,8 +473,14 @@ program
|
|
|
473
473
|
console.log(` Flair URL: ${httpUrl}`);
|
|
474
474
|
console.log(` Private key: ${privPath}`);
|
|
475
475
|
if (!opts.adminPass && !alreadyRunning) {
|
|
476
|
-
console.log(`\n
|
|
477
|
-
console.log(`
|
|
476
|
+
console.log(`\n ┌─────────────────────────────────────────────────┐`);
|
|
477
|
+
console.log(` │ Harper admin credentials (save these now): │`);
|
|
478
|
+
console.log(` │ │`);
|
|
479
|
+
console.log(` │ Username: ${DEFAULT_ADMIN_USER.padEnd(37)}│`);
|
|
480
|
+
console.log(` │ Password: ${adminPass.padEnd(37)}│`);
|
|
481
|
+
console.log(` │ │`);
|
|
482
|
+
console.log(` │ ⚠️ The password won't be shown again. │`);
|
|
483
|
+
console.log(` └─────────────────────────────────────────────────┘`);
|
|
478
484
|
}
|
|
479
485
|
console.log(`\n Export: FLAIR_URL=${httpUrl}`);
|
|
480
486
|
// ── First-run soul setup ──────────────────────────────────────────────
|
|
@@ -1043,22 +1049,27 @@ program
|
|
|
1043
1049
|
if (existsSync(plistPath)) {
|
|
1044
1050
|
try {
|
|
1045
1051
|
const { execSync } = await import("node:child_process");
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1052
|
+
// Ensure the service is loaded (init writes the plist but doesn't load it)
|
|
1053
|
+
try {
|
|
1054
|
+
execSync(`launchctl load "${plistPath}"`, { stdio: "pipe" });
|
|
1055
|
+
}
|
|
1056
|
+
catch { }
|
|
1057
|
+
// Stop the service — KeepAlive=true in the plist auto-restarts it
|
|
1058
|
+
try {
|
|
1059
|
+
execSync(`launchctl stop ${label}`, { stdio: "pipe" });
|
|
1060
|
+
}
|
|
1061
|
+
catch { }
|
|
1062
|
+
await waitForHealth(port, DEFAULT_ADMIN_USER, process.env.HDB_ADMIN_PASSWORD ?? "", STARTUP_TIMEOUT_MS);
|
|
1063
|
+
console.log("✅ Flair restarted");
|
|
1049
1064
|
return;
|
|
1050
1065
|
}
|
|
1051
1066
|
catch (err) {
|
|
1052
|
-
console.error(`launchd restart failed: ${err.message}`);
|
|
1067
|
+
console.error(`launchd restart failed, falling back to port restart: ${err.message}`);
|
|
1053
1068
|
}
|
|
1054
1069
|
}
|
|
1055
|
-
else {
|
|
1056
|
-
console.error("❌ No launchd service found. Run 'flair init' first.");
|
|
1057
|
-
process.exit(1);
|
|
1058
|
-
}
|
|
1059
1070
|
}
|
|
1060
|
-
|
|
1061
|
-
//
|
|
1071
|
+
{
|
|
1072
|
+
// Port-based restart (Linux, or macOS fallback)
|
|
1062
1073
|
console.log("Stopping...");
|
|
1063
1074
|
try {
|
|
1064
1075
|
const { execSync } = await import("node:child_process");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tpsdev-ai/flair",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.16",
|
|
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",
|