tuna-agent 0.1.178 → 0.1.180

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.
@@ -445,8 +445,6 @@ export class ClaudeCodeAdapter {
445
445
  durationMs: totalDurationMs,
446
446
  sessionId,
447
447
  });
448
- await new Promise(resolve => setTimeout(resolve, 150));
449
- ws.sendPMMessage(task.id, { sender: 'pm', content: 'Task completed.' });
450
448
  this.trackMetrics('done', totalDurationMs, localAgentId);
451
449
  console.log(`[ClaudeCode] Agent Team task ${task.id} completed (${(totalDurationMs / 1000).toFixed(1)}s)`);
452
450
  // Post-task reflection with actual output (non-blocking)
@@ -803,11 +801,6 @@ export class ClaudeCodeAdapter {
803
801
  })),
804
802
  },
805
803
  });
806
- await new Promise(resolve => setTimeout(resolve, 150));
807
- ws.sendPMMessage(task.id, {
808
- sender: 'pm',
809
- content: `Task completed.`,
810
- });
811
804
  console.log(`[ClaudeCode] Task ${task.id} completed`);
812
805
  // Post-task reflection
813
806
  this.runReflection(task, plan.summary, 'done', task.repoPath).catch(() => { });
@@ -280,6 +280,15 @@ function createStreamHandler(info, subtask, callbacks) {
280
280
  const content = msg.content;
281
281
  if (content) {
282
282
  for (const block of content) {
283
+ // The agent's own narration between tool calls ("checking X first…",
284
+ // "step 1 done, now…") — relay it so surfaces can show progressive
285
+ // partial answers instead of silence until the final report.
286
+ if (block.type === 'text') {
287
+ const text = String(block.text || '').trim();
288
+ if (text) {
289
+ callbacks?.onSubtaskLog?.(subtask.id, { type: 'note', message: text });
290
+ }
291
+ }
283
292
  if (block.type === 'tool_use') {
284
293
  const toolName = block.name;
285
294
  const toolInput = block.input;
@@ -121,7 +121,7 @@ export function runClaude(options) {
121
121
  }
122
122
  // Always steer agents to answer the user in Vietnamese, regardless of the
123
123
  // language of the task/skill/context. Merged with any caller system prompt.
124
- const LANG_DIRECTIVE = 'ABSOLUTE OUTPUT RULES — these override everything else and apply to your ENTIRE response to the user: (1) Write 100% in Vietnamese (tiếng Việt). Never reply in English even when the task, skill, code or documents are in English; keep proper nouns / technical terms / commands / code as-is, but all explanation and prose MUST be Vietnamese. (2) Always address and refer to the user as "chủ tịch" (e.g. "Dạ chủ tịch", "Báo cáo chủ tịch", "Chủ tịch ơi"). Never use "bạn", "you", or the user\'s name to address them.';
124
+ const LANG_DIRECTIVE = 'ABSOLUTE OUTPUT RULES — these override everything else and apply to your ENTIRE response to the user: (1) Write 100% in Vietnamese (tiếng Việt). Never reply in English even when the task, skill, code or documents are in English; keep proper nouns / technical terms / commands / code as-is, but all explanation and prose MUST be Vietnamese. (2) Always address and refer to the user as "chủ tịch" (e.g. "Dạ chủ tịch", "Báo cáo chủ tịch", "Chủ tịch ơi"). Never use "bạn", "you", or the user\'s name to address them. (3) NEVER end your session with a promise of future work ("sẽ báo cáo sau", "sẽ làm tiếp khi có kết quả"...) — once your session ends, nothing resumes it, so that promise is a lie. If you started long-running/background work, WAIT for it inside this session (poll its output until it finishes) and deliver the actual result before ending. Only if it is truly impossible to finish, state clearly what is blocked and exactly what the user should say to resume it.';
125
125
  const mergedSystemPrompt = options.systemPrompt
126
126
  ? `${options.systemPrompt}\n\n${LANG_DIRECTIVE}`
127
127
  : LANG_DIRECTIVE;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuna-agent",
3
- "version": "0.1.178",
3
+ "version": "0.1.180",
4
4
  "description": "Tuna Agent - Run AI coding tasks on your machine",
5
5
  "bin": {
6
6
  "tuna-agent": "dist/cli/index.js"