@agentforge/patterns 0.16.7 → 0.16.9

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
@@ -281,6 +281,9 @@ var import_messages = require("@langchain/core/messages");
281
281
 
282
282
  // src/shared/deduplication.ts
283
283
  var import_core2 = require("@agentforge/core");
284
+ function isPlainObject(value) {
285
+ return typeof value === "object" && value !== null && Object.getPrototypeOf(value) === Object.prototype;
286
+ }
284
287
  function normalizeObject(obj) {
285
288
  if (obj === null || obj === void 0) {
286
289
  return obj;
@@ -288,8 +291,8 @@ function normalizeObject(obj) {
288
291
  if (Array.isArray(obj)) {
289
292
  return obj.map(normalizeObject);
290
293
  }
291
- if (typeof obj === "object" && obj.constructor === Object) {
292
- const normalized = {};
294
+ if (isPlainObject(obj)) {
295
+ const normalized = /* @__PURE__ */ Object.create(null);
293
296
  const sortedKeys = Object.keys(obj).sort();
294
297
  for (const key of sortedKeys) {
295
298
  normalized[key] = normalizeObject(obj[key]);
package/dist/index.d.cts CHANGED
@@ -3698,7 +3698,7 @@ declare function registerWorkers(system: MultiAgentSystemWithRegistry, workers:
3698
3698
  * // key3 === key4 (nested object order doesn't matter)
3699
3699
  * ```
3700
3700
  */
3701
- declare function generateToolCallCacheKey(toolName: string, args: any): string;
3701
+ declare function generateToolCallCacheKey(toolName: string, args: unknown): string;
3702
3702
  /**
3703
3703
  * Create a logger for a pattern with consistent configuration
3704
3704
  *
package/dist/index.d.ts CHANGED
@@ -3698,7 +3698,7 @@ declare function registerWorkers(system: MultiAgentSystemWithRegistry, workers:
3698
3698
  * // key3 === key4 (nested object order doesn't matter)
3699
3699
  * ```
3700
3700
  */
3701
- declare function generateToolCallCacheKey(toolName: string, args: any): string;
3701
+ declare function generateToolCallCacheKey(toolName: string, args: unknown): string;
3702
3702
  /**
3703
3703
  * Create a logger for a pattern with consistent configuration
3704
3704
  *
package/dist/index.js CHANGED
@@ -183,6 +183,9 @@ import {
183
183
 
184
184
  // src/shared/deduplication.ts
185
185
  import { createLogger } from "@agentforge/core";
186
+ function isPlainObject(value) {
187
+ return typeof value === "object" && value !== null && Object.getPrototypeOf(value) === Object.prototype;
188
+ }
186
189
  function normalizeObject(obj) {
187
190
  if (obj === null || obj === void 0) {
188
191
  return obj;
@@ -190,8 +193,8 @@ function normalizeObject(obj) {
190
193
  if (Array.isArray(obj)) {
191
194
  return obj.map(normalizeObject);
192
195
  }
193
- if (typeof obj === "object" && obj.constructor === Object) {
194
- const normalized = {};
196
+ if (isPlainObject(obj)) {
197
+ const normalized = /* @__PURE__ */ Object.create(null);
195
198
  const sortedKeys = Object.keys(obj).sort();
196
199
  for (const key of sortedKeys) {
197
200
  normalized[key] = normalizeObject(obj[key]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge/patterns",
3
- "version": "0.16.7",
3
+ "version": "0.16.9",
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.7",
44
+ "@agentforge/core": "0.16.9",
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.7",
50
+ "@agentforge/testing": "0.16.9",
51
51
  "@eslint/js": "^9.17.0",
52
52
  "@types/node": "^22.10.2",
53
53
  "eslint": "^9.17.0",