tuna-agent 0.1.74 → 0.1.75

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.
@@ -1,6 +1,7 @@
1
1
  import path from 'path';
2
2
  import os from 'os';
3
3
  import { spawn } from 'child_process';
4
+ import { StringDecoder } from 'string_decoder';
4
5
  import { runClaude } from '../utils/claude-cli.js';
5
6
  import { validatePath } from '../utils/validate-path.js';
6
7
  const NEEDS_INPUT_MARKER = '"status":"NEEDS_INPUT"';
@@ -82,8 +83,9 @@ export async function runTask(task, onProgress, signal, confirmBeforeEdit) {
82
83
  let stdout = '';
83
84
  let stderr = '';
84
85
  let buffer = '';
86
+ const stdoutDecoder = new StringDecoder('utf8');
85
87
  proc.stdout.on('data', (chunk) => {
86
- const text = chunk.toString();
88
+ const text = stdoutDecoder.write(chunk);
87
89
  stdout += text;
88
90
  buffer += text;
89
91
  const lines = buffer.split('\n');
@@ -100,8 +102,9 @@ export async function runTask(task, onProgress, signal, confirmBeforeEdit) {
100
102
  }
101
103
  }
102
104
  });
105
+ const stderrDecoder = new StringDecoder('utf8');
103
106
  proc.stderr.on('data', (chunk) => {
104
- stderr += chunk.toString();
107
+ stderr += stderrDecoder.write(chunk);
105
108
  });
106
109
  proc.on('close', (code) => {
107
110
  clearTimeout(timeoutTimer);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuna-agent",
3
- "version": "0.1.74",
3
+ "version": "0.1.75",
4
4
  "description": "Tuna Agent - Run AI coding tasks on your machine",
5
5
  "bin": {
6
6
  "tuna-agent": "dist/cli/index.js"