novyx 2.3.0 → 2.5.0

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/index.d.mts CHANGED
@@ -12,6 +12,8 @@ interface Memory {
12
12
  vector_clock?: Record<string, number>;
13
13
  conflict_metadata?: Record<string, any>;
14
14
  expires_at?: string;
15
+ superseded_by?: string;
16
+ match_confidence?: number;
15
17
  }
16
18
  interface SearchResult {
17
19
  query: string;
@@ -43,6 +45,15 @@ interface LinksResult {
43
45
  edges: Edge[];
44
46
  total: number;
45
47
  }
48
+ interface ContextNowResult {
49
+ server_time_utc: string;
50
+ recent_memories: Memory[];
51
+ recent_count: number;
52
+ upcoming: Memory[];
53
+ upcoming_count: number;
54
+ last_session_at?: string;
55
+ seconds_since_last_session?: number;
56
+ }
46
57
 
47
58
  declare class NovyxSession {
48
59
  private client;
@@ -113,7 +124,11 @@ declare class Novyx {
113
124
  agents?: string[];
114
125
  include_shared?: boolean;
115
126
  space_id?: string;
127
+ recency_weight?: number;
128
+ include_superseded?: boolean;
116
129
  }): Promise<SearchResult>;
130
+ supersede(oldMemoryId: string, newMemoryId: string): Promise<Record<string, any>>;
131
+ contextNow(): Promise<ContextNowResult>;
117
132
  memories(opts?: {
118
133
  limit?: number;
119
134
  offset?: number;
@@ -201,4 +216,4 @@ declare class NovyxSecurityError extends NovyxError {
201
216
  constructor(message?: string);
202
217
  }
203
218
 
204
- export { type Edge, type LinksResult, type ListResult, type Memory, Novyx, NovyxAuthError, type NovyxConfig, NovyxError, NovyxForbiddenError, NovyxNotFoundError, NovyxRateLimitError, NovyxSecurityError, NovyxSession, type SearchResult };
219
+ export { type ContextNowResult, type Edge, type LinksResult, type ListResult, type Memory, Novyx, NovyxAuthError, type NovyxConfig, NovyxError, NovyxForbiddenError, NovyxNotFoundError, NovyxRateLimitError, NovyxSecurityError, NovyxSession, type SearchResult };
package/dist/index.d.ts CHANGED
@@ -12,6 +12,8 @@ interface Memory {
12
12
  vector_clock?: Record<string, number>;
13
13
  conflict_metadata?: Record<string, any>;
14
14
  expires_at?: string;
15
+ superseded_by?: string;
16
+ match_confidence?: number;
15
17
  }
16
18
  interface SearchResult {
17
19
  query: string;
@@ -43,6 +45,15 @@ interface LinksResult {
43
45
  edges: Edge[];
44
46
  total: number;
45
47
  }
48
+ interface ContextNowResult {
49
+ server_time_utc: string;
50
+ recent_memories: Memory[];
51
+ recent_count: number;
52
+ upcoming: Memory[];
53
+ upcoming_count: number;
54
+ last_session_at?: string;
55
+ seconds_since_last_session?: number;
56
+ }
46
57
 
47
58
  declare class NovyxSession {
48
59
  private client;
@@ -113,7 +124,11 @@ declare class Novyx {
113
124
  agents?: string[];
114
125
  include_shared?: boolean;
115
126
  space_id?: string;
127
+ recency_weight?: number;
128
+ include_superseded?: boolean;
116
129
  }): Promise<SearchResult>;
130
+ supersede(oldMemoryId: string, newMemoryId: string): Promise<Record<string, any>>;
131
+ contextNow(): Promise<ContextNowResult>;
117
132
  memories(opts?: {
118
133
  limit?: number;
119
134
  offset?: number;
@@ -201,4 +216,4 @@ declare class NovyxSecurityError extends NovyxError {
201
216
  constructor(message?: string);
202
217
  }
203
218
 
204
- export { type Edge, type LinksResult, type ListResult, type Memory, Novyx, NovyxAuthError, type NovyxConfig, NovyxError, NovyxForbiddenError, NovyxNotFoundError, NovyxRateLimitError, NovyxSecurityError, NovyxSession, type SearchResult };
219
+ export { type ContextNowResult, type Edge, type LinksResult, type ListResult, type Memory, Novyx, NovyxAuthError, type NovyxConfig, NovyxError, NovyxForbiddenError, NovyxNotFoundError, NovyxRateLimitError, NovyxSecurityError, NovyxSession, type SearchResult };
package/dist/index.js CHANGED
@@ -230,6 +230,8 @@ var Novyx = class {
230
230
  if (opts?.tags) params.tags = opts.tags.join(",");
231
231
  if (opts?.agents) params.agents = opts.agents.join(",");
232
232
  if (opts?.space_id) params.space_id = opts.space_id;
233
+ if (opts?.recency_weight !== void 0 && opts.recency_weight > 0) params.recency_weight = opts.recency_weight;
234
+ if (opts?.include_superseded) params.include_superseded = "true";
233
235
  const result = await this._request("GET", "/v1/memories/search", { params });
234
236
  const raw = Array.isArray(result) ? result : result.memories ?? [];
235
237
  return {
@@ -238,6 +240,14 @@ var Novyx = class {
238
240
  memories: raw
239
241
  };
240
242
  }
243
+ async supersede(oldMemoryId, newMemoryId) {
244
+ return this._request("PATCH", `/v1/memories/${oldMemoryId}`, {
245
+ body: { superseded_by: newMemoryId }
246
+ });
247
+ }
248
+ async contextNow() {
249
+ return this._request("GET", "/v1/context/now");
250
+ }
241
251
  async memories(opts) {
242
252
  const params = {
243
253
  limit: opts?.limit ?? 100,
package/dist/index.mjs CHANGED
@@ -197,6 +197,8 @@ var Novyx = class {
197
197
  if (opts?.tags) params.tags = opts.tags.join(",");
198
198
  if (opts?.agents) params.agents = opts.agents.join(",");
199
199
  if (opts?.space_id) params.space_id = opts.space_id;
200
+ if (opts?.recency_weight !== void 0 && opts.recency_weight > 0) params.recency_weight = opts.recency_weight;
201
+ if (opts?.include_superseded) params.include_superseded = "true";
200
202
  const result = await this._request("GET", "/v1/memories/search", { params });
201
203
  const raw = Array.isArray(result) ? result : result.memories ?? [];
202
204
  return {
@@ -205,6 +207,14 @@ var Novyx = class {
205
207
  memories: raw
206
208
  };
207
209
  }
210
+ async supersede(oldMemoryId, newMemoryId) {
211
+ return this._request("PATCH", `/v1/memories/${oldMemoryId}`, {
212
+ body: { superseded_by: newMemoryId }
213
+ });
214
+ }
215
+ async contextNow() {
216
+ return this._request("GET", "/v1/context/now");
217
+ }
208
218
  async memories(opts) {
209
219
  const params = {
210
220
  limit: opts?.limit ?? 100,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "novyx",
3
- "version": "2.3.0",
3
+ "version": "2.5.0",
4
4
  "description": "Novyx SDK - Persistent memory, rollback, and audit trail for AI agents",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",