tuna-agent 0.1.16 → 0.1.18

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.
@@ -233,6 +233,7 @@ export class ClaudeCodeAdapter {
233
233
  if (err instanceof Error && err.message === '__FOLLOW_UP_TIMEOUT__') {
234
234
  console.log(`[ClaudeCode] No follow-up after ${FOLLOW_UP_TIMEOUT_MS / 1000}s — closing task`);
235
235
  pendingInputResolvers.delete(task.id);
236
+ this.runReflection(task, 'Agent Team task completed (no follow-up)', 'done', task.repoPath).catch(() => { });
236
237
  return;
237
238
  }
238
239
  throw err;
package/dist/mcp/setup.js CHANGED
@@ -75,17 +75,26 @@ export async function callMem0AddMemory(text, agentName) {
75
75
  clearTimeout(timer);
76
76
  proc.stdin.end();
77
77
  proc.kill();
78
- resolve();
78
+ // Check if the response contains an error
79
+ const hasError = stdout.includes('"isError":true') || stdout.includes('"error"');
80
+ if (hasError) {
81
+ // Extract error message from response
82
+ const errMatch = stdout.match(/"text"\s*:\s*"([^"]+)"/);
83
+ reject(new Error(`Mem0 add_memory failed: ${errMatch?.[1] || 'unknown error'}`));
84
+ }
85
+ else {
86
+ resolve();
87
+ }
79
88
  }
80
89
  }
81
90
  });
82
91
  // Send init immediately
83
92
  proc.stdin.write(initMsg + '\n');
84
- proc.on('close', () => {
93
+ proc.on('close', (code) => {
85
94
  if (!resolved) {
86
95
  resolved = true;
87
96
  clearTimeout(timer);
88
- resolve();
97
+ reject(new Error(`Mem0 process exited (code ${code}) without completing add_memory. stdout: ${stdout.substring(0, 300)}`));
89
98
  }
90
99
  });
91
100
  proc.on('error', (err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuna-agent",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "Tuna Agent - Run AI coding tasks on your machine",
5
5
  "bin": {
6
6
  "tuna-agent": "dist/cli/index.js"