@agentforge/core 0.15.11 → 0.15.12
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 +1 -1
- package/dist/index.d.cts +14 -10
- package/dist/index.d.ts +14 -10
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2354,7 +2354,7 @@ function sequentialBuilder(stateSchema) {
|
|
|
2354
2354
|
var import_langgraph3 = require("@langchain/langgraph");
|
|
2355
2355
|
function createParallelWorkflow(stateSchema, config, options = {}) {
|
|
2356
2356
|
const { parallel: parallel2, aggregate } = config;
|
|
2357
|
-
const { autoStartEnd = true
|
|
2357
|
+
const { autoStartEnd = true } = options;
|
|
2358
2358
|
if (parallel2.length === 0) {
|
|
2359
2359
|
throw new Error("Parallel workflow must have at least one parallel node");
|
|
2360
2360
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z, ZodTypeAny, output, ZodType, ZodTypeDef } from 'zod';
|
|
2
2
|
import { DynamicStructuredTool } from '@langchain/core/tools';
|
|
3
|
-
import { AnnotationRoot, BaseChannel, StateGraph, END, MemorySaver, BaseCheckpointSaver, CheckpointTuple } from '@langchain/langgraph';
|
|
3
|
+
import { AnnotationRoot, BaseChannel, StateGraph, StateDefinition, UpdateType, END, MemorySaver, BaseCheckpointSaver, CheckpointTuple } from '@langchain/langgraph';
|
|
4
4
|
import { RunnableConfig } from '@langchain/core/runnables';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -2153,10 +2153,12 @@ declare function sequentialBuilder<State>(stateSchema: any): {
|
|
|
2153
2153
|
* @module langgraph/builders/parallel
|
|
2154
2154
|
*/
|
|
2155
2155
|
|
|
2156
|
+
type ParallelWorkflowState<SD extends StateDefinition> = AnnotationRoot<SD>['State'];
|
|
2157
|
+
type ParallelNodeResult<State> = Partial<State>;
|
|
2156
2158
|
/**
|
|
2157
2159
|
* Configuration for a parallel node
|
|
2158
2160
|
*/
|
|
2159
|
-
interface ParallelNode<State
|
|
2161
|
+
interface ParallelNode<State, Update = ParallelNodeResult<State>> {
|
|
2160
2162
|
/**
|
|
2161
2163
|
* Unique name for the node
|
|
2162
2164
|
*/
|
|
@@ -2164,7 +2166,7 @@ interface ParallelNode<State> {
|
|
|
2164
2166
|
/**
|
|
2165
2167
|
* The node function that processes the state
|
|
2166
2168
|
*/
|
|
2167
|
-
node: (state: State) =>
|
|
2169
|
+
node: (state: State) => Update | Promise<Update>;
|
|
2168
2170
|
/**
|
|
2169
2171
|
* Optional description of what this node does
|
|
2170
2172
|
*/
|
|
@@ -2173,7 +2175,7 @@ interface ParallelNode<State> {
|
|
|
2173
2175
|
/**
|
|
2174
2176
|
* Configuration for an aggregation node that combines parallel results
|
|
2175
2177
|
*/
|
|
2176
|
-
interface AggregateNode<State
|
|
2178
|
+
interface AggregateNode<State, Update = ParallelNodeResult<State>> {
|
|
2177
2179
|
/**
|
|
2178
2180
|
* Name for the aggregation node
|
|
2179
2181
|
*/
|
|
@@ -2181,7 +2183,7 @@ interface AggregateNode<State> {
|
|
|
2181
2183
|
/**
|
|
2182
2184
|
* The aggregation function that combines results from parallel nodes
|
|
2183
2185
|
*/
|
|
2184
|
-
node: (state: State) =>
|
|
2186
|
+
node: (state: State) => Update | Promise<Update>;
|
|
2185
2187
|
/**
|
|
2186
2188
|
* Optional description
|
|
2187
2189
|
*/
|
|
@@ -2197,22 +2199,24 @@ interface ParallelWorkflowOptions {
|
|
|
2197
2199
|
*/
|
|
2198
2200
|
autoStartEnd?: boolean;
|
|
2199
2201
|
/**
|
|
2200
|
-
*
|
|
2202
|
+
* Compatibility-only no-op retained to avoid a public type break.
|
|
2203
|
+
*
|
|
2204
|
+
* @deprecated This option is currently unused and will be removed in a future major release.
|
|
2201
2205
|
*/
|
|
2202
2206
|
name?: string;
|
|
2203
2207
|
}
|
|
2204
2208
|
/**
|
|
2205
2209
|
* Configuration for a parallel workflow
|
|
2206
2210
|
*/
|
|
2207
|
-
interface ParallelWorkflowConfig<State
|
|
2211
|
+
interface ParallelWorkflowConfig<State, Update = ParallelNodeResult<State>> {
|
|
2208
2212
|
/**
|
|
2209
2213
|
* Nodes that execute in parallel
|
|
2210
2214
|
*/
|
|
2211
|
-
parallel: ParallelNode<State>[];
|
|
2215
|
+
parallel: ParallelNode<State, Update>[];
|
|
2212
2216
|
/**
|
|
2213
2217
|
* Optional aggregation node that runs after all parallel nodes complete
|
|
2214
2218
|
*/
|
|
2215
|
-
aggregate?: AggregateNode<State>;
|
|
2219
|
+
aggregate?: AggregateNode<State, Update>;
|
|
2216
2220
|
}
|
|
2217
2221
|
/**
|
|
2218
2222
|
* Creates a parallel workflow where multiple nodes execute concurrently.
|
|
@@ -2241,7 +2245,7 @@ interface ParallelWorkflowConfig<State> {
|
|
|
2241
2245
|
* @param options - Optional configuration
|
|
2242
2246
|
* @returns A configured StateGraph ready to compile
|
|
2243
2247
|
*/
|
|
2244
|
-
declare function createParallelWorkflow<
|
|
2248
|
+
declare function createParallelWorkflow<SD extends StateDefinition = StateDefinition, Update extends UpdateType<SD> = UpdateType<SD>>(stateSchema: AnnotationRoot<SD>, config: ParallelWorkflowConfig<ParallelWorkflowState<SD>, Update>, options?: ParallelWorkflowOptions): StateGraph<AnnotationRoot<SD>, ParallelWorkflowState<SD>, Update, string>;
|
|
2245
2249
|
|
|
2246
2250
|
/**
|
|
2247
2251
|
* Conditional Routing Utilities
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z, ZodTypeAny, output, ZodType, ZodTypeDef } from 'zod';
|
|
2
2
|
import { DynamicStructuredTool } from '@langchain/core/tools';
|
|
3
|
-
import { AnnotationRoot, BaseChannel, StateGraph, END, MemorySaver, BaseCheckpointSaver, CheckpointTuple } from '@langchain/langgraph';
|
|
3
|
+
import { AnnotationRoot, BaseChannel, StateGraph, StateDefinition, UpdateType, END, MemorySaver, BaseCheckpointSaver, CheckpointTuple } from '@langchain/langgraph';
|
|
4
4
|
import { RunnableConfig } from '@langchain/core/runnables';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -2153,10 +2153,12 @@ declare function sequentialBuilder<State>(stateSchema: any): {
|
|
|
2153
2153
|
* @module langgraph/builders/parallel
|
|
2154
2154
|
*/
|
|
2155
2155
|
|
|
2156
|
+
type ParallelWorkflowState<SD extends StateDefinition> = AnnotationRoot<SD>['State'];
|
|
2157
|
+
type ParallelNodeResult<State> = Partial<State>;
|
|
2156
2158
|
/**
|
|
2157
2159
|
* Configuration for a parallel node
|
|
2158
2160
|
*/
|
|
2159
|
-
interface ParallelNode<State
|
|
2161
|
+
interface ParallelNode<State, Update = ParallelNodeResult<State>> {
|
|
2160
2162
|
/**
|
|
2161
2163
|
* Unique name for the node
|
|
2162
2164
|
*/
|
|
@@ -2164,7 +2166,7 @@ interface ParallelNode<State> {
|
|
|
2164
2166
|
/**
|
|
2165
2167
|
* The node function that processes the state
|
|
2166
2168
|
*/
|
|
2167
|
-
node: (state: State) =>
|
|
2169
|
+
node: (state: State) => Update | Promise<Update>;
|
|
2168
2170
|
/**
|
|
2169
2171
|
* Optional description of what this node does
|
|
2170
2172
|
*/
|
|
@@ -2173,7 +2175,7 @@ interface ParallelNode<State> {
|
|
|
2173
2175
|
/**
|
|
2174
2176
|
* Configuration for an aggregation node that combines parallel results
|
|
2175
2177
|
*/
|
|
2176
|
-
interface AggregateNode<State
|
|
2178
|
+
interface AggregateNode<State, Update = ParallelNodeResult<State>> {
|
|
2177
2179
|
/**
|
|
2178
2180
|
* Name for the aggregation node
|
|
2179
2181
|
*/
|
|
@@ -2181,7 +2183,7 @@ interface AggregateNode<State> {
|
|
|
2181
2183
|
/**
|
|
2182
2184
|
* The aggregation function that combines results from parallel nodes
|
|
2183
2185
|
*/
|
|
2184
|
-
node: (state: State) =>
|
|
2186
|
+
node: (state: State) => Update | Promise<Update>;
|
|
2185
2187
|
/**
|
|
2186
2188
|
* Optional description
|
|
2187
2189
|
*/
|
|
@@ -2197,22 +2199,24 @@ interface ParallelWorkflowOptions {
|
|
|
2197
2199
|
*/
|
|
2198
2200
|
autoStartEnd?: boolean;
|
|
2199
2201
|
/**
|
|
2200
|
-
*
|
|
2202
|
+
* Compatibility-only no-op retained to avoid a public type break.
|
|
2203
|
+
*
|
|
2204
|
+
* @deprecated This option is currently unused and will be removed in a future major release.
|
|
2201
2205
|
*/
|
|
2202
2206
|
name?: string;
|
|
2203
2207
|
}
|
|
2204
2208
|
/**
|
|
2205
2209
|
* Configuration for a parallel workflow
|
|
2206
2210
|
*/
|
|
2207
|
-
interface ParallelWorkflowConfig<State
|
|
2211
|
+
interface ParallelWorkflowConfig<State, Update = ParallelNodeResult<State>> {
|
|
2208
2212
|
/**
|
|
2209
2213
|
* Nodes that execute in parallel
|
|
2210
2214
|
*/
|
|
2211
|
-
parallel: ParallelNode<State>[];
|
|
2215
|
+
parallel: ParallelNode<State, Update>[];
|
|
2212
2216
|
/**
|
|
2213
2217
|
* Optional aggregation node that runs after all parallel nodes complete
|
|
2214
2218
|
*/
|
|
2215
|
-
aggregate?: AggregateNode<State>;
|
|
2219
|
+
aggregate?: AggregateNode<State, Update>;
|
|
2216
2220
|
}
|
|
2217
2221
|
/**
|
|
2218
2222
|
* Creates a parallel workflow where multiple nodes execute concurrently.
|
|
@@ -2241,7 +2245,7 @@ interface ParallelWorkflowConfig<State> {
|
|
|
2241
2245
|
* @param options - Optional configuration
|
|
2242
2246
|
* @returns A configured StateGraph ready to compile
|
|
2243
2247
|
*/
|
|
2244
|
-
declare function createParallelWorkflow<
|
|
2248
|
+
declare function createParallelWorkflow<SD extends StateDefinition = StateDefinition, Update extends UpdateType<SD> = UpdateType<SD>>(stateSchema: AnnotationRoot<SD>, config: ParallelWorkflowConfig<ParallelWorkflowState<SD>, Update>, options?: ParallelWorkflowOptions): StateGraph<AnnotationRoot<SD>, ParallelWorkflowState<SD>, Update, string>;
|
|
2245
2249
|
|
|
2246
2250
|
/**
|
|
2247
2251
|
* Conditional Routing Utilities
|
package/dist/index.js
CHANGED
|
@@ -2179,7 +2179,7 @@ function sequentialBuilder(stateSchema) {
|
|
|
2179
2179
|
import { StateGraph as StateGraph2, END as END2, START as START2 } from "@langchain/langgraph";
|
|
2180
2180
|
function createParallelWorkflow(stateSchema, config, options = {}) {
|
|
2181
2181
|
const { parallel: parallel2, aggregate } = config;
|
|
2182
|
-
const { autoStartEnd = true
|
|
2182
|
+
const { autoStartEnd = true } = options;
|
|
2183
2183
|
if (parallel2.length === 0) {
|
|
2184
2184
|
throw new Error("Parallel workflow must have at least one parallel node");
|
|
2185
2185
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentforge/core",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.12",
|
|
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",
|