@agentforge/patterns 0.16.23 → 0.16.24

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.cts CHANGED
@@ -206,6 +206,11 @@ type ReActStateType = typeof ReActState.State;
206
206
  * @module langgraph/patterns/react/types
207
207
  */
208
208
 
209
+ type ReActTool = Tool<unknown, unknown>;
210
+ type ReActToolInput = Omit<ReActTool, 'invoke' | 'execute'> & Pick<Tool<never, unknown>, 'invoke' | 'execute'>;
211
+ type ReActToolSource = ToolRegistry | ReActToolInput[];
212
+ type ReActCheckpointer = BaseCheckpointSaver | true;
213
+ type ReActAgentGraph = CompiledStateGraph<ReActStateType, unknown>;
209
214
  /**
210
215
  * Configuration for creating a ReAct agent
211
216
  */
@@ -218,7 +223,7 @@ interface ReActAgentConfig {
218
223
  * Tools available to the agent
219
224
  * Can be a ToolRegistry or an array of Tools
220
225
  */
221
- tools: ToolRegistry | Tool<any, any>[];
226
+ tools: ReActToolSource;
222
227
  /**
223
228
  * System prompt for the agent
224
229
  * @default "You are a helpful assistant that uses tools to solve problems."
@@ -270,7 +275,7 @@ interface ReActAgentConfig {
270
275
  * });
271
276
  * ```
272
277
  */
273
- checkpointer?: BaseCheckpointSaver | true;
278
+ checkpointer?: ReActCheckpointer;
274
279
  /**
275
280
  * Enable tool call deduplication to prevent calling the same tool with identical parameters multiple times
276
281
  * @default true
@@ -309,6 +314,7 @@ type StopConditionFn = (state: ReActStateType) => boolean;
309
314
  *
310
315
  * @module langgraph/patterns/react/prompts
311
316
  */
317
+
312
318
  /**
313
319
  * Default system prompt for ReAct agents
314
320
  */
@@ -399,7 +405,7 @@ declare const DEFAULT_REACT_SYSTEM_PROMPT = "You are a helpful assistant that us
399
405
  * // Format: {parent_thread_id}:worker:hr
400
406
  * ```
401
407
  */
402
- declare function createReActAgent(config: ReActAgentConfig, options?: ReActBuilderOptions): CompiledStateGraph<any, any>;
408
+ declare function createReActAgent(config: ReActAgentConfig, options?: ReActBuilderOptions): ReActAgentGraph;
403
409
 
404
410
  /**
405
411
  * ReAct Agent Builder
@@ -442,7 +448,7 @@ declare class ReActAgentBuilder {
442
448
  *
443
449
  * @param tools - Tool registry or array of tools
444
450
  */
445
- withTools(tools: ToolRegistry | Tool<any, any>[]): this;
451
+ withTools(tools: ReActToolSource): this;
446
452
  /**
447
453
  * Set the system prompt (optional)
448
454
  *
@@ -516,14 +522,14 @@ declare class ReActAgentBuilder {
516
522
  * .build();
517
523
  * ```
518
524
  */
519
- withCheckpointer(checkpointer: any): this;
525
+ withCheckpointer(checkpointer: ReActCheckpointer): this;
520
526
  /**
521
527
  * Build the ReAct agent
522
528
  *
523
529
  * @returns A compiled LangGraph StateGraph
524
530
  * @throws Error if required configuration is missing
525
531
  */
526
- build(): CompiledStateGraph<any, any>;
532
+ build(): ReActAgentGraph;
527
533
  }
528
534
  /**
529
535
  * Create a new ReAct agent builder
package/dist/index.d.ts CHANGED
@@ -206,6 +206,11 @@ type ReActStateType = typeof ReActState.State;
206
206
  * @module langgraph/patterns/react/types
207
207
  */
208
208
 
209
+ type ReActTool = Tool<unknown, unknown>;
210
+ type ReActToolInput = Omit<ReActTool, 'invoke' | 'execute'> & Pick<Tool<never, unknown>, 'invoke' | 'execute'>;
211
+ type ReActToolSource = ToolRegistry | ReActToolInput[];
212
+ type ReActCheckpointer = BaseCheckpointSaver | true;
213
+ type ReActAgentGraph = CompiledStateGraph<ReActStateType, unknown>;
209
214
  /**
210
215
  * Configuration for creating a ReAct agent
211
216
  */
@@ -218,7 +223,7 @@ interface ReActAgentConfig {
218
223
  * Tools available to the agent
219
224
  * Can be a ToolRegistry or an array of Tools
220
225
  */
221
- tools: ToolRegistry | Tool<any, any>[];
226
+ tools: ReActToolSource;
222
227
  /**
223
228
  * System prompt for the agent
224
229
  * @default "You are a helpful assistant that uses tools to solve problems."
@@ -270,7 +275,7 @@ interface ReActAgentConfig {
270
275
  * });
271
276
  * ```
272
277
  */
273
- checkpointer?: BaseCheckpointSaver | true;
278
+ checkpointer?: ReActCheckpointer;
274
279
  /**
275
280
  * Enable tool call deduplication to prevent calling the same tool with identical parameters multiple times
276
281
  * @default true
@@ -309,6 +314,7 @@ type StopConditionFn = (state: ReActStateType) => boolean;
309
314
  *
310
315
  * @module langgraph/patterns/react/prompts
311
316
  */
317
+
312
318
  /**
313
319
  * Default system prompt for ReAct agents
314
320
  */
@@ -399,7 +405,7 @@ declare const DEFAULT_REACT_SYSTEM_PROMPT = "You are a helpful assistant that us
399
405
  * // Format: {parent_thread_id}:worker:hr
400
406
  * ```
401
407
  */
402
- declare function createReActAgent(config: ReActAgentConfig, options?: ReActBuilderOptions): CompiledStateGraph<any, any>;
408
+ declare function createReActAgent(config: ReActAgentConfig, options?: ReActBuilderOptions): ReActAgentGraph;
403
409
 
404
410
  /**
405
411
  * ReAct Agent Builder
@@ -442,7 +448,7 @@ declare class ReActAgentBuilder {
442
448
  *
443
449
  * @param tools - Tool registry or array of tools
444
450
  */
445
- withTools(tools: ToolRegistry | Tool<any, any>[]): this;
451
+ withTools(tools: ReActToolSource): this;
446
452
  /**
447
453
  * Set the system prompt (optional)
448
454
  *
@@ -516,14 +522,14 @@ declare class ReActAgentBuilder {
516
522
  * .build();
517
523
  * ```
518
524
  */
519
- withCheckpointer(checkpointer: any): this;
525
+ withCheckpointer(checkpointer: ReActCheckpointer): this;
520
526
  /**
521
527
  * Build the ReAct agent
522
528
  *
523
529
  * @returns A compiled LangGraph StateGraph
524
530
  * @throws Error if required configuration is missing
525
531
  */
526
- build(): CompiledStateGraph<any, any>;
532
+ build(): ReActAgentGraph;
527
533
  }
528
534
  /**
529
535
  * Create a new ReAct agent builder
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge/patterns",
3
- "version": "0.16.23",
3
+ "version": "0.16.24",
4
4
  "description": "Production-ready agent workflow patterns for TypeScript including ReAct and Planner-Executor, built on LangGraph.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -41,13 +41,13 @@
41
41
  "url": "https://github.com/TVScoundrel/agentforge/issues"
42
42
  },
43
43
  "dependencies": {
44
- "@agentforge/core": "0.16.23",
44
+ "@agentforge/core": "0.16.24",
45
45
  "@langchain/core": "^1.1.17",
46
46
  "@langchain/langgraph": "^1.1.2",
47
47
  "zod": "^3.23.8"
48
48
  },
49
49
  "devDependencies": {
50
- "@agentforge/testing": "0.16.23",
50
+ "@agentforge/testing": "0.16.24",
51
51
  "@eslint/js": "^9.17.0",
52
52
  "@types/node": "^22.10.2",
53
53
  "eslint": "^9.17.0",