@hamp10/agentforge 0.2.11 → 0.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hamp10/agentforge",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
4
4
  "description": "AgentForge worker — connect your machine to agentforge.ai",
5
5
  "type": "module",
6
6
  "bin": {
@@ -84,7 +84,7 @@ const TOOLS = [
84
84
  type: 'function',
85
85
  function: {
86
86
  name: 'take_screenshot',
87
- description: 'Take a screenshot of the current screen or the agent browser (port 9223). Returns base64 image data you can analyze visually. Use this to check what a webpage looks like, verify a build result, or monitor a running process.',
87
+ description: 'Take a screenshot of the current screen or the agent browser (port 9223). Returns base64 image data you can analyze visually. Use this to check what a webpage looks like, verify a build result, or monitor a running process. Set send_to_user=true ONLY when the user explicitly asked to see a screenshot.',
88
88
  parameters: {
89
89
  type: 'object',
90
90
  properties: {
@@ -96,6 +96,10 @@ const TOOLS = [
96
96
  url: {
97
97
  type: 'string',
98
98
  description: 'Optional: navigate the browser to this URL before taking the screenshot.'
99
+ },
100
+ send_to_user: {
101
+ type: 'boolean',
102
+ description: 'If true, send the screenshot to the user\'s chat. Only set this when the user explicitly asked to see a screenshot or visual output.'
99
103
  }
100
104
  },
101
105
  required: ['target']
@@ -452,7 +456,7 @@ export class OllamaAgent extends EventEmitter {
452
456
  // so the model can actually see what was captured.
453
457
  // Also forward to dashboard so the user sees the screenshot in chat.
454
458
  const isImageResult = typeof result === 'string' && result.startsWith('data:image/');
455
- if (isImageResult) {
459
+ if (isImageResult && parsedArgs.send_to_user === true) {
456
460
  this.emit('agent_image', { agentId, image: result });
457
461
  }
458
462
  if (isImageResult && isVision) {