novyx 2.4.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 +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +10 -6
- package/dist/index.mjs +10 -6
- package/package.json +1 -1
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;
|
|
@@ -163,7 +178,6 @@ declare class Novyx {
|
|
|
163
178
|
usage(): Promise<Record<string, any>>;
|
|
164
179
|
plans(): Promise<Record<string, any>[]>;
|
|
165
180
|
health(): Promise<Record<string, any>>;
|
|
166
|
-
contextNow(): Promise<Record<string, any>>;
|
|
167
181
|
session(sessionId: string): NovyxSession;
|
|
168
182
|
link(sourceId: string, targetId: string, opts?: {
|
|
169
183
|
relation?: string;
|
|
@@ -202,4 +216,4 @@ declare class NovyxSecurityError extends NovyxError {
|
|
|
202
216
|
constructor(message?: string);
|
|
203
217
|
}
|
|
204
218
|
|
|
205
|
-
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;
|
|
@@ -163,7 +178,6 @@ declare class Novyx {
|
|
|
163
178
|
usage(): Promise<Record<string, any>>;
|
|
164
179
|
plans(): Promise<Record<string, any>[]>;
|
|
165
180
|
health(): Promise<Record<string, any>>;
|
|
166
|
-
contextNow(): Promise<Record<string, any>>;
|
|
167
181
|
session(sessionId: string): NovyxSession;
|
|
168
182
|
link(sourceId: string, targetId: string, opts?: {
|
|
169
183
|
relation?: string;
|
|
@@ -202,4 +216,4 @@ declare class NovyxSecurityError extends NovyxError {
|
|
|
202
216
|
constructor(message?: string);
|
|
203
217
|
}
|
|
204
218
|
|
|
205
|
-
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,
|
|
@@ -401,12 +411,6 @@ var Novyx = class {
|
|
|
401
411
|
}
|
|
402
412
|
}
|
|
403
413
|
// ========================================================================
|
|
404
|
-
// Context
|
|
405
|
-
// ========================================================================
|
|
406
|
-
async contextNow() {
|
|
407
|
-
return this._request("GET", "/v1/context/now");
|
|
408
|
-
}
|
|
409
|
-
// ========================================================================
|
|
410
414
|
// Sessions
|
|
411
415
|
// ========================================================================
|
|
412
416
|
session(sessionId) {
|
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,
|
|
@@ -368,12 +378,6 @@ var Novyx = class {
|
|
|
368
378
|
}
|
|
369
379
|
}
|
|
370
380
|
// ========================================================================
|
|
371
|
-
// Context
|
|
372
|
-
// ========================================================================
|
|
373
|
-
async contextNow() {
|
|
374
|
-
return this._request("GET", "/v1/context/now");
|
|
375
|
-
}
|
|
376
|
-
// ========================================================================
|
|
377
381
|
// Sessions
|
|
378
382
|
// ========================================================================
|
|
379
383
|
session(sessionId) {
|