novyx 2.6.1 → 2.7.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 +111 -1
- package/dist/index.d.ts +111 -1
- package/dist/index.js +33 -0
- package/dist/index.mjs +33 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -90,6 +90,98 @@ interface EntityTraversalResult {
|
|
|
90
90
|
as_object: KGTriple[];
|
|
91
91
|
total_connections: number;
|
|
92
92
|
}
|
|
93
|
+
interface ReplayTimelineEntry {
|
|
94
|
+
timestamp: string;
|
|
95
|
+
operation: string;
|
|
96
|
+
memory_id?: string;
|
|
97
|
+
observation_preview?: string;
|
|
98
|
+
agent_id?: string;
|
|
99
|
+
importance?: number;
|
|
100
|
+
content_hash?: string;
|
|
101
|
+
metadata?: Record<string, any>;
|
|
102
|
+
}
|
|
103
|
+
interface ReplayTimelineResult {
|
|
104
|
+
entries: ReplayTimelineEntry[];
|
|
105
|
+
total_count: number;
|
|
106
|
+
has_more: boolean;
|
|
107
|
+
period_start?: string;
|
|
108
|
+
period_end?: string;
|
|
109
|
+
}
|
|
110
|
+
interface ReplaySnapshotResult {
|
|
111
|
+
snapshot_at: string;
|
|
112
|
+
total_memories: number;
|
|
113
|
+
memories: Memory[];
|
|
114
|
+
edges: Edge[];
|
|
115
|
+
total_edges: number;
|
|
116
|
+
}
|
|
117
|
+
interface MemoryLifecycleEvent {
|
|
118
|
+
timestamp: string;
|
|
119
|
+
event_type: string;
|
|
120
|
+
detail?: Record<string, any>;
|
|
121
|
+
}
|
|
122
|
+
interface MemoryLifecycleResult {
|
|
123
|
+
memory_id: string;
|
|
124
|
+
observation: string;
|
|
125
|
+
created_at: string;
|
|
126
|
+
current_state?: string;
|
|
127
|
+
events: MemoryLifecycleEvent[];
|
|
128
|
+
versions: Record<string, any>[];
|
|
129
|
+
links: Edge[];
|
|
130
|
+
recall_count: number;
|
|
131
|
+
last_recalled_at?: string;
|
|
132
|
+
}
|
|
133
|
+
interface CounterfactualRecallResult {
|
|
134
|
+
query: string;
|
|
135
|
+
snapshot_at: string;
|
|
136
|
+
total_results: number;
|
|
137
|
+
results: {
|
|
138
|
+
uuid: string;
|
|
139
|
+
observation: string;
|
|
140
|
+
similarity: number;
|
|
141
|
+
score: number;
|
|
142
|
+
importance: number;
|
|
143
|
+
confidence: number;
|
|
144
|
+
created_at: string;
|
|
145
|
+
}[];
|
|
146
|
+
}
|
|
147
|
+
interface ReplayDiffResult {
|
|
148
|
+
from_timestamp: string;
|
|
149
|
+
to_timestamp: string;
|
|
150
|
+
added: ReplayDiffEntry[];
|
|
151
|
+
removed: ReplayDiffEntry[];
|
|
152
|
+
modified: ReplayDiffEntry[];
|
|
153
|
+
summary: {
|
|
154
|
+
added: number;
|
|
155
|
+
removed: number;
|
|
156
|
+
modified: number;
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
interface ReplayDiffEntry {
|
|
160
|
+
memory_id: string;
|
|
161
|
+
change_type: string;
|
|
162
|
+
observation_preview?: string;
|
|
163
|
+
importance?: number;
|
|
164
|
+
}
|
|
165
|
+
interface DriftAnalysisResult {
|
|
166
|
+
from_timestamp: string;
|
|
167
|
+
to_timestamp: string;
|
|
168
|
+
memory_count_from: number;
|
|
169
|
+
memory_count_to: number;
|
|
170
|
+
memory_count_delta: number;
|
|
171
|
+
avg_importance_from: number;
|
|
172
|
+
avg_importance_to: number;
|
|
173
|
+
avg_importance_delta: number;
|
|
174
|
+
tag_shifts: {
|
|
175
|
+
tag: string;
|
|
176
|
+
count_from: number;
|
|
177
|
+
count_to: number;
|
|
178
|
+
delta: number;
|
|
179
|
+
}[];
|
|
180
|
+
importance_distribution_from: Record<string, number>;
|
|
181
|
+
importance_distribution_to: Record<string, number>;
|
|
182
|
+
top_new_topics: string[];
|
|
183
|
+
top_lost_topics: string[];
|
|
184
|
+
}
|
|
93
185
|
|
|
94
186
|
declare class NovyxSession {
|
|
95
187
|
private client;
|
|
@@ -251,6 +343,24 @@ declare class Novyx {
|
|
|
251
343
|
}): Promise<EntityListResult>;
|
|
252
344
|
entity(entityId: string): Promise<EntityTraversalResult>;
|
|
253
345
|
deleteEntity(entityId: string): Promise<Record<string, any>>;
|
|
346
|
+
replayTimeline(opts?: {
|
|
347
|
+
since?: string;
|
|
348
|
+
until?: string;
|
|
349
|
+
operations?: string[];
|
|
350
|
+
agent_id?: string;
|
|
351
|
+
limit?: number;
|
|
352
|
+
offset?: number;
|
|
353
|
+
}): Promise<ReplayTimelineResult>;
|
|
354
|
+
replaySnapshot(at: string, opts?: {
|
|
355
|
+
limit?: number;
|
|
356
|
+
offset?: number;
|
|
357
|
+
}): Promise<ReplaySnapshotResult>;
|
|
358
|
+
replayMemory(memoryId: string): Promise<MemoryLifecycleResult>;
|
|
359
|
+
replayRecall(query: string, at: string, opts?: {
|
|
360
|
+
limit?: number;
|
|
361
|
+
}): Promise<CounterfactualRecallResult>;
|
|
362
|
+
replayDiff(from: string, to: string): Promise<ReplayDiffResult>;
|
|
363
|
+
replayDrift(from: string, to: string): Promise<DriftAnalysisResult>;
|
|
254
364
|
}
|
|
255
365
|
|
|
256
366
|
declare class NovyxError extends Error {
|
|
@@ -281,4 +391,4 @@ declare class NovyxSecurityError extends NovyxError {
|
|
|
281
391
|
constructor(message?: string);
|
|
282
392
|
}
|
|
283
393
|
|
|
284
|
-
export { type ContextNowResult, type Edge, type EdgesListResult, type EntityListResult, type EntityTraversalResult, type KGEntity, type KGTriple, type LinksResult, type ListResult, type Memory, Novyx, NovyxAuthError, type NovyxConfig, NovyxError, NovyxForbiddenError, NovyxNotFoundError, NovyxRateLimitError, NovyxSecurityError, NovyxSession, type SearchResult, type TripleListResult };
|
|
394
|
+
export { type ContextNowResult, type CounterfactualRecallResult, type DriftAnalysisResult, type Edge, type EdgesListResult, type EntityListResult, type EntityTraversalResult, type KGEntity, type KGTriple, type LinksResult, type ListResult, type Memory, type MemoryLifecycleEvent, type MemoryLifecycleResult, Novyx, NovyxAuthError, type NovyxConfig, NovyxError, NovyxForbiddenError, NovyxNotFoundError, NovyxRateLimitError, NovyxSecurityError, NovyxSession, type ReplayDiffEntry, type ReplayDiffResult, type ReplaySnapshotResult, type ReplayTimelineEntry, type ReplayTimelineResult, type SearchResult, type TripleListResult };
|
package/dist/index.d.ts
CHANGED
|
@@ -90,6 +90,98 @@ interface EntityTraversalResult {
|
|
|
90
90
|
as_object: KGTriple[];
|
|
91
91
|
total_connections: number;
|
|
92
92
|
}
|
|
93
|
+
interface ReplayTimelineEntry {
|
|
94
|
+
timestamp: string;
|
|
95
|
+
operation: string;
|
|
96
|
+
memory_id?: string;
|
|
97
|
+
observation_preview?: string;
|
|
98
|
+
agent_id?: string;
|
|
99
|
+
importance?: number;
|
|
100
|
+
content_hash?: string;
|
|
101
|
+
metadata?: Record<string, any>;
|
|
102
|
+
}
|
|
103
|
+
interface ReplayTimelineResult {
|
|
104
|
+
entries: ReplayTimelineEntry[];
|
|
105
|
+
total_count: number;
|
|
106
|
+
has_more: boolean;
|
|
107
|
+
period_start?: string;
|
|
108
|
+
period_end?: string;
|
|
109
|
+
}
|
|
110
|
+
interface ReplaySnapshotResult {
|
|
111
|
+
snapshot_at: string;
|
|
112
|
+
total_memories: number;
|
|
113
|
+
memories: Memory[];
|
|
114
|
+
edges: Edge[];
|
|
115
|
+
total_edges: number;
|
|
116
|
+
}
|
|
117
|
+
interface MemoryLifecycleEvent {
|
|
118
|
+
timestamp: string;
|
|
119
|
+
event_type: string;
|
|
120
|
+
detail?: Record<string, any>;
|
|
121
|
+
}
|
|
122
|
+
interface MemoryLifecycleResult {
|
|
123
|
+
memory_id: string;
|
|
124
|
+
observation: string;
|
|
125
|
+
created_at: string;
|
|
126
|
+
current_state?: string;
|
|
127
|
+
events: MemoryLifecycleEvent[];
|
|
128
|
+
versions: Record<string, any>[];
|
|
129
|
+
links: Edge[];
|
|
130
|
+
recall_count: number;
|
|
131
|
+
last_recalled_at?: string;
|
|
132
|
+
}
|
|
133
|
+
interface CounterfactualRecallResult {
|
|
134
|
+
query: string;
|
|
135
|
+
snapshot_at: string;
|
|
136
|
+
total_results: number;
|
|
137
|
+
results: {
|
|
138
|
+
uuid: string;
|
|
139
|
+
observation: string;
|
|
140
|
+
similarity: number;
|
|
141
|
+
score: number;
|
|
142
|
+
importance: number;
|
|
143
|
+
confidence: number;
|
|
144
|
+
created_at: string;
|
|
145
|
+
}[];
|
|
146
|
+
}
|
|
147
|
+
interface ReplayDiffResult {
|
|
148
|
+
from_timestamp: string;
|
|
149
|
+
to_timestamp: string;
|
|
150
|
+
added: ReplayDiffEntry[];
|
|
151
|
+
removed: ReplayDiffEntry[];
|
|
152
|
+
modified: ReplayDiffEntry[];
|
|
153
|
+
summary: {
|
|
154
|
+
added: number;
|
|
155
|
+
removed: number;
|
|
156
|
+
modified: number;
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
interface ReplayDiffEntry {
|
|
160
|
+
memory_id: string;
|
|
161
|
+
change_type: string;
|
|
162
|
+
observation_preview?: string;
|
|
163
|
+
importance?: number;
|
|
164
|
+
}
|
|
165
|
+
interface DriftAnalysisResult {
|
|
166
|
+
from_timestamp: string;
|
|
167
|
+
to_timestamp: string;
|
|
168
|
+
memory_count_from: number;
|
|
169
|
+
memory_count_to: number;
|
|
170
|
+
memory_count_delta: number;
|
|
171
|
+
avg_importance_from: number;
|
|
172
|
+
avg_importance_to: number;
|
|
173
|
+
avg_importance_delta: number;
|
|
174
|
+
tag_shifts: {
|
|
175
|
+
tag: string;
|
|
176
|
+
count_from: number;
|
|
177
|
+
count_to: number;
|
|
178
|
+
delta: number;
|
|
179
|
+
}[];
|
|
180
|
+
importance_distribution_from: Record<string, number>;
|
|
181
|
+
importance_distribution_to: Record<string, number>;
|
|
182
|
+
top_new_topics: string[];
|
|
183
|
+
top_lost_topics: string[];
|
|
184
|
+
}
|
|
93
185
|
|
|
94
186
|
declare class NovyxSession {
|
|
95
187
|
private client;
|
|
@@ -251,6 +343,24 @@ declare class Novyx {
|
|
|
251
343
|
}): Promise<EntityListResult>;
|
|
252
344
|
entity(entityId: string): Promise<EntityTraversalResult>;
|
|
253
345
|
deleteEntity(entityId: string): Promise<Record<string, any>>;
|
|
346
|
+
replayTimeline(opts?: {
|
|
347
|
+
since?: string;
|
|
348
|
+
until?: string;
|
|
349
|
+
operations?: string[];
|
|
350
|
+
agent_id?: string;
|
|
351
|
+
limit?: number;
|
|
352
|
+
offset?: number;
|
|
353
|
+
}): Promise<ReplayTimelineResult>;
|
|
354
|
+
replaySnapshot(at: string, opts?: {
|
|
355
|
+
limit?: number;
|
|
356
|
+
offset?: number;
|
|
357
|
+
}): Promise<ReplaySnapshotResult>;
|
|
358
|
+
replayMemory(memoryId: string): Promise<MemoryLifecycleResult>;
|
|
359
|
+
replayRecall(query: string, at: string, opts?: {
|
|
360
|
+
limit?: number;
|
|
361
|
+
}): Promise<CounterfactualRecallResult>;
|
|
362
|
+
replayDiff(from: string, to: string): Promise<ReplayDiffResult>;
|
|
363
|
+
replayDrift(from: string, to: string): Promise<DriftAnalysisResult>;
|
|
254
364
|
}
|
|
255
365
|
|
|
256
366
|
declare class NovyxError extends Error {
|
|
@@ -281,4 +391,4 @@ declare class NovyxSecurityError extends NovyxError {
|
|
|
281
391
|
constructor(message?: string);
|
|
282
392
|
}
|
|
283
393
|
|
|
284
|
-
export { type ContextNowResult, type Edge, type EdgesListResult, type EntityListResult, type EntityTraversalResult, type KGEntity, type KGTriple, type LinksResult, type ListResult, type Memory, Novyx, NovyxAuthError, type NovyxConfig, NovyxError, NovyxForbiddenError, NovyxNotFoundError, NovyxRateLimitError, NovyxSecurityError, NovyxSession, type SearchResult, type TripleListResult };
|
|
394
|
+
export { type ContextNowResult, type CounterfactualRecallResult, type DriftAnalysisResult, type Edge, type EdgesListResult, type EntityListResult, type EntityTraversalResult, type KGEntity, type KGTriple, type LinksResult, type ListResult, type Memory, type MemoryLifecycleEvent, type MemoryLifecycleResult, Novyx, NovyxAuthError, type NovyxConfig, NovyxError, NovyxForbiddenError, NovyxNotFoundError, NovyxRateLimitError, NovyxSecurityError, NovyxSession, type ReplayDiffEntry, type ReplayDiffResult, type ReplaySnapshotResult, type ReplayTimelineEntry, type ReplayTimelineResult, type SearchResult, type TripleListResult };
|
package/dist/index.js
CHANGED
|
@@ -489,6 +489,39 @@ var Novyx = class {
|
|
|
489
489
|
async deleteEntity(entityId) {
|
|
490
490
|
return this._request("DELETE", `/v1/knowledge/entities/${entityId}`);
|
|
491
491
|
}
|
|
492
|
+
// ========================================================================
|
|
493
|
+
// Replay (Pro+)
|
|
494
|
+
// ========================================================================
|
|
495
|
+
async replayTimeline(opts) {
|
|
496
|
+
const params = {
|
|
497
|
+
limit: opts?.limit ?? 100,
|
|
498
|
+
offset: opts?.offset ?? 0
|
|
499
|
+
};
|
|
500
|
+
if (opts?.since) params.since = opts.since;
|
|
501
|
+
if (opts?.until) params.until = opts.until;
|
|
502
|
+
if (opts?.operations) params.operations = opts.operations.join(",");
|
|
503
|
+
if (opts?.agent_id) params.agent_id = opts.agent_id;
|
|
504
|
+
return this._request("GET", "/v1/replay/timeline", { params });
|
|
505
|
+
}
|
|
506
|
+
async replaySnapshot(at, opts) {
|
|
507
|
+
return this._request("GET", "/v1/replay/snapshot", {
|
|
508
|
+
params: { at, limit: opts?.limit ?? 500, offset: opts?.offset ?? 0 }
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
async replayMemory(memoryId) {
|
|
512
|
+
return this._request("GET", `/v1/replay/memory/${memoryId}`);
|
|
513
|
+
}
|
|
514
|
+
async replayRecall(query, at, opts) {
|
|
515
|
+
return this._request("POST", "/v1/replay/recall", {
|
|
516
|
+
body: { query, at, limit: opts?.limit ?? 5 }
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
async replayDiff(from, to) {
|
|
520
|
+
return this._request("GET", "/v1/replay/diff", { params: { from, to } });
|
|
521
|
+
}
|
|
522
|
+
async replayDrift(from, to) {
|
|
523
|
+
return this._request("GET", "/v1/replay/drift", { params: { from, to } });
|
|
524
|
+
}
|
|
492
525
|
};
|
|
493
526
|
// Annotate the CommonJS export names for ESM import in node:
|
|
494
527
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -456,6 +456,39 @@ var Novyx = class {
|
|
|
456
456
|
async deleteEntity(entityId) {
|
|
457
457
|
return this._request("DELETE", `/v1/knowledge/entities/${entityId}`);
|
|
458
458
|
}
|
|
459
|
+
// ========================================================================
|
|
460
|
+
// Replay (Pro+)
|
|
461
|
+
// ========================================================================
|
|
462
|
+
async replayTimeline(opts) {
|
|
463
|
+
const params = {
|
|
464
|
+
limit: opts?.limit ?? 100,
|
|
465
|
+
offset: opts?.offset ?? 0
|
|
466
|
+
};
|
|
467
|
+
if (opts?.since) params.since = opts.since;
|
|
468
|
+
if (opts?.until) params.until = opts.until;
|
|
469
|
+
if (opts?.operations) params.operations = opts.operations.join(",");
|
|
470
|
+
if (opts?.agent_id) params.agent_id = opts.agent_id;
|
|
471
|
+
return this._request("GET", "/v1/replay/timeline", { params });
|
|
472
|
+
}
|
|
473
|
+
async replaySnapshot(at, opts) {
|
|
474
|
+
return this._request("GET", "/v1/replay/snapshot", {
|
|
475
|
+
params: { at, limit: opts?.limit ?? 500, offset: opts?.offset ?? 0 }
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
async replayMemory(memoryId) {
|
|
479
|
+
return this._request("GET", `/v1/replay/memory/${memoryId}`);
|
|
480
|
+
}
|
|
481
|
+
async replayRecall(query, at, opts) {
|
|
482
|
+
return this._request("POST", "/v1/replay/recall", {
|
|
483
|
+
body: { query, at, limit: opts?.limit ?? 5 }
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
async replayDiff(from, to) {
|
|
487
|
+
return this._request("GET", "/v1/replay/diff", { params: { from, to } });
|
|
488
|
+
}
|
|
489
|
+
async replayDrift(from, to) {
|
|
490
|
+
return this._request("GET", "/v1/replay/drift", { params: { from, to } });
|
|
491
|
+
}
|
|
459
492
|
};
|
|
460
493
|
export {
|
|
461
494
|
Novyx,
|