@lvx74/openrrouter-ai-agent 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Agent.js +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvx74/openrrouter-ai-agent",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A powerful AI agent toolkit compatible with @openai/agents for building conversational AI with tool calling support using OpenRouter",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/Agent.js CHANGED
@@ -29,6 +29,7 @@ export class Agent extends EventEmitter {
29
29
  this.model = options.model || 'qwen/qwen3-coder:free'
30
30
  this.systemPrompt = (options.instructions || options.systemPrompt || '') + `\n\nALWAYS CALL ONLY 1 tool at a time.\n`
31
31
  this.tools = options.tools || []
32
+ this.session = options.session || null // Aggiunto per supportare sessioni
32
33
  }
33
34
 
34
35
  this.messages = options.messages || []
@@ -179,7 +180,7 @@ export class Agent extends EventEmitter {
179
180
 
180
181
  console.log(`⚡ Eseguendo tool: ${name}...`)
181
182
  const startTime = Date.now()
182
- const result = await tool.execute(args)
183
+ const result = await tool.execute(args, this.session)
183
184
 
184
185
  if (this.verbose) {
185
186
  console.log(`📋 Observation (Osservazione da ${name}):`)