gekto 0.0.3 → 0.0.5
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.
|
@@ -39,11 +39,15 @@ export class HeadlessAgent {
|
|
|
39
39
|
}
|
|
40
40
|
runClaudeStreaming(args, callbacks) {
|
|
41
41
|
return new Promise((resolve, reject) => {
|
|
42
|
+
console.log(`[HeadlessAgent] Spawning: "${CLAUDE_PATH}"`);
|
|
42
43
|
const proc = spawn(CLAUDE_PATH, args, {
|
|
43
44
|
cwd: this.config.workingDir || process.cwd(),
|
|
44
45
|
env: process.env,
|
|
45
46
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
46
47
|
});
|
|
48
|
+
proc.on('error', (err) => {
|
|
49
|
+
console.error(`[HeadlessAgent] Spawn error:`, err);
|
|
50
|
+
});
|
|
47
51
|
this.currentProc = proc;
|
|
48
52
|
// Close stdin immediately - we pass everything via args
|
|
49
53
|
proc.stdin?.end();
|
|
@@ -52,11 +52,15 @@ function spawnOpus() {
|
|
|
52
52
|
'--disallowed-tools', 'Bash', 'Task',
|
|
53
53
|
'--session-id', gektoSessionId,
|
|
54
54
|
];
|
|
55
|
+
console.log(`[GektoPersistent] Spawning: "${CLAUDE_PATH}"`);
|
|
55
56
|
opusProcess = spawn(CLAUDE_PATH, args, {
|
|
56
57
|
cwd: workingDir,
|
|
57
58
|
env: process.env,
|
|
58
59
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
59
60
|
});
|
|
61
|
+
opusProcess.on('error', (err) => {
|
|
62
|
+
console.error(`[GektoPersistent] Spawn error:`, err);
|
|
63
|
+
});
|
|
60
64
|
opusProcess.stdout.on('data', (data) => {
|
|
61
65
|
opusBuffer += data.toString();
|
|
62
66
|
const lines = opusBuffer.split('\n');
|
|
@@ -143,11 +143,17 @@ function runClaudeOnce(prompt, systemPrompt, workingDir, callbacks) {
|
|
|
143
143
|
'--system-prompt', systemPrompt,
|
|
144
144
|
'--dangerously-skip-permissions',
|
|
145
145
|
];
|
|
146
|
+
console.log(`[Gekto] Spawning: "${CLAUDE_PATH}" with ${args.length} args`);
|
|
147
|
+
console.log(`[Gekto] First 3 args:`, args.slice(0, 3));
|
|
148
|
+
console.log(`[Gekto] CWD: ${workingDir}`);
|
|
146
149
|
const proc = spawn(CLAUDE_PATH, args, {
|
|
147
150
|
cwd: workingDir,
|
|
148
151
|
env: process.env,
|
|
149
152
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
150
153
|
});
|
|
154
|
+
proc.on('error', (err) => {
|
|
155
|
+
console.error(`[Gekto] Spawn error:`, err);
|
|
156
|
+
});
|
|
151
157
|
proc.stdin?.end();
|
|
152
158
|
let buffer = '';
|
|
153
159
|
let resultText = '';
|
package/dist/claudePath.js
CHANGED
|
@@ -42,6 +42,7 @@ function findClaudePath() {
|
|
|
42
42
|
}
|
|
43
43
|
// Resolve claude path at startup and export for other modules
|
|
44
44
|
export const CLAUDE_PATH = findClaudePath();
|
|
45
|
+
console.log(`[Gekto] Resolved CLAUDE_PATH: "${CLAUDE_PATH}"`);
|
|
45
46
|
// Verify claude is accessible
|
|
46
47
|
if (CLAUDE_PATH === 'claude') {
|
|
47
48
|
console.warn('⚠️ Claude CLI not found in common paths. Make sure it\'s installed and in PATH.');
|