@tpsdev-ai/flair-client 0.4.3 → 0.5.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.
package/dist/client.d.ts CHANGED
@@ -25,6 +25,10 @@ export declare class FlairClient {
25
25
  /** Cold-start bootstrap — get soul + recent memories as a formatted context block. */
26
26
  bootstrap(opts?: {
27
27
  maxTokens?: number;
28
+ currentTask?: string;
29
+ channel?: string;
30
+ surface?: string;
31
+ subjects?: string[];
28
32
  }): Promise<BootstrapResult>;
29
33
  /** Health check. */
30
34
  health(): Promise<{
@@ -48,11 +52,12 @@ declare class MemoryApi {
48
52
  /** Similarity threshold for dedup. Default: 0.95 */
49
53
  dedupThreshold?: number;
50
54
  }): Promise<Memory>;
51
- /** Search memories by meaning. */
55
+ /** Search memories by meaning. Optionally filter to facts valid at a specific point in time. */
52
56
  search(query: string, opts?: {
53
57
  limit?: number;
54
58
  minScore?: number;
55
59
  scoring?: "composite" | "raw";
60
+ asOf?: string;
56
61
  }): Promise<SearchResult[]>;
57
62
  /** Get a memory by ID. */
58
63
  get(id: string): Promise<Memory | null>;
package/dist/client.js CHANGED
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { loadPrivateKey, resolveKeyPath, signRequest } from "./auth.js";
11
11
  const DEFAULT_URL = "http://localhost:19926";
12
- const DEFAULT_TIMEOUT = 10_000;
12
+ const DEFAULT_TIMEOUT = 30_000;
13
13
  export class FlairClient {
14
14
  url;
15
15
  agentId;
@@ -74,6 +74,10 @@ export class FlairClient {
74
74
  return this.request("POST", "/BootstrapMemories", {
75
75
  agentId: this.agentId,
76
76
  maxTokens: opts.maxTokens ?? 4000,
77
+ currentTask: opts.currentTask,
78
+ channel: opts.channel,
79
+ surface: opts.surface,
80
+ subjects: opts.subjects,
77
81
  });
78
82
  }
79
83
  /** Health check. */
@@ -118,9 +122,9 @@ class MemoryApi {
118
122
  // Harper PUT returns {} — return the record we constructed
119
123
  return record;
120
124
  }
121
- /** Search memories by meaning. */
125
+ /** Search memories by meaning. Optionally filter to facts valid at a specific point in time. */
122
126
  async search(query, opts = {}) {
123
- const result = await this.client.request("POST", "/SemanticSearch", { agentId: this.client.agentId, q: query, limit: opts.limit ?? 5, scoring: opts.scoring });
127
+ const result = await this.client.request("POST", "/SemanticSearch", { agentId: this.client.agentId, q: query, limit: opts.limit ?? 5, scoring: opts.scoring, asOf: opts.asOf });
124
128
  const minScore = opts.minScore ?? 0;
125
129
  return (result.results ?? [])
126
130
  .map((r) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tpsdev-ai/flair-client",
3
- "version": "0.4.3",
3
+ "version": "0.5.6",
4
4
  "description": "Lightweight client for Flair — identity, memory, and soul for AI agents. Zero heavy dependencies.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",