@tpsdev-ai/flair 0.3.4 → 0.3.5

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 +7 -5
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -8,6 +8,7 @@ import { spawn } from "node:child_process";
8
8
  import { createPrivateKey, sign as nodeCryptoSign, randomUUID } from "node:crypto";
9
9
  // ─── Defaults ────────────────────────────────────────────────────────────────
10
10
  const DEFAULT_PORT = 9926;
11
+ const DEFAULT_OPS_PORT = 9925;
11
12
  const DEFAULT_ADMIN_USER = "admin";
12
13
  const STARTUP_TIMEOUT_MS = 60_000;
13
14
  const HEALTH_POLL_INTERVAL_MS = 500;
@@ -171,6 +172,7 @@ program
171
172
  .description("Bootstrap a local Flair (Harper) instance for an agent")
172
173
  .option("--agent-id <id>", "Agent ID to register", "local")
173
174
  .option("--port <port>", "Harper HTTP port", String(DEFAULT_PORT))
175
+ .option("--ops-port <port>", "Harper operations API port")
174
176
  .option("--admin-pass <pass>", "Admin password (generated if omitted)")
175
177
  .option("--keys-dir <dir>", "Directory for Ed25519 keys")
176
178
  .option("--data-dir <dir>", "Harper data directory")
@@ -178,7 +180,7 @@ program
178
180
  .action(async (opts) => {
179
181
  const agentId = opts.agentId;
180
182
  const httpPort = Number(opts.port);
181
- const opsPort = httpPort + 1;
183
+ const opsPort = opts.opsPort ? Number(opts.opsPort) : DEFAULT_OPS_PORT;
182
184
  const keysDir = opts.keysDir ?? defaultKeysDir();
183
185
  const dataDir = opts.dataDir ?? defaultDataDir();
184
186
  // Admin password: generate if not provided, NEVER written to disk
@@ -292,7 +294,7 @@ agent
292
294
  .option("--ops-port <port>", "Harper operations API port")
293
295
  .action(async (id, opts) => {
294
296
  const httpPort = Number(opts.port);
295
- const opsPort = opts.opsPort ? Number(opts.opsPort) : httpPort + 1;
297
+ const opsPort = opts.opsPort ? Number(opts.opsPort) : DEFAULT_OPS_PORT;
296
298
  const keysDir = opts.keysDir ?? defaultKeysDir();
297
299
  const adminPass = opts.adminPass;
298
300
  const adminUser = DEFAULT_ADMIN_USER;
@@ -342,7 +344,7 @@ agent
342
344
  .option("--keys-dir <dir>", "Directory for Ed25519 keys")
343
345
  .action(async (id, opts) => {
344
346
  const httpPort = Number(opts.port);
345
- const opsPort = opts.opsPort ? Number(opts.opsPort) : httpPort + 1;
347
+ const opsPort = opts.opsPort ? Number(opts.opsPort) : DEFAULT_OPS_PORT;
346
348
  const adminPass = opts.adminPass ?? process.env.FLAIR_ADMIN_PASS ?? "";
347
349
  const adminUser = DEFAULT_ADMIN_USER;
348
350
  const keysDir = opts.keysDir ?? defaultKeysDir();
@@ -532,7 +534,7 @@ program
532
534
  .option("--keys-dir <dir>", "Directory for Ed25519 keys (for from-agent Ed25519 auth)")
533
535
  .action(async (fromAgent, toAgent, opts) => {
534
536
  const httpPort = Number(opts.port);
535
- const opsPort = opts.opsPort ? Number(opts.opsPort) : httpPort + 1;
537
+ const opsPort = opts.opsPort ? Number(opts.opsPort) : DEFAULT_OPS_PORT;
536
538
  const adminPass = opts.adminPass ?? process.env.FLAIR_ADMIN_PASS ?? "";
537
539
  const adminUser = DEFAULT_ADMIN_USER;
538
540
  const scope = opts.scope ?? "read";
@@ -580,7 +582,7 @@ program
580
582
  .option("--admin-pass <pass>", "Admin password (or set FLAIR_ADMIN_PASS env)")
581
583
  .action(async (fromAgent, toAgent, opts) => {
582
584
  const httpPort = Number(opts.port);
583
- const opsPort = opts.opsPort ? Number(opts.opsPort) : httpPort + 1;
585
+ const opsPort = opts.opsPort ? Number(opts.opsPort) : DEFAULT_OPS_PORT;
584
586
  const adminPass = opts.adminPass ?? process.env.FLAIR_ADMIN_PASS ?? "";
585
587
  const adminUser = DEFAULT_ADMIN_USER;
586
588
  if (!adminPass) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tpsdev-ai/flair",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
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",