@agentforge/patterns 0.16.45 → 0.16.46
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 +15 -4
- package/dist/index.d.cts +29 -29
- package/dist/index.d.ts +29 -29
- package/dist/index.js +15 -4
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -103,28 +103,39 @@ module.exports = __toCommonJS(index_exports);
|
|
|
103
103
|
|
|
104
104
|
// src/react/schemas.ts
|
|
105
105
|
var import_zod = require("zod");
|
|
106
|
+
var JsonValueSchema = import_zod.z.lazy(
|
|
107
|
+
() => import_zod.z.union([
|
|
108
|
+
import_zod.z.string(),
|
|
109
|
+
import_zod.z.number().finite(),
|
|
110
|
+
import_zod.z.boolean(),
|
|
111
|
+
import_zod.z.null(),
|
|
112
|
+
import_zod.z.array(JsonValueSchema),
|
|
113
|
+
import_zod.z.record(JsonValueSchema)
|
|
114
|
+
])
|
|
115
|
+
);
|
|
116
|
+
var JsonObjectSchema = import_zod.z.record(JsonValueSchema);
|
|
106
117
|
var MessageRoleSchema = import_zod.z.enum(["system", "user", "assistant", "tool"]);
|
|
107
118
|
var MessageSchema = import_zod.z.object({
|
|
108
119
|
role: MessageRoleSchema,
|
|
109
120
|
content: import_zod.z.string(),
|
|
110
121
|
name: import_zod.z.string().optional(),
|
|
111
122
|
tool_call_id: import_zod.z.string().optional(),
|
|
112
|
-
metadata:
|
|
123
|
+
metadata: JsonObjectSchema.optional()
|
|
113
124
|
});
|
|
114
125
|
var ThoughtSchema = import_zod.z.object({
|
|
115
126
|
content: import_zod.z.string(),
|
|
116
127
|
timestamp: import_zod.z.number().optional(),
|
|
117
|
-
metadata:
|
|
128
|
+
metadata: JsonObjectSchema.optional()
|
|
118
129
|
});
|
|
119
130
|
var ToolCallSchema = import_zod.z.object({
|
|
120
131
|
id: import_zod.z.string(),
|
|
121
132
|
name: import_zod.z.string(),
|
|
122
|
-
arguments: import_zod.z.record(import_zod.z.
|
|
133
|
+
arguments: import_zod.z.record(import_zod.z.unknown()),
|
|
123
134
|
timestamp: import_zod.z.number().optional()
|
|
124
135
|
});
|
|
125
136
|
var ToolResultSchema = import_zod.z.object({
|
|
126
137
|
toolCallId: import_zod.z.string(),
|
|
127
|
-
result: import_zod.z.
|
|
138
|
+
result: import_zod.z.unknown(),
|
|
128
139
|
error: import_zod.z.string().optional(),
|
|
129
140
|
timestamp: import_zod.z.number().optional(),
|
|
130
141
|
isDuplicate: import_zod.z.boolean().optional()
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import * as _agentforge_core from '@agentforge/core';
|
|
2
|
+
import { JsonObject, ToolRegistry, Tool, ToolMetadata, LogLevel } from '@agentforge/core';
|
|
1
3
|
import { z } from 'zod';
|
|
2
4
|
import * as _langchain_langgraph from '@langchain/langgraph';
|
|
3
5
|
import { BaseCheckpointSaver, CompiledStateGraph } from '@langchain/langgraph';
|
|
4
6
|
import { BaseChatModel } from '@langchain/core/language_models/chat_models';
|
|
5
|
-
import * as _agentforge_core from '@agentforge/core';
|
|
6
|
-
import { ToolRegistry, Tool, ToolMetadata, LogLevel } from '@agentforge/core';
|
|
7
7
|
import { RunnableConfig } from '@langchain/core/runnables';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -27,19 +27,19 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
27
27
|
content: z.ZodString;
|
|
28
28
|
name: z.ZodOptional<z.ZodString>;
|
|
29
29
|
tool_call_id: z.ZodOptional<z.ZodString>;
|
|
30
|
-
metadata: z.ZodOptional<z.
|
|
30
|
+
metadata: z.ZodOptional<z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>>;
|
|
31
31
|
}, "strip", z.ZodTypeAny, {
|
|
32
32
|
role: "system" | "user" | "assistant" | "tool";
|
|
33
33
|
content: string;
|
|
34
34
|
name?: string | undefined;
|
|
35
35
|
tool_call_id?: string | undefined;
|
|
36
|
-
metadata?:
|
|
36
|
+
metadata?: JsonObject | undefined;
|
|
37
37
|
}, {
|
|
38
38
|
role: "system" | "user" | "assistant" | "tool";
|
|
39
39
|
content: string;
|
|
40
40
|
name?: string | undefined;
|
|
41
41
|
tool_call_id?: string | undefined;
|
|
42
|
-
metadata?:
|
|
42
|
+
metadata?: JsonObject | undefined;
|
|
43
43
|
}>;
|
|
44
44
|
type Message = z.infer<typeof MessageSchema>;
|
|
45
45
|
/**
|
|
@@ -48,14 +48,14 @@ type Message = z.infer<typeof MessageSchema>;
|
|
|
48
48
|
declare const ThoughtSchema: z.ZodObject<{
|
|
49
49
|
content: z.ZodString;
|
|
50
50
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
51
|
-
metadata: z.ZodOptional<z.
|
|
51
|
+
metadata: z.ZodOptional<z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>>;
|
|
52
52
|
}, "strip", z.ZodTypeAny, {
|
|
53
53
|
content: string;
|
|
54
|
-
metadata?:
|
|
54
|
+
metadata?: JsonObject | undefined;
|
|
55
55
|
timestamp?: number | undefined;
|
|
56
56
|
}, {
|
|
57
57
|
content: string;
|
|
58
|
-
metadata?:
|
|
58
|
+
metadata?: JsonObject | undefined;
|
|
59
59
|
timestamp?: number | undefined;
|
|
60
60
|
}>;
|
|
61
61
|
type Thought = z.infer<typeof ThoughtSchema>;
|
|
@@ -65,17 +65,17 @@ type Thought = z.infer<typeof ThoughtSchema>;
|
|
|
65
65
|
declare const ToolCallSchema: z.ZodObject<{
|
|
66
66
|
id: z.ZodString;
|
|
67
67
|
name: z.ZodString;
|
|
68
|
-
arguments: z.ZodRecord<z.ZodString, z.
|
|
68
|
+
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
69
69
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
70
70
|
}, "strip", z.ZodTypeAny, {
|
|
71
71
|
name: string;
|
|
72
72
|
id: string;
|
|
73
|
-
arguments: Record<string,
|
|
73
|
+
arguments: Record<string, unknown>;
|
|
74
74
|
timestamp?: number | undefined;
|
|
75
75
|
}, {
|
|
76
76
|
name: string;
|
|
77
77
|
id: string;
|
|
78
|
-
arguments: Record<string,
|
|
78
|
+
arguments: Record<string, unknown>;
|
|
79
79
|
timestamp?: number | undefined;
|
|
80
80
|
}>;
|
|
81
81
|
type ToolCall = z.infer<typeof ToolCallSchema>;
|
|
@@ -84,20 +84,20 @@ type ToolCall = z.infer<typeof ToolCallSchema>;
|
|
|
84
84
|
*/
|
|
85
85
|
declare const ToolResultSchema: z.ZodObject<{
|
|
86
86
|
toolCallId: z.ZodString;
|
|
87
|
-
result: z.
|
|
87
|
+
result: z.ZodUnknown;
|
|
88
88
|
error: z.ZodOptional<z.ZodString>;
|
|
89
89
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
90
90
|
isDuplicate: z.ZodOptional<z.ZodBoolean>;
|
|
91
91
|
}, "strip", z.ZodTypeAny, {
|
|
92
92
|
toolCallId: string;
|
|
93
93
|
timestamp?: number | undefined;
|
|
94
|
-
result?:
|
|
94
|
+
result?: unknown;
|
|
95
95
|
error?: string | undefined;
|
|
96
96
|
isDuplicate?: boolean | undefined;
|
|
97
97
|
}, {
|
|
98
98
|
toolCallId: string;
|
|
99
99
|
timestamp?: number | undefined;
|
|
100
|
-
result?:
|
|
100
|
+
result?: unknown;
|
|
101
101
|
error?: string | undefined;
|
|
102
102
|
isDuplicate?: boolean | undefined;
|
|
103
103
|
}>;
|
|
@@ -137,44 +137,44 @@ declare const ReActState: _langchain_langgraph.AnnotationRoot<{
|
|
|
137
137
|
content: string;
|
|
138
138
|
name?: string | undefined;
|
|
139
139
|
tool_call_id?: string | undefined;
|
|
140
|
-
metadata?:
|
|
140
|
+
metadata?: _agentforge_core.JsonObject | undefined;
|
|
141
141
|
}[], {
|
|
142
142
|
role: "system" | "user" | "assistant" | "tool";
|
|
143
143
|
content: string;
|
|
144
144
|
name?: string | undefined;
|
|
145
145
|
tool_call_id?: string | undefined;
|
|
146
|
-
metadata?:
|
|
146
|
+
metadata?: _agentforge_core.JsonObject | undefined;
|
|
147
147
|
}[], unknown>;
|
|
148
148
|
thoughts: _langchain_langgraph.BaseChannel<{
|
|
149
149
|
content: string;
|
|
150
|
-
metadata?:
|
|
150
|
+
metadata?: _agentforge_core.JsonObject | undefined;
|
|
151
151
|
timestamp?: number | undefined;
|
|
152
152
|
}[], {
|
|
153
153
|
content: string;
|
|
154
|
-
metadata?:
|
|
154
|
+
metadata?: _agentforge_core.JsonObject | undefined;
|
|
155
155
|
timestamp?: number | undefined;
|
|
156
156
|
}[], unknown>;
|
|
157
157
|
actions: _langchain_langgraph.BaseChannel<{
|
|
158
158
|
name: string;
|
|
159
159
|
id: string;
|
|
160
|
-
arguments: Record<string,
|
|
160
|
+
arguments: Record<string, unknown>;
|
|
161
161
|
timestamp?: number | undefined;
|
|
162
162
|
}[], {
|
|
163
163
|
name: string;
|
|
164
164
|
id: string;
|
|
165
|
-
arguments: Record<string,
|
|
165
|
+
arguments: Record<string, unknown>;
|
|
166
166
|
timestamp?: number | undefined;
|
|
167
167
|
}[], unknown>;
|
|
168
168
|
observations: _langchain_langgraph.BaseChannel<{
|
|
169
169
|
toolCallId: string;
|
|
170
170
|
timestamp?: number | undefined;
|
|
171
|
-
result?:
|
|
171
|
+
result?: unknown;
|
|
172
172
|
error?: string | undefined;
|
|
173
173
|
isDuplicate?: boolean | undefined;
|
|
174
174
|
}[], {
|
|
175
175
|
toolCallId: string;
|
|
176
176
|
timestamp?: number | undefined;
|
|
177
|
-
result?:
|
|
177
|
+
result?: unknown;
|
|
178
178
|
error?: string | undefined;
|
|
179
179
|
isDuplicate?: boolean | undefined;
|
|
180
180
|
}[], unknown>;
|
|
@@ -2441,16 +2441,16 @@ declare const AgentMessageSchema: z.ZodObject<{
|
|
|
2441
2441
|
*/
|
|
2442
2442
|
timestamp: z.ZodNumber;
|
|
2443
2443
|
}, "strip", z.ZodTypeAny, {
|
|
2444
|
-
content: string;
|
|
2445
2444
|
type: "error" | "user_input" | "task_assignment" | "task_result" | "handoff" | "completion";
|
|
2445
|
+
content: string;
|
|
2446
2446
|
timestamp: number;
|
|
2447
2447
|
id: string;
|
|
2448
2448
|
from: string;
|
|
2449
2449
|
to: string | string[];
|
|
2450
2450
|
metadata?: Record<string, any> | undefined;
|
|
2451
2451
|
}, {
|
|
2452
|
-
content: string;
|
|
2453
2452
|
type: "error" | "user_input" | "task_assignment" | "task_result" | "handoff" | "completion";
|
|
2453
|
+
content: string;
|
|
2454
2454
|
timestamp: number;
|
|
2455
2455
|
id: string;
|
|
2456
2456
|
from: string;
|
|
@@ -2730,16 +2730,16 @@ declare const MultiAgentStateConfig: {
|
|
|
2730
2730
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2731
2731
|
timestamp: z.ZodNumber;
|
|
2732
2732
|
}, "strip", z.ZodTypeAny, {
|
|
2733
|
-
content: string;
|
|
2734
2733
|
type: "error" | "user_input" | "task_assignment" | "task_result" | "handoff" | "completion";
|
|
2734
|
+
content: string;
|
|
2735
2735
|
timestamp: number;
|
|
2736
2736
|
id: string;
|
|
2737
2737
|
from: string;
|
|
2738
2738
|
to: string | string[];
|
|
2739
2739
|
metadata?: Record<string, any> | undefined;
|
|
2740
2740
|
}, {
|
|
2741
|
-
content: string;
|
|
2742
2741
|
type: "error" | "user_input" | "task_assignment" | "task_result" | "handoff" | "completion";
|
|
2742
|
+
content: string;
|
|
2743
2743
|
timestamp: number;
|
|
2744
2744
|
id: string;
|
|
2745
2745
|
from: string;
|
|
@@ -2747,8 +2747,8 @@ declare const MultiAgentStateConfig: {
|
|
|
2747
2747
|
metadata?: Record<string, any> | undefined;
|
|
2748
2748
|
}>, "many">;
|
|
2749
2749
|
reducer: (left: AgentMessage[], right: AgentMessage[]) => {
|
|
2750
|
-
content: string;
|
|
2751
2750
|
type: "error" | "user_input" | "task_assignment" | "task_result" | "handoff" | "completion";
|
|
2751
|
+
content: string;
|
|
2752
2752
|
timestamp: number;
|
|
2753
2753
|
id: string;
|
|
2754
2754
|
from: string;
|
|
@@ -3009,16 +3009,16 @@ declare const MultiAgentStateConfig: {
|
|
|
3009
3009
|
declare const MultiAgentState: _langchain_langgraph.AnnotationRoot<{
|
|
3010
3010
|
input: _langchain_langgraph.BaseChannel<string, string, unknown>;
|
|
3011
3011
|
messages: _langchain_langgraph.BaseChannel<{
|
|
3012
|
-
content: string;
|
|
3013
3012
|
type: "error" | "user_input" | "task_assignment" | "task_result" | "handoff" | "completion";
|
|
3013
|
+
content: string;
|
|
3014
3014
|
timestamp: number;
|
|
3015
3015
|
id: string;
|
|
3016
3016
|
from: string;
|
|
3017
3017
|
to: string | string[];
|
|
3018
3018
|
metadata?: Record<string, any> | undefined;
|
|
3019
3019
|
}[], {
|
|
3020
|
-
content: string;
|
|
3021
3020
|
type: "error" | "user_input" | "task_assignment" | "task_result" | "handoff" | "completion";
|
|
3021
|
+
content: string;
|
|
3022
3022
|
timestamp: number;
|
|
3023
3023
|
id: string;
|
|
3024
3024
|
from: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import * as _agentforge_core from '@agentforge/core';
|
|
2
|
+
import { JsonObject, ToolRegistry, Tool, ToolMetadata, LogLevel } from '@agentforge/core';
|
|
1
3
|
import { z } from 'zod';
|
|
2
4
|
import * as _langchain_langgraph from '@langchain/langgraph';
|
|
3
5
|
import { BaseCheckpointSaver, CompiledStateGraph } from '@langchain/langgraph';
|
|
4
6
|
import { BaseChatModel } from '@langchain/core/language_models/chat_models';
|
|
5
|
-
import * as _agentforge_core from '@agentforge/core';
|
|
6
|
-
import { ToolRegistry, Tool, ToolMetadata, LogLevel } from '@agentforge/core';
|
|
7
7
|
import { RunnableConfig } from '@langchain/core/runnables';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -27,19 +27,19 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
27
27
|
content: z.ZodString;
|
|
28
28
|
name: z.ZodOptional<z.ZodString>;
|
|
29
29
|
tool_call_id: z.ZodOptional<z.ZodString>;
|
|
30
|
-
metadata: z.ZodOptional<z.
|
|
30
|
+
metadata: z.ZodOptional<z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>>;
|
|
31
31
|
}, "strip", z.ZodTypeAny, {
|
|
32
32
|
role: "system" | "user" | "assistant" | "tool";
|
|
33
33
|
content: string;
|
|
34
34
|
name?: string | undefined;
|
|
35
35
|
tool_call_id?: string | undefined;
|
|
36
|
-
metadata?:
|
|
36
|
+
metadata?: JsonObject | undefined;
|
|
37
37
|
}, {
|
|
38
38
|
role: "system" | "user" | "assistant" | "tool";
|
|
39
39
|
content: string;
|
|
40
40
|
name?: string | undefined;
|
|
41
41
|
tool_call_id?: string | undefined;
|
|
42
|
-
metadata?:
|
|
42
|
+
metadata?: JsonObject | undefined;
|
|
43
43
|
}>;
|
|
44
44
|
type Message = z.infer<typeof MessageSchema>;
|
|
45
45
|
/**
|
|
@@ -48,14 +48,14 @@ type Message = z.infer<typeof MessageSchema>;
|
|
|
48
48
|
declare const ThoughtSchema: z.ZodObject<{
|
|
49
49
|
content: z.ZodString;
|
|
50
50
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
51
|
-
metadata: z.ZodOptional<z.
|
|
51
|
+
metadata: z.ZodOptional<z.ZodType<JsonObject, z.ZodTypeDef, JsonObject>>;
|
|
52
52
|
}, "strip", z.ZodTypeAny, {
|
|
53
53
|
content: string;
|
|
54
|
-
metadata?:
|
|
54
|
+
metadata?: JsonObject | undefined;
|
|
55
55
|
timestamp?: number | undefined;
|
|
56
56
|
}, {
|
|
57
57
|
content: string;
|
|
58
|
-
metadata?:
|
|
58
|
+
metadata?: JsonObject | undefined;
|
|
59
59
|
timestamp?: number | undefined;
|
|
60
60
|
}>;
|
|
61
61
|
type Thought = z.infer<typeof ThoughtSchema>;
|
|
@@ -65,17 +65,17 @@ type Thought = z.infer<typeof ThoughtSchema>;
|
|
|
65
65
|
declare const ToolCallSchema: z.ZodObject<{
|
|
66
66
|
id: z.ZodString;
|
|
67
67
|
name: z.ZodString;
|
|
68
|
-
arguments: z.ZodRecord<z.ZodString, z.
|
|
68
|
+
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
69
69
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
70
70
|
}, "strip", z.ZodTypeAny, {
|
|
71
71
|
name: string;
|
|
72
72
|
id: string;
|
|
73
|
-
arguments: Record<string,
|
|
73
|
+
arguments: Record<string, unknown>;
|
|
74
74
|
timestamp?: number | undefined;
|
|
75
75
|
}, {
|
|
76
76
|
name: string;
|
|
77
77
|
id: string;
|
|
78
|
-
arguments: Record<string,
|
|
78
|
+
arguments: Record<string, unknown>;
|
|
79
79
|
timestamp?: number | undefined;
|
|
80
80
|
}>;
|
|
81
81
|
type ToolCall = z.infer<typeof ToolCallSchema>;
|
|
@@ -84,20 +84,20 @@ type ToolCall = z.infer<typeof ToolCallSchema>;
|
|
|
84
84
|
*/
|
|
85
85
|
declare const ToolResultSchema: z.ZodObject<{
|
|
86
86
|
toolCallId: z.ZodString;
|
|
87
|
-
result: z.
|
|
87
|
+
result: z.ZodUnknown;
|
|
88
88
|
error: z.ZodOptional<z.ZodString>;
|
|
89
89
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
90
90
|
isDuplicate: z.ZodOptional<z.ZodBoolean>;
|
|
91
91
|
}, "strip", z.ZodTypeAny, {
|
|
92
92
|
toolCallId: string;
|
|
93
93
|
timestamp?: number | undefined;
|
|
94
|
-
result?:
|
|
94
|
+
result?: unknown;
|
|
95
95
|
error?: string | undefined;
|
|
96
96
|
isDuplicate?: boolean | undefined;
|
|
97
97
|
}, {
|
|
98
98
|
toolCallId: string;
|
|
99
99
|
timestamp?: number | undefined;
|
|
100
|
-
result?:
|
|
100
|
+
result?: unknown;
|
|
101
101
|
error?: string | undefined;
|
|
102
102
|
isDuplicate?: boolean | undefined;
|
|
103
103
|
}>;
|
|
@@ -137,44 +137,44 @@ declare const ReActState: _langchain_langgraph.AnnotationRoot<{
|
|
|
137
137
|
content: string;
|
|
138
138
|
name?: string | undefined;
|
|
139
139
|
tool_call_id?: string | undefined;
|
|
140
|
-
metadata?:
|
|
140
|
+
metadata?: _agentforge_core.JsonObject | undefined;
|
|
141
141
|
}[], {
|
|
142
142
|
role: "system" | "user" | "assistant" | "tool";
|
|
143
143
|
content: string;
|
|
144
144
|
name?: string | undefined;
|
|
145
145
|
tool_call_id?: string | undefined;
|
|
146
|
-
metadata?:
|
|
146
|
+
metadata?: _agentforge_core.JsonObject | undefined;
|
|
147
147
|
}[], unknown>;
|
|
148
148
|
thoughts: _langchain_langgraph.BaseChannel<{
|
|
149
149
|
content: string;
|
|
150
|
-
metadata?:
|
|
150
|
+
metadata?: _agentforge_core.JsonObject | undefined;
|
|
151
151
|
timestamp?: number | undefined;
|
|
152
152
|
}[], {
|
|
153
153
|
content: string;
|
|
154
|
-
metadata?:
|
|
154
|
+
metadata?: _agentforge_core.JsonObject | undefined;
|
|
155
155
|
timestamp?: number | undefined;
|
|
156
156
|
}[], unknown>;
|
|
157
157
|
actions: _langchain_langgraph.BaseChannel<{
|
|
158
158
|
name: string;
|
|
159
159
|
id: string;
|
|
160
|
-
arguments: Record<string,
|
|
160
|
+
arguments: Record<string, unknown>;
|
|
161
161
|
timestamp?: number | undefined;
|
|
162
162
|
}[], {
|
|
163
163
|
name: string;
|
|
164
164
|
id: string;
|
|
165
|
-
arguments: Record<string,
|
|
165
|
+
arguments: Record<string, unknown>;
|
|
166
166
|
timestamp?: number | undefined;
|
|
167
167
|
}[], unknown>;
|
|
168
168
|
observations: _langchain_langgraph.BaseChannel<{
|
|
169
169
|
toolCallId: string;
|
|
170
170
|
timestamp?: number | undefined;
|
|
171
|
-
result?:
|
|
171
|
+
result?: unknown;
|
|
172
172
|
error?: string | undefined;
|
|
173
173
|
isDuplicate?: boolean | undefined;
|
|
174
174
|
}[], {
|
|
175
175
|
toolCallId: string;
|
|
176
176
|
timestamp?: number | undefined;
|
|
177
|
-
result?:
|
|
177
|
+
result?: unknown;
|
|
178
178
|
error?: string | undefined;
|
|
179
179
|
isDuplicate?: boolean | undefined;
|
|
180
180
|
}[], unknown>;
|
|
@@ -2441,16 +2441,16 @@ declare const AgentMessageSchema: z.ZodObject<{
|
|
|
2441
2441
|
*/
|
|
2442
2442
|
timestamp: z.ZodNumber;
|
|
2443
2443
|
}, "strip", z.ZodTypeAny, {
|
|
2444
|
-
content: string;
|
|
2445
2444
|
type: "error" | "user_input" | "task_assignment" | "task_result" | "handoff" | "completion";
|
|
2445
|
+
content: string;
|
|
2446
2446
|
timestamp: number;
|
|
2447
2447
|
id: string;
|
|
2448
2448
|
from: string;
|
|
2449
2449
|
to: string | string[];
|
|
2450
2450
|
metadata?: Record<string, any> | undefined;
|
|
2451
2451
|
}, {
|
|
2452
|
-
content: string;
|
|
2453
2452
|
type: "error" | "user_input" | "task_assignment" | "task_result" | "handoff" | "completion";
|
|
2453
|
+
content: string;
|
|
2454
2454
|
timestamp: number;
|
|
2455
2455
|
id: string;
|
|
2456
2456
|
from: string;
|
|
@@ -2730,16 +2730,16 @@ declare const MultiAgentStateConfig: {
|
|
|
2730
2730
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2731
2731
|
timestamp: z.ZodNumber;
|
|
2732
2732
|
}, "strip", z.ZodTypeAny, {
|
|
2733
|
-
content: string;
|
|
2734
2733
|
type: "error" | "user_input" | "task_assignment" | "task_result" | "handoff" | "completion";
|
|
2734
|
+
content: string;
|
|
2735
2735
|
timestamp: number;
|
|
2736
2736
|
id: string;
|
|
2737
2737
|
from: string;
|
|
2738
2738
|
to: string | string[];
|
|
2739
2739
|
metadata?: Record<string, any> | undefined;
|
|
2740
2740
|
}, {
|
|
2741
|
-
content: string;
|
|
2742
2741
|
type: "error" | "user_input" | "task_assignment" | "task_result" | "handoff" | "completion";
|
|
2742
|
+
content: string;
|
|
2743
2743
|
timestamp: number;
|
|
2744
2744
|
id: string;
|
|
2745
2745
|
from: string;
|
|
@@ -2747,8 +2747,8 @@ declare const MultiAgentStateConfig: {
|
|
|
2747
2747
|
metadata?: Record<string, any> | undefined;
|
|
2748
2748
|
}>, "many">;
|
|
2749
2749
|
reducer: (left: AgentMessage[], right: AgentMessage[]) => {
|
|
2750
|
-
content: string;
|
|
2751
2750
|
type: "error" | "user_input" | "task_assignment" | "task_result" | "handoff" | "completion";
|
|
2751
|
+
content: string;
|
|
2752
2752
|
timestamp: number;
|
|
2753
2753
|
id: string;
|
|
2754
2754
|
from: string;
|
|
@@ -3009,16 +3009,16 @@ declare const MultiAgentStateConfig: {
|
|
|
3009
3009
|
declare const MultiAgentState: _langchain_langgraph.AnnotationRoot<{
|
|
3010
3010
|
input: _langchain_langgraph.BaseChannel<string, string, unknown>;
|
|
3011
3011
|
messages: _langchain_langgraph.BaseChannel<{
|
|
3012
|
-
content: string;
|
|
3013
3012
|
type: "error" | "user_input" | "task_assignment" | "task_result" | "handoff" | "completion";
|
|
3013
|
+
content: string;
|
|
3014
3014
|
timestamp: number;
|
|
3015
3015
|
id: string;
|
|
3016
3016
|
from: string;
|
|
3017
3017
|
to: string | string[];
|
|
3018
3018
|
metadata?: Record<string, any> | undefined;
|
|
3019
3019
|
}[], {
|
|
3020
|
-
content: string;
|
|
3021
3020
|
type: "error" | "user_input" | "task_assignment" | "task_result" | "handoff" | "completion";
|
|
3021
|
+
content: string;
|
|
3022
3022
|
timestamp: number;
|
|
3023
3023
|
id: string;
|
|
3024
3024
|
from: string;
|
package/dist/index.js
CHANGED
|
@@ -1,27 +1,38 @@
|
|
|
1
1
|
// src/react/schemas.ts
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
var JsonValueSchema = z.lazy(
|
|
4
|
+
() => z.union([
|
|
5
|
+
z.string(),
|
|
6
|
+
z.number().finite(),
|
|
7
|
+
z.boolean(),
|
|
8
|
+
z.null(),
|
|
9
|
+
z.array(JsonValueSchema),
|
|
10
|
+
z.record(JsonValueSchema)
|
|
11
|
+
])
|
|
12
|
+
);
|
|
13
|
+
var JsonObjectSchema = z.record(JsonValueSchema);
|
|
3
14
|
var MessageRoleSchema = z.enum(["system", "user", "assistant", "tool"]);
|
|
4
15
|
var MessageSchema = z.object({
|
|
5
16
|
role: MessageRoleSchema,
|
|
6
17
|
content: z.string(),
|
|
7
18
|
name: z.string().optional(),
|
|
8
19
|
tool_call_id: z.string().optional(),
|
|
9
|
-
metadata:
|
|
20
|
+
metadata: JsonObjectSchema.optional()
|
|
10
21
|
});
|
|
11
22
|
var ThoughtSchema = z.object({
|
|
12
23
|
content: z.string(),
|
|
13
24
|
timestamp: z.number().optional(),
|
|
14
|
-
metadata:
|
|
25
|
+
metadata: JsonObjectSchema.optional()
|
|
15
26
|
});
|
|
16
27
|
var ToolCallSchema = z.object({
|
|
17
28
|
id: z.string(),
|
|
18
29
|
name: z.string(),
|
|
19
|
-
arguments: z.record(z.
|
|
30
|
+
arguments: z.record(z.unknown()),
|
|
20
31
|
timestamp: z.number().optional()
|
|
21
32
|
});
|
|
22
33
|
var ToolResultSchema = z.object({
|
|
23
34
|
toolCallId: z.string(),
|
|
24
|
-
result: z.
|
|
35
|
+
result: z.unknown(),
|
|
25
36
|
error: z.string().optional(),
|
|
26
37
|
timestamp: z.number().optional(),
|
|
27
38
|
isDuplicate: z.boolean().optional()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentforge/patterns",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.46",
|
|
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.
|
|
44
|
+
"@agentforge/core": "0.16.46",
|
|
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.
|
|
50
|
+
"@agentforge/testing": "0.16.46",
|
|
51
51
|
"@eslint/js": "^9.17.0",
|
|
52
52
|
"@types/node": "^22.10.2",
|
|
53
53
|
"eslint": "^9.17.0",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"dev": "tsup src/index.ts --format esm,cjs --dts --watch",
|
|
63
63
|
"test": "vitest",
|
|
64
64
|
"test:coverage": "vitest --coverage",
|
|
65
|
-
"typecheck": "tsc --noEmit",
|
|
65
|
+
"typecheck": "tsc -p tsconfig.typecheck.json --noEmit",
|
|
66
66
|
"lint": "eslint src",
|
|
67
67
|
"lint:fix": "eslint src --fix",
|
|
68
68
|
"format": "prettier --write \"src/**/*.ts\"",
|