novyx 2.6.1 → 2.8.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
@@ -90,6 +90,133 @@ 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
+ }
185
+ interface CortexConfigResult {
186
+ tenant_id: string;
187
+ enabled: boolean;
188
+ consolidation_enabled: boolean;
189
+ consolidation_threshold: number;
190
+ reinforcement_enabled: boolean;
191
+ decay_enabled: boolean;
192
+ decay_age_days: number;
193
+ insight_generation_enabled: boolean;
194
+ last_run_at: string | null;
195
+ run_stats: Record<string, any>;
196
+ }
197
+ interface CortexStatusResult {
198
+ enabled: boolean;
199
+ last_run_at: string | null;
200
+ run_stats: Record<string, any>;
201
+ config: CortexConfigResult;
202
+ }
203
+ interface CortexRunResult {
204
+ consolidated: number;
205
+ boosted: number;
206
+ decayed: number;
207
+ insights_generated: number;
208
+ }
209
+ interface CortexInsight {
210
+ uuid: string;
211
+ observation: string;
212
+ tags: string[];
213
+ importance: number;
214
+ created_at: string;
215
+ }
216
+ interface CortexInsightsResult {
217
+ insights: CortexInsight[];
218
+ total: number;
219
+ }
93
220
 
94
221
  declare class NovyxSession {
95
222
  private client;
@@ -251,6 +378,32 @@ declare class Novyx {
251
378
  }): Promise<EntityListResult>;
252
379
  entity(entityId: string): Promise<EntityTraversalResult>;
253
380
  deleteEntity(entityId: string): Promise<Record<string, any>>;
381
+ replayTimeline(opts?: {
382
+ since?: string;
383
+ until?: string;
384
+ operations?: string[];
385
+ agent_id?: string;
386
+ limit?: number;
387
+ offset?: number;
388
+ }): Promise<ReplayTimelineResult>;
389
+ replaySnapshot(at: string, opts?: {
390
+ limit?: number;
391
+ offset?: number;
392
+ }): Promise<ReplaySnapshotResult>;
393
+ replayMemory(memoryId: string): Promise<MemoryLifecycleResult>;
394
+ replayRecall(query: string, at: string, opts?: {
395
+ limit?: number;
396
+ }): Promise<CounterfactualRecallResult>;
397
+ replayDiff(from: string, to: string): Promise<ReplayDiffResult>;
398
+ replayDrift(from: string, to: string): Promise<DriftAnalysisResult>;
399
+ cortexStatus(): Promise<CortexStatusResult>;
400
+ cortexConfig(): Promise<CortexConfigResult>;
401
+ cortexUpdateConfig(updates: Partial<Omit<CortexConfigResult, "tenant_id" | "last_run_at" | "run_stats">>): Promise<CortexConfigResult>;
402
+ cortexRun(): Promise<CortexRunResult>;
403
+ cortexInsights(opts?: {
404
+ limit?: number;
405
+ offset?: number;
406
+ }): Promise<CortexInsightsResult>;
254
407
  }
255
408
 
256
409
  declare class NovyxError extends Error {
@@ -281,4 +434,4 @@ declare class NovyxSecurityError extends NovyxError {
281
434
  constructor(message?: string);
282
435
  }
283
436
 
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 };
437
+ export { type ContextNowResult, type CortexConfigResult, type CortexInsight, type CortexInsightsResult, type CortexRunResult, type CortexStatusResult, 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,133 @@ 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
+ }
185
+ interface CortexConfigResult {
186
+ tenant_id: string;
187
+ enabled: boolean;
188
+ consolidation_enabled: boolean;
189
+ consolidation_threshold: number;
190
+ reinforcement_enabled: boolean;
191
+ decay_enabled: boolean;
192
+ decay_age_days: number;
193
+ insight_generation_enabled: boolean;
194
+ last_run_at: string | null;
195
+ run_stats: Record<string, any>;
196
+ }
197
+ interface CortexStatusResult {
198
+ enabled: boolean;
199
+ last_run_at: string | null;
200
+ run_stats: Record<string, any>;
201
+ config: CortexConfigResult;
202
+ }
203
+ interface CortexRunResult {
204
+ consolidated: number;
205
+ boosted: number;
206
+ decayed: number;
207
+ insights_generated: number;
208
+ }
209
+ interface CortexInsight {
210
+ uuid: string;
211
+ observation: string;
212
+ tags: string[];
213
+ importance: number;
214
+ created_at: string;
215
+ }
216
+ interface CortexInsightsResult {
217
+ insights: CortexInsight[];
218
+ total: number;
219
+ }
93
220
 
94
221
  declare class NovyxSession {
95
222
  private client;
@@ -251,6 +378,32 @@ declare class Novyx {
251
378
  }): Promise<EntityListResult>;
252
379
  entity(entityId: string): Promise<EntityTraversalResult>;
253
380
  deleteEntity(entityId: string): Promise<Record<string, any>>;
381
+ replayTimeline(opts?: {
382
+ since?: string;
383
+ until?: string;
384
+ operations?: string[];
385
+ agent_id?: string;
386
+ limit?: number;
387
+ offset?: number;
388
+ }): Promise<ReplayTimelineResult>;
389
+ replaySnapshot(at: string, opts?: {
390
+ limit?: number;
391
+ offset?: number;
392
+ }): Promise<ReplaySnapshotResult>;
393
+ replayMemory(memoryId: string): Promise<MemoryLifecycleResult>;
394
+ replayRecall(query: string, at: string, opts?: {
395
+ limit?: number;
396
+ }): Promise<CounterfactualRecallResult>;
397
+ replayDiff(from: string, to: string): Promise<ReplayDiffResult>;
398
+ replayDrift(from: string, to: string): Promise<DriftAnalysisResult>;
399
+ cortexStatus(): Promise<CortexStatusResult>;
400
+ cortexConfig(): Promise<CortexConfigResult>;
401
+ cortexUpdateConfig(updates: Partial<Omit<CortexConfigResult, "tenant_id" | "last_run_at" | "run_stats">>): Promise<CortexConfigResult>;
402
+ cortexRun(): Promise<CortexRunResult>;
403
+ cortexInsights(opts?: {
404
+ limit?: number;
405
+ offset?: number;
406
+ }): Promise<CortexInsightsResult>;
254
407
  }
255
408
 
256
409
  declare class NovyxError extends Error {
@@ -281,4 +434,4 @@ declare class NovyxSecurityError extends NovyxError {
281
434
  constructor(message?: string);
282
435
  }
283
436
 
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 };
437
+ export { type ContextNowResult, type CortexConfigResult, type CortexInsight, type CortexInsightsResult, type CortexRunResult, type CortexStatusResult, 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,57 @@ 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
+ }
525
+ // Cortex (Pro+)
526
+ async cortexStatus() {
527
+ return this._request("GET", "/v1/cortex/status");
528
+ }
529
+ async cortexConfig() {
530
+ return this._request("GET", "/v1/cortex/config");
531
+ }
532
+ async cortexUpdateConfig(updates) {
533
+ return this._request("PATCH", "/v1/cortex/config", { body: updates });
534
+ }
535
+ async cortexRun() {
536
+ return this._request("POST", "/v1/cortex/run");
537
+ }
538
+ async cortexInsights(opts) {
539
+ return this._request("GET", "/v1/cortex/insights", {
540
+ params: { limit: opts?.limit ?? 20, offset: opts?.offset ?? 0 }
541
+ });
542
+ }
492
543
  };
493
544
  // Annotate the CommonJS export names for ESM import in node:
494
545
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -456,6 +456,57 @@ 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
+ }
492
+ // Cortex (Pro+)
493
+ async cortexStatus() {
494
+ return this._request("GET", "/v1/cortex/status");
495
+ }
496
+ async cortexConfig() {
497
+ return this._request("GET", "/v1/cortex/config");
498
+ }
499
+ async cortexUpdateConfig(updates) {
500
+ return this._request("PATCH", "/v1/cortex/config", { body: updates });
501
+ }
502
+ async cortexRun() {
503
+ return this._request("POST", "/v1/cortex/run");
504
+ }
505
+ async cortexInsights(opts) {
506
+ return this._request("GET", "/v1/cortex/insights", {
507
+ params: { limit: opts?.limit ?? 20, offset: opts?.offset ?? 0 }
508
+ });
509
+ }
459
510
  };
460
511
  export {
461
512
  Novyx,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "novyx",
3
- "version": "2.6.1",
3
+ "version": "2.8.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",