novyx 3.2.1 → 3.3.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/README.md CHANGED
@@ -142,7 +142,7 @@ const history = await nx.rollbackHistory(10);
142
142
 
143
143
  ### Cryptographic Audit Trail
144
144
 
145
- Every operation is logged with SHA-256 hashing for tamper-proof history.
145
+ Every operation is logged with SHA-256 hashing for tamper-evident history.
146
146
 
147
147
  ```typescript
148
148
  // Get recent audit entries
package/dist/index.d.mts CHANGED
@@ -867,5 +867,15 @@ declare class NovyxNotFoundError extends NovyxError {
867
867
  declare class NovyxSecurityError extends NovyxError {
868
868
  constructor(message?: string);
869
869
  }
870
+ declare class NovyxRollbackConflictError extends NovyxError {
871
+ code: string;
872
+ unrevertable: string[];
873
+ errors: any[];
874
+ constructor(message: string, payload?: {
875
+ code?: string;
876
+ unrevertable?: string[];
877
+ errors?: any[];
878
+ });
879
+ }
870
880
 
871
- 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 };
881
+ 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, NovyxRollbackConflictError, NovyxSecurityError, NovyxSession, type ReplayDiffEntry, type ReplayDiffResult, type ReplaySnapshotResult, type ReplayTimelineEntry, type ReplayTimelineResult, type SearchResult, type TripleListResult };
package/dist/index.d.ts CHANGED
@@ -867,5 +867,15 @@ declare class NovyxNotFoundError extends NovyxError {
867
867
  declare class NovyxSecurityError extends NovyxError {
868
868
  constructor(message?: string);
869
869
  }
870
+ declare class NovyxRollbackConflictError extends NovyxError {
871
+ code: string;
872
+ unrevertable: string[];
873
+ errors: any[];
874
+ constructor(message: string, payload?: {
875
+ code?: string;
876
+ unrevertable?: string[];
877
+ errors?: any[];
878
+ });
879
+ }
870
880
 
871
- 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 };
881
+ 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, NovyxRollbackConflictError, NovyxSecurityError, NovyxSession, type ReplayDiffEntry, type ReplayDiffResult, type ReplaySnapshotResult, type ReplayTimelineEntry, type ReplayTimelineResult, type SearchResult, type TripleListResult };
package/dist/index.js CHANGED
@@ -26,6 +26,7 @@ __export(index_exports, {
26
26
  NovyxForbiddenError: () => NovyxForbiddenError,
27
27
  NovyxNotFoundError: () => NovyxNotFoundError,
28
28
  NovyxRateLimitError: () => NovyxRateLimitError,
29
+ NovyxRollbackConflictError: () => NovyxRollbackConflictError,
29
30
  NovyxSecurityError: () => NovyxSecurityError,
30
31
  NovyxSession: () => NovyxSession
31
32
  });
@@ -77,6 +78,16 @@ var NovyxSecurityError = class extends NovyxError {
77
78
  this.name = "NovyxSecurityError";
78
79
  }
79
80
  };
81
+ var NovyxRollbackConflictError = class _NovyxRollbackConflictError extends NovyxError {
82
+ constructor(message, payload = {}) {
83
+ super(message);
84
+ this.name = "NovyxRollbackConflictError";
85
+ this.code = payload.code ?? "novyx_ram.v1.rollback.unachievable";
86
+ this.unrevertable = payload.unrevertable ?? [];
87
+ this.errors = payload.errors ?? [];
88
+ Object.setPrototypeOf(this, _NovyxRollbackConflictError.prototype);
89
+ }
90
+ };
80
91
 
81
92
  // src/session.ts
82
93
  var NovyxSession = class {
@@ -189,6 +200,13 @@ var Novyx = class {
189
200
  throw new NovyxError(`Invalid JSON response: ${text.slice(0, 200)}`);
190
201
  }
191
202
  if (response.status >= 400) {
203
+ if (response.status === 409 && json.code === "novyx_ram.v1.rollback.unachievable") {
204
+ throw new NovyxRollbackConflictError(json.message ?? "Rollback aborted: target state cannot be fully restored.", {
205
+ code: json.code,
206
+ unrevertable: json.unrevertable,
207
+ errors: json.errors
208
+ });
209
+ }
192
210
  throw new NovyxError(`HTTP ${response.status}: ${json.error ?? JSON.stringify(json).slice(0, 200)}`);
193
211
  }
194
212
  return json;
@@ -1072,6 +1090,7 @@ var Novyx = class {
1072
1090
  NovyxForbiddenError,
1073
1091
  NovyxNotFoundError,
1074
1092
  NovyxRateLimitError,
1093
+ NovyxRollbackConflictError,
1075
1094
  NovyxSecurityError,
1076
1095
  NovyxSession
1077
1096
  });
package/dist/index.mjs CHANGED
@@ -44,6 +44,16 @@ var NovyxSecurityError = class extends NovyxError {
44
44
  this.name = "NovyxSecurityError";
45
45
  }
46
46
  };
47
+ var NovyxRollbackConflictError = class _NovyxRollbackConflictError extends NovyxError {
48
+ constructor(message, payload = {}) {
49
+ super(message);
50
+ this.name = "NovyxRollbackConflictError";
51
+ this.code = payload.code ?? "novyx_ram.v1.rollback.unachievable";
52
+ this.unrevertable = payload.unrevertable ?? [];
53
+ this.errors = payload.errors ?? [];
54
+ Object.setPrototypeOf(this, _NovyxRollbackConflictError.prototype);
55
+ }
56
+ };
47
57
 
48
58
  // src/session.ts
49
59
  var NovyxSession = class {
@@ -156,6 +166,13 @@ var Novyx = class {
156
166
  throw new NovyxError(`Invalid JSON response: ${text.slice(0, 200)}`);
157
167
  }
158
168
  if (response.status >= 400) {
169
+ if (response.status === 409 && json.code === "novyx_ram.v1.rollback.unachievable") {
170
+ throw new NovyxRollbackConflictError(json.message ?? "Rollback aborted: target state cannot be fully restored.", {
171
+ code: json.code,
172
+ unrevertable: json.unrevertable,
173
+ errors: json.errors
174
+ });
175
+ }
159
176
  throw new NovyxError(`HTTP ${response.status}: ${json.error ?? JSON.stringify(json).slice(0, 200)}`);
160
177
  }
161
178
  return json;
@@ -1038,6 +1055,7 @@ export {
1038
1055
  NovyxForbiddenError,
1039
1056
  NovyxNotFoundError,
1040
1057
  NovyxRateLimitError,
1058
+ NovyxRollbackConflictError,
1041
1059
  NovyxSecurityError,
1042
1060
  NovyxSession
1043
1061
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "novyx",
3
- "version": "3.2.1",
3
+ "version": "3.3.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",