@agentforge/patterns 0.10.1 → 0.10.3

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
@@ -2389,11 +2389,6 @@ function wrapReActAgent(workerId, agent, verbose = false) {
2389
2389
  return async (state, config) => {
2390
2390
  try {
2391
2391
  logger.debug("Wrapping ReAct agent execution", { workerId });
2392
- const task = state.messages[state.messages.length - 1]?.content || state.input;
2393
- logger.debug("Extracted task", {
2394
- workerId,
2395
- taskPreview: task.substring(0, 100) + (task.length > 100 ? "..." : "")
2396
- });
2397
2392
  const currentAssignment = state.activeAssignments.find(
2398
2393
  (assignment) => assignment.workerId === workerId && !state.completedTasks.some((task2) => task2.assignmentId === assignment.id)
2399
2394
  );
@@ -2401,6 +2396,12 @@ function wrapReActAgent(workerId, agent, verbose = false) {
2401
2396
  logger.debug("No active assignment found", { workerId });
2402
2397
  return {};
2403
2398
  }
2399
+ const task = currentAssignment.task;
2400
+ logger.debug("Extracted task from assignment", {
2401
+ workerId,
2402
+ assignmentId: currentAssignment.id,
2403
+ taskPreview: task.substring(0, 100) + (task.length > 100 ? "..." : "")
2404
+ });
2404
2405
  const workerThreadId = config?.configurable?.thread_id ? `${config.configurable.thread_id}:worker:${workerId}` : void 0;
2405
2406
  const workerConfig = workerThreadId ? {
2406
2407
  ...config,
package/dist/index.js CHANGED
@@ -2286,11 +2286,6 @@ function wrapReActAgent(workerId, agent, verbose = false) {
2286
2286
  return async (state, config) => {
2287
2287
  try {
2288
2288
  logger.debug("Wrapping ReAct agent execution", { workerId });
2289
- const task = state.messages[state.messages.length - 1]?.content || state.input;
2290
- logger.debug("Extracted task", {
2291
- workerId,
2292
- taskPreview: task.substring(0, 100) + (task.length > 100 ? "..." : "")
2293
- });
2294
2289
  const currentAssignment = state.activeAssignments.find(
2295
2290
  (assignment) => assignment.workerId === workerId && !state.completedTasks.some((task2) => task2.assignmentId === assignment.id)
2296
2291
  );
@@ -2298,6 +2293,12 @@ function wrapReActAgent(workerId, agent, verbose = false) {
2298
2293
  logger.debug("No active assignment found", { workerId });
2299
2294
  return {};
2300
2295
  }
2296
+ const task = currentAssignment.task;
2297
+ logger.debug("Extracted task from assignment", {
2298
+ workerId,
2299
+ assignmentId: currentAssignment.id,
2300
+ taskPreview: task.substring(0, 100) + (task.length > 100 ? "..." : "")
2301
+ });
2301
2302
  const workerThreadId = config?.configurable?.thread_id ? `${config.configurable.thread_id}:worker:${workerId}` : void 0;
2302
2303
  const workerConfig = workerThreadId ? {
2303
2304
  ...config,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge/patterns",
3
- "version": "0.10.1",
3
+ "version": "0.10.3",
4
4
  "description": "Agent patterns (ReAct, Planner-Executor) for AgentForge framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -62,9 +62,5 @@
62
62
  "typescript": "^5.3.3",
63
63
  "typescript-eslint": "^8.19.1",
64
64
  "vitest": "^1.6.1"
65
- },
66
- "peerDependencies": {
67
- "@langchain/core": "^1.1.17",
68
- "@langchain/langgraph": "^1.1.2"
69
65
  }
70
66
  }