@agentforge/core 0.16.29 → 0.16.31

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.cjs CHANGED
@@ -3894,11 +3894,7 @@ var AgentError = class _AgentError extends Error {
3894
3894
  metadata: this.metadata,
3895
3895
  timestamp: this.timestamp,
3896
3896
  stack: this.stack,
3897
- cause: this.cause ? {
3898
- name: this.cause.name,
3899
- message: this.cause.message,
3900
- stack: this.cause.stack
3901
- } : void 0
3897
+ cause: this.cause ? toSerializedErrorCause(this.cause) : void 0
3902
3898
  };
3903
3899
  }
3904
3900
  /**
@@ -3918,6 +3914,13 @@ var AgentError = class _AgentError extends Error {
3918
3914
  return parts.join("\n");
3919
3915
  }
3920
3916
  };
3917
+ function toSerializedErrorCause(cause) {
3918
+ return {
3919
+ name: cause.name,
3920
+ message: cause.message,
3921
+ stack: cause.stack
3922
+ };
3923
+ }
3921
3924
  var ErrorReporterImpl = class {
3922
3925
  options;
3923
3926
  constructor(options) {
package/dist/index.d.cts CHANGED
@@ -4095,6 +4095,23 @@ declare function clearThread(checkpointer: BaseCheckpointSaver, options: {
4095
4095
  *
4096
4096
  * Provides enhanced error classes and error reporting for better debugging.
4097
4097
  */
4098
+
4099
+ type SerializedErrorCause = {
4100
+ name: string;
4101
+ message: string;
4102
+ stack?: string;
4103
+ };
4104
+ type SerializedAgentError = {
4105
+ name: string;
4106
+ message: string;
4107
+ code?: string;
4108
+ node?: string;
4109
+ state?: unknown;
4110
+ metadata?: JsonObject;
4111
+ timestamp: number;
4112
+ stack?: string;
4113
+ cause?: SerializedErrorCause;
4114
+ };
4098
4115
  /**
4099
4116
  * Error context information
4100
4117
  */
@@ -4110,11 +4127,11 @@ interface ErrorContext {
4110
4127
  /**
4111
4128
  * Current state when the error occurred
4112
4129
  */
4113
- state?: any;
4130
+ state?: unknown;
4114
4131
  /**
4115
4132
  * Additional metadata
4116
4133
  */
4117
- metadata?: Record<string, any>;
4134
+ metadata?: JsonObject;
4118
4135
  /**
4119
4136
  * Original error that caused this error
4120
4137
  */
@@ -4126,15 +4143,15 @@ interface ErrorContext {
4126
4143
  declare class AgentError extends Error {
4127
4144
  readonly code?: string;
4128
4145
  readonly node?: string;
4129
- readonly state?: any;
4130
- readonly metadata?: Record<string, any>;
4146
+ readonly state?: unknown;
4147
+ readonly metadata?: JsonObject;
4131
4148
  readonly cause?: Error;
4132
4149
  readonly timestamp: number;
4133
4150
  constructor(message: string, context?: ErrorContext);
4134
4151
  /**
4135
4152
  * Convert error to JSON for logging/reporting
4136
4153
  */
4137
- toJSON(): Record<string, any>;
4154
+ toJSON(): SerializedAgentError;
4138
4155
  /**
4139
4156
  * Get a human-readable string representation
4140
4157
  */
package/dist/index.d.ts CHANGED
@@ -4095,6 +4095,23 @@ declare function clearThread(checkpointer: BaseCheckpointSaver, options: {
4095
4095
  *
4096
4096
  * Provides enhanced error classes and error reporting for better debugging.
4097
4097
  */
4098
+
4099
+ type SerializedErrorCause = {
4100
+ name: string;
4101
+ message: string;
4102
+ stack?: string;
4103
+ };
4104
+ type SerializedAgentError = {
4105
+ name: string;
4106
+ message: string;
4107
+ code?: string;
4108
+ node?: string;
4109
+ state?: unknown;
4110
+ metadata?: JsonObject;
4111
+ timestamp: number;
4112
+ stack?: string;
4113
+ cause?: SerializedErrorCause;
4114
+ };
4098
4115
  /**
4099
4116
  * Error context information
4100
4117
  */
@@ -4110,11 +4127,11 @@ interface ErrorContext {
4110
4127
  /**
4111
4128
  * Current state when the error occurred
4112
4129
  */
4113
- state?: any;
4130
+ state?: unknown;
4114
4131
  /**
4115
4132
  * Additional metadata
4116
4133
  */
4117
- metadata?: Record<string, any>;
4134
+ metadata?: JsonObject;
4118
4135
  /**
4119
4136
  * Original error that caused this error
4120
4137
  */
@@ -4126,15 +4143,15 @@ interface ErrorContext {
4126
4143
  declare class AgentError extends Error {
4127
4144
  readonly code?: string;
4128
4145
  readonly node?: string;
4129
- readonly state?: any;
4130
- readonly metadata?: Record<string, any>;
4146
+ readonly state?: unknown;
4147
+ readonly metadata?: JsonObject;
4131
4148
  readonly cause?: Error;
4132
4149
  readonly timestamp: number;
4133
4150
  constructor(message: string, context?: ErrorContext);
4134
4151
  /**
4135
4152
  * Convert error to JSON for logging/reporting
4136
4153
  */
4137
- toJSON(): Record<string, any>;
4154
+ toJSON(): SerializedAgentError;
4138
4155
  /**
4139
4156
  * Get a human-readable string representation
4140
4157
  */
package/dist/index.js CHANGED
@@ -3719,11 +3719,7 @@ var AgentError = class _AgentError extends Error {
3719
3719
  metadata: this.metadata,
3720
3720
  timestamp: this.timestamp,
3721
3721
  stack: this.stack,
3722
- cause: this.cause ? {
3723
- name: this.cause.name,
3724
- message: this.cause.message,
3725
- stack: this.cause.stack
3726
- } : void 0
3722
+ cause: this.cause ? toSerializedErrorCause(this.cause) : void 0
3727
3723
  };
3728
3724
  }
3729
3725
  /**
@@ -3743,6 +3739,13 @@ var AgentError = class _AgentError extends Error {
3743
3739
  return parts.join("\n");
3744
3740
  }
3745
3741
  };
3742
+ function toSerializedErrorCause(cause) {
3743
+ return {
3744
+ name: cause.name,
3745
+ message: cause.message,
3746
+ stack: cause.stack
3747
+ };
3748
+ }
3746
3749
  var ErrorReporterImpl = class {
3747
3750
  options;
3748
3751
  constructor(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge/core",
3
- "version": "0.16.29",
3
+ "version": "0.16.31",
4
4
  "description": "Production-ready TypeScript agent framework built on LangGraph with orchestration, middleware, and typed abstractions.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",