@tpsdev-ai/flair 0.3.9 → 0.3.10

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 +5 -3
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -768,14 +768,16 @@ const memory = program.command("memory").description("Manage agent memories");
768
768
  memory.command("add").requiredOption("--agent <id>").requiredOption("--content <text>")
769
769
  .option("--durability <d>", "standard").option("--tags <csv>")
770
770
  .action(async (opts) => {
771
- const out = await api("POST", "/Memory", {
772
- agentId: opts.agent, content: opts.content, durability: opts.durability,
771
+ const memId = `${opts.agent}-${Date.now()}`;
772
+ const out = await api("PUT", `/Memory/${memId}`, {
773
+ id: memId, agentId: opts.agent, content: opts.content, durability: opts.durability || "standard",
773
774
  tags: opts.tags ? String(opts.tags).split(",").map((x) => x.trim()).filter(Boolean) : undefined,
775
+ type: "memory", createdAt: new Date().toISOString(),
774
776
  });
775
777
  console.log(JSON.stringify(out, null, 2));
776
778
  });
777
779
  memory.command("search").requiredOption("--agent <id>").requiredOption("--q <query>").option("--tag <tag>")
778
- .action(async (opts) => console.log(JSON.stringify(await api("POST", "/MemorySearch", { agentId: opts.agent, q: opts.q, tag: opts.tag }), null, 2)));
780
+ .action(async (opts) => console.log(JSON.stringify(await api("POST", "/SemanticSearch", { agentId: opts.agent, q: opts.q, tag: opts.tag }), null, 2)));
779
781
  memory.command("list").requiredOption("--agent <id>").option("--tag <tag>")
780
782
  .action(async (opts) => {
781
783
  const q = new URLSearchParams({ agentId: opts.agent, ...(opts.tag ? { tag: opts.tag } : {}) }).toString();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tpsdev-ai/flair",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
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",